text:
using System;

namespace SharpDX.DirectSound
{
    public partial class FullDuplex
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:SharpDX.DirectSound.FullDuplex" /> class.
        /// </summary>
        /// <param name="captureDevice" />
        /// <param name="playbackDevice" />
        /// <param name="captureDescription" />
        /// <param name="bufferDescription" />
        /// <param name="windowHandle" />
        /// <param name="level" />
        /// <param name="captureBuffer" />
        /// <param name="secondaryBuffer" />
        public FullDuplex(Guid captureDevice, Guid playbackDevice, CaptureBufferDescription captureDescription, SoundBufferDescription bufferDescription, IntPtr windowHandle, CooperativeLevel level, out CaptureBuffer captureBuffer, out SecondarySoundBuffer secondaryBuffer)
        {
            DSound.FullDuplexCreate(captureDevice, playbackDevice, captureDescription, bufferDescription, windowHandle, (int) level, this,
                                    out captureBuffer, out secondaryBuffer, null);
        }
    }
}


text:
package com.api.test.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;

import java.util.Arrays;

@Configuration
public class OauthSecurityConfiguration {

    @Configuration
    @EnableResourceServer
    protected static class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {

        @Override
        public void configure(HttpSecurity http) throws Exception {
            http
                    .authorizeRequests()
                    .anyRequest().authenticated();

//            http.authorizeRequests().anyRequest().permitAll();
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
#pragma once
#include <aws/sagemaker/SageMaker_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/sagemaker/model/UserProfileDetails.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace SageMaker
{
namespace Model
{
  class AWS_SAGEMAKER_API ListUserProfilesResult
  {
  public:
    ListUserProfilesResult();
    ListUserProfilesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    ListUserProfilesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /**
     *
The list of user profiles.

     */
    inline const Aws::Vector<UserProfileDetails>& GetUserProfiles() const{ return m_userProfiles; }

    /**
     *
The list of user profiles.

     */
    inline void SetUserProfiles(const Aws::Vector<UserProfileDetails>& value) { m_userProfiles = value; }

    /**
     *
The list of user profiles.

     */
    inline void SetUserProfiles(Aws::Vector<UserProfileDetails>&& value) { m_userProfiles = std::move(value); }

    /**
     *
The list of user profiles.

     */
    inline ListUserProfilesResult& WithUserProfiles(const Aws::Vector<UserProfileDetails>& value) { SetUserProfiles(value); return *this;}

    /**
     *
The list of user profiles.

     */
    inline ListUserProfilesResult& WithUserProfiles(Aws::Vector<UserProfileDetails>&& value) { SetUserProfiles(std::move(value)); return *this;}

    /**
     *
The list of user profiles.

     */
    inline ListUserProfilesResult& AddUserProfiles(const UserProfileDetails& value) { m_userProfiles.push_back(value); return *this; }

    /**
     *
The list of user profiles.

     */
    inline ListUserProfilesResult& AddUserProfiles(UserProfileDetails&& value) { m_userProfiles.push_back(std::move(value)); return *this; }

    /**
     *
If the previous response was truncated, you will receive this token. Use it
     * in your next request to receive the next set of results.

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

    /**
     *
If the previous response was truncated, you will receive this token. Use it
     * in your next request to receive the next set of results.

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

    /**
     *
If the previous response was truncated, you will receive this token. Use it
     * in your next request to receive the next set of results.

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

    /**
     *
If the previous response was truncated, you will receive this token. Use it
     * in your next request to receive the next set of results.

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

    /**
     *
If the previous response was truncated, you will receive this token. Use it
     * in your next request to receive the next set of results.

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

    /**
     *
If the previous response was truncated, you will receive this token. Use it
     * in your next request to receive the next set of results.

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

    /**
     *
If the previous response was truncated, you will receive this token. Use it
     * in your next request to receive the next set of results.

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

  private:

    Aws::Vector<UserProfileDetails> m_userProfiles;

    Aws::String m_nextToken;
  };

} // namespace Model
} // namespace SageMaker
} // namespace Aws


text:
/**
 */
package com.specmate.model.testspecification;

import com.specmate.model.base.INamed;

/**
 *
 * A representation of the model object 'Test Specification Skeleton'.
 *
 *
 *

 * The following features are supported:
 *

 *

 *
{@link com.specmate.model.testspecification.TestSpecificationSkeleton#getLanguage Language}

 *
{@link com.specmate.model.testspecification.TestSpecificationSkeleton#getCode Code}

 *

 *
 * @see com.specmate.model.testspecification.TestspecificationPackage#getTestSpecificationSkeleton()
 * @model
 * @generated
 */
public interface TestSpecificationSkeleton extends INamed {
	/**
	 * Returns the value of the 'Language' attribute.
	 * The default value is "".
	 *
	 *

	 * If the meaning of the 'Language' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Language' attribute.
	 * @see #setLanguage(String)
	 * @see com.specmate.model.testspecification.TestspecificationPackage#getTestSpecificationSkeleton_Language()
	 * @model default=""
	 * @generated
	 */
	String getLanguage();

	/**
	 * Sets the value of the '{@link com.specmate.model.testspecification.TestSpecificationSkeleton#getLanguage Language}' attribute.
	 *
	 *
	 * @param value the new value of the 'Language' attribute.
	 * @see #getLanguage()
	 * @generated
	 */
	void setLanguage(String value);

	/**
	 * Returns the value of the 'Code' attribute.
	 *
	 *

	 * If the meaning of the 'Code' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Code' attribute.
	 * @see #setCode(String)
	 * @see com.specmate.model.testspecification.TestspecificationPackage#getTestSpecificationSkeleton_Code()
	 * @model
	 * @generated
	 */
	String getCode();

	/**
	 * Sets the value of the '{@link com.specmate.model.testspecification.TestSpecificationSkeleton#getCode Code}' attribute.
	 *
	 *
	 * @param value the new value of the 'Code' attribute.
	 * @see #getCode()
	 * @generated
	 */
	void setCode(String value);

} // TestSpecificationSkeleton


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

<title>A-Index</title>
<meta name="date" content="2017-11-07">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A C D E G H M N P S

A

AcyclicDigraphGenerator - Class in generator

Iterator to generate directed acyclic graphs (DAGs) for a given number of vertices
 reading from txt files such as the ones that can be found in the Acyclic graphs section at
 http://users.cecs.anu.edu.au/~bdm/data/digraphs.html.

AcyclicDigraphGenerator(int) - Constructor for class generator.AcyclicDigraphGenerator

AcyclicTournaments - Class in scripts

AcyclicTournaments() - Constructor for class scripts.AcyclicTournaments

addArc(int, int) - Method in class digraph.Digraph

A C D E G H M N P S

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
<?php

namespace feedly\Response;

use \InvalidArgumentException;

class AccessTokenResponse implements Response
{

    private $accessToken;

    private $expiresIn;

    private $refreshToken;

    public function __construct(array $response)
    {
        if (!isset($response['access_token'])) {
            throw new InvalidArgumentException('Missing access token in response');
        }

        $this->accessToken = $response['access_token'];
        $this->expiresIn   = $response['expires_in'];

        if (isset($response['refresh_token'])) {
            $this->refreshToken = $response['refresh_token'];
        }
    }

    public function getAccessToken()
    {
        return $this->accessToken;
    }

    public function getExpiresIn()
    {
        return $this->expiresIn;
    }

    public function getRefreshToken()
    {
        return $this->refreshToken;
    }
}


text:
// The utility to check whether we have Cudnn dependency.

#ifndef TENSORFLOW_UTIL_USE_CUDNN_H_
#define TENSORFLOW_UTIL_USE_CUDNN_H_

namespace tensorflow {

bool CanUseCudnn();
bool CudnnUseAutotune();

}  // namespace tensorflow

#endif  // TENSORFLOW_UTIL_USE_CUDNN_H_


text:
package com.joptimizer.algebra;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import cern.colt.matrix.DoubleFactory1D;
import cern.colt.matrix.DoubleFactory2D;
import cern.colt.matrix.DoubleMatrix1D;
import cern.colt.matrix.DoubleMatrix2D;
import cern.colt.matrix.linalg.Algebra;
import cern.colt.matrix.linalg.Property;

import com.joptimizer.util.Utils;

/**
 * Cholesky L.L[T] factorization for symmetric and positive matrix.
 * L is stores in a Row-Compressed way.
 *
 * @author alberto trivellato (alberto.trivellato@gmail.com)
 * @TODO: implement the solve method
 */
public class CholeskyRCFactorization {

	private int dim;
	private DoubleMatrix2D Q;
	double[] LData;
	private DoubleMatrix2D L;
	private DoubleMatrix2D LT;
	protected Algebra ALG = Algebra.DEFAULT;
	protected DoubleFactory2D F2 = DoubleFactory2D.dense;
	protected DoubleFactory1D F1 = DoubleFactory1D.dense;
	private Log log = LogFactory.getLog(this.getClass().getName());

	public CholeskyRCFactorization(DoubleMatrix2D Q) throws Exception{
		this.dim = Q.rows();
		this.Q = Q;
	}

	public void factorize() throws Exception{
		factorize(false);
	}

	/**
	 * Cholesky factorization L of psd matrix, Q = L.LT
	 */
	public void factorize(boolean checkSymmetry) throws Exception{
		if (checkSymmetry && !Property.TWELVE.isSymmetric(Q)) {
			throw new Exception("Matrix is not symmetric");
		}

		double threshold = Utils.getDoubleMachineEpsilon();
		this.LData = new double[dim * dim];

		for (int i = 0; i < dim; i++) {
			int iShift = i*dim;
			for (int j = 0; j < i+1; j++) {
				int jShift = j*dim;
				double sum = 0.0;
				for (int k = 0; k < j; k++) {
					sum += LData[jShift + k] * LData[iShift + k];
				}
				if (i == j){
					double d = Q.getQuick(i, i) - sum;
					if(!(d > threshold)){
						throw new Exception("not positive definite matrix");
					}
					LData[iShift + i] = Math.sqrt(d);
				} else {
					LData[iShift + j] = 1.0 / LData[jShift + j] * (Q.getQuick(i, j) - sum);
				}
			}
		}
	}

	/**
	 *
	 * @deprecated use the solve() methods instead
	 */
	@Deprecated
	public DoubleMatrix2D getInverse() {

		//QInv = LTInv * LInv, but for symmetry (QInv=QInvT)
		//QInv = LInvT * LTInvT = LInvT * LInv, so
		//LInvT = LTInv, and we calculate
		//QInv = LInvT * LInv

		// LTInv calculation (it will be x)
		// NB: LInv is lower-triangular
		double[] LInv = new double[dim*dim];
//		for(int i=0; i<dim; i++){
//			//diagonal filling
//			LInv[i*dim + i] = 1.;
//		}
		for (int j = 0; j < dim; j++) {
			int jShift = j*dim;
			LInv[jShift + j] = 1.;//diagonal filling
			final double lTJJ = LData[jShift + j];
			for (int k = 0; k < j+1; ++k) {
				LInv[jShift + k] /= lTJJ;
			}
			for (int i = j + 1; i < dim; i++) {
				int iShift = i*dim;
				final double lTJI = LData[iShift + j];
				if(Double.compare(lTJI, 0.)!=0){
					for (int k = 0; k < j+1; ++k) {
						LInv[iShift + k] -= LInv[jShift + k] * lTJI;
					}
				}
			}
		}

		//log.debug("LInv: " + ArrayUtils.toString(LInv));

		// QInv
		// NB: LInvT is upper-triangular, so LInvT[i][j]=0 if i>j
		final DoubleMatrix2D QInvData = F2.make(dim, dim);
		for (int row = 0; row < dim; row++) {
			//final double[] LInvTDataRow = LInvTData[row];
			final DoubleMatrix1D QInvDataRow = QInvData.viewRow(row);
			for (int col = row; col < dim; col++) {// symmetry of QInv
				//final double[] LInvTDataCol = LInvTData[col];
				double sum = 0;
				for (int i = col; i < dim; i++) {// upper triangular
					sum += LInv[i*dim + row] * LInv[i*dim + col];
				}
				QInvDataRow.setQuick(col, sum);
				QInvData.setQuick(col, row, sum);// symmetry of QInv
			}
		}

		return QInvData;
	}

	/**
	 * @TODO: implement this method
	 */
	public DoubleMatrix1D solve(DoubleMatrix1D b) {
		if (b.size() != dim) {
			log.error("wrong dimension of vector b: expected " + dim +", actual " + b.size());
			throw new RuntimeException("wrong dimension of vector b: expected " + dim +", actual " + b.size());
		}

		throw new RuntimeException("not yet implemented");
	}

	/**
	 * @TODO: implement this method
	 */
	public DoubleMatrix2D solve(DoubleMatrix2D B) {
		  if (B.rows() != dim) {
				log.error("wrong dimension of vector b: expected " + dim +", actual " + B.rows());
				throw new RuntimeException("wrong dimension of vector b: expected " + dim +", actual " + B.rows());
			}
		  throw new RuntimeException("not yet implemented");
	}

	public DoubleMatrix2D getL() {
		if (L == null) {
			double[][] myL = new double[dim][dim];
			for (int i = 0; i < dim; i++) {
				int iShift = i * dim;
				double[] myLI = myL[i];
				for (int j = 0; j <= i; j++) {
					myLI[j] = LData[iShift + j];
				}
			}
			this.L = F2.make(myL);
		}

		return L;
	}

	public DoubleMatrix2D getLT() {
		if(this.LT == null){
			this.LT = ALG.transpose(getL());
		}
		return this.LT;
	}

}


text:
#include "common.h"
#include "image.h"

#include <CL/cl.h>
#include <iostream>
#include <chrono>
#include <cstring>

using namespace std;
using namespace chrono;

#define NUM_OP 8

int main(void)
{
    cl_context context = 0;
    cl_command_queue commandQueue = 0;
    cl_program program = 0;
    cl_device_id device = 0;
    cl_kernel kernels[NUM_OP] = {0};
    cl_event event = 0;

    int numberOfMemoryObjects = 10;
    cl_mem memoryObjects[10] = {0};
    cl_int errorNumber;
    string kernel_names[] = {"matrix_multiply", "matrix_nonlin", "matrix_nonlin_derivative",
        "matrix_subtract", "matrix_point_multiply", "matrix_transpose", "matrix_multiply", "matrix_add"};

    size_t M = 4, N = 3, K = 1;
    size_t globalWorksize[2] = {M, K};
    const size_t localWorksize[2] = {1, 1};
    bool setKernelArgumentsSuccess = true;

    /*  Prepare context, command queue, program and kernels
        NOTE: Take note, when we call cleanUpOpenCL we only send first kernel */

    if (!createContext(&context))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed to create an OpenCL context. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    if (!createCommandQueue(context, &commandQueue, &device))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed to create the OpenCL command queue. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    if (!createProgram(context, device, "assets/kernels.cl", &program))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed to create OpenCL program." << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    for (int i = 0; i < NUM_OP; i++)
    {
        kernels[i] = clCreateKernel(program, kernel_names[i].c_str(), &errorNumber);

        if (!checkSuccess(errorNumber))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed to create OpenCL kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }
    }

    /* Ask the OpenCL implementation to allocate buffers for the data */
    bool createMemoryObjectsSuccess = true;
    size_t buffSizes[] = {12, 4, 3, 4, 4, 4, 4, 4, 12, 3};

    for (int i = 0; i < numberOfMemoryObjects; i++)
    {
        memoryObjects[i] = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR, buffSizes[i], NULL, &errorNumber);
        createMemoryObjectsSuccess &= checkSuccess(errorNumber);
    }

    if (!createMemoryObjectsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed to create OpenCL buffer. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* Map the memory buffers created by the OpenCL implementation to pointers so we can access them on the CPU */
    bool mapMemoryObjectsSuccess = true;

    cl_float* X = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[0],
        CL_TRUE, CL_MAP_WRITE, 0, buffSizes[0], 0, NULL, NULL, &errorNumber);
    mapMemoryObjectsSuccess &= checkSuccess(errorNumber);

    cl_float* Y = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[1],
        CL_TRUE, CL_MAP_WRITE, 0, buffSizes[1], 0, NULL, NULL, &errorNumber);
    mapMemoryObjectsSuccess &= checkSuccess(errorNumber);

    cl_float* Syn = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[2],
        CL_TRUE, CL_MAP_WRITE, 0, buffSizes[2], 0, NULL, NULL, &errorNumber);
    mapMemoryObjectsSuccess &= checkSuccess(errorNumber);

    /* Initialize the data */
    cl_float _X[] = {0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1};
    cl_float _Y[] = {0, 0, 1, 1};
    cl_float _Syn[] = {1, -0.73692, -0.082699};

    for (int i=0; i<12; i++)
        X[i] = _X[i];

    for (int i=0; i<4; i++)
        Y[i] = _Y[i];

    for (int i=0; i<3; i++)
        Syn[i] = _Syn[i];

    /* Unmap buffers, so GPU can use them */
    if (!checkSuccess(clEnqueueUnmapMemObject(commandQueue, memoryObjects[0], X, 0, NULL, NULL)))
    {
       cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
       cerr << "Unmapping memory objects failed " << __FILE__ << ":"<< __LINE__ << endl;
       return 1;
    }

    if (!checkSuccess(clEnqueueUnmapMemObject(commandQueue, memoryObjects[1], Y, 0, NULL, NULL)))
    {
       cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
       cerr << "Unmapping memory objects failed " << __FILE__ << ":"<< __LINE__ << endl;
       return 1;
    }

    if (!checkSuccess(clEnqueueUnmapMemObject(commandQueue, memoryObjects[2], Syn, 0, NULL, NULL)))
    {
       cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
       cerr << "Unmapping memory objects failed " << __FILE__ << ":"<< __LINE__ << endl;
       return 1;
    }

    /* multiply */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[0], 0, sizeof(int), (void*)&M));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[0], 1, sizeof(int), (void*)&K));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[0], 2, sizeof(int), (void*)&N));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[0], 3, sizeof(cl_mem), (void*)&memoryObjects[0]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[0], 4, sizeof(cl_mem), (void*)&memoryObjects[2]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[0], 5, sizeof(cl_mem), (void*)&memoryObjects[3]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[0], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* nonlin */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[1], 0, sizeof(int), (void*)&M));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[1], 1, sizeof(int), (void*)&K));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[1], 2, sizeof(cl_mem), (void*)&memoryObjects[3]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[1], 3, sizeof(cl_mem), (void*)&memoryObjects[4]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[1], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    globalWorksize[1] = K;

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[1], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[1], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* subtract */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[3], 0, sizeof(int), (void*)&M));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[3], 1, sizeof(int), (void*)&K));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[3], 2, sizeof(cl_mem), (void*)&memoryObjects[1]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[3], 3, sizeof(cl_mem), (void*)&memoryObjects[4]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[3], 4, sizeof(cl_mem), (void*)&memoryObjects[5]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[3], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[3], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[3], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* nonlinear derivative */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[2], 0, sizeof(int), (void*)&M));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[2], 1, sizeof(int), (void*)&K));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[2], 2, sizeof(cl_mem), (void*)&memoryObjects[4]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[2], 3, sizeof(cl_mem), (void*)&memoryObjects[6]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[2], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[2], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[2], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* point wise */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[4], 0, sizeof(int), (void*)&M));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[4], 1, sizeof(int), (void*)&K));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[4], 2, sizeof(cl_mem), (void*)&memoryObjects[5]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[4], 3, sizeof(cl_mem), (void*)&memoryObjects[6]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[4], 4, sizeof(cl_mem), (void*)&memoryObjects[7]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[4], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[4], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[4], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* transpose */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[5], 0, sizeof(int), (void*)&M));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[5], 1, sizeof(int), (void*)&N));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[5], 2, sizeof(cl_mem), (void*)&memoryObjects[0]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[5], 3, sizeof(cl_mem), (void*)&memoryObjects[8]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[5], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    globalWorksize[1] = N;

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[5], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[5], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* multiply */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[6], 0, sizeof(int), (void*)&N));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[6], 1, sizeof(int), (void*)&K));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[6], 2, sizeof(int), (void*)&M));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[6], 3, sizeof(cl_mem), (void*)&memoryObjects[8]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[6], 4, sizeof(cl_mem), (void*)&memoryObjects[7]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[6], 5, sizeof(cl_mem), (void*)&memoryObjects[9]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[6], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    globalWorksize[0] = N;
    globalWorksize[1] = M;

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[6], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[6], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* add */
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[7], 0, sizeof(int), (void*)&N));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[7], 1, sizeof(int), (void*)&K));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[7], 2, sizeof(cl_mem), (void*)&memoryObjects[9]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[7], 3, sizeof(cl_mem), (void*)&memoryObjects[2]));
    setKernelArgumentsSuccess &= checkSuccess(clSetKernelArg(kernels[7], 4, sizeof(cl_mem), (void*)&memoryObjects[2]));

    if (!setKernelArgumentsSuccess)
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[7], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed setting OpenCL kernel arguments. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    globalWorksize[0] = N;
    globalWorksize[1] = K;

    if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[7], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[7], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    /* All again */
    for (int i = 0; i<6000; i++)
    {
        globalWorksize[0] = M;
        globalWorksize[1] = K;

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[0], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }

        globalWorksize[1] = K;

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[1], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[1], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[3], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[3], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[2], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[2], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[4], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[4], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }

        globalWorksize[1] = N;

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[5], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[5], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }

        globalWorksize[0] = N;
        globalWorksize[1] = M;

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[6], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[6], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }

        globalWorksize[0] = N;
        globalWorksize[1] = K;

        if (!checkSuccess(clEnqueueNDRangeKernel(commandQueue, kernels[7], 2, NULL, globalWorksize, localWorksize, 0, NULL, &event)))
        {
            cleanUpOpenCL(context, commandQueue, program, kernels[7], memoryObjects, numberOfMemoryObjects);
            cerr << "Failed enqueuing the kernel. " << __FILE__ << ":"<< __LINE__ << endl;
            return 1;
        }
    }

    /* Wait for command queue to finish, wait for event and release it */
    if (!checkSuccess(clFinish(commandQueue)))
    {
        cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
        cerr << "Failed waiting for kernel execution to finish. " << __FILE__ << ":"<< __LINE__ << endl;
        return 1;
    }

    clWaitForEvents(1, &event);

    if (!checkSuccess(clReleaseEvent(event)))
    {
       cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
       cerr << "Failed releasing the event object. " << __FILE__ << ":"<< __LINE__ << endl;
       return 1;
    }

    /* Map buffer to read results */
    X = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[0],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[0], 0, NULL, NULL, &errorNumber);

    Y = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[1],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[1], 0, NULL, NULL, &errorNumber);

    Syn = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[2],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[2], 0, NULL, NULL, &errorNumber);

    cl_float* L1 = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[3],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[3], 0, NULL, NULL, &errorNumber);

    cl_float* L2 = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[4],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[4], 0, NULL, NULL, &errorNumber);

    cl_float* L3 = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[5],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[5], 0, NULL, NULL, &errorNumber);

    cl_float* L4 = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[6],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[6], 0, NULL, NULL, &errorNumber);

    cl_float* L5 = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[7],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[7], 0, NULL, NULL, &errorNumber);

    cl_float* L6 = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[8],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[8], 0, NULL, NULL, &errorNumber);

    cl_float* L7 = (cl_float*)clEnqueueMapBuffer(commandQueue, memoryObjects[9],
        CL_TRUE, CL_MAP_READ, 0, buffSizes[9], 0, NULL, NULL, &errorNumber);

    if (!checkSuccess(errorNumber))
    {
       cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
       cerr << "Failed to map buffer. " << __FILE__ << ":"<< __LINE__ << endl;
       return 1;
    }

    cout << "X: " << endl;
    for (unsigned int i = 0; i < buffSizes[0]; i++)
    {
        cout << "i= " << i << " " << X[i] << endl;
    }

    cout << "y: " << endl;
    for (unsigned int i = 0; i < buffSizes[1]; i++)
    {
        cout << "i= " << i << " " << Y[i] << endl;
    }

    cout << "Syn: " << endl;
    for (unsigned int i = 0; i < buffSizes[2]; i++)
    {
        cout << "i= " << i << " " << Syn[i] << endl;
    }

    cout << "L1: " << endl;
    for (unsigned int i = 0; i < buffSizes[3]; i++)
    {
        cout << "i= " << i << " " << L1[i] << endl;
    }

    cout << "L2: " << endl;
    for (unsigned int i = 0; i < buffSizes[4]; i++)
    {
        cout << "i= " << i << " " << L2[i] << endl;
    }

    cout << "L3: " << endl;
    for (unsigned int i = 0; i < buffSizes[5]; i++)
    {
        cout << "i= " << i << " " << L3[i] << endl;
    }

    cout << "L4: " << endl;
    for (unsigned int i = 0; i < buffSizes[6]; i++)
    {
        cout << "i= " << i << " " << L4[i] << endl;
    }

    cout << "L5: " << endl;
    for (unsigned int i = 0; i < buffSizes[7]; i++)
    {
        cout << "i= " << i << " " << L5[i] << endl;
    }

    cout << "L6: " << endl;
    for (unsigned int i = 0; i < buffSizes[8]; i++)
    {
        cout << "i= " << i << " " << L6[i] << endl;
    }

    cout << "L7: " << endl;
    for (unsigned int i = 0; i < buffSizes[9]; i++)
    {
        cout << "i= " << i << " " << L7[i] << endl;
    }

    if (!checkSuccess(clEnqueueUnmapMemObject(commandQueue, memoryObjects[3], L1, 0, NULL, NULL)))
    {
       cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
       cerr << "Unmapping memory objects failed " << __FILE__ << ":"<< __LINE__ << endl;
       return 1;
    }

    cleanUpOpenCL(context, commandQueue, program, kernels[0], memoryObjects, numberOfMemoryObjects);
}


