text:
<?php
define('BASE_PATH', dirname(dirname(__FILE__)));

include(BASE_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');

$crontab = new \Im050\WeChat\Crontab\Crontab();

$crontab->register("*/1 * * * *", function() {
    echo "hello" . time() . PHP_EOL;
});

$crontab->start();

\Swoole\Process::wait(true);

redpajama_set_name: RedPajamaGithub


text:
package server

import (
	"context"
	"github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
	alphapb "github.com/GoogleCloudPlatform/declarative-resource-client-library/python/proto/cloudfunctions/alpha/cloudfunctions_alpha_go_proto"
	emptypb "github.com/GoogleCloudPlatform/declarative-resource-client-library/python/proto/empty_go_proto"
	"github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/cloudfunctions/alpha"
)

// FunctionServer implements the gRPC interface for Function.
type FunctionServer struct{}

// ProtoToFunctionHttpsTriggerSecurityLevelEnum converts a FunctionHttpsTriggerSecurityLevelEnum enum from its proto representation.
func ProtoToCloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum(e alphapb.CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum) *alpha.FunctionHttpsTriggerSecurityLevelEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum_name[int32(e)]; ok {
		e := alpha.FunctionHttpsTriggerSecurityLevelEnum(n[len("CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum"):])
		return &e
	}
	return nil
}

// ProtoToFunctionStatusEnum converts a FunctionStatusEnum enum from its proto representation.
func ProtoToCloudfunctionsAlphaFunctionStatusEnum(e alphapb.CloudfunctionsAlphaFunctionStatusEnum) *alpha.FunctionStatusEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.CloudfunctionsAlphaFunctionStatusEnum_name[int32(e)]; ok {
		e := alpha.FunctionStatusEnum(n[len("CloudfunctionsAlphaFunctionStatusEnum"):])
		return &e
	}
	return nil
}

// ProtoToFunctionVPCConnectorEgressSettingsEnum converts a FunctionVPCConnectorEgressSettingsEnum enum from its proto representation.
func ProtoToCloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum(e alphapb.CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum) *alpha.FunctionVPCConnectorEgressSettingsEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum_name[int32(e)]; ok {
		e := alpha.FunctionVPCConnectorEgressSettingsEnum(n[len("CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum"):])
		return &e
	}
	return nil
}

// ProtoToFunctionIngressSettingsEnum converts a FunctionIngressSettingsEnum enum from its proto representation.
func ProtoToCloudfunctionsAlphaFunctionIngressSettingsEnum(e alphapb.CloudfunctionsAlphaFunctionIngressSettingsEnum) *alpha.FunctionIngressSettingsEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.CloudfunctionsAlphaFunctionIngressSettingsEnum_name[int32(e)]; ok {
		e := alpha.FunctionIngressSettingsEnum(n[len("CloudfunctionsAlphaFunctionIngressSettingsEnum"):])
		return &e
	}
	return nil
}

// ProtoToFunctionSourceRepository converts a FunctionSourceRepository object from its proto representation.
func ProtoToCloudfunctionsAlphaFunctionSourceRepository(p *alphapb.CloudfunctionsAlphaFunctionSourceRepository) *alpha.FunctionSourceRepository {
	if p == nil {
		return nil
	}
	obj := &alpha.FunctionSourceRepository{
		Url:         dcl.StringOrNil(p.GetUrl()),
		DeployedUrl: dcl.StringOrNil(p.GetDeployedUrl()),
	}
	return obj
}

// ProtoToFunctionHttpsTrigger converts a FunctionHttpsTrigger object from its proto representation.
func ProtoToCloudfunctionsAlphaFunctionHttpsTrigger(p *alphapb.CloudfunctionsAlphaFunctionHttpsTrigger) *alpha.FunctionHttpsTrigger {
	if p == nil {
		return nil
	}
	obj := &alpha.FunctionHttpsTrigger{
		Url:           dcl.StringOrNil(p.GetUrl()),
		SecurityLevel: ProtoToCloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum(p.GetSecurityLevel()),
	}
	return obj
}

// ProtoToFunctionEventTrigger converts a FunctionEventTrigger object from its proto representation.
func ProtoToCloudfunctionsAlphaFunctionEventTrigger(p *alphapb.CloudfunctionsAlphaFunctionEventTrigger) *alpha.FunctionEventTrigger {
	if p == nil {
		return nil
	}
	obj := &alpha.FunctionEventTrigger{
		EventType:     dcl.StringOrNil(p.GetEventType()),
		Resource:      dcl.StringOrNil(p.GetResource()),
		Service:       dcl.StringOrNil(p.GetService()),
		FailurePolicy: dcl.Bool(p.GetFailurePolicy()),
	}
	return obj
}

// ProtoToFunction converts a Function resource from its proto representation.
func ProtoToFunction(p *alphapb.CloudfunctionsAlphaFunction) *alpha.Function {
	obj := &alpha.Function{
		Name:                       dcl.StringOrNil(p.GetName()),
		Description:                dcl.StringOrNil(p.GetDescription()),
		SourceArchiveUrl:           dcl.StringOrNil(p.GetSourceArchiveUrl()),
		SourceRepository:           ProtoToCloudfunctionsAlphaFunctionSourceRepository(p.GetSourceRepository()),
		HttpsTrigger:               ProtoToCloudfunctionsAlphaFunctionHttpsTrigger(p.GetHttpsTrigger()),
		EventTrigger:               ProtoToCloudfunctionsAlphaFunctionEventTrigger(p.GetEventTrigger()),
		Status:                     ProtoToCloudfunctionsAlphaFunctionStatusEnum(p.GetStatus()),
		EntryPoint:                 dcl.StringOrNil(p.GetEntryPoint()),
		Runtime:                    dcl.StringOrNil(p.GetRuntime()),
		Timeout:                    dcl.StringOrNil(p.GetTimeout()),
		AvailableMemoryMb:          dcl.Int64OrNil(p.GetAvailableMemoryMb()),
		ServiceAccountEmail:        dcl.StringOrNil(p.GetServiceAccountEmail()),
		UpdateTime:                 dcl.StringOrNil(p.GetUpdateTime()),
		VersionId:                  dcl.Int64OrNil(p.GetVersionId()),
		MaxInstances:               dcl.Int64OrNil(p.GetMaxInstances()),
		VPCConnector:               dcl.StringOrNil(p.GetVpcConnector()),
		VPCConnectorEgressSettings: ProtoToCloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum(p.GetVpcConnectorEgressSettings()),
		IngressSettings:            ProtoToCloudfunctionsAlphaFunctionIngressSettingsEnum(p.GetIngressSettings()),
		Region:                     dcl.StringOrNil(p.GetRegion()),
		Project:                    dcl.StringOrNil(p.GetProject()),
	}
	return obj
}

