text:
package nl.nn.adapterframework.logging;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.ThreadContext;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.ConfigurationFactory;
import org.apache.logging.log4j.core.config.ConfigurationSource;
import org.apache.logging.log4j.core.config.xml.XmlConfiguration;

import nl.nn.adapterframework.util.StringResolver;

/**
 * This ConfigurationFactory is loaded after the log4j2.properties file has been initialised.
 * Both Configurations are then combined via a CompositeConfiguration
 *
 * @author Murat Kaan Meral
 * @author Niels Meijer
 */
//@Order(1000)
//@Plugin(name = "IbisLoggerConfigurationFactory", category = ConfigurationFactory.CATEGORY)
public class IbisLoggerConfigurationFactory extends ConfigurationFactory {
	public static final String LOG_PREFIX = "IbisLoggerConfigurationFactory class ";
	private static final String LOG4J_PROPS_FILE = "log4j4ibis.properties";
	private static final String DS_PROPERTIES_FILE = "DeploymentSpecifics.properties";

	static {
		System.setProperty("java.util.logging.manager", org.apache.logging.log4j.jul.LogManager.class.getCanonicalName());
	}

	/**
	 * Hierarchy of log directories to search for. Strings will be split by "/".
	 * Before "/" split will be assumed to be a property, and after split will be a sub-directory.
	 */
	private static String[] logDirectoryHierarchy = new String[] {
			"site.logdir",
			"user.dir/logs",
			"user.dir/log",
			"jboss.server.base.dir/log",
			"wtp.deploy/../logs",
			"catalina.base/logs"
	};

	@Override
	protected String[] getSupportedTypes() {
		return new String[] {".xml"};
	}

	@Override
	public Configuration getConfiguration(LoggerContext loggerContext, ConfigurationSource source) {
		try {
			setLogDir();
			setLevel();

			String configuration = readLog4jConfiguration(source.getInputStream());
			Properties properties = getProperties();
			Matcher m = Pattern.compile("\\$\\{(?:ctx:)?([^}]*)\\}").matcher(configuration); //Look for properties in the Log4J2 XML
			Map<String, String> substitutions = new HashMap<>();
			while (m.find()) {
				String key = m.group(1);
				String value = resolveValueRecursively(properties, key);

				if(value != null) {
					substitutions.put(key, value);
				}
			}
			ThreadContext.putAll(substitutions); // Only add the substituted variables to the ThreadContext

			return new XmlConfiguration(loggerContext, source.resetInputStream()) { //We have to 'reset' the source as the old stream has been read.

				@Override // Add hashcode to toString() so we can differentiate the XmlConfigurations in the startup log
				public String toString() {
					return this.getClass().getCanonicalName() + "@" + Integer.toHexString(this.hashCode()) + "[location=" + getConfigurationSource() + "]";
				}
			};
		} catch (IOException e) {
			System.err.println(LOG_PREFIX + "unable to configure Log4J2");
			throw new IllegalStateException(LOG_PREFIX + "unable to configure Log4J2", e);
		}
	}

	private String resolveValueRecursively(Properties properties, String key) {
		String value = properties.getProperty(key);
		if(StringUtils.isEmpty(value)) {
			return null;
		}

		if(StringResolver.needsResolution(value)) {
			value = StringResolver.substVars(value, properties);
		}
		return value;
	}

	private Properties getProperties() throws IOException {
		Properties log4jProperties = getProperties(LOG4J_PROPS_FILE);
		if(log4jProperties == null) {
			System.out.println(LOG_PREFIX + "did not find " + LOG4J_PROPS_FILE + ", leaving it up to log4j's default initialization procedure");
		}

		Properties dsProperties = getProperties(DS_PROPERTIES_FILE);
		if (dsProperties != null) {
			log4jProperties.putAll(dsProperties);
		}

		log4jProperties.putAll(System.getProperties()); //Set these after reading DeploymentSpecifics as we want to override the properties
		log4jProperties.putAll(System.getenv()); // let environment properties override system properties and appConstants
		setInstanceNameLc(log4jProperties); //Set instance.name.lc for log file names

		return log4jProperties;
	}
	private Properties getProperties(String filename) throws IOException {
		URL url = this.getClass().getClassLoader().getResource(filename);
		if(url != null) {
			Properties properties = new Properties();
			properties.load(url.openStream());
			return properties;
		}
		return null;
	}
	private static void setInstanceNameLc(Properties log4jProperties) {
		String instanceNameLowerCase = log4jProperties.getProperty("instance.name");
		if (instanceNameLowerCase != null) {
			instanceNameLowerCase = instanceNameLowerCase.toLowerCase();
		} else {
			instanceNameLowerCase = "ibis";
		}
		log4jProperties.setProperty("instance.name.lc", instanceNameLowerCase);
	}

	public static String readLog4jConfiguration(InputStream stream) throws IOException {
		char[] buff = new char[1024];
		Writer stringWriter = new StringWriter();
		try (Reader reader = new InputStreamReader(new BufferedInputStream(stream))) {
			int n;
			boolean checkVersionOnlyFirst1024Characters = true;
			while ((n = reader.read(buff))!=-1) {
				stringWriter.write(buff, 0, n);

				if(checkVersionOnlyFirst1024Characters) {
					//See if log4j2 prefix is somewhere in the first 1024 characters
					if(!stringWriter.toString().contains("<log4j2:Configuration")) {
						System.err.println(LOG_PREFIX + "did not recognize configuration format, unable to configure Log4j2. Please use the log4j2 layout in file log4j4ibis.xml");
						throw new IllegalStateException("Did not recognize configuration format, unable to configure Log4j2. Please use the log4j2 layout in file log4j4ibis.xml");
					}
					checkVersionOnlyFirst1024Characters = false;
				}
			}
			return stringWriter.toString();
		}
		finally {
			stringWriter.close();
			stream.close();
		}
	}

	/**
	 * Checks if log.dir property exists.
	 * Sets it with findLogDir function.
	 */
	private static void setLogDir() {
		if (System.getProperty("log.dir") == null) {
			File logDir = findLogDir();
			if (logDir != null) {
				// Replace backslashes because log.dir is used in log4j2.xml
				// on which substVars is done (see below) which will replace
				// double backslashes into one backslash and after that the same
				// is done by Log4j:
				// https://issues.apache.org/bugzilla/show_bug.cgi?id=22894
				System.setProperty("log.dir", logDir.getPath().replaceAll("\\\\", "/"));
			} else {
				System.out.println(LOG_PREFIX + "did not find system property log.dir and unable to locate it automatically");
			}
		}
	}

	/**
	 * Checks if the log.level is set on system level.
	 * If not set, sets it based on dtap.stage
	 */
	private static void setLevel() {
		if (System.getProperty("log.level") == null) {
			// In the log4j4ibis.xml the rootlogger contains the loglevel: ${log.level}
			// You can set this property in the log4j4ibis.properties, or as system property.
			// To make sure the IBIS can startup if no log.level property has been found, it has to be explicitly set
			String stage = System.getProperty("dtap.stage");
			String logLevel = "DEBUG";
			if("ACC".equalsIgnoreCase(stage) || "PRD".equalsIgnoreCase(stage)) {
				logLevel = "WARN";
			}
			System.setProperty("log.level", logLevel);
		}
	}

	/**
	 * Finds the first directory in the given hierarchy.
	 * logDirectoryHierarchy is an array of Strings.
	 *                  Strings will be split by "/" and before split will be assumed to be property,
	 *                  and after split will be the subdirectory.
	 * @return File object that is a directory. Or null, if no directories were found.
	 */
	private static File findLogDir() {
		for(String option : logDirectoryHierarchy) {
			int splitIndex = option.indexOf('/');

			String property = System.getProperty(option.substring(0, (splitIndex == -1) ? option.length() : splitIndex));
			if(property == null)
				continue;

			File dir;
			if(splitIndex == -1) {
				dir = new File(property);
			} else {
				dir = new File(property, option.substring(splitIndex));
			}

			if(dir.isDirectory())
				return dir;
		}
		return null;
	}
}


text:
/**
 * This file is useful for mocha tests.
 * To use it, run mocha --require coffee-coverage/register --reporter html-cov > coverage.html
 */
require('./').register({
    instrumentor: 'jscoverage',
    basePath: process.cwd(),
    path: 'relative',
    exclude: ['/test', '/node_modules', '/.git'],
    coverageVar: '_$jscoverage',
    initAll: (_ref = process.env.COFFEECOV_INIT_ALL) != null ? (_ref === 'true') : true
});

redpajama_set_name: RedPajamaGithub


text:
package gw.lang.parser;

public enum GlobalScope
{
  EXECUTION( "execution" ),
  REQUEST( "request" ),
  SESSION( "session" ),
  APPLICATION( "application" );

  private String _strScope;

  private GlobalScope( String strScope )
  {
    _strScope = strScope;
  }