text:
package oo.heranca.exercicios;

public class IngressoVip extends Ingresso {
	private double adicional;

	public IngressoVip(double valor , double adicional) {
		super(valor);
		setAdicional(valor + adicional);
	}

	public double getAdicional() {
		return adicional;
	}

	public void setAdicional(double adicional) {
		this.adicional = adicional;
	}

}


text:
> 2017/10/24
- Debug Compile Stetho and BlockCanary

> 2017/10/10
- Add SwipeBack Activity
- Add Gank

> 2017/10/1
- Add Goto System Intent

> 2017/9/29
- Add Share Function

> 2017/9/27
- Add Hide Input Method When Action Down Out of the bound of KeyBoard
- NestedWebView coordinate Toolbar
- Add KeyBoardUtil

> 2017/9/26
- [Start] WebViewActivity

> 2017/9/25
- Finish Brightness Function

> 2017/9/23
- Extract base requestWriteSettingsPermission method

> 2017/9/22
- Permission Activity Fragment
- Add Adjust Brightness

> 2017/9/20
- Add util class
- Add feature ui(Calendar and Clock)

> 2017/9/19
- Add SigningConfigs

> 2017/9/18
- Add proguard rules

> 2017/9/17
- Add vector drawable
- Using mvp-RxJava

> 2017/8/24
- Add NavigationView Menu
- Add Launcher ShortCutUtil

