text:
from funcy import pairwise
from tests import BaseTestCase
from mock import patch

from redash.models import DataSource
from redash.query_runner.pg import PostgreSQL

class TestDataSourceGetSchema(BaseTestCase):
    def test_fails_if_user_doesnt_belong_to_org(self):
        other_user = self.factory.create_user(org=self.factory.create_org())
        response = self.make_request(
            "get",
            "/api/data_sources/{}/schema".format(self.factory.data_source.id),
            user=other_user,
        )
        self.assertEqual(response.status_code, 404)

        other_admin = self.factory.create_admin(org=self.factory.create_org())
        response = self.make_request(
            "get",
            "/api/data_sources/{}/schema".format(self.factory.data_source.id),
            user=other_admin,
        )
        self.assertEqual(response.status_code, 404)

class TestDataSourceListGet(BaseTestCase):
    def test_returns_each_data_source_once(self):
        group = self.factory.create_group()
        self.factory.user.group_ids.append(group.id)
        self.factory.data_source.add_group(group)
        self.factory.data_source.add_group(self.factory.org.default_group)
        response = self.make_request("get", "/api/data_sources", user=self.factory.user)

        self.assertEqual(len(response.json), 1)

    def test_returns_data_sources_ordered_by_id(self):
        self.factory.create_data_source(group=self.factory.org.default_group)
        self.factory.create_data_source(group=self.factory.org.default_group)
        response = self.make_request("get", "/api/data_sources", user=self.factory.user)
        ids = [datasource["id"] for datasource in response.json]
        self.assertTrue(all(left <= right for left, right in pairwise(ids)))

class DataSourceTypesTest(BaseTestCase):
    def test_returns_data_for_admin(self):
        admin = self.factory.create_admin()
        rv = self.make_request("get", "/api/data_sources/types", user=admin)
        self.assertEqual(rv.status_code, 200)

    def test_returns_403_for_non_admin(self):
        rv = self.make_request("get", "/api/data_sources/types")
        self.assertEqual(rv.status_code, 403)

class TestDataSourceResourceGet(BaseTestCase):
    def setUp(self):
        super(TestDataSourceResourceGet, self).setUp()
        self.path = "/api/data_sources/{}".format(self.factory.data_source.id)

    def test_returns_all_data_for_admins(self):
        admin = self.factory.create_admin()
        rv = self.make_request("get", self.path, user=admin)
        self.assertEqual(rv.status_code, 200)
        self.assertIn("view_only", rv.json)
        self.assertIn("options", rv.json)

    def test_returns_only_view_only_for_users_without_list_permissions(self):
        group = self.factory.create_group(permissions=[])
        data_source = self.factory.create_data_source(group=group, view_only=True)
        user = self.factory.create_user(group_ids=[group.id])

        rv = self.make_request(
            "get", "/api/data_sources/{}".format(data_source.id), user=user
        )
        self.assertEqual(rv.status_code, 200)
        self.assertEqual(rv.json, {"view_only": True})

    def test_returns_limited_data_for_non_admin_in_the_default_group(self):
        user = self.factory.create_user()
        self.assertTrue(user.has_permission("list_data_sources"))

        rv = self.make_request("get", self.path, user=user)
        self.assertEqual(rv.status_code, 200)
        self.assertNotIn("options", rv.json)
        self.assertIn("view_only", rv.json)

    def test_returns_403_for_non_admin_in_group_without_permission(self):
        group = self.factory.create_group()
        user = self.factory.create_user(group_ids=[group.id])
        rv = self.make_request("get", self.path, user=user)
        self.assertEqual(rv.status_code, 403)

class TestDataSourceResourcePost(BaseTestCase):
    def setUp(self):
        super(TestDataSourceResourcePost, self).setUp()
        self.path = "/api/data_sources/{}".format(self.factory.data_source.id)

    def test_returns_400_when_configuration_invalid(self):
        admin = self.factory.create_admin()
        rv = self.make_request(
            "post",
            self.path,
            data={"name": "DS 1", "type": "pg", "options": {}},
            user=admin,
        )

        self.assertEqual(rv.status_code, 400)

    def test_updates_data_source(self):
        admin = self.factory.create_admin()
        new_name = "New Name"
        new_options = {"dbname": "newdb"}
        rv = self.make_request(
            "post",
            self.path,
            data={"name": new_name, "type": "pg", "options": new_options},
            user=admin,
        )

        self.assertEqual(rv.status_code, 200)
        data_source = DataSource.query.get(self.factory.data_source.id)

        self.assertEqual(data_source.name, new_name)
        self.assertEqual(data_source.options.to_dict(), new_options)

class TestDataSourceResourceDelete(BaseTestCase):
    def test_deletes_the_data_source(self):
        data_source = self.factory.create_data_source()
        admin = self.factory.create_admin()

        rv = self.make_request(
            "delete", "/api/data_sources/{}".format(data_source.id), user=admin
        )

        self.assertEqual(204, rv.status_code)
        self.assertIsNone(DataSource.query.get(data_source.id))

class TestDataSourceListResourcePost(BaseTestCase):
    def test_returns_400_when_missing_fields(self):
        admin = self.factory.create_admin()
        rv = self.make_request("post", "/api/data_sources", user=admin)
        self.assertEqual(rv.status_code, 400)

        rv = self.make_request(
            "post", "/api/data_sources", data={"name": "DS 1"}, user=admin
        )

        self.assertEqual(rv.status_code, 400)

    def test_returns_400_when_configuration_invalid(self):
        admin = self.factory.create_admin()
        rv = self.make_request(
            "post",
            "/api/data_sources",
            data={"name": "DS 1", "type": "pg", "options": {}},
            user=admin,
        )

        self.assertEqual(rv.status_code, 400)

    def test_creates_data_source(self):
        admin = self.factory.create_admin()
        rv = self.make_request(
            "post",
            "/api/data_sources",
            data={"name": "DS 1", "type": "pg", "options": {"dbname": "redash"}},
            user=admin,
        )

        self.assertEqual(rv.status_code, 200)

        self.assertIsNotNone(DataSource.query.get(rv.json["id"]))

class TestDataSourcePausePost(BaseTestCase):
    def test_pauses_data_source(self):
        admin = self.factory.create_admin()
        rv = self.make_request(
            "post",
            "/api/data_sources/{}/pause".format(self.factory.data_source.id),
            user=admin,
        )
        self.assertEqual(rv.status_code, 200)
        self.assertEqual(DataSource.query.get(self.factory.data_source.id).paused, True)

    def test_pause_sets_reason(self):
        admin = self.factory.create_admin()
        rv = self.make_request(
            "post",
            "/api/data_sources/{}/pause".format(self.factory.data_source.id),
            user=admin,
            data={"reason": "testing"},
        )
        self.assertEqual(rv.status_code, 200)
        self.assertEqual(DataSource.query.get(self.factory.data_source.id).paused, True)
        self.assertEqual(
            DataSource.query.get(self.factory.data_source.id).pause_reason, "testing"
        )

        rv = self.make_request(
            "post",
            "/api/data_sources/{}/pause?reason=test".format(
                self.factory.data_source.id
            ),
            user=admin,
        )
        self.assertEqual(
            DataSource.query.get(self.factory.data_source.id).pause_reason, "test"
        )

    def test_requires_admin(self):
        rv = self.make_request(
            "post", "/api/data_sources/{}/pause".format(self.factory.data_source.id)
        )
        self.assertEqual(rv.status_code, 403)

class TestDataSourcePauseDelete(BaseTestCase):
    def test_resumes_data_source(self):
        admin = self.factory.create_admin()
        self.factory.data_source.pause()
        rv = self.make_request(
            "delete",
            "/api/data_sources/{}/pause".format(self.factory.data_source.id),
            user=admin,
        )
        self.assertEqual(rv.status_code, 200)
        self.assertEqual(
            DataSource.query.get(self.factory.data_source.id).paused, False
        )

    def test_requires_admin(self):
        rv = self.make_request(
            "delete", "/api/data_sources/{}/pause".format(self.factory.data_source.id)
        )
        self.assertEqual(rv.status_code, 403)


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.example</groupId>
    <artifactId>gogreen</artifactId>
    <version>0.1.0-SNAPSHOT</version>
  </parent>
  <artifactId>gogreen-cms</artifactId>
  <packaging>war</packaging>
  <name>GoGreen CMS</name>
  <description>GoGreen CMS</description>
  <dependencies>
    <dependency>
      <groupId>org.onehippo.cms7.hst.dependencies</groupId>
      <artifactId>hst-repository-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7.hst.dependencies</groupId>
      <artifactId>hst-cms-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7</groupId>
      <artifactId>hippo-package-cms-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7</groupId>
      <artifactId>hippo-addon-channel-manager-frontend</artifactId>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7</groupId>
      <artifactId>hippo-addon-channel-manager-repository</artifactId>
    </dependency>
    <dependency>
      <groupId>org.example</groupId>
      <artifactId>gogreen-repository-data-application</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.example</groupId>
      <artifactId>gogreen-repository-data-webfiles</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7</groupId>
      <artifactId>hippo-plugin-gallerypicker</artifactId>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7</groupId>
      <artifactId>hippo-plugin-resourcebundle-editor</artifactId>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7</groupId>
      <artifactId>hippo-plugin-selections-addon-cms</artifactId>
    </dependency>
    <dependency>
      <groupId>org.onehippo.cms7</groupId>
      <artifactId>hippo-plugin-selections-addon-repository</artifactId>
    </dependency>
  </dependencies>
  <build>
    <finalName>cms</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Hippo-Release-Version>${hippo.release.version}</Hippo-Release-Version>
              <Project-Version>${project.version}</Project-Version>
              <Project-Build>${buildNumber}</Project-Build>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <configuration>
          <configuration>
            <type>runtime</type>
          </configuration>
          <container>
            <type>remote</type>
          </container>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.onehippo.cms.l10n</groupId>
        <artifactId>hippo-cms-l10n-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>

