text:
package org.appenders.log4j2.elasticsearch;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.netty.buffer.ByteBuf;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.config.ConfigurationException;
import org.appenders.core.logging.Logger;
import org.appenders.log4j2.elasticsearch.metrics.BasicMetricOutputsRegistry;
import org.appenders.log4j2.elasticsearch.metrics.BasicMetricsRegistry;
import org.appenders.log4j2.elasticsearch.metrics.Metric;
import org.appenders.log4j2.elasticsearch.metrics.MetricConfigFactory;
import org.appenders.log4j2.elasticsearch.metrics.MetricOutput;
import org.appenders.log4j2.elasticsearch.metrics.MetricOutputTest;
import org.appenders.log4j2.elasticsearch.metrics.MetricsProcessor;
import org.appenders.log4j2.elasticsearch.metrics.MetricsRegistry;
import org.appenders.log4j2.elasticsearch.metrics.TestKeyAccessor;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;

import java.util.Collections;
import java.util.UUID;

import static org.appenders.core.logging.InternalLogging.setLogger;
import static org.appenders.core.logging.InternalLoggingTest.mockTestLogger;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

public class ByteBufItemSourceFactoryPluginTest {

    static {
        System.setProperty("io.netty.allocator.maxOrder", "2");
        System.setProperty("log4j2.disable.jmx", "true");
        System.setProperty("log4j2.configurationFactory", "org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory");
    }

    private static final int DEFAULT_TEST_POOL_SIZE = 10;
    private static final int DEFAULT_TEST_ITEM_SIZE_IN_BYTES = 512;

    public static ByteBufItemSourceFactoryPlugin.Builder createDefaultTestSourceFactoryConfig() {
        return ByteBufItemSourceFactoryPlugin.newBuilder()
                .withInitialPoolSize(DEFAULT_TEST_POOL_SIZE)
                .withItemSizeInBytes(DEFAULT_TEST_ITEM_SIZE_IN_BYTES)
                .withMaxItemSizeInBytes(DEFAULT_TEST_ITEM_SIZE_IN_BYTES);
    }

    @Test
    public void builderBuildsSuccessfully() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig();

        // when
        final PooledItemSourceFactory<Object, ByteBuf> factory = builder.build();