> 2017/8/23
- Add Dependencies
- Add SplashActivity

> 2017/8/20
- DrawerLayout and NavigationView
- SVG transfer Vector

> 2017/8/19
- Switching DayNight Mode Animation-Reveal Effect
- Immersed status bar

> 2017/8/18
- An Easy BaseActivity packages findViewById
- DayNight Mode


text:
/**
 * \file IBlock.h
 * \class IBlock
 * \brief Interface that will be implemented by all the different kinds of blocks
 * \author Adrien Bodineau and Alexandre Gomes
 * \version 1.0
 */

#ifndef IBLOCK_H_INCLUDED
#define IBLOCK_H_INCLUDED

#include <SFML/Graphics.hpp>

class IBlock {
 public:
  /** \brief Return the texture of the block
   * \fn virtual sf::Texture* getTexture() = 0
   * \return The texture of the block
   */
  virtual sf::Texture* getTexture() = 0;

  /** \brief Return the sprite of the block
   * \fn virtual sf::Sprite* getSprite() = 0
   * \return The sprite of the block
   */
  virtual sf::Sprite* getSprite() = 0;
 protected:
 private:
};

#endif // IBLOCK_H_INCLUDED


text:
from __future__ import absolute_import, unicode_literals

import unittest

import mock

from mopidy import mixer