redpajama_set_name: RedPajamaGithub


text:
package sun.security.tools;

/**
 *
 This class represents the ResourceBundle
 * for JarSigner.
 *
 */
public class JarSignerResources extends java.util.ListResourceBundle {

    private static final Object[][] contents = {

        // shared (from jarsigner)
        {"SPACE", " "},
        {"2SPACE", "  "},
        {"6SPACE", "      "},
        {"COMMA", ", "},

        {"provName.not.a.provider", "{0} not a provider"},
        {"signerClass.is.not.a.signing.mechanism", "{0} is not a signing mechanism"},
        {"jarsigner.error.", "jarsigner error: "},
        {"Illegal.option.", "Illegal option: "},
        {".keystore.must.be.NONE.if.storetype.is.{0}",
                "-keystore must be NONE if -storetype is {0}"},
        {".keypass.can.not.be.specified.if.storetype.is.{0}",
                "-keypass can not be specified if -storetype is {0}"},
        {"If.protected.is.specified.then.storepass.and.keypass.must.not.be.specified",
                "If -protected is specified, then -storepass and -keypass must not be specified"},
        {"If.keystore.is.not.password.protected.then.storepass.and.keypass.must.not.be.specified",
                 "If keystore is not password protected, then -storepass and -keypass must not be specified"},
        {"Usage.jarsigner.options.jar.file.alias",
                "Usage: jarsigner [options] jar-file alias"},
        {".jarsigner.verify.options.jar.file.alias.",
                "       jarsigner -verify [options] jar-file [alias...]"},
        {".keystore.url.keystore.location",
                "[-keystore <url>]           keystore location"},
        {".storepass.password.password.for.keystore.integrity",
            "[-storepass <password>]     password for keystore integrity"},
        {".storetype.type.keystore.type",
                "[-storetype <type>]         keystore type"},
        {".keypass.password.password.for.private.key.if.different.",
                "[-keypass <password>]       password for private key (if different)"},
        {".certchain.file.name.of.alternative.certchain.file",
                "[-certchain <file>]         name of alternative certchain file"},
        {".sigfile.file.name.of.SF.DSA.file",
                "[-sigfile <file>]           name of .SF/.DSA file"},
        {".signedjar.file.name.of.signed.JAR.file",
                "[-signedjar <file>]         name of signed JAR file"},
        {".digestalg.algorithm.name.of.digest.algorithm",
                "[-digestalg <algorithm>]    name of digest algorithm"},
        {".sigalg.algorithm.name.of.signature.algorithm",
                "[-sigalg <algorithm>]       name of signature algorithm"},
        {".verify.verify.a.signed.JAR.file",
                "[-verify]                   verify a signed JAR file"},
        {".verbose.suboptions.verbose.output.when.signing.verifying.",
                "[-verbose[:suboptions]]     verbose output when signing/verifying."},
        {".suboptions.can.be.all.grouped.or.summary",
                "                            suboptions can be all, grouped or summary"},
        {".certs.display.certificates.when.verbose.and.verifying",
                "[-certs]                    display certificates when verbose and verifying"},
        {".tsa.url.location.of.the.Timestamping.Authority",
                "[-tsa <url>]                location of the Timestamping Authority"},
        {".tsacert.alias.public.key.certificate.for.Timestamping.Authority",
                "[-tsacert <alias>]          public key certificate for Timestamping Authority"},
        {".altsigner.class.class.name.of.an.alternative.signing.mechanism",
                "[-altsigner <class>]        class name of an alternative signing mechanism"},
        {".altsignerpath.pathlist.location.of.an.alternative.signing.mechanism",
                "[-altsignerpath <pathlist>] location of an alternative signing mechanism"},
        {".internalsf.include.the.SF.file.inside.the.signature.block",
                "[-internalsf]               include the .SF file inside the signature block"},
        {".sectionsonly.don.t.compute.hash.of.entire.manifest",
                "[-sectionsonly]             don't compute hash of entire manifest"},
        {".protected.keystore.has.protected.authentication.path",
                "[-protected]                keystore has protected authentication path"},
        {".providerName.name.provider.name",
                "[-providerName <name>]      provider name"},
        {".providerClass.class.name.of.cryptographic.service.provider.s",
                "[-providerClass <class>     name of cryptographic service provider's"},
        {".providerArg.arg.master.class.file.and.constructor.argument",
                "  [-providerArg <arg>]] ... master class file and constructor argument"},
        {".strict.treat.warnings.as.errors",
                "[-strict]                   treat warnings as errors"},
        {"Option.lacks.argument", "Option lacks argument"},
        {"Please.type.jarsigner.help.for.usage", "Please type jarsigner -help for usage"},
        {"Please.specify.jarfile.name", "Please specify jarfile name"},
        {"Please.specify.alias.name", "Please specify alias name"},
        {"Only.one.alias.can.be.specified", "Only one alias can be specified"},
        {"This.jar.contains.signed.entries.which.is.not.signed.by.the.specified.alias.es.",
                 "This jar contains signed entries which is not signed by the specified alias(es)."},
        {"This.jar.contains.signed.entries.that.s.not.signed.by.alias.in.this.keystore.",
                  "This jar contains signed entries that's not signed by alias in this keystore."},
        {"s", "s"},
        {"m", "m"},
        {"k", "k"},
        {"i", "i"},
        {".and.d.more.", "(and %d more)"},
        {".s.signature.was.verified.",
                "  s = signature was verified "},
        {".m.entry.is.listed.in.manifest",
                "  m = entry is listed in manifest"},
        {".k.at.least.one.certificate.was.found.in.keystore",
                "  k = at least one certificate was found in keystore"},
        {".i.at.least.one.certificate.was.found.in.identity.scope",
                "  i = at least one certificate was found in identity scope"},
        {".X.not.signed.by.specified.alias.es.",
                "  X = not signed by specified alias(es)"},
        {"no.manifest.", "no manifest."},
        {".Signature.related.entries.","(Signature related entries)"},
        {".Unsigned.entries.", "(Unsigned entries)"},
        {"jar.is.unsigned.signatures.missing.or.not.parsable.",
                "jar is unsigned. (signatures missing or not parsable)"},
        {"jar.verified.", "jar verified."},
        {"jarsigner.", "jarsigner: "},
        {"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.",
                "signature filename must consist of the following characters: A-Z, 0-9, _ or -"},
        {"unable.to.open.jar.file.", "unable to open jar file: "},
        {"unable.to.create.", "unable to create: "},
        {".adding.", "   adding: "},
        {".updating.", " updating: "},
        {".signing.", "  signing: "},
        {"attempt.to.rename.signedJarFile.to.jarFile.failed",
                "attempt to rename {0} to {1} failed"},
        {"attempt.to.rename.jarFile.to.origJar.failed",
                "attempt to rename {0} to {1} failed"},
        {"unable.to.sign.jar.", "unable to sign jar: "},
        {"Enter.Passphrase.for.keystore.", "Enter Passphrase for keystore: "},
        {"keystore.load.", "keystore load: "},
        {"certificate.exception.", "certificate exception: "},
        {"unable.to.instantiate.keystore.class.",
                "unable to instantiate keystore class: "},
        {"Certificate.chain.not.found.for.alias.alias.must.reference.a.valid.KeyStore.key.entry.containing.a.private.key.and",
                "Certificate chain not found for: {0}.  {1} must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain."},
        {"File.specified.by.certchain.does.not.exist",
                "File specified by -certchain does not exist"},
        {"Cannot.restore.certchain.from.file.specified",
                "Cannot restore certchain from file specified"},
        {"Certificate.chain.not.found.in.the.file.specified.",
                "Certificate chain not found in the file specified."},
        {"found.non.X.509.certificate.in.signer.s.chain",
                "found non-X.509 certificate in signer's chain"},
        {"incomplete.certificate.chain", "incomplete certificate chain"},
        {"Enter.key.password.for.alias.", "Enter key password for {0}: "},
        {"unable.to.recover.key.from.keystore",
                "unable to recover key from keystore"},
        {"key.associated.with.alias.not.a.private.key",
                "key associated with {0} not a private key"},
        {"you.must.enter.key.password", "you must enter key password"},
        {"unable.to.read.password.", "unable to read password: "},
        {"certificate.is.valid.from", "certificate is valid from {0} to {1}"},
        {"certificate.expired.on", "certificate expired on {0}"},
        {"certificate.is.not.valid.until",
                "certificate is not valid until {0}"},
        {"certificate.will.expire.on", "certificate will expire on {0}"},
        {".CertPath.not.validated.", "[CertPath not validated: "},
        {"requesting.a.signature.timestamp",
                "requesting a signature timestamp"},
        {"TSA.location.", "TSA location: "},
        {"TSA.certificate.", "TSA certificate: "},
        {"no.response.from.the.Timestamping.Authority.",
                "no response from the Timestamping Authority. When connecting"
                + " from behind a firewall an HTTP or HTTPS proxy may need to"
                + " be specified. Supply the following options to jarsigner:"},
        {"or", "or"},
        {"Certificate.not.found.for.alias.alias.must.reference.a.valid.KeyStore.entry.containing.an.X.509.public.key.certificate.for.the",
                "Certificate not found for: {0}.  {1} must reference a valid KeyStore entry containing an X.509 public key certificate for the Timestamping Authority."},
        {"using.an.alternative.signing.mechanism",
                "using an alternative signing mechanism"},
        {"entry.was.signed.on", "entry was signed on {0}"},
        {"Warning.", "Warning: "},
        {"This.jar.contains.unsigned.entries.which.have.not.been.integrity.checked.",
                "This jar contains unsigned entries which have not been integrity-checked. "},
        {"This.jar.contains.entries.whose.signer.certificate.has.expired.",
                "This jar contains entries whose signer certificate has expired. "},
        {"This.jar.contains.entries.whose.signer.certificate.will.expire.within.six.months.",
                "This jar contains entries whose signer certificate will expire within six months. "},
        {"This.jar.contains.entries.whose.signer.certificate.is.not.yet.valid.",
                "This jar contains entries whose signer certificate is not yet valid. "},
        {"Re.run.with.the.verbose.option.for.more.details.",
                "Re-run with the -verbose option for more details."},
        {"Re.run.with.the.verbose.and.certs.options.for.more.details.",
                "Re-run with the -verbose and -certs options for more details."},
        {"The.signer.certificate.has.expired.",
                "The signer certificate has expired."},
        {"The.signer.certificate.will.expire.within.six.months.",
                "The signer certificate will expire within six months."},
        {"The.signer.certificate.is.not.yet.valid.",
                "The signer certificate is not yet valid."},
        {"The.signer.certificate.s.KeyUsage.extension.doesn.t.allow.code.signing.",
                 "The signer certificate's KeyUsage extension doesn't allow code signing."},
        {"The.signer.certificate.s.ExtendedKeyUsage.extension.doesn.t.allow.code.signing.",
                 "The signer certificate's ExtendedKeyUsage extension doesn't allow code signing."},
        {"The.signer.certificate.s.NetscapeCertType.extension.doesn.t.allow.code.signing.",
                 "The signer certificate's NetscapeCertType extension doesn't allow code signing."},
        {"This.jar.contains.entries.whose.signer.certificate.s.KeyUsage.extension.doesn.t.allow.code.signing.",
                 "This jar contains entries whose signer certificate's KeyUsage extension doesn't allow code signing."},
        {"This.jar.contains.entries.whose.signer.certificate.s.ExtendedKeyUsage.extension.doesn.t.allow.code.signing.",
                 "This jar contains entries whose signer certificate's ExtendedKeyUsage extension doesn't allow code signing."},
        {"This.jar.contains.entries.whose.signer.certificate.s.NetscapeCertType.extension.doesn.t.allow.code.signing.",
                 "This jar contains entries whose signer certificate's NetscapeCertType extension doesn't allow code signing."},
        {".{0}.extension.does.not.support.code.signing.",
                 "[{0} extension does not support code signing]"},
        {"The.signer.s.certificate.chain.is.not.validated.",
                "The signer's certificate chain is not validated."},
        {"This.jar.contains.entries.whose.certificate.chain.is.not.validated.",
                 "This jar contains entries whose certificate chain is not validated."},
    };