// FunctionHttpsTriggerSecurityLevelEnumToProto converts a FunctionHttpsTriggerSecurityLevelEnum enum to its proto representation.
func CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnumToProto(e *alpha.FunctionHttpsTriggerSecurityLevelEnum) alphapb.CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum {
	if e == nil {
		return alphapb.CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum(0)
	}
	if v, ok := alphapb.CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum_value["FunctionHttpsTriggerSecurityLevelEnum"+string(*e)]; ok {
		return alphapb.CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum(v)
	}
	return alphapb.CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnum(0)
}

// FunctionStatusEnumToProto converts a FunctionStatusEnum enum to its proto representation.
func CloudfunctionsAlphaFunctionStatusEnumToProto(e *alpha.FunctionStatusEnum) alphapb.CloudfunctionsAlphaFunctionStatusEnum {
	if e == nil {
		return alphapb.CloudfunctionsAlphaFunctionStatusEnum(0)
	}
	if v, ok := alphapb.CloudfunctionsAlphaFunctionStatusEnum_value["FunctionStatusEnum"+string(*e)]; ok {
		return alphapb.CloudfunctionsAlphaFunctionStatusEnum(v)
	}
	return alphapb.CloudfunctionsAlphaFunctionStatusEnum(0)
}

// FunctionVPCConnectorEgressSettingsEnumToProto converts a FunctionVPCConnectorEgressSettingsEnum enum to its proto representation.
func CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnumToProto(e *alpha.FunctionVPCConnectorEgressSettingsEnum) alphapb.CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum {
	if e == nil {
		return alphapb.CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum(0)
	}
	if v, ok := alphapb.CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum_value["FunctionVPCConnectorEgressSettingsEnum"+string(*e)]; ok {
		return alphapb.CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum(v)
	}
	return alphapb.CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnum(0)
}

// FunctionIngressSettingsEnumToProto converts a FunctionIngressSettingsEnum enum to its proto representation.
func CloudfunctionsAlphaFunctionIngressSettingsEnumToProto(e *alpha.FunctionIngressSettingsEnum) alphapb.CloudfunctionsAlphaFunctionIngressSettingsEnum {
	if e == nil {
		return alphapb.CloudfunctionsAlphaFunctionIngressSettingsEnum(0)
	}
	if v, ok := alphapb.CloudfunctionsAlphaFunctionIngressSettingsEnum_value["FunctionIngressSettingsEnum"+string(*e)]; ok {
		return alphapb.CloudfunctionsAlphaFunctionIngressSettingsEnum(v)
	}
	return alphapb.CloudfunctionsAlphaFunctionIngressSettingsEnum(0)
}

// FunctionSourceRepositoryToProto converts a FunctionSourceRepository object to its proto representation.
func CloudfunctionsAlphaFunctionSourceRepositoryToProto(o *alpha.FunctionSourceRepository) *alphapb.CloudfunctionsAlphaFunctionSourceRepository {
	if o == nil {
		return nil
	}
	p := &alphapb.CloudfunctionsAlphaFunctionSourceRepository{}
	p.SetUrl(dcl.ValueOrEmptyString(o.Url))
	p.SetDeployedUrl(dcl.ValueOrEmptyString(o.DeployedUrl))
	return p
}

// FunctionHttpsTriggerToProto converts a FunctionHttpsTrigger object to its proto representation.
func CloudfunctionsAlphaFunctionHttpsTriggerToProto(o *alpha.FunctionHttpsTrigger) *alphapb.CloudfunctionsAlphaFunctionHttpsTrigger {
	if o == nil {
		return nil
	}
	p := &alphapb.CloudfunctionsAlphaFunctionHttpsTrigger{}
	p.SetUrl(dcl.ValueOrEmptyString(o.Url))
	p.SetSecurityLevel(CloudfunctionsAlphaFunctionHttpsTriggerSecurityLevelEnumToProto(o.SecurityLevel))
	return p
}

// FunctionEventTriggerToProto converts a FunctionEventTrigger object to its proto representation.
func CloudfunctionsAlphaFunctionEventTriggerToProto(o *alpha.FunctionEventTrigger) *alphapb.CloudfunctionsAlphaFunctionEventTrigger {
	if o == nil {
		return nil
	}
	p := &alphapb.CloudfunctionsAlphaFunctionEventTrigger{}
	p.SetEventType(dcl.ValueOrEmptyString(o.EventType))
	p.SetResource(dcl.ValueOrEmptyString(o.Resource))
	p.SetService(dcl.ValueOrEmptyString(o.Service))
	p.SetFailurePolicy(dcl.ValueOrEmptyBool(o.FailurePolicy))
	return p
}