        // then
        assertNotNull(factory);

    }

    @Test
    public void builderThrowsOnInitialPoolSizeZero() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withInitialPoolSize(0);

        // when
        final ConfigurationException exception = assertThrows(ConfigurationException.class, builder::build);

        // then
        assertThat(exception.getMessage(), containsString("initialPoolSize must be higher than 0"));

    }

    @Test
    public void builderThrowsOnInitialPoolSizeLessThanZero() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withInitialPoolSize(-1);

        // when
        final ConfigurationException exception = assertThrows(ConfigurationException.class, builder::build);

        // then
        assertThat(exception.getMessage(), containsString("initialPoolSize must be higher than 0"));

    }

    @Test
    public void builderThrowsOnItemSizeInBytesZero() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withItemSizeInBytes(0);

        // when
        final ConfigurationException exception = assertThrows(ConfigurationException.class, builder::build);

        // then
        assertThat(exception.getMessage(), containsString("itemSizeInBytes must be higher than 0"));

    }

    @Test
    public void builderThrowsOnItemSizeInBytesLessThanZero() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withItemSizeInBytes(-1);

        // when
        final ConfigurationException exception = assertThrows(ConfigurationException.class, builder::build);

        // then
        assertThat(exception.getMessage(), containsString("itemSizeInBytes must be higher than 0"));

    }

    @Test
    public void builderThrowsOnMaxItemSizeInBytesZero() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withMaxItemSizeInBytes(0);

        // when
        final ConfigurationException exception = assertThrows(ConfigurationException.class, builder::build);

        // then
        assertThat(exception.getMessage(), containsString("maxItemSizeInBytes must be higher than 0"));

    }

    @Test
    public void builderThrowsOnMaxItemSizeInBytesLessThanZero() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withMaxItemSizeInBytes(-1);

        // when
        final ConfigurationException exception = assertThrows(ConfigurationException.class, builder::build);

        // then
        assertThat(exception.getMessage(), containsString("maxItemSizeInBytes must be higher than 0"));

    }

    @Test
    public void builderThrowsOnMaxItemSizeInBytesLowerThanItemSizeInBytes() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withMaxItemSizeInBytes(1)
                .withItemSizeInBytes(2);

        // when
        final ConfigurationException exception = assertThrows(ConfigurationException.class, builder::build);

        // then
        assertThat(exception.getMessage(), containsString("maxItemSizeInBytes must be higher than or equal to itemSizeInBytes"));

    }

    @Test
    public void throwsWhenCreateCantGetPooledElement() throws PoolResourceException {
        // given
        final ItemSourcePool<ByteBuf> mockedPool = mock(ItemSourcePool.class);

        final String expectedMessage = UUID.randomUUID().toString();
        when(mockedPool.getPooled()).thenThrow(new PoolResourceException(expectedMessage));

        final PooledItemSourceFactory<Object, ByteBuf> pooledItemSourceFactory = new PooledItemSourceFactory<>(mockedPool);

        final IllegalStateException exception = assertThrows(IllegalStateException.class,
                () -> pooledItemSourceFactory.create(mock(LogEvent.class), new ObjectMapper().writerFor(LogEvent.class)));

        // when
        assertThat(exception.getMessage(), containsString(expectedMessage));

    }

    @Test
    public void throwsWhenCreateEmptySourceCantGetPooledElement() throws PoolResourceException {

        // given
        final ItemSourcePool<ByteBuf> mockedPool = mock(ItemSourcePool.class);

        final String expectedMessage = UUID.randomUUID().toString();
        when(mockedPool.getPooled()).thenThrow(new PoolResourceException(expectedMessage));

        final ByteBufItemSourceFactoryPlugin pooledItemSourceFactory = new ByteBufItemSourceFactoryPlugin(mockedPool);

        // when
        final IllegalStateException exception = assertThrows(IllegalStateException.class, pooledItemSourceFactory::createEmptySource);

        // when
        assertThat(exception.getMessage(), containsString(expectedMessage));

    }
    @Test
    public void throwsWhenResizeIsIneffective() {

        // given
        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withResizePolicy(new ResizePolicy() {
                    @Override
                    public boolean increase(ItemSourcePool itemSourcePool) {
                        return true;
                    }

                    @Override
                    public boolean decrease(ItemSourcePool itemSourcePool) {
                        return false;
                    }
                })
                .withResizeTimeout(0);

        final PooledItemSourceFactory<Object, ByteBuf> itemSourceFactory = builder.build();

        // when
        IllegalStateException exception = assertThrows(IllegalStateException.class, itemSourceFactory::createEmptySource);

        // then
        assertThat(exception.getMessage(), containsString("ResizePolicy is ineffective"));

    }

    @Test
    public void printsPoolMetricsIfConfigured() {

        // given
        final Logger logger = mockTestLogger();

        System.setProperty("appenders." + GenericItemSourcePool.class.getSimpleName() + ".metrics.start.delay", "0");

        final String expectedPoolName = UUID.randomUUID().toString();

        final ByteBufItemSourceFactoryPlugin.Builder builder = createDefaultTestSourceFactoryConfig()
                .withPoolName(expectedPoolName)
                .withMonitored(true)
                .withMonitorTaskInterval(100);

        final PooledItemSourceFactory<Object, ByteBuf> itemSourceFactory = builder.build();

        // when
        itemSourceFactory.start();

        // then
        final ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
        verify(logger, timeout(500).atLeastOnce()).info(captor.capture());

        assertThat(captor.getValue(), containsString(expectedPoolName));

        itemSourceFactory.stop();
        setLogger(null);

    }

    // =======
    // METRICS
    // =======

    @Test
    public void registersAllMetricsWithMetricsRegistry() {

        // given
        final String expectedComponentName = UUID.randomUUID().toString();
        final Metric.Key expectedKey1 = new Metric.Key(expectedComponentName, "available", "count");
        final Metric.Key expectedKey2 = new Metric.Key(expectedComponentName, "initial", "count");
        final Metric.Key expectedKey3 = new Metric.Key(expectedComponentName, "total", "count");
        final Metric.Key expectedKey4 = new Metric.Key(expectedComponentName, "noSuchElementCaught", "count");
        final Metric.Key expectedKey5 = new Metric.Key(expectedComponentName, "resizeAttempts", "count");

        final ByteBufItemSourceFactoryPlugin itemSourceFactory = createDefaultTestSourceFactoryConfig()
                .withPoolName(expectedComponentName)
                .withMetricConfigs(GenericItemSourcePool.metricConfigs(false))
                .build();

        final MetricsRegistry registry = new BasicMetricsRegistry();
        final MetricOutput metricOutput = spy(MetricOutputTest.dummy());
        when(metricOutput.accepts(any())).thenReturn(true);

        // when
        itemSourceFactory.register(registry);

        // then
        assertEquals(5, registry.getMetrics(metric -> TestKeyAccessor.getMetricType(metric.getKey()).equals("noop")).size());
        assertEquals(1, registry.getMetrics(metric -> metric.getKey().equals(expectedKey1)).size());
        assertEquals(1, registry.getMetrics(metric -> metric.getKey().equals(expectedKey2)).size());
        assertEquals(1, registry.getMetrics(metric -> metric.getKey().equals(expectedKey3)).size());
        assertEquals(1, registry.getMetrics(metric -> metric.getKey().equals(expectedKey4)).size());
        assertEquals(1, registry.getMetrics(metric -> metric.getKey().equals(expectedKey5)).size());

    }

    @Test
    public void deregistersAllMetricsWithMetricsRegistry() {

        // given
        final String expectedComponentName = UUID.randomUUID().toString();
        final ByteBufItemSourceFactoryPlugin itemSourceFactory = createDefaultTestSourceFactoryConfig()
                .withPoolName(expectedComponentName)
                .withMetricConfigs(GenericItemSourcePool.metricConfigs(true))
                .build();

        final MetricsRegistry registry = new BasicMetricsRegistry();
        final MetricOutput metricOutput = spy(MetricOutputTest.dummy());
        when(metricOutput.accepts(any())).thenReturn(true);

        itemSourceFactory.register(registry);
        assertEquals(5, registry.getMetrics(metric -> !TestKeyAccessor.getMetricType(metric.getKey()).equals("noop")).size());

        // when
        itemSourceFactory.deregister();

        // then
        assertEquals(0, registry.getMetrics(metric -> true).size());

    }

    @Test
    public void enablesAllMetricsWithMetricsRegistry() {

        // given
        final String expectedComponentName = UUID.randomUUID().toString();
        final Metric.Key expectedKey1 = new Metric.Key(expectedComponentName, "available", "count");
        final Metric.Key expectedKey2 = new Metric.Key(expectedComponentName, "initial", "count");
        final Metric.Key expectedKey3 = new Metric.Key(expectedComponentName, "total", "count");
        final Metric.Key expectedKey4 = new Metric.Key(expectedComponentName, "noSuchElementCaught", "count");
        final Metric.Key expectedKey5 = new Metric.Key(expectedComponentName, "resizeAttempts", "count");

        final ByteBufItemSourceFactoryPlugin itemSourceFactory = createDefaultTestSourceFactoryConfig()
                .withPoolName(expectedComponentName)
                .withMetricConfigs(GenericItemSourcePool.metricConfigs(true))
                .build();

        final MetricsRegistry registry = new BasicMetricsRegistry();
        final MetricOutput metricOutput = spy(MetricOutputTest.dummy());
        when(metricOutput.accepts(any())).thenReturn(true);

        final MetricsProcessor metricProcessor = new MetricsProcessor(registry, new BasicMetricOutputsRegistry(metricOutput));

        // when
        itemSourceFactory.start();
        itemSourceFactory.register(registry);
        metricProcessor.process();

        // then
        verify(metricOutput).write(anyLong(), eq(expectedKey1), eq(10L));
        verify(metricOutput).write(anyLong(), eq(expectedKey2), eq(10L));
        verify(metricOutput).write(anyLong(), eq(expectedKey3), eq(10L));
        verify(metricOutput).write(anyLong(), eq(expectedKey4), eq(0L));
        verify(metricOutput).write(anyLong(), eq(expectedKey5), eq(0L));

    }

    @Test
    public void enablesSubSetIfMetricsWithMetricsRegistry() {

        // given
        final String expectedComponentName = UUID.randomUUID().toString();
        final Metric.Key expectedKey1 = new Metric.Key(expectedComponentName, "available", "count");
        final Metric.Key expectedKey2 = new Metric.Key(expectedComponentName, "initial", "count");
        final Metric.Key expectedKey3 = new Metric.Key(expectedComponentName, "total", "count");
        final Metric.Key expectedKey4 = new Metric.Key(expectedComponentName, "noSuchElementCaught", "count");
        final Metric.Key expectedKey5 = new Metric.Key(expectedComponentName, "resizeAttempts", "count");

        final ByteBufItemSourceFactoryPlugin itemSourceFactory = createDefaultTestSourceFactoryConfig()
                .withPoolName(expectedComponentName)
                .withMetricConfigs(GenericItemSourcePool.metricConfigs(true))
                .withMetricConfigs(Collections.singletonList(MetricConfigFactory.createMaxConfig(false, "resizeAttempts", false)))
                .build();

        final MetricsRegistry registry = new BasicMetricsRegistry();
        final MetricOutput metricOutput = spy(MetricOutputTest.dummy());
        when(metricOutput.accepts(any())).thenReturn(true);

        final MetricsProcessor metricProcessor = new MetricsProcessor(registry, new BasicMetricOutputsRegistry(metricOutput));

        // when
        itemSourceFactory.start();
        itemSourceFactory.register(registry);
        metricProcessor.process();

        // then
        verify(metricOutput).write(anyLong(), eq(expectedKey1), eq(10L));
        verify(metricOutput).write(anyLong(), eq(expectedKey2), eq(10L));
        verify(metricOutput).write(anyLong(), eq(expectedKey3), eq(10L));
        verify(metricOutput).write(anyLong(), eq(expectedKey4), eq(0L));
        verify(metricOutput, never()).write(anyLong(), eq(expectedKey5), eq(0L));

    }

    // =========
    // LIFECYCLE
    // =========

    @Test
    public void lifecycleStart() {

        // given
        final LifeCycle lifeCycle = createLifeCycleTestObject();

        assertTrue(lifeCycle.isStopped());

        // when
        lifeCycle.start();

        // then
        assertFalse(lifeCycle.isStopped());
        assertTrue(lifeCycle.isStarted());

    }

    @Test
    public void lifecycleStop() {

        // given
        LifeCycle lifeCycle = createLifeCycleTestObject();

        assertTrue(lifeCycle.isStopped());

        lifeCycle.start();
        assertTrue(lifeCycle.isStarted());

        // when
        lifeCycle.stop();

        // then
        assertFalse(lifeCycle.isStarted());
        assertTrue(lifeCycle.isStopped());

    }

    private LifeCycle createLifeCycleTestObject() {
        return createDefaultTestSourceFactoryConfig().build();
    }

}


text:
package com.example.asdteachingtool;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.example.asdteachingtool.models.Question;

public class SelectGameActivity extends Activity {

	private static Context initialContext;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_select_game);
		initialContext = this;
	}

	@Override
	protected void onResume() {
		super.onResume();

		Integer visibility = null;
		if (Question.published().isEmpty()) {
			visibility = View.GONE;
		} else {
			visibility = View.VISIBLE;
		}
		findViewById(R.id.startQuestions).setVisibility(visibility);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.select_game, menu);
		return true;
	}

	public void startQuestionsMenu(View v) {
		Intent intent = new Intent(this, QuestionActivity.class);
		intent.putExtra(QuestionActivity.EXTRA_QUESTIONS_IDS,
				Question.publishedIds());
		intent.putExtra(QuestionActivity.EXTRA_QUESTION_ID_INDEX, 0);
		startActivity(intent);
	}

	public void startPecsMenu(View v) {
		startActivity(new Intent(this, PecsActivity.class));
	}

	public void startConfigMenu(View v) {
		startActivity(new Intent(this, ConfigActivity.class));
	}

	public static Context getContext() {
		return initialContext;
	}
}

redpajama_set_name: RedPajamaGithub


text:
package flags

import (
	"context"
	"fmt"
	"strings"

	"github.com/spf13/cobra"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"knative.dev/pkg/apis"
	duckv1 "knative.dev/pkg/apis/duck/v1"

	clientdynamic "knative.dev/client-pkg/pkg/dynamic"
	"knative.dev/client-pkg/pkg/kn/config"
)

type SinkFlags struct {
	sink string
}