  public String toString()
  {
    return _strScope;
  }

  public static GlobalScope getScope( String code ) {
    for( GlobalScope globalScope : GlobalScope.values() )
    {
      //noinspection StringEquality
      if( globalScope._strScope == code )
      {
        return globalScope;
      }
    }
    throw new IllegalArgumentException( "Cannot resolve scope with " +
                                        "name " + code );
  }

}


text:
package org.camunda.bpm.engine.test.api.runtime;

import static org.camunda.bpm.engine.test.util.ActivityInstanceAssert.assertThat;
import static org.camunda.bpm.engine.test.util.ActivityInstanceAssert.describeActivityInstanceTree;
import static org.camunda.bpm.engine.test.util.ExecutionAssert.assertThat;
import static org.camunda.bpm.engine.test.util.ExecutionAssert.describeExecutionTree;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.util.List;

import org.camunda.bpm.engine.runtime.ActivityInstance;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.util.ExecutionTree;
import org.camunda.bpm.engine.test.util.PluggableProcessEngineTest;
import org.junit.Test;

/**
 * @author Roman Smirnov
 *
 */
public class ProcessInstanceModificationBoundaryEventTest extends PluggableProcessEngineTest {

  protected static final String INTERRUPTING_BOUNDARY_EVENT = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.interruptingBoundaryEvent.bpmn20.xml";
  protected static final String NON_INTERRUPTING_BOUNDARY_EVENT = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.nonInterruptingBoundaryEvent.bpmn20.xml";

  protected static final String INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.interruptingBoundaryEventInsideSubProcess.bpmn20.xml";
  protected static final String NON_INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.nonInterruptingBoundaryEventInsideSubProcess.bpmn20.xml";

  protected static final String INTERRUPTING_BOUNDARY_EVENT_ON_SUBPROCESS = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.interruptingBoundaryEventOnSubProcess.bpmn20.xml";
  protected static final String NON_INTERRUPTING_BOUNDARY_EVENT_ON_SUBPROCESS = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.nonInterruptingBoundaryEventOnSubProcess.bpmn20.xml";

  protected static final String INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.interruptingBoundaryEventWithParallelGateway.bpmn20.xml";
  protected static final String NON_INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.nonInterruptingBoundaryEventWithParallelGateway.bpmn20.xml";

  protected static final String INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY_INSIDE_SUB_PROCESS = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.interruptingBoundaryEventWithParallelGatewayInsideSubProcess.bpmn20.xml";
  protected static final String NON_INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY_INSIDE_SUB_PROCESS = "org/camunda/bpm/engine/test/api/runtime/ProcessInstanceModificationTest.nonInterruptingBoundaryEventWithParallelGatewayInsideSubProcess.bpmn20.xml";

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask1AndStartBeforeTaskAfterBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("taskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
      describeActivityInstanceTree(processInstance.getProcessDefinitionId())
        .activity("task1")
        .activity("taskAfterBoundaryEvent")
      .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child(null).concurrent().noScope()
            .child("task1").scope()
        .done());

    completeTasksInOrder("task1", "task2", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);

  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask1AndStartBeforeBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
    .matches(
      describeExecutionTree("taskAfterBoundaryEvent").scope()
      .done());

    completeTasksInOrder("taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask2AndStartBeforeTaskAfterBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("taskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task2")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child("task2").concurrent().noScope()
        .done());

    completeTasksInOrder("task2", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask2AndStartBeforeBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task2")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child("task2").concurrent().noScope()
        .done());

    completeTasksInOrder("task2", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask1AndStartBeforeTaskAfterNonInterruptingBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("taskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task1")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child(null).concurrent().noScope()
            .child("task1").scope()
        .done());

    completeTasksInOrder("task1", "taskAfterBoundaryEvent", "task2");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask1AndStartBeforeNonInterruptingBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task1")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child(null).concurrent().noScope()
            .child("task1").scope()
        .done());

    completeTasksInOrder("task1", "taskAfterBoundaryEvent", "task2");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask2AndStartBeforeTaskAfterNonInterruptingBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("taskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task2")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child("task2").concurrent().noScope()
        .done());

    completeTasksInOrder("task2", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT)
  @Test
  public void testTask2AndStartBeforeNonInterruptingBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task2")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child("task2").concurrent().noScope()
        .done());

    completeTasksInOrder("task2", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask1AndStartBeforeTaskAfterBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerTaskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask1")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("innerTaskAfterBoundaryEvent").concurrent().noScope().up()
            .child(null).concurrent().noScope()
              .child("innerTask1").scope()
        .done());

    completeTasksInOrder("innerTask1", "innerTaskAfterBoundaryEvent", "innerTask2");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask1AndStartBeforeBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("innerTaskAfterBoundaryEvent").scope()
        .done());

    completeTasksInOrder("innerTaskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask1AndStartBeforeTaskAfterNonInterruptingBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerTaskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask1")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("innerTaskAfterBoundaryEvent").concurrent().noScope().up()
            .child(null).concurrent().noScope()
              .child("innerTask1").scope()
        .done());

    completeTasksInOrder("innerTask1", "innerTaskAfterBoundaryEvent", "innerTask2");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask1AndStartBeforeNonInterruptingBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask1")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("innerTaskAfterBoundaryEvent").concurrent().noScope().up()
            .child(null).concurrent().noScope()
              .child("innerTask1").scope()
        .done());

    completeTasksInOrder("innerTask1", "innerTask2", "innerTaskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask2AndStartBeforeTaskAfterBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerTaskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask2")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("innerTaskAfterBoundaryEvent").concurrent().noScope().up()
            .child("innerTask2").concurrent().noScope()
        .done());

    completeTasksInOrder("innerTask2", "innerTaskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask2AndStartBeforeBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask2")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("innerTaskAfterBoundaryEvent").concurrent().noScope().up()
            .child("innerTask2").concurrent().noScope()
        .done());

    completeTasksInOrder("innerTask2", "innerTaskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask2AndStartBeforeTaskAfterNonInterruptingBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerTaskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask2")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("innerTaskAfterBoundaryEvent").concurrent().noScope().up()
            .child("innerTask2").concurrent().noScope()
        .done());

    completeTasksInOrder("innerTask2", "innerTaskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_INSIDE_SUBPROCESS)
  @Test
  public void testTask2AndStartBeforeNonInterruptingBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    String taskId = taskService.createTaskQuery().singleResult().getId();
    taskService.complete(taskId);

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("innerBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask2")
            .activity("innerTaskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("innerTaskAfterBoundaryEvent").concurrent().noScope().up()
            .child("innerTask2").concurrent().noScope()
        .done());

    completeTasksInOrder("innerTask2", "innerTaskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_ON_SUBPROCESS)
  @Test
  public void testStartBeforeTaskAfterBoundaryEventOnSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("taskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask")
          .endScope()
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child(null).concurrent().noScope()
            .child("innerTask").scope()
        .done());

    completeTasksInOrder("innerTask", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_ON_SUBPROCESS)
  @Test
  public void testStartBeforeBoundaryEventOnSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree("taskAfterBoundaryEvent").scope()
        .done());

    completeTasksInOrder("taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_ON_SUBPROCESS)
  @Test
  public void testStartBeforeTaskAfterNonInterruptingBoundaryEventOnSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("taskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask")
          .endScope()
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child(null).concurrent().noScope()
            .child("innerTask").scope()
        .done());

    completeTasksInOrder("innerTask", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_ON_SUBPROCESS)
  @Test
  public void testStartBeforeNonInterruptingBoundaryEventOnSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("taskAfterBoundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("innerTask")
          .endScope()
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("taskAfterBoundaryEvent").concurrent().noScope().up()
          .child(null).concurrent().noScope()
            .child("innerTask").scope()
        .done());

    completeTasksInOrder("innerTask", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY)
  @Test
  public void testStartBeforeInterruptingBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task1")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("task1").concurrent().noScope().up()
          .child("taskAfterBoundaryEvent").concurrent().noScope()
        .done());

    completeTasksInOrder("task1", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY)
  @Test
  public void testStartBeforeNonInterruptingBoundaryEvent() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .activity("task1")
          .activity("task2")
          .activity("taskAfterBoundaryEvent")
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child("task1").concurrent().noScope().up()
          .child(null).concurrent().noScope()
            .child("task2").scope().up().up()
          .child("taskAfterBoundaryEvent").concurrent().noScope()
        .done());

    completeTasksInOrder("task1", "task2", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY_INSIDE_SUB_PROCESS)
  @Test
  public void testStartBeforeInterruptingBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("task1")
            .activity("taskAfterBoundaryEvent")
          .endScope()
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("task1").concurrent().noScope().up()
            .child("taskAfterBoundaryEvent").concurrent().noScope()
        .done());

    completeTasksInOrder("task1", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  @Deployment(resources = NON_INTERRUPTING_BOUNDARY_EVENT_WITH_PARALLEL_GATEWAY_INSIDE_SUB_PROCESS)
  @Test
  public void testStartBeforeNonInterruptingBoundaryEventInsideSubProcess() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = processInstance.getId();

    runtimeService
      .createProcessInstanceModification(processInstanceId)
      .startBeforeActivity("boundaryEvent")
      .execute();

    ActivityInstance updatedTree = runtimeService.getActivityInstance(processInstanceId);
    assertNotNull(updatedTree);
    assertEquals(processInstanceId, updatedTree.getProcessInstanceId());

    assertThat(updatedTree).hasStructure(
        describeActivityInstanceTree(processInstance.getProcessDefinitionId())
          .beginScope("subProcess")
            .activity("task1")
            .activity("task2")
            .activity("taskAfterBoundaryEvent")
          .endScope()
        .done());

    ExecutionTree executionTree = ExecutionTree.forExecution(processInstanceId, processEngine);

    assertThat(executionTree)
      .matches(
        describeExecutionTree(null).scope()
          .child(null).scope()
            .child("task1").concurrent().noScope().up()
            .child(null).concurrent().noScope()
              .child("task2").scope().up().up()
            .child("taskAfterBoundaryEvent").concurrent().noScope()
        .done());

    completeTasksInOrder("task1", "task2", "taskAfterBoundaryEvent");
    testRule.assertProcessEnded(processInstanceId);
  }

  protected void completeTasksInOrder(String... taskNames) {
    for (String taskName : taskNames) {
      // complete any task with that name
      List<Task> tasks = taskService.createTaskQuery().taskDefinitionKey(taskName).listPage(0, 1);
      assertTrue("task for activity " + taskName + " does not exist", !tasks.isEmpty());
      taskService.complete(tasks.get(0).getId());
    }
  }

}