// FunctionToProto converts a Function resource to its proto representation.
func FunctionToProto(resource *alpha.Function) *alphapb.CloudfunctionsAlphaFunction {
	p := &alphapb.CloudfunctionsAlphaFunction{}
	p.SetName(dcl.ValueOrEmptyString(resource.Name))
	p.SetDescription(dcl.ValueOrEmptyString(resource.Description))
	p.SetSourceArchiveUrl(dcl.ValueOrEmptyString(resource.SourceArchiveUrl))
	p.SetSourceRepository(CloudfunctionsAlphaFunctionSourceRepositoryToProto(resource.SourceRepository))
	p.SetHttpsTrigger(CloudfunctionsAlphaFunctionHttpsTriggerToProto(resource.HttpsTrigger))
	p.SetEventTrigger(CloudfunctionsAlphaFunctionEventTriggerToProto(resource.EventTrigger))
	p.SetStatus(CloudfunctionsAlphaFunctionStatusEnumToProto(resource.Status))
	p.SetEntryPoint(dcl.ValueOrEmptyString(resource.EntryPoint))
	p.SetRuntime(dcl.ValueOrEmptyString(resource.Runtime))
	p.SetTimeout(dcl.ValueOrEmptyString(resource.Timeout))
	p.SetAvailableMemoryMb(dcl.ValueOrEmptyInt64(resource.AvailableMemoryMb))
	p.SetServiceAccountEmail(dcl.ValueOrEmptyString(resource.ServiceAccountEmail))
	p.SetUpdateTime(dcl.ValueOrEmptyString(resource.UpdateTime))
	p.SetVersionId(dcl.ValueOrEmptyInt64(resource.VersionId))
	p.SetMaxInstances(dcl.ValueOrEmptyInt64(resource.MaxInstances))
	p.SetVpcConnector(dcl.ValueOrEmptyString(resource.VPCConnector))
	p.SetVpcConnectorEgressSettings(CloudfunctionsAlphaFunctionVPCConnectorEgressSettingsEnumToProto(resource.VPCConnectorEgressSettings))
	p.SetIngressSettings(CloudfunctionsAlphaFunctionIngressSettingsEnumToProto(resource.IngressSettings))
	p.SetRegion(dcl.ValueOrEmptyString(resource.Region))
	p.SetProject(dcl.ValueOrEmptyString(resource.Project))
	mLabels := make(map[string]string, len(resource.Labels))
	for k, r := range resource.Labels {
		mLabels[k] = r
	}
	p.SetLabels(mLabels)
	mEnvironmentVariables := make(map[string]string, len(resource.EnvironmentVariables))
	for k, r := range resource.EnvironmentVariables {
		mEnvironmentVariables[k] = r
	}
	p.SetEnvironmentVariables(mEnvironmentVariables)

	return p
}

// applyFunction handles the gRPC request by passing it to the underlying Function Apply() method.
func (s *FunctionServer) applyFunction(ctx context.Context, c *alpha.Client, request *alphapb.ApplyCloudfunctionsAlphaFunctionRequest) (*alphapb.CloudfunctionsAlphaFunction, error) {
	p := ProtoToFunction(request.GetResource())
	res, err := c.ApplyFunction(ctx, p)
	if err != nil {
		return nil, err
	}
	r := FunctionToProto(res)
	return r, nil
}

// applyCloudfunctionsAlphaFunction handles the gRPC request by passing it to the underlying Function Apply() method.
func (s *FunctionServer) ApplyCloudfunctionsAlphaFunction(ctx context.Context, request *alphapb.ApplyCloudfunctionsAlphaFunctionRequest) (*alphapb.CloudfunctionsAlphaFunction, error) {
	cl, err := createConfigFunction(ctx, request.GetServiceAccountFile())
	if err != nil {
		return nil, err
	}
	return s.applyFunction(ctx, cl, request)
}

// DeleteFunction handles the gRPC request by passing it to the underlying Function Delete() method.
func (s *FunctionServer) DeleteCloudfunctionsAlphaFunction(ctx context.Context, request *alphapb.DeleteCloudfunctionsAlphaFunctionRequest) (*emptypb.Empty, error) {

	cl, err := createConfigFunction(ctx, request.GetServiceAccountFile())
	if err != nil {
		return nil, err
	}
	return &emptypb.Empty{}, cl.DeleteFunction(ctx, ProtoToFunction(request.GetResource()))

}

// ListCloudfunctionsAlphaFunction handles the gRPC request by passing it to the underlying FunctionList() method.
func (s *FunctionServer) ListCloudfunctionsAlphaFunction(ctx context.Context, request *alphapb.ListCloudfunctionsAlphaFunctionRequest) (*alphapb.ListCloudfunctionsAlphaFunctionResponse, error) {
	cl, err := createConfigFunction(ctx, request.GetServiceAccountFile())
	if err != nil {
		return nil, err
	}

	resources, err := cl.ListFunction(ctx, request.GetProject(), request.GetRegion())
	if err != nil {
		return nil, err
	}
	var protos []*alphapb.CloudfunctionsAlphaFunction
	for _, r := range resources.Items {
		rp := FunctionToProto(r)
		protos = append(protos, rp)
	}
	p := &alphapb.ListCloudfunctionsAlphaFunctionResponse{}
	p.SetItems(protos)
	return p, nil
}

func createConfigFunction(ctx context.Context, service_account_file string) (*alpha.Client, error) {

	conf := dcl.NewConfig(dcl.WithUserAgent("dcl-test"), dcl.WithCredentialsFile(service_account_file))
	return alpha.NewClient(conf), nil
}


text:
package org.ethereum.datasource;

import org.ethereum.crypto.HashUtil;
import org.ethereum.datasource.inmem.HashMapDB;
import org.ethereum.vm.DataWord;
import org.junit.Test;
import org.spongycastle.util.encoders.Hex;

import static org.ethereum.util.ByteUtil.longToBytes;
import static org.junit.Assert.*;

/**
 * Testing {@link ReadWriteCache}
 */
public class ReadWriteCacheTest {

    private byte[] intToKey(final int i) {
        return HashUtil.INSTANCE.sha3(longToBytes(i));
    }

    private byte[] intToValue(final int i) {
        return (new DataWord(i)).getData();
    }

    private String str(final Object obj) {
        if (obj == null) return null;
        return Hex.toHexString((byte[]) obj);
    }