// AddWithFlagName configures sink flag with given flag name and a short flag name
// pass empty short flag name if you dont want to set one
func (i *SinkFlags) AddWithFlagName(cmd *cobra.Command, fname, short string) {
	flag := "--" + fname
	if short == "" {
		cmd.Flags().StringVar(&i.sink, fname, "", "")
	} else {
		cmd.Flags().StringVarP(&i.sink, fname, short, "", "")
	}
	cmd.Flag(fname).Usage = "Addressable sink for events. " +
		"You can specify a broker, channel, Knative service or URI. " +
		"Examples: '" + flag + " broker:nest' for a broker 'nest', " +
		"'" + flag + " channel:pipe' for a channel 'pipe', " +
		"'" + flag + " ksvc:mysvc:mynamespace' for a Knative service 'mysvc' in another namespace 'mynamespace', " +
		"'" + flag + " https://event.receiver.uri' for an URI with an 'http://' or 'https://' schema, " +
		"'" + flag + " ksvc:receiver' or simply '" + flag + " receiver' for a Knative service 'receiver' in the current namespace. " +
		"If a prefix is not provided, it is considered as a Knative service in the current namespace. " +
		"If referring to a Knative service in another namespace, 'ksvc:name:namespace' combination must be provided explicitly."

	for _, p := range config.GlobalConfig.SinkMappings() {
		//user configuration might override the default configuration
		sinkMappings[p.Prefix] = schema.GroupVersionResource{
			Resource: p.Resource,
			Group:    p.Group,
			Version:  p.Version,
		}
	}
}

// Add configures sink flag with name 'sink' amd short name 's'
func (i *SinkFlags) Add(cmd *cobra.Command) {
	i.AddWithFlagName(cmd, "sink", "s")
}

// sinkPrefixes maps prefixes used for sinks to their GroupVersionResources.
var sinkMappings = map[string]schema.GroupVersionResource{
	"broker": {
		Resource: "brokers",
		Group:    "eventing.knative.dev",
		Version:  "v1",
	},
	// Shorthand alias for service
	"ksvc": {
		Resource: "services",
		Group:    "serving.knative.dev",
		Version:  "v1",
	},
	"channel": {
		Resource: "channels",
		Group:    "messaging.knative.dev",
		Version:  "v1",
	},
}

// ResolveSink returns the Destination referred to by the flags in the acceptor.
// It validates that any object the user is referring to exists.
func (i *SinkFlags) ResolveSink(ctx context.Context, knclient clientdynamic.KnDynamicClient, namespace string) (*duckv1.Destination, error) {
	client := knclient.RawClient()
	if i.sink == "" {
		return nil, nil
	}
	prefix, name, ns := parseSink(i.sink)
	if prefix == "" {
		// URI target
		uri, err := apis.ParseURL(name)
		if err != nil {
			return nil, err
		}
		return &duckv1.Destination{URI: uri}, nil
	}
	typ, ok := sinkMappings[prefix]
	if !ok {
		if prefix == "svc" || prefix == "service" {
			return nil, fmt.Errorf("unsupported sink prefix: '%s', please use prefix 'ksvc' for knative service", prefix)
		}
		idx := strings.LastIndex(prefix, "/")
		var groupVersion string
		var kind string
		if idx != -1 && idx < len(prefix)-1 {
			groupVersion, kind = prefix[:idx], prefix[idx+1:]
		} else {
			kind = prefix
		}
		parsedVersion, _ := schema.ParseGroupVersion(groupVersion)

		if !strings.HasSuffix(kind, "s") {
			kind = kind + "s"
		}
		typ = schema.GroupVersionResource{
			Group:    parsedVersion.Group,
			Version:  parsedVersion.Version,
			Resource: kind,
		}
	}
	if ns != "" {
		namespace = ns
	}
	obj, err := client.Resource(typ).Namespace(namespace).Get(ctx, name, metav1.GetOptions{})
	if err != nil {
		return nil, err
	}

	destination := &duckv1.Destination{
		Ref: &duckv1.KReference{
			Kind:       obj.GetKind(),
			APIVersion: obj.GetAPIVersion(),
			Name:       obj.GetName(),
			Namespace:  namespace,
		},
	}
	return destination, nil
}

// parseSink takes the string given by the user into the prefix, name and namespace of
// the object. If the user put a URI instead, the prefix is empty and the name
// is the whole URI.
func parseSink(sink string) (string, string, string) {
	parts := strings.SplitN(sink, ":", 3)
	switch {
	case len(parts) == 1:
		return "ksvc", parts[0], ""
	case parts[0] == "http" || parts[0] == "https":
		return "", sink, ""
	case len(parts) == 3:
		return parts[0], parts[1], parts[2]
	default:
		return parts[0], parts[1], ""
	}
}

// SinkToString prepares a sink for list output
func SinkToString(sink duckv1.Destination) string {
	if sink.Ref != nil {
		if sink.Ref.Kind == "Service" && strings.HasPrefix(sink.Ref.APIVersion, sinkMappings["ksvc"].Group) {
			return fmt.Sprintf("ksvc:%s", sink.Ref.Name)
		} else {
			return fmt.Sprintf("%s:%s", strings.ToLower(sink.Ref.Kind), sink.Ref.Name)
		}
	}
	if sink.URI != nil {
		return sink.URI.String()
	}
	return ""
}


text:
Well sometime you do a mistake and it end up in something nice

![Oups](../project_images/erreur1.png?raw=true "Mistake")


text:
<?xml version="1.0" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sbol="http://sbols.org/v2#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:prov="http://www.w3.org/ns/prov#">
  <sbol:ModuleDefinition rdf:about="http://sbolstandard.org/example/toggle_switch">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/toggle_switch"/>
    <sbol:displayId>toggle_switch</sbol:displayId>
    <sbol:role rdf:resource="http://sbolstandard.org/example/module_role/toggle_switch"/>
  </sbol:ModuleDefinition>
  <sbol:ModuleDefinition rdf:about="http://sbolstandard.org/example/tetr_inverter">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/tetr_inverter"/>
    <sbol:displayId>tetr_inverter</sbol:displayId>
    <sbol:role rdf:resource="http://parts.igem.org/cgi/partsdb/pgroup.cgi?pgroup=inverter"/>
    <sbol:interaction>
      <sbol:Interaction rdf:about="http://sbolstandard.org/example/tetr_inverter/LacI_pLacI">
        <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/tetr_inverter/LacI_pLacI"/>
        <sbol:displayId>LacI_pLacI</sbol:displayId>
        <sbol:type rdf:resource="http://identifiers.org/biomodels.sbo/SBO:0000169"/>
      </sbol:Interaction>
    </sbol:interaction>
  </sbol:ModuleDefinition>
  <sbol:ModuleDefinition rdf:about="http://sbolstandard.org/example/laci_inverter">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/laci_inverter"/>
    <sbol:displayId>laci_inverter</sbol:displayId>
    <sbol:role rdf:resource="http://parts.igem.org/cgi/partsdb/pgroup.cgi?pgroup=inverter"/>
    <sbol:interaction>
      <sbol:Interaction rdf:about="http://sbolstandard.org/example/laci_inverter/LacI_pLacI">
        <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/laci_inverter/LacI_pLacI"/>
        <sbol:displayId>LacI_pLacI</sbol:displayId>
        <sbol:type rdf:resource="http://identifiers.org/biomodels.sbo/SBO:0000169"/>
      </sbol:Interaction>
    </sbol:interaction>
  </sbol:ModuleDefinition>
    <sbol:ModuleDefinition rdf:about="http://sbolstandard.org/example/toggle_switch2">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/toggle_switch2"/>
    <sbol:displayId>toggle_switch2</sbol:displayId>
    <sbol:role rdf:resource="http://sbolstandard.org/example/module_role/toggle_switch2"/>
    <sbol:module>
      <sbol:Module rdf:about="http://sbolstandard.org/example/toggle_switch2/laci_inverter_module">
        <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/toggle_switch2/laci_inverter_module"/>
        <sbol:displayId>laci_inverter_module</sbol:displayId>
        <sbol:definition rdf:resource="http://sbolstandard.org/example/laci_inverter_module"/>
      </sbol:Module>
    </sbol:module>
    <sbol:module>
      <sbol:Module rdf:about="http://sbolstandard.org/example/toggle_switch2/tetr_inverter">
        <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/example/toggle_switch2/tetr_inverter"/>
        <sbol:displayId>tetr_inverter</sbol:displayId>
        <sbol:definition rdf:resource="http://sbolstandard.org/example/tetr_inverter"/>
      </sbol:Module>
    </sbol:module>
  </sbol:ModuleDefinition>
</rdf:RDF>


text:
@interface GeolocationHandler(Test) <CLLocationManagerDelegate>

/// Overrides the CLLocationManager instance used by the GeolocationHandler.
/// This should only be used for testing purposes.
- (void)setLocationManagerOverride:(CLLocationManager *)locationManager;

@end


text:
package v1