text:
@implementation Car

@synthesize make;
@synthesize model;

@end


text:
<?php
/**
 * rename this file to 'config.php' and setup following configurations
 */

mb_internal_encoding("utf-8");

define('LOGS_DIR', 'sampleLogs');
define('MAX_LOG_SIZE', 12288);


text:
using System;
using System.Threading.Tasks;

using Akka.Actor;

namespace Akka.Demo.HelloWorld
{
    public class ConsoleReaderActor : UntypedActor
    {
        private readonly IActorRef consoleWriterActor;

        public ConsoleReaderActor(IActorRef consoleWriterActor)
        {
            this.consoleWriterActor = consoleWriterActor;
        }

        protected override void OnReceive(object message)
        {
            if (message is MonitorConsole)
            {
                var line = Console.ReadLine();

                if (line == "bye")
                {
                    this.consoleWriterActor.Tell(new Bye());
                }
                else if (line == "count")
                {
                    var self = Self;

                    Task<CountMessageResult> countTask = this.consoleWriterActor.Ask<CountMessageResult>(new CountMessage());

                    countTask.PipeTo(self);
                }
                else
                {
                    this.consoleWriterActor.Tell(line);
                }

                this.Self.Tell(new MonitorConsole());
            }
            else if (message is CountMessageResult)
            {
                this.consoleWriterActor.Tell("Count is: " + message);
            }
        }
    }
}


text:
set -e
flake8 . --max-line-length=119 --exclude=env,./src/convention.py
python test/testloader.py


text:
<?php

namespace Markup\JobQueueBundle\DependencyInjection;

use Markup\JobQueueBundle\Exception\InvalidConfigurationException;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

/**
 * This is the class that loads and manages your bundle configuration
 *
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
 */
class MarkupJobQueueExtension extends Extension
{
    /**
     * {@inheritDoc}
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');

        $this->registerRecurringConfigurationFile($config, $container);
        $this->addSupervisordConfig($config, $container);
    }

    /**
     * Stores the configured .yml file for use by the recurring console command reader
     * @param array            $config
     * @param ContainerBuilder $container
     */
    private function registerRecurringConfigurationFile(array $config, ContainerBuilder $container)
    {
        if ($config['recurring'] !== false) {
            $recurringConsoleCommandReader = $container->getDefinition('markup_admin_job_queue_recurring_console_command_reader');
            $recurringConsoleCommandReader->addMethodCall('setConfigurationFileName', [$config['recurring']]);
        }
    }

    /**
     * If Supervisord config variables have been set then set them against the container as parameters
     * @param array            $config
     * @param ContainerBuilder $container
     */
    private function addSupervisordConfig(array $config, ContainerBuilder $container)
    {
        $configFileWriter = $container->getDefinition('markup_job_queue.writer.supervisord_config_file');
        if (!$config['topics']) {
            throw new InvalidConfigurationException('markup_top_queue requirea that at least 1 `topic` is configured');
        }
        $configFileWriter->addMethodCall('setSupervisordConfigPath', [$config['supervisor_config_path']]);
        $configFileWriter->addMethodCall('setTopicsConfiguration', [$config['topics']]);
    }
}


text:
#region Usings

using System;
using JetBrains.Annotations;

#endregion

namespace Extend
{
    /// <summary>
    ///     Class containing some extension methods for <see cref="DateTime" />.
    /// </summary>
    public static partial class DateTimeEx
    {
        /// <summary>
        ///     Adds a day to the given date time value.
        /// </summary>
        /// <param name="dateTime">The date time to increase.</param>
        /// <returns>Tomorrow date at same time.</returns>
        [Pure]
        [PublicAPI]
        public static DateTime Tomorrow( this DateTime dateTime )
            => dateTime.AddDays( 1 );
    }
}


text:
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1">

  <title>Backbone Boilerplate</title>

  <!-- Application styles. -->
  <!-- build:[href] /styles.min.css -->
  <link rel="stylesheet" href="/app/styles/index.css">
  <!-- /build -->
</head>

<body>
  <!-- Application container. -->
  <main role="main" id="main"></main>

  <!-- Application source. -->
  <!-- build:[src] /source.min.js -->
  <script src="dist/source.js"></script>
  <!-- /build -->

  <!-- build:remove -->
  <script src="http://localhost:35729/livereload.js"></script>
  <!-- /build -->
</body>
</html>


text:
import { Class, SugarElement } from '@ephox/sugar';

import { AlloyComponent } from '../../api/component/ComponentApi';
import { Stateless } from '../common/BehaviourState';
import { SwappingConfig } from './SwappingTypes';

const swap = (element: SugarElement<Element>, addCls: string, removeCls: string): void => {
  Class.remove(element, removeCls);
  Class.add(element, addCls);
};

const toAlpha = (component: AlloyComponent, swapConfig: SwappingConfig, _swapState: Stateless): void => {
  swap(component.element, swapConfig.alpha, swapConfig.omega);
};

const toOmega = (component: AlloyComponent, swapConfig: SwappingConfig, _swapState: Stateless): void => {
  swap(component.element, swapConfig.omega, swapConfig.alpha);
};

const clear = (component: AlloyComponent, swapConfig: SwappingConfig, _swapState: Stateless): void => {
  Class.remove(component.element, swapConfig.alpha);
  Class.remove(component.element, swapConfig.omega);
};

const isAlpha = (component: AlloyComponent, swapConfig: SwappingConfig, _swapState: Stateless): boolean =>
  Class.has(component.element, swapConfig.alpha);

const isOmega = (component: AlloyComponent, swapConfig: SwappingConfig, _swapState: Stateless): boolean =>
  Class.has(component.element, swapConfig.omega);

export {
  toAlpha,
  toOmega,
  isAlpha,
  isOmega,
  clear
};


text:
@interface PodsDummy_Pods_Demo_macOS : NSObject
@end
@implementation PodsDummy_Pods_Demo_macOS
@end


text:
Select
  ImportBatch.Code, Sensor.Name, OfferingPhenomenon.Name OfferingPhenomena, Offering.Name Offering, UOMPhenomenon.Name UnitOfMeasurePhenomenon, UnitOfMeasure.Unit, UnitOfMeasure.UnitSymbol, Count(*) Count, AVG(DataValue) Average, MIN(DataValue) Minimum, Max(DataValue) Maximum, STDEV(DataValue) StandardDeviation, VAR(DataValue) Variance
from
  ImportBatch
  left join Observation
      on (Observation.ImportBatchID = ImportBatch.ID)
  left join Sensor
    on (Observation.SensorID = Sensor.ID)
  left join PhenomenonOffering
    on (Observation.PhenomenonOfferingID = PhenomenonOffering.ID)
  left join Offering
    on (PhenomenonOffering.OfferingID = Offering.ID)
  left join Phenomenon OfferingPhenomenon
    on (PhenomenonOffering.PhenomenonID = OfferingPhenomenon.ID)
  left join PhenomenonUOM
    on (Observation.PhenomenonUOMID = PhenomenonUOM.ID)
  left join UnitOfMeasure
    on (PhenomenonUOM.UnitOfMeasureID = UnitOfMeasure.ID)
  left join Phenomenon UOMPhenomenon
    on (PhenomenonUOM.PhenomenonID = UOMPhenomenon.ID)
