text:
<!DOCTYPE html>

		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title></title>
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<link rel="stylesheet" href="css/styles.css">

Projects

About

GitHub

Contact

Oh hey I'm a zoomer

redpajama_set_name: RedPajamaGithub


text:
package com.librethinking.remindme.pojos;

/**
 *
 * @author Christian Vielma <cvielma@librethinking.com>
 */
public class Response {
    private String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

}


text:
https://github.com/sebastianbergmann/phpunit/issues/1337
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = '--process-isolation';
$_SERVER['argv'][] = __DIR__ . '/1337/Issue1337Test.php';

require __DIR__ . '/../../../bootstrap.php';
PHPUnit\TextUI\Command::main();
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

..                                                                  2 / 2 (100%)

Time: %s, Memory: %s

OK (2 tests, 2 assertions)


text:
package org.apache.camel.main;

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

import org.apache.camel.CamelConfiguration;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.LambdaRouteBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.spi.BootstrapCloseable;
import org.apache.camel.spi.Configurer;

/**
 * Global configuration for Camel Main to configure context name, stream caching and other global configurations.
 */
@Configurer(bootstrap = true)
public class MainConfigurationProperties extends DefaultConfigurationProperties<MainConfigurationProperties>
        implements BootstrapCloseable {

    private boolean autoConfigurationEnabled = true;
    private boolean autoConfigurationEnvironmentVariablesEnabled = true;
    private boolean autoConfigurationSystemPropertiesEnabled = true;
    private boolean autoConfigurationFailFast = true;
    private boolean autoConfigurationLogSummary = true;
    private int durationHitExitCode;
    private int extraShutdownTimeout = 15;
    private String basePackageScan;
    private boolean basePackageScanEnabled = true;
    private String routesCompileDirectory;
    private boolean routesCompileLoadFirst;

    private String routesBuilderClasses;
    private String configurationClasses;

    private List<RoutesBuilder> routesBuilders = new ArrayList<>();
    private List<CamelConfiguration> configurations = new ArrayList<>();

    // extended configuration
    private HealthConfigurationProperties healthConfigurationProperties;
    private LraConfigurationProperties lraConfigurationProperties;
    private ThreadPoolConfigurationProperties threadPoolProperties;
    private HystrixConfigurationProperties hystrixConfigurationProperties;
    private Resilience4jConfigurationProperties resilience4jConfigurationProperties;
    private FaultToleranceConfigurationProperties faultToleranceConfigurationProperties;
    private RestConfigurationProperties restConfigurationProperties;
    private VaultConfigurationProperties vaultConfigurationProperties;

    @Override
    public void close() {
        if (healthConfigurationProperties != null) {
            healthConfigurationProperties.close();
            healthConfigurationProperties = null;
        }
        if (lraConfigurationProperties != null) {
            lraConfigurationProperties.close();
            lraConfigurationProperties = null;
        }
        if (threadPoolProperties != null) {
            threadPoolProperties.close();
            threadPoolProperties = null;
        }
        if (hystrixConfigurationProperties != null) {
            hystrixConfigurationProperties.close();
            hystrixConfigurationProperties = null;
        }
        if (resilience4jConfigurationProperties != null) {
            resilience4jConfigurationProperties.close();
            resilience4jConfigurationProperties = null;
        }
        if (faultToleranceConfigurationProperties != null) {
            faultToleranceConfigurationProperties.close();
            faultToleranceConfigurationProperties = null;
        }
        if (restConfigurationProperties != null) {
            restConfigurationProperties.close();
            restConfigurationProperties = null;
        }
        if (vaultConfigurationProperties != null) {
            vaultConfigurationProperties.close();
            vaultConfigurationProperties = null;
        }
        if (routesBuilders != null) {
            routesBuilders.clear();
            routesBuilders = null;
        }
        if (configurations != null) {
            configurations.clear();
            configurations = null;
        }
    }

    // extended
    // --------------------------------------------------------------

    /**
     * To configure Health Check
     */
    public HealthConfigurationProperties health() {
        if (healthConfigurationProperties == null) {
            healthConfigurationProperties = new HealthConfigurationProperties(this);
        }
        return healthConfigurationProperties;
    }

    /**
     * Whether there has been any health check configuration specified
     */
    public boolean hasHealthCheckConfiguration() {
        return healthConfigurationProperties != null;
    }

    /**
     * To configure Saga LRA
     */
    public LraConfigurationProperties lra() {
        if (lraConfigurationProperties == null) {
            lraConfigurationProperties = new LraConfigurationProperties(this);
        }
        return lraConfigurationProperties;
    }

    /**
     * Whether there has been any Saga LRA configuration specified
     */
    public boolean hasLraConfiguration() {
        return lraConfigurationProperties != null;
    }

    /**
     * To configure thread pools
     */
    public ThreadPoolConfigurationProperties threadPool() {
        if (threadPoolProperties == null) {
            threadPoolProperties = new ThreadPoolConfigurationProperties(this);
        }
        return threadPoolProperties;
    }

    /**
     * Whether there has been any thread pool configuration specified
     */
    public boolean hasThreadPoolConfiguration() {
        return threadPoolProperties != null;
    }

    /**
     * To configure Circuit Breaker EIP with Hystrix
     */
    @Deprecated
    public HystrixConfigurationProperties hystrix() {
        if (hystrixConfigurationProperties == null) {
            hystrixConfigurationProperties = new HystrixConfigurationProperties(this);
        }
        return hystrixConfigurationProperties;
    }

    /**
     * Whether there has been any Hystrix EIP configuration specified
     */
    public boolean hasHystrixConfiguration() {
        return hystrixConfigurationProperties != null;
    }

    /**
     * To configure Circuit Breaker EIP with Resilience4j
     */
    public Resilience4jConfigurationProperties resilience4j() {
        if (resilience4jConfigurationProperties == null) {
            resilience4jConfigurationProperties = new Resilience4jConfigurationProperties(this);
        }
        return resilience4jConfigurationProperties;
    }

    /**
     * Whether there has been any Resilience4j EIP configuration specified
     */
    public boolean hasResilience4jConfiguration() {
        return resilience4jConfigurationProperties != null;
    }

    /**
     * To configure Circuit Breaker EIP with MicroProfile Fault Tolerance
     */
    public FaultToleranceConfigurationProperties faultTolerance() {
        if (faultToleranceConfigurationProperties == null) {
            faultToleranceConfigurationProperties = new FaultToleranceConfigurationProperties(this);
        }
        return faultToleranceConfigurationProperties;
    }

    /**
     * Whether there has been any MicroProfile Fault Tolerance EIP configuration specified
     */
    public boolean hasFaultToleranceConfiguration() {
        return faultToleranceConfigurationProperties != null;
    }

    /**
     * To configure Rest DSL
     */
    public RestConfigurationProperties rest() {
        if (restConfigurationProperties == null) {
            restConfigurationProperties = new RestConfigurationProperties(this);
        }
        return restConfigurationProperties;
    }

    /**
     * Whether there has been any rest configuration specified
     */
    public boolean hasRestConfiguration() {
        return restConfigurationProperties != null;
    }

    /**
     * To configure access to AWS vaults
     */
    public VaultConfigurationProperties vault() {
        if (vaultConfigurationProperties == null) {
            vaultConfigurationProperties = new VaultConfigurationProperties(this);
        }
        return vaultConfigurationProperties;
    }

    /**
     * Whether there has been any vault configuration specified
     */
    public boolean hasVaultConfiguration() {
        return vaultConfigurationProperties != null;
    }

    // getter and setters
    // --------------------------------------------------------------

    public boolean isAutoConfigurationEnabled() {
        return autoConfigurationEnabled;
    }

    /**
     * Whether auto configuration of components, dataformats, languages is enabled or not. When enabled the
     * configuration parameters are loaded from the properties component. You can prefix the parameters in the
     * properties file with: - camel.component.name.option1=value1 - camel.component.name.option2=value2 -
     * camel.dataformat.name.option1=value1 - camel.dataformat.name.option2=value2 - camel.language.name.option1=value1
     * - camel.language.name.option2=value2 Where name is the name of the component, dataformat or language such as
     * seda,direct,jaxb.
     *

     * The auto configuration also works for any options on components that is a complex type (not standard Java type)
     * and there has been an explicit single bean instance registered to the Camel registry via the
     * {@link org.apache.camel.spi.Registry#bind(String, Object)} method or by using the
     * {@link org.apache.camel.BindToRegistry} annotation style.
     *

     * This option is default enabled.
     */
    public void setAutoConfigurationEnabled(boolean autoConfigurationEnabled) {
        this.autoConfigurationEnabled = autoConfigurationEnabled;
    }

    public boolean isAutoConfigurationEnvironmentVariablesEnabled() {
        return autoConfigurationEnvironmentVariablesEnabled;
    }

    /**
     * Whether auto configuration should include OS environment variables as well. When enabled this allows to overrule
     * any configuration using an OS environment variable. For example to set a shutdown timeout of 5 seconds:
     * CAMEL_MAIN_SHUTDOWNTIMEOUT=5.
     *

     * This option is default enabled.
     */
    public void setAutoConfigurationEnvironmentVariablesEnabled(boolean autoConfigurationEnvironmentVariablesEnabled) {
        this.autoConfigurationEnvironmentVariablesEnabled = autoConfigurationEnvironmentVariablesEnabled;
    }

    public boolean isAutoConfigurationSystemPropertiesEnabled() {
        return autoConfigurationSystemPropertiesEnabled;
    }

    /**
     * Whether auto configuration should include JVM system properties as well. When enabled this allows to overrule any
     * configuration using a JVM system property. For example to set a shutdown timeout of 5 seconds: -D
     * camel.main.shutdown-timeout=5.
     *

     * Note that JVM system properties take precedence over OS environment variables.
     *

     * This option is default enabled.
     */
    public void setAutoConfigurationSystemPropertiesEnabled(boolean autoConfigurationSystemPropertiesEnabled) {
        this.autoConfigurationSystemPropertiesEnabled = autoConfigurationSystemPropertiesEnabled;
    }

    public boolean isAutoConfigurationFailFast() {
        return autoConfigurationFailFast;
    }

    /**
     * Whether auto configuration should fail fast when configuring one ore more properties fails for whatever reason
     * such as a invalid property name, etc.
     *

     * This option is default enabled.
     */
    public void setAutoConfigurationFailFast(boolean autoConfigurationFailFast) {
        this.autoConfigurationFailFast = autoConfigurationFailFast;
    }

    public boolean isAutoConfigurationLogSummary() {
        return autoConfigurationLogSummary;
    }

    /**
     * Whether auto configuration should log a summary with the configured properties.
     *

     * This option is default enabled.
     */
    public void setAutoConfigurationLogSummary(boolean autoConfigurationLogSummary) {
        this.autoConfigurationLogSummary = autoConfigurationLogSummary;
    }

    public String getBasePackageScan() {
        return basePackageScan;
    }

    /**
     * Package name to use as base (offset) for classpath scanning of {@link RouteBuilder}, and
     * {@link org.apache.camel.TypeConverter} classes.
     *
     * If you are using Spring Boot then it is instead recommended to use Spring Boots component scanning and annotate
     * your route builder classes with `@Component`. In other words only use this for Camel Main in standalone mode.
     */
    public void setBasePackageScan(String basePackageScan) {
        this.basePackageScan = basePackageScan;
    }

    public boolean isBasePackageScanEnabled() {
        return basePackageScanEnabled;
    }

    /**
     * Whether base package scan is enabled.
     */
    public void setBasePackageScanEnabled(boolean basePackageScanEnabled) {
        this.basePackageScanEnabled = basePackageScanEnabled;
    }

    public String getRoutesCompileDirectory() {
        return routesCompileDirectory;
    }

    /**
     * Directory to use for saving runtime compiled Camel routes to class files, when using camel-java-joor-dsl as Java
     * DSL (such as when using Camel K with Java source routes). Camel will compile to in-memory only by default.
     * Specifying this option, allows Camel to persist the compiled class to disk. And when starting the application
     * again the routes are loaded from the pre-compiled class files instead of re-compiling again.
     */
    public void setRoutesCompileDirectory(String routesCompileDirectory) {
        this.routesCompileDirectory = routesCompileDirectory;
    }

    public boolean isRoutesCompileLoadFirst() {
        return routesCompileLoadFirst;
    }

    /**
     * Whether to load preexisting compiled Camel routes class files, when using camel-java-joor-dsl as Java DSL (such
     * as when using Camel K with Java source routes).
     *
     * If enabled then Camel will look in the routes compile directory if a compiled Java route already exists and load
     * its bytecode instead of runtime compiling from its java source file.
     */
    public void setRoutesCompileLoadFirst(boolean routesCompileLoadFirst) {
        this.routesCompileLoadFirst = routesCompileLoadFirst;
    }

    public int getDurationHitExitCode() {
        return durationHitExitCode;
    }

    /**
     * Sets the exit code for the application if duration was hit
     */
    public void setDurationHitExitCode(int durationHitExitCode) {
        this.durationHitExitCode = durationHitExitCode;
    }

    public int getExtraShutdownTimeout() {
        return extraShutdownTimeout;
    }

    /**
     * Extra timeout in seconds to graceful shutdown Camel.
     *
     * When Camel is shutting down then Camel first shutdown all the routes (shutdownTimeout). Then additional services
     * is shutdown (extraShutdownTimeout).
     */
    public void setExtraShutdownTimeout(int extraShutdownTimeout) {
        this.extraShutdownTimeout = extraShutdownTimeout;
    }

    // getter and setters - configurations
    // --------------------------------------------------------------

    public String getConfigurationClasses() {
        return configurationClasses;
    }

    /**
     * Sets classes names that will be used to configure the camel context as example by providing custom beans through
     * {@link org.apache.camel.BindToRegistry} annotation.
     */
    public void setConfigurationClasses(String configurations) {
        this.configurationClasses = configurations;
    }

    /**
     * Adds configuration object to the known list of configurations objects.
     */
    @SuppressWarnings("unchecked")
    private void addConfigurationClass(Class<? extends CamelConfiguration>... configuration) {
        String existing = configurationClasses;
        if (existing == null) {
            existing = "";
        }
        if (configuration != null) {
            for (Class<? extends CamelConfiguration> clazz : configuration) {
                if (!existing.isEmpty()) {
                    existing = existing + ",";
                }
                existing = existing + clazz.getName();
            }
        }
        setConfigurationClasses(existing);
    }

    /**
     * Adds configuration object to the known list of configurations objects.
     */
    public void addConfiguration(CamelConfiguration configuration) {
        configurations.add(configuration);
    }

    /**
     * Adds configuration object to the known list of configurations objects.
     */
    public void addConfiguration(Class<? extends CamelConfiguration> configuration) {
        addConfigurationClass(configuration);
    }

    public List<CamelConfiguration> getConfigurations() {
        return configurations;
    }

    /**
     * Sets the configuration objects used to configure the camel context.
     */
    public void setConfigurations(List<CamelConfiguration> configurations) {
        this.configurations = configurations;
    }

    // getter and setters - routes builders
    // --------------------------------------------------------------

    public String getRoutesBuilderClasses() {
        return routesBuilderClasses;
    }

    /**
     * Sets classes names that implement {@link RoutesBuilder}.
     */
    public void setRoutesBuilderClasses(String builders) {
        this.routesBuilderClasses = builders;
    }

    public List<RoutesBuilder> getRoutesBuilders() {
        return this.routesBuilders;
    }

    /**
     * Sets the RoutesBuilder instances.
     */
    public void setRoutesBuilders(List<RoutesBuilder> routesBuilders) {
        this.routesBuilders = routesBuilders;
    }

    /**
     * Add an additional {@link RoutesBuilder} object to the known list of builders.
     */
    public void addRoutesBuilder(RoutesBuilder routeBuilder) {
        this.routesBuilders.add(routeBuilder);
    }

    /**
     * Add an additional {@link RoutesBuilder} class to the known list of builders.
     */
    public void addRoutesBuilder(Class<?>... routeBuilder) {
        String existing = routesBuilderClasses;
        if (existing == null) {
            existing = "";
        }
        if (routeBuilder != null) {
            for (Class<?> clazz : routeBuilder) {
                if (!existing.isEmpty()) {
                    existing = existing + ",";
                }
                existing = existing + clazz.getName();
            }
        }
        setRoutesBuilderClasses(existing);
    }

    /**
     * Add an additional {@link LambdaRouteBuilder} object to the known list of builders.
     */
    public void addLambdaRouteBuilder(LambdaRouteBuilder routeBuilder) {
        this.routesBuilders.add(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                routeBuilder.accept(this);
            }
        });
    }

    // fluent builders
    // --------------------------------------------------------------

    /**
     * Whether auto configuration of components/dataformats/languages is enabled or not. When enabled the configuration
     * parameters are loaded from the properties component and configured as defaults (similar to spring-boot
     * auto-configuration). You can prefix the parameters in the properties file with: -
     * camel.component.name.option1=value1 - camel.component.name.option2=value2 - camel.dataformat.name.option1=value1
     * - camel.dataformat.name.option2=value2 - camel.language.name.option1=value1 - camel.language.name.option2=value2
     * Where name is the name of the component, dataformat or language such as seda,direct,jaxb.
     *

     * The auto configuration also works for any options on components that is a complex type (not standard Java type)
     * and there has been an explicit single bean instance registered to the Camel registry via the
     * {@link org.apache.camel.spi.Registry#bind(String, Object)} method or by using the
     * {@link org.apache.camel.BindToRegistry} annotation style.
     *

     * This option is default enabled.
     */
    public MainConfigurationProperties withAutoConfigurationEnabled(boolean autoConfigurationEnabled) {
        this.autoConfigurationEnabled = autoConfigurationEnabled;
        return this;
    }

    /**
     * Whether auto configuration should include OS environment variables as well. When enabled this allows to overrule
     * any configuration using an OS environment variable. For example to set a shutdown timeout of 5 seconds:
     * CAMEL_MAIN_SHUTDOWNTIMEOUT=5.
     *

     * This option is default enabled.
     */
    public MainConfigurationProperties withAutoConfigurationEnvironmentVariablesEnabled(
            boolean autoConfigurationEnvironmentVariablesEnabled) {
        this.autoConfigurationEnvironmentVariablesEnabled = autoConfigurationEnvironmentVariablesEnabled;
        return this;
    }

    /**
     * Whether auto configuration should include JVM system properties as well. When enabled this allows to overrule any
     * configuration using a JVM system property. For example to set a shutdown timeout of 5 seconds: -D
     * camel.main.shutdown-timeout=5.
     *

     * Note that JVM system properties take precedence over OS environment variables.
     *

     * This option is default enabled.
     */
    public MainConfigurationProperties withAutoConfigurationSystemPropertiesEnabled(
            boolean autoConfigurationSystemPropertiesEnabled) {
        this.autoConfigurationSystemPropertiesEnabled = autoConfigurationSystemPropertiesEnabled;
        return this;
    }

    /**
     * Whether auto configuration should fail fast when configuring one ore more properties fails for whatever reason
     * such as a invalid property name, etc.
     *

     * This option is default enabled.
     */
    public MainConfigurationProperties withAutoConfigurationFailFast(boolean autoConfigurationFailFast) {
        this.autoConfigurationFailFast = autoConfigurationFailFast;
        return this;
    }

    /**
     * Whether auto configuration should log a summary with the configured properties.
     *

     * This option is default enabled.
     */
    public MainConfigurationProperties withAutoConfigurationLogSummary(boolean autoConfigurationLogSummary) {
        this.autoConfigurationLogSummary = autoConfigurationLogSummary;
        return this;
    }

    /**
     * Sets the exit code for the application if duration was hit
     */
    public MainConfigurationProperties withDurationHitExitCode(int durationHitExitCode) {
        this.durationHitExitCode = durationHitExitCode;
        return this;
    }

    /**
     * Extra timeout in seconds to graceful shutdown Camel.
     *
     * When Camel is shutting down then Camel first shutdown all the routes (shutdownTimeout). Then additional services
     * is shutdown (extraShutdownTimeout).
     */
    public MainConfigurationProperties withExtraShutdownTimeout(int extraShutdownTimeout) {
        this.extraShutdownTimeout = extraShutdownTimeout;
        return this;
    }

    /**
     * Package name to use as base (offset) for classpath scanning of {@link RouteBuilder}, and
     * {@link org.apache.camel.TypeConverter} classes.
     *
     * If you are using Spring Boot then it is instead recommended to use Spring Boots component scanning and annotate
     * your route builder classes with `@Component`. In other words only use this for Camel Main in standalone mode.
     */
    public MainConfigurationProperties withBasePackageScan(String basePackageScan) {
        this.basePackageScan = basePackageScan;
        return this;
    }

    /**
     * Whether base package scan is enabled.
     */
    public MainConfigurationProperties withBasePackageScanEnabled(boolean basePackageScanEnabled) {
        this.basePackageScanEnabled = basePackageScanEnabled;
        return this;
    }

    /**
     * Directory to use for saving runtime compiled Camel routes to class files, when using camel-java-joor-dsl as Java
     * DSL (such as when using Camel K with Java source routes). Camel will compile to in-memory only by default.
     * Specifying this option, allows Camel to persist the compiled class to disk. And when starting the application
     * again the routes are loaded from the pre-compiled class files instead of re-compiling again.
     */
    public MainConfigurationProperties withRoutesCompileDirectory(String routeCompileDirectory) {
        this.routesCompileDirectory = routeCompileDirectory;
        return this;
    }

    /**
     * Whether to load preexisting compiled Camel routes class files, when using camel-java-joor-dsl as Java DSL (such
     * as when using Camel K with Java source routes).
     *
     * If enabled then Camel will look in the routes compile directory if a compiled Java route already exists and load
     * its bytecode instead of runtime compiling from its java source file.
     */
    public MainConfigurationProperties withRoutesCompileLoadFirst(boolean routesCompileLoadFirst) {
        this.routesCompileLoadFirst = routesCompileLoadFirst;
        return this;
    }

    // fluent builders - configurations
    // --------------------------------------------------------------

    /**
     * Adds classes names that will be used to configure the camel context as example by providing custom beans through
     * {@link org.apache.camel.BindToRegistry} annotation.
     */
    public MainConfigurationProperties withConfigurations(String configurations) {
        if (this.configurationClasses == null) {
            this.configurationClasses = "";
        }
        if (this.configurationClasses.isEmpty()) {
            this.configurationClasses = configurations;
        } else {
            this.configurationClasses = "," + configurations;
        }
        return this;
    }

    /**
     * Adds a configuration class to the known list of configurations classes.
     */
    @SuppressWarnings("unchecked")
    public MainConfigurationProperties withConfigurations(
            Class<? extends CamelConfiguration>... configuration) {
        addConfigurationClass(configuration);
        return this;
    }

    /**
     * Sets the configuration objects used to configure the camel context.
     */
    public MainConfigurationProperties withConfigurations(List<CamelConfiguration> configurations) {
        setConfigurations(configurations);
        return this;
    }

    // fluent  builder - routes builders
    // --------------------------------------------------------------

    /**
     * Sets classes names that implement {@link RoutesBuilder}.
     */
    public MainConfigurationProperties withRoutesBuilderClasses(String builders) {
        setRoutesBuilderClasses(builders);
        return this;
    }

    /**
     * Sets the RoutesBuilder instances.
     */
    public MainConfigurationProperties withRoutesBuilders(List<RoutesBuilder> builders) {
        setRoutesBuilders(builders);
        return this;
    }

    /**
     * Add an additional {@link RoutesBuilder} object to the known list of builders.
     */
    public MainConfigurationProperties withAdditionalRoutesBuilder(RoutesBuilder builder) {
        addRoutesBuilder(builder);
        return this;
    }

    /**
     * Add an additional {@link RoutesBuilder} class to the known list of builders.
     */
    public MainConfigurationProperties withAdditionalRoutesBuilder(Class... builders) {
        addRoutesBuilder(builders);
        return this;
    }

    /**
     * Add an additional {@link LambdaRouteBuilder} object to the known list of builders.
     */
    public MainConfigurationProperties withAdditionalLambdaRouteBuilder(LambdaRouteBuilder builder) {
        addLambdaRouteBuilder(builder);
        return this;
    }
}