class MixerListenerTest(unittest.TestCase):
    def setUp(self):  # noqa: N802
        self.listener = mixer.MixerListener()

    def test_on_event_forwards_to_specific_handler(self):
        self.listener.volume_changed = mock.Mock()

        self.listener.on_event(
            'volume_changed', volume=60)

        self.listener.volume_changed.assert_called_with(volume=60)

    def test_listener_has_default_impl_for_volume_changed(self):
        self.listener.volume_changed(volume=60)

    def test_listener_has_default_impl_for_mute_changed(self):
        self.listener.mute_changed(mute=True)


text:
package org.ovirt.engine.core.common.vdscommands;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.ovirt.engine.core.common.businessentities.storage.DiskImage;
import org.ovirt.engine.core.compat.Guid;

public class UpdateVmPolicyVDSParams extends VdsAndVmIDVDSParametersBase {

    private Integer cpuLimit;
    private List<IoTuneParams> ioTuneList = new ArrayList<>();

    public UpdateVmPolicyVDSParams() {
    }

    public UpdateVmPolicyVDSParams(Guid vdsId, Guid vmId, Integer cpuLimit) {
        super(vdsId, vmId);
        this.cpuLimit = cpuLimit;
    }

    public Integer getCpuLimit() {
        return cpuLimit;
    }

    public void setCpuLimit(Integer cpuLimit) {
        this.cpuLimit = cpuLimit;
    }

    public List<IoTuneParams> getIoTuneList() {
        return ioTuneList;
    }

    public void setIoTuneList(List<IoTuneParams> ioTuneList) {
        this.ioTuneList = ioTuneList;
    }

    public void addIoTuneParams(IoTuneParams params) {
        ioTuneList.add(params);
    }

    public void addIoTuneParams(String domainId, String poolId,
            String imageId, String volumeId,
            Map<String, Long> ioTune) {
        addIoTuneParams(new IoTuneParams(domainId, poolId, imageId, volumeId, ioTune));
    }

    public void addIoTuneParams(DiskImage diskImage, Map<String, Long> ioTune) {
        String domainId = diskImage.getStorageIds().get(0).toString();
        String poolId = diskImage.getStoragePoolId().toString();
        String imageId = diskImage.getId().toString();
        String volumeId = diskImage.getImageId().toString();

        addIoTuneParams(domainId, poolId, imageId, volumeId, ioTune);
    }

    public static class IoTuneParams {
        private String domainId;
        private String poolId;
        private String imageId;
        private String volumeId;
        private Map<String, Long> ioTune;

        public IoTuneParams() {
        }

        public IoTuneParams(String domainId, String poolId,
                String imageId, String volumeId,
                Map<String, Long> ioTune) {
            this.domainId = domainId;
            this.poolId = poolId;
            this.imageId = imageId;
            this.volumeId = volumeId;
            this.ioTune = ioTune;
        }

        public String getDomainId() {
            return domainId;
        }

        public String getImageId() {
            return imageId;
        }

        public String getPoolId() {
            return poolId;
        }

        public String getVolumeId() {
            return volumeId;
        }

        public Map<String, Long> getIoTune() {
            return ioTune;
        }
    }
}


text:
..\vsrd.exe resources.crs -o dumpedResources.c
..\vsrd.exe --header -o dumpedHeader.h

mingw32-gcc *.c -o test.exe
.\test.exe


text:
describe('data API', function () {
    'use strict';

    var dataApiService, $scope;

    beforeEach(function () {
        module('app.core');
    });

    beforeEach(inject(function (_dataApiService_,  _$rootScope_) {
        dataApiService = _dataApiService_;
        $scope = _$rootScope_;
    }));

    describe('when get for first time', function () {
        it('should return 10 elements', function (done) {
            var success = function(results) {
                expect(results.length).toBe(10);
            };

            var fail = function(error) {
                expect(error).toBeUndefined();
            };

            dataApiService.get()
                .then(success)
                .catch(fail)
                .finally(done);

            $scope.$apply(); // Resolve promises
        });
    });
});


text:
// package ui contains utilities for accessing the static data files compiled in
// the data/* subdirectories.
package ui // import "k8s.io/kubernetes/pkg/ui"


text:
package org.beanmaker.util;

public abstract class CacheSortableKeyBase<T extends Comparable<T>> implements Comparable<CacheSortableKeyBase<T>> {

    private final long id;
    private final T sortOrder;

    public CacheSortableKeyBase(final DbBeanInterface bean, final T sortOrder) {
        this.id = bean.getId();
        this.sortOrder = sortOrder;
    }

    public long getId() {
        return id;
    }

    public T getSortOrder() {
        return sortOrder;
    }

    @Override
    public int compareTo(CacheSortableKeyBase<T> key) {
        return sortOrder.compareTo(key.sortOrder);
    }

    // MUST IMPLEMENT EQUALS() HERE
    @Override
    public boolean equals(final Object key) {
        throw new UnsupportedOperationException("Must implement equals in derived class");
    }

    // IMPLEMENTATION MODEL :
    /*public boolean equals(final Object key) {
        if (key == this)
            return true;

        if (key instanceof <your key class>)
            return ((<your key class>) key).getId() == getId();

        return false;
    }*/

    @Override
    public int hashCode() {
        return computeHashCode(id);
    }

    protected int computeHashCode(final long id) {
        int result = 17;

        final int hash = (int) (id ^ (id >>> 32));
        result = 31 * result + hash;

        return result;
    }
}


text:
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO2

package com.google.protobuf.descriptor

/** Describes a value within an enum.
  */