    /**
     * Returns the contents of this ResourceBundle.
     *
     *

     *
     * @return the contents of this ResourceBundle.
     */
    public Object[][] getContents() {
        return contents;
    }
}


text:
create table test_table (
  id bigint,
  name varchar(64),
  age SMALLINT,
  percent DECIMAL(5,2),
  datetime_col DATETIME,
  timestamp_col TIMESTAMP,
  date_col DATE,
  time_col TIME,
  primary key (id)
) Engine=InnoDB;


text:
import WidgetModel from './WidgetModel';

export {
    WidgetModel
};


text:
module Spurious
  module Server
    class Options
      attr_reader :docker_full_path, :docker_host, :docker_port, :docker_api, :server_port, :server_ip, :write_timeout, :read_timeout, :cert_path

      def initialize(env)
        @docker_host      = env['DOCKER_HOST'].nil? ? 'localhost' : env['DOCKER_HOST'][/\/\/([0-9a-z\.]+):/,1]
        @docker_port      = env['DOCKER_HOST'].nil? ? nil : env['DOCKER_HOST'][/:([0-9]+)/,1]
        @docker_api       = !env['DOCKER_HOST'].nil?
        @server_port      = env.fetch('SPURIOUS_SERVER_PORT', 4590)
        @server_ip        = env.fetch('SPURIOUS_SERVER_IP', '0.0.0.0')
        @write_timeout    = env.fetch('EXCON_WRITE_TIMEOUT', 30000)
        @read_timeout     = env.fetch('EXCON_READ_TIMEOUT', 30000)
        @cert_path        = env.fetch('DOCKER_CERT_PATH', nil)
        setup_ssl if @cert_path
      end

      def ssl_docker_host
        "https://#{docker_host}:#{docker_port}"
      end

      protected

      def setup_ssl
        Docker.options = {
          :client_cert => valid_cert_path?('cert.pem'),
          :client_key  => valid_cert_path?('key.pem'),
          :ssl_ca_file => valid_cert_path?('ca.pem')
        }
      end

      def valid_cert_path?(cert)
        File.join(absolute_cert_path, cert).tap do |path|
          raise "Could not find: #{path}, please check it exists in your DOCKER_CERTS_PATH folder" unless File.exists? path
        end
      end

      def absolute_cert_path
        @absolute_cert_path ||= File.expand_path cert_path
      end
    end
  end
end


text: A simple hash generator for .NET Core


text:
#include "config.h"
#include "core/inspector/PageConsoleAgent.h"

#include "bindings/core/v8/ScriptController.h"
#include "core/frame/FrameConsole.h"
#include "core/frame/FrameHost.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/ConsoleMessageStorage.h"
#include "core/inspector/InspectorDOMAgent.h"
#include "core/inspector/InspectorPageAgent.h"
#include "core/workers/WorkerInspectorProxy.h"

