text:
<?php

namespace Tecnoready\Common\Service\ObjectManager\StatisticManager\Adapter;

use Tecnoready\Common\Service\ObjectManager\ConfigureInterface;

/**
 * Adaptador de doctrine 2
 *
 * @author Carlos Mendoza <inhack20@gmail.com>
 */
class DoctrineORMAdapter implements StatisticsAdapterInterface,ConfigureInterface
{
    use \Tecnoready\Common\Service\ObjectManager\TraitConfigure;

    /**
     * @var string
     */
    public $classYearName;

    /**
     * @var string
     */
    private $classMonthName;

    /**
     * Manejador de entidades
     * @var \Doctrine\ORM\EntityManager
     */
    private $em;

    public function __construct($classYearName,$classMonthName,\Doctrine\ORM\EntityManager $em)
    {
        $this->classYearName = $classYearName;
        $this->classMonthName = $classMonthName;
        $this->em = $em;
    }

    /**
     * @return \Tecnoready\Common\Model\Configuration\Statistics\StatisticsYearInterface Description
     */
    public function newYearStatistics(\Tecnoready\Common\Service\ObjectManager\StatisticManager\StatisticsManager $statisticsManager)
    {
        $entity = new $this->classYearName;
        $entity
            ->setUserAgent($this->getUserAgent())
            ->setCreatedAt(new \DateTime());

        return $entity;
    }

    /**
     * @return \Tecnoready\Common\Model\Configuration\Statistics\StatisticsMonthInterface Description
     */
    public function newStatisticsMonth(\Tecnoready\Common\Service\ObjectManager\StatisticManager\StatisticsManager $statisticsManager)
    {
        $entity = new $this->classMonthName;
        $entity
            ->setUserAgent($this->getUserAgent())
            ->setCreatedAt(new \DateTime());

        return $entity;
    }

    /**
     * Registra cambios en entidad
     *
     * @author Máximo Sojo <maxsojo13@gmail.com>
     * @param  $entity
     * @return EntityManager
     */
    public function persist($entity)
    {
        return $this->em->persist($entity);
    }

    public function flush()
    {
        return $this->em->flush();
    }

    /**
     * Consulta de año
     *
     * @author Máximo Sojo <maxsojo13@gmail.com>
     * @param  array  $params
     * @return \Tecnoready\Common\Model\Statistics\StatisticsYearInterface
     */
    public function findStatisticsYear(array $params = array())
    {
        return $this->em->getRepository($this->classYearName)->findOneBy(array_merge(["objectType" => $this->objectType],$params));
    }

