text:
package org.joda.beans.sample;

import java.util.Map;

import org.joda.beans.Bean;
import org.joda.beans.BeanBuilder;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.MetaBean;
import org.joda.beans.MetaProperty;
import org.joda.beans.Property;
import org.joda.beans.gen.BeanDefinition;
import org.joda.beans.gen.PropertyDefinition;
import org.joda.beans.impl.direct.DirectBeanBuilder;
import org.joda.beans.impl.direct.DirectMetaProperty;
import org.joda.beans.impl.direct.DirectMetaPropertyMap;

/**
 * Mock used for subclass validation.
 *
 * @author Stephen Colebourne
 */
@BeanDefinition
public class SubValidateBean extends ValidateBean {

    /**
     * The sub non-null value.
     */
    @PropertyDefinition(validate = "notNull")
    private String sub;

    public SubValidateBean() {
    }

    //------------------------- AUTOGENERATED START -------------------------
    /**
     * The meta-bean for {@code SubValidateBean}.
     * @return the meta-bean, not null
     */
    public static SubValidateBean.Meta meta() {
        return SubValidateBean.Meta.INSTANCE;
    }

    static {
        MetaBean.register(SubValidateBean.Meta.INSTANCE);
    }

    @Override
    public SubValidateBean.Meta metaBean() {
        return SubValidateBean.Meta.INSTANCE;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the sub non-null value.
     * @return the value of the property, not null
     */
    public String getSub() {
        return sub;
    }

    /**
     * Sets the sub non-null value.
     * @param sub  the new value of the property, not null
     */
    public void setSub(String sub) {
        JodaBeanUtils.notNull(sub, "sub");
        this.sub = sub;
    }

    /**
     * Gets the the {@code sub} property.
     * @return the property, not null
     */
    public final Property<String> sub() {
        return metaBean().sub().createProperty(this);
    }

    //-----------------------------------------------------------------------
    @Override
    public SubValidateBean clone() {
        return JodaBeanUtils.cloneAlways(this);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj != null && obj.getClass() == this.getClass()) {
            SubValidateBean other = (SubValidateBean) obj;
            return JodaBeanUtils.equal(getSub(), other.getSub()) &&
                    super.equals(obj);
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = hash * 31 + JodaBeanUtils.hashCode(getSub());
        return hash ^ super.hashCode();
    }

    @Override
    public String toString() {
        StringBuilder buf = new StringBuilder(64);
        buf.append("SubValidateBean{");
        int len = buf.length();
        toString(buf);
        if (buf.length() > len) {
            buf.setLength(buf.length() - 2);
        }
        buf.append('}');
        return buf.toString();
    }

    @Override
    protected void toString(StringBuilder buf) {
        super.toString(buf);
        buf.append("sub").append('=').append(JodaBeanUtils.toString(getSub())).append(',').append(' ');
    }

    //-----------------------------------------------------------------------
    /**
     * The meta-bean for {@code SubValidateBean}.
     */
    public static class Meta extends ValidateBean.Meta {
        /**
         * The singleton instance of the meta-bean.
         */
        static final Meta INSTANCE = new Meta();

        /**
         * The meta-property for the {@code sub} property.
         */
        private final MetaProperty<String> sub = DirectMetaProperty.ofReadWrite(
                this, "sub", SubValidateBean.class, String.class);
        /**
         * The meta-properties.
         */
        private final Map<String, MetaProperty<?>> metaPropertyMap$ = new DirectMetaPropertyMap(
                this, (DirectMetaPropertyMap) super.metaPropertyMap(),
                "sub");

        /**
         * Restricted constructor.
         */
        protected Meta() {
        }

        @Override
        protected MetaProperty<?> metaPropertyGet(String propertyName) {
            switch (propertyName.hashCode()) {
                case 114240:  // sub
                    return sub;
            }
            return super.metaPropertyGet(propertyName);
        }

        @Override
        public BeanBuilder<? extends SubValidateBean> builder() {
            return new DirectBeanBuilder<>(new SubValidateBean());
        }

        @Override
        public Class<? extends SubValidateBean> beanType() {
            return SubValidateBean.class;
        }

        @Override
        public Map<String, MetaProperty<?>> metaPropertyMap() {
            return metaPropertyMap$;
        }

        //-----------------------------------------------------------------------
        /**
         * The meta-property for the {@code sub} property.
         * @return the meta-property, not null
         */
        public final MetaProperty<String> sub() {
            return sub;
        }

        //-----------------------------------------------------------------------
        @Override
        protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
            switch (propertyName.hashCode()) {
                case 114240:  // sub
                    return ((SubValidateBean) bean).getSub();
            }
            return super.propertyGet(bean, propertyName, quiet);
        }

        @Override
        protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) {
            switch (propertyName.hashCode()) {
                case 114240:  // sub
                    ((SubValidateBean) bean).setSub((String) newValue);
                    return;
            }
            super.propertySet(bean, propertyName, newValue, quiet);
        }

        @Override
        protected void validate(Bean bean) {
            JodaBeanUtils.notNull(((SubValidateBean) bean).sub, "sub");
            super.validate(bean);
        }

    }

    //-------------------------- AUTOGENERATED END --------------------------
}


text:
"""Certificate chain where the root certificate lacks a basic constraints
extension."""

import sys
sys.path += ['../..']

import gencerts

# Self-signed root certificate.
root = gencerts.create_self_signed_root_certificate('Root')
root.get_extensions().remove_property('basicConstraints')

# Intermediate.
intermediate = gencerts.create_intermediate_certificate('Intermediate', root)

# Target certificate.
target = gencerts.create_end_entity_certificate('Target', intermediate)

chain = [target, intermediate, root]
gencerts.write_chain(__doc__, chain, 'chain.pem')

redpajama_set_name: RedPajamaGithub


text:
package errors