import (
	api_v1 "k8s.io/kubernetes/pkg/api/v1"
	conversion "k8s.io/kubernetes/pkg/conversion"
	runtime "k8s.io/kubernetes/pkg/runtime"
	reflect "reflect"
)

func init() {
	SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
	return scheme.AddGeneratedDeepCopyFuncs(
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Action, InType: reflect.TypeOf(&Action{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterPolicy, InType: reflect.TypeOf(&ClusterPolicy{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterPolicyBinding, InType: reflect.TypeOf(&ClusterPolicyBinding{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterPolicyBindingList, InType: reflect.TypeOf(&ClusterPolicyBindingList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterPolicyList, InType: reflect.TypeOf(&ClusterPolicyList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_IsPersonalSubjectAccessReview, InType: reflect.TypeOf(&IsPersonalSubjectAccessReview{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalResourceAccessReview, InType: reflect.TypeOf(&LocalResourceAccessReview{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamedClusterRole, InType: reflect.TypeOf(&NamedClusterRole{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamedClusterRoleBinding, InType: reflect.TypeOf(&NamedClusterRoleBinding{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamedRole, InType: reflect.TypeOf(&NamedRole{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamedRoleBinding, InType: reflect.TypeOf(&NamedRoleBinding{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Policy, InType: reflect.TypeOf(&Policy{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PolicyBinding, InType: reflect.TypeOf(&PolicyBinding{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PolicyBindingList, InType: reflect.TypeOf(&PolicyBindingList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PolicyList, InType: reflect.TypeOf(&PolicyList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceAccessReview, InType: reflect.TypeOf(&ResourceAccessReview{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceAccessReviewResponse, InType: reflect.TypeOf(&ResourceAccessReviewResponse{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Role, InType: reflect.TypeOf(&Role{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RoleList, InType: reflect.TypeOf(&RoleList{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectRulesReview, InType: reflect.TypeOf(&SelfSubjectRulesReview{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectRulesReviewSpec, InType: reflect.TypeOf(&SelfSubjectRulesReviewSpec{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReviewResponse, InType: reflect.TypeOf(&SubjectAccessReviewResponse{})},
		conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectRulesReviewStatus, InType: reflect.TypeOf(&SubjectRulesReviewStatus{})},
	)
}

func DeepCopy_v1_Action(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*Action)
		out := out.(*Action)
		out.Namespace = in.Namespace
		out.Verb = in.Verb
		out.Group = in.Group
		out.Version = in.Version
		out.Resource = in.Resource
		out.ResourceName = in.ResourceName
		if err := runtime.DeepCopy_runtime_RawExtension(&in.Content, &out.Content, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_ClusterPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterPolicy)
		out := out.(*ClusterPolicy)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.LastModified = in.LastModified.DeepCopy()
		if in.Roles != nil {
			in, out := &in.Roles, &out.Roles
			*out = make(NamedClusterRoles, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_NamedClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Roles = nil
		}
		return nil
	}
}

func DeepCopy_v1_ClusterPolicyBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterPolicyBinding)
		out := out.(*ClusterPolicyBinding)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.LastModified = in.LastModified.DeepCopy()
		out.PolicyRef = in.PolicyRef
		if in.RoleBindings != nil {
			in, out := &in.RoleBindings, &out.RoleBindings
			*out = make(NamedClusterRoleBindings, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_NamedClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.RoleBindings = nil
		}
		return nil
	}
}

func DeepCopy_v1_ClusterPolicyBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterPolicyBindingList)
		out := out.(*ClusterPolicyBindingList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]ClusterPolicyBinding, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_ClusterPolicyBinding(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_ClusterPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterPolicyList)
		out := out.(*ClusterPolicyList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]ClusterPolicy, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_ClusterPolicy(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterRole)
		out := out.(*ClusterRole)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.Rules != nil {
			in, out := &in.Rules, &out.Rules
			*out = make([]PolicyRule, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Rules = nil
		}
		return nil
	}
}

func DeepCopy_v1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterRoleBinding)
		out := out.(*ClusterRoleBinding)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.UserNames != nil {
			in, out := &in.UserNames, &out.UserNames
			*out = make(OptionalNames, len(*in))
			copy(*out, *in)
		} else {
			out.UserNames = nil
		}
		if in.GroupNames != nil {
			in, out := &in.GroupNames, &out.GroupNames
			*out = make(OptionalNames, len(*in))
			copy(*out, *in)
		} else {
			out.GroupNames = nil
		}
		if in.Subjects != nil {
			in, out := &in.Subjects, &out.Subjects
			*out = make([]api_v1.ObjectReference, len(*in))
			for i := range *in {
				(*out)[i] = (*in)[i]
			}
		} else {
			out.Subjects = nil
		}
		out.RoleRef = in.RoleRef
		return nil
	}
}

func DeepCopy_v1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterRoleBindingList)
		out := out.(*ClusterRoleBindingList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]ClusterRoleBinding, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ClusterRoleList)
		out := out.(*ClusterRoleList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]ClusterRole, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_IsPersonalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*IsPersonalSubjectAccessReview)
		out := out.(*IsPersonalSubjectAccessReview)
		out.TypeMeta = in.TypeMeta
		return nil
	}
}

func DeepCopy_v1_LocalResourceAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*LocalResourceAccessReview)
		out := out.(*LocalResourceAccessReview)
		out.TypeMeta = in.TypeMeta
		if err := DeepCopy_v1_Action(&in.Action, &out.Action, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*LocalSubjectAccessReview)
		out := out.(*LocalSubjectAccessReview)
		out.TypeMeta = in.TypeMeta
		if err := DeepCopy_v1_Action(&in.Action, &out.Action, c); err != nil {
			return err
		}
		out.User = in.User
		if in.GroupsSlice != nil {
			in, out := &in.GroupsSlice, &out.GroupsSlice
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.GroupsSlice = nil
		}
		if in.Scopes != nil {
			in, out := &in.Scopes, &out.Scopes
			*out = make(OptionalScopes, len(*in))
			copy(*out, *in)
		} else {
			out.Scopes = nil
		}
		return nil
	}
}

func DeepCopy_v1_NamedClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*NamedClusterRole)
		out := out.(*NamedClusterRole)
		out.Name = in.Name
		if err := DeepCopy_v1_ClusterRole(&in.Role, &out.Role, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_NamedClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*NamedClusterRoleBinding)
		out := out.(*NamedClusterRoleBinding)
		out.Name = in.Name
		if err := DeepCopy_v1_ClusterRoleBinding(&in.RoleBinding, &out.RoleBinding, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_NamedRole(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*NamedRole)
		out := out.(*NamedRole)
		out.Name = in.Name
		if err := DeepCopy_v1_Role(&in.Role, &out.Role, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_NamedRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*NamedRoleBinding)
		out := out.(*NamedRoleBinding)
		out.Name = in.Name
		if err := DeepCopy_v1_RoleBinding(&in.RoleBinding, &out.RoleBinding, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_Policy(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*Policy)
		out := out.(*Policy)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.LastModified = in.LastModified.DeepCopy()
		if in.Roles != nil {
			in, out := &in.Roles, &out.Roles
			*out = make(NamedRoles, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_NamedRole(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Roles = nil
		}
		return nil
	}
}

func DeepCopy_v1_PolicyBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PolicyBinding)
		out := out.(*PolicyBinding)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		out.LastModified = in.LastModified.DeepCopy()
		out.PolicyRef = in.PolicyRef
		if in.RoleBindings != nil {
			in, out := &in.RoleBindings, &out.RoleBindings
			*out = make(NamedRoleBindings, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_NamedRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.RoleBindings = nil
		}
		return nil
	}
}

func DeepCopy_v1_PolicyBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PolicyBindingList)
		out := out.(*PolicyBindingList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]PolicyBinding, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_PolicyBinding(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_PolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PolicyList)
		out := out.(*PolicyList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]Policy, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_Policy(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*PolicyRule)
		out := out.(*PolicyRule)
		if in.Verbs != nil {
			in, out := &in.Verbs, &out.Verbs
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Verbs = nil
		}
		if err := runtime.DeepCopy_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, c); err != nil {
			return err
		}
		if in.APIGroups != nil {
			in, out := &in.APIGroups, &out.APIGroups
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.APIGroups = nil
		}
		if in.Resources != nil {
			in, out := &in.Resources, &out.Resources
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.Resources = nil
		}
		if in.ResourceNames != nil {
			in, out := &in.ResourceNames, &out.ResourceNames
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.ResourceNames = nil
		}
		if in.NonResourceURLsSlice != nil {
			in, out := &in.NonResourceURLsSlice, &out.NonResourceURLsSlice
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.NonResourceURLsSlice = nil
		}
		return nil
	}
}

func DeepCopy_v1_ResourceAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ResourceAccessReview)
		out := out.(*ResourceAccessReview)
		out.TypeMeta = in.TypeMeta
		if err := DeepCopy_v1_Action(&in.Action, &out.Action, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_ResourceAccessReviewResponse(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*ResourceAccessReviewResponse)
		out := out.(*ResourceAccessReviewResponse)
		out.TypeMeta = in.TypeMeta
		out.Namespace = in.Namespace
		if in.UsersSlice != nil {
			in, out := &in.UsersSlice, &out.UsersSlice
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.UsersSlice = nil
		}
		if in.GroupsSlice != nil {
			in, out := &in.GroupsSlice, &out.GroupsSlice
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.GroupsSlice = nil
		}
		out.EvaluationError = in.EvaluationError
		return nil
	}
}

func DeepCopy_v1_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*Role)
		out := out.(*Role)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.Rules != nil {
			in, out := &in.Rules, &out.Rules
			*out = make([]PolicyRule, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Rules = nil
		}
		return nil
	}
}

func DeepCopy_v1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*RoleBinding)
		out := out.(*RoleBinding)
		out.TypeMeta = in.TypeMeta
		if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil {
			return err
		}
		if in.UserNames != nil {
			in, out := &in.UserNames, &out.UserNames
			*out = make(OptionalNames, len(*in))
			copy(*out, *in)
		} else {
			out.UserNames = nil
		}
		if in.GroupNames != nil {
			in, out := &in.GroupNames, &out.GroupNames
			*out = make(OptionalNames, len(*in))
			copy(*out, *in)
		} else {
			out.GroupNames = nil
		}
		if in.Subjects != nil {
			in, out := &in.Subjects, &out.Subjects
			*out = make([]api_v1.ObjectReference, len(*in))
			for i := range *in {
				(*out)[i] = (*in)[i]
			}
		} else {
			out.Subjects = nil
		}
		out.RoleRef = in.RoleRef
		return nil
	}
}

func DeepCopy_v1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*RoleBindingList)
		out := out.(*RoleBindingList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]RoleBinding, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*RoleList)
		out := out.(*RoleList)
		out.TypeMeta = in.TypeMeta
		out.ListMeta = in.ListMeta
		if in.Items != nil {
			in, out := &in.Items, &out.Items
			*out = make([]Role, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_Role(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Items = nil
		}
		return nil
	}
}

func DeepCopy_v1_SelfSubjectRulesReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*SelfSubjectRulesReview)
		out := out.(*SelfSubjectRulesReview)
		out.TypeMeta = in.TypeMeta
		if err := DeepCopy_v1_SelfSubjectRulesReviewSpec(&in.Spec, &out.Spec, c); err != nil {
			return err
		}
		if err := DeepCopy_v1_SubjectRulesReviewStatus(&in.Status, &out.Status, c); err != nil {
			return err
		}
		return nil
	}
}

func DeepCopy_v1_SelfSubjectRulesReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*SelfSubjectRulesReviewSpec)
		out := out.(*SelfSubjectRulesReviewSpec)
		if in.Scopes != nil {
			in, out := &in.Scopes, &out.Scopes
			*out = make(OptionalScopes, len(*in))
			copy(*out, *in)
		} else {
			out.Scopes = nil
		}
		return nil
	}
}