@SerialVersionUID(0L)
final case class EnumValueDescriptorProto(
    name: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None,
    number: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
    options: _root_.scala.Option[com.google.protobuf.descriptor.EnumValueOptions] = _root_.scala.None,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[EnumValueDescriptorProto] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      if (name.isDefined) {
        val __value = name.get
        __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
      };
      if (number.isDefined) {
        val __value = number.get
        __size += _root_.com.google.protobuf.CodedOutputStream.computeInt32Size(2, __value)
      };
      if (options.isDefined) {
        val __value = options.get
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      };
      __size += unknownFields.serializedSize
      __size
    }
    override def serializedSize: _root_.scala.Int = {
      var __size = __serializedSizeMemoized
      if (__size == 0) {
        __size = __computeSerializedSize() + 1
        __serializedSizeMemoized = __size
      }
      __size - 1

    }
    def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
      name.foreach { __v =>
        val __m = __v
        _output__.writeString(1, __m)
      };
      number.foreach { __v =>
        val __m = __v
        _output__.writeInt32(2, __m)
      };
      options.foreach { __v =>
        val __m = __v
        _output__.writeTag(3, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      unknownFields.writeTo(_output__)
    }
    def getName: _root_.scala.Predef.String = name.getOrElse("")
    def clearName: EnumValueDescriptorProto = copy(name = _root_.scala.None)
    def withName(__v: _root_.scala.Predef.String): EnumValueDescriptorProto = copy(name = Option(__v))
    def getNumber: _root_.scala.Int = number.getOrElse(0)
    def clearNumber: EnumValueDescriptorProto = copy(number = _root_.scala.None)
    def withNumber(__v: _root_.scala.Int): EnumValueDescriptorProto = copy(number = Option(__v))
    def getOptions: com.google.protobuf.descriptor.EnumValueOptions = options.getOrElse(com.google.protobuf.descriptor.EnumValueOptions.defaultInstance)
    def clearOptions: EnumValueDescriptorProto = copy(options = _root_.scala.None)
    def withOptions(__v: com.google.protobuf.descriptor.EnumValueOptions): EnumValueDescriptorProto = copy(options = Option(__v))
    def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
    def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
    def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
      (__fieldNumber: @_root_.scala.unchecked) match {
        case 1 => name.orNull
        case 2 => number.orNull
        case 3 => options.orNull
      }
    }
    def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
      _root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
      (__field.number: @_root_.scala.unchecked) match {
        case 1 => name.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 2 => number.map(_root_.scalapb.descriptors.PInt(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
        case 3 => options.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: com.google.protobuf.descriptor.EnumValueDescriptorProto.type = com.google.protobuf.descriptor.EnumValueDescriptorProto
    // @@protoc_insertion_point(GeneratedMessage[google.protobuf.EnumValueDescriptorProto])
}

object EnumValueDescriptorProto extends scalapb.GeneratedMessageCompanion[com.google.protobuf.descriptor.EnumValueDescriptorProto] with scalapb.JavaProtoSupport[com.google.protobuf.descriptor.EnumValueDescriptorProto, com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.google.protobuf.descriptor.EnumValueDescriptorProto] with scalapb.JavaProtoSupport[com.google.protobuf.descriptor.EnumValueDescriptorProto, com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto] = this
  def toJavaProto(scalaPbSource: com.google.protobuf.descriptor.EnumValueDescriptorProto): com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto = {
    val javaPbOut = com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto.newBuilder
    scalaPbSource.name.foreach(javaPbOut.setName)
    scalaPbSource.number.foreach(javaPbOut.setNumber)
    scalaPbSource.options.map(com.google.protobuf.descriptor.EnumValueOptions.toJavaProto(_)).foreach(javaPbOut.setOptions)
    javaPbOut.build
  }
  def fromJavaProto(javaPbSource: com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto): com.google.protobuf.descriptor.EnumValueDescriptorProto = com.google.protobuf.descriptor.EnumValueDescriptorProto(
    name = if (javaPbSource.hasName) Some(javaPbSource.getName) else _root_.scala.None,
    number = if (javaPbSource.hasNumber) Some(javaPbSource.getNumber.intValue) else _root_.scala.None,
    options = if (javaPbSource.hasOptions) Some(com.google.protobuf.descriptor.EnumValueOptions.fromJavaProto(javaPbSource.getOptions)) else _root_.scala.None
  )
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.google.protobuf.descriptor.EnumValueDescriptorProto = {
    var __name: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
    var __number: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
    var __options: _root_.scala.Option[com.google.protobuf.descriptor.EnumValueOptions] = _root_.scala.None
    var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
    var _done__ = false
    while (!_done__) {
      val _tag__ = _input__.readTag()
      _tag__ match {
        case 0 => _done__ = true
        case 10 =>
          __name = Option(_input__.readStringRequireUtf8())
        case 16 =>
          __number = Option(_input__.readInt32())
        case 26 =>
          __options = Option(__options.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.descriptor.EnumValueOptions](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    com.google.protobuf.descriptor.EnumValueDescriptorProto(
        name = __name,
        number = __number,
        options = __options,
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[com.google.protobuf.descriptor.EnumValueDescriptorProto] = _root_.scalapb.descriptors.Reads{
    case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
      _root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
      com.google.protobuf.descriptor.EnumValueDescriptorProto(
        name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]),
        number = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Int]]),
        options = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.descriptor.EnumValueOptions]])
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = DescriptorProtoCompanion.javaDescriptor.getMessageTypes().get(7)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = DescriptorProtoCompanion.scalaDescriptor.messages(7)
  def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
    var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
    (__number: @_root_.scala.unchecked) match {
      case 3 => __out = com.google.protobuf.descriptor.EnumValueOptions
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
  lazy val defaultInstance = com.google.protobuf.descriptor.EnumValueDescriptorProto(
    name = _root_.scala.None,
    number = _root_.scala.None,
    options = _root_.scala.None
  )
  implicit class EnumValueDescriptorProtoLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.EnumValueDescriptorProto]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.google.protobuf.descriptor.EnumValueDescriptorProto](_l) {
    def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getName)((c_, f_) => c_.copy(name = Option(f_)))
    def optionalName: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Predef.String]] = field(_.name)((c_, f_) => c_.copy(name = f_))
    def number: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getNumber)((c_, f_) => c_.copy(number = Option(f_)))
    def optionalNumber: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.number)((c_, f_) => c_.copy(number = f_))
    def options: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.EnumValueOptions] = field(_.getOptions)((c_, f_) => c_.copy(options = Option(f_)))
    def optionalOptions: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.descriptor.EnumValueOptions]] = field(_.options)((c_, f_) => c_.copy(options = f_))
  }
  final val NAME_FIELD_NUMBER = 1
  final val NUMBER_FIELD_NUMBER = 2
  final val OPTIONS_FIELD_NUMBER = 3
  def of(
    name: _root_.scala.Option[_root_.scala.Predef.String],
    number: _root_.scala.Option[_root_.scala.Int],
    options: _root_.scala.Option[com.google.protobuf.descriptor.EnumValueOptions]
  ): _root_.com.google.protobuf.descriptor.EnumValueDescriptorProto = _root_.com.google.protobuf.descriptor.EnumValueDescriptorProto(
    name,
    number,
    options
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[google.protobuf.EnumValueDescriptorProto])
}


text:
from setuptools import setup

__version__ = "3.0.0"

long_description = """
Quickly generate secure passwords and passphrases.
"""

setup(
    name="pwdgen",
    packages=["pwdgen"],
    version=__version__,
    description="Quickly generate secure passwords and passphrases.",
    author="Bryce Drennan",
    author_email="pwdgen@brycedrennan.org",
    url="https://github.com/brycedrennan/pwdgen",
    download_url="https://github.com/brycedrennan/pwdgen/tarball/" + __version__,
    keywords=["password", "passphrase"],
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Topic :: Security",
        "Topic :: Utilities",
    ],
    license="MIT",
    long_description=long_description,
    install_requires=["randomlineaccess==1.04", "requests>=2.10.0"],
    entry_points={"console_scripts": ["pwdgen=pwdgen.command_line:main"]},
)


text:
from . import coordinates
from . import velocities
from . import box_vectors
from . import file_info


text:
#ifndef AreaAllocator_h
#define AreaAllocator_h

#include "IntPoint.h"
#include "IntRect.h"
#include "IntSize.h"

#if USE(COORDINATED_GRAPHICS)

namespace WebCore {

inline int nextPowerOfTwo(int number)
{
    // This is a fast trick to get nextPowerOfTwo for an integer.
    --number;
    number |= number >> 1;
    number |= number >> 2;
    number |= number >> 4;
    number |= number >> 8;
    number |= number >> 16;
    number++;
    return number;
}

inline IntSize nextPowerOfTwo(const IntSize& size)
{
    return IntSize(nextPowerOfTwo(size.width()), nextPowerOfTwo(size.height()));
}

class AreaAllocator {
    WTF_MAKE_FAST_ALLOCATED;
public:
    explicit AreaAllocator(const IntSize&);
    virtual ~AreaAllocator();

    IntSize size() const { return m_size; }

    IntSize minimumAllocation() const { return m_minAlloc; }
    void setMinimumAllocation(const IntSize& size) { m_minAlloc = size; }

    IntSize margin() const { return m_margin; }
    void setMargin(const IntSize &margin) { m_margin = margin; }

    virtual void expand(const IntSize&);
    void expandBy(const IntSize&);

    virtual IntRect allocate(const IntSize&) = 0;
    virtual void release(const IntRect&);

    virtual int overhead() const;

protected:
    IntSize m_size;
    IntSize m_minAlloc;
    IntSize m_margin;

    IntSize roundAllocation(const IntSize&) const;
};

class GeneralAreaAllocator : public AreaAllocator {
    WTF_MAKE_FAST_ALLOCATED;
public:
    explicit GeneralAreaAllocator(const IntSize&);
    virtual ~GeneralAreaAllocator();

    void expand(const IntSize&);
    IntRect allocate(const IntSize&);
    void release(const IntRect&);
    int overhead() const;

private:
    enum Split { SplitOnX, SplitOnY };

    struct Node {
        IntRect rect;
        IntSize largestFree;
        Node* parent;
        Node* left;
        Node* right;
    };

    Node* m_root;
    int m_nodeCount;

    static void freeNode(Node*);
    IntPoint allocateFromNode(const IntSize&, Node*);
    Node* splitNode(Node*, Split);
    static void updateLargestFree(Node*);
};

} // namespace WebCore

#endif // USE(COORDINATED_GRAPHICS)

#endif // AreaAllocator_h


text:
class NoDestroy { ~NoDestroy(); };
#if __cplusplus <= 199711L
// expected-note@-2 3 {{declared private here}}
#ifdef MSABI
// expected-note@-4 3 {{declared private here}}
#endif
#endif

struct A {
  virtual ~A();
#if __cplusplus >= 201103L
  // expected-note@-2 3 {{overridden virtual function is here}}
#endif
};

struct B : public virtual A {
#if __cplusplus >= 201103L
// expected-error@-2 {{deleted function '~B' cannot override a non-deleted function}}
// expected-note@-3 {{overridden virtual function is here}}
#endif

  NoDestroy x;
#if __cplusplus <= 199711L
  // expected-error@-2 {{field of type 'NoDestroy' has private destructor}}
#ifdef MSABI
  // expected-error@-4 {{field of type 'NoDestroy' has private destructor}}
#endif
#else
  // expected-note@-7 {{destructor of 'B' is implicitly deleted because field 'x' has an inaccessible destructor}}
#ifdef MSABI
  // expected-note@-9 {{default constructor of 'B' is implicitly deleted because field 'x' has an inaccessible destructor}}
  // expected-note@-10 {{destructor of 'B' is implicitly deleted}}
#endif
#endif
};

struct D : public virtual B {
#if __cplusplus <= 199711L
#ifdef MSABI
// expected-note@-3 {{implicit default constructor for 'B' first required here}}
// expected-note@-4 {{implicit destructor for 'B' first required here}}
#endif
#else
#ifdef MSABI
// expected-note@-8 {{default constructor of 'D' is implicitly deleted because base class 'B' has a deleted default constructor}}
#endif
#endif
  virtual void foo();
  ~D();
#if __cplusplus >= 201103L
  //expected-error@-2 {{non-deleted function '~D' cannot override a deleted function}}
#ifdef MSABI
//expected-error@-4 {{use a deleted function}}
#else
#endif
#endif
};