text:
from setuptools import setup

if __name__ != "__main__":
    import sys
    sys.exit(1)

def long_desc():
    with open('README.rst', 'rb') as f:
        return f.read()

kw = {
    "name": "chr",
    "version": "3.0.10",
    "description": "Minimalistic Python based URL shortening service",
    "long_description": long_desc(),
    "url": "https://github.com/plausibility/chr",
    "author": "plausibility",
    "author_email": "chris@gibsonsec.org",
    "license": "MIT",
    "packages": [
        'chrso'
    ],
    "include_package_data": True,
    "install_requires": [
        "flask",
        "wtforms",
        "flask-wtf",
        "redis",
        "hiredis",
    ],
    "zip_safe": False,
    "keywords": "url shrink short shortener",
    "classifiers": [
        "Development Status :: 4 - Beta",
        "Intended Audience :: System Administrators",
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python :: 2"
    ]
}

if __name__ == "__main__":
    setup(**kw)


text:
lock "~> 3.10.0"

set :application, "ryohi.com"
set :repo_url, "git@github.com:xibbar/ryohi.com.git"

# Default branch is :master
ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp

# Default deploy_to directory is /var/www/my_app_name
# set :deploy_to, "/var/www/my_app_name"

# Default value for :format is :airbrussh.
# set :format, :airbrussh