    /**
     * Obtener el UserAgent
     *
     * @author Máximo Sojo <maxsojo13@gmail.com>
     * @return UserAgent
     */
    public function getUserAgent()
    {
        if (isset($_SERVER['HTTP_USER_AGENT'])) {
            $userAgent = $_SERVER['HTTP_USER_AGENT'];
        } elseif (\Tecnoready\Common\Util\AppUtil::isCommandLineInterface()) {
            $userAgent = "cli-user-agent";
        }

        if (empty($userAgent)) {
            $userAgent = "unknown";
        }

        return $userAgent;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

declare(strict_types=1);

namespace Sylius\Bundle\AdminBundle\Menu;

use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
use Sylius\Bundle\AdminBundle\Event\ProductVariantMenuBuilderEvent;
use Sylius\Component\Product\Model\ProductVariantInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

final class ProductVariantFormMenuBuilder
{
    public const EVENT_NAME = 'sylius.menu.admin.product_variant.form';

    public function __construct(private FactoryInterface $factory, private EventDispatcherInterface $eventDispatcher)
    {
    }

    public function createMenu(array $options = []): ItemInterface
    {
        $menu = $this->factory->createItem('root');

        if (!array_key_exists('product_variant', $options) || !$options['product_variant'] instanceof ProductVariantInterface) {
            return $menu;
        }

        $menu
            ->addChild('details')
            ->setAttribute('template', '@SyliusAdmin/ProductVariant/Tab/_details.html.twig')
            ->setLabel('sylius.ui.details')
            ->setCurrent(true)
        ;

        $menu
            ->addChild('taxes')
            ->setAttribute('template', '@SyliusAdmin/ProductVariant/Tab/_taxes.html.twig')
            ->setLabel('sylius.ui.taxes')
        ;

        $menu
            ->addChild('inventory')
            ->setAttribute('template', '@SyliusAdmin/ProductVariant/Tab/_inventory.html.twig')
            ->setLabel('sylius.ui.inventory')
        ;

        $menu
            ->addChild('channel_pricings')
            ->setAttribute('template', '@SyliusAdmin/ProductVariant/Tab/_channelPricings.html.twig')
            ->setLabel('sylius.ui.channel_pricings')
        ;

        $this->eventDispatcher->dispatch(
            new ProductVariantMenuBuilderEvent($this->factory, $menu, $options['product_variant']),
            self::EVENT_NAME
        );

        return $menu;
    }
}


text:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Copyright © 2014-2015 Cask Data, Inc.

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

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

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

  <!-- General Configuration -->

  <property>
    <name>hdfs.lib.dir</name>
    <value>${hdfs.namespace}/lib</value>
    <description>
      Common directory in HDFS for, among others, JAR files for coprocessors
    </description>
  </property>

  <property>
    <name>hdfs.namespace</name>
    <value>/${root.namespace}</value>
    <description>
      Root directory for HDFS files written by CDAP
    </description>
  </property>

  <property>
    <name>hdfs.user</name>
    <value>yarn</value>
    <description>
      User name for accessing HDFS
    </description>
  </property>

  <property>
    <name>local.data.dir</name>
    <value>data</value>
    <description>
      Data directory for standalone mode
    </description>
  </property>

  <property>
    <name>mapreduce.include.custom.format.classes</name>
    <value>true</value>
    <description>
      Indicates whether to include custom input/output format classes in the
      job.jar or not; if set to true, custom format classes will be added to
      the job.jar and available as part of the MapReduce system classpath
    </description>
  </property>

  <property>
    <name>mapreduce.jobclient.connect.max.retries</name>
    <value>2</value>
    <description>
      Indicates the maximum number of retries JobClient will make to
      establish a server connection when retrieving job status and history
    </description>
  </property>

  <property>
    <name>namespaces.dir</name>
    <value>namespaces</value>
    <description>
      The sub-directory of ${hdfs.namespace} in which namespaces are stored
    </description>
  </property>

  <property>
    <name>root.namespace</name>
    <value>cdap</value>
    <description>
      Root for this CDAP instance; used as the parent (or root) node for
      ZooKeeper, as the directory under which all CDAP data and metadata is
      stored in HDFS, and as the prefix for all HBase tables created by
      CDAP; must be composed of alphanumeric characters
    </description>
  </property>

  <property>
    <name>thrift.max.read.buffer</name>
    <value>16777216</value>
    <description>
      Specifies the maximum read buffer size in bytes used by the Thrift
      server; value should be set to greater than the maximum frame sent on
      the RPC channel
    </description>
  </property>

  <property>
    <name>twill.java.reserved.memory.mb</name>
    <value>250</value>
    <description>
      Reserved non-heap memory in megabytes for Apache Twill container
    </description>
  </property>

  <property>
    <name>twill.jvm.gc.opts</name>
    <value>-verbose:gc -Xloggc:<LOG_DIR>/gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1M</value>
    <description>
      Java garbage collection options for all Apache Twill containers;
      "<LOG_DIR>" is the location of the log directory in the
      container; note that the special characters are replaced with entity
      equivalents so they can be included in the XML
    </description>
  </property>

  <property>
    <name>twill.no.container.timeout</name>
    <value>120000</value>
    <description>
      Amount of time in milliseconds to wait for at least one container for
      Apache Twill runnable
    </description>
  </property>

  <property>
    <name>twill.zookeeper.namespace</name>
    <value>/twill</value>
    <description>
      ZooKeeper namespace prefix for Apache Twill
    </description>
  </property>

  <property>
    <name>yarn.user</name>
    <value>yarn</value>
    <description>
      User name for running applications in YARN
    </description>
  </property>

  <property>
    <name>zookeeper.quorum</name>
    <value>127.0.0.1:2181/${root.namespace}</value>
    <description>
      ZooKeeper quorum string
    </description>
  </property>

  <property>
    <name>zookeeper.session.timeout.millis</name>
    <value>40000</value>
    <description>
      ZooKeeper session timeout in milliseconds
    </description>
  </property>

  <!-- Global Configuration -->

  <property>
    <name>dataset.unchecked.upgrade</name>
    <value>false</value>
    <description>
      By default, any changes made to existing datasets are not deployed
      when an app is redeployed; setting this value to true allows the
      dataset changes to be deployed upon app redeployment.
    </description>
  </property>

  <property>
    <name>enable.unrecoverable.reset</name>
    <value>false</value>
    <description>
      Determines if resetting CDAP should be enabled. **WARNING: Enabling
      this option makes it possible to delete all applications and data; NO
      RECOVERY IS POSSIBLE!**
    </description>
  </property>

  <!-- Applications Configuration -->

  <property>
    <name>app.artifact.dir</name>
    <value>/opt/cdap/master/artifacts</value>
    <description>
      Directory where all system artifacts and their corresponding config files are stored
    </description>
  </property>

  <property>
    <name>app.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Host address on which the app fabric server is started
    </description>
  </property>

  <property>
    <name>app.output.dir</name>
    <value>/programs</value>
    <description>
      Directory where all archives are stored
    </description>
  </property>

  <property>
    <name>app.program.extra.classpath</name>
    <value/>
    <description>
      Extra Java classpath for CDAP programs
    </description>
  </property>

  <property>
    <name>app.program.jvm.opts</name>
    <value>-XX:MaxPermSize=128M ${twill.jvm.gc.opts}</value>
    <description>
      Java options for all program containers
    </description>
  </property>

  <property>
    <name>app.program.runid.corrector.interval</name>
    <value>180</value>
    <description>
      The interval of how often the run id corrector thread will run in
      seconds; this value should be greater than 0
    </description>
  </property>

  <property>
    <name>app.temp.dir</name>
    <value>/tmp</value>
    <description>
      Temp directory
    </description>
  </property>

  <property>
    <name>scheduler.max.thread.pool.size</name>
    <value>30</value>
    <description>
      Size of the scheduler thread pool
    </description>
  </property>

  <property>
    <name>workflow.token.max.size.mb</name>
    <value>30</value>
    <description>
      Maximum allowed size of a Workflow Token, in megabytes; if the
      workflow token exceeds this size, no further updates are allowed
    </description>
  </property>

  <!-- Datasets Configuration -->

  <property>
    <name>data.local.storage</name>
    <value>${local.data.dir}/ldb</value>
    <description>
      Database directory for LevelDB, used for data fabric in standalone
      mode
    </description>
  </property>

  <property>
    <name>data.local.storage.blocksize</name>
    <value>1024</value>
    <description>
      Block size in bytes for data fabric when in standalone mode
    </description>
  </property>

  <property>
    <name>data.local.storage.cachesize</name>
    <value>104857600</value>
    <description>
      Cache size in bytes for data fabric when in standalone mode
    </description>
  </property>

  <property>
    <name>data.tx.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Transaction service inet address
    </description>
  </property>

  <property>
    <name>data.tx.bind.port</name>
    <value>15165</value>
    <description>
      Transaction service bind port
    </description>
  </property>

  <property>
    <name>data.tx.client.count</name>
    <value>50</value>
    <description>
      The number of pooled instances of the transaction client;
      increase this to increase transaction concurrency
    </description>
  </property>

  <property>
    <name>data.tx.client.provider</name>
    <value>pool</value>
    <description>
      Provider strategy for transaction clients; valid values are "pool" and
      "thread-local"
    </description>
  </property>

  <property>
    <name>data.tx.discovery.service.name</name>
    <value>transaction</value>
    <description>
      Name in discovery service for the transaction service
    </description>
  </property>

  <property>
    <name>data.tx.hdfs.user</name>
    <value>${hdfs.user}</value>
    <description>
      User name for accessing HDFS (if not running in secure HDFS)
    </description>
  </property>

  <property>
    <name>data.tx.janitor.enable</name>
    <value>true</value>
    <description>
      Determines if the TransactionDataJanitor coprocessor is enabled on
      tables; normally should be true
    </description>
  </property>

  <property>
    <name>data.tx.max.instances</name>
    <value>${master.service.max.instances}</value>
    <description>
      Maximum number of transaction client instances
    </description>
  </property>

  <property>
    <name>data.tx.memory.mb</name>
    <value>${master.service.memory.mb}</value>
    <description>
      Memory in megabytes of the transaction clients
    </description>
  </property>

  <property>
    <name>data.tx.num.cores</name>
    <value>${master.service.num.cores}</value>
    <description>
      Maximum number of transaction client cores
    </description>
  </property>

  <property>
    <name>data.tx.num.instances</name>
    <value>1</value>
    <description>
      Requested number of transaction client instances
    </description>
  </property>

  <property>
    <name>data.tx.server.io.threads</name>
    <value>2</value>
    <description>
      Number of IO threads for the transaction service
    </description>
  </property>

  <property>
    <name>data.tx.server.threads</name>
    <value>25</value>
    <description>
      Number of threads for the transaction service
    </description>
  </property>

  <property>
    <name>data.tx.snapshot.codecs</name>
    <value>
      co.cask.cdap.data2.transaction.snapshot.SnapshotCodecV1,
      co.cask.cdap.data2.transaction.snapshot.SnapshotCodecV2,
      co.cask.tephra.snapshot.SnapshotCodecV3,
      co.cask.tephra.snapshot.SnapshotCodecV4
    </value>
    <description>
      Specifies the class names of all supported transaction state codecs
    </description>
  </property>

  <property>
    <name>data.tx.snapshot.dir</name>
    <value>${hdfs.namespace}/tx.snapshot</value>
    <description>
      Directory in HDFS used to store snapshots and logs of transaction
      state
    </description>
  </property>

  <property>
    <name>data.tx.snapshot.interval</name>
    <value>60</value>
    <description>
      Frequency of transaction snapshots in seconds
    </description>
  </property>

  <property>
    <name>data.tx.snapshot.local.dir</name>
    <value>${local.data.dir}/tx.snapshot</value>
    <description>
      Storage directory on the local filesystem of snapshot and logs of
      transaction state when in standalone mode
    </description>
  </property>

  <property>
    <name>data.tx.snapshot.retain</name>
    <value>10</value>
    <description>
      Number of transaction snapshot files to retain as backups
    </description>
  </property>

  <property>
    <name>data.tx.thrift.max.read.buffer</name>
    <value>${thrift.max.read.buffer}</value>
    <description>
      Maximum read buffer size (in bytes) used by the transaction server;
      the value should be set to something greater than the maximum frame
      sent on the RPC channel
    </description>
  </property>

  <property>
    <name>data.tx.timeout</name>
    <value>30</value>
    <description>
      Timeout value in seconds for a transaction; if the transaction is not
      finished in that time, it is marked invalid
    </description>
  </property>

  <property>
    <name>dataset.data.dir</name>
    <value>data</value>
    <description>
      Base directory for user data on the filesystem
    </description>
  </property>

  <property>
    <name>dataset.executor.container.instances</name>
    <value>1</value>
    <description>
      Number of dataset executor instances
    </description>
  </property>

  <property>
    <name>dataset.executor.max.instances</name>
    <value>${master.service.max.instances}</value>
    <description>
      Maximum number of dataset executor instances
    </description>
  </property>

  <property>
    <name>dataset.extensions.dir</name>
    <value>/opt/cdap/ext/lib</value>
    <description>
      Directory where all dataset extensions are stored
    </description>
  </property>

  <property>
    <name>dataset.service.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Dataset service hostname
    </description>
  </property>

  <property>
    <name>dataset.service.output.dir</name>
    <value>/datasets</value>
    <description>
      Directory where all dataset modules archives are stored
    </description>
  </property>

  <property>
    <name>dataset.table.prefix</name>
    <value>${root.namespace}</value>
    <description>
      Prefix for dataset table name
    </description>
  </property>

  <!-- Explore Service Configuration -->

  <property>
    <name>explore.active.operation.timeout.secs</name>
    <value>86400</value>
    <description>
      Timeout value in seconds for an SQL operation whose result was not
      fetched completely
    </description>
  </property>

  <property>
    <name>explore.cleanup.job.schedule.secs</name>
    <value>60</value>
    <description>
      Time in seconds to schedule clean-up job to timeout operations
    </description>
  </property>

  <property>
    <name>explore.enabled</name>
    <value>false</value>
    <description>
      Determines if the CDAP Explore Service (ad-hoc SQL queries) is enabled
    </description>
  </property>

  <property>
    <name>explore.executor.container.instances</name>
    <value>1</value>
    <description>
      Number of explore executor instances
    </description>
  </property>

  <property>
    <name>explore.executor.max.instances</name>
    <value>1</value>
    <description>
      Maximum number of explore executor instances
    </description>
  </property>

  <property>
    <name>explore.inactive.operation.timeout.secs</name>
    <value>3600</value>
    <description>
      Timeout value in seconds for an SQL operation which does not have any
      more results to be fetched
    </description>
  </property>

  <property>
    <name>explore.local.data.dir</name>
    <value>${local.data.dir}/explore</value>
    <description>
      Data directory for explore service when in standalone mode
    </description>
  </property>

  <property>
    <name>explore.start.on.demand</name>
    <value>false</value>
    <description>
      Determines the start-up of the CDAP Explore Service (ad-hoc SQL
      queries); if false, the explore service starts up when CDAP is
      started; if true, the explore service will start upon the first query
      it receives
    </description>
  </property>

  <property>
    <name>explore.writes.enabled</name>
    <value>true</value>
    <description>
      Determines if writing to a table through the CDAP Explore Service (ad-
      hoc SQL queries) is enabled
    </description>
  </property>

  <!-- Gateway Configuration -->

  <property>
    <name>app.boss.threads</name>
    <value>1</value>
    <description>
      Number of Netty server boss threads
    </description>
  </property>

  <property>
    <name>app.connection.backlog</name>
    <value>20000</value>
    <description>
      Max connection backlog of CDAP Master
    </description>
  </property>

  <property>
    <name>app.exec.threads</name>
    <value>20</value>
    <description>
      Number of Netty server executor threads
    </description>
  </property>

  <property>
    <name>app.worker.threads</name>
    <value>10</value>
    <description>
      Number of Netty server worker threads
    </description>
  </property>

  <!-- Kafka Server Configuration -->

  <property>
    <name>kafka.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Kafka server hostname address
    </description>
  </property>

  <property>
    <name>kafka.bind.port</name>
    <value>9092</value>
    <description>
      Kafka server bind port
    </description>
  </property>

  <property>
    <name>kafka.default.replication.factor</name>
    <value>1</value>
    <description>
      Kafka replication factor; used to replicate Kafka messages across
      multiple machines to prevent data loss in the event of a hardware
      failure. The recommended setting is to run at least two Kafka servers.
      If you are running two Kafka servers, set this value to 2; otherwise,
      set it to the number of Kafka servers.
    </description>
  </property>

  <property>
    <name>kafka.log.dir</name>
    <value>/tmp/kafka-logs</value>
    <description>
      Kafka log storage directory
    </description>
  </property>

  <property>
    <name>kafka.num.partitions</name>
    <value>10</value>
    <description>
      Default number of partitions for a topic
    </description>
  </property>

  <property>
    <name>kafka.zookeeper.namespace</name>
    <value>kafka</value>
    <description>
      Kafka ZooKeeper namespace
    </description>
  </property>

  <!-- Logging Configuration -->

  <property>
    <name>kafka.seed.brokers</name>
    <value>127.0.0.1:9092</value>
    <description>
      List of Kafka brokers (comma separated)
    </description>
  </property>

  <property>
    <name>log.base.dir</name>
    <value>/logs/avro</value>
    <description>
      Base log directory
    </description>
  </property>

  <property>
    <name>log.cleanup.run.interval.mins</name>
    <value>1440</value>
    <description>
      Log cleanup interval in minutes
    </description>
  </property>

  <property>
    <name>log.collection.root</name>
    <value>${local.data.dir}/logs</value>
    <description>
      Root location for collecting logs when in standalone mode
    </description>
  </property>

  <property>
    <name>log.publish.num.partitions</name>
    <value>10</value>
    <description>
      Number of Kafka partitions to publish the logs to
    </description>
  </property>

  <property>
    <name>log.retention.duration.days</name>
    <value>7</value>
    <description>
      Log file HDFS retention duration in days
    </description>
  </property>

  <property>
    <name>log.saver.max.instances</name>
    <value>${master.service.max.instances}</value>
    <description>
      Maximum number of log saver instances to run in YARN
    </description>
  </property>

  <property>
    <name>log.saver.num.instances</name>
    <value>1</value>
    <description>
      Number of log saver instances to run in YARN
    </description>
  </property>

  <property>
    <name>log.saver.run.memory.megs</name>
    <value>1024</value>
    <description>
      Memory in megabytes allocated for log saver instances to run in YARN
    </description>
  </property>

  <property>
    <name>log.saver.status.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Default inet address for binding log saver HTTP service
    </description>
  </property>

  <!-- Master Configuration -->

  <property>
    <name>http.service.boss.threads</name>
    <value>1</value>
    <description>
      Number of Netty server boss threads for master HTTP services
    </description>
  </property>

  <property>
    <name>http.service.connection.backlog</name>
    <value>20000</value>
    <description>
      Max connection backlog of master HTTP service
    </description>
  </property>

  <property>
    <name>http.service.exec.threads</name>
    <value>20</value>
    <description>
      Number of Netty server executor threads for master HTTP services
    </description>
  </property>

  <property>
    <name>http.service.worker.threads</name>
    <value>10</value>
    <description>
      Number of Netty server worker threads for master HTTP services
    </description>
  </property>

  <property>
    <name>master.collect.containers.log</name>
    <value>true</value>
    <description>
      Determines if container logs are streamed back to the CDAP Master process log
    </description>
  </property>

  <property>
    <name>master.service.max.instances</name>
    <value>5</value>
    <description>
      Maximum Number of Master Service Instances
    </description>
  </property>

  <property>
    <name>master.service.memory.mb</name>
    <value>512</value>
    <description>
      Size of Memory in megabytes for Master Service instance
    </description>
  </property>

  <property>
    <name>master.service.num.cores</name>
    <value>2</value>
    <description>
      Number of cores for Master Service instance
    </description>
  </property>

  <!-- Metadata Configuration -->

  <property>
    <name>metadata.max.allowed.chars</name>
    <value>50</value>
    <description>
      Maximum number of characters for metadata keys, values, and tags
    </description>
  </property>

  <property>
    <name>metadata.service.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Default inet address for binding metadata HTTP service
    </description>
  </property>

  <property>
    <name>metadata.service.exec.threads</name>
    <value>${http.service.exec.threads}</value>
    <description>
      Number of Netty server executor threads for metadata HTTP service
    </description>
  </property>

  <property>
    <name>metadata.service.worker.threads</name>
    <value>${http.service.worker.threads}</value>
    <description>
      Number of Netty server IO worker threads for metadata HTTP service
    </description>
  </property>

  <property>
    <name>metadata.updates.kafka.broker.list</name>
    <value>127.0.0.1:${kafka.bind.port}</value>
    <description>
      Kafka broker list to which metadata update notifications are published
    </description>
  </property>

  <property>
    <name>metadata.updates.kafka.topic</name>
    <value>cdap-metadata-updates</value>
    <description>
      Kafka topic to which metadata update notifications are published
    </description>
  </property>

  <property>
    <name>metadata.updates.publish.enabled</name>
    <value>false</value>
    <description>
      Determines if metadata updates will be published to Apache Kafka.
      External systems can subscribe to the Kafka topic determined by
      ${metadata.updates.kafka.topic} to receive notifications of metadata
      updates.
    </description>
  </property>

  <!-- Metrics Configuration -->

  <property>
    <name>metrics.boss.threads</name>
    <value>${http.service.boss.threads}</value>
    <description>
      Number of Netty server boss threads for metrics HTTP services
    </description>
  </property>

  <property>
    <name>metrics.connection.backlog</name>
    <value>${http.service.connection.backlog}</value>
    <description>
      Max connection backlog of metrics HTTP service
    </description>
  </property>

  <property>
    <name>metrics.data.table.retention.resolution.1.seconds</name>
    <value>7200</value>
    <description>
      Retention resolution of the 1-second resolution table in seconds;
      default retention period is 2 hours
    </description>
  </property>

  <property>
    <name>metrics.data.table.retention.resolution.3600.seconds</name>
    <value>2592000</value>
    <description>
      Retention resolution 1-hour resolution table (in seconds); default
      retention period is 30 days
    </description>
  </property>

  <property>
    <name>metrics.data.table.retention.resolution.60.seconds</name>
    <value>2592000</value>
    <description>
      Retention resolution for 1-minute resolution table (in seconds);
      default retention period is 30 days
    </description>
  </property>

  <property>
    <name>metrics.data.table.ts.rollTime.3600</name>
    <value>24</value>
    <description>
      Number of columns in a 1-hour resolution timeseries table
    </description>
  </property>

  <property>
    <name>metrics.data.table.ts.rollTime.60</name>
    <value>60</value>
    <description>
      Number of columns in a 1-minute resolution timeseries table
    </description>
  </property>

  <property>
    <name>metrics.dataset.hbase.stats.report.interval</name>
    <value>60</value>
    <description>
      Report interval for hbase stats, in seconds
    </description>
  </property>

  <property>
    <name>metrics.dataset.leveldb.stats.report.interval</name>
    <value>60</value>
    <description>
      Report interval for leveldb stats, in seconds
    </description>
  </property>

  <property>
    <name>metrics.exec.threads</name>
    <value>${http.service.exec.threads}</value>
    <description>
      Number of Netty server executor threads for metrics HTTP services
    </description>
  </property>

  <property>
    <name>metrics.kafka.partition.size</name>
    <value>10</value>
    <description>
      Number of partitions for metrics topic
    </description>
  </property>

  <property>
    <name>metrics.max.instances</name>
    <value>${master.service.max.instances}</value>
    <description>
      Maximum number of instances for the metrics service
    </description>
  </property>

  <property>
    <name>metrics.memory.mb</name>
    <value>${master.service.memory.mb}</value>
    <description>
      Memory assigned to the metrics service in megabytes
    </description>
  </property>

  <property>
    <name>metrics.num.cores</name>
    <value>${master.service.num.cores}</value>
    <description>
      Number of virtual cores for the metrics service
    </description>
  </property>

  <property>
    <name>metrics.num.instances</name>
    <value>1</value>
    <description>
      Number of instances for the metrics service
    </description>
  </property>

  <property>
    <name>metrics.processor.max.instances</name>
    <value>${master.service.max.instances}</value>
    <description>
      Maximum number of instances for Metrics Processor Service Apache Twill
      Runnable
    </description>
  </property>

  <property>
    <name>metrics.processor.memory.mb</name>
    <value>512</value>
    <description>
      Size of Memory in megabytes for Metrics Processor Service Apache Twill
      Runnable
    </description>
  </property>

  <property>
    <name>metrics.processor.num.cores</name>
    <value>1</value>
    <description>
      Number of cores for Metrics Processor Service Apache Twill Runnable
    </description>
  </property>

  <property>
    <name>metrics.processor.num.instances</name>
    <value>1</value>
    <description>
      Number of instances for Metrics Processor Service Apache Twill
      Runnable
    </description>
  </property>

  <property>
    <name>metrics.processor.status.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Default inet address for binding metrics processor HTTP service
    </description>
  </property>

  <property>
    <name>metrics.query.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Metrics query server host address
    </description>
  </property>

  <property>
    <name>metrics.query.bind.port</name>
    <value>45005</value>
    <description>
      Metrics query server bind port
    </description>
  </property>

  <property>
    <name>metrics.worker.threads</name>
    <value>${http.service.worker.threads}</value>
    <description>
      Number of Netty server worker threads for metrics HTTP services
    </description>
  </property>

  <!-- Monitor Handler Configuration -->

  <property>
    <name>monitor.handler.service.discovery.timeout.seconds</name>
    <value>1</value>
    <description>
      Timeout in seconds for service discovery used in Monitor Handler
      Service Status check
    </description>
  </property>

  <!-- Notification System Configuration -->

  <property>
    <name>notification.transport.system</name>
    <value>kafka</value>
    <description>
      Transport system used by the Notification system - can be kafka/stream
    </description>
  </property>

  <!-- Queue Configuration -->

  <property>
    <name>data.queue.config.update.interval</name>
    <value>5</value>
    <description>
      Frequency, in seconds, of updates to the queue consumer configuration
      used in evicting queue entries on flush and compaction
    </description>
  </property>

  <property>
    <name>data.queue.dequeue.tx.percent</name>
    <value>30</value>
    <description>
      Percentage of transaction time allowed to spend in dequeue; it should
      be an integer between 1-100
    </description>
  </property>

  <property>
    <name>data.queue.table.presplits</name>
    <value>16</value>
    <description>
      Number of splits in the queue table
    </description>
  </property>

  <!-- Router Configuration -->

  <property>
    <name>router.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Router server address
    </description>
  </property>

  <property>
    <name>router.bind.port</name>
    <value>10000</value>
    <description>
      Port number that the CDAP router should bind to for HTTP connections
    </description>
  </property>

  <property>
    <name>router.server.port</name>
    <value>${router.bind.port}</value>
    <description>
      Router port to which CDAP UI connects
    </description>
  </property>

  <property>
    <name>router.ssl.bind.port</name>
    <value>10443</value>
    <description>
      Port number that the CDAP router should bind to for HTTPS connections
    </description>
  </property>

  <property>
    <name>router.ssl.server.port</name>
    <value>${router.ssl.bind.port}</value>
    <description>
    </description>
  </property>

  <property>
    <name>router.ssl.webapp.bind.port</name>
    <value>20443</value>
    <description>
      Secure router listening port for webapp
    </description>
  </property>

  <property>
    <name>router.webapp.bind.port</name>
    <value>20000</value>
    <description>
      Router listening port for webapp
    </description>
  </property>

  <property>
    <name>router.webapp.enabled</name>
    <value>false</value>
    <description>
      Determines if the webapp listening service should be started at router
    </description>
  </property>

  <!-- Security Configuration -->

  <property>
    <name>cdap.master.kerberos.keytab</name>
    <value></value>
    <description>
      The full path to the Kerberos keytab file containing the CDAP Master's
      credentials
    </description>
  </property>

  <property>
    <name>cdap.master.kerberos.principal</name>
    <value></value>
    <description>
      Example: "CDAP_PRINCIPAL/_HOST@EXAMPLE.COM". The Kerberos primary user
      that should be used to login to the CDAP Master process. Substitute
      the Kerberos primary (user) for CDAP_PRINCIPAL, and your domain for
      EXAMPLE.COM. The string "_HOST" will be substituted with the local
      hostname.
    </description>
  </property>

  <property>
    <name>kerberos.auth.enabled</name>
    <value>${security.enabled}</value>
    <description>
      Determines if Kerberos authentication is enabled
    </description>
  </property>

  <property>
    <name>security.auth.server.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      IP address that the CDAP Authentication Server should bind to
    </description>
  </property>

  <property>
    <name>security.auth.server.bind.port</name>
    <value>10009</value>
    <description>
      Port that the CDAP Authentication Server should bind to
    </description>
  </property>

  <property>
    <name>security.auth.server.ssl.bind.port</name>
    <value>10010</value>
    <description>
      Port to bind to for HTTPS on the CDAP Authentication Server
    </description>
  </property>

  <property>
    <name>security.authentication.basic.realmfile</name>
    <value></value>
    <description>
      Username / password file to use when basic authentication is
      configured
    </description>
  </property>

  <property>
    <name>security.authentication.handlerClassName</name>
    <value></value>
    <description>
      Name of the authentication implementation to use to validate user
      credentials
    </description>
  </property>

  <property>
    <name>security.authentication.loginmodule.className</name>
    <value></value>
    <description>
      JAAS LoginModule implementation to use when
      co.cask.security.server.JAASAuthenticationHandler is configured for
      security.authentication.handlerClassName
    </description>
  </property>

  <property>
    <name>security.authorization.enabled</name>
    <value>false</value>
    <description>
      Determines if authorization checks are enabled
    </description>
  </property>

  <property>
    <name>security.data.keyfile.path</name>
    <value>${local.data.dir}/security/keyfile</value>
    <description>
      Path to the secret key file (only used in standalone mode)
    </description>
  </property>

  <property>
    <name>security.enabled</name>
    <value>false</value>
    <description>
      Determines if authentication is enabled for CDAP; if true, all
      requests to CDAP must provide a valid access token
    </description>
  </property>

  <property>
    <name>security.realm</name>
    <value>cdap</value>
    <description>
      Authentication realm used for scoping security; this value should be
      unique for each installation of CDAP
    </description>
  </property>

  <property>
    <name>security.server.extended.token.expiration.ms</name>
    <value>604800000</value>
    <description>
      Admin tool access token expiration time in milliseconds; defaults to 1
      week (internal)
    </description>
  </property>

  <property>
    <name>security.server.maxthreads</name>
    <value>100</value>
    <description>
      Maximum number of threads that the CDAP Authentication Server should
      use for handling HTTP requests
    </description>
  </property>

  <property>
    <name>security.server.token.expiration.ms</name>
    <value>86400000</value>
    <description>
      AccessToken expiration time in milliseconds (defaults to 24 hours)
    </description>
  </property>

  <property>
    <name>security.token.digest.algorithm</name>
    <value>HmacSHA256</value>
    <description>
      Algorithm used for generating MAC of access tokens
    </description>
  </property>

  <property>
    <name>security.token.digest.key.expiration.ms</name>
    <value>3600000</value>
    <description>
      Time duration (in milliseconds) after which an active secret key used
      for signing tokens should be retired
    </description>
  </property>

  <property>
    <name>security.token.digest.keylength</name>
    <value>128</value>
    <description>
      Key length used in generating the secret keys for generating MAC of
      access tokens
    </description>
  </property>

  <property>
    <name>security.token.distributed.parent.znode</name>
    <value>/${root.namespace}/security/auth</value>
    <description>
      Parent node in ZooKeeper used for secret key distribution in
      distributed mode
    </description>
  </property>

  <property>
    <name>ssl.enabled</name>
    <value>false</value>
    <description>
      Determines if SSL is enabled
    </description>
  </property>

  <property>
    <name>security.authorization.enabled</name>
    <value>false</value>
    <description>
      Determines if authorization is enabled
    </description>
  </property>

  <property>
    <name>security.authorization.pluginClassName</name>
    <value>co.cask.cdap.security.authorization.DatasetAuthorizationPlugin</value>
    <description>
      Class name of the AuthorizationPlugin implementation to use
    </description>
  </property>

  <!-- Stream Configuration -->

  <property>
    <name>stream.async.queue.size</name>
    <value>100</value>
    <description>
      Queue size per async worker thread for queuing up async write request
    </description>
  </property>

  <property>
    <name>stream.async.worker.threads</name>
    <value>${stream.worker.threads}</value>
    <description>
      Number of async worker threads for handling async write request
    </description>
  </property>

  <property>
    <name>stream.base.dir</name>
    <value>/streams</value>
    <description>
      The directory root for all stream files, relative to the HDFS
      namespace
    </description>
  </property>

  <property>
    <name>stream.batch.buffer.threshold</name>
    <value>1048576</value>
    <description>
      Bytes retained in-memory before writing to a new stream file
    </description>
  </property>

  <property>
    <name>stream.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      Default inet address for binding stream HTTP service
    </description>
  </property>

  <property>
    <name>stream.consumer.table.presplits</name>
    <value>16</value>
    <description>
      Number of splits for the stream consumer table
    </description>
  </property>

  <property>
    <name>stream.container.instance.id</name>
    <value>0</value>
    <description>
      Instance ID for stream service container. The actual value will be set
      at runtime by the system automatically.
    </description>
  </property>

  <property>
    <name>stream.container.instances</name>
    <value>1</value>
    <description>
      Number of YARN container instances for the stream handler
    </description>
  </property>

  <property>
    <name>stream.container.memory.mb</name>
    <value>512</value>
    <description>
      Amount of memory in megabytes for the YARN container that runs the
      stream handler
    </description>
  </property>

  <property>
    <name>stream.container.num.cores</name>
    <value>2</value>
    <description>
      Number of virtual core for the YARN container that runs the stream
      handler
    </description>
  </property>

  <property>
    <name>stream.event.ttl</name>
    <value>9223372036854775807</value>
    <description>
      Default time to live in milliseconds (Long.MAX_VALUE) for stream
      events
    </description>
  </property>

  <property>
    <name>stream.file.cleanup.period</name>
    <value>300000</value>
    <description>
      How often to run stream file cleanup process in milliseconds
    </description>
  </property>

  <property>
    <name>stream.file.prefix</name>
    <value>file</value>
    <description>
      Prefix of file name for stream file
    </description>
  </property>

  <property>
    <name>stream.index.interval</name>
    <value>10000</value>
    <description>
      Default time interval in milliseconds for emitting new index entry in
      stream file
    </description>
  </property>

  <property>
    <name>stream.instance.file.prefix</name>
    <value>${stream.file.prefix}.${stream.container.instance.id}</value>
    <description>
      Prefix of file name for stream file per writer instance
    </description>
    <final>true</final>
  </property>

  <property>
    <name>stream.notification.threshold</name>
    <value>1024</value>
    <description>
      Size of data, in megabytes, to be ingested by a stream before a
      notification is published
    </description>
  </property>

  <property>
    <name>stream.partition.duration</name>
    <value>3600000</value>
    <description>
      The default duration of a stream partition in milliseconds
    </description>
  </property>

  <property>
    <name>stream.size.schedule.polling.delay</name>
    <value>600</value>
    <description>
      Delay, in seconds, to poll a stream in a StreamSizeSchedule if no
      notification is received
    </description>
  </property>

  <property>
    <name>stream.worker.threads</name>
    <value>${http.service.worker.threads}</value>
    <description>
      Default number of IO worker threads for the stream HTTP service
    </description>
  </property>

  <!-- UI Configuration -->

  <property>
    <name>dashboard.bind.address</name>
    <value>0.0.0.0</value>
    <description>
      CDAP UI bind address
    </description>
  </property>

  <property>
    <name>dashboard.bind.port</name>
    <value>9999</value>
    <description>
      CDAP UI bind port
    </description>
  </property>

  <property>
    <name>dashboard.ssl.bind.port</name>
    <value>9443</value>
    <description>
      CDAP UI bind port for HTTPS
    </description>
  </property>

  <property>
    <name>dashboard.ssl.disable.cert.check</name>
    <value>false</value>
    <description>
      True to disable SSL certificate check from the CDAP UI
    </description>
  </property>

  <property>
    <name>router.server.address</name>
    <value>127.0.0.1</value>
    <description>
      Router address to which CDAP UI connects
    </description>
  </property>

</configuration>


text:
namespace llvm {

class PPCInstPrinter : public MCInstPrinter {
  bool IsDarwin;
public:
  PPCInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
                 const MCRegisterInfo &MRI, bool isDarwin)
    : MCInstPrinter(MAI, MII, MRI), IsDarwin(isDarwin) {}

  bool isDarwinSyntax() const {
    return IsDarwin;
  }

  void printRegName(raw_ostream &OS, unsigned RegNo) const override;
  void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
                 const MCSubtargetInfo &STI) override;

  // Autogenerated by tblgen.
  void printInstruction(const MCInst *MI, raw_ostream &O);
  static const char *getRegisterName(unsigned RegNo);

  bool printAliasInstr(const MCInst *MI, raw_ostream &OS);
  void printCustomAliasOperand(const MCInst *MI, unsigned OpIdx,
                               unsigned PrintMethodIdx,
                               raw_ostream &OS);

  void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printPredicateOperand(const MCInst *MI, unsigned OpNo,
                             raw_ostream &O, const char *Modifier = nullptr);
  void printATBitsAsHint(const MCInst *MI, unsigned OpNo, raw_ostream &O);

  void printU1ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU2ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU3ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU4ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printS5ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU5ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU6ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU7ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU8ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU10ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU12ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printS16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printU16ImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printAbsBranchOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printTLSCall(const MCInst *MI, unsigned OpNo, raw_ostream &O);

  void printcrbitm(const MCInst *MI, unsigned OpNo, raw_ostream &O);

  void printMemRegImm(const MCInst *MI, unsigned OpNo, raw_ostream &O);
  void printMemRegReg(const MCInst *MI, unsigned OpNo, raw_ostream &O);
};
} // end namespace llvm