func DeepCopy_v1_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*SubjectAccessReview)
		out := out.(*SubjectAccessReview)
		out.TypeMeta = in.TypeMeta
		if err := DeepCopy_v1_Action(&in.Action, &out.Action, c); err != nil {
			return err
		}
		out.User = in.User
		if in.GroupsSlice != nil {
			in, out := &in.GroupsSlice, &out.GroupsSlice
			*out = make([]string, len(*in))
			copy(*out, *in)
		} else {
			out.GroupsSlice = nil
		}
		if in.Scopes != nil {
			in, out := &in.Scopes, &out.Scopes
			*out = make(OptionalScopes, len(*in))
			copy(*out, *in)
		} else {
			out.Scopes = nil
		}
		return nil
	}
}

func DeepCopy_v1_SubjectAccessReviewResponse(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*SubjectAccessReviewResponse)
		out := out.(*SubjectAccessReviewResponse)
		out.TypeMeta = in.TypeMeta
		out.Namespace = in.Namespace
		out.Allowed = in.Allowed
		out.Reason = in.Reason
		out.EvaluationError = in.EvaluationError
		return nil
	}
}

func DeepCopy_v1_SubjectRulesReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*SubjectRulesReviewStatus)
		out := out.(*SubjectRulesReviewStatus)
		if in.Rules != nil {
			in, out := &in.Rules, &out.Rules
			*out = make([]PolicyRule, len(*in))
			for i := range *in {
				if err := DeepCopy_v1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
					return err
				}
			}
		} else {
			out.Rules = nil
		}
		out.EvaluationError = in.EvaluationError
		return nil
	}
}


text:
layout: kanji
v4: 1041
v6: 1120
kanji: 弊
keyword: abuse
elements: abuse, shredder, small, little, belt, taskmaster, two hands
strokes: 15
image: E5BC8A
on-yomi: ヘイ
permalink: /rtk/弊/
prev: 蔽
next: 喚
---

1) [johnskb] 19-6-2006(97): You've heard of Edward Scissor hands? Well this is Medward Shredder Hands. Instead of nicely trimming your shrubs, he uses his TWO SHREDDER equipped HANDS to ABUSE your plants by shredding them into wood chips.

2) [inuki] 31-12-2006(58): Mafioso abusing someone to get information. They use a shredder on both of his hands.

3) [potempkin] 13-10-2008(50): Shredder is abusing Bebop and Rocksteady by bitch-slapping them with both his hands.

4) [tomusan] 18-3-2008(46): Shoving someone's hands into a shredder surely counts as abuse.

5) [herman] 24-11-2008(21): This really refers to abuse in terms of bad habits. The taskmaster puts your two hands in the shredder when he catches you picking your nose again. That'll fix your bad habits!


text:
@implementation ComGoogleCommonUtilConcurrentForwardingListeningExecutorService

J2OBJC_IGNORE_DESIGNATED_BEGIN
- (instancetype)init {
  ComGoogleCommonUtilConcurrentForwardingListeningExecutorService_init(self);
  return self;
}
J2OBJC_IGNORE_DESIGNATED_END

- (id<ComGoogleCommonUtilConcurrentListeningExecutorService>)delegate {
  // can't call an abstract method
  [self doesNotRecognizeSelector:_cmd];
  return 0;
}

- (id<ComGoogleCommonUtilConcurrentListenableFuture>)submitWithJavaUtilConcurrentCallable:(id<JavaUtilConcurrentCallable>)task {
  return [((id<ComGoogleCommonUtilConcurrentListeningExecutorService>) nil_chk([self delegate])) submitWithJavaUtilConcurrentCallable:task];
}

- (id<ComGoogleCommonUtilConcurrentListenableFuture>)submitWithJavaLangRunnable:(id<JavaLangRunnable>)task {
  return [((id<ComGoogleCommonUtilConcurrentListeningExecutorService>) nil_chk([self delegate])) submitWithJavaLangRunnable:task];
}

- (id<ComGoogleCommonUtilConcurrentListenableFuture>)submitWithJavaLangRunnable:(id<JavaLangRunnable>)task
                                                                         withId:(id)result {
  return [((id<ComGoogleCommonUtilConcurrentListeningExecutorService>) nil_chk([self delegate])) submitWithJavaLangRunnable:task withId:result];
}

+ (const J2ObjcClassInfo *)__metadata {
  static J2ObjcMethodInfo methods[] = {
    { NULL, NULL, 0x4, -1, -1, -1, -1, -1, -1 },
    { NULL, "LComGoogleCommonUtilConcurrentListeningExecutorService;", 0x404, -1, -1, -1, -1, -1, -1 },
    { NULL, "LComGoogleCommonUtilConcurrentListenableFuture;", 0x1, 0, 1, -1, 2, -1, -1 },
    { NULL, "LComGoogleCommonUtilConcurrentListenableFuture;", 0x1, 0, 3, -1, 4, -1, -1 },
    { NULL, "LComGoogleCommonUtilConcurrentListenableFuture;", 0x1, 0, 5, -1, 6, -1, -1 },
  };
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wobjc-multiple-method-names"
  methods[0].selector = @selector(init);
  methods[1].selector = @selector(delegate);
  methods[2].selector = @selector(submitWithJavaUtilConcurrentCallable:);
  methods[3].selector = @selector(submitWithJavaLangRunnable:);
  methods[4].selector = @selector(submitWithJavaLangRunnable:withId:);
  #pragma clang diagnostic pop
  static const void *ptrTable[] = { "submit", "LJavaUtilConcurrentCallable;", "<T:Ljava/lang/Object;>(Ljava/util/concurrent/Callable<TT;>;)Lcom/google/common/util/concurrent/ListenableFuture<TT;>;", "LJavaLangRunnable;", "(Ljava/lang/Runnable;)Lcom/google/common/util/concurrent/ListenableFuture<*>;", "LJavaLangRunnable;LNSObject;", "<T:Ljava/lang/Object;>(Ljava/lang/Runnable;TT;)Lcom/google/common/util/concurrent/ListenableFuture<TT;>;" };
  static const J2ObjcClassInfo _ComGoogleCommonUtilConcurrentForwardingListeningExecutorService = { "ForwardingListeningExecutorService", "com.google.common.util.concurrent", ptrTable, methods, NULL, 7, 0x401, 5, 0, -1, -1, -1, -1, -1 };
  return &_ComGoogleCommonUtilConcurrentForwardingListeningExecutorService;
}