#ifdef MSABI
D d;
#if __cplusplus <= 199711L
// expected-note@-2 2{{implicit default constructor for 'D' first required here}}
#else
// expected-error@-4 {{call to implicitly-deleted default constructor of 'D'}}
// expected-note@-5 {{implicit destructor for 'D' first required here}}
#endif
#else
void D::foo() {
#if __cplusplus <= 199711L
// expected-note@-2 {{implicit destructor for 'B' first required here}}
#endif
}
#endif

struct E : public virtual A {
#if __cplusplus >= 201103L
// expected-error@-2 {{deleted function '~E' cannot override a non-deleted function}}
#endif

  NoDestroy x;
#if __cplusplus <= 199711L
  // expected-error@-2 {{field of type 'NoDestroy' has private destructor}}
#ifdef MSABI
  // expected-error@-4 {{field of type 'NoDestroy' has private destructor}}
#endif
#else
  // expected-note@-7 {{destructor of 'E' is implicitly deleted because field 'x' has an inaccessible destructor}}
#ifdef MSABI
  // expected-note@-9 {{default constructor of 'E' is implicitly deleted because field 'x' has an inaccessible destructor}}
  // expected-note@-10 {{destructor of 'E' is implicitly deleted}}
#endif
#endif
};

struct F : public E {
#if __cplusplus <= 199711L
// expected-note@-2 {{implicit destructor for 'E' first required here}}
#ifdef MSABI
// expected-note@-4 {{implicit default constructor for 'E' first required here}}
#endif
#else
// expected-note@-7 {{overridden virtual function is here}}
#ifdef MSABI
// expected-note@-9 {{default constructor of 'F' is implicitly deleted because base class 'E' has a deleted default constructor}}
// expected-note@-10 {{destructor of 'F' is implicitly deleted}}
#endif
#endif
};

struct G : public virtual F {
#ifdef MSABI
#if __cplusplus <= 199711L
// expected-note@-3 {{implicit default constructor for 'F' first required here}}
// expected-note@-4 {{implicit destructor for 'F' first required here}}
#else
// expected-note@-6 {{default constructor of 'G' is implicitly deleted because base class 'F' has a deleted default constructor}}
#endif
#endif

  virtual void foo();
  ~G();
#if __cplusplus >= 201103L
  //expected-error@-2 {{non-deleted function '~G' cannot override a deleted function}}
#ifdef MSABI
  //expected-error@-4 {{use a deleted function}}
#endif
#endif
};

#ifdef MSABI
G g;
#if __cplusplus <= 199711L
// expected-note@-2 2{{implicit default constructor for 'G' first required here}}
#else
// expected-error@-4 {{call to implicitly-deleted default constructor of 'G'}}
// expected-note@-5 {{mplicit destructor for 'G' first required here}}
#endif
#else
void G::foo() {
#if __cplusplus <= 199711L
// expected-note@-2 {{implicit destructor for 'F' first required here}}
#endif
}
#endif

struct H : public virtual A {
#if __cplusplus >= 201103L
// expected-error@-2 {{deleted function '~H' cannot override a non-deleted function}}
// expected-note@-3 {{overridden virtual function is here}}
#endif

  NoDestroy x;
#if __cplusplus <= 199711L
  // expected-error@-2 {{field of type 'NoDestroy' has private destructor}}
#ifdef MSABI
  // expected-error@-4 {{field of type 'NoDestroy' has private destructor}}
#endif
#else
  // expected-note@-7 {{destructor of 'H' is implicitly deleted because field 'x' has an inaccessible destructor}}
#ifdef MSABI
  // expected-note@-9 {{default constructor of 'H' is implicitly deleted because field 'x' has an inaccessible destructor}}
  // expected-note@-10 {{destructor of 'H' is implicitly deleted}}
#endif
#endif
};

struct I : public virtual H {
#ifdef MSABI
#if __cplusplus > 199711L
// expected-note@-3 {{default constructor of 'I' is implicitly deleted because base class 'H' has a deleted default constructor}}
#endif
#endif

  ~I();
#if __cplusplus >= 201103L
// expected-error@-2 {{non-deleted function '~I' cannot override a deleted function}}
#endif
};

struct J : public I {
#ifdef MSABI
#if __cplusplus <= 199711L
// expected-note@-3 {{implicit default constructor for 'H' first required here}}
// expected-note@-4 {{implicit destructor for 'H' first required here}}
#else
// expected-note@-6 {{default constructor of 'J' is implicitly deleted because base class 'I' has a deleted default constructor}}
#endif
#endif

  virtual void foo();
  ~J();
#ifdef MSABI
#if __cplusplus >= 201103L
//expected-error@-3 {{use a deleted function}}
#endif
#endif
};

#ifdef MSABI
J j;
#if __cplusplus <= 199711L
// expected-note@-2 2{{implicit default constructor for 'J' first required here}}
#else
// expected-error@-4 {{call to implicitly-deleted default constructor of 'J'}}
// expected-note@-5 {{implicit destructor for 'J' first required here}}
#endif

#else
void J::foo() {
#if __cplusplus <= 199711L
// expected-note@-2 {{implicit destructor for 'H' first required here}}
#endif
}
#endif


text:
/**
 * @ignore  =====================================================================================
 * @fileoverview 标准柱状图
 * @see wiki
 * @author  guohui.yin@qunar.com
 * @version 1.0.0
 * @ignore  created in 2015-11-13
 * @ignore  depend Library Raphael
 * @ignore  =====================================================================================
 */
var R = require('../core/raphael');
var Bar = require('./index');
var stdBar = function (options) {
    Bar.call(this);
    var self = this,
        barSpace = {},
        create = self.create,
        _R;
    this.name = 'stdBar';
    this.setOptions(options);
    this.R = _R = R(options.id, options.width, options.height);
    /**
     * @description 更新图表
     * @param
     * @return result {Undefined}
     */
    this.update = function () {
        var state = self.legendChange.call(this);
        var name = this.data('name');
        var _ = self._,
            c = self.config,
            animation = c.animation,
            series = c.series,
            curSerie,
            data;
        self.skip(name, state);
        _.each(barSpace, function (item, key) {
            curSerie = _.filter(series, function (val) {
                return val.name == key
            })[0];
            _.each(item, function (subItem) {
                data = create.call(self, subItem.data('value'), subItem.data('subIndex'), curSerie.index);
                subItem.data(data);
                if (!curSerie.skip) {
                    subItem.animate({
                        x: data.x,
                        y: data.y0 - data.h,
                        height: data.h,
                        width: data.w,
                        opacity: 1
                    }, animation.inOut, animation.type);
                } else {
                    subItem.animate({
                        x: data.x,
                        y: data.y0,
                        height: 0,
                        width: 0,
                        opacity: 0
                    }, animation.inOut, animation.type);
                }
            });
        });
    };
    /**
     * @description 渲染画布
     * @param
     * @return result {Undefined}
     */
    this.render = function () {
        var c = self.config,
            ani = c.animation,
            update = self.update,
            axis, tick, grid, legend, title, tmp, tmpBar, tmpBarParam, aniParam, zebra, hover, timeID;
        var _ = self._;
        axis = self.getAxis();
        tick = self.getTick();
        grid = self.getGrid();
        zebra = self.getGridZebra();
        legend = self.getLegend();
        title = self.getTitle();
        hover = self.getFocus(0, 0, 'rect');
        // 绘制基本信息
        _.requestAnimFrame.call(window, function () {
            axis && _R.path(axis).attr(c.strokeAxis);
            tick && _R.path(tick.tick).attr(c.strokeTick);
            grid && _R.path(grid).attr(c.strokeGrid)
            zebra && _R.path(zebra).attr(c.strokeZebra);
            hover = hover && _R.path(hover).attr(c.strokeFocus);
            tick && _.each(tick.text, function (item) {
                _R.text(item.x, item.y, item.text).attr(item.style);
            });
            title && _.each(title, function (item) {
                _R.text(item.x, item.y, item.text).attr(item.style);
            });
            legend && _.each(legend, function (item) {
                if (item.type == 'rect') {
                    _R.rect(item.x, item.y, item.w, item.h).attr(item.style).data({
                        name: item.name,
                        fill: item.style.fill
                    }).click(function () {
                        update.call(this);
                    });
                } else {
                    _R.text(item.x, item.y, item.text).attr(item.style);
                }
            });
        });
        // 绘制数据
        _.requestAnimFrame.call(window, function () {
            c.isData && _.each(c.series, function (item, i) {
                tmp = barSpace[item.name] = _R.set();
                _.each(item.data, function (subselftem, ii) {
                    tmpBarParam = create.call(self, subselftem, ii, i);
                    aniParam = {
                        y: tmpBarParam.y0 - tmpBarParam.h,
                        height: tmpBarParam.h
                    };
                    tmpBar = _R.rect(tmpBarParam.x, tmpBarParam.y0, tmpBarParam.w, 0);
                    tmpBar.animate(aniParam, ani.duration, ani.type).data(tmpBarParam).hover(function () {
                        this.attr('opacity', 0.6);
                    }, function () {
                        this.attr('opacity', 1);
                    });
                    tmp.push(tmpBar);
                });
                tmp.attr(item.style);
            });
        });
        if (!c.isFocus) {
            return
        }
        // 定义hover效果
        this.on(_R.canvas, 'mousemove', function (e) {
            timeID && clearTimeout(timeID);
            timeID = setTimeout(function () {
                var x = e.offsetX - c.root.offsetLeft;
                var y = e.offsetY - c.root.offsetTop;
                hover.attr('path', self.getFocus(x, y, 'rect'));
            }, 50);
        });
    }
}
stdBar.prototype = Object.create(Bar.prototype);
stdBar.prototype.constructor = stdBar;
module.exports = stdBar;