group by
  ImportBatch.Code, Sensor.Name, OfferingPhenomenon.Name, Offering.Name, UOMPhenomenon.Name, UnitOfMeasure.Unit, UnitOfMeasure.UnitSymbol
order by
  ImportBatch.Code, Sensor.Name, OfferingPhenomenon.Name, Offering.Name, UOMPhenomenon.Name, UnitOfMeasure.Unit, UnitOfMeasure.UnitSymbol


text:
<?php

namespace Kbwebs\MultiAuth\PasswordResets;

use Kbwebs\MultiAuth\PasswordResets\Contracts\CanResetPassword as CanResetPasswordContract;

interface TokenRepositoryInterface
{
    /**
     * Create a new token.
     * @param  \Kbwebs\MultiAuth\PasswordResets\CanResetPassword    $user
     * @param  string                                               $type
     * @return string
     */
    public function create(CanResetPasswordContract $user, $type);

    /**
     * Determine if a token record exists and is valid.
     * @param  \Kbwebs\MultiAuth\PasswordResets\CanResetPassword  $user
     * @param  string  $token
     * @param  string  $type
     * @return bool
     */
    public function exists(CanResetPasswordContract $user, $token, $type);

    /**
     * Delete a token record.
     * @param  string  $token
     * @param  string  $type
     * @return void
     */
    public function delete($token, $type);

    /**
     * Delete expired tokens.
     * @return void
     */
    public function deleteExpired();
}


text:
module Biz
  module Timeline
  end
end

require 'biz/timeline/abstract'

require 'biz/timeline/forward'
require 'biz/timeline/backward'
require 'biz/timeline/proxy'


text:
Retro

retro is the third of many stylesheets to make HTML generated from
markdown look beautiful. A list of all available stylesheets can be found here.

A markdown theme that is a blast to the past.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce vehicula pharetra ultricies. Cras magna turpis,
vestibulum ut arcu et, rutrum porta velit. Curabitur luctus erat a velit tincidunt, vel malesuada nibh tempor.
Mauris condimentum quam lorem, in finibus eros faucibus id. Nunc erat metus, fringilla dignissim faucibus id,
malesuada quis justo.

Vestibulum erat augue, feugiat vitae porttitor vel, condimentum quis ipsum. Etiam sagittis eros et dolor
semper congue.

Curabitur ac euismod turpis. Maecenas gravida viverra augue quis scelerisque. Vivamus quis massa elementum odio
pharetra efficitur at eget nibh. Donec varius purus quis nisi gravida tristique. Quisque dictum justo nec nulla
hendrerit aliquet.

Duis ac ultrices nunc. Proin elit augue, fringilla at varius at, interdum ut justo. Sed sed eros a leo molestie
bibendum. Nullam ac justo malesuada, euismod dui at, finibus purus. Sed mi risus, porta ac sem ac, commodo
semper risus.

Some example code:

gulp.task('watch', function() {
  gulp.watch('*.md', function() {
    gulp.start('md', 'html');
  });

  gulp.watch('*.css', function() {
    gulp.start('css');
  });
});

Lists

Apples

Citrus

Oranges

Grapefruit

Potatoes

Milk

Mow the lawn

Feed the dog

Dance

Crafted with <3 by John Otander(@4lpine).


text:
package com.jxtech.jbo.base;

import java.util.List;

import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.jxtech.db.DBFactory;
import com.jxtech.db.DataQuery;
import com.jxtech.jbo.App;
import com.jxtech.jbo.auth.JxSession;
import com.jxtech.jbo.util.JxException;
import com.jxtech.util.CacheUtil;
import com.jxtech.util.StrUtil;

/**
 * 处理Maxapps表
 *
 * @author wmzsoft@gmail.com
 * @date 2013.08
 */
public class JxAppsDao {
    private static final Logger LOG = LoggerFactory.getLogger(JxAppsDao.class);
    public static final String CACHE_PREX = "APP.";

    public static JxApps getApp(String appName) throws JxException {
        if (StrUtil.isNull(appName)) {
            App app = JxSession.getApp();
            if (app != null) {
                appName = app.getAppName();
            }
        }
        if (StrUtil.isNull(appName)) {
            LOG.info("app name is null.");
            return null;
        }
        return query(appName);
    }

    private static JxApps query(String appName) throws JxException {
        if (StrUtil.isNull(appName)) {
            return null;
        }
        // 从缓存中,检查是否以前读取过基本信息
        String cachekey = StrUtil.contact(CACHE_PREX, appName.toUpperCase());
        Object obj = CacheUtil.getBase(cachekey);
        if (obj instanceof JxApps) {
            return (JxApps) obj;
        }
        DataQuery dq = DBFactory.getDataQuery(null, null);
        String msql = "Select * From MAXAPPS where app = ?";
        List<JxApps> list = dq.getResult(new BeanListHandler<JxApps>(JxApps.class), msql, new Object[] { appName.toUpperCase() });
        if (list != null && !list.isEmpty()) {
            JxApps app = list.get(0);
            CacheUtil.putBaseCache(cachekey, app);
            return app;
        } else {
            LOG.info("app[" + appName + "] is null,请在Maxapps中进行配置,谢谢。");
        }
        return null;
    }

    public static JxApps getAppByMaintbname(String tablename) throws JxException {
        if (StrUtil.isNull(tablename)) {
            return null;
        }
        // 从缓存中,检查是否以前读取过基本信息
        String cachekey = StrUtil.contact(CACHE_PREX, "t.", tablename.toUpperCase());
        Object obj = CacheUtil.getBase(cachekey);
        if (obj instanceof JxApps) {
            return (JxApps) obj;
        }
        DataQuery dq = DBFactory.getDataQuery(null, null);
        String msql = "Select * From MAXAPPS where maintbname = ?";
        List<JxApps> list = dq.getResult(new BeanListHandler<JxApps>(JxApps.class), msql, new Object[] { tablename.toUpperCase() });
        if (list != null && !list.isEmpty()) {
            JxApps app = list.get(0);
            CacheUtil.putBaseCache(cachekey, app);
            return app;
        }
        return null;

    }
}


text:
package fakes

type HeaderData struct {
	Key   string
	Value string
}

type RequestData struct {
	RequestID string
	Url       string
	Verb      string
	Body      []byte
	Headers   []HeaderData
}

type Requests []RequestData

func FlattenHeaders(h map[string][]string) []HeaderData {
	f := []HeaderData{}
	for k, vv := range h {
		for _, v := range vv {
			f = append(f, HeaderData{Key: k, Value: v})
		}
	}
	return f
}


text:
/* unary operators are constructed in "build_DTGs" by calling
 * "addTransition" with the appropriate arguments: for every
 * pre-postcondition pair of an operator, an edge in the
 * DTG is built between the corresponding values in the dtg of the
 * variable, annotated with all prevail conditions and preconditions and
 * effect conditions of that postcondition.
 */

#include "domain_transition_graph_symb.h"
#include "operator.h"
#include "axiom.h"
#include "variable.h"
#include "scc.h"

#include <algorithm>
#include <cassert>
#include <iostream>
using namespace std;

DomainTransitionGraphSymb::DomainTransitionGraphSymb(const Variable &var) {
    //cout << "creating symbolical DTG for " << var.get_name() << endl;
    int range = var.get_range();
    if(range == -1) {
        range = 0;
    }
    vertices.clear();
    vertices.resize(range);
    level = var.get_level();
    assert(level != -1);
}