import (
	"errors"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestSchemaErrors(t *testing.T) {
	err := InvalidType("confirmed", "query", "boolean", nil)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "confirmed in query must be of type boolean", err.Error())

	err = InvalidType("confirmed", "", "boolean", nil)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "confirmed must be of type boolean", err.Error())

	err = InvalidType("confirmed", "query", "boolean", "hello")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "confirmed in query must be of type boolean: \"hello\"", err.Error())

	err = InvalidType("confirmed", "query", "boolean", errors.New("hello"))
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "confirmed in query must be of type boolean, because: hello", err.Error())

	err = InvalidType("confirmed", "", "boolean", "hello")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "confirmed must be of type boolean: \"hello\"", err.Error())

	err = InvalidType("confirmed", "", "boolean", errors.New("hello"))
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "confirmed must be of type boolean, because: hello", err.Error())

	err = DuplicateItems("uniques", "query")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "uniques in query shouldn't contain duplicates", err.Error())

	err = DuplicateItems("uniques", "")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "uniques shouldn't contain duplicates", err.Error())

	err = TooManyItems("something", "query", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should have at most 5 items", err.Error())

	err = TooManyItems("something", "", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should have at most 5 items", err.Error())

	err = TooFewItems("something", "", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should have at least 5 items", err.Error())

	err = ExceedsMaximum("something", "query", 5, false)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be less than or equal to 5", err.Error())

	err = ExceedsMaximum("something", "", 5, false)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be less than or equal to 5", err.Error())

	err = ExceedsMaximum("something", "query", 5, true)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be less than 5", err.Error())

	err = ExceedsMaximum("something", "", 5, true)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be less than 5", err.Error())

	err = ExceedsMinimum("something", "query", 5, false)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be greater than or equal to 5", err.Error())

	err = ExceedsMinimum("something", "", 5, false)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be greater than or equal to 5", err.Error())

	err = ExceedsMinimum("something", "query", 5, true)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be greater than 5", err.Error())

	err = ExceedsMinimum("something", "", 5, true)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be greater than 5", err.Error())

	err = NotMultipleOf("something", "query", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be a multiple of 5", err.Error())

	err = NotMultipleOf("something", "", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be a multiple of 5", err.Error())

	err = EnumFail("something", "query", "yada", []interface{}{"hello", "world"})
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be one of [hello world]", err.Error())

	err = EnumFail("something", "", "yada", []interface{}{"hello", "world"})
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be one of [hello world]", err.Error())

	err = Required("something", "query")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query is required", err.Error())

	err = Required("something", "")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something is required", err.Error())

	err = TooLong("something", "query", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be at most 5 chars long", err.Error())

	err = TooLong("something", "", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be at most 5 chars long", err.Error())

	err = TooShort("something", "query", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should be at least 5 chars long", err.Error())

	err = TooShort("something", "", 5)
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should be at least 5 chars long", err.Error())

	err = FailedPattern("something", "query", "\\d+")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query should match '\\d+'", err.Error())

	err = FailedPattern("something", "", "\\d+")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something should match '\\d+'", err.Error())

	err = InvalidTypeName("something")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something is an invalid type name", err.Error())

	err = AdditionalItemsNotAllowed("something", "query")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something in query can't have additional items", err.Error())

	err = AdditionalItemsNotAllowed("something", "")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "something can't have additional items", err.Error())

	err = InvalidCollectionFormat("something", "query", "yada")
	assert.Error(t, err)
	assert.EqualValues(t, 422, err.Code())
	assert.Equal(t, "the collection format \"yada\" is not supported for the query param \"something\"", err.Error())

	err2 := CompositeValidationError()
	assert.Error(t, err2)
	assert.EqualValues(t, 422, err2.Code())
	assert.Equal(t, "validation failure list", err2.Error())
}


text:
template<class Type, ptrdiff_t n>
ptrdiff_t arraysize(Type (&)[n]) { return n; }

TEST(CommandTest, CanParseArguments1) {
  char * argv[] = {"frob", "--help"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(true, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("usage: frob [-hvSas] [file]\n", stderr.str());
}

TEST(CommandTest, CanParseArguments2) {
  char * argv[] = {"frob", "-v", "-s", "400m", "-a", "some_path"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(true, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("", stderr.str());
  EXPECT_EQ(1, command.verbose);
  EXPECT_EQ(400 * 1024 * 1024, command.size);
  EXPECT_EQ(Command::kModeAppend, command.mode);
  EXPECT_EQ("some_path", command.path);
}

TEST(CommandTest, CanParseArguments3) {
  char * argv[] = {"frob", "-v", "-s", "400m", "-S", "some_path"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(true, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("", stderr.str());
  EXPECT_EQ(1, command.verbose);
  EXPECT_EQ(400 * 1024 * 1024, command.size);
  EXPECT_EQ(Command::kModeStat, command.mode);
  EXPECT_EQ("some_path", command.path);
}

TEST(CommandTest, CanParseArguments4) {
  char * argv[] = {"frob", "some_path"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(true, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("", stderr.str());
  EXPECT_EQ(0, command.verbose);
  EXPECT_EQ(-1, command.size);
  EXPECT_EQ(Command::kModeRead, command.mode);
  EXPECT_EQ("some_path", command.path);
}

TEST(CommandTest, CanParseArguments5) {
  char * argv[] = {"frob", "--verbose", "--size", "400m", "--append",
    "some_path"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(true, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("", stderr.str());
  EXPECT_EQ(1, command.verbose);
  EXPECT_EQ(400 * 1024 * 1024, command.size);
  EXPECT_EQ(Command::kModeAppend, command.mode);
  EXPECT_EQ("some_path", command.path);
}

TEST(CommandTest, CanParseArguments6) {
  char * argv[] = {"frob", "--size", "frob", "--append", "some_path"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(false, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("frob: invalid size\n", stderr.str());
}

TEST(CommandTest, CanParseArguments7) {
  char * argv[] = {"frob", "--size", "100q", "--append", "some_path"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(false, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("frob: invalid size\n", stderr.str());
}

TEST(CommandTest, CanParseArguments8) {
  char * argv[] = {"frob", "--frob"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(false, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("frob: invalid option\n", stderr.str());
}

TEST(CommandTest, CanParseArguments9) {
  char * argv[] = {"frob", "some_path", "some other path"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(false, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("frob: too many file arguments\n", stderr.str());
}

TEST(CommandTest, CanParseArguments10) {
  char * argv[] = {"frob", "--verbose"};
  std::stringstream stderr;

  Command command;
  command.stderr = &stderr;

  EXPECT_EQ(false, command.Parse(arraysize(argv), argv));
  EXPECT_EQ("frob", command.program);
  EXPECT_EQ("frob: missing file argument\n", stderr.str());
}

TEST(CommandTest, CanAppendReadAndWrite) {
  std::string path = TempDir() + "/ring";

  {
    char * argv[] = {"frob", NULL, "--append", "--size", "50"};
    argv[1] = const_cast<char *>(path.c_str());

    std::stringstream stdin;
    stdin.str("Hello, World!");

    Command command;
    command.stdin = &stdin;

    EXPECT_EQ(0, command.Main(arraysize(argv), argv));
  }

  {
    char * argv[] = {"frob", NULL, "--stat"};
    argv[1] = const_cast<char *>(path.c_str());
    std::stringstream stdout;

    Command command;
    command.stdout = &stdout;

    EXPECT_EQ(0, command.Main(arraysize(argv), argv));

    std::string expected_output = "File: ";
    expected_output += path;
    expected_output += "\nSize: 26 bytes\nUsed: 14 bytes\nFree: 12 bytes\n";

    EXPECT_EQ(expected_output, stdout.str());
  }

  {
    char * argv[] = {"frob", NULL, "--append", "--size", "50"};
    argv[1] = const_cast<char *>(path.c_str());

    std::stringstream stdin;
    stdin.str("Goodbye, World!");

    Command command;
    command.stdin = &stdin;

    EXPECT_EQ(0, command.Main(arraysize(argv), argv));
  }

  {
    char * argv[] = {"frob", NULL};
    argv[1] = const_cast<char *>(path.c_str());
    std::stringstream stdout;

    Command command;
    command.stdout = &stdout;

    EXPECT_EQ(0, command.Main(arraysize(argv), argv));
    EXPECT_EQ("Goodbye, World!\n", stdout.str());
  }
}


text:
"""Unit tests for core identity behavior."""

import itertools
import os
from unittest import mock
import uuid

from oslo_config import fixture as config_fixture

from keystone.common import provider_api
import keystone.conf
from keystone import exception
from keystone import identity
from keystone.tests import unit
from keystone.tests.unit import default_fixtures
from keystone.tests.unit.ksfixtures import database

CONF = keystone.conf.CONF
PROVIDERS = provider_api.ProviderAPIs

class TestDomainConfigs(unit.BaseTestCase):

    def setUp(self):
        super(TestDomainConfigs, self).setUp()
        self.addCleanup(CONF.reset)

        self.tmp_dir = unit.dirs.tmp()

        self.config_fixture = self.useFixture(config_fixture.Config(CONF))
        self.config_fixture.config(domain_config_dir=self.tmp_dir,
                                   group='identity')

    def test_config_for_nonexistent_domain(self):
        """Having a config for a non-existent domain will be ignored.

        There are no assertions in this test because there are no side
        effects. If there is a config file for a domain that does not
        exist it should be ignored.

        """
        domain_id = uuid.uuid4().hex
        domain_config_filename = os.path.join(self.tmp_dir,
                                              'keystone.%s.conf' % domain_id)
        self.addCleanup(lambda: os.remove(domain_config_filename))
        with open(domain_config_filename, 'w'):
            """Write an empty config file."""

        e = exception.DomainNotFound(domain_id=domain_id)
        mock_assignment_api = mock.Mock()
        mock_assignment_api.get_domain_by_name.side_effect = e

        domain_config = identity.DomainConfigs()
        fake_standard_driver = None
        domain_config.setup_domain_drivers(fake_standard_driver,
                                           mock_assignment_api)

    def test_config_for_dot_name_domain(self):
        # Ensure we can get the right domain name which has dots within it
        # from filename.
        domain_config_filename = os.path.join(self.tmp_dir,
                                              'keystone.abc.def.com.conf')
        with open(domain_config_filename, 'w'):
            """Write an empty config file."""
        self.addCleanup(os.remove, domain_config_filename)

        with mock.patch.object(identity.DomainConfigs,
                               '_load_config_from_file') as mock_load_config:
            domain_config = identity.DomainConfigs()
            fake_assignment_api = None
            fake_standard_driver = None
            domain_config.setup_domain_drivers(fake_standard_driver,
                                               fake_assignment_api)
            mock_load_config.assert_called_once_with(fake_assignment_api,
                                                     [domain_config_filename],
                                                     'abc.def.com')

    def test_config_for_multiple_sql_backend(self):
        domains_config = identity.DomainConfigs()

        # Create the right sequence of is_sql in the drivers being
        # requested to expose the bug, which is that a False setting
        # means it forgets previous True settings.
        drivers = []
        files = []
        for idx, is_sql in enumerate((True, False, True)):
            drv = mock.Mock(is_sql=is_sql)
            drivers.append(drv)
            name = 'dummy.{0}'.format(idx)
            files.append(''.join((
                identity.DOMAIN_CONF_FHEAD,
                name,
                identity.DOMAIN_CONF_FTAIL)))

        def walk_fake(*a, **kwa):
            return ('/fake/keystone/domains/config', [], files),

        generic_driver = mock.Mock(is_sql=False)

        assignment_api = mock.Mock()
        id_factory = itertools.count()
        assignment_api.get_domain_by_name.side_effect = (
            lambda name: {'id': next(id_factory), '_': 'fake_domain'})
        load_driver_mock = mock.Mock(side_effect=drivers)

        with mock.patch.object(os, 'walk', walk_fake):
            with mock.patch.object(identity.cfg, 'ConfigOpts'):
                with mock.patch.object(domains_config, '_load_driver',
                                       load_driver_mock):
                    self.assertRaises(
                        exception.MultipleSQLDriversInConfig,
                        domains_config.setup_domain_drivers,
                        generic_driver, assignment_api)

                    self.assertEqual(3, load_driver_mock.call_count)

class TestDatabaseDomainConfigs(unit.TestCase):

    def setUp(self):
        super(TestDatabaseDomainConfigs, self).setUp()
        self.useFixture(database.Database())
        self.load_backends()
        PROVIDERS.resource_api.create_domain(
            default_fixtures.ROOT_DOMAIN['id'], default_fixtures.ROOT_DOMAIN)

    def test_domain_config_in_database_disabled_by_default(self):
        self.assertFalse(CONF.identity.domain_configurations_from_database)

    def test_loading_config_from_database(self):
        self.config_fixture.config(domain_configurations_from_database=True,
                                   group='identity')
        domain = unit.new_domain_ref()
        PROVIDERS.resource_api.create_domain(domain['id'], domain)
        # Override two config options for our domain
        conf = {'ldap': {'url': uuid.uuid4().hex,
                         'suffix': uuid.uuid4().hex,
                         'use_tls': True},
                'identity': {
                    'driver': 'ldap'}}
        PROVIDERS.domain_config_api.create_config(domain['id'], conf)
        fake_standard_driver = None
        domain_config = identity.DomainConfigs()
        domain_config.setup_domain_drivers(fake_standard_driver,
                                           PROVIDERS.resource_api)
        # Make sure our two overrides are in place, and others are not affected
        res = domain_config.get_domain_conf(domain['id'])
        self.assertEqual(conf['ldap']['url'], res.ldap.url)
        self.assertEqual(conf['ldap']['suffix'], res.ldap.suffix)
        self.assertEqual(CONF.ldap.query_scope, res.ldap.query_scope)

        # Make sure the override is not changing the type of the config value
        use_tls_type = type(CONF.ldap.use_tls)
        self.assertEqual(use_tls_type(conf['ldap']['use_tls']),
                         res.ldap.use_tls)

        # Now turn off using database domain configuration and check that the
        # default config file values are now seen instead of the overrides.
        self.config_fixture.config(
            group='identity',
            domain_configurations_from_database=False)

        domain_config = identity.DomainConfigs()
        domain_config.setup_domain_drivers(fake_standard_driver,
                                           PROVIDERS.resource_api)
        res = domain_config.get_domain_conf(domain['id'])
        self.assertEqual(CONF.ldap.url, res.ldap.url)
        self.assertEqual(CONF.ldap.suffix, res.ldap.suffix)
        self.assertEqual(CONF.ldap.use_tls, res.ldap.use_tls)
        self.assertEqual(CONF.ldap.query_scope, res.ldap.query_scope)


text:
from __future__ import unicode_literals

from django.db import models, migrations
import datetime
from django.conf import settings

class Migration(migrations.Migration):

    dependencies = [
        ('wishlist_app', '0020_auto_20151001_1528'),
    ]

    operations = [
        migrations.AlterField(
            model_name='role',
            name='created_date',
            field=models.DateTimeField(default=datetime.datetime(2015, 10, 1, 17, 13, 1, 159000)),
        ),
        migrations.AlterField(
            model_name='role',
            name='modified_date',
            field=models.DateTimeField(default=datetime.datetime(2015, 10, 1, 17, 13, 1, 159000)),
        ),
        migrations.AlterField(
            model_name='secretsantaassignment',
            name='giver',
            field=models.ForeignKey(related_name='santa_giver', default=None, to=settings.AUTH_USER_MODEL, null=True),
        ),
    ]


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<artifactId>coroutines</artifactId>
		<groupId>pl.clareo.coroutines</groupId>
		<version>1.2</version>
	</parent>
	<groupId>pl.clareo.coroutines.user</groupId>
	<artifactId>coroutines-user</artifactId>
	<version>1.2</version>
	<packaging>jar</packaging>
	<name>coroutines-user</name>
	<description>Coroutines for Java - for coroutines' developers
	</description>
	<organization>
		<name>CLAREO</name>
		<url>http://clareo.com.pl</url>
	</organization>
	<developers>
		<developer>
			<id>marcin.rzeznicki</id>
			<name>Marcin Rzeźnicki</name>
			<email>marcin.rzeznicki@clareo.com.pl</email>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<debug>true</debug>
					<debuglevel>lines,vars,source</debuglevel>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.4.3</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<author>true</author>
					<source>1.6</source>
					<nodeprecated>false</nodeprecated>
					<nodeprecatedlist>false</nodeprecatedlist>
					<noindex>false</noindex>
					<nonavbar>false</nonavbar>
					<notree>false</notree>
					<excludePackageNames>pl.clareo.coroutines.examples
					</excludePackageNames>
					<splitindex>true</splitindex>
					<use>true</use>
					<version>false</version>
					<defaultAuthor>Marcin Rzeźnicki</defaultAuthor>
					<detectLinks>true</detectLinks>
				</configuration>
				<executions>
					<execution>
						<id>docs</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.3.1</version>
				<executions>
					<execution>
						<id>package-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<includes>
								<include>**/user/*</include>
							</includes>
						</configuration>
					</execution>
					<execution>
						<id>package-examples</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<classifier>examples</classifier>
							<includes>
								<include>**/examples/*</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<id>sources</id>
						<phase>package</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>


text: Rails.application.config.session_store :cookie_store, key: '_bottato_session'


text:
"""TensorFlow-related utilities."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from tensorflow.python.eager import context
from tensorflow.python.framework import ops
from tensorflow.python.framework import smart_cond as smart_module
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import tensor_util
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import variables
from tensorflow.python.util import nest

def smart_cond(pred, true_fn=None, false_fn=None, name=None):
  """Return either `true_fn()` if predicate `pred` is true else `false_fn()`.

  If `pred` is a bool or has a constant value, we return either `true_fn()`
  or `false_fn()`, otherwise we use `tf.cond` to dynamically route to both.

  Arguments:
    pred: A scalar determining whether to return the result of `true_fn` or
      `false_fn`.
    true_fn: The callable to be performed if pred is true.
    false_fn: The callable to be performed if pred is false.
    name: Optional name prefix when using `tf.cond`.

  Returns:
    Tensors returned by the call to either `true_fn` or `false_fn`.

  Raises:
    TypeError: If `true_fn` or `false_fn` is not callable.
  """
  if isinstance(pred, variables.Variable):
    return control_flow_ops.cond(
        pred, true_fn=true_fn, false_fn=false_fn, name=name)
  return smart_module.smart_cond(
      pred, true_fn=true_fn, false_fn=false_fn, name=name)

def constant_value(pred):
  """Return the bool value for `pred`, or None if `pred` had a dynamic value.

  Arguments:
    pred: A scalar, either a Python bool or a TensorFlow boolean variable
      or tensor, or the Python integer 1 or 0.

  Returns:
    True or False if `pred` has a constant boolean value, None otherwise.

  Raises:
    TypeError: If `pred` is not a Variable, Tensor or bool, or Python
      integer 1 or 0.
  """
  # Allow integer booleans.
  if isinstance(pred, int):
    if pred == 1:
      pred = True
    elif pred == 0:
      pred = False

  if isinstance(pred, variables.Variable):
    return None
  return smart_module.smart_constant_value(pred)

def is_tensor_or_tensor_list(v):
  v = nest.flatten(v)
  if v and isinstance(v[0], ops.Tensor):
    return True
  else:
    return False

def get_reachable_from_inputs(inputs, targets=None):
  """Returns the set of tensors/ops reachable from `inputs`.

  Stops if all targets have been found (target is optional).

  Only valid in Symbolic mode, not Eager mode.

  Args:
    inputs: List of tensors.
    targets: List of tensors.

  Returns:
    A set of tensors reachable from the inputs (includes the inputs themselves).
  """
  reachable = set(inputs)
  if targets:
    targets = set(targets)
  queue = inputs[:]

  while queue:
    x = queue.pop()
    if isinstance(x, ops.Operation):
      outputs = x.outputs[:] or []
      outputs += x._control_outputs  # pylint: disable=protected-access
    elif isinstance(x, variables.Variable):
      outputs = [x.op]
    elif tensor_util.is_tensor(x):
      outputs = x.consumers()
    else:
      raise TypeError('Expected Operation, Variable, or Tensor, got ' + str(x))

    for y in outputs:
      if y not in reachable:
        reachable.add(y)
        queue.insert(0, y)

    if targets and targets.issubset(reachable):
      return reachable
  return reachable

def shape_type_conversion(fn):
  """Decorator that handles tuple/TensorShape conversion.

  Used in `compute_output_shape` and `build`.

  Arguments:
    fn: function to wrap.

  Returns:
    Wrapped function.
  """

  def wrapper(instance, input_shape):
    if input_shape is not None:
      if isinstance(input_shape, list):
        input_shape = [
            tuple(tensor_shape.TensorShape(x).as_list()) for x in input_shape]
      else:
        input_shape = tuple(tensor_shape.TensorShape(input_shape).as_list())
    output_shape = fn(instance, input_shape)
    if output_shape is not None:
      if isinstance(output_shape, list):
        return [tensor_shape.TensorShape(x) for x in output_shape]
      return tensor_shape.TensorShape(output_shape)

  return wrapper

def are_all_symbolic_tensors(tensors):
  return all(is_symbolic_tensor(tensor) for tensor in tensors)

_user_convertible_tensor_types = set()

def is_symbolic_tensor(tensor):
  """Returns whether a tensor is symbolic (from a TF graph) or an eager tensor.

  A Variable can be seen as either: it is considered symbolic
  when we are in a graph scope, and eager when we are in an eager scope.

  Arguments:
    tensor: A tensor instance to test.

  Returns:
    True for symbolic tensors, False for eager tensors.
  """
  if isinstance(tensor, variables.Variable):
    return not context.executing_eagerly()
  if isinstance(tensor, (ops.Tensor, sparse_tensor.SparseTensor)):
    return hasattr(tensor, 'graph')
  if isinstance(tensor, tuple(_user_convertible_tensor_types)):
    return hasattr(ops.convert_to_tensor(tensor), 'graph')
  return False

def register_symbolic_tensor_type(cls):
  """Allows users to specify types regarded as symbolic `Tensor`s.

  Used in conjunction with `tf.register_tensor_conversion_function`, calling
  `tf.keras.utils.register_symbolic_tensor_type(cls)` allows non-`Tensor`
  objects to be plumbed through Keras layers.

  Example:

  ```python
  # One-time setup.
  class Foo(object):
    def __init__(self, input_):
      self._input = input_
    def value(self):
      return tf.constant(42.)

  tf.register_tensor_conversion_function(
      Foo, lambda x, *args, **kwargs: x.value())

  tf.keras.utils.register_symbolic_tensor_type(Foo)

  # User-land.
  layer = tf.keras.layers.Lambda(lambda input_: Foo(input_))
  ```

  Arguments:
    cls: A `class` type which shall be regarded as a symbolic `Tensor`.
  """
  global _user_convertible_tensor_types
  _user_convertible_tensor_types.add(cls)


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ChatLogItemEvent.cs" company="SyndicatedLife">
//   Copyright© 2007 - 2021 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/)
//   Licensed under the MIT license. See LICENSE.md in the solution root for full license information.
// </copyright>
// <summary>
//   ChatLogItemEvent.cs Implementation
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace FFXIVAPP.IPluginInterface.Events {
    using System;

    using Sharlayan.Core;

    public class ChatLogItemEvent : EventArgs {
        public ChatLogItemEvent(object sender, ChatLogItem chatLogItem) {
            this.Sender = sender;
            this.ChatLogItem = chatLogItem;
        }

        public ChatLogItem ChatLogItem { get; set; }

        public object Sender { get; set; }
    }
}


text:
Execute following commands.

```sh
./bootstrap.sh
# Create apk
./gradlew assembleDebug
# Install sample to connected android device
./gradlew installDebug
```

WARNING: bootstrap.sh will install redux-kt into your maven locale cache.


text:
var GUI = {}; // Namespace

GUI.changeMode = function(MODE) {
	if (MODE=="mode1") {
		showMode1();
	} else if (MODE=="mode2") {
		showMode2();
	} else if (MODE=="mode3") {
		showMode3();
	} else if (MODE=="mode4") {
		showMode4();
	} else if (MODE=="mode5") {
		showMode5();
	}
}

this.showMode1 = function() {
    document.getElementById("modeheader").innerHTML = '
Modus: IBR Feature annotieren
 Erstellt ein neues semantisches HTTP Objekt und verknüpft es mit einer Annotation mit einem IBR Feature.';
	document.getElementById("annotator").style.display = 'block';
	document.getElementById("labeling").style.display = 'block';
	document.getElementById("labelinglinking").style.display = 'block';
	document.getElementById("objects").style.display = 'block';
	document.getElementById("objects_feature").style.display = 'block';
	document.getElementById("objects_semantic").style.display = 'none';
	document.getElementById("button_mode1").style.display = 'block';
	document.getElementById("button_mode2").style.display = 'none';
	document.getElementById("button_mode3").style.display = 'none';
	document.getElementById("button_mode4").style.display = 'none';
	document.getElementById("button_mode5").style.display = 'none';
	document.getElementById("button_plusuri1").style.display = 'inline';
	document.getElementById("button_plusuri2").style.display = 'none';
	document.getElementById("button_plusuri3").style.display = 'inline';
	document.getElementById("button_plusuri4").style.display = 'none';
	document.getElementById("button_plusuri5").style.display = 'none';
	document.getElementById("link1").style.display = 'inline';
	document.getElementById("link2").style.display = 'none';
	document.getElementById("link3").style.display = 'none';
	document.getElementById("link4").style.display = 'inline';
	document.getElementById("link5").style.display = 'none';
	document.getElementById("link6").style.display = 'none';
	document.getElementById("link7").style.display = 'none';
	document.getElementById("pl_check").disabled = true;
	document.getElementById("pl_check").checked = true;
	GUI.displayForm("pl_check");
	document.getElementById("al_check").disabled = false;
	document.getElementById("al_check").checked = false;
	GUI.displayForm("al_check");
	document.getElementById("sn_check").disabled = false;
	document.getElementById("sn_check").checked = false;
	GUI.displayForm("sn_check");
	document.getElementById("label_check").disabled = false;
	document.getElementById("label_check").checked = false;
	GUI.displayForm("label_check");
	document.getElementById("ed_check").disabled = false;
	document.getElementById("ed_check").checked = false;
	GUI.displayForm("ed_check");
	document.getElementById("feature_check").disabled = true;
	document.getElementById("feature_check").checked = true;
	GUI.displayForm("feature_check");
	document.getElementById("uri_check").disabled = false;
	document.getElementById("uri_check").checked = false;
	GUI.displayForm("uri_check");
	document.getElementById("literal_check").disabled = false;
	document.getElementById("literal_check").checked = false;
	GUI.displayForm("literal_check");
	document.getElementById("so2").style.display = 'none';
	document.getElementById("annotations").style.display = 'none';
}

this.showMode2 = function() {
    document.getElementById("modeheader").innerHTML = '
Modus: Semantisches Objekt annotieren
 Erstellt eine neue Annotation für ein semantisches Objekt.';
	document.getElementById("annotator").style.display = 'block';
	document.getElementById("labeling").style.display = 'block';
	document.getElementById("labelinglinking").style.display = 'block';
	document.getElementById("objects").style.display = 'block';
	document.getElementById("objects_feature").style.display = 'block';
	document.getElementById("objects_semantic").style.display = 'block';
	document.getElementById("button_mode1").style.display = 'none';
	document.getElementById("button_mode2").style.display = 'block';
	document.getElementById("button_mode3").style.display = 'none';
	document.getElementById("button_mode4").style.display = 'none';
	document.getElementById("button_mode5").style.display = 'none';
	document.getElementById("button_plusuri1").style.display = 'inline';
	document.getElementById("button_plusuri2").style.display = 'none';
	document.getElementById("button_plusuri3").style.display = 'inline';
	document.getElementById("button_plusuri4").style.display = 'none';
	document.getElementById("button_plusuri5").style.display = 'none';
	document.getElementById("link1").style.display = 'inline';
	document.getElementById("link2").style.display = 'none';
	document.getElementById("link3").style.display = 'none';
	document.getElementById("link4").style.display = 'inline';
	document.getElementById("link5").style.display = 'none';
	document.getElementById("link6").style.display = 'none';
	document.getElementById("link7").style.display = 'none';
	document.getElementById("pl_check").disabled = false;
	document.getElementById("pl_check").checked = false;
	GUI.displayForm("pl_check");
	document.getElementById("al_check").disabled = false;
	document.getElementById("al_check").checked = false;
	GUI.displayForm("al_check");
	document.getElementById("sn_check").disabled = false;
	document.getElementById("sn_check").checked = false;
	GUI.displayForm("sn_check");
	document.getElementById("label_check").disabled = false;
	document.getElementById("label_check").checked = false;
	GUI.displayForm("label_check");
	document.getElementById("ed_check").disabled = false;
	document.getElementById("ed_check").checked = false;
	GUI.displayForm("ed_check");
	document.getElementById("feature_check").disabled = false;
	document.getElementById("feature_check").checked = false;
	GUI.displayForm("feature_check");
	document.getElementById("uri_check").disabled = false;
	document.getElementById("uri_check").checked = false;
	GUI.displayForm("uri_check");
	document.getElementById("literal_check").disabled = false;
	document.getElementById("literal_check").checked = false;
	GUI.displayForm("literal_check");
	document.getElementById("so2").style.display = 'none';
	document.getElementById("annotations").style.display = 'none';
}

this.showMode3 = function() {
    document.getElementById("modeheader").innerHTML = '
Modus: Semantisches Objekt erstellen
 Erstellt ein neues semantisches HTTP Objekt und verknüpft ees mit einer Annotation, welches Metadaten enthält.';
	document.getElementById("annotator").style.display = 'block';
	document.getElementById("labeling").style.display = 'block';
	document.getElementById("labelinglinking").style.display = 'block';
	document.getElementById("objects").style.display = 'none';
	document.getElementById("objects_feature").style.display = 'none';
	document.getElementById("objects_semantic").style.display = 'none';
	document.getElementById("button_mode1").style.display = 'none';
	document.getElementById("button_mode2").style.display = 'none';
	document.getElementById("button_mode3").style.display = 'block';
	document.getElementById("button_mode4").style.display = 'none';
	document.getElementById("button_mode5").style.display = 'none';
	document.getElementById("button_plusuri1").style.display = 'inline';
	document.getElementById("button_plusuri2").style.display = 'none';
	document.getElementById("button_plusuri3").style.display = 'inline';
	document.getElementById("button_plusuri4").style.display = 'none';
	document.getElementById("button_plusuri5").style.display = 'none';
	document.getElementById("link1").style.display = 'inline';
	document.getElementById("link2").style.display = 'none';
	document.getElementById("link3").style.display = 'none';
	document.getElementById("link4").style.display = 'inline';
	document.getElementById("link5").style.display = 'none';
	document.getElementById("link6").style.display = 'none';
	document.getElementById("link7").style.display = 'none';
	document.getElementById("pl_check").disabled = true;
	document.getElementById("pl_check").checked = true;
	GUI.displayForm("pl_check");
	document.getElementById("al_check").disabled = false;
	document.getElementById("al_check").checked = false;
	GUI.displayForm("al_check");
	document.getElementById("sn_check").disabled = false;
	document.getElementById("sn_check").checked = false;
	GUI.displayForm("sn_check");
	document.getElementById("label_check").disabled = false;
	document.getElementById("label_check").checked = false;
	GUI.displayForm("label_check");
	document.getElementById("ed_check").disabled = false;
	document.getElementById("ed_check").checked = false;
	GUI.displayForm("ed_check");
	document.getElementById("feature_check").disabled = true;
	document.getElementById("feature_check").checked = false;
	GUI.displayForm("feature_check");
	document.getElementById("uri_check").disabled = false;
	document.getElementById("uri_check").checked = false;
	GUI.displayForm("uri_check");
	document.getElementById("literal_check").disabled = false;
	document.getElementById("literal_check").checked = false;
	GUI.displayForm("literal_check");
	document.getElementById("so2").style.display = 'none';
	document.getElementById("annotations").style.display = 'none';
}

this.showMode4 = function() {
    document.getElementById("modeheader").innerHTML = '
Modus: Semantic Object Relation erstellen
 Erstellt eine neue Annotation mit beliebiger Beziehung zweier semantischer Objekte.';
	document.getElementById("annotator").style.display = 'block';
	document.getElementById("labeling").style.display = 'block';
	document.getElementById("labelinglinking").style.display = 'block';
	document.getElementById("objects").style.display = 'block';
	document.getElementById("objects_feature").style.display = 'block';
	document.getElementById("objects_semantic").style.display = 'block';
	document.getElementById("button_mode1").style.display = 'none';
	document.getElementById("button_mode2").style.display = 'none';
	document.getElementById("button_mode3").style.display = 'none';
	document.getElementById("button_mode4").style.display = 'block';
	document.getElementById("button_mode5").style.display = 'none';
	document.getElementById("button_plusuri1").style.display = 'inline';
	document.getElementById("button_plusuri2").style.display = 'none';
	document.getElementById("button_plusuri3").style.display = 'inline';
	document.getElementById("button_plusuri4").style.display = 'none';
	document.getElementById("button_plusuri5").style.display = 'none';
	document.getElementById("link1").style.display = 'inline';
	document.getElementById("link2").style.display = 'none';
	document.getElementById("link3").style.display = 'none';
	document.getElementById("link4").style.display = 'inline';
	document.getElementById("link5").style.display = 'none';
	document.getElementById("link6").style.display = 'none';
	document.getElementById("link7").style.display = 'none';
	document.getElementById("pl_check").disabled = true;
	document.getElementById("pl_check").checked = false;
	GUI.displayForm("pl_check");
	document.getElementById("al_check").disabled = true;
	document.getElementById("al_check").checked = false;
	GUI.displayForm("al_check");
	document.getElementById("sn_check").disabled = true;
	document.getElementById("sn_check").checked = false;
	GUI.displayForm("sn_check");
	document.getElementById("label_check").disabled = true;
	document.getElementById("label_check").checked = false;
	GUI.displayForm("label_check");
	document.getElementById("ed_check").disabled = true;
	document.getElementById("ed_check").checked = false;
	GUI.displayForm("ed_check");
	document.getElementById("feature_check").disabled = true;
	document.getElementById("feature_check").checked = false;
	GUI.displayForm("feature_check");
	document.getElementById("uri_check").disabled = true;
	document.getElementById("uri_check").checked = false;
	GUI.displayForm("uri_check");
	document.getElementById("literal_check").disabled = true;
	document.getElementById("literal_check").checked = false;
	GUI.displayForm("literal_check");
	document.getElementById("so2").style.display = 'block';
	document.getElementById("annotations").style.display = 'none';
}

this.showMode5 = function() {
    SPARQL.annotations("SELECT ?anno ?date ?motivation WHERE { ?anno <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/oa#Annotation> . ?anno <http://www.w3.org/ns/oa#annotatedAt> ?date. ?anno <http://www.w3.org/ns/oa#motivatedBy> ?motivation. } ORDER BY DESC(?date)");
	document.getElementById("modeheader").innerHTML = '
Modus: Annotation löschen
 Löschen einer Annotation.';
	document.getElementById("annotator").style.display = 'none';
	document.getElementById("labeling").style.display = 'none';
	document.getElementById("labelinglinking").style.display = 'none';
	document.getElementById("objects").style.display = 'block';
	document.getElementById("objects_feature").style.display = 'none';
	document.getElementById("objects_semantic").style.display = 'none';
	document.getElementById("button_mode1").style.display = 'none';
	document.getElementById("button_mode2").style.display = 'none';
	document.getElementById("button_mode3").style.display = 'none';
	document.getElementById("button_mode4").style.display = 'none';
	document.getElementById("button_mode5").style.display = 'block';
	document.getElementById("button_plusuri1").style.display = 'inline';
	document.getElementById("button_plusuri2").style.display = 'none';
	document.getElementById("button_plusuri3").style.display = 'inline';
	document.getElementById("button_plusuri4").style.display = 'none';
	document.getElementById("button_plusuri5").style.display = 'none';
	document.getElementById("link1").style.display = 'inline';
	document.getElementById("link2").style.display = 'none';
	document.getElementById("link3").style.display = 'none';
	document.getElementById("link4").style.display = 'inline';
	document.getElementById("link5").style.display = 'none';
	document.getElementById("link6").style.display = 'none';
	document.getElementById("link7").style.display = 'none';
	document.getElementById("pl_check").disabled = true;
	document.getElementById("pl_check").checked = false;
	GUI.displayForm("pl_check");
	document.getElementById("al_check").disabled = true;
	document.getElementById("al_check").checked = false;
	GUI.displayForm("al_check");
	document.getElementById("sn_check").disabled = true;
	document.getElementById("sn_check").checked = false;
	GUI.displayForm("sn_check");
	document.getElementById("label_check").disabled = true;
	document.getElementById("label_check").checked = false;
	GUI.displayForm("label_check");
	document.getElementById("ed_check").disabled = true;
	document.getElementById("ed_check").checked = false;
	GUI.displayForm("ed_check");
	document.getElementById("feature_check").disabled = true;
	document.getElementById("feature_check").checked = false;
	GUI.displayForm("feature_check");
	document.getElementById("uri_check").disabled = true;
	document.getElementById("uri_check").checked = false;
	GUI.displayForm("uri_check");
	document.getElementById("literal_check").disabled = true;
	document.getElementById("literal_check").checked = false;
	GUI.displayForm("literal_check");
	document.getElementById("so2").style.display = 'none';
	document.getElementById("annotations").style.display = 'block';
}

GUI.addButton = function(button) {
	if(button=="button_plusuri1") {
		document.getElementById("button_plusuri1").style.display = 'none';
		document.getElementById("button_plusuri2").style.display = 'inline';
		document.getElementById("link1").style.display = 'inline';
		document.getElementById("link2").style.display = 'inline';
	} else if(button=="button_plusuri2") {
		document.getElementById("button_plusuri2").style.display = 'none';
		document.getElementById("button_plusuri3").style.display = 'inline';
		document.getElementById("link2").style.display = 'inline';
		document.getElementById("link3").style.display = 'inline';
	} else if(button=="button_plusuri3") {
		document.getElementById("button_plusuri3").style.display = 'none';
		document.getElementById("button_plusuri4").style.display = 'inline';
		document.getElementById("link4").style.display = 'inline';
		document.getElementById("link5").style.display = 'inline';
	} else if(button=="button_plusuri4") {
		document.getElementById("button_plusuri4").style.display = 'none';
		document.getElementById("button_plusuri5").style.display = 'inline';
		document.getElementById("link5").style.display = 'inline';
		document.getElementById("link6").style.display = 'inline';
	} else if(button=="button_plusuri5") {
		document.getElementById("button_plusuri5").style.display = 'none';
		document.getElementById("link6").style.display = 'inline';
		document.getElementById("link7").style.display = 'inline';
	}
}

GUI.displayForm = function(form) {
	if (form=="sn_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("linksn").style.display = 'block';
		} else {
			document.getElementById("linksn").style.display = 'none';
		}
	} else if (form=="al_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("linkal").style.display = 'block';
		} else {
			document.getElementById("linkal").style.display = 'none';
		}
	} else if (form=="pl_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("linkpl").style.display = 'block';
		} else {
			document.getElementById("linkpl").style.display = 'none';
		}
	} else if (form=="label_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("linklabel").style.display = 'block';
		} else {
			document.getElementById("linklabel").style.display = 'none';
		}
	} else if (form=="ed_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("linked").style.display = 'block';
		} else {
			document.getElementById("linked").style.display = 'none';
		}
	} else if (form=="feature_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("feature1").style.display = 'block';
		} else {
			document.getElementById("feature1").style.display = 'none';
		}
	} else if (form=="uri_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("linktouri").style.display = 'block';
			document.getElementById("uri1_check").checked = true;
		} else {
			document.getElementById("linktouri").style.display = 'none';
			document.getElementById("uri1_check").checked = false;
		}
	} else if (form=="literal_check") {
		if (document.getElementById(form).checked) {
			document.getElementById("linktoliteral").style.display = 'block';
			document.getElementById("lit1_check").checked = true;
		} else {
			document.getElementById("linktoliteral").style.display = 'none';
			document.getElementById("lit1_check").checked = false;
		}
	}
}

GUI.displayAnnoMetadata = function() {
	var URI = document.getElementById("anno").value.split(" : ")[1];
	if(typeof URI !== "undefined") {
		SPARQL.annotation("SELECT ?motivation ?date ?name WHERE { ?anno a <http://www.w3.org/ns/oa#Annotation> . ?anno <http://www.w3.org/ns/oa#motivatedBy> ?motivation . ?anno <http://www.w3.org/ns/oa#annotatedAt> ?date. ?anno <http://www.w3.org/ns/oa#annotatedBy> ?agent. ?agent <http://xmlns.com/foaf/0.1/name> ?name . FILTER (?anno = <"+URI+"> )  }",URI);
	}
}

GUI.init = function() {
	document.getElementById("changelog").innerHTML = VERSION;
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8"/>
    <title>Open evolver</title>
    <link rel="icon" type="image/png" href="../favicon.png"/>
    <link rel="stylesheet" href="css/main.css"/>

<menu type="toolbar" class="oe-menu">

        <button type="menu" value="File" menu="file-menu"></button>
        <menu id="file-menu" type="popup">
            <menuitem label="Load structure…" data-action="load"></menuitem>
            <menuitem label="Open store…" data-action="openStore"></menuitem>
            <menuitem label="Save structure…" data-action="save"></menuitem>

            <menuitem label="Save summary…" data-action="saveSummary"></menuitem>
        </menu>
        <input type="file" id="oe-file" autocomplete="off" accept=".hin,.ml2,.mol2,.xyz"/>

        <button type="menu" value="Edit" menu="edit-menu"></button>
        <menu id="edit-menu" type="popup">
            <menuitem label="Graph…" data-action="alterGraph"></menuitem>
            <menuitem label="Set parameters…" data-action="setup"></menuitem>
            <menuitem label="Transformation of coordinates…" data-action="transform"></menuitem>
        </menu>

        <button type="menu" value="Calc" menu="calc-menu"></button>
        <menu id="calc-menu" type="popup">
            <menuitem label="Total energy & total bonds" data-action="calcEnergy"></menuitem>
            <menuitem label="Norm of gradient" data-action="calcGrad"></menuitem>

            <menuitem label="Evolve…" data-action="evolve"></menuitem>
        </menu>

        <button type="menu" value="View" menu="view-menu"></button>
        <menu id="view-menu" type="popup">
            <menuitem label="Appearance…" data-action="alterView"></menuitem>
        </menu>

</menu>

<form action="#" class="oe-dialog oe-store-form hidden">

Store

    <fieldset class="oe-dialog-btns">
        <input type="button" class="oe-apply" value="Load"/>
        <input type="button" class="oe-discard" value="Cancel"/>
    </fieldset>
</form>

<form action="#" class="oe-dialog oe-save-form hidden">

Save structure

        Select file type to save

        <select id="oe-file-type">
            <optgroup label="HyperChem" data-type="hin">
                <option value="hin-basic" data-graph="basic" selected>HIN file (basic graph only)</option>
                <option value="hin-extra" data-graph="extra">HIN file (basic and extra graphs)</option>
                <option value="hin-empty" data-graph="empty">HIN file (empty graph)</option>
            </optgroup>
            <optgroup label="Tripos MOL2" data-type="ml2">
                <option value="ml2-basic" data-graph="basic">ML2 file (basic graph only)</option>
                <option value="ml2-extra" data-graph="extra">ML2 file (basic and extra graphs)</option>
                <option value="ml2-empty" data-graph="empty">ML2 file (empty graph)</option>
            </optgroup>
            <optgroup label="Cartesian" data-type="xyz">
                <option value="xyz">XYZ file</option>
            </optgroup>
        </select>

Save in HyperChem file format (*.hin) skipping extra-bonds (they will be lost).

Save in HyperChem file format (*.hin) and include extra-bonds. Such files could be reopened later in OpenEvolver, but they are not compatible with HyperChem as it doesn't recognize bonds of x-type (extra-bonds).

Save in HyperChem file format (*.hin) with empty graph (separate atoms).

    <fieldset class="oe-dialog-btns">
        Save
        <input type="button" class="oe-discard" value="Cancel"/>
    </fieldset>
</form>

<form action="#" class="oe-dialog oe-save-summary-form hidden">

Save summary

        Save as HTML document…

        Save as JSON…

    <fieldset class="oe-dialog-btns">
        <input type="button" class="oe-discard" value="Cancel"/>
    </fieldset>
</form>

<form action="#" class="oe-dialog oe-graph-form hidden" autocomplete="off">

Graph

    <fieldset class="oe-cutoffs"></fieldset>
    <fieldset>
        <input type="range" class="oe-cutoff-slider" min="0" max="100" step="1" value="0"/>

            <input type="text" id="oe-cutoff-min" pattern="\d*\.?\d+([eE][+-]?\d+)?" value="0"/>
            Minimum, Å

            <input type="text" id="oe-cutoff-max" pattern="\d*\.?\d+([eE][+-]?\d+)?" value="5"/>
            Maximum, Å

            <input type="text" id="oe-cutoff-exact" pattern="\d*\.?\d+([eE][+-]?\d+)?" value="0.0000"/>
            Cutoff, Å

    </fieldset>
    <fieldset class="oe-dialog-btns">
        <input type="button" class="oe-apply" value="OK"/>
    </fieldset>
</form>

<form action="#" class="oe-dialog oe-potential-form hidden" autocomplete="off">

Potential parameters

        Load parameters…<input type="file" class="load-potentials" autocomplete="off"/> |
        Save parameters…

    <fieldset class="oe-dialog-btns">
        <input type="button" class="oe-apply" value="OK"/>
        <input type="button" class="oe-discard" value="Cancel"/>
    </fieldset>
</form>

<form action="#" class="oe-dialog oe-transform-form hidden" autocomplete="off">

Transformation of coordinates

    <fieldset class="oe-translate">
        <legend>Translate</legend>

Specify new coordinates of the center of mass

            <input type="text" data-axis="x"/>
XC, Å
            <input type="text" data-axis="y"/>
YC, Å
            <input type="text" data-axis="z"/>
ZC, Å
            <input type="button" id="oe-translate-apply" value="↦" title="Translate"/>

    </fieldset>
    <fieldset class="oe-rotate">
        <legend>Rotate</legend>

            Angle, deg

            <input type="text" id="oe-rotate-angle"/>

            <input type="button" data-axis="x" value="X"/>
            <input type="button" data-axis="y" value="Y"/>
            <input type="button" data-axis="z" value="Z"/>

    </fieldset>
    <fieldset class="oe-dialog-btns">
        <input type="button" class="oe-discard" value="Close"/>
    </fieldset>
</form>

<form action="#" class="oe-dialog oe-evolve-form hidden" autocomplete="off">

Evolution configuration

        <fieldset>

Step count
<input type="number" value="100" id="oe-step-count"/>

Temperature, K
<input type="text" value="298" pattern="\d*\.?\d+([eE][+-]?\d+)?" id="oe-temperature"/>

<input type="checkbox" id="oe-stoch" checked/> Stochastization

        </fieldset>
        <fieldset>

                <input type="checkbox" id="oe-keep-log"/> Keep log

                Log interval
<input type="number" value="0" id="oe-log-interval" min="0" disabled/>

                E.g.: set 5 to write log at every 5th step

                Be aware of possible performance degradation when using a short log interval for large structures and/or large step count

        </fieldset>

    <fieldset class="oe-dialog-btns">
        <input type="button" class="oe-apply" value="OK"/>
        <input type="button" class="oe-discard" value="Cancel"/>
    </fieldset>
</form>

<form action="#" class="oe-dialog oe-appearance-form hidden" autocomplete="off">

Appearance

    <fieldset>
        <legend>Model</legend>
        <input type="radio" name="appearance" data-appearance="graph" checked/> Graph

        <input type="radio" name="appearance" data-appearance="spheres"/> Spheres
    </fieldset>
    <fieldset class="oe-appearance-colors">
        <legend>Colors</legend>
        Element
<select id="oe-appearance-element"></select>
        Color
<input type="color" id="oe-appearance-color"/>

        Background <input type="color" id="oe-bg-color"/>
    </fieldset>
    <fieldset class="oe-dialog-btns">
        <input type="button" class="oe-apply" value="OK"/>
        <input type="button" class="oe-discard" value="Cancel"/>
    </fieldset>
</form>

Save evolution log

        Save as *.txt (Tab-separated values)…

        Save as *.csv (semicolon-separated values)…

        <input type="button" class="oe-discard" value="Close"/>

        <input type="button" class="oe-discard" value="Close"/>

<canvas></canvas>

<progress id="oe-report-progress" value="0" max="100"></progress>


text:
package com.omiplekevin.android.f45testbench.screenhelper;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.TreeMap;

/**
 * Declare:
 * Franchise franchise = new Gson().fromJson(response, Franchise.class);
 * to parse the returned json data from requestConfiguration.
 */

public class Franchise implements Serializable {
    @SerializedName("franchisee_id")
    public String franchiseeId;

    @SerializedName("franchisee")
    public Franchisee franchisee;

    @SerializedName("workout_config")
    public WorkoutConfig workoutConfig;

    @SerializedName("totalStations")
    public int totalStations;

    @SerializedName("videos")
    public TreeMap<Integer, String> videoSourceUrls;

    @SerializedName("success")
    public String success;

    @SerializedName("operation")
    public String operation;

    @SerializedName("data")
    public String data;

    @SerializedName("errors")
    public String errors;

}