#endif


text:
<?php

namespace Dzasa\MaratusPhpBackup\Clients;

/**
 * Store files on ftp server
 */
class Ftp {

	//ftp host
	private $host = "localhost";

	//ftp port
	private $port = "21";

	//ftp username
	private $user = "root";

	//ftp password
	private $pass = "";

	//passive mode
	private $passive = true;

	//connection
	private $connection = null;

	//local directory where to save file
	private $remoteDir = null;

	//result
	private $result = array();

	/**
	 * Prepare
	 */
	public function __construct($config = array()) {

		if (isset($config['remote_dir'])) {
			$this->remoteDir = $config['remote_dir'];
		}

		if (isset($config['host'])) {
			$this->host = $config['host'];
		}

		if (isset($config['port'])) {
			$this->port = $config['port'];
		}

		if (isset($config['user'])) {
			$this->user = $config['user'];
		}

		if (isset($config['pass'])) {
			$this->pass = $config['pass'];
		}

		$this->connect();
	}

	private function connect() {

		//prepare connection
		$this->connection = ftp_connect($this->host, $this->port);

		//login to ftp server
		$loginResponse = ftp_login($this->connection, $this->user, $this->pass);

		if ((!$this->connection) || (!$loginResponse)) {
			return false;
		}

		ftp_pasv($this->connection, $this->passive);

		ftp_set_option($this->connection, FTP_TIMEOUT_SEC, 300);
	}