void DomainTransitionGraphSymb::addTransition(int from, int to,
        const Operator &op, int op_index, trans_type type,
        vector<Variable *> variables)
{
    class self_fulfilled_ {
        public:
            bool operator()(const vector<Operator::PrePost> &pre_post_start,
                    const Variable *var, const int &val) {
                for(unsigned int j = 0; j < pre_post_start.size(); j++)
                    if(pre_post_start[j].var == var && pre_post_start[j].post == val)
                        return true;
                return false;
            }
    } self_fulfilled;

    Transition trans(to, op_index, type);
    SetEdgeCondition &cond = trans.set_condition;
    const vector<Operator::Prevail> &prevail_start = op.get_prevail_start();
    const vector<Operator::Prevail> &prevail_overall = op.get_prevail_overall();
    const vector<Operator::Prevail> &prevail_end = op.get_prevail_end();
    const vector<Operator::PrePost> &pre_post_start = op.get_pre_post_start();
    const vector<Operator::PrePost> &pre_post_end = op.get_pre_post_end();

    assert(type == compressed || type == end || type == start);

    //  if(type == compressed) {
    // insert all at-start conditions
    for(int i = 0; i < prevail_start.size(); i++) {
        cond.insert(std::tr1::make_tuple(prevail_start[i].var, prevail_start[i].prev, start_cond));
    }
    // insert all overall conditions if not satiesfied by an at-start effect of the same operator
    for(int i = 0; i < prevail_overall.size(); i++) {
        if(!self_fulfilled(pre_post_start, prevail_overall[i].var,
                    prevail_overall[i].prev)) {
            cond.insert(std::tr1::make_tuple(prevail_overall[i].var, prevail_overall[i].prev, overall_cond));
        }
    }

    // insert all end conditions if not satiesfied by an at-start effect of the same operator
    for(int i = 0; i < prevail_end.size(); i++) {
        if(!self_fulfilled(pre_post_start, prevail_end[i].var, prevail_end[i].prev)) {
            cond.insert(std::tr1::make_tuple(prevail_end[i].var, prevail_end[i].prev, end_cond));
        }
    }
    //  }
    //  if(type == compressed) {
    // for each start effect, if the effect affects the Variable of this DTG, insert its SAS-Precondition,
    // if it affects another variable, add its start effect conditions.
    for(int i = 0; i < pre_post_start.size(); i++) {
        if(pre_post_start[i].var->get_level() != level && pre_post_start[i].pre
                != -1) {
            cond.insert(std::tr1::make_tuple(pre_post_start[i].var, pre_post_start[i].pre, start_cond));
        } else if(pre_post_start[i].var->get_level() == level
                && pre_post_start[i].is_conditional_effect) {
            for(int j = 0; j < pre_post_start[i].effect_conds_start.size(); j++)
                cond.insert(std::tr1::make_tuple(pre_post_start[i].effect_conds_start[j].var,
                            pre_post_start[i].effect_conds_start[j].cond, start_cond));
        }
    }

    // for each end effect, if the effect affects the Variable of this DTG, insert its SAS-Precondition,
    // if it affects another variable, add its end effect conditions (if they are not satiesfied by an
    // start effect of the same operator).
    for(int i = 0; i < pre_post_end.size(); i++) {
        if(pre_post_end[i].var->get_level() != level && pre_post_end[i].pre != -1) {
            if(!self_fulfilled(pre_post_start, pre_post_end[i].var,
                        pre_post_end[i].pre)) {
                cond.insert(std::tr1::make_tuple(pre_post_end[i].var, pre_post_end[i].pre, end_cond));
            }
        } else if(pre_post_end[i].var->get_level() == level
                && pre_post_end[i].is_conditional_effect) {
            for(int j = 0; j < pre_post_end[i].effect_conds_end.size(); j++) {
                if(!self_fulfilled(pre_post_start,
                        pre_post_end[i].effect_conds_end[j].var,
                        pre_post_end[i].effect_conds_end[j].cond)) {
                    cond.insert(std::tr1::make_tuple(
                            pre_post_end[i].effect_conds_end[j].var,
                            pre_post_end[i].effect_conds_end[j].cond, end_cond));
                }
            }
        }

    }
    //write from set to vector
    EdgeCondition &cond_vec = trans.condition;
    for(SetEdgeCondition::iterator it = cond.begin(); it != cond.end(); ++it) {
        //cout << "writing [" << (*it).first->get_level() << "," << (*it).second << "]" << endl;
        cond_vec.push_back(*it);
    }

    trans.duration = op.get_duration_cond();
    vertices[from].push_back(trans);
}

void DomainTransitionGraphSymb::addAxRelTransition(int from, int to,
        const Axiom_relational &ax, int ax_index) {
    Transition trans(to, ax_index, ax_rel);
    EdgeCondition &cond = trans.condition;
    const vector<Condition> &ax_conds = ax.get_conditions();
    for(int i = 0; i < ax_conds.size(); i++)
        if(true) // [cycles]
            // if(prevail[i].var->get_level() < level) // [no cycles]
            cond.push_back(std::tr1::make_tuple(ax_conds[i].var, ax_conds[i].cond, ax_cond));
    vertices[from].push_back(trans);
}

bool DomainTransitionGraphSymb::Transition::operator<(const Transition &other) const {
    if (target != other.target)
        return target < other.target;
    else if (duration.var != other.duration.var)
        return duration.var < other.duration.var;
    return (condition.size() < other.condition.size());
}

void DomainTransitionGraphSymb::Transition::dump() {
    cout << "target: " << target << ", dur_var: " << duration.var->get_level()
        << endl;
    for(int k = 0; k < condition.size(); k++) {
        cout << " " << std::tr1::get<0>(condition[k])->get_level() << " : "
            << std::tr1::get<1>(condition[k]) << " (" << std::tr1::get<2>(condition[k]) << ")" << endl;
    }
}

void DomainTransitionGraphSymb::finalize() {
    for(int i = 0; i < vertices.size(); i++) {

        //    if((level == 6) && (i == 0)) {
        //      cout << "before sorting transitions: " << endl;
        //      for(int j = 0; j < vertices[i].size(); j++)
        //	vertices[i][j].dump();
        //    }

        //    for(int j = 0; j < vertices[i].size(); j++) {
        //	cout << " " << j << endl;
        //	vertices[i][j].dump();
        //    }
        // For all sources, sort transitions according to targets and condition length
        sort(vertices[i].begin(), vertices[i].end());

        vertices[i].erase(unique(vertices[i].begin(), vertices[i].end()),
                vertices[i].end());

        //    if((level == 6) && (i == 0)) {
        //      cout << "after sorting transitions: " << endl;
        //      for(int j = 0; j < vertices[i].size(); j++)
        //	vertices[i][j].dump();
        //    }

        // For all transitions, sort conditions (acc. to pointer addresses)
        for(int j = 0; j < vertices[i].size(); j++) {
            Transition &trans = vertices[i][j];
            sort(trans.condition.begin(), trans.condition.end());
        }

        //    if((level == 6) && (i == 0)) {
        //      cout << "after sorting conditions: " << endl;
        //      for(int j = 0; j < vertices[i].size(); j++)
        //	vertices[i][j].dump();
        //    }

        // Look for dominated transitions
        vector<Transition> undominated_trans;
        vector<bool> is_dominated;
        is_dominated.resize(vertices[i].size(), false);
        for(int j = 0; j < vertices[i].size(); j++) {
            if(!is_dominated[j]) {
                Transition &trans = vertices[i][j];
                undominated_trans.push_back(trans);
                EdgeCondition &cond = trans.condition;
                int comp = j + 1; // compare transition no. j to no. comp
                // comp is dominated if it has same target and same duration and more conditions
                while(comp < vertices[i].size()) {
                    if(is_dominated[comp]) {
                        comp++;
                        continue;
                    }
                    Transition &other_trans = vertices[i][comp];
                    assert(other_trans.target >= trans.target);
                    if(other_trans.target != trans.target)
                        break; // transition and all after it have different targets
                    if(other_trans.duration.var != NULL &&
                       trans.duration.var != NULL &&
                       other_trans.duration.var->get_level() != trans.duration.var->get_level())
                        break; // transition and all after it have different durations
                    else { //domination possible
                        if(other_trans.condition.size() < cond.size()) {
                            cout << "level: " << level << ", i: " << i << ", j: " << j;
                            assert(false);
                        }
                        if(cond.size() == 0) {
                            is_dominated[comp] = true; // comp is dominated
                            comp++;
                        } else {
                            bool same_conditions = true;
                            for(int k = 0; k < cond.size(); k++) {
                                bool cond_k = false;
                                for(int l = 0; l < other_trans.condition.size(); l++) {
                                    if(std::tr1::get<0>(other_trans.condition[l]) > std::tr1::get<0>(cond[k])) {
                                        break; // comp doesn't have this condition, not dominated
                                    }
                                    if(std::tr1::get<0>(other_trans.condition[l]) == std::tr1::get<0>(cond[k])
                                            && std::tr1::get<1>(other_trans.condition[l]) == std::tr1::get<1>(cond[k])) {
                                        // FIXME: should we also check the type of the condition at this point?
                                        cond_k = true;

                                        break; // comp has this condition, look for next cond
                                    }
                                }
                                if(!cond_k) { // comp is not dominated
                                    same_conditions = false;
                                    break;
                                }
                            }
                            is_dominated[comp] = same_conditions;
                            comp++;
                        }
                    }
                }
            }
        }

        vertices[i].swap(undominated_trans);

        //    if((level == 6) && (i == 0)) {
        //      cout << "after searching for dominated transitions: " << endl;
        //      for(int j = 0; j < vertices[i].size(); j++)
        //	vertices[i][j].dump();
        //    }

    }
}