@end

void ComGoogleCommonUtilConcurrentForwardingListeningExecutorService_init(ComGoogleCommonUtilConcurrentForwardingListeningExecutorService *self) {
  ComGoogleCommonUtilConcurrentForwardingExecutorService_init(self);
}

J2OBJC_CLASS_TYPE_LITERAL_SOURCE(ComGoogleCommonUtilConcurrentForwardingListeningExecutorService)


text:
package com.gigigo.orchextra.domain.model.entities.authentication;

import java.util.Calendar;
import java.util.Date;

public class ClientAuthData {

  private final String projectId;
  private final String userId;
  private final String value;
  private final int expiresIn;
  private final Date expiresAt;

  public ClientAuthData(String projectId, String userId, String value, int expiresIn) {
    this.projectId = projectId;
    this.userId = userId;
    this.value = value;
    this.expiresIn = expiresIn;
    this.expiresAt = calculateExpireTime(expiresIn);
  }

  public ClientAuthData(String projectId, String userId, String value, int expiresIn,
      Date expiresAt) {
    this.projectId = projectId;
    this.userId = userId;
    this.value = value;
    this.expiresIn = expiresIn;
    this.expiresAt = expiresAt;
  }

  private Date calculateExpireTime(int expiresIn) {
    return new Date(Calendar.getInstance().getTimeInMillis() + expiresIn);
  }

  public String getProjectId() {
    return projectId;
  }

  public String getUserId() {
    return userId;
  }

  public String getValue() {
    return value;
  }

  public int getExpiresIn() {
    return expiresIn;
  }

  public Date getExpiresAt() {
    return expiresAt;
  }

  public boolean isExpired() {
    return Calendar.getInstance().getTime().after(expiresAt);
  }
}


text:
CT.require("core.config");
CT.require("core.util");


text:
package org.apache.flink.runtime.testutils;

import org.apache.flink.runtime.checkpoint.AbstractCompletedCheckpointStore;
import org.apache.flink.runtime.checkpoint.CompletedCheckpoint;
import org.apache.flink.runtime.jobgraph.JobStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;

/**
 * A checkpoint store, which supports shutdown and suspend. You can use this to test HA
 * as long as the factory always returns the same store instance.
 */
public class RecoverableCompletedCheckpointStore extends AbstractCompletedCheckpointStore {

	private static final Logger LOG = LoggerFactory.getLogger(RecoverableCompletedCheckpointStore.class);

	private final ArrayDeque<CompletedCheckpoint> checkpoints = new ArrayDeque<>(2);

	private final ArrayDeque<CompletedCheckpoint> suspended = new ArrayDeque<>(2);

	@Override
	public void recover() throws Exception {
		checkpoints.addAll(suspended);
		suspended.clear();

		for (CompletedCheckpoint checkpoint : checkpoints) {
			checkpoint.registerSharedStates(sharedStateRegistry);
		}
	}

	@Override
	public void addCheckpoint(CompletedCheckpoint checkpoint) throws Exception {
		checkpoints.addLast(checkpoint);

		checkpoint.registerSharedStates(sharedStateRegistry);

		if (checkpoints.size() > 1) {
			CompletedCheckpoint checkpointToSubsume = checkpoints.removeFirst();
			checkpointToSubsume.discardOnSubsume(sharedStateRegistry);
		}
	}

	@Override
	public CompletedCheckpoint getLatestCheckpoint() throws Exception {
		return checkpoints.isEmpty() ? null : checkpoints.getLast();
	}

	@Override
	public void shutdown(JobStatus jobStatus) throws Exception {
		if (jobStatus.isGloballyTerminalState()) {
			checkpoints.clear();
			suspended.clear();
		} else {
			suspended.clear();

			for (CompletedCheckpoint checkpoint : checkpoints) {
				sharedStateRegistry.unregisterAll(checkpoint.getTaskStates().values());
				suspended.add(checkpoint);
			}

			checkpoints.clear();
		}
	}

	@Override
	public List<CompletedCheckpoint> getAllCheckpoints() throws Exception {
		return new ArrayList<>(checkpoints);
	}

	@Override
	public int getNumberOfRetainedCheckpoints() {
		return checkpoints.size();
	}

	@Override
	public int getMaxNumberOfRetainedCheckpoints() {
		return 1;
	}

	@Override
	public boolean requiresExternalizedCheckpoints() {
		return false;
	}
}


text:
<!DOCTYPE html>

  <title>OpenOrg by Public Innovation</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="We're a place-based, impact-focused civic incubator working to build a civic innovation and social entrepreneurship ecosystem in the Sacramento region. This is our plan.">
  <meta name="author" content="Public Innovation">
  <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
  <link rel="stylesheet" href="css/cover-page.css">
  <link rel="icon" href="favicon.png">

OpenOrg: an open standard for open organizations

        We're Public Innovation — a place-based, impact-focused civic incubator.

        And this is our plan to empower change agents who want to take our region to the next level.

        Are you ready to disrupt the status quo?

        Read On >>

        Follow @p_blic


text:
@font-face {
  font-family: "Open Sans Bold";
  src:  url('../fonts/OpenSans-Bold.ttf'),
        url('../fonts/OpenSans-Bold.woff')
}
@font-face {
  font-family: "Open Sans";
  src:  url('../fonts/OpenSans-Regular.ttf'),
        url('../fonts/OpenSans-Regular.woff')
}

body {
  margin: 0;
}

.err-page {
  height: 100%;
  width: 100%;
  min-width: 400px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.err-page > .content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-flow: row;
  flex-flow: row;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 50%;
}

.err-page > .content > .error-message {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-flow: column;
  flex-flow: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-family: 'Open Sans', Verdana, sans-serif;
}

.error-logo {
  width: 420px;
  height: auto;
  margin-bottom: 90px;
}

.error-title {
  color: #2b2b2b;
  font-family: 'Open Sans Bold', Verdana, sans-serif;
  font-size: 36px;
  margin-bottom: 45px;
}

.error-description {
  padding: 0;
  border: none;
  color: #2b2b2b;
  font-size: 18px;
  font-weight: 400;
  line-height: 35px;
  margin-bottom: 70px;
  text-align: center;
  width: 80%;
}