	/**
	 * Store it locally
	 * @param  string $fullPath    Full path from local system being saved
	 * @param  string $filename Filename to use on saving
	 */
	public function store($fullPath, $filename) {

		if ($this->connection == false) {
			$result = array(
				'error' => 1,
				'message' => "Unable to connect to ftp server!",
			);

			return $result;
		}

		//prepare dir path to be valid :)
		$this->remoteDir = rtrim($this->remoteDir, "/") . "/";

		try {

			$originalDirectory = ftp_pwd($this->connection);

			// test if you can change directory to remote dir
			// suppress errors in case $dir is not a file or not a directory
			if (@ftp_chdir($this->connection, $this->remoteDir)) {

				// If it is a directory, then change the directory back to the original directory
				ftp_chdir($this->connection, $originalDirectory);
			}
			// try to make dir
			else {
				if (!ftp_mkdir($this->connection, $this->remoteDir)) {
					$result = array(
						'error' => 1,
						'message' => "Remote dir does not exist and unable to create it!",
					);
				}
			}

			//save file to local dir
			if (!ftp_put($this->connection, $this->remoteDir . $filename, $fullPath, FTP_BINARY)) {
				$result = array(
					'error' => 1,
					'message' => "Unable to send file to ftp server",
				);

				return $result;
			}

			//prepare and return result
			$result = array(
				'storage_path' => $this->remoteDir . $filename,
			);

			return $result;
		} catch (Exception $e) {

			//unable to copy file, return error
			$result = array(
				'error' => 1,
				'message' => $e->getMessage(),
			);

			return $result;
		}

	}

}


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\User;
use yii\helpers\ArrayHelper;
use common\helpers\UtilsHelper;