namespace blink {

int PageConsoleAgent::s_enabledAgentCount = 0;

PageConsoleAgent::PageConsoleAgent(InjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent, InspectorPageAgent* pageAgent)
    : InspectorConsoleAgent(injectedScriptManager)
    , m_inspectorDOMAgent(domAgent)
    , m_pageAgent(pageAgent)
{
}

PageConsoleAgent::~PageConsoleAgent()
{
#if !ENABLE(OILPAN)
    m_inspectorDOMAgent = nullptr;
    m_instrumentingAgents->setPageConsoleAgent(nullptr);
#endif
}

DEFINE_TRACE(PageConsoleAgent)
{
    visitor->trace(m_inspectorDOMAgent);
    visitor->trace(m_pageAgent);
    InspectorConsoleAgent::trace(visitor);
}

void PageConsoleAgent::enable(ErrorString* errorString)
{
    InspectorConsoleAgent::enable(errorString);
    m_workersWithEnabledConsole.clear();
    m_instrumentingAgents->setPageConsoleAgent(this);
}

void PageConsoleAgent::disable(ErrorString* errorString)
{
    m_instrumentingAgents->setPageConsoleAgent(nullptr);
    InspectorConsoleAgent::disable(errorString);
}

void PageConsoleAgent::clearMessages(ErrorString* errorString)
{
    m_inspectorDOMAgent->releaseDanglingNodes();
    messageStorage()->clear(m_pageAgent->inspectedFrame()->document());
}

void PageConsoleAgent::workerConsoleAgentEnabled(WorkerGlobalScopeProxy* proxy)
{
    m_workersWithEnabledConsole.add(proxy);
}

ConsoleMessageStorage* PageConsoleAgent::messageStorage()
{
    return &m_pageAgent->frameHost()->consoleMessageStorage();
}

void PageConsoleAgent::workerTerminated(WorkerInspectorProxy* workerInspectorProxy)
{
    WorkerGlobalScopeProxy* proxy = workerInspectorProxy->workerGlobalScopeProxy();
    if (!proxy)
        return;

    HashSet<WorkerGlobalScopeProxy*>::iterator iterator = m_workersWithEnabledConsole.find(proxy);
    bool workerAgentWasEnabled = iterator != m_workersWithEnabledConsole.end();
    if (workerAgentWasEnabled)
        return;

    ConsoleMessageStorage* storage = messageStorage();
    size_t messageCount = storage->size();
    for (size_t i = 0; i < messageCount; ++i) {
        ConsoleMessage* message = storage->at(i);
        if (message->workerGlobalScopeProxy() == proxy) {
            message->setWorkerGlobalScopeProxy(nullptr);
            sendConsoleMessageToFrontend(message, false);
        }
    }
}

void PageConsoleAgent::enableStackCapturingIfNeeded()
{
    if (!s_enabledAgentCount)
        ScriptController::setCaptureCallStackForUncaughtExceptions(true);
    ++s_enabledAgentCount;
}

void PageConsoleAgent::disableStackCapturingIfNeeded()
{
    if (!(--s_enabledAgentCount))
        ScriptController::setCaptureCallStackForUncaughtExceptions(false);
}

} // namespace blink


text:
#!/bin/bash

# ----------------------------------------------------------------------------
# Prerequisites:
#
# node js must be installed.
#
# chrome and firefox must be installed
# ----------------------------------------------------------------------------

#Variables
PKG_NAME="jquery"
PKG_VERSION="3.4.0"
REPOSITORY="https://github.com/jquery/jquery.git"

echo "Usage: $0 [<PKG_VERSION>]"
echo "       PKG_VERSION is an optional paramater whose default value is 3.4.0"

PKG_VERSION="${1:-$PKG_VERSION}"

#install dependencies
yum -y update && yum install -y yum-utils nodejs nodejs-devel nodejs-packaging npm python38 python38-devel ncurses git gcc gcc-c++ libffi libffi-devel ncurses git jq make cmake

yum install -y firefox liberation-fonts xdg-utils && npm install n -g && n latest && npm install -g npm@latest && export PATH="$PATH" && npm install --global yarn grunt-bump xo testem acorn

# install nodejs
# wget https://nodejs.org/dist/v16.4.2/node-v16.4.2-linux-ppc64le.tar.gz
# tar -xzf node-v16.4.2-linux-ppc64le.tar.gz
# export PATH=$CWD/node-v16.4.2-linux-ppc64le/bin:$PATH

#export CHROME_BIN='/root/chromium_84_0_4118_0'
#export CHROME_BIN=chromium-browser

# create folder for saving logs
mkdir -p /logs
LOGS_DIRECTORY=/logs

LOCAL_DIRECTORY=/root

#clone and build
cd $LOCAL_DIRECTORY
git clone $REPOSITORY $PKG_NAME-$PKG_VERSION
cd $PKG_NAME-$PKG_VERSION/
git branch
git checkout $PKG_VERSION
git branch

npm run build | tee $LOGS_DIRECTORY/$PKG_NAME-$PKG_VERSION.txt

npm run test:browserless


text:
package org.dcm4chex.archive.ejb.jdbc;

import java.sql.SQLException;
import java.sql.Types;

import org.dcm4che.data.Dataset;
import org.dcm4che.data.DcmObjectFactory;
import org.dcm4che.dict.Status;
import org.dcm4che.dict.Tags;
import org.dcm4che.net.DcmServiceException;
import org.dcm4chex.archive.common.DatasetUtils;
import org.dcm4chex.archive.common.UPSState;
import org.dcm4chex.archive.common.Priority;
import org.dcm4chex.archive.ejb.conf.AttributeFilter;
import org.dcm4chex.archive.ejb.jdbc.Match.Node;

/**
 * @author Gunter Zeilinger <gunterze@gmail.com>
 * @version $Revision$ $Date:: xxxx-xx-xx $
 * @since Apr 19, 2010
 */
public class UPSQueryCmd extends BaseDSQueryCmd {

    public static int transactionIsolationLevel = 0;
    public static int blobAccessType = Types.LONGVARBINARY;

    private static final String[] FROM = { "UPS" };

    private static final String[] SELECT = { "Patient.encodedAttributes",
            "UPS.encodedAttributes"};

    private static final String ITEM_CODE = "item_code";

    public UPSQueryCmd(Dataset keys, boolean fuzzyMatchingOfPN,
            boolean noMatchForNoValue) throws SQLException, DcmServiceException {
        super(keys, true, noMatchForNoValue, transactionIsolationLevel);
        AttributeFilter patAttrFilter = AttributeFilter.getPatientAttributeFilter();
        defineColumnTypes(new int[] { blobAccessType, blobAccessType });
        String s;
        // ensure keys contains (8,0005) for use as result filter
        if (!keys.contains(Tags.SpecificCharacterSet)) {
            keys.putCS(Tags.SpecificCharacterSet);
        }
        sqlBuilder.setSelect(SELECT);
        sqlBuilder.setFrom(FROM);
        sqlBuilder.setLeftJoin(getLeftJoin());
        sqlBuilder.addListOfUidMatch(null, "UPS.sopInstanceUID",
                SqlBuilder.TYPE1,
                keys.getStrings(Tags.SOPInstanceUID));
        if ((s = keys.getString(Tags.UPSState)) != null) {
            sqlBuilder.addIntValueMatch(null, "UPS.stateAsInt",
                    SqlBuilder.TYPE1,
                    UPSState.toInt(s));
        }
        s = keys.getString(Tags.SPSPriority);
        if (s != null) {
            sqlBuilder.addIntValueMatch(null, "UPS.priorityAsInt",
                    SqlBuilder.TYPE1,
                    Priority.toInt(s));
        }
        sqlBuilder.addWildCardMatch(null, "UPS.procedureStepLabel",
                SqlBuilder.TYPE1,
                keys.getStrings(Tags.ProcedureStepLabel));
        sqlBuilder.addWildCardMatch(null, "UPS.worklistLabel",
                SqlBuilder.TYPE1,
                keys.getStrings(Tags.WorklistLabel));
        sqlBuilder.addRangeMatch(null, "UPS.scheduledStartDateTime",
                SqlBuilder.TYPE1,
                keys.getDateRange(Tags.SPSStartDateAndTime));
        sqlBuilder.addRangeMatch(null, "UPS.expectedCompletionDateTime",
                type2,
                keys.getDateRange(Tags.ExpectedCompletionDateAndTime));
        sqlBuilder.addCodeMatch(ITEM_CODE,
                keys.getItem(Tags.ScheduledWorkitemCodeSeq));
        addNestedCodeMatch(Tags.ScheduledProcessingApplicationsCodeSeq,
                new String[]{ "UPS.pk", "rel_ups_appcode.ups_fk"},
                new String[]{ "rel_ups_appcode", "Code" },
                new String[]{ "rel_ups_appcode.appcode_fk", "Code.pk"});
        addNestedCodeMatch(Tags.ScheduledStationNameCodeSeq,
                new String[]{ "UPS.pk", "rel_ups_devname.ups_fk"},
                new String[]{ "rel_ups_devname", "Code" },
                new String[]{ "rel_ups_devname.devname_fk", "Code.pk"});
        addNestedCodeMatch(Tags.ScheduledStationClassCodeSeq,
                new String[]{ "UPS.pk", "rel_ups_devclass.ups_fk"},
                new String[]{ "rel_ups_devclass", "Code" },
                new String[]{ "rel_ups_devclass.devclass_fk", "Code.pk"});
        addNestedCodeMatch(Tags.ScheduledStationGeographicLocationCodeSeq,
                new String[]{ "UPS.pk", "rel_ups_devloc.ups_fk"},
                new String[]{ "rel_ups_devloc", "Code" },
                new String[]{ "rel_ups_devloc.devloc_fk", "Code.pk"});
        addNestedCodeMatch(Tags.ScheduledHumanPerformersSeq,
                Tags.HumanPerformerCodeSeq,
                new String[] { "UPS.pk", "rel_ups_performer.ups_fk" },
                new String[] { "rel_ups_performer", "Code" },
                new String[] { "rel_ups_performer.performer_fk", "Code.pk" });
        addRefRequestMatch();
        sqlBuilder.addRefSOPMatch(
                new String[]{ "UPS.pk", "UPSRelatedPS.ups_fk"},
                "UPSRelatedPS", "UPSRelatedPS.refSOPClassUID",
                "UPSRelatedPS.refSOPInstanceUID",
                keys.getItem(Tags.RelatedProcedureStepSeq), type2);
// TODO Tags.ReplacedProcedureStepSeq not yet defined
//        sqlBuilder.addRefSOPMatch(
//                new String[]{ "UPS.pk", "UPSReplacedPS.ups_fk"},
//                "UPSReplacedPS", "UPSReplacedPS.refSOPClassUID",
//                "UPSReplacedPS.refSOPInstanceUID",
//                keys.getItem(Tags.Tags.ReplacedProcedureStepSeq), type2);

        sqlBuilder.addWildCardMatch(null, "UPS.admissionID",
                type2,
                keys.getStrings(Tags.AdmissionID));
        Dataset issuer = keys.getItem(Tags.IssuerOfAdmissionIDSeq);
        if (issuer != null) {
            sqlBuilder.addSingleValueMatch(null,
                    "UPS.issuerOfAdmissionIDLocalNamespaceEntityID",
                    type2,
                    issuer.getString(Tags.LocalNamespaceEntityID));
            sqlBuilder.addSingleValueMatch(null,
                    "UPS.issuerOfAdmissionIDUniversalEntityID",
                    type2,
                    issuer.getString(Tags.UniversalEntityID));
        }
        if (sqlBuilder.addWildCardMatch(null, "Patient.patientId",
                type2,
                patAttrFilter.getStrings(keys, Tags.PatientID)) != null)
            sqlBuilder.addSingleValueMatch(null, "Patient.issuerOfPatientId",
                    type2,
                    patAttrFilter.getString(keys, Tags.IssuerOfPatientID));
        if (fuzzyMatchingOfPN)
            try {
                sqlBuilder.addPNFuzzyMatch(
                        new String[] {
                            "Patient.patientFamilyNameSoundex",
                            "Patient.patientGivenNameSoundex" },
                        type2,
                        keys.getString(Tags.PatientName));
            } catch (IllegalArgumentException ex) {
                throw new DcmServiceException(
                        Status.IdentifierDoesNotMatchSOPClass,
                        ex.getMessage() + ": " + keys.get(Tags.PatientName));
            }
        else
            sqlBuilder.addPNMatch(
                    new String[] {
                        "Patient.patientName",
                        "Patient.patientIdeographicName",
                        "Patient.patientPhoneticName"},
                    type2,
                    patAttrFilter.isICase(Tags.PatientName),
                    keys.getString(Tags.PatientName));
        sqlBuilder.addRangeMatch(null, "Patient.patientBirthDate", type2,
                keys.getString(Tags.PatientBirthDate));
        sqlBuilder.addWildCardMatch(null, "Patient.patientSex", type2,
                patAttrFilter.getStrings(keys, Tags.PatientSex));
    }