    @Test
    public void testSimple() {
        final Source<byte[], byte[]> src = new HashMapDB<>();
        final ReadWriteCache<byte[], byte[]> cache = new ReadWriteCache.BytesKey<>(src, WriteCache.CacheType.SIMPLE);

        for (int i = 0; i < 10_000; ++i) {
            cache.put(intToKey(i), intToValue(i));
        }

        // Everything is cached
        assertEquals(str(intToValue(0)), str(cache.getCached(intToKey(0)).value()));
        assertEquals(str(intToValue(9_999)), str(cache.getCached(intToKey(9_999)).value()));

        // Source is empty
        assertNull(src.get(intToKey(0)));
        assertNull(src.get(intToKey(9_999)));

        // After flush src is filled
        cache.flush();
        assertEquals(str(intToValue(9_999)), str(src.get(intToKey(9_999))));
        assertEquals(str(intToValue(0)), str(src.get(intToKey(0))));

        // Deleting key that is currently in cache
        cache.put(intToKey(0), intToValue(12345));
        assertEquals(str(intToValue(12345)), str(cache.getCached(intToKey(0)).value()));
        cache.delete(intToKey(0));
        assertTrue(null == cache.getCached(intToKey(0)) || null == cache.getCached(intToKey(0)).value());
        assertEquals(str(intToValue(0)), str(src.get(intToKey(0))));
        cache.flush();
        assertNull(src.get(intToKey(0)));

        // No size estimators
        assertEquals(0, cache.estimateCacheSize());
    }
}


text:
package org.codelibs.elasticsearch.extension.filter;

import java.util.Arrays;
import java.util.Comparator;
import java.util.Set;

import org.elasticsearch.common.inject.Inject;

public class EngineFilters {

    private final EngineFilter[] filters;

    @Inject
    public EngineFilters(final Set<EngineFilter> engineFilters) {
        filters = engineFilters.toArray(new EngineFilter[engineFilters.size()]);
        Arrays.sort(filters, new Comparator<EngineFilter>() {
            @Override
            public int compare(final EngineFilter o1, final EngineFilter o2) {
                return Integer.compare(o1.order(), o2.order());
            }
        });

    }

    /**
     * Returns the action filters that have been injected
     */
    public EngineFilter[] filters() {
        return filters;
    }

}


text:
/**
 * SOSExcellence S.A. de C.V. all rights reserved 2016.
 */
package com.biancco.admin.persistence.dao.impl;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;

import org.springframework.transaction.annotation.Transactional;

import com.biancco.admin.app.exception.DBException;
import com.biancco.admin.persistence.dao.ModuleDAO;
import com.biancco.admin.persistence.model.Module;

/**
 * Module DAO implementation.
 *
 * @author SOSExcellence.
 */
public class ModuleDAOImpl implements ModuleDAO {
	/**
	 * Entity Manager.
	 */
	@PersistenceContext
	private EntityManager entityManager;