text:
from typing import List, Optional, Tuple

from .webtransport_h3_server import WebTransportSession

# This file exists for documentation purpose.

def connect_received(request_headers: List[Tuple[bytes, bytes]],
                     response_headers: List[Tuple[bytes, bytes]]) -> None:
    """
    Called whenever an extended CONNECT method is received.

    :param request_headers: The request headers received from the peer.
    :param response_headers: The response headers which will be sent to the peer. ``:status`` is set
                             to 200 when it isn't specified.
    """
    pass

def session_established(session: WebTransportSession) -> None:
    """
    Called whenever an WebTransport session is established.

    :param session: A WebTransport session object.
    """

def stream_data_received(session: WebTransportSession, stream_id: int,
                         data: bytes, stream_ended: bool) -> None:
    """
    Called whenever data is received on a WebTransport stream.

    :param session: A WebTransport session object.
    :param stream_id: The ID of the stream.
    :param data: The received data.
    :param stream_ended: Whether the stream is ended.
    """
    pass

def datagram_received(session: WebTransportSession, data: bytes) -> None:
    """
    Called whenever a datagram is received on a WebTransport session.

    :param session: A WebTransport session object.
    :param data: The received data.
    """
    pass

def session_closed(session: WebTransportSession,
                   close_info: Optional[Tuple[int, bytes]],
                   abruptly: bool) -> None:
    """
    Called when a WebTransport session is closed.

    :param session: A WebTransport session.
    :param close_info: The code and reason attached to the
                       CLOSE_WEBTRANSPORT_SESSION capsule.
    :param abruptly: True when the session is closed forcibly
                     (by a CLOSE_CONNECTION QUIC frame for example).
    """
    pass

def stream_reset(session: WebTransportSession,
                 stream_id: int,
                 error_code: int) -> None:
    """
    Called when a stream is reset with RESET_STREAM.

    :param session: A WebTransport session.
    :param stream_id: The ID of the stream.
    :param error_code: The reason of the reset.
    """
    pass


text:
from setuptools import setup

setup(name='StreamingBandid',
      	version='0.1',
      	description='Python application to setup and run streaming (contextual) bandit experiments.',
      	author='Maurits Kaptein',
      	author_email='',
      	url='https://github.com/MKaptein/streamingbandit',
      	packages=[],
      	install_requires=[
		'tornado',
		'redis',
		'PyYAML',
		'pymongo',
		'json'
	]
     )


text:
package lesson.arraylists;

import java.util.*;

public class IntroArrayListAddingMultipleValues {

	public static void main(String[] args) {
		ArrayList myFirstArrayList = new ArrayList();

		myFirstArrayList.addAll(Arrays.asList(1789, 2035, 1899, 1456, 2013, 1458, 2458, 1254, 1472, 2365, 1456, 2165, 1457, 2456));

		System.out.println(myFirstArrayList);
	}

}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/servicedirectory/v1beta1/registration_service.proto

package com.google.cloud.servicedirectory.v1beta1;

public interface GetServiceRequestOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.servicedirectory.v1beta1.GetServiceRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. The name of the service to get.
   *

   *
   *
   * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The name.
   */
  java.lang.String getName();
  /**
   *
   *
   *

   * Required. The name of the service to get.
   *

   *
   *
   * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The bytes for name.
   */
  com.google.protobuf.ByteString getNameBytes();
}


text:
/**
 * @file
 * Cache template instantiations.
 */

#include "mem/config/cache.hh"

#if defined(USE_CACHE_LRU)
#include "mem/cache/tags/lru.hh"
#endif

#if defined(USE_CACHE_FALRU)
#include "mem/cache/tags/fa_lru.hh"
#endif

#if defined(USE_CACHE_IIC)
#include "mem/cache/tags/iic.hh"
#endif

#include "mem/cache/cache_impl.hh"

// Template Instantiations
#ifndef DOXYGEN_SHOULD_SKIP_THIS

#if defined(USE_CACHE_FALRU)
template class Cache<FALRU>;
#endif

#if defined(USE_CACHE_IIC)
template class Cache<IIC>;
#endif

#if defined(USE_CACHE_LRU)
template class Cache<LRU>;
#endif

#endif //DOXYGEN_SHOULD_SKIP_THIS


text:
package middleware

import (
	"bufio"
	"log"
	"net"
	"net/http"
	"runtime"
	"sync"
	"time"

	"github.com/go-playground/ansi/v3"
	"github.com/go-playground/pure/v5"
)

const (
	status500 = ansi.Underline + ansi.Blink + ansi.Red
	status400 = ansi.Red
	status300 = ansi.Yellow
	status    = ansi.Green
)

type logWriter struct {
	http.ResponseWriter
	status    int
	size      int64
	committed bool
}

// WriteHeader writes HTTP status code.
// If WriteHeader is not called explicitly, the first call to Write
// will trigger an implicit WriteHeader(http.StatusOK).
// Thus explicit calls to WriteHeader are mainly used to
// send error codes.
func (lw *logWriter) WriteHeader(status int) {

	if lw.committed {
		log.Println("response already committed")
		return
	}

	lw.status = status
	lw.ResponseWriter.WriteHeader(status)
	lw.committed = true
}

// Write writes the data to the connection as part of an HTTP reply.
// If WriteHeader has not yet been called, Write calls WriteHeader(http.StatusOK)
// before writing the data.  If the Header does not contain a
// Content-Type line, Write adds a Content-Type set to the result of passing
// the initial 512 bytes of written data to DetectContentType.
func (lw *logWriter) Write(b []byte) (int, error) {

	lw.size += int64(len(b))

	return lw.ResponseWriter.Write(b)
}

// Status returns the current response's http status code.
func (lw *logWriter) Status() int {
	return lw.status
}

// Size returns the number of bytes written in the response thus far
func (lw *logWriter) Size() int64 {
	return lw.size
}