    private void addRefRequestMatch() {
        Dataset item = keys.getItem(Tags.RefRequestSeq);
        if (item == null || item.isEmpty())
            return;

        SqlBuilder subQuery = new SqlBuilder();
        subQuery.setSelect1();
        String[] from = { "UPSRequest" };
        subQuery.setFrom(from);
        subQuery.addFieldValueMatch(null, "UPS.pk", false, null,
                "UPSRequest.ups_fk");
        boolean universalMatch = subQuery.addWildCardMatch(null,
                "UPSRequest.requestedProcedureId", type2,
                item.getStrings(Tags.RequestedProcedureID)) == null;
        universalMatch = subQuery.addWildCardMatch(null,
                "UPSRequest.accessionNumber", type2,
                item.getStrings(Tags.AccessionNumber)) == null
                && universalMatch;
        universalMatch = subQuery.addWildCardMatch(null,
                "UPSRequest.confidentialityCode", type2,
                item.getStrings(Tags.ConfidentialityCode)) == null
                && universalMatch;
        universalMatch = subQuery.addWildCardMatch(null,
                "UPSRequest.requestingService", type2,
                item.getStrings(Tags.RequestingService)) == null
                && universalMatch;

        if (universalMatch)
            return;

        if (!type2) {
            sqlBuilder.addCorrelatedSubquery(subQuery);
        } else {
            SqlBuilder subQuery2 = new SqlBuilder();
            subQuery2.setSelect1();
            subQuery2.setFrom(from);
            subQuery2.addFieldValueMatch(null, "UPS.pk", false, null,
                    "UPSRequest.ups_fk");
            Match match2 = new Match.Subquery(subQuery2, null, null);
            Node notNode = new  Match.Node(null, true);
            notNode.addMatch(match2);
            Node orMatch = sqlBuilder.addNodeMatch(" OR", false);
            orMatch.addMatch(new Match.Subquery(subQuery, null, null));
            orMatch.addMatch(notNode);
        }
    }

    private void addNestedCodeMatch(int tag, String[] parentRelation,
            String[] tables, String[] relations) {
        addNestedCodeMatch(keys.getItem(tag), parentRelation, tables, relations);
    }

    private void addNestedCodeMatch(int tag1, int tag2, String[] parentRelation,
            String[] tables, String[] relations) {
        Dataset item = keys.getItem(tag1);
        if (item != null)
            addNestedCodeMatch(item.getItem(tag2), parentRelation, tables, relations);
    }

    private void addNestedCodeMatch(Dataset item, String[] parentRelation,
            String[] tables, String[] relations) {
        sqlBuilder.addNestedCodeMatch(parentRelation, tables, relations, item,
                type2);
    }

    private String[] getLeftJoin() {
        boolean workitem;
        int index = 4;
        if (workitem = SqlBuilder.isCodeMatch(
                keys.getItem(Tags.ScheduledWorkitemCodeSeq)))
            index += 4;
        String[] leftJoin = new String[index];
        leftJoin[0] = "Patient";
        leftJoin[1] = null;
        leftJoin[2] = "UPS.patient_fk";
        leftJoin[3] = "Patient.pk";
        index = 4;
        if (workitem) {
            leftJoin[index++] = "Code";
            leftJoin[index++] = ITEM_CODE;
            leftJoin[index++] = "UPS.code_fk";
            leftJoin[index++] = "Code.pk";
        }
        return leftJoin;
    }