.button {
  width: 180px;
  height: 33px;
  border-radius: 4px;
  background-color: #019adb;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  line-height: 33px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="@dimen/explore_sites_page_padding" >
    <ImageView
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:src="@drawable/sad_tab"
        android:layout_marginTop="@dimen/explore_sites_error_image_margin_top"
        android:layout_marginBottom="@dimen/explore_sites_error_image_margin_bottom"
        android:layout_marginHorizontal="@dimen/explore_sites_page_padding"
        android:contentDescription="@string/explore_sites_loading_error" />
    <org.chromium.ui.widget.TextViewWithLeading
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="start"
        android:text="@string/explore_sites_loading_error"
        android:layout_marginHorizontal="@dimen/explore_sites_page_padding"
        android:layout_marginBottom="@dimen/explore_sites_page_padding"
        android:textAppearance="@style/TextAppearance.Headline.Primary"
        app:leading="@dimen/headline_size_leading" />
    <org.chromium.ui.widget.TextViewWithLeading
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="start"
        android:layout_marginHorizontal="@dimen/explore_sites_page_padding"
        android:text="@string/explore_sites_loading_error_next_steps_tag"
        android:textAppearance="@style/TextAppearance.TextSmall.Primary"
        app:leading="@dimen/text_size_small_leading" />
    <org.chromium.ui.widget.TextViewWithLeading
        android:id="@+id/error_view_next_steps"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="start"
        android:layout_marginHorizontal="@dimen/explore_sites_page_padding"
        android:paddingStart="@dimen/explore_sites_page_padding"
        android:textAppearance="@style/TextAppearance.TextSmall.Primary"
        app:leading="@dimen/text_size_small_leading" />
</LinearLayout>


text:
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
    android:accountType="com.kinvey.myapplogin"
    android:icon="@drawable/ic_launcher"
    android:label="@string/kinvey_account"
    android:smallIcon="@drawable/logo"
/>


text:
State.Play = function (game) {
	this.cursors;
	this.nave;
	this.space;
};

State.Play.prototype = {

	preload: function () {
		game.load.image('nave', Config.game.nave.dir);
		game.load.image('space', Config.game.background.dir);
		game.load.image('spaceForeground', Config.game.foreground.dir);
		game.load.image('planet', Config.game.planet.dir);
		game.load.image('asteroid', Config.game.asteroid.dir);
		game.load.image('gameover', Config.game.gameover.dir);

		game.load.image('score', Config.game.score.dir);
		game.load.image('coin_green_1', Config.game.coins.green.dir1);
		game.load.image('coin_green_2', Config.game.coins.green.dir2);
		game.load.image('coin_green_3', Config.game.coins.green.dir3);
		game.load.image('coin_green_4', Config.game.coins.green.dir4);
		game.load.image('coin_green_5', Config.game.coins.green.dir5);
		game.load.image('coin_green_6', Config.game.coins.green.dir6);
		game.load.image('coin_green_7', Config.game.coins.green.dir7);
		game.load.image('coin_green_8', Config.game.coins.green.dir8);
		game.load.image('coin_red_1', Config.game.coins.red.dir1);
		game.load.image('coin_red_2', Config.game.coins.red.dir2);
		game.load.image('coin_red_3', Config.game.coins.red.dir3);
		game.load.image('coin_red_4', Config.game.coins.red.dir4);
		game.load.image('coin_yellow_1', Config.game.coins.yellow.dir1);
		game.load.image('coin_yellow_2', Config.game.coins.yellow.dir2);
	},

	create: function () {

		game.world.setBounds(0, 0, 960, 600);

		game.physics.startSystem(Phaser.Physics.P2JS); // inicializa física com a lib P2JS
		game.physics.p2.setImpactEvents(true);
		game.physics.p2.gravity.y = 100;
	    game.physics.p2.defaultRestitution = 0.8;

		this.space = game.add.tileSprite(0, 0, 960, 600, 'space');
		this.starfield = game.add.tileSprite(0, 0, 960, 600, 'spaceForeground');
		this.planet = game.add.tileSprite(Config.game.planet.x, Config.game.planet.y, 960, 600, 'spaceForeground');

		this.nave = this.game.add.sprite(Config.game.nave.x, Config.game.nave.y, 'nave');
		game.physics.p2.enable(this.nave,false);

		this.nave.body.setRectangle(90); // ajusta caixa de colisão da nave
	    this.nave.body.fixedRotation = true;

		this.lifeNumber = 3;
		this.life = []; // store life imgs
		this.isGameOver = false;

		this.score = 0;

		// Create collision group for nave
		this.naveCollisionGroup = game.physics.p2.createCollisionGroup();
		this.nave.body.setCollisionGroup(this.naveCollisionGroup);
		this.nave.body.data.gravityScale = 10;

		// Create collision group for asteroids
		this.asteroidCollisionGroup = game.physics.p2.createCollisionGroup();

		this.asteroidGroup = game.add.group();
		this.asteroidGroup.enableBody = true;
		this.asteroidGroup.physicsBodyType = Phaser.Physics.P2JS;

		for (var i = 0; i < Config.game.asteroid.number; i++)
	    {
			var sprite;
	    	sprite = this.asteroidGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'asteroid');
	    	sprite.body.setCircle(40);
	    	sprite.body.setCollisionGroup(this.asteroidCollisionGroup); //add
	    	sprite.body.collides([this.asteroidCollisionGroup, this.naveCollisionGroup]);
	    	game.physics.p2.enable(sprite, true);
//	    	time = game.rnd.integerInRange(1400,2000);
//	    	scale = time/1200; aqui mesmo oh
	    	sprite.body.allowGravity = false;
	    	sprite.velocity = game.rnd.integerInRange(Config.game.asteroid.velocityRangeIni,Config.game.asteroid.velocityRangeEnd);
//			sprite.enableBody = true;
//			sprite.physicsBodyType = Phaser.Physics.P2JS;
	    }

		// Set collision between nave and asteroids
		this.nave.body.collides(this.asteroidCollisionGroup, this.hitAsteroid, this);
//		this.nave.body.onBeginContact.add(blockHit,this);

//		Create collision group for coins
		this.coinsCollisionGroup = game.physics.p2.createCollisionGroup();
		this.coinsGroup = game.add.group();
		this.coinsGroup.enableBody = true;
		this.coinsGroup.physicsBodyType = Phaser.Physics.P2JS;

		for (var i = 0; i < Config.game.coins.number; i++)
		    {
				var color = 0;
				var number = Math.random();
				if (number <= 0.2){
					color = 0;
				} else if (number > 0.3 && number <= 0.7){
					color = 1;
				} else {
					color = 2;
				}

				var sprite = null;
				number = Math.random();

				if (color == 0){
					if (number <= 0.25 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_red_1');
					} else if (number > 0.25 && number <= 0.5 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_red_2');
					} else if (number > 0.5  && number <= 0.75){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_red_3');
					} else if (number > 0.75){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_red_4');
					}
					sprite.body.isRed = true;
				} else if (color == 1){
					if (number > 0.5 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_yellow_1');
					} else {
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_yellow_2');
					}
					sprite.body.isYellow = true;
				} else if (color == 2){
					if (number <= 0.1 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_1');
					} else if (number > 0.1 && number <= 0.2 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_2');
					} else if (number > 0.2 && number <= 0.3 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_3');
					} else if (number > 0.3 && number <= 0.4 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_4');
					} else if (number > 0.4 && number <= 0.5 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_5');
					} else if (number > 0.5 && number <= 0.7 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_6');
					} else if (number > 0.7 && number <= 0.8 ){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_7');
					} else if (number > 0.8){
						sprite = this.coinsGroup.create(500+(200 *i), game.rnd.integerInRange(-100, 600), 'coin_green_8');
					}
					sprite.body.isGreen = true;
				}
		    	sprite.body.setCircle(31);
		    	sprite.body.setCollisionGroup(this.coinsCollisionGroup); //add
		    	sprite.body.collides([this.coinsCollisionGroup, this.naveCollisionGroup]);
		    	sprite.body.allowGravity = false;
		    }

		this.nave.body.collides(this.coinsCollisionGroup, this.hitCoin, this);

		this.drawLives();

		game.add.image(Config.game.score.x,Config.game.score.y,'score');
		this.textScore = game.add.text(Config.game.score.textX,Config.game.score.textY, "000000", {
	        font: "32px Arial",
	        fill: "#ffffff",
	        align: "right"
	    });
		this.textScore.anchor.setTo(0.5, 0.5);

		this.gameover = game.add.image(980,0,'gameover');

	    this.cursors = this.game.input.keyboard.createCursorKeys();
	},

	update: function(){

	  if (!this.isGameOver){

		// Refresh background and foreground position
		this.space.tilePosition.x = this.space.tilePosition.x  -5;
		if (this.space.tilePosition.x == -Config.global.width ){
			this.space.tilePosition.x = 0;
		}
		this.starfield.tilePosition.x = this.starfield.tilePosition.x  -7;
		if (this.starfield.tilePosition.x == -Config.global.width ){
			this.starfield.tilePosition.x = 0;
		}

		// Refresh nave position according the keys UP and DOWN
		this.nave.body.setZeroVelocity();
	    if (this.cursors.up.isDown)
	    {
	    	this.nave.body.moveDown(400);

	    } else  if (this.cursors.down.isDown)
	    {
	    	this.nave.body.moveUp(400);
	    }

	    if (this.nave.body.y < 0 || this.nave.body.y > Config.global.screen.height ||
		     this.nave.body.x < 0 || this.nave.body.x > Config.global.screen.width){
			this.gameover.x = Config.game.gameover.x;
			this.gameover.y = Config.game.gameover.y;
			setTimeout(function () {
			  game.state.start('Menu');
			 }, Config.game.gameover.time);
			this.isGameOver = true;
	    }

	    // Refresh asteroid position
	    for (var i = 0; i < Config.game.asteroid.number ; i++)
		{
			var sprite = this.asteroidGroup.getAt(i);
			sprite.body.setZeroVelocity();
			sprite.body.moveLeft( sprite.velocity );
			if (sprite.body.x <= -sprite.width)
			{
				sprite.velocity = game.rnd.integerInRange(Config.game.asteroid.velocityRangeIni,Config.game.asteroid.velocityRangeEnd);
				sprite.body.x = game.world.width+sprite.width;
				sprite.body.y = game.rnd.integerInRange(-100, 620);
		    }
		}

	    for (var i = 0; i < Config.game.coins.number; i++)
		{
			var sprite = null;
			sprite = this.coinsGroup.getAt(i);
			if (sprite.alive){
				sprite.body.setZeroVelocity();
				sprite.body.moveLeft(Config.game.coins.velocity); //game.rnd.integerInRange(100,200) );
				if (sprite.body.x < -sprite.width)
				{
					sprite.reset(game.world.width+sprite.width,game.rnd.integerInRange(-100, 620));
			    }
			} else {
				sprite.reset(game.world.width+sprite.width,game.rnd.integerInRange(-100, 620));
		    }
		}
	  }

	},

	drawLives: function ()
	{
		for ( var i = 0; i < this.lifeNumber; i++)
		{
			this.life[i] = game.add.sprite(Config.game.score.lifeX+(i*50), Config.game.score.lifeY, 'nave');
			this.life[i].scale.x = 0.4;
			this.life[i].scale.y = 0.7;
		}
	},

	hitAsteroid: function (body1, body2)
	{

		if (this.lifeNumber > 0)
		{
			this.lifeNumber--;
			this.life[this.lifeNumber].kill();
		}

		if (this.lifeNumber == 0){
			this.gameover.x = Config.game.gameover.x;
			this.gameover.y = Config.game.gameover.y;
			setTimeout(function () {
			  game.state.start('Menu');
			 }, Config.game.gameover.time);
			this.isGameOver = true;
		}

	},

	hitCoin: function (body1, body2)
	{
		if (this.isGameOver) return;
		if (body2.isYellow){
			this.score+=3;
			if (this.score > 100000)
				this.score = 999999;

		} else if (body2.isRed){
			this.score--;
			if (this.score < 0)
				this.score = 0;

		} else if (body2.isGreen){
			this.score+=6;
			if (this.score > 100000)
				this.score = 999999;
		}

		// Update score points
		var zeros = "0000000";
		if (this.score < 10 )
			zeros = "00000";
		else if (this.score < 100)
			zeros = "0000";
		else if (this.score < 1000)
			zeros = "000";
		else if (this.score < 10000)
			zeros = "00";
		else if (this.score < 10000)
			zeros = "0";

		this.textScore.setText(""+zeros + this.score);

		body2.sprite.kill();
	},

};