bool DomainTransitionGraphSymb::is_strongly_connected() const {
    vector<vector<int> > easy_graph;
    for(int i = 0; i < vertices.size(); i++) {
        vector<int> empty_vector;
        easy_graph.push_back(empty_vector);
        for(int j = 0; j < vertices[i].size(); j++) {
            const Transition &trans = vertices[i][j];
            easy_graph[i].push_back(trans.target);
        }
    }
    vector<vector<int> > sccs = SCC(easy_graph).get_result();
    //  cout << "easy graph sccs for var " << level << endl;
    //   for(int i = 0; i < sccs.size(); i++) {
    //     for(int j = 0; j < sccs[i].size(); j++)
    //       cout << " " << sccs[i][j];
    //     cout << endl;
    //   }
    bool connected = false;
    if(sccs.size() == 1) {
        connected = true;
        //cout <<"is strongly connected" << endl;
    }
    //else cout << "not strongly connected" << endl;
    return connected;
}

void DomainTransitionGraphSymb::dump() const {
    cout << "Symbolical DTG!" << endl;
    for(int i = 0; i < vertices.size(); i++) {
        cout << "  From value " << i << ":" << endl;
        for(int j = 0; j < vertices[i].size(); j++) {
            const Transition &trans = vertices[i][j];
            cout << "    " << "To value " << trans.target << endl;
            if(trans.type == start || trans.type == end || trans.type == compressed)
                cout << "     duration " << trans.duration.op << " "
                    << trans.duration.var->get_level() << endl;
            else
                cout << "     " << "axiom" << endl;
            for(int k = 0; k < trans.condition.size(); k++)
                cout << "      if " << std::tr1::get<0>(trans.condition[k])->get_level() << " = "
                    << std::tr1::get<1>(trans.condition[k]) <<  " (" << std::tr1::get<2>(trans.condition[k]) << ")" << endl;
        }
    }
}

void DomainTransitionGraphSymb::generate_cpp_input(ostream &outfile) const {
    //outfile << vertices.size() << endl; // the variable's range
    for(int i = 0; i < vertices.size(); i++) {
        outfile << vertices[i].size() << endl; // number of transitions from this value
        for(int j = 0; j < vertices[i].size(); j++) {
            const Transition &trans = vertices[i][j];
            outfile << trans.target << endl; // target of transition
            outfile << trans.op << endl; // operator doing the transition
            //duration:
            if(trans.type == compressed)
                outfile << "c" << endl;
            else if(trans.type == start)
                outfile << "s" << endl;
            else if(trans.type == end)
                outfile << "e" << endl;
            else {
                assert(trans.type==ax_rel);
                outfile << "a" << endl;
            }
            if(trans.type == start || trans.type == end || trans.type == compressed)
                outfile << trans.duration.op << " " << trans.duration.var->get_level()
                    << endl;
            // calculate number of important prevail conditions
            int number = 0;
            for(int k = 0; k < trans.condition.size(); k++)
                if(std::tr1::get<0>(trans.condition[k])->get_level() != -1)
                    number++;
            outfile << number << endl;
            for(int k = 0; k < trans.condition.size(); k++)
                if(std::tr1::get<0>(trans.condition[k])->get_level() != -1)
                    outfile << std::tr1::get<0>(trans.condition[k])->get_level() << " "
                        << std::tr1::get<1>(trans.condition[k]) << " " << std::tr1::get<2>(trans.condition[k]) << endl; // condition: var, val
        }
    }
}


text:
#include "greentea-client/test_env.h"
#include "mbed.h"
#include "udp_tests.h"
#include "UDPSocket.h"
#include "unity/unity.h"
#include "utest.h"

using namespace utest::v1;

void UDPSOCKET_BIND_ADDRESS_INVALID()
{
    UDPSocket *sock = new UDPSocket;
    if (!sock) {
        TEST_FAIL();
    }
    TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock->open(NetworkInterface::get_default_instance()));

    nsapi_error_t bind_result = NSAPI_ERROR_OK;
    if (get_ip_version() == NSAPI_IPv4) {
        SocketAddress a("190.2.3.4", 1024);
        bind_result = sock->bind(a);
    } else if (get_ip_version() == NSAPI_IPv6) {
        SocketAddress a("fe80::ff01", 1024);
        bind_result = sock->bind(a);
    } else {
        TEST_FAIL_MESSAGE("This stack is neither IPv4 nor IPv6");
    }

    if (bind_result == NSAPI_ERROR_UNSUPPORTED) {
        TEST_IGNORE_MESSAGE("bind() not supported");
    } else {
        TEST_ASSERT_EQUAL(NSAPI_ERROR_PARAMETER, bind_result);
    }

    delete sock;
}


text:
use std::cell::RefCell;

use slog::debug;
use wayland_server::{
    protocol::{
        wl_data_device::{self, WlDataDevice},
        wl_seat::WlSeat,
    },
    Client, DataInit, Dispatch, DisplayHandle, Resource,
};

use crate::{
    input::{pointer::Focus, Seat, SeatHandler},
    utils::Serial,
    wayland::{
        compositor,
        data_device::seat_data::{SeatData, Selection},
        seat::WaylandFocus,
    },
};

use super::{dnd_grab, DataDeviceHandler, DataDeviceState};

/// WlSurface role of drag and drop icon
pub const DND_ICON_ROLE: &str = "dnd_icon";

#[doc(hidden)]
#[derive(Debug)]
pub struct DataDeviceUserData {
    pub(crate) wl_seat: WlSeat,
}

impl<D> Dispatch<WlDataDevice, DataDeviceUserData, D> for DataDeviceState
where
    D: Dispatch<WlDataDevice, DataDeviceUserData>,
    D: DataDeviceHandler,
    D: SeatHandler,
    <D as SeatHandler>::PointerFocus: WaylandFocus,
    <D as SeatHandler>::KeyboardFocus: WaylandFocus,
    D: 'static,
{
    fn request(
        handler: &mut D,
        _client: &Client,
        resource: &WlDataDevice,
        request: wl_data_device::Request,
        data: &DataDeviceUserData,
        dh: &DisplayHandle,
        _data_init: &mut DataInit<'_, D>,
    ) {
        let data_device_state = handler.data_device_state();

        if let Some(seat) = Seat::<D>::from_resource(&data.wl_seat) {
            match request {
                wl_data_device::Request::StartDrag {
                    source,
                    origin,
                    icon,
                    serial,
                } => {
                    let serial = Serial::from(serial);
                    if let Some(pointer) = seat.get_pointer() {
                        if pointer.has_grab(serial) {
                            if let Some(ref icon) = icon {
                                if compositor::give_role(icon, DND_ICON_ROLE).is_err() {
                                    resource.post_error(
                                        wl_data_device::Error::Role,
                                        "Given surface already has an other role",
                                    );
                                    return;
                                }
                            }
                            // The StartDrag is in response to a pointer implicit grab, all is good
                            handler.started(source.clone(), icon.clone(), seat.clone());
                            let start_data = pointer.grab_start_data().unwrap();
                            pointer.set_grab(
                                handler,
                                dnd_grab::DnDGrab::new(dh, start_data, source, origin, seat, icon),
                                serial,
                                Focus::Clear,
                            );
                            return;
                        }
                    }
                    debug!(
                        &data_device_state.log,
                        "denying drag from client without implicit grab"
                    );
                }
                wl_data_device::Request::SetSelection { source, .. } => {
                    if let Some(keyboard) = seat.get_keyboard() {
                        if keyboard.client_of_object_has_focus(&resource.id()) {
                            let seat_data = seat.user_data().get::<RefCell<SeatData>>().unwrap();

                            handler.new_selection(source.clone());
                            // The client has kbd focus, it can set the selection
                            seat_data.borrow_mut().set_selection::<D>(
                                dh,
                                source.map(Selection::Client).unwrap_or(Selection::Empty),
                            );
                            return;
                        }
                    }
                    debug!(
                        &data_device_state.log,
                        "denying setting selection by a non-focused client"
                    );
                }
                wl_data_device::Request::Release => {
                    // Clean up the known devices
                    seat.user_data()
                        .get::<RefCell<SeatData>>()
                        .unwrap()
                        .borrow_mut()
                        .retain_devices(|ndd| ndd != resource)
                }
                _ => unreachable!(),
            }
        }
    }
}


text:
layout: page
title: "Page Not Found"
permalink: /404.html
---

Sorry, but the page you were trying to view does not exist.


text:
<?xml version="1.0"?>
<!--

-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Magento\Sales\Block\Adminhtml\Order\Create\Giftmessage" template="order/create/giftmessage.phtml" name="giftmessage"/>
        </referenceContainer>
    </body>
</page>


text:
<?php

declare(strict_types=1);

namespace Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20210721144406 extends AbstractMigration
{
    public function getDescription(): string
    {
        return '';
    }

    public function up(Schema $schema): void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
        $this->addSql('ALTER TABLE assignment ADD max_points_deadline_interpolation TINYINT(1) NOT NULL');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
        $this->addSql('ALTER TABLE assignment DROP max_points_deadline_interpolation');
    }
}