/* @var $this yii\web\View */
/* @var $model common\models\User */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin([
        'id' => 'up',
        'enableAjaxValidation' => true
    ]); ?>
    <?php if(!$userData->isNewRecord): ?>
            <?= $form->field($user, 'status')->checkbox([
                'class' => 'switch',
                'data-on-color' => "success",
                'data-off-color' => "danger",
                'data-on-text' => Yii::t('status', "Active"),
                'data-off-text' => Yii::t('status', "Disabled"),
            ], false)->label(false)?>
    <?php endif; ?>

            <?= $form->field($user, 'username')->textInput() ?>

            <?php if($userData->isNewRecord):?>
                <?= $form->field($user, 'password')->textInput() ?>
                <?= $form->field($user, 'role')->dropDownList(User::getRoles(), ['options' =>[ User::ROLE_USER => ['Selected' => true]]]) ?>
            <?php else: ?>
                <?= $form->field($user, 'role')->dropDownList(User::getRoles()) ?>
            <?php endif; ?>

            <?= $form->field($user, 'email')->textInput() ?>

            <?= $form->field($userData, 'office_id')->dropDownList(
                ArrayHelper::map(\common\models\Office::find()->all(), 'id', 'name')
            )->label('Office') ?>

            <?= $form->field($userData, 'first_name')->textInput() ?>
            <?= $form->field($userData, 'last_name')->textInput() ?>
            <?= $form->field($userData, 'gender')->dropDownList(common\models\UserData::getGenders()) ?>
            <?= $form->field($userData, 'phone')->textInput() ?>
            <?= $form->field($userData, 'skype')->textInput() ?>

            <?= $form->field($userData, 'hire_date')->input('date') ?>
            <?= $form->field($userData, 'birthday')->input('date') ?>
            <?= $form->field($userData, 'address')->textInput() ?>
            <?= $form->field($userData, 'position_id')->dropDownList(
                ArrayHelper::map(common\models\JobPosition::find()->all(), 'id', 'name')
            ) ?>
            <?= $form->field($userData, 'map_place')->textInput() ?>

        <?= Html::submitButton($userData->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $userData->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>

<?= common\widgets\map\MapWidget::widget(['params' => [
    'showList' => false
]]); ?>


text:
<form method="GET" class="pull-right">

        <input type="text" name="filters[q]" value="{{ Input::get('filters.q') }}" class="form-control pull-right {{ Input::get('filters.q') ? 'warning' : '' }}">

            <button type="submit" class="btn btn-default"></button>

</form>


text:
$(document).ready(function() {
  $('#new_comment').on('submit', function(event) {
    event.preventDefault();
    console.log("HELLO")
    var datum = $(this).serialize();
    $.ajax({
      method: "post",
      url: "/comments",
      data: datum
    })
    .done(function(request) {
      $('.comment_list ul').append("<li>" + request + "</li>");
    })
  })
});