# You can configure the Airbrussh format using :format_options.
# These are the defaults.
# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto

# Default value for :pty is false
# set :pty, true

# Default value for :linked_files is []
# append :linked_files, "config/database.yml", "config/secrets.yml"
append :linked_files, "config/puma.rb"

# Default value for linked_dirs is []
append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
set :default_env, { path: "/opt/ruby-2.3/bin:$PATH" }

# Default value for local_user is ENV['USER']
# set :local_user, -> { `git config user.name`.chomp }

# Default value for keep_releases is 5
set :keep_releases, 5

# Uncomment the following to require manually verifying the host key before first deploy.
# set :ssh_options, verify_host_key: :secure


text:
Supporting Payum

Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:

- [Become a sponsor](https://www.patreon.com/makasim)
- [Become our client](http://forma-pro.com/)

---

# Be2Bill Direct.

In this chapter we are going to talk about the most common task: purchase of a product using [be2bill](http://www.be2bill.com/).
We assume you already read basic [get it started](../get-it-started.md).
Here we just show you modifications you have to put to the files shown there.

## Installation

The preferred way to install the library is using [composer](http://getcomposer.org/).
Run composer require to add dependencies to _composer.json_:

```bash
php composer.phar require payum/be2bill php-http/guzzle6-adapter
```

## config.php

Use this when you are going to ask for a credit card details at your side.
Use [offsite](offsite.md) chapter if you want to redirect user to be2bill side.

```php
<?php
//config.php

use Payum\Core\PayumBuilder;
use Payum\Core\Payum;

/** @var Payum $payum */
$payum = (new PayumBuilder())
    ->addDefaultStorages()

    ->addGateway('be2bill_direct', [
        'factory' => 'be2bill_direct',
        'identifier' => 'REPLACE WITH YOURS',
        'password' => 'REPLACE WITH YOURS',
        'sandbox' => true,
    ])

    ->getPayum()
;
```

## prepare.php

Here you have to modify a `gatewayName` value. Set it to `be2bill` or `be2bill_offsite`. The rest remain the same as described in basic [get it started](../get-it-started.md) documentation.

Back to [index](../index.md).


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29815_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9620 — 9650
9650 — 9680
9680 — 9710

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">ANHYDRITE: Cream, off white, light gray, reddish gray, reddish brown, trace limestone, slightly argillaceous, soft, mushy, spotty dull yellow fluorescence, no cut.
ANHYDRITE: Cream, off white, light gray, reddish gray, reddish brown, trace limestone, slightly argillaceous, soft, mushy, spotty dull yellow fluorescence, no cut.
LIMESTONE: Light brown, light gray, light gray brown, brown, gray, trace white to off-
...klsn uni—"JAM. n-n:'1nnAl\"n «A-.. :nOAOA-nfiiulnv- o'nrnnu-"V an" on a..." natal": hA'A

    <p class="styleSans6.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">WlllLU alulyuluc, algulaucuub, PUUI uumglnuumu pUanlly, auu lU 111111, Pal-L411} SUAU fluorescence, weak ye110w-green milky cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9710 - 9740

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Light brown, light gray, light gray brown, brown, gray, trace white to off-

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">white anhydrite, Qgillaceoue, goorvmt'ergr'anuvlar'porosity, soft t6 Elm-1,7 patchy gold fluorescence, weak yellow-green milky cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9740 — 9770

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Brown, light brown, gray, light gray, trace ofilwhite anhydrite, slightly
__':114____.- ___ _-_-_:L__ 1_-_A_I 1.- LA'AL'_ _AALL~___.I _,_11____ A---" fl.g_-__--_.__ __.A_1-

    <p class="styleSans6.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">argluaccous, I10 pOIOSlIy, Ham [0 Dl'lIIlC, SCKIICI'CU yellow-green HUOICSCCIICC, WCHK streaming to weak cloudy cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9770 — 9800

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Light brown. light zrav. light grav brown. brown. grav. trace white to off-

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">white anhydn'te, argillaceous, poor intergranular porosity, soft to firm, patchy gold fluorescence, weak yellow-green milky cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9800 — 9830

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Brown, light brown, gray, light gray, trace off-white anhydrite, slightly

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">argulaceous, no poros1ty, nara to bnttle, scattered yellow-green fluorescence, weak streaming to weak cloudy cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9830 — 9860
9860 — 9890
9890 — 9920

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Light brown, light gray, light gray brown, brown, gray, argillaceous, poor intergranular porosity, soft to firm, patchy gold fluorescence, weak yellow-green milky cut.
LIMESTONE: Brown, light brown, gray, light gray, trace off-white anhydrite, slightly argillaceous, no porosity, hard to brittle, scattered yellow-green fluorescence, weak streaming to weak cloudy cut.
LIMESTONE: Light brown, light gray, light gray brown, brown, gray, trace white to offwhite anhydrite, slightly argillaceous, poor intergranular porosity, soft to firm, patchy gold fluorescence, weak yellow-green milky cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9920 ~ 9950

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Light brown to brown, light gray, light gray brown, brown, trace gray, trace off-white anhydrite, slightly argillaceous, poor intergranular porosity, soft to firm, scattered yellow fluorescence, weak yellow-green cloudy cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9950 — 9980

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Brown, light gray to gray, light gray brown, trace off-white anhydrite, slightly argillaceous, poor intergranular porosity, firm, scattered yellow fluorescence, weak yellow-green cloudy cut.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">9980— 10010
10010 — 10040

    <p class="styleSans10.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">LIMESTONE: Light brown to brown, light gray, gray, trace off white anhydn'te,
argillaceous, poor intergranular porosity, soft to firm, patchy gold fluorescence, weak yellow—green  cut.
LIMESTONE: Brown, light tan, light gray to gray, gray brown, trace off white anhydrite, argillaceous, poor intergranular porosity, soft to firm, patchy gold fluorescence, weak streaming yellow-green milky cut.

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">24


text:
package com.westminster_council_training.controller;

import java.math.BigDecimal;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.orionplatform.calendar.CalendarService;
import com.orionplatform.data.data_model.ecommerce.PaymentMethod;
import com.orionplatform.web.core.app.pages.OrionPageService;
import com.westminster_council_training.data_access.PaymentDAO;
import com.westminster_council_training.model.PaymentModel;

@RestController
@RequestMapping(value = "/checkout/payment/paypal")
public class PaypalPaymentService extends OrionPageService
{
    @PostMapping(value = "/success", consumes = MediaType.TEXT_PLAIN_VALUE)
    public ResponseEntity<String> processSuccessfulPaypalPayment(HttpServletRequest request, HttpServletResponse response, Model model, @RequestBody String paymentDetails)
    {
        PaymentModel paymentModel = buildPaymentModel("CustomerUserID", paymentDetails.substring(1, paymentDetails.length() - 1));
        PaymentDAO.savePayment(paymentModel);
        return ResponseEntity.<String>ok("/checkout/payment/success");
    }

    private PaymentModel buildPaymentModel(String userID, String paymentDetails)
    {
        String[] tokens = paymentDetails.split("__");
        //https://www.sandbox.paypal.com/activity/payment/5F8025585Y170762T
        //https://www.paypal.com/myaccount/transactions/details/4G453312A1598041C
        String transactionURL = "https://www.sandbox.paypal.com/activity/payment/" + tokens[0];
        String datetimeOfPayment = CalendarService.convertDateTimeStringToDateTimeObject(tokens[1]).printInSQLFormat();
        PaymentModel paymentModel = new PaymentModel();
        paymentModel.setUserID(userID);
        paymentModel.setPaymentMethod(PaymentMethod.PayPal.get());
        paymentModel.setTotalAmount(new BigDecimal(tokens[2]).multiply(new BigDecimal("100")).longValue());
        paymentModel.setTransactionID(tokens[0]);
        paymentModel.setTransactionURL(transactionURL);
        //paymentModel.setInvoiceURL(charge.getReceiptUrl());
        paymentModel.setDatetimeOfPayment(datetimeOfPayment);
        return paymentModel;
    }
}


text:
namespace Diadoc.Api.Proto.Documents
{
  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"DocumentZipGenerationResult")]
  public partial class DocumentZipGenerationResult : global::ProtoBuf.IExtensible
  {
    public DocumentZipGenerationResult() {}

    private string _ZipFileNameOnShelf = "";
    [global::ProtoBuf.ProtoMember(1, IsRequired = false, Name=@"ZipFileNameOnShelf", DataFormat = global::ProtoBuf.DataFormat.Default)]
    [global::System.ComponentModel.DefaultValue("")]
    public string ZipFileNameOnShelf
    {
      get { return _ZipFileNameOnShelf; }
      set { _ZipFileNameOnShelf = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

}


text:
import os

BOLD = '\033[1m'
CYAN = '\033[36m'
MAGENTA = '\033[35m'
RED = '\033[31m'
RED_BG = '\033[41m'
PLAIN = '\033[0m'

# ################# #
# Utility Functions #
# ################# #

def find_file_up_hierarchy(root, file):
    next_path = root
    path = None
    found = False

    while not found and path != next_path:
        path = next_path
        found = file in os.listdir(path)
        next_path = os.path.dirname(path)

    return path if found else None

def format_error(text):
    return format_string(text, BOLD, RED)

def format_string(text, *formats):
    return ''.join(formats) + text + PLAIN

def print_formatted(text, *formats):
    print(format_string(text, *formats))

def print_titled(title, title_format, text, text_format):
    print(format_string(title, *title_format), end='')
    print(format_string(text, *text_format))


text:
from django.apps import apps
from django.contrib.auth import get_user_model
from django.db.models import Count
from django.db.models import Q
from django.utils import timezone

from datetime import timedelta
from collections import OrderedDict

###########################################################################
# Public Stats
###########################################################################

def get_users_public_stats():
    model = get_user_model()
    queryset = model.objects.filter(is_active=True, is_system=False)
    stats = OrderedDict()

    today = timezone.now()
    yesterday = today - timedelta(days=1)
    seven_days_ago = yesterday - timedelta(days=7)
    a_year_ago = today - timedelta(days=365)

    stats["total"] = queryset.count()
    stats["today"] = queryset.filter(date_joined__year=today.year,
                                     date_joined__month=today.month,
                                     date_joined__day=today.day).count()
    stats["average_last_seven_days"] = (queryset.filter(date_joined__range=(seven_days_ago, yesterday))
                                                .count()) / 7
    stats["average_last_five_working_days"] = (queryset.filter(date_joined__range=(seven_days_ago, yesterday))
                                                       .exclude(Q(date_joined__week_day=1) |
                                                                Q(date_joined__week_day=7))
                                                       .count()) / 5

    # Graph: users last year
    # increments ->
    #   SELECT date_trunc('week', "filtered_users"."date_joined") AS "week",
    #          count(*)
    #     FROM (SELECT *
    #             FROM "users_user"
    #            WHERE "users_user"."is_active" = TRUE
    #              AND "users_user"."is_system" = FALSE
    #              AND "users_user"."date_joined" >= %s) AS "filtered_users"
    # GROUP BY "week"
    # ORDER BY "week";
    increments = (queryset.filter(date_joined__gte=a_year_ago)
                          .extra({"week": "date_trunc('week', date_joined)"})
                          .values("week")
                          .order_by("week")
                          .annotate(count=Count("id")))

    counts_last_year_per_week = OrderedDict()
    sumatory = queryset.filter(date_joined__lt=increments[0]["week"]).count()
    for inc in increments:
        sumatory += inc["count"]
        counts_last_year_per_week[str(inc["week"].date())] = sumatory

    stats["counts_last_year_per_week"] = counts_last_year_per_week

    return stats

def get_projects_public_stats():
    model = apps.get_model("projects", "Project")
    queryset = model.objects.all()
    stats = OrderedDict()

    today = timezone.now()
    yesterday = today - timedelta(days=1)
    seven_days_ago = yesterday - timedelta(days=7)

    stats["total"] = queryset.count()
    stats["today"] = queryset.filter(created_date__year=today.year,
                                     created_date__month=today.month,
                                     created_date__day=today.day).count()
    stats["average_last_seven_days"] = (queryset.filter(created_date__range=(seven_days_ago, yesterday))
                                                 .count()) / 7
    stats["average_last_five_working_days"] = (queryset.filter(created_date__range=(seven_days_ago, yesterday))
                                                       .exclude(Q(created_date__week_day=1) |
                                                                Q(created_date__week_day=7))
                                                       .count()) / 5

    stats["total_with_backlog"] = (queryset.filter(is_backlog_activated=True,
                                                   is_kanban_activated=False)
                                           .count())
    stats["percent_with_backlog"] = stats["total_with_backlog"] * 100 / stats["total"]

    stats["total_with_kanban"] = (queryset.filter(is_backlog_activated=False,
                                                  is_kanban_activated=True)
                                          .count())
    stats["percent_with_kanban"] = stats["total_with_kanban"] * 100 / stats["total"]

    stats["total_with_backlog_and_kanban"] = (queryset.filter(is_backlog_activated=True,
                                                              is_kanban_activated=True)
                                                      .count())
    stats["percent_with_backlog_and_kanban"] = stats["total_with_backlog_and_kanban"] * 100 / stats["total"]

    return stats

def get_user_stories_public_stats():
    model = apps.get_model("userstories", "UserStory")
    queryset = model.objects.all()
    stats = OrderedDict()

    today = timezone.now()
    yesterday = today - timedelta(days=1)
    seven_days_ago = yesterday - timedelta(days=7)

    stats["total"] = queryset.count()
    stats["today"] = queryset.filter(created_date__year=today.year,
                                     created_date__month=today.month,
                                     created_date__day=today.day).count()
    stats["average_last_seven_days"] = (queryset.filter(created_date__range=(seven_days_ago, yesterday))
                                                 .count()) / 7
    stats["average_last_five_working_days"] = (queryset.filter(created_date__range=(seven_days_ago, yesterday))
                                                       .exclude(Q(created_date__week_day=1) |
                                                                Q(created_date__week_day=7))
                                                       .count()) / 5

    return stats

###########################################################################
# Discover Stats
###########################################################################

def get_projects_discover_stats(user=None):
    model = apps.get_model("projects", "Project")
    queryset = model.objects.all()
    stats = OrderedDict()

    # Get Public (visible) projects
    queryset = queryset.filter(Q(is_private=False) |
                               Q(is_private=True, anon_permissions__contains=["view_project"]))

    stats["total"] = queryset.count()

    return stats


text:
=head1 LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Copyright [2016-2017] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

=cut

=head1 CONTACT

  Please email comments or questions to the public Ensembl
  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

  Questions may also be sent to the Ensembl help desk at
  <http://www.ensembl.org/Help/Contact>.

=head1 NAME

Bio::EnsEMBL::Compara::RunnableDB::ProteinTrees::BlastFactory

=head1 DESCRIPTION

Fetch sorted list of member_ids and create jobs for BlastAndParsePAF.
Supported keys:

   'genome_db_id' => <number>
       Genome_db id. Obligatory

   'step' => <number>
       How many sequences to write into the blast query file. Default 100

   'species_set_id' => <number> (optionnal)
       The species set on which we want to run blast for that genome_db_id
       Default: uses all the GenomeDBs

=cut

package Bio::EnsEMBL::Compara::RunnableDB::ProteinTrees::BlastFactory;

use strict;
use warnings;

use base ('Bio::EnsEMBL::Compara::RunnableDB::BlastFactory');

use Data::Dumper;

sub param_defaults {
    my $self = shift;
    return {
        %{$self->SUPER::param_defaults},
        'species_set_id'     => undef,
    };
}

sub fetch_input {
    my $self = shift @_;

    my $genome_db_id = $self->param_required('genome_db_id');

    my $species_set_id = $self->param('species_set_id');
    my $target_genome_dbs = $species_set_id ? $self->compara_dba->get_SpeciesSetAdaptor->fetch_by_dbID($species_set_id)->genome_dbs : $self->compara_dba->get_GenomeDBAdaptor->fetch_all;
    # Polyploids have no genes, and hence no blastp database
    $self->param('target_genome_dbs', [grep {not $_->is_polyploid} @$target_genome_dbs]);

    my $all_canonical = $self->compara_dba->get_SeqMemberAdaptor->fetch_all_canonical_by_GenomeDB($genome_db_id);

    print "GDB ID: $genome_db_id\n";
    print "all_canonical: ";
    print scalar @{ $all_canonical };
    print "\n";

    $self->param('query_members', $all_canonical);
}

sub flow_blast_jobs {
    my $self = shift @_;
    my $ref_output_id = shift;

    my $genome_db_id = $self->param('genome_db_id');
    my @target_genome_db_ids = sort {$a <=> $b} (map {$_->dbID} @{$self->param('target_genome_dbs')});

    foreach my $target_genome_db_id (@target_genome_db_ids) {
        my $output_id = { %$ref_output_id };
        $output_id->{'genome_db_id'} = $genome_db_id;
        $output_id->{'target_genome_db_id'} = $target_genome_db_id;
        $self->dataflow_output_id($output_id, 2);
    }
}

1;


text:
mbedtls.base64
==

Example
=
```lua
local base64 = require("mbedtls").base64

local encoded = base64.encode("test")
local decode = base64.decode("dGVzdA==")
```

base64.encode(input)
=

* *input* (string) input
* _returns_ (string) base64-encoded string

base64.decode(input)
=

* *input* (string) base64-encoded input
* _returns_ (string) string


text:
Participants

			<textarea id='input'></textarea>


text:
module Rtbdecode
  class Config
    def initialize(interfaces = {})
      interfaces.each do |interface, config|
        self.class.send(:define_method, interface) do
          config
        end
      end
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item
        android:state_active="true"
        android:drawable="@android:color/darker_gray"
        ></item>

</selector>


text:
package it.unibz.inf.ontop.si.dag;

import com.google.common.collect.ImmutableSet;
import it.unibz.inf.ontop.spec.ontology.*;
import it.unibz.inf.ontop.spec.ontology.ClassifiedTBox;
import junit.framework.TestCase;

import java.util.Set;

import static it.unibz.inf.ontop.utils.SITestingTools.getIRI;
import static it.unibz.inf.ontop.utils.SITestingTools.loadOntologyFromFileAndClassify;

public class DAGHierarchyTest extends TestCase {
	/**
	 * A -> B, B -> {E, F}, {C, D} -> {E, F} with A, B, C, D, E, F are atomic
	 * concepts.
	 */
	private static final String inputFile1 = "src/test/resources/test/dag/test-class-hierarchy.owl";

	/**
	 * P -> Q, Q -> {T, U}, {R, S} -> {T, U} with P, Q, R, S, T, U are atomic
	 * roles.
	 */
	private static final String inputFile2 = "src/test/resources/test/dag/test-role-hierarchy.owl";

	private static <T> int sizeOf(Set<Equivalences<T>> set) {
		int size = 0;
		for (Equivalences<T> d : set)
			size += d.size();
		return size;
	}

	/**
	 * List all the descendants of a class in the TBox with having equivalent
	 * classes into account.
	 */
	public void testDescendantClasses() throws Exception {
		final String ontoURI = "http://obda.inf.unibz.it/ontologies/test-class-hierarchy.owl#";

		ClassifiedTBox dag = loadOntologyFromFileAndClassify(inputFile1);
		// generate named DAG
		TestClassifiedTBoxImpl_OnNamedDAG namedReasoner = new TestClassifiedTBoxImpl_OnNamedDAG(dag);

		EquivalencesDAG<ClassExpression> classes = namedReasoner.classesDAG();

		ClassExpression A = dag.classes().get(getIRI(ontoURI, "A"));
		ClassExpression B = dag.classes().get(getIRI(ontoURI, "B"));
		ClassExpression C = dag.classes().get(getIRI(ontoURI, "C"));
		ClassExpression D = dag.classes().get(getIRI(ontoURI, "D"));
		ClassExpression E = dag.classes().get(getIRI(ontoURI, "E"));
		ClassExpression F = dag.classes().get(getIRI(ontoURI, "F"));

		/**
		 * The initial node is Node A.
		 */
		Equivalences<ClassExpression> initialNode = classes.getVertex(A);
		Set<Equivalences<ClassExpression>> descendants = classes.getSub(initialNode);

		assertEquals(descendants.size(), 1);  // getDescendants is reflexive

		/**
		 * The initial node is Node B.
		 */
		initialNode = classes.getVertex(B);
		descendants = classes.getSub(initialNode);

		assertEquals(2, descendants.size());  // getDescendants is reflexive

		assertTrue(descendants.contains(classes.getVertex(A)));

		/**
		 * The initial node is Node C.
		 */
		// There is no test for this node because the API will always suggest
		// Node C is not
		// exist and it has been replaced by Node D (i.e., Class C is equivalent
		// with Class D)

		/**
		 * The initial node is Node D.
		 */
		initialNode = classes.getVertex(D);
		descendants = classes.getSub(initialNode);

		assertEquals(descendants.size(), 1);

		assertTrue(descendants.contains(new Equivalences<>(ImmutableSet.of(C, D)))); // getDescendants is reflexive

		/**
		 * The initial node is Node E.
		 */
		// There is no test for this node because the API will always suggest
		// Node E is not
		// exist and it has been replaced by Node F (i.e., Class E is equivalent
		// with Class F)

		/**
		 * The initial node is Node F.
		 */
		initialNode = classes.getVertex(F);
		descendants = classes.getSub(initialNode);
		assertEquals(6, sizeOf(descendants)); // getDescendants is reflexive

		assertTrue(descendants.contains(classes.getVertex(A)));
		assertTrue(descendants.contains(classes.getVertex(B)));
		assertTrue(descendants.contains(classes.getVertex(C)));
		assertTrue(descendants.contains(classes.getVertex(D)));

		assertTrue(descendants.contains(new Equivalences<>(ImmutableSet.of(E, F)))); // getDescendants is reflexive
	}

	/**
	 * List all the ancestors of a class in the TBox with having equivalent
	 * classes into account.
	 */
	public void testAncestorClasses() throws Exception {
		final String ontoURI = "http://obda.inf.unibz.it/ontologies/test-class-hierarchy.owl#";

		ClassifiedTBox dag = loadOntologyFromFileAndClassify(inputFile1);
		// generate named DAG
		TestClassifiedTBoxImpl_OnNamedDAG namedReasoner = new TestClassifiedTBoxImpl_OnNamedDAG(dag);

		EquivalencesDAG<ClassExpression> classes = namedReasoner.classesDAG();

		ClassExpression A = dag.classes().get(getIRI(ontoURI, "A"));
		ClassExpression B = dag.classes().get(getIRI(ontoURI, "B"));
		ClassExpression C = dag.classes().get(getIRI(ontoURI, "C"));
		ClassExpression D = dag.classes().get(getIRI(ontoURI, "D"));
		ClassExpression E = dag.classes().get(getIRI(ontoURI, "E"));
		ClassExpression F = dag.classes().get(getIRI(ontoURI, "F"));

		/**
		 * The initial node is Node A.
		 */

		Equivalences<ClassExpression> initialNode = classes.getVertex(A);
		Set<Equivalences<ClassExpression>> ancestors = classes.getSuper(initialNode);
		assertEquals(4, sizeOf(ancestors));   // ancestors is now reflexive

		assertTrue(ancestors.contains(classes.getVertex(B)));
															// class
		assertTrue(ancestors.contains(classes.getVertex(E)));
		assertTrue(ancestors.contains(classes.getVertex(F)));

		/**
		 * The initial node is Node B.
		 */
		initialNode = classes.getVertex(B);
		ancestors = classes.getSuper(initialNode);
		assertEquals(3, sizeOf(ancestors)); // ancestors is now reflexive

		assertTrue(ancestors.contains(classes.getVertex(F)));
		assertTrue(ancestors.contains(classes.getVertex(E)));

		/**
		 * The initial node is Node C.
		 */
		// There is no test for this node because the API will always suggest
		// Node C is not
		// exist and it has been replaced by Node D (i.e., Class C is equivalent
		// with Class D)

		/**
		 * The initial node is Node D.
		 */
		initialNode = classes.getVertex(D);
		ancestors = classes.getSuper(initialNode);
		assertEquals(4, sizeOf(ancestors)); // ancestors is now reflexive

		assertTrue(ancestors.contains(new Equivalences<>(ImmutableSet.of(C, D)))); // ancestor is reflexive now
		assertTrue(ancestors.contains(classes.getVertex(E)));
		assertTrue(ancestors.contains(classes.getVertex(F)));

		/**
		 * The initial node is Node E.
		 */
		// There is no test for this node because the API will always suggest
		// Node E is not
		// exist and it has been replaced by Node F (i.e., Class E is equivalent
		// with Class F)

		/**
		 * The initial node is Node F.
		 */
		initialNode = classes.getVertex(F);
		ancestors = classes.getSuper(initialNode);

		assertEquals(1, ancestors.size());

		assertTrue(ancestors.contains(new Equivalences<>(ImmutableSet.of(E, F))));// ancestor is reflexive now
	}

	/**
	 * List all the descendants of a role in the TBox with having equivalent
	 * roles into account.
	 */
	public void testDescendantRoles() throws Exception {
		final String ontoURI = "http://obda.inf.unibz.it/ontologies/test-role-hierarchy.owl#";

		ClassifiedTBox dag = loadOntologyFromFileAndClassify(inputFile2);
		// generate named DAG
		TestClassifiedTBoxImpl_OnNamedDAG namedReasoner = new TestClassifiedTBoxImpl_OnNamedDAG(dag);

		EquivalencesDAG<ObjectPropertyExpression> properties = namedReasoner.objectPropertiesDAG();

		ObjectPropertyExpression P = dag.objectProperties().get(getIRI(ontoURI, "P"));
		ObjectPropertyExpression S = dag.objectProperties().get(getIRI(ontoURI, "S"));
		ObjectPropertyExpression R = dag.objectProperties().get(getIRI(ontoURI, "R"));
		ObjectPropertyExpression Q = dag.objectProperties().get(getIRI(ontoURI, "Q"));
		ObjectPropertyExpression T = dag.objectProperties().get(getIRI(ontoURI, "T"));
		ObjectPropertyExpression U = dag.objectProperties().get(getIRI(ontoURI, "U"));

		/**
		 * The initial node is Node P.
		 */
		Equivalences<ObjectPropertyExpression> initialNode = properties.getVertex(P);
		Set<Equivalences<ObjectPropertyExpression>> descendants = properties.getSub(initialNode);
		assertEquals(1, descendants.size());  // getDescendants is reflexive

		/**
		 * The initial node is Node Q.
		 */
		initialNode = properties.getVertex(Q);
		descendants = properties.getSub(initialNode);

		assertEquals(descendants.size(), 2);  // getDescendants is reflexive
		assertTrue(descendants.contains(properties.getVertex(P)));

		/**
		 * The initial node is Node R.
		 */
		// There is no test for this node because the API will always suggest
		// Node R is not
		// exist and it has been replaced by Node S (i.e., Role R is equivalent
		// with Role S)

		/**
		 * The initial node is Node S.
		 */
		initialNode = properties.getVertex(S);
		descendants = properties.getSub(initialNode);

		assertEquals(1, descendants.size());

		assertTrue(descendants.contains(new Equivalences<>(ImmutableSet.of(R, S)))); // getDescendants is reflexive

		/**
		 * The initial node is Node T.
		 */
		// There is no test for this node because the API will always suggest
		// Node T is not
		// exist and it has been replaced by Node U (i.e., Role T is equivalent
		// with Role U)

		/**
		 * The initial node is Node U.
		 */
		initialNode = properties.getVertex(U);
		descendants = properties.getSub(initialNode);
		assertEquals(6, sizeOf(descendants));  // getDescendants is reflexive

		assertTrue(descendants.contains(properties.getVertex(P)));
		assertTrue(descendants.contains(properties.getVertex(Q)));
		assertTrue(descendants.contains(properties.getVertex(R)));
		assertTrue(descendants.contains(properties.getVertex(S)));
		assertTrue(descendants.contains(new Equivalences<>(ImmutableSet.of(T, U))));// getDescendants is reflexive
	}

	/**
	 * List all the ancestors of a role in the TBox with having equivalent roles
	 * into account.
	 */
	public void testAncestorRoles() throws Exception {
		final String ontoURI = "http://obda.inf.unibz.it/ontologies/test-role-hierarchy.owl#";

		ClassifiedTBox dag = loadOntologyFromFileAndClassify(inputFile2);
		// generate named DAG
		TestClassifiedTBoxImpl_OnNamedDAG namedReasoner = new TestClassifiedTBoxImpl_OnNamedDAG(dag);

		EquivalencesDAG<ObjectPropertyExpression> properties = namedReasoner.objectPropertiesDAG();

		ObjectPropertyExpression P = dag.objectProperties().get(getIRI(ontoURI, "P"));
		ObjectPropertyExpression S = dag.objectProperties().get(getIRI(ontoURI, "S"));
		ObjectPropertyExpression R = dag.objectProperties().get(getIRI(ontoURI, "R"));
		ObjectPropertyExpression Q = dag.objectProperties().get(getIRI(ontoURI, "Q"));
		ObjectPropertyExpression T = dag.objectProperties().get(getIRI(ontoURI, "T"));
		ObjectPropertyExpression U = dag.objectProperties().get(getIRI(ontoURI, "U"));

		/**
		 * The initial node is Node P.
		 */
		Equivalences<ObjectPropertyExpression> initialNode = properties.getVertex(P);
		Set<Equivalences<ObjectPropertyExpression>> ancestors = properties.getSuper(initialNode);
		assertEquals(4, sizeOf(ancestors)); // ancestor is reflexive now

		assertTrue(ancestors.contains(properties.getVertex(Q)));
		assertTrue(ancestors.contains(properties.getVertex(T)));
		assertTrue(ancestors.contains(properties.getVertex(U)));

		/**
		 * The initial node is Node Q.
		 */
		initialNode = properties.getVertex(Q);
		ancestors = properties.getSuper(initialNode);
		assertEquals(3, sizeOf(ancestors)); // ancestor is reflexive now

		assertTrue(ancestors.contains(properties.getVertex(T)));
		assertTrue(ancestors.contains(properties.getVertex(U)));

		/**
		 * The initial node is Node R.
		 */
		// There is no test for this node because the API will always suggest
		// Node R is not
		// exist and it has been replaced by Node S (i.e., Role R is equivalent
		// with Role S)

		/**
		 * The initial node is Node S.
		 */
		initialNode = properties.getVertex(S);
		ancestors = properties.getSuper(initialNode);
		assertEquals(4, sizeOf(ancestors)); // ancestor is reflexive now

		assertTrue(ancestors.contains(new Equivalences<>(ImmutableSet.of(R, S)))); // ancestor is reflexive now

		assertTrue(ancestors.contains(properties.getVertex(T)));
		assertTrue(ancestors.contains(properties.getVertex(U)));

		/**
		 * The initial node is Node T.
		 */
		// There is no test for this node because the API will always suggest
		// Node T is not
		// exist and it has been replaced by Node U (i.e., Role T is equivalent
		// with Role U)

		/**
		 * The initial node is Node U.
		 */
		initialNode = properties.getVertex(U);
		ancestors = properties.getSuper(initialNode);
		assertEquals(1, ancestors.size());

		assertTrue(ancestors.contains(new Equivalences<>(ImmutableSet.of(T, U))));		// ancestor is reflexive now
	}
}


text:
import React from 'react';
import {DragDropContext} from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';

import Category from './category';
import CategoryCreate from './category-create';

const Settings = ({data}) => <div>
    <CategoryCreate />
    {data.map(item => <Category key={item.get('id')} data={item} />)}
</div>;

Settings.propTypes = {
    data: React.PropTypes.object.isRequired
};

export default DragDropContext(HTML5Backend)(Settings);


text:
.. _menpo-feature-gradient:

.. currentmodule:: menpo.feature

gradient
========
.. autofunction:: gradient


text:
x(const x&&) = delete;\
x& operator =(const x&) = delete;\
x& operator =(const x&&) = delete

#define ETL_ITERATOR_FOR_LOOP(iter, container) for(auto iter = container.begin(); iter != container.end(); ++iter)
#define ETL_ITERATOR_WHILE_LOOP(iter, container) for(auto iter = container.begin(); iter != container.end();)

#define ETL_DECLARE_SINGLETON(className) public:\
inline static className& Instance()\
{\
	return sm_Instance;\
}\
inline static className* InstancePtr()\
{\
	return &sm_Instance;\
}\
private:\
static className sm_Instance;\
className();\
virtual ~className();\
className(const className&) = delete;\
className(className&&) = delete;\
className& operator=(const className&) = delete;\
className& operator=(className&&) = delete

#define ETL_IMPLEMENT_SINGLETON(className) className className::sm_Instance

#define ETL_CAT(lhs, rhs) lhs ## rhs


text:
package jsr352.tck.tests.jslxml;

import static org.junit.Assert.assertEquals;

import java.net.URL;
import java.util.Properties;

import javax.batch.runtime.JobExecution;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import jsr352.tck.utils.JobOperatorBridge;
import jsr352.tck.utils.IOHelper;

public class PropertyJunit {

    private static JobOperatorBridge jobOp;

    @BeforeClass
    public static void setUp() throws Exception {
        jobOp = new JobOperatorBridge();
    }

    @AfterClass
    public static void tearDown() throws Exception {
    }

    @After
    public void cleanUp() throws Exception {
        //Clear this property for next test
        System.clearProperty("property.junit.result");
    }

    @Test
    public void testBatchletPropertyInjection() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        System.setProperty("property.junit.propName", "myProperty1");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML);

        String result = System.getProperty("property.junit.result");
        assertEquals("value1", result);
    }

    @Test
    public void testInitializedPropertyIsOverwritten() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        System.setProperty("property.junit.propName", "myProperty2");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML);

        String result = System.getProperty("property.junit.result");
        assertEquals("value2", result);
    }

    @Test
    public void testPropertyWithJobParameter() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        Properties jobParameters = new Properties();
        String expectedResult = "mySubmittedValue";
        jobParameters.setProperty("mySubmittedProp", expectedResult );

        System.setProperty("property.junit.propName", "mySubmittedProp");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML, jobParameters);

        String result = System.getProperty("property.junit.result");
        assertEquals(expectedResult, result);
    }

    @Test
    public void testPropertyPrecedenceSystemProp() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        System.setProperty("mySystemProp", "mySystemPropValue");

        System.setProperty("property.junit.propName", "mySystemProp");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML);

        String result = System.getProperty("property.junit.result");

        //Clear this property for next test
        System.clearProperty("mySystemProp");

        assertEquals("mySystemPropValue", result);
    }

    @Test
    public void testPropertyInjectionNoPropertyOnElement() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        System.setProperty("property.junit.propName", "javaDefaultValueProp");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML);

        String result = System.getProperty("property.junit.result");
        assertEquals("null", result);
    }

    @Test
    public void testDefaultPropertyName() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        System.setProperty("property.junit.propName", "property4");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML);

        String result = System.getProperty("property.junit.result");
        assertEquals("value4", result);
    }

    @Test
    public void testGivenPropertyName() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        System.setProperty("property.junit.propName", "myProperty4");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML);

        String result = System.getProperty("property.junit.result");
        assertEquals("value4", result);
    }

    @Test
    public void testPropertyInnerScopePrecedence() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        System.setProperty("property.junit.propName", "batchletProp");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML);

        String result = System.getProperty("property.junit.result");
        assertEquals("batchletPropValue", result);
    }

    @Test
    public void testPropertyWithConcatenation() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        Properties jobParameters = new Properties();
        jobParameters.setProperty("myFilename", "testfile1" );

        System.setProperty("property.junit.propName", "myConcatProp");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML, jobParameters);

        String result = System.getProperty("property.junit.result");
        assertEquals("testfile1.txt", result);
    }

    //FIXME This test should work. Will be debugging this shortly
    @Test
    public void testJavaSystemProperty() throws Exception {
        URL jobXMLURL = this.getClass().getResource("/job_properties2.xml");
        String jobXML = IOHelper.readJobXML(jobXMLURL.getFile());

        Properties jobParameters = new Properties();
        jobParameters.setProperty("myFilename", "testfile2" );

        System.setProperty("property.junit.propName", "myJavaSystemProp");
        JobExecution jobExec = jobOp.startJobAndWaitForResult(jobXML, jobParameters);
        String result = System.getProperty("property.junit.result");

        String pathSep = System.getProperty("file.separator");

        assertEquals(pathSep + "test" + pathSep + "testfile2.txt", result);

    }

}


text:
TRIBITS_REPOSITORY_DEFINE_PACKAGES(
  SimpleCxx          packages/simple_cxx         PT
  MixedLang          packages/mixed_lang         PT
  InsertedPkg        InsertedPkg                 ST
  WithSubpackages    packages/with_subpackages   PT
  WrapExternal       packages/wrap_external      ST
  )

TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(WrapExternal Windows)
TRIBITS_ALLOW_MISSING_EXTERNAL_PACKAGES(InsertedPkg)