text:
class AClass
{
    public int get() {
        int i = <warning descr="Static member 'AClass.fff' accessed via instance reference">this.fff</warning>;
        return i;
    }
    public static AClass getA() {
        return null;
    }

    Object gg()
    {
      return <warning descr="Static member 'AClass.getA()' accessed via instance reference">this.getA</warning>();
    }
    static int fff;

    protected static class R {
        static int rr = 0;
    }
    public R getR() {
        return null;
    }
}

class anotherclass {
    int f(AClass d){
        int i = <warning descr="Static member 'AClass.R.rr' accessed via instance reference">d.getR().rr</warning>;
        return i;
    }
}


text:
package org.laoguo.proxy;

public class SubjectStaciFactory {
	public static Subject getInstance(){
		return new ProxySubject(new RealSubject());
	}
}


text:
<form action="{{ Request::getRequestUri() }}" method="get" class="input-group pull-right"
      style="width: 200px; margin-left: 10px">
    <input type="text" name="search" class="form-control pull-right" placeholder="Search">
</form>


text:
export default {
  getToken() {
    return JSON.parse(window.localStorage.getItem('token'))
  },
  setToken(obj) {
    window.localStorage.setItem('token', JSON.stringify(obj))
  },
  getUser() {
    return JSON.parse(window.localStorage.getItem('userinfo'))
  },
  setUser(obj) {
    window.localStorage.setItem('userinfo', JSON.stringify(obj))
  },
  clear() {
    window.localStorage.removeItem('token')
    window.localStorage.removeItem('userinfo')
  }
}


text:
namespace MigrationTools._EngineV1.Configuration.FieldMap
{
    public class FieldLiteralMapConfig : IFieldMapConfig
    {
        public string FieldMap => "FieldLiteralMap";

        public string WorkItemTypeName { get; set; }

        public string targetField { get; set; }

        public string value { get; set; }
    }
}


text:
<?php

namespace SocialiteProviders\Sage;

use GuzzleHttp\RequestOptions;
use SocialiteProviders\Manager\OAuth2\AbstractProvider;
use SocialiteProviders\Manager\OAuth2\User;

class Provider extends AbstractProvider
{
    public const IDENTIFIER = 'SAGE';

    /**
     * {@inheritdoc}
     */
    protected $scopes = ['full_access'];

    /**
     * {@inheritdoc}
     */
    protected function getAuthUrl($state)
    {
        return $this->buildAuthUrlFromBase('https://www.sageone.com/oauth2/auth/central', $state);
    }

    /**
     * {@inheritdoc}
     */
    protected function getTokenUrl()
    {
        return 'https://oauth.accounting.sage.com/token';
    }

    /**
     * {@inheritdoc}
     */
    protected function getUserByToken($token)
    {
        $response = $this->getHttpClient()->get('https://api.accounting.sage.com/v3.1/user', [
            RequestOptions::HEADERS => [
                'Authorization' => 'Bearer '.$token,
            ],
        ]);

        return json_decode((string) $response->getBody(), true);
    }

    /**
     * {@inheritdoc}
     */
    protected function mapUserToObject(array $user)
    {
        return (new User())->map([
            'id'            => $user['id'],
            'name'          => $user['first_name'].' '.$user['last_name'],
            'first_name'    => $user['first_name'],
            'last_name'     => $user['last_name'],
            'email'         => $user['email'],
            'locale'        => $user['locale'],
        ]);
    }

    /**
     * {@inheritdoc}
     */
    protected function getTokenFields($code)
    {
        return array_merge(parent::getTokenFields($code), [
            'grant_type' => 'authorization_code',
        ]);
    }
}


text:
namespace ash {

class FloatingMenuButton;
class TrayBackgroundView;

class FloatingAccessibilityBubbleView : public TrayBubbleView {
 public:
  explicit FloatingAccessibilityBubbleView(
      const TrayBubbleView::InitParams& init_params);
  FloatingAccessibilityBubbleView(const FloatingAccessibilityBubbleView&) =
      delete;
  FloatingAccessibilityBubbleView& operator=(
      const FloatingAccessibilityBubbleView&) = delete;
  ~FloatingAccessibilityBubbleView() override;

  // TrayBubbleView:
  bool IsAnchoredToStatusArea() const override;
  bool AcceleratorPressed(const ui::Accelerator& accelerator) override;

  // views::View:
  const char* GetClassName() const override;
};

// This floating view displays the currently enabled accessibility options,
// along with buttons to configure them.
// ---- Layout:
// ----  ?[Dictation] ?[SelectToSpeak] ?[VirtualKeyboard]
// ----  | [Open settings list]
// ----  | [Change menu location]
class FloatingAccessibilityView : public views::View,
                                  public views::ButtonListener,
                                  public views::ViewObserver {
 public:
  // Used for testing. Starts 1 because views IDs should not be 0.
  enum ButtonId {
    kPosition = 1,
    kSettingsList = 2,
    kDictation = 3,
    kSelectToSpeak = 4,
    kVirtualKeyboard = 5,
  };
  class Delegate {
   public:
    // When the user click on the settings list button.
    virtual void OnDetailedMenuEnabled(bool enabled) {}
    // When the layout of the view changes and we may need to reposition
    // ourselves.
    virtual void OnLayoutChanged() {}
    virtual ~Delegate() = default;
  };

  FloatingAccessibilityView(Delegate* delegate);
  FloatingAccessibilityView& operator=(const FloatingAccessibilityView&) =
      delete;
  ~FloatingAccessibilityView() override;
  FloatingAccessibilityView(const FloatingAccessibilityView&) = delete;

  // Initizlizes feature button views. Should be called after the view is
  // connected to a widget.
  void Initialize();

  void SetMenuPosition(FloatingMenuPosition position);
  void SetDetailedViewShown(bool shown);

  void FocusOnDetailedViewButton();

 private:
  // views::ButtonListener:
  void ButtonPressed(views::Button* sender, const ui::Event& event) override;

  // views::View:
  const char* GetClassName() const override;

  // views::ViewObserver:
  void OnViewVisibilityChanged(views::View* observed_view,
                               views::View* starting_view) override;
  // Feature buttons:
  TrayBackgroundView* dictation_button_ = nullptr;
  TrayBackgroundView* select_to_speak_button_ = nullptr;
  TrayBackgroundView* virtual_keyboard_button_ = nullptr;

  // Button to list all available features.
  FloatingMenuButton* a11y_tray_button_ = nullptr;
  // Button to move the view around corners.
  FloatingMenuButton* position_button_ = nullptr;

  Delegate* const delegate_;
};

}  // namespace ash

#endif  // ASH_SYSTEM_ACCESSIBILITY_FLOATING_ACCESSIBILITY_VIEW_H_


text:
<plugin class="hudg" author="sparky" version="4.0" headersize="Main">

<enum16 name="Messaging Parameters.Anchor" offset="0x00">
	<option name="Top Left" value="00"/>
	<option name="Top Right" value="01"/>
	<option name="Bottom Left" value="02"/>
	<option name="Bottom Right" value="03"/>
	<option name="Center" value="04"/>
</enum16>

<short name="Messaging Parameters.Anchor Offset: x" offset="0x24"/>
<short name="Messaging Parameters.Anchor Offset: y" offset="0x26"/>

<float name="Messaging Parameters.Width Scale" offset="0x28"/>
<float name="Messaging Parameters.Height Scale" offset="0x2C"/>

<bitmask16 name="Messaging Parameters.Scaling Flags" offset="0x30">
	<option name="Don't Scale Offset" value="15"/>
	<option name="Don't Scale Size" value="14"/>
	<option name="Use High-Resolution Scale" value="13"/>
</bitmask16>

<dependency name="Messaging Parameters.Single Player Font" offset="0x48"/>
<dependency name="Messaging Parameters.Multiplayer Font" offset="0x58"/>

<float name="Messaging Parameters.Up Time" offset="0x68"/>
<float name="Messaging Parameters.Fade Time" offset="0x6C"/>

<colorARGB name="Messaging Parameters.Icon Color" offset="0x70"/>
<colorARGB name="Messaging Parameters.Text Color" offset="0x80"/>

<float name="Messaging Parameters.Text Spacing" offset="0x90"/>

<dependency name="Messaging Parameters.Item Message Text" offset="0x94"/>
<dependency name="Messaging Parameters.Icon Bitmap" offset="0xA4"/>
<dependency name="Messaging Parameters.Alternate Icon Text" offset="0xB4"/>