    public Dataset getDataset() throws SQLException {
        Dataset ds = DcmObjectFactory.getInstance().newDataset();
        DatasetUtils.fromByteArray( rs.getBytes(1), ds);
        DatasetUtils.fromByteArray( rs.getBytes(2), ds);
        adjustDataset(ds, keys);
        return ds.subSet(keys);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<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">
    <parent>
        <groupId>servicebox</groupId>
        <artifactId>servicebox-services</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>servicebox-blog-service</artifactId>

    <dependencies>
        <!-- SPRING BOOT DEPENDENCIES -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-rest-hal-browser</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>


text:
@implementation TWRepoCollection

- (id)initWithRepos:(NSArray *)repos {
    self = [super init];
    if (self) {
        _repos = repos;
    }
    return self;
}

- (NSString *)description {
    NSMutableString *result = [[NSMutableString alloc] init];

    for (TWRepo *repo in self.repos) {
        [result appendFormat:@"%@\n----------------------------\n", [repo description]];
    }

    return result;
}

@end


text:
from zope.interface import implements, Interface

from Products.Five import BrowserView

class IFileKmlView(Interface):
    """
    File Kml view interface
    """

class FileKmlView(BrowserView):
    """
    browser view to display a map for a kml file
    """
    implements(IFileKmlView)

class ITopicFileKmlView(Interface):
    """
    Interface for TopicFileKmlView
    """

class TopicFileKmlView(BrowserView):
    """
    displays kml files in the results of the topic
    as layers in the map
    """
    implements(ITopicFileKmlView)


text:
package net.runelite.client.ui.overlay.worldmap;

import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import lombok.Data;
import net.runelite.api.Point;
import net.runelite.api.coords.WorldPoint;
import javax.annotation.Nullable;

@Data
public class WorldMapPoint
{
	private BufferedImage image;

	private WorldPoint worldPoint;

	/**
	 * The WorldPoint which the worldmap will jump to when clicked
	 */
	@Nullable
	private WorldPoint target;

	/**
	 * The point on the image that will be drawn at WorldPoint
	 * WorldMapPointManager will center the image if imagePoint is null
	 */
	private Point imagePoint;

	private Rectangle clickbox;

	private boolean snapToEdge;

	private boolean currentlyEdgeSnapped;

	/**
	 * Whether or not the map jumps to target, or worldPoint when the overlay is clicked
	 */
	private boolean jumpOnClick;

	private boolean tooltipVisible;

	private String tooltip;

	public WorldMapPoint(WorldPoint worldPoint, BufferedImage image)
	{
		this.worldPoint = worldPoint;
		this.image = image;
	}

	public MouseEvent onClick(MouseEvent e)
	{
		return e;
	}

	public void onEdgeSnap()
	{
	}

	public void onEdgeUnsnap()
	{
	}
}


text:
/*
 *
 * TINKER Source Code
 *
 *
 *  [2009] - [2013] Samuel Steven Truscott
 *  All Rights Reserved.
 */
#ifndef TINKER_API_H_
#define TINKER_API_H_

#include "tinker_api_types.h"
#include "tinker_api_errors.h"
#include "tinker_api_process.h"
#include "tinker_api_semaphore.h"
#include "tinker_api_pipe.h"
#include "tinker_api_shm.h"
#include "tinker_api_timer.h"
#include "tinker_api_time.h"

#endif /* TINKER_API_H_ */


text:
// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package ebay.apis.eblbasecomponents;

import java.io.Serializable;
import com.leansoft.nano.annotation.*;
import java.util.List;

/**
 *
 * Container for eBay's Business User features. A business seller can choose
 * to offer an item exclusively to bidders and buyers that also represent businesses.
 * Only applicable when the item is listed in a B2B-enabled category.
 * Currently, the eBay Germany (DE), Austria (AT), and Switzerland (CH) sites support
 * B2B business features.
 *
 */
public class VATDetailsType implements Serializable {

    private static final long serialVersionUID = -1L;

	@Element(name = "BusinessSeller")
	@Order(value=0)
	public Boolean businessSeller;

	@Element(name = "RestrictedToBusiness")
	@Order(value=1)
	public Boolean restrictedToBusiness;

	@Element(name = "VATPercent")
	@Order(value=2)
	public Float vatPercent;

	@Element(name = "VATSite")
	@Order(value=3)
	public String vatSite;

	@Element(name = "VATID")
	@Order(value=4)
	public String vatid;

	@AnyElement
	@Order(value=5)
	public List<Object> any;

}


text:
<?php

namespace Google\AdsApi\AdWords\v201702\cm;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
class FeedItemDevicePreference
{

    /**
     * @var int $devicePreference
     */
    protected $devicePreference = null;

    /**
     * @param int $devicePreference
     */
    public function __construct($devicePreference = null)
    {
      $this->devicePreference = $devicePreference;
    }

    /**
     * @return int
     */
    public function getDevicePreference()
    {
      return $this->devicePreference;
    }

    /**
     * @param int $devicePreference
     * @return \Google\AdsApi\AdWords\v201702\cm\FeedItemDevicePreference
     */
    public function setDevicePreference($devicePreference)
    {
      $this->devicePreference = $devicePreference;
      return $this;
    }

}


text:
<?php

namespace Brzozowski\IntelliHomeBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

/**
 * @Route(
 *     "/",
 *     name="intellihome_index"
 * )
 */
class StartController extends Controller
{
    /**
     * @Route(
     *     "/",
     *     name="intellihome_login"
     * )
     */
    public function indexAction()
    {
        if ($this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) {
            return $this->redirect($this->generateUrl('intellihome_panel'));
        }
        else {
            return $this->redirect($this->generateUrl('fos_user_security_login'));
        }

    }

}


text:
package org.apache.kylin.engine.spark.utils;

import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;

import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.StringUtils;

import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.kylin.common.KylinConfig;
import org.apache.kylin.common.persistence.ResourceStore;
import org.apache.kylin.common.util.HadoopUtil;
import org.apache.kylin.cube.CubeInstance;
import org.apache.kylin.cube.CubeManager;
import org.apache.kylin.cube.CubeSegment;
import org.apache.kylin.cube.CubeUpdate;
import org.apache.kylin.cube.cuboid.CuboidModeEnum;
import org.apache.kylin.common.constant.JobTypeEnum;
import org.apache.kylin.engine.mr.common.BatchConstants;
import org.apache.kylin.engine.mr.common.CubeStatsReader;
import org.apache.kylin.engine.mr.common.CubeStatsWriter;
import org.apache.kylin.engine.mr.steps.CubingExecutableUtil;
import org.apache.kylin.engine.spark.job.NSparkExecutable;
import org.apache.kylin.measure.hllc.HLLCounter;
import org.apache.kylin.metadata.MetadataConstants;
import org.apache.kylin.metadata.TableMetadataManager;
import org.apache.kylin.metadata.model.SegmentStatusEnum;
import org.apache.kylin.metadata.model.TableExtDesc;
import org.apache.kylin.metadata.realization.RealizationStatusEnum;
import org.apache.kylin.shaded.com.google.common.collect.Maps;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UpdateMetadataUtil {

    protected static final Logger logger = LoggerFactory.getLogger(UpdateMetadataUtil.class);

    public static void syncLocalMetadataToRemote(KylinConfig config, NSparkExecutable nsparkExecutable)
            throws IOException {
        String cubeId = nsparkExecutable.getParam(MetadataConstants.P_CUBE_ID);
        Set<String> segmentIds = Sets
                .newHashSet(StringUtils.split(nsparkExecutable.getParam(CubingExecutableUtil.SEGMENT_ID), " "));
        String segmentId = segmentIds.iterator().next();
        String remoteResourceStore = nsparkExecutable.getDistMetaUrl();
        String jobType = nsparkExecutable.getParam(MetadataConstants.P_JOB_TYPE);

        CubeManager cubeManager = CubeManager.getInstance(config);
        CubeInstance currentInstanceCopy = cubeManager.getCubeByUuid(cubeId).latestCopyForWrite();

        // load the meta from local meta path of this job
        KylinConfig kylinDistConfig = MetaDumpUtil.loadKylinConfigFromHdfs(remoteResourceStore);
        CubeInstance distCube = CubeManager.getInstance(kylinDistConfig).getCubeByUuid(cubeId);
        CubeSegment toUpdateSeg = distCube.getSegmentById(segmentId);

        List<CubeSegment> tobeSegments = currentInstanceCopy.calculateToBeSegments(toUpdateSeg);
        if (!tobeSegments.contains(toUpdateSeg)) {
            throw new IllegalStateException(
                    String.format(Locale.ROOT, "For cube %s, segment %s is expected but not in the tobe %s",
                            currentInstanceCopy.toString(), toUpdateSeg.toString(), tobeSegments.toString()));
        }

        String resKey = toUpdateSeg.getStatisticsResourcePath();
        String statisticsDir = config.getJobTmpDir(currentInstanceCopy.getProject()) + "/"
                + nsparkExecutable.getParam(MetadataConstants.P_JOB_ID) + "/" + ResourceStore.CUBE_STATISTICS_ROOT + "/"
                + cubeId + "/" + segmentId + "/";
        Path statisticsFile = new Path(statisticsDir, BatchConstants.CFG_STATISTICS_CUBOID_ESTIMATION_FILENAME);
        FileSystem fs = HadoopUtil.getWorkingFileSystem();
        if (fs.exists(statisticsFile)) {
            FSDataInputStream is = fs.open(statisticsFile);
            ResourceStore.getStore(config).putBigResource(resKey, is, System.currentTimeMillis());
        }

        CubeUpdate update = new CubeUpdate(currentInstanceCopy);
        update.setCuboids(distCube.getCuboids());
        List<CubeSegment> toRemoveSegs = Lists.newArrayList();

        if (String.valueOf(JobTypeEnum.MERGE).equals(jobType)) {
            toUpdateSeg.getSnapshots().clear();
            // update the snapshot table path
            for (Map.Entry<String, String> entry : currentInstanceCopy.getLatestReadySegment().getSnapshots()
                    .entrySet()) {
                toUpdateSeg.putSnapshotResPath(entry.getKey(), entry.getValue());
            }
        } else if (String.valueOf(JobTypeEnum.OPTIMIZE).equals(jobType)) {
            CubeSegment origSeg = currentInstanceCopy.getOriginalSegmentToOptimize(toUpdateSeg);
            toUpdateSeg.getDictionaries().putAll(origSeg.getDictionaries());
            toUpdateSeg.getSnapshots().putAll(origSeg.getSnapshots());
            toUpdateSeg.getRowkeyStats().addAll(origSeg.getRowkeyStats());

            CubeStatsReader optSegStatsReader = new CubeStatsReader(toUpdateSeg, config, true);
            CubeStatsReader origSegStatsReader = new CubeStatsReader(origSeg, config, true);
            Map<Long, HLLCounter> cuboidHLLMap = Maps.newHashMap();
            if (origSegStatsReader.getCuboidRowHLLCounters() == null) {
                logger.warn(
                        "Cuboid statistics of original segment do not exist. Please check the config of kylin.engine.segment-statistics-enabled.");
            } else {
                addFromCubeStatsReader(origSegStatsReader, cuboidHLLMap);
                addFromCubeStatsReader(optSegStatsReader, cuboidHLLMap);

                Set<Long> recommendCuboids = currentInstanceCopy.getCuboidsByMode(CuboidModeEnum.RECOMMEND);
                Map<Long, HLLCounter> resultCuboidHLLMap = Maps.newHashMapWithExpectedSize(recommendCuboids.size());
                for (long cuboid : recommendCuboids) {
                    HLLCounter hll = cuboidHLLMap.get(cuboid);
                    if (hll == null) {
                        logger.warn("Cannot get the row count stats for cuboid " + cuboid);
                    } else {
                        resultCuboidHLLMap.put(cuboid, hll);
                    }
                }
                if (fs.exists(statisticsFile)) {
                    fs.delete(statisticsFile, false);
                }
                CubeStatsWriter.writeCuboidStatistics(HadoopUtil.getCurrentConfiguration(), new Path(statisticsDir),
                        resultCuboidHLLMap, 1, origSegStatsReader.getSourceRowCount());
                FSDataInputStream is = fs.open(statisticsFile);
                ResourceStore.getStore(config).putBigResource(resKey, is, System.currentTimeMillis());
            }
            toUpdateSeg.setStatus(SegmentStatusEnum.READY_PENDING);
        } else {
            toUpdateSeg.setStatus(SegmentStatusEnum.READY);
            for (CubeSegment segment : currentInstanceCopy.getSegments()) {
                if (!tobeSegments.contains(segment)) {
                    toRemoveSegs.add(segment);
                }
            }
            Collections.sort(toRemoveSegs);
            if (currentInstanceCopy.getConfig().isJobAutoReadyCubeEnabled()) {
                update.setStatus(RealizationStatusEnum.READY);
            }
        }

        logger.info("Promoting cube {}, new segment {}, to remove segments {}", currentInstanceCopy, toUpdateSeg,
                toRemoveSegs);

        toUpdateSeg.setLastBuildTime(System.currentTimeMillis());
        update.setToRemoveSegs(toRemoveSegs.toArray(new CubeSegment[0])).setToUpdateSegs(toUpdateSeg);
        cubeManager.updateCube(update);
    }

    public static void updateMetadataAfterMerge(String cubeId, String segmentId, KylinConfig config)
            throws IOException {
        CubeManager cubeManager = CubeManager.getInstance(config);
        CubeInstance currentInstanceCopy = cubeManager.getCubeByUuid(cubeId).latestCopyForWrite();

        CubeSegment toUpdateSegs = currentInstanceCopy.getSegmentById(segmentId);

        List<CubeSegment> tobeSegments = currentInstanceCopy.calculateToBeSegments(toUpdateSegs);
        if (!tobeSegments.contains(toUpdateSegs)) {
            throw new IllegalStateException(
                    String.format(Locale.ROOT, "For cube %s, segment %s is expected but not in the tobe %s",
                            currentInstanceCopy.toString(), toUpdateSegs.toString(), tobeSegments.toString()));
        }

        CubeUpdate update = new CubeUpdate(currentInstanceCopy);
        List<CubeSegment> toRemoveSegs = Lists.newArrayList();

        toUpdateSegs.setStatus(SegmentStatusEnum.READY);
        for (CubeSegment segment : currentInstanceCopy.getSegments()) {
            if (!tobeSegments.contains(segment)) {
                toRemoveSegs.add(segment);
            }
        }
        Collections.sort(toRemoveSegs);
        if (currentInstanceCopy.getConfig().isJobAutoReadyCubeEnabled()) {
            update.setStatus(RealizationStatusEnum.READY);
        }

        logger.info("Promoting cube {}, new segment {}, to remove segments {}", currentInstanceCopy, toUpdateSegs,
                toRemoveSegs);

        toUpdateSegs.setLastBuildTime(System.currentTimeMillis());
        update.setToRemoveSegs(toRemoveSegs.toArray(new CubeSegment[0])).setToUpdateSegs(toUpdateSegs);
        cubeManager.updateCube(update);
    }

    public static void updateMetadataAfterSamplingTable(KylinConfig config, NSparkExecutable nsparkExecutable)
            throws IOException {
        String remoteResourceStore = nsparkExecutable.getDistMetaUrl();
        String project = nsparkExecutable.getParam(MetadataConstants.P_PROJECT_NAME);
        String tableIdentity = nsparkExecutable.getParam(MetadataConstants.TABLE_NAME);

        TableMetadataManager tableMetadataManager = TableMetadataManager.getInstance(config);
        TableExtDesc currentTableExtDesc= tableMetadataManager.getTableExt(tableIdentity, project);

        // load the meta from local meta path of this job
        KylinConfig kylinDistConfig = MetaDumpUtil.loadKylinConfigFromHdfs(remoteResourceStore);
        TableExtDesc distTableExtDesc = TableMetadataManager.getInstance(kylinDistConfig)
                .getTableExt(tableIdentity, project);

        currentTableExtDesc.setCardinality(distTableExtDesc.getCardinality());
        currentTableExtDesc.setSampleRows(distTableExtDesc.getSampleRows());
        currentTableExtDesc.setColumnStats(distTableExtDesc.getColumnStats());

        logger.info("Updating table external desc {} of table {} in project {}", distTableExtDesc, tableIdentity,
                project);
        try {
            tableMetadataManager.saveTableExt(currentTableExtDesc, project);
        } catch (IOException e) {
            logger.error("save {} table ext found error !", currentTableExtDesc);
            e.printStackTrace();
        }
        logger.info("Table {} update table ext desc done.", tableIdentity);
    }

    private static void addFromCubeStatsReader(CubeStatsReader cubeStatsReader, Map<Long, HLLCounter> cuboidHLLMap) {
        for (Map.Entry<Long, HLLCounter> entry : cubeStatsReader.getCuboidRowHLLCounters().entrySet()) {
            if (cuboidHLLMap.get(entry.getKey()) != null) {
                cuboidHLLMap.get(entry.getKey()).merge(entry.getValue());
            } else {
                cuboidHLLMap.put(entry.getKey(), entry.getValue());
            }
        }
    }
}


text:
A demo version of the Research Adventures series of information and digital literacy training resources.

This was created using [Raconteur and the handy scaffolding tool developed by Bruno Dias](https://github.com/sequitur/raconteur).

## About this project

Research Adventures is a series of interactive learning resources developed by [Artefacto](http://artefacto.org.uk/). This is the beta version and is very much a work in progress.

## To Do

Research Adventure no.1 is an interactive-fiction style, text-based adventure that helps users gain information literacy skills while choosing their own research path and gaining rewards as they go.

- Finish story pathways and complete branching
- Add learning outcomes
- Create base adventure template
- Add short demo version
- Lots of other things

## File Structure

There's lots of scaffold structure here for development, the game compiles into the build/game directory (handily).  For development, check out the [Raconteur](http://github.com/sequitur/raconteur/) repository.

## Usage

This scaffold comes prepped for usage with Gulp as a build system, Less for CSS preprocessing, Browserify for bundling JavaScript, and CoffeeScript as a JS transpiler.

## License

Most of the code in this scaffold, Undum, and Raconteur are distributed under the MIT license, which allows you to redistribute or modify the code, even for commercial use, as long as you always package it along with a notice acknowledging the original copyright holders and this license. See LICENSE for legalese.

The example image included with this scaffold (storyteller.jpg) is from the Swiss National Library, GS-GUGE-FREUDENBERGER-C-8, and is in the public domain and the images included in the demo research adventure are from the [Vintage Adventures set by Varvara Gorbash](https://creativemarket.com/varka/130130-Vintage-Adventures.-Vector-Set).


text:
Edit Category

        <form class="form-horizontal" data-ng-submit="update()" novalidate>
            <fieldset>

                    Name

                        <input type="text" data-ng-model="category.name" id="name" class="form-control" placeholder="Name" required>

                    <input type="submit" value="Update" class="btn btn-lg btn-primary">

            </fieldset>
        </form>


text:
const _ = require('lodash');

const keyWithArrayLogic = /(.+)\[(?:([+-])?|([+-])\d+)]$/;

const unset = (object, path) => {
  const pathArray = _.toPath(path);
  const leavePath = pathArray.pop();

  // remove from array
  if (pathArray.length) {
    const parent = _.get(object, pathArray);
    if (_.isArray(parent)) {
      return _.pullAt(parent, leavePath);
    }
  }

  return _.unset(object, path);
};

exports.assignWithSet = (object, ...sources) => {
  while (sources.length) {
    const source = sources.shift();
    Object.entries(source).forEach(([key, value]) => {
      if (value === undefined) {
        return unset(object, key);
      }
      const regExpResult = keyWithArrayLogic.exec(key);

      if (regExpResult === null) {
        return _.set(object, key, value);
      }

      const keyWithoutArrayLogic = regExpResult[1];
      if (regExpResult[2] === '-' || regExpResult[3] === '-') {
        // unshift
        const array = _.get(object, keyWithoutArrayLogic);
        _.set(object, keyWithoutArrayLogic, array ? [value, ...array] : [value]);
      } else {
        // push
        const array = _.get(object, keyWithoutArrayLogic);
        _.set(object, `${keyWithoutArrayLogic}[${array ? array.length : 0}]`, value);
      }
    });
  }
  return object;
};


text:
<?xml version="1.0" encoding="utf-8"?>
<shape
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="oval"
  android:height="@dimen/margin_double_plus"
  android:width="@dimen/margin_double_plus">
  <solid android:color="@color/black_4"/>
</shape>


text:
<!DOCTYPE html>

You should see the word 'PASS' on a green background below, and no red.

    PASS


text:
package com.semmle.js.ast.regexp;

import com.semmle.js.ast.SourceLocation;

/** A Unicode property escape such as \p{Number} or \p{Script=Greek}. */
public class UnicodePropertyEscape extends RegExpTerm {
  private final String name, value, raw;

  public UnicodePropertyEscape(SourceLocation loc, String name, String value, String raw) {
    super(loc, "UnicodePropertyEscape");
    this.name = name;
    this.value = value;
    this.raw = raw;
  }

  @Override
  public void accept(Visitor v) {
    v.visit(this);
  }

  /** The name of the property. */
  public String getName() {
    return name;
  }

  /** Does this property have a value? */
  public boolean hasValue() {
    return value != null;
  }

  /** The value of the property if any. */
  public String getValue() {
    return value;
  }

  /** The source text of the Unicode property escape. */
  public String getRaw() {
    return raw;
  }
}


text:
import Ember from 'ember';
import Mixin from '@ember/object/mixin';
import { htmlSafe } from '@ember/string';
import { computed } from '@ember/object';
const { escapeExpression } = Ember.Handlebars.Utils;

export default Mixin.create({
  attributeBindings: ['customCSS:style'],

  customCSS: computed('style', function() {
    const css = this.style;

    if (css) {
      return htmlSafe(escapeExpression(css));
    }
  })
});


text:
class MyShowDecorator < Draper::Decorator
  delegate_all
end


text:
package pl.java.scalatech.domain.selfReference;

import static com.google.common.collect.Sets.newHashSet;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import pl.java.scalatech.domain.AbstractEntity;

@Entity
@Table(name="EMPLOYEE_SELF")
@Data
@lombok.EqualsAndHashCode(exclude="manager")
@ToString(exclude="manager")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Employee extends AbstractEntity{
    private static final long serialVersionUID = -5611293337609654205L;

    @Column(name="FIRSTNAME")
    private String firstname;

    @Column(name="LASTNAME")
    private String lastname;

    @ManyToOne(cascade={CascadeType.ALL})
    @JoinColumn(name="manager_id")
    private Employee manager;

    @Column(updatable=false,insertable=false,name="manager_id")
    private Long managerId;

    @OneToMany(mappedBy="manager",cascade={CascadeType.ALL})
    private Set<Employee> employees = newHashSet();

    public Employee(String firstname, String lastname) {
        super();
        this.firstname = firstname;
        this.lastname = lastname;
    }
   public void addEmployee(Employee employee){
       employee.setManager(this);
       getEmployees().add(employee);

   }

}


text:
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _

from horizon import exceptions
from horizon import tabs

from openstack_dashboard import api
from openstack_dashboard.dashboards.project.instances import tables as itables

from gbpui import client
from gbpui import column_filters as gfilters

import tables

PTGsTable = tables.PTGsTable

class PTGsTab(tabs.TableTab):
    table_classes = (PTGsTable,)
    name = _("Groups")
    slug = "policytargets"
    template_name = "horizon/common/_detail_table.html"

    def get_policy_targetstable_data(self):
        policy_targets = []
        try:
            policy_targets = client.policy_target_list(self.tab_group.request)
            a = lambda x, y: gfilters.update_policy_target_attributes(x, y)
            policy_targets = [a(self.request, item) for item in policy_targets]
        except Exception as e:
            msg = _('Unable to retrieve policy_target list. %s') % (str(e))
            exceptions.handle(self.tab_group.request, msg)
            for policy_target in policy_targets:
                policy_target.set_id_as_name_if_empty()
        return policy_targets

class PTGTabs(tabs.TabGroup):
    slug = "policy_targettabs"
    tabs = (PTGsTab,)
    sticky = True

class PTGDetailsTab(tabs.Tab):
    name = _("Group Details")
    slug = "policy_targetdetails"
    template_name = "project/policytargets/_policy_target_details.html"
    failure_url = reverse_lazy('horizon:project:policy_target_group:index')

    def get_context_data(self, request):
        policy_targetid = self.tab_group.kwargs['policy_target_id']
        try:
            policy_target = client.policy_target_get(request, policy_targetid)
            l3list = client.l3policy_list(request)
            l2list = client.l2policy_list(request)
            l2list = [
                item for item in l2list
                if item.id == policy_target.l2_policy_id]
        except Exception:
            exceptions.handle(
                request, _('Unable to retrieve group details.'),
                redirect=self.failure_url)
        return {'policy_target': policy_target,
                'l3list': l3list,
                'l2list': l2list}

class PTGDetailsTabs(tabs.TabGroup):
    slug = "policy_targettabs"
    tabs = (PTGDetailsTab,)

class InstancesTab(tabs.TableTab):
    name = _("Members")
    slug = "members_tab"
    table_classes = (tables.InstancesTable,)
    template_name = ("horizon/common/_detail_table.html")
    preload = True

    def get_instances_data(self):
        policy_targetid = self.tab_group.kwargs['policy_target_id']
        filtered_instances = []
        try:
            policytargets = client.pt_list(self.request,
                                      policy_target_group_id=policy_targetid)
            policy_target_ports = [x.port_id for x in policytargets]
            marker = self.request.GET.get(
                tables.InstancesTable._meta.pagination_param, None)
            instances, self._has_more = api.nova.server_list(
                self.request, search_opts={'marker': marker, 'paginate': True})
            instances = [item for item in instances
                    if not itables.is_deleting(item)]
            for item in instances:
                for port in api.neutron.port_list(self.request,
                                                  device_id=item.id):
                    if port.id in policy_target_ports:
                        filtered_instances.append(item)
                        break
        except Exception:
            self._has_more = False
            error_message = _('Unable to get instances')
            exceptions.handle(self.request, error_message)
            filtered_instances = []
        return filtered_instances

class ConsumedTab(tabs.TableTab):
    name = _('Consumed Policy Rule Set')
    slug = 'consumed_policy_rule_sets_tab'
    table_classes = (tables.ConsumedContractsTable,)
    template_name = ("horizon/common/_detail_table.html")

    def get_consumed_policy_rule_sets_data(self):
        try:
            policy_targetid = self.tab_group.kwargs['policy_target_id']
            policy_target = client.policy_target_get(
                self.request, policy_targetid)
            consumed_policy_rule_set_ids = policy_target.get(
                'consumed_policy_rule_sets')
            consumed_policy_rule_sets = []
            for _id in consumed_policy_rule_set_ids:
                consumed_policy_rule_sets.append(
                    client.policy_rule_set_get(self.request, _id))
            consumed_policy_rule_sets = [gfilters.update_pruleset_attributes(
                self.request, item) for item in consumed_policy_rule_sets]
            return consumed_policy_rule_sets
        except Exception:
            error_message = _('Unable to get consumed rule sets')
            exceptions.handle(self.request, error_message)
            return []

class ProvidedTab(tabs.TableTab):
    name = _('Provided Policy Rule Set')
    slug = 'provided_policy_rule_sets_tab'
    table_classes = (tables.ProvidedContractsTable,)
    template_name = ("horizon/common/_detail_table.html")

    def get_provided_policy_rule_sets_data(self):
        try:
            policy_targetid = self.tab_group.kwargs['policy_target_id']
            policy_target = client.policy_target_get(
                self.request, policy_targetid)
            provided_policy_rule_set_ids = policy_target.get(
                'provided_policy_rule_sets')
            provided_policy_rule_sets = []
            for _id in provided_policy_rule_set_ids:
                provided_policy_rule_sets.append(
                    client.policy_rule_set_get(self.request, _id))
            provided_policy_rule_sets = [gfilters.update_pruleset_attributes(
                self.request, item) for item in provided_policy_rule_sets]
            return provided_policy_rule_sets
        except Exception:
            error_message = _('Unable to get provided rule sets')
            exceptions.handle(self.request, error_message)
            return []

class PTGMemberTabs(tabs.TabGroup):
    slug = 'member_tabs'
    tabs = (InstancesTab, ProvidedTab, ConsumedTab, PTGDetailsTab,)
    stiky = True