text:
// Header for CTableViewWindow class

#ifndef __CTABLEVIEWWINDOW__MULBERRY__
#define __CTABLEVIEWWINDOW__MULBERRY__

#include "LWindow.h"
#include "CHelpTags.h"
#include "CWindowStatus.h"

#include "CTableView.h"

// Constants
const	PaneIDT		paneid_TableView = 'VIEW';

// Classes
class CTableView;
class CTitleTableView;
class CToolbarView;
class LTableView;

class CTableViewWindow : public LWindow,
							public CHelpTagWindow
{
public:
	static Point		sMouseUp;

					CTableViewWindow();
					CTableViewWindow(LStream *inStream);
	virtual 		~CTableViewWindow();

	virtual Boolean		ObeyCommand(CommandT inCommand, void *ioParam = nil);
	virtual void		FindCommandStatus(CommandT inCommand,
											Boolean &outEnabled,
											Boolean &outUsesMark,
											UInt16 &outMark,
											Str255 outName);

	CTableView*	GetTableView()
		{ return mTableView; }
	LTableView*		GetBaseTable()
		{ return mTableView->GetBaseTable(); }
	CTitleTableView*	GetBaseTitles()
		{ return mTableView->GetBaseTitles(); }

	virtual CToolbarView* GetToolbarView() = 0;

	virtual void	ClickInContent(const EventRecord &inMacEvent);

	virtual void	ResetState(bool force = false);				// Reset window state
	virtual void	SaveState();								// Save current state in prefs
	virtual void	SaveDefaultState();							// Save current state as default

	virtual Boolean	CalcStandardBounds(Rect &outStdBounds) const;
	virtual void	ResetStandardSize();						// Take column width into account

			void	GetUserBounds(Rect& user_bounds) const
		{ user_bounds = mUserBounds; }

protected:
	CTableView*			mTableView;

	virtual void	FinishCreateSelf();

private:
			void	InitTableViewWindow();
};

#endif


text:
import os
import shutil
import subprocess
import tempfile

REPO = 'git@github.com:nicholasbishop/dumbmath-rs.git'
BRANCH = 'gh-pages'
COMMIT_MSG = 'Automatic-ish rustdoc update'

def run_cmd(cmd, cwd=None):
    print(' '.join(cmd))
    subprocess.check_call(cmd, cwd=cwd)

def main():
    run_cmd(['cargo', 'doc'])

    with tempfile.TemporaryDirectory(prefix='update-gh-pages-') as tmp_dir:
        run_cmd(['git', 'clone', REPO, tmp_dir, '--branch', BRANCH])
        dst_doc_dir = os.path.join(tmp_dir, 'doc')

        print('rm -r', dst_doc_dir)
        shutil.rmtree(dst_doc_dir)

        print('cp -r', 'target/doc', dst_doc_dir)
        shutil.copytree('target/doc', dst_doc_dir)

        run_cmd(['git', 'add', 'doc'], cwd=tmp_dir)
        run_cmd(['git', 'commit', 'doc', '-m', COMMIT_MSG], cwd=tmp_dir)
        run_cmd(['git', 'push'], cwd=tmp_dir)

if __name__ == '__main__':
    main()


text:
FROM openjdk:8-alpine

MAINTAINER Nicolas Muller <n.muller@treeptik.fr>

RUN apk update \
   && apk add curl \
   && apk add gnupg \
   && apk add tini \
   && apk add libc6-compat \
   && apk add bash

## grab gosu for easy step-down from root
ENV GOSU_VERSION 1.7

RUN curl -L -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \
    && curl -L -o /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64.asc" \
    && export GNUPGHOME="$(mktemp -d)" \
    && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
    && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
    && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \
    && chmod +x /usr/local/bin/gosu \
    && gosu nobody true

ENV JMXTRANS_HOME /usr/share/jmxtrans
ENV PATH $JMXTRANS_HOME/bin:$PATH
ENV JAR_FILE $JMXTRANS_HOME/lib/jmxtrans-all.jar
ENV HEAP_SIZE 512
ENV PERM_SIZE 384
ENV MAX_PERM_SIZE 384
ENV SECONDS_BETWEEN_RUNS 60
ENV CONTINUE_ON_ERROR false
ENV JSON_DIR /var/lib/jmxtrans

# Install jmxtrans
RUN addgroup jmxtrans \
   && adduser jmxtrans -s /bin/bash -h /usr/share/jmxtrans -S -D -G jmxtrans

WORKDIR ${JMXTRANS_HOME}
RUN mkdir -p ${JMXTRANS_HOME}/conf

COPY logback.xml ${JMXTRANS_HOME}/conf/logback.xml

RUN mkdir -p /usr/share/jmxtrans/lib/ \
    && JMXTRANS_VERSION=`curl http://central.maven.org/maven2/org/jmxtrans/jmxtrans/maven-metadata.xml | sed -n 's:.*<release>\(.*\)</release>.*:\1:p'` \
    && mkdir -p /var/log/jmxtrans \
    && wget -q http://central.maven.org/maven2/org/jmxtrans/jmxtrans/${JMXTRANS_VERSION}/jmxtrans-${JMXTRANS_VERSION}-all.jar \
    && wget -q http://central.maven.org/maven2/org/jmxtrans/jmxtrans/${JMXTRANS_VERSION}/jmxtrans-${JMXTRANS_VERSION}-all.jar.asc \
    && export GNUPGHOME="$(mktemp -d)" \
    && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0xA86366E77BED6718 \
    && gpg --batch --verify jmxtrans-${JMXTRANS_VERSION}-all.jar.asc jmxtrans-${JMXTRANS_VERSION}-all.jar \
    && rm -rf "$GNUPGHOME" jmxtrans-${JMXTRANS_VERSION}-all.jar.asc \
    && mv jmxtrans-${JMXTRANS_VERSION}-all.jar ${JAR_FILE}

COPY docker-entrypoint.sh /

VOLUME ${JSON_DIR}

# JMX PORT
EXPOSE 9999

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["start-with-jmx"]