// Hijack hijacks the current http connection
func (lw *logWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {
	return lw.ResponseWriter.(http.Hijacker).Hijack()
}

// CloseNotify ...
func (lw *logWriter) CloseNotify() <-chan bool {
	return lw.ResponseWriter.(http.CloseNotifier).CloseNotify()
}

var lrpool = sync.Pool{
	New: func() interface{} {
		return new(logWriter)
	},
}

// LoggingAndRecovery handle HTTP request logging + recovery
func LoggingAndRecovery(color bool) pure.Middleware {

	return func(next http.HandlerFunc) http.HandlerFunc {

		if color {

			return func(w http.ResponseWriter, r *http.Request) {

				t1 := time.Now()

				lw := lrpool.Get().(*logWriter)
				lw.status = 200
				lw.size = 0
				lw.committed = false
				lw.ResponseWriter = w

				defer func() {
					if err := recover(); err != nil {
						trace := make([]byte, 1<<16)
						n := runtime.Stack(trace, true)
						log.Printf(" %srecovering from panic: %+v\nStack Trace:\n %s%s", ansi.Red, err, trace[:n], ansi.Reset)
						HandlePanic(lw, r, trace[:n])

						lrpool.Put(lw)
						return
					}

					lrpool.Put(lw)
				}()

				next(lw, r)

				// var color string
				color := status

				code := lw.Status()

				switch {
				case code >= http.StatusInternalServerError:
					color = status500
				case code >= http.StatusBadRequest:
					color = status400
				case code >= http.StatusMultipleChoices:
					color = status300
				}

				log.Printf("%s %d %s[%s%s%s] %q %v %d\n", color, code, ansi.Reset, color, r.Method, ansi.Reset, r.URL, time.Since(t1), lw.Size())
			}
		}

		return func(w http.ResponseWriter, r *http.Request) {

			t1 := time.Now()

			lw := lrpool.Get().(*logWriter)
			lw.status = 200
			lw.size = 0
			lw.committed = false
			lw.ResponseWriter = w

			defer func() {
				if err := recover(); err != nil {
					trace := make([]byte, 1<<16)
					n := runtime.Stack(trace, true)
					log.Printf(" %srecovering from panic: %+v\nStack Trace:\n %s%s", ansi.Red, err, trace[:n], ansi.Reset)
					HandlePanic(lw, r, trace[:n])
				}

				lrpool.Put(lw)
			}()

			next(lw, r)

			log.Printf("%d [%s] %q %v %d\n", lw.Status(), r.Method, r.URL, time.Since(t1), lw.Size())
		}

	}
}

// HandlePanic handles graceful panic by redirecting to friendly error page or rendering a friendly error page.
// trace passed just in case you want rendered to developer when not running in production
func HandlePanic(w http.ResponseWriter, r *http.Request, trace []byte) {

	// redirect to or directly render friendly error page
}


text:
<?php

require_once(dirname(__FILE__).'/helper/dmUnitTestHelper.php');
$helper = new dmUnitTestHelper();
$helper->boot();

$t = new lime_test(12);

$sc = $helper->get('service_container');

$user  = $helper->get('user');
$theme = $user->getTheme();

$user->setCulture('en');

$imageFullPath = $theme->getFullPath('images/testImage.jpg');
copy(
dmOs::join(sfConfig::get('dm_core_dir'), 'data/image/defaultMedia.jpg'),
$imageFullPath
);

$t->ok(file_exists($imageFullPath), 'image copied : '.$imageFullPath);

$imageI18nFullPath = $theme->getFullPath('images/en/testImage.jpg');
$helper->get('filesystem')->mkdir(dirname($imageI18nFullPath));
copy(
dmOs::join(sfConfig::get('dm_core_dir'), 'data/image/defaultMedia.jpg'),
$imageI18nFullPath
);

$t->ok(file_exists($imageI18nFullPath), 'image copied : '.$imageI18nFullPath);

$res = $sc->getService('media_resource')->initialize('images/testImage.jpg');
$t->is($res->getPathFromWebDir(), $theme->getPath('images/testImage.jpg'), 'images/testImage.jpg : '.$res->getPathFromWebDir());

$res = $sc->getService('media_resource')->initialize('images/en/testImage.jpg');
$t->is($res->getPathFromWebDir(), $theme->getPath('images/en/testImage.jpg'), 'images/en/testImage.jpg : '.$res->getPathFromWebDir());

$res = $sc->getService('media_resource')->initialize('images/%culture%/testImage.jpg');
$t->is($res->getPathFromWebDir(), $theme->getPath('images/en/testImage.jpg'), 'images/%culture%/testImage.jpg : '.$res->getPathFromWebDir());

$res = $sc->getService('media_resource')->initialize('testImage.jpg');
$t->is($res->getPathFromWebDir(), $theme->getPath('images/testImage.jpg'), 'testImage.jpg : '.$res->getPathFromWebDir());

$res = $sc->getService('media_resource')->initialize('%culture%/testImage.jpg');
$t->is($res->getPathFromWebDir(), $theme->getPath('images/en/testImage.jpg'), '%culture%/testImage.jpg : '.$res->getPathFromWebDir());

$res = $sc->getService('media_resource')->initialize($imageI18nFullPath);
$t->is($res->getPathFromWebDir(), $theme->getPath('images/en/testImage.jpg'), '$imageI18nFullPath : '.$res->getPathFromWebDir());

$user->setCulture('fr');

$imageI18nFullPath = $theme->getFullPath('images/fr/testImage.jpg');
$helper->get('filesystem')->mkdir(dirname($imageI18nFullPath));
copy(
dmOs::join(sfConfig::get('dm_core_dir'), 'data/image/defaultMedia.jpg'),
$imageI18nFullPath
);

$t->ok(file_exists($imageI18nFullPath), 'image copied : '.$imageI18nFullPath);

$res = $sc->getService('media_resource')->initialize('images/%culture%/testImage.jpg');
$t->is($res->getPathFromWebDir(), $theme->getPath('images/fr/testImage.jpg'), 'images/%culture%/testImage.jpg : '.$res->getPathFromWebDir());

$res = $sc->getService('media_resource')->initialize('%culture%/testImage.jpg');
$t->is($res->getPathFromWebDir(), $theme->getPath('images/fr/testImage.jpg'), '%culture%/testImage.jpg : '.$res->getPathFromWebDir());

$t->diag('Plugin medias');

$res = $sc->getService('media_resource')->initialize('dmCore/images/media/folder.png');
$expected = '/dmCorePlugin/images/media/folder.png';
$t->is($res->getPathFromWebDir(), $expected, 'dmCore/images/media/folder.png : '.$expected);


text:
import Expression from '../Expression';

export default class TaggedTemplateExpression extends Expression {
    constructor(childNodes) {
        super('TaggedTemplateExpression', childNodes);
    }

    _acceptChildren(children) {
        let tag = children.passExpression();
        children.skipNonCode();
        let quasi = children.passNode('TemplateLiteral');

        this.tag = tag;
        this.quasi = quasi;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:tools="http://schemas.android.com/tools"
              android:orientation="vertical"
              android:layout_gravity="center"
              android:gravity="center"
              android:layout_marginTop="@dimen/row_margin"
              android:layout_marginBottom="@dimen/row_margin"
              android:layout_width="@dimen/item_table_state_dim"
              android:layout_height="@dimen/item_table_state_dim">
    <include layout="@layout/icon_centered"/>

    <TextView
        android:id="@+id/item_table_state_name"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:textSize="@dimen/very_small_text_size_dim"
        android:gravity="center"
        tools:text="Table state"/>

</LinearLayout>


text:
'use strict';

// Fire me up!

module.exports = {
  implements: 'starSelector/initError/throwError:sub'
};

module.exports.factory = function () {
  throw new Error(require('path').relative(process.cwd(), __filename));
};


text:
//
//
// MIT License
//
// Copyright (c) 2017 Stellacore Corporation.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject
// to the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
// KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//

/*! \file
\brief  This file contains main application program FillIndices
*/

#include "libapp/Usage.h"

#include "build/version.h"
#include "libdat/info.h"
#include "libio/stream.h"

#include "libcloud/cloud.h"
#include "libimg/dilate.h"
#include "libsys/Timer.h"

#include "libdat/io.h"
#include "libimg/io.h"
#include "libio/string.h"

#include <cassert>
#include <fstream>
#include <iostream>

namespace
{
	using PixVal = cloud::NdxType;
	constexpr bool sShowTiming{ true };
	constexpr bool sSaveTmpGrids{ true };

	//! An "on" value for pixels that are valid - else off value
	inline
	uint8_t
	outValue
		( PixVal const & pix
		)
	{
		uint8_t outVal{ 100u };
		if (dat::isValid(pix))
		{
			outVal = 200u;
		}
		return outVal;
	}

	//! Save visualization grid
	void
	saveGridVizPng
		( dat::grid<PixVal> const & ndxGrid
		, std::string const & fpath
		)
	{
		dat::grid<uint8_t> ugrid(ndxGrid.hwSize());
		std::fill(ugrid.begin(), ugrid.end(), 0u);
		std::transform
			( ndxGrid.begin(), ndxGrid.end()
			, ugrid.begin()
			, [] (PixVal const & pix) { return outValue(pix); }
			);
		(void)img::io::savePng(ugrid, fpath);
	}
}

//! Fill sparsely populated index map
int
main
	( int const argc
	, char const * const * const argv
	)
{
	// Don't mix stdio & streams (for performance)
	//std::ios::sync_with_stdio(false);

	// check args
	app::Usage usage;
	usage.setSummary
		( "Fill missing index values with nearest index"
		);
	usage.addArg("OutPath", "path to output index [.u32 format]");
	usage.addArg("InPath", "path to input index [.u32 format]");
	usage.addArg("InHigh", "height of input .u32 grid");
	usage.addArg("InWide", "width of input .u32 grid");
	// ...
	if (usage.argStatus(argc, argv) != app::Usage::Valid)
	{
		std::string const fname(argv[0]);
		io::err()
			<< std::endl << build::version::buildInfo(argv[0]) << std::endl
			<< usage.infoString(fname) << std::endl;
		return 1;
	}

	// parse input argument
	int argnum(0);
	std::string const outpath(argv[++argnum]);
	std::string const inpath(argv[++argnum]);
	std::string const strhigh(argv[++argnum]);
	std::string const strwide(argv[++argnum]);

	constexpr size_t nullSize{ dat::nullValue<size_t>() };
	size_t const inHigh{ io::string::from(strhigh, nullSize) };
	size_t const inWide{ io::string::from(strwide, nullSize) };
	dat::Extents const hwSize(inHigh, inWide);
	if (! dat::isValid(hwSize))
	{
		io::err() << "ERROR: Bad input size specification."
			<< " " << dat::infoString(hwSize, "hwSize")
			<< std::endl;
		return 1;
	}

	// load input cloud
	dat::grid<PixVal> origGrid(hwSize);
	std::ifstream ifs(inpath);
	std::streamsize gotFileSize{};
	bool const okayLoad
		( dat::io::loadBinary
			(ifs, origGrid.begin(), origGrid.end(), &gotFileSize)
		);
	if (okayLoad)
	{
		// fill indices
		sys::Timer timer;
		dat::grid<PixVal> const fullGrid{ img::dilate::floodFilled(origGrid) };
		timer.stop();

		if (sShowTiming)
		{
			io::out() << dat::infoString(timer) << std::endl;
		}

		// save visualization
		if (sSaveTmpGrids)
		{
			saveGridVizPng(fullGrid, "fullGrid.png");
		}

		std::ofstream ofs(outpath);
		bool const okaySave
			(dat::io::saveBinary(ofs, fullGrid.begin(), fullGrid.end()));
		if (okaySave)
		{
			io::out() << "Success" << std::endl;
		}
		else
		{
			io::err() << "FAILURE: Can't load save to file:"
				<< " " << outpath << std::endl;
		}
	}
	else
	{
		size_t const expFileSize(hwSize.size() * sizeof(uint32_t));
		io::err() << "FAILURE: Can't load index map from:"
			<< " '" << inpath << "'\n"
			<< " Specified size: " << dat::infoString(expFileSize) << '\n'
			<< "Found byte size: " << dat::infoString(gotFileSize) << '\n'
			<< std::endl;
	}

	return 0;
}