	/**
	 * {@inheritDoc}
	 */
	@Override
	@Transactional
	public Module save(Module module) throws DBException {
		try {
			this.entityManager.persist(module);
			this.entityManager.flush();
			return module;
		} catch (Exception e) {
			throw new DBException(e);
		}
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void update(Module module) throws DBException {
		try {
			this.entityManager.merge(module);
		} catch (Exception e) {
			throw new DBException(e);
		}
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	@Transactional
	public void delete(Module module) throws DBException {
		try {
			this.entityManager.remove(module);
		} catch (Exception e) {
			throw new DBException(e);
		}
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	@Transactional(readOnly = true)
	public List<Module> getAll() throws DBException {
		try {
			CriteriaBuilder builder = this.entityManager.getCriteriaBuilder();

			CriteriaQuery<Module> q = builder.createQuery(Module.class);
			Root<Module> root = q.from(Module.class);
			q.select(root);
			q.orderBy(builder.asc(root.get("name")));

			return this.entityManager.createQuery(q).getResultList();
		} catch (Exception e) {
			throw new DBException(e);
		}
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	@Transactional
	public Module getById(Long identifier) throws DBException {
		try {
			return this.entityManager.find(Module.class, identifier);
		} catch (Exception e) {
			throw new DBException(e);
		}
	}

}


text:
<?php

declare(strict_types=1);

namespace Overblog\GraphQLBundle\Tests\Config\Parser\fixtures\annotations\Type;

use Overblog\GraphQLBundle\Annotation as GQL;

/**
 * @GQL\Type(isTypeOf="@=isTypeOf('App\Entity\Droid')")
 * @GQL\Description("The Droid type")
 */
#[GQL\Type(isTypeOf: "@=isTypeOf('App\Entity\Droid')")]
#[GQL\Description('The Droid type')]
final class Droid extends Character
{
    /**
     * @GQL\Field
     */
    #[GQL\Field]
    protected int $memory;
}


text:
START_ATF_NAMESPACE
    typedef tagFUNCDESC *LPFUNCDESC;
END_ATF_NAMESPACE


text:
/* */
(function(process) {
  module.exports = function(hljs) {
    var INTEGER_RE = '\\d(_|\\d)*';
    var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
    var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
    var BASED_INTEGER_RE = '\\w+';
    var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
    var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
    return {
      case_insensitive: true,
      keywords: {
        keyword: 'abs access after alias all and architecture array assert attribute begin block ' + 'body buffer bus case component configuration constant context cover disconnect ' + 'downto default else elsif end entity exit fairness file for force function generate ' + 'generic group guarded if impure in inertial inout is label library linkage literal ' + 'loop map mod nand new next nor not null of on open or others out package port ' + 'postponed procedure process property protected pure range record register reject ' + 'release rem report restrict restrict_guarantee return rol ror select sequence ' + 'severity shared signal sla sll sra srl strong subtype then to transport type ' + 'unaffected units until use variable vmode vprop vunit wait when while with xnor xor',
        typename: 'boolean bit character severity_level integer time delay_length natural positive ' + 'string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector ' + 'std_logic std_logic_vector unsigned signed boolean_vector integer_vector ' + 'real_vector time_vector'
      },
      illegal: '{',
      contains: [hljs.C_BLOCK_COMMENT_MODE, hljs.COMMENT('--', '$'), hljs.QUOTE_STRING_MODE, {
        className: 'number',
        begin: NUMBER_RE,
        relevance: 0
      }, {
        className: 'literal',
        begin: '\'(U|X|0|1|Z|W|L|H|-)\'',
        contains: [hljs.BACKSLASH_ESCAPE]
      }, {
        className: 'attribute',
        begin: '\'[A-Za-z](_?[A-Za-z0-9])*',
        contains: [hljs.BACKSLASH_ESCAPE]
      }]
    };
  };
})(require('process'));


text:
./remove.sh

echo "Build ubuntu-gnome-vnc docker image ..."
cd docker
docker build -t huas/ubuntu-gnome-vnc:1.0.0 .
docker tag huas/ubuntu-gnome-vnc:1.0.0 \
    huas/ubuntu-gnome-vnc:latest
cd ..
echo "remove ubuntu-gnome-vnc docker images ..."
docker rmi $(docker images -q -f dangling=true)
docker rmi huas/ubuntu-gnome-vnc:1.0.0


text:
package org.abstractj.keys;

import org.abstractj.CryptoParty;

import java.security.InvalidAlgorithmParameterException;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.SecureRandom;
import java.security.spec.ECGenParameterSpec;

public class KeyPair {

    private final java.security.KeyPair keyPair;

    static {
        CryptoParty.loadProvider();
    }

    public KeyPair() {

        KeyPairGenerator keyGen = null;
        try {
            keyGen = KeyPairGenerator.getInstance("ECDH", "BC");
            ECGenParameterSpec ecSpec = new ECGenParameterSpec("prime192v1");
            keyGen.initialize(ecSpec, new SecureRandom());
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (NoSuchProviderException e) {
            e.printStackTrace();
        } catch (InvalidAlgorithmParameterException e) {
            e.printStackTrace();
        }

        this.keyPair = keyGen.generateKeyPair();

    }

    public java.security.PublicKey getPublicKey() {
        return keyPair.getPublic();
    }

    public PrivateKey getPrivateKey() {
        return keyPair.getPrivate();
    }
}


text:
<?php

namespace TDN\DossierRedactionBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

use Doctrine\ORM\EntityRepository as RubriqueRepository;

use TDN\DocumentBundle\Form\Type\DocumentType;
use TDN\DocumentBundle\Form\Type\SlideType;
use TDN\DocumentBundle\Form\Type\ThematiqueType;

use Doctrine\ORM\EntityRepository;

use TDN\ImageBundle\Form\Type\simpleImageType;

class DossierRedactionType extends DocumentType {

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        parent::buildForm($builder, $options);
        $builder->add('statut', 'choice',
            array('label' => 'Etat de publication',
                  'choices' => array('DOSSIER_BROUILLON' => 'Brouillon', 'DOSSIER_PUBLIE' => 'Publié', 'DOSSIER_ARCHIVE' => 'Archivé'),
                  'expanded' => true,
                  'multiple' => false
            ));
        $builder->add('lnDossier', 'entity', array(
            'label' => "Est-ce une partie d'un dossier ?",
            'class' => 'TDN\DossierRedactionBundle\Entity\Dossier',
            'attr' => array('disabled' => 'disabled'),
            'required' => false,
            'property' => 'titre',
            'expanded' => false,
            'multiple' => false,
            'empty_value' => 'Non',
            'query_builder' => function(EntityRepository $er) {
                return $er->createQueryBuilder('u')
                          ->where("u.statut LIKE 'DOSSIER_%'");
        }));
        $builder->add('ordreDossier', 'integer',
            array('label' => 'Ordre de classement dans le dossier',
                  'required' => false));
     }

	public function setDefaultOptions(OptionsResolverInterface $resolver) {

	    $resolver->setDefaults(array(
	    	'data_class' => 'TDN\DossierRedactionBundle\Entity\Dossier',
            'cascade' => true
    	));
	}

    public function getName()
    {
        return 'DossierRedaction_Detail';
    }
}


text:
define([
  'okta',
  'util/FormController',
  'util/Enums',
  'util/FormType',
  'util/ValidationUtil',
  'views/shared/ContactSupport',
  'views/shared/TextBox'
],
function (Okta, FormController, Enums, FormType, ValidationUtil, ContactSupport, TextBox) {

  var _ = Okta._;

  var Footer = Okta.View.extend({
    template: '\
      \
        {{i18n code="goback" bundle="login"}}\
      \
      {{#if helpSupportNumber}}\
      \
        {{i18n code="mfa.noAccessToEmail" bundle="login"}}\
      \
      {{/if}}\
    ',
    className: 'auth-footer',
    events: {
      'click .js-back' : function (e) {
        e.preventDefault();
        this.back();
      },
      'click .js-contact-support': function (e) {
        e.preventDefault();
        this.state.trigger('contactSupport');
        this.$('.js-contact-support').hide();
      }
    },
    getTemplateData: function () {
      return this.settings.pick('helpSupportNumber');
    },
    back: function () {
      this.state.set('navigateDir', Enums.DIRECTION_BACK);
      this.options.appState.trigger('navigate', '');
    }
  });

  return FormController.extend({
    className: 'account-unlock',
    Model: {
      props: {
        username: ['string', true],
        factorType: ['string', true, Enums.RECOVERY_FACTOR_TYPE_EMAIL]
      },
      validate: function () {
        return ValidationUtil.validateUsername(this);
      },
      save: function () {
        var self = this;
        return this.startTransaction(function (authClient) {
          return authClient.unlockAccount({
            username: self.settings.transformUsername(self.get('username'), Enums.UNLOCK_ACCOUNT),
            factorType: self.get('factorType')
          });
        })
        .fail(function () {
          self.set('factorType', Enums.RECOVERY_FACTOR_TYPE_EMAIL);
        });
      }
    },
    Form: {
      autoSave: true,
      save: _.partial(Okta.loc, 'account.unlock.sendEmail', 'login'),
      title: _.partial(Okta.loc, 'account.unlock.title', 'login'),
      formChildren: function () {
        var formChildren = [
          FormType.Input({
            placeholder: Okta.loc('account.unlock.email.or.username.placeholder', 'login'),
            name: 'username',
            input: TextBox,
            type: 'text',
            params: {
              innerTooltip: Okta.loc('account.unlock.email.or.username.tooltip', 'login'),
              icon: 'person-16-gray'
            }
          })
        ];
        if (this.settings.get('features.smsRecovery')) {
          formChildren.push(FormType.View({View: '\

\
              {{i18n code="recovery.sms.hint" bundle="login"}}\

\
          '}));
        }

        return formChildren;
      },
      initialize: function () {
        var form = this;

        this.listenTo(this, 'save', function () {
          this.options.appState.set('username', this.model.get('username'));
        });

        if (this.settings.get('features.smsRecovery')) {
          this.$el.addClass('forgot-password-sms-enabled');
          this.addButton({
            attributes: { 'data-se': 'sms-button'},
            type: 'button',
            className: 'button-primary sms-button',
            text: Okta.loc('account.unlock.sendText', 'login'),
            action: function () {
              form.clearErrors();
              if (this.model.isValid()) {
                this.model.set('factorType', Enums.RECOVERY_FACTOR_TYPE_SMS);
                form.trigger('save', this.model);
              }
            }
          }, { prepend: true });
        }

        this.listenTo(this.state, 'contactSupport', function () {
          this.add(ContactSupport, '.o-form-error-container');
        });
      }
    },
    Footer: Footer
  });

});


text:
import {Component, Directive, Inject, Injectable, InjectionToken, Injector, NgModule, Optional, forwardRef} from '@angular/core';
import {TestBed, async, inject} from '@angular/core/testing';
import {By} from '@angular/platform-browser';
import {expect} from '@angular/platform-browser/testing/src/matchers';
import {onlyInIvy} from '@angular/private/testing';

describe('providers', () => {

  describe('inheritance', () => {

    it('should NOT inherit providers', () => {
      const SOME_DIRS = new InjectionToken('someDirs');

      @Directive({
        selector: '[super-dir]',
        providers: [{provide: SOME_DIRS, useClass: SuperDirective, multi: true}]
      })
      class SuperDirective {
      }

      @Directive({
        selector: '[sub-dir]',
        providers: [{provide: SOME_DIRS, useClass: SubDirective, multi: true}]
      })
      class SubDirective extends SuperDirective {
      }

      @Directive({selector: '[other-dir]'})
      class OtherDirective {
        constructor(@Inject(SOME_DIRS) public dirs: any) {}
      }

      @Component({selector: 'app-comp', template: `<div other-dir sub-dir></div>`})
      class App {
      }

      TestBed.configureTestingModule(
          {declarations: [SuperDirective, SubDirective, OtherDirective, App]});

      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();

      const otherDir = fixture.debugElement.query(By.css('div')).injector.get(OtherDirective);
      expect(otherDir.dirs.length).toEqual(1);
      expect(otherDir.dirs[0] instanceof SubDirective).toBe(true);
    });

  });

  describe('lifecycles', () => {
    it('should inherit ngOnDestroy hooks on providers', () => {
      const logs: string[] = [];

      @Injectable()
      class SuperInjectableWithDestroyHook {
        ngOnDestroy() { logs.push('OnDestroy'); }
      }

      @Injectable()
      class SubInjectableWithDestroyHook extends SuperInjectableWithDestroyHook {
      }

      @Component({template: '', providers: [SubInjectableWithDestroyHook]})
      class App {
        constructor(foo: SubInjectableWithDestroyHook) {}
      }

      TestBed.configureTestingModule({declarations: [App]});
      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();
      fixture.destroy();

      expect(logs).toEqual(['OnDestroy']);
    });

    it('should not call ngOnDestroy for providers that have not been requested', () => {
      const logs: string[] = [];

      @Injectable()
      class InjectableWithDestroyHook {
        ngOnDestroy() { logs.push('OnDestroy'); }
      }

      @Component({template: '', providers: [InjectableWithDestroyHook]})
      class App {
      }

      TestBed.configureTestingModule({declarations: [App]});
      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();
      fixture.destroy();

      expect(logs).toEqual([]);
    });

    it('should only call ngOnDestroy once for multiple instances', () => {
      const logs: string[] = [];

      @Injectable()
      class InjectableWithDestroyHook {
        ngOnDestroy() { logs.push('OnDestroy'); }
      }

      @Component({selector: 'my-cmp', template: ''})
      class MyComponent {
        constructor(foo: InjectableWithDestroyHook) {}
      }

      @Component({
        template: `
          <my-cmp></my-cmp>
          <my-cmp></my-cmp>
        `,
        providers: [InjectableWithDestroyHook]
      })
      class App {
      }

      TestBed.configureTestingModule({declarations: [App, MyComponent]});
      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();
      fixture.destroy();

      expect(logs).toEqual(['OnDestroy']);
    });

    it('should call ngOnDestroy when providing same token via useClass', () => {
      const logs: string[] = [];

      @Injectable()
      class InjectableWithDestroyHook {
        ngOnDestroy() { logs.push('OnDestroy'); }
      }

      @Component({
        template: '',
        providers: [{provide: InjectableWithDestroyHook, useClass: InjectableWithDestroyHook}]
      })
      class App {
        constructor(foo: InjectableWithDestroyHook) {}
      }

      TestBed.configureTestingModule({declarations: [App]});
      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();
      fixture.destroy();

      expect(logs).toEqual(['OnDestroy']);
    });

    onlyInIvy('Destroy hook of useClass provider is invoked correctly')
        .it('should only call ngOnDestroy of value when providing via useClass', () => {
          const logs: string[] = [];

          @Injectable()
          class InjectableWithDestroyHookToken {
            ngOnDestroy() { logs.push('OnDestroy Token'); }
          }

          @Injectable()
          class InjectableWithDestroyHookValue {
            ngOnDestroy() { logs.push('OnDestroy Value'); }
          }

          @Component({
            template: '',
            providers: [
              {provide: InjectableWithDestroyHookToken, useClass: InjectableWithDestroyHookValue}
            ]
          })
          class App {
            constructor(foo: InjectableWithDestroyHookToken) {}
          }

          TestBed.configureTestingModule({declarations: [App]});
          const fixture = TestBed.createComponent(App);
          fixture.detectChanges();
          fixture.destroy();

          expect(logs).toEqual(['OnDestroy Value']);
        });

    it('should only call ngOnDestroy of value when providing via useExisting', () => {
      const logs: string[] = [];

      @Injectable()
      class InjectableWithDestroyHookToken {
        ngOnDestroy() { logs.push('OnDestroy Token'); }
      }

      @Injectable()
      class InjectableWithDestroyHookExisting {
        ngOnDestroy() { logs.push('OnDestroy Existing'); }
      }

      @Component({
        template: '',
        providers: [
          InjectableWithDestroyHookExisting, {
            provide: InjectableWithDestroyHookToken,
            useExisting: InjectableWithDestroyHookExisting
          }
        ]
      })
      class App {
        constructor(foo1: InjectableWithDestroyHookExisting, foo2: InjectableWithDestroyHookToken) {
        }
      }

      TestBed.configureTestingModule({declarations: [App]});
      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();
      fixture.destroy();

      expect(logs).toEqual(['OnDestroy Existing']);
    });

    it('should invoke ngOnDestroy with the correct context when providing a type provider multiple times on the same node',
       () => {
         const resolvedServices: (DestroyService | undefined)[] = [];
         const destroyContexts: (DestroyService | undefined)[] = [];
         let parentService: DestroyService|undefined;
         let childService: DestroyService|undefined;

         @Injectable()
         class DestroyService {
           constructor() { resolvedServices.push(this); }
           ngOnDestroy() { destroyContexts.push(this); }
         }

         @Directive({selector: '[dir-one]', providers: [DestroyService]})
         class DirOne {
           constructor(service: DestroyService) { childService = service; }
         }

         @Directive({selector: '[dir-two]', providers: [DestroyService]})
         class DirTwo {
           constructor(service: DestroyService) { childService = service; }
         }

         @Component({template: '

', providers: [DestroyService]})
         class App {
           constructor(service: DestroyService) { parentService = service; }
         }

         TestBed.configureTestingModule({declarations: [App, DirOne, DirTwo]});
         const fixture = TestBed.createComponent(App);
         fixture.detectChanges();
         fixture.destroy();

         expect(parentService).toBeDefined();
         expect(childService).toBeDefined();
         expect(parentService).not.toBe(childService);
         expect(resolvedServices).toEqual([parentService, childService]);
         expect(destroyContexts).toEqual([parentService, childService]);
       });

    onlyInIvy('Destroy hook of useClass provider is invoked correctly')
        .it('should invoke ngOnDestroy with the correct context when providing a class provider multiple times on the same node',
            () => {
              const resolvedServices: (DestroyService | undefined)[] = [];
              const destroyContexts: (DestroyService | undefined)[] = [];
              const token = new InjectionToken<any>('token');
              let parentService: DestroyService|undefined;
              let childService: DestroyService|undefined;

              @Injectable()
              class DestroyService {
                constructor() { resolvedServices.push(this); }
                ngOnDestroy() { destroyContexts.push(this); }
              }

              @Directive(
                  {selector: '[dir-one]', providers: [{provide: token, useClass: DestroyService}]})
              class DirOne {
                constructor(@Inject(token) service: DestroyService) { childService = service; }
              }

              @Directive(
                  {selector: '[dir-two]', providers: [{provide: token, useClass: DestroyService}]})
              class DirTwo {
                constructor(@Inject(token) service: DestroyService) { childService = service; }
              }

              @Component({
                template: '

',
                providers: [{provide: token, useClass: DestroyService}]
              })
              class App {
                constructor(@Inject(token) service: DestroyService) { parentService = service; }
              }

              TestBed.configureTestingModule({declarations: [App, DirOne, DirTwo]});
              const fixture = TestBed.createComponent(App);
              fixture.detectChanges();
              fixture.destroy();

              expect(parentService).toBeDefined();
              expect(childService).toBeDefined();
              expect(parentService).not.toBe(childService);
              expect(resolvedServices).toEqual([parentService, childService]);
              expect(destroyContexts).toEqual([parentService, childService]);
            });

    onlyInIvy('ngOnDestroy hooks for multi providers were not supported in ViewEngine')
        .it('should not invoke ngOnDestroy on multi providers', () => {
          // TODO(FW-1866): currently we only assert that the hook was called,
          // but we should also be checking that the correct context was passed in.
          let destroyCalls = 0;
          const SERVICES = new InjectionToken<any>('SERVICES');

          @Injectable()
          class DestroyService {
            ngOnDestroy() { destroyCalls++; }
          }

          @Injectable()
          class OtherDestroyService {
            ngOnDestroy() { destroyCalls++; }
          }

          @Component({
            template: '

',
            providers: [
              {provide: SERVICES, useClass: DestroyService, multi: true},
              {provide: SERVICES, useClass: OtherDestroyService, multi: true},
            ]
          })
          class App {
            constructor(@Inject(SERVICES) s: any) {}
          }

          TestBed.configureTestingModule({declarations: [App]});
          const fixture = TestBed.createComponent(App);
          fixture.detectChanges();
          fixture.destroy();

          expect(destroyCalls).toBe(2);
        });

  });

  describe('components and directives', () => {

    class MyService {
      value = 'some value';
    }

    @Component({selector: 'my-comp', template: ``})
    class MyComp {
      constructor(public svc: MyService) {}
    }

    @Directive({selector: '[some-dir]'})
    class MyDir {
      constructor(public svc: MyService) {}
    }

    it('should support providing components in tests without @Injectable', () => {
      @Component({selector: 'test-comp', template: '<my-comp></my-comp>'})
      class TestComp {
      }

      TestBed.configureTestingModule({
        declarations: [TestComp, MyComp],
        // providing MyComp is unnecessary but it shouldn't throw
        providers: [MyComp, MyService],
      });

      const fixture = TestBed.createComponent(TestComp);
      const myCompInstance = fixture.debugElement.query(By.css('my-comp')).injector.get(MyComp);
      expect(myCompInstance.svc.value).toEqual('some value');
    });

    it('should support providing directives in tests without @Injectable', () => {
      @Component({selector: 'test-comp', template: '

'})
      class TestComp {
      }

      TestBed.configureTestingModule({
        declarations: [TestComp, MyDir],
        // providing MyDir is unnecessary but it shouldn't throw
        providers: [MyDir, MyService],
      });

      const fixture = TestBed.createComponent(TestComp);
      const myCompInstance = fixture.debugElement.query(By.css('div')).injector.get(MyDir);
      expect(myCompInstance.svc.value).toEqual('some value');
    });

    describe('injection without bootstrapping', () => {
      beforeEach(() => {
        TestBed.configureTestingModule({declarations: [MyComp], providers: [MyComp, MyService]});
      });

      it('should support injecting without bootstrapping',
         async(inject([MyComp, MyService], (comp: MyComp, service: MyService) => {
           expect(comp.svc.value).toEqual('some value');
         })));
    });
  });

  describe('forward refs', () => {

    it('should support forward refs in provider deps', () => {
      class MyService {
        constructor(public dep: {value: string}) {}
      }

      class OtherService {
        value = 'one';
      }

      @Component({selector: 'app-comp', template: ``})
      class AppComp {
        constructor(public myService: MyService) {}
      }

      @NgModule({
        providers: [
          OtherService, {
            provide: MyService,
            useFactory: (dep: {value: string}) => new MyService(dep),
            deps: [forwardRef(() => OtherService)]
          }
        ],
        declarations: [AppComp]
      })
      class MyModule {
      }

      TestBed.configureTestingModule({imports: [MyModule]});

      const fixture = TestBed.createComponent(AppComp);
      expect(fixture.componentInstance.myService.dep.value).toBe('one');
    });

    it('should support forward refs in useClass when impl version is also provided', () => {

      @Injectable({providedIn: 'root', useClass: forwardRef(() => SomeProviderImpl)})
      abstract class SomeProvider {
      }

      @Injectable()
      class SomeProviderImpl extends SomeProvider {
      }

      @Component({selector: 'my-app', template: ''})
      class App {
        constructor(public foo: SomeProvider) {}
      }

      TestBed.configureTestingModule(
          {declarations: [App], providers: [{provide: SomeProvider, useClass: SomeProviderImpl}]});
      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();

      expect(fixture.componentInstance.foo).toBeAnInstanceOf(SomeProviderImpl);
    });

    it('should support forward refs in useClass when token is provided', () => {
      @Injectable({providedIn: 'root'})
      abstract class SomeProvider {
      }

      @Injectable()
      class SomeProviderImpl extends SomeProvider {
      }

      @Component({selector: 'my-app', template: ''})
      class App {
        constructor(public foo: SomeProvider) {}
      }

      TestBed.configureTestingModule({
        declarations: [App],
        providers: [{provide: SomeProvider, useClass: forwardRef(() => SomeProviderImpl)}]
      });
      const fixture = TestBed.createComponent(App);
      fixture.detectChanges();

      expect(fixture.componentInstance.foo).toBeAnInstanceOf(SomeProviderImpl);
    });

  });

  describe('flags', () => {

    class MyService {
      constructor(public value: OtherService|null) {}
    }

    class OtherService {}

    it('should support Optional flag in deps', () => {
      const injector =
          Injector.create([{provide: MyService, deps: [[new Optional(), OtherService]]}]);

      expect(injector.get(MyService).value).toBe(null);
    });

    it('should support Optional flag in deps without instantiating it', () => {
      const injector = Injector.create([{provide: MyService, deps: [[Optional, OtherService]]}]);

      expect(injector.get(MyService).value).toBe(null);
    });
  });
});


text:
package com.andersonescott.objects;

import com.badlogic.gdx.graphics.Texture;

public abstract class Entity {

    protected double[] coords = new double[2];
    protected double[] velocity = new double[2];
    protected double[] acceleration = new double[2];

    protected Texture image;

    public Entity (double[] tempCoords){
        coords = tempCoords;
    }

    public void update(float delta){
        velocity[0] = velocity[0]+(acceleration[0]*delta);
        velocity[1] = velocity[1]+(acceleration[1]*delta);

        coords[0] += velocity[0]*delta;
        coords[1] += velocity[1]*delta;
    }

    public double x() {
        return coords[0];
    }

    public double y(){
        return coords[1];
    }

    public void setCoords(double[] coords) {
        this.coords = coords;
    }

    public double[] getVelocity() {
        return velocity;
    }

    public void setVelocity(double[] velocity) {
        this.velocity = velocity;
    }

    public double[] getAcceleration() {
        return acceleration;
    }

    public void setAcceleration(double[] accel) {
        acceleration = accel;
    }

    public Texture getImage(){
        return image;
    }
}


text:
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';

// RxJS
import 'rxjs';

// Other vendors for example jQuery, Lodash or Bootstrap
// You can import js, ts, css, sass, ...
// css files
import 'bootstrap/dist/css/bootstrap.min.css';
import 'eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css';
// js files
import * as $ from 'jquery';
window['jQuery'] = window['$'] = $;
import 'bootstrap/dist/js/bootstrap.min.js';
import 'eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js';
import * as moment from 'moment';