<struct name="Button Icons" info="a, b, x, y, black, white, left trigger, right trigger, dpad up, dpad down, dpad left, dpad right, start, back, left thumb, right thumb, left stick (not a button), right stick (not a button)" offset="0xC4" size="16">
	<short name="Messaging Information.Sequence Index" info="into the global HUD icon bitmap" offset="0x00"/>
	<short name="Messaging Information.Width Offset" info="extra spacing beyond bitmap width for text alignment" offset="0x02"/>
	<short name="Messaging Information.Offset From Reference Corner: x" offset="0x04"/>
	<short name="Messaging Information.Offset From Reference Corner: y" offset="0x06"/>

	<colorbyte name="Messaging Information.Override Icon Color" offset="0x08"/>

	<char name="Messaging Information.Frame Rate" note="0 - 30 only" offset="0x0C"/>

	<bitmask16 name="Messaging Information.Flags" offset="0x0D">
		<option name="Use Text From String_List Instead" value="15"/>
		<option name="Override Default Color" value="14"/>
		<option name="Width Offset is Absolute Icon Width" value="13"/>
	</bitmask16>

	<short name="Messaging Information.Text Index" offset="0x0E"/>
</struct>

<colorbyte name="HUD Help Text Color.Default Color" offset="0xD0"/>
<colorbyte name="HUD Help Text Color.Flashing Color" offset="0xD4"/>

<float name="HUD Help Text Color.Flash Period" offset="0xD8"/>
<float name="HUD Help Text Color.Flash Delay" offset="0xDC"/>

<short name="HUD Help Text Color.Number of Flashes" offset="0xE0"/>

<bitmask8 name="HUD Help Text Color.Flash Flags" offset="0xE2">
	<option name="Reverse Default / Flashing Colors" value="07"/>
</bitmask8>

<float name="HUD Help Text Color.Flash Length" offset="0xE4"/>

<colorbyte name="HUD Help Text Color.Disabled Color" offset="0xE8"/>

<dependency name="Other HUD Messaging Data.HUD Messages" offset="0xF0"/>

<colorbyte name="Objective Colors.Default Color" offset="0x100"/>
<colorbyte name="Objective Colors.Flashing Color" offset="0x104"/>

<float name="Objective Colors.Flash Period" offset="0x108"/>
<float name="Objective Colors.Flash Delay" offset="0x10C"/>

<short name="Objective Colors.Number of Flashes" offset="0x110"/>

<bitmask8 name="Objective Colors.Flash Flags" offset="0x112">
	<option name="Reverse Default / Flashing Colors" value="07"/>
</bitmask8>

<float name="Objective Colors.Flash Length" offset="0x114"/>

<colorbyte name="Objective Colors.Disabled Color" offset="0x118"/>

<short name="Objective Colors.Uptime Ticks" offset="0x11C"/>
<short name="Objective Colors.Fade Ticks" offset="0x11E"/>

<float name="Waypoint Parameters.Top Offset" info_img="hudg Waypoint Parameters.png" offset="0x120"/>
<float name="Waypoint Parameters.Bottom Offset" info_img="hudg Waypoint Parameters.png" offset="0x124"/>
<float name="Waypoint Parameters.Left Offset" info_img="hudg Waypoint Parameters.png" offset="0x128"/>
<float name="Waypoint Parameters.Right Offset" info_img="hudg Waypoint Parameters.png" offset="0x12C"/>

<dependency name="Waypoint Parameters.Arrow Bitmap" info_img="hudg Waypoint Parameters.png" offset="0x150"/>

<struct name="Waypoint Arrows" offset="0x160" size="104">
	<string32 name="Name" offset="0x00"/>

	<colorbyte name="Color" offset="0x28"/>

	<float name="Opacity" offset="0x2C"/>
	<float name="Translucency" offset="0x30"/>

	<short name="On-Screen Sequence Index" offset="0x34"/>
	<short name="Off-Screen Sequence Index" offset="0x36"/>
	<short name="Occluded Sequence Index" offset="0x38"/>

	<bitmask8 name="Flags" offset="0x4C">
		<option name="Don't Rotate When Pointing Off-Screen" value="07"/>
	</bitmask8>
</struct>

<float name="Multiplayer Parameters.HUD Scale in Multiplayer" offset="0x1BC"/>

<dependency name="HUD Globals.Default Weapon HUD" offset="0x2C0"/>
<float name="HUD Globals.Motion Sensor Range" offset="0x2D0"/>
<float name="HUD Globals.Motion Sensor Velocity Sensitivity" info="how fast something moves to show up on the motion sensor; remember to consider uphill/downhill speed multipliers!" offset="0x2D4"/>
<float name="HUD Globals.Motion Sensor Scale" info="DON'T TOUCH EVER" offset="0x2D8"/>

<short name="HUD Globals.Default Chapter Title Bounds: top" offset="0x2DC"/>
<short name="HUD Globals.Default Chapter Title Bounds: left" offset="0x2DE"/>
<short name="HUD Globals.Default Chapter Title Bounds: bottom" offset="0x2E0"/>
<short name="HUD Globals.Default Chapter Title Bounds: right" offset="0x2E2"/>

<short name="HUD Damage Indicators.Top Offset" offset="0x310"/>
<short name="HUD Damage Indicators.Bottom Offset" offset="0x312"/>
<short name="HUD Damage Indicators.Left Offset" offset="0x314"/>
<short name="HUD Damage Indicators.Right Offset" offset="0x316"/>

<dependency name="HUD Damage Indicators.Indicator Bitmap" offset="0x338"/>

<short name="HUD Damage Indicators.Sequence Index" offset="0x348"/>
<short name="HUD Damage Indicators.Multiplayer Sequence Index" offset="0x34A"/>

<colorbyte name="HUD Damage Indicators.Color" offset="0x34C"/>

<colorbyte name="HUD Timer Definitions.Not Much Time Left Flash Color.Default Color" offset="0x360"/>
<colorbyte name="HUD Timer Definitions.Not Much Time Left Flash Color.Flashing Color" offset="0x364"/>

<float name="HUD Timer Definitions.Not Much Time Left Flash Color.Flash Period" offset="0x368"/>
<float name="HUD Timer Definitions.Not Much Time Left Flash Color.Flash Delay" offset="0x36C"/>

<short name="HUD Timer Definitions.Not Much Time Left Flash Color.Number of Flashes" offset="0x370"/>

<bitmask8 name="HUD Timer Definitions.Not Much Time Left Flash Color.Flash Flags" offset="0x372">
	<option name="Reverse Default / Flashing Colors" value="07"/>
</bitmask8>

<float name="HUD Timer Definitions.Not Much Time Left Flash Color.Flash Length" offset="0x374"/>

<colorbyte name="HUD Timer Definitions.Not Much Time Left Flash Color.Disabled Color" offset="0x378"/>

<colorbyte name="HUD Timer Definitions.Time Out Flash Color.Default Color" offset="0x380"/>
<colorbyte name="HUD Timer Definitions.Time Out Flash Color.Flashing Color" offset="0x384"/>

<float name="HUD Timer Definitions.Time Out Flash Color.Flash Period" offset="0x388"/>
<float name="HUD Timer Definitions.Time Out Flash Color.Flash Delay" offset="0x38C"/>

<short name="HUD Timer Definitions.Time Out Flash Color.Number of Flashes" offset="0x390"/>

<bitmask8 name="HUD Timer Definitions.Time Out Flash Color.Flash Flags" offset="0x392">
	<option name="Reverse Default / Flashing Colors" value="07"/>
</bitmask8>

<float name="HUD Timer Definitions.Time Out Flash Color.Flash Length" offset="0x394"/>

<colorbyte name="HUD Timer Definitions.Time Out Flash Color.Disabled Color" offset="0x398"/>

<dependency name="HUD Timer Definitions.Time Out Flash Color.Carnage Report Bitmap" offset="0x3C8"/>

<short name="HUD Info That Wouldn't Fit Anywhere Else.Loading Begin Text" offset="0x3D8"/>
<short name="HUD Info That Wouldn't Fit Anywhere Else.Loading End Text" offset="0x3DA"/>
<short name="HUD Info That Wouldn't Fit Anywhere Else.Checkpoint Begin Text" offset="0x3DC"/>
<short name="HUD Info That Wouldn't Fit Anywhere Else.Checkpoint End Text" offset="0x3DE"/>

<dependency name="HUD Info That Wouldn't Fit Anywhere Else.Checkpoint Sound" offset="0x3E0"/>

</plugin>


text:
if(window.jQuery) {
    (function($) {
        $.fn.jsFormValidator = function(method) {
            if (!method) {
                return FpJsFormValidator.customizeMethods.get.apply($.makeArray(this), arguments);
            } else if (typeof method === 'object') {
                return $(FpJsFormValidator.customizeMethods.init.apply($.makeArray(this), arguments));
            } else if (FpJsFormValidator.customizeMethods[method]) {
                return FpJsFormValidator.customizeMethods[method].apply($.makeArray(this), Array.prototype.slice.call(arguments, 1));
            } else {
                $.error('Method ' + method + ' does not exist');
                return this;
            }
        };
    })(jQuery);
}