text:
package com.google.ads.googleads.v12.resources;

public final class KeywordPlanProto {
  private KeywordPlanProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_ads_googleads_v12_resources_KeywordPlan_descriptor;
  static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_ads_googleads_v12_resources_KeywordPlan_fieldAccessorTable;
  static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_ads_googleads_v12_resources_KeywordPlanForecastPeriod_descriptor;
  static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_ads_googleads_v12_resources_KeywordPlanForecastPeriod_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n5google/ads/googleads/v12/resources/key" +
      "word_plan.proto\022\"google.ads.googleads.v1" +
      "2.resources\032+google/ads/googleads/v12/co" +
      "mmon/dates.proto\032Cgoogle/ads/googleads/v" +
      "12/enums/keyword_plan_forecast_interval." +
      "proto\032\037google/api/field_behavior.proto\032\031" +
      "google/api/resource.proto\"\306\002\n\013KeywordPla" +
      "n\022C\n\rresource_name\030\001 \001(\tB,\340A\005\372A&\n$google" +
      "ads.googleapis.com/KeywordPlan\022\024\n\002id\030\005 \001" +
      "(\003B\003\340A\003H\000\210\001\001\022\021\n\004name\030\006 \001(\tH\001\210\001\001\022V\n\017forec" +
      "ast_period\030\004 \001(\0132=.google.ads.googleads." +
      "v12.resources.KeywordPlanForecastPeriod:" +
      "a\352A^\n$googleads.googleapis.com/KeywordPl" +
      "an\0226customers/{customer_id}/keywordPlans" +
      "/{keyword_plan_id}B\005\n\003_idB\007\n\005_name\"\337\001\n\031K" +
      "eywordPlanForecastPeriod\022t\n\rdate_interva" +
      "l\030\001 \001(\0162[.google.ads.googleads.v12.enums" +
      ".KeywordPlanForecastIntervalEnum.Keyword" +
      "PlanForecastIntervalH\000\022@\n\ndate_range\030\002 \001" +
      "(\0132*.google.ads.googleads.v12.common.Dat" +
      "eRangeH\000B\n\n\010intervalB\202\002\n&com.google.ads." +
      "googleads.v12.resourcesB\020KeywordPlanProt" +
      "oP\001ZKgoogle.golang.org/genproto/googleap" +
      "is/ads/googleads/v12/resources;resources" +
      "\242\002\003GAA\252\002\"Google.Ads.GoogleAds.V12.Resour" +
      "ces\312\002\"Google\\Ads\\GoogleAds\\V12\\Resources" +
      "\352\002&Google::Ads::GoogleAds::V12::Resource" +
      "sb\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          com.google.ads.googleads.v12.common.DatesProto.getDescriptor(),
          com.google.ads.googleads.v12.enums.KeywordPlanForecastIntervalProto.getDescriptor(),
          com.google.api.FieldBehaviorProto.getDescriptor(),
          com.google.api.ResourceProto.getDescriptor(),
        });
    internal_static_google_ads_googleads_v12_resources_KeywordPlan_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_google_ads_googleads_v12_resources_KeywordPlan_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_ads_googleads_v12_resources_KeywordPlan_descriptor,
        new java.lang.String[] { "ResourceName", "Id", "Name", "ForecastPeriod", "Id", "Name", });
    internal_static_google_ads_googleads_v12_resources_KeywordPlanForecastPeriod_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_google_ads_googleads_v12_resources_KeywordPlanForecastPeriod_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_ads_googleads_v12_resources_KeywordPlanForecastPeriod_descriptor,
        new java.lang.String[] { "DateInterval", "DateRange", "Interval", });
    com.google.protobuf.ExtensionRegistry registry =
        com.google.protobuf.ExtensionRegistry.newInstance();
    registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
    registry.add(com.google.api.ResourceProto.resource);
    registry.add(com.google.api.ResourceProto.resourceReference);
    com.google.protobuf.Descriptors.FileDescriptor
        .internalUpdateFileDescriptor(descriptor, registry);
    com.google.ads.googleads.v12.common.DatesProto.getDescriptor();
    com.google.ads.googleads.v12.enums.KeywordPlanForecastIntervalProto.getDescriptor();
    com.google.api.FieldBehaviorProto.getDescriptor();
    com.google.api.ResourceProto.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}


text:
<!DOCTYPE html>

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

beforeend[]noteafter

redpajama_set_name: RedPajamaGithub


text:
module WebIDL
  module ParseTree
    class Specials < Treetop::Runtime::SyntaxNode

      def build
        result = []

        result << first.text_value
        result += rest.build unless rest.empty?

        result
      end

    end # Specials
  end # ParseTree
end # WebIDL


text:
<?php

namespace Magento\Eav\Model;

use Magento\Framework\App\RequestInterface;

/**
 * EAV Entity Form Model
 *
 * @author      Magento Core Team <core@magentocommerce.com>
 * @SuppressWarnings(PHPMD.TooManyFields)
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
abstract class Form
{
    /**
     * Current module path name
     *
     * @var string
     */
    protected $_moduleName = '';

    /**
     * Current EAV entity type code
     *
     * @var string
     */
    protected $_entityTypeCode = '';

    /**
     * Current store instance
     *
     * @var \Magento\Store\Model\Store
     */
    protected $_store;

    /**
     * Current entity type instance
     *
     * @var \Magento\Eav\Model\Entity\Type
     */
    protected $_entityType;

    /**
     * Current entity instance
     *
     * @var \Magento\Framework\Model\AbstractModel
     */
    protected $_entity;

    /**
     * Current form code
     *
     * @var string
     */
    protected $_formCode;

    /**
     * Array of form attributes
     *
     * @var array
     */
    protected $_attributes;

    /**
     * Array of form system attributes
     *
     * @var array
     */
    protected $_systemAttributes;

    /**
     * Array of form user defined attributes
     *
     * @var array
     */
    protected $_userAttributes;

    /**
     * Array of form attributes that is not omitted
     *
     * @var array
     */
    protected $_allowedAttributes = null;

    /**
     * Is AJAX request flag
     *
     * @var bool
     */
    protected $_isAjax = false;

    /**
     * Whether the invisible form fields need to be filtered/ignored
     *
     * @var bool
     */
    protected $_ignoreInvisible = true;

    /**
     * @var \Magento\Framework\Validator
     */
    protected $_validator = null;

    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;

    /**
     * @var \Magento\Eav\Model\Config
     */
    protected $_eavConfig;

    /**
     * @var \Magento\Framework\Module\Dir\Reader
     */
    protected $_modulesReader;

    /**
     * @var \Magento\Eav\Model\AttributeDataFactory
     */
    protected $_attrDataFactory;

    /**
     * @var \Magento\Framework\Validator\UniversalFactory $universalFactory
     */
    protected $_universalFactory;

    /**
     * @var RequestInterface
     */
    protected $_httpRequest;

    /**
     * @var \Magento\Framework\Validator\ConfigFactory
     */
    protected $_validatorConfigFactory;

    /**
     * @param \Magento\Store\Model\StoreManagerInterface $storeManager
     * @param \Magento\Eav\Model\Config $eavConfig
     * @param \Magento\Framework\Module\Dir\Reader $modulesReader
     * @param \Magento\Eav\Model\AttributeDataFactory $attrDataFactory
     * @param \Magento\Framework\Validator\UniversalFactory $universalFactory
     * @param RequestInterface $httpRequest
     * @param \Magento\Framework\Validator\ConfigFactory $validatorConfigFactory
     *
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Eav\Model\Config $eavConfig,
        \Magento\Framework\Module\Dir\Reader $modulesReader,
        \Magento\Eav\Model\AttributeDataFactory $attrDataFactory,
        \Magento\Framework\Validator\UniversalFactory $universalFactory,
        RequestInterface $httpRequest,
        \Magento\Framework\Validator\ConfigFactory $validatorConfigFactory
    ) {
        if (empty($this->_moduleName)) {
            throw new \Magento\Framework\Exception\LocalizedException(__('The current module pathname is undefined.'));
        }
        if (empty($this->_entityTypeCode)) {
            throw new \Magento\Framework\Exception\LocalizedException(
                __('The current module EAV entity is undefined.')
            );
        }
        $this->_storeManager = $storeManager;
        $this->_eavConfig = $eavConfig;
        $this->_modulesReader = $modulesReader;
        $this->_attrDataFactory = $attrDataFactory;
        $this->_universalFactory = $universalFactory;
        $this->_httpRequest = $httpRequest;
        $this->_validatorConfigFactory = $validatorConfigFactory;
    }

    /**
     * Get EAV Entity Form Attribute Collection
     *
     * @return mixed
     */
    protected function _getFormAttributeCollection()
    {
        return $this->_universalFactory->create(
            str_replace('_', '\\', $this->_moduleName) . '\\Model\\ResourceModel\\Form\\Attribute\\Collection'
        );
    }

    /**
     * Get EAV Entity Form Attribute Collection with applied filters
     *
     * @return \Magento\Eav\Model\ResourceModel\Form\Attribute\Collection
     */
    protected function _getFilteredFormAttributeCollection()
    {
        return $this->_getFormAttributeCollection()->setStore(
            $this->getStore()
        )->setEntityType(
            $this->getEntityType()
        )->addFormCodeFilter(
            $this->getFormCode()
        )->setSortOrder();
    }

    /**
     * Set current store
     *
     * @param \Magento\Store\Model\Store|string|int $store
     * @return $this
     * @codeCoverageIgnore
     */
    public function setStore($store)
    {
        $this->_store = $this->_storeManager->getStore($store);
        return $this;
    }

    /**
     * Set entity instance
     *
     * @param \Magento\Framework\Model\AbstractModel $entity
     * @return $this
     */
    public function setEntity(\Magento\Framework\Model\AbstractModel $entity)
    {
        $this->_entity = $entity;
        if ($entity->getEntityTypeId()) {
            $this->setEntityType($entity->getEntityTypeId());
        }
        return $this;
    }

    /**
     * Set entity type instance
     *
     * @param \Magento\Eav\Model\Entity\Type|string|int $entityType
     * @return $this
     */
    public function setEntityType($entityType)
    {
        $this->_entityType = $this->_eavConfig->getEntityType($entityType);
        return $this;
    }

    /**
     * Set form code
     *
     * @param string $formCode
     * @return $this
     */
    public function setFormCode($formCode)
    {
        $this->_formCode = $formCode;
        return $this;
    }

    /**
     * Return current store instance
     *
     * @return \Magento\Store\Model\Store
     */
    public function getStore()
    {
        if ($this->_store === null) {
            $this->_store = $this->_storeManager->getStore();
        }
        return $this->_store;
    }

    /**
     * Return current form code
     *
     * @throws \Magento\Framework\Exception\LocalizedException
     * @return string
     */
    public function getFormCode()
    {
        if (empty($this->_formCode)) {
            throw new \Magento\Framework\Exception\LocalizedException(__('The form code is not defined.'));
        }
        return $this->_formCode;
    }

    /**
     * Return entity type instance
     * Return EAV entity type if entity type is not defined
     *
     * @return \Magento\Eav\Model\Entity\Type
     */
    public function getEntityType()
    {
        if ($this->_entityType === null) {
            $this->setEntityType($this->_entityTypeCode);
        }
        return $this->_entityType;
    }

    /**
     * Return current entity instance
     *
     * @throws \Magento\Framework\Exception\LocalizedException
     * @return \Magento\Framework\Model\AbstractModel
     */
    public function getEntity()
    {
        if ($this->_entity === null) {
            throw new \Magento\Framework\Exception\LocalizedException(__('The entity instance is not defined.'));
        }
        return $this->_entity;
    }

    /**
     * Return array of form attributes
     *
     * @return array
     */
    public function getAttributes()
    {
        if ($this->_attributes === null) {
            $this->_attributes = [];
            $this->_userAttributes = [];
            /** @var $attribute \Magento\Eav\Model\Attribute */
            foreach ($this->_getFilteredFormAttributeCollection() as $attribute) {
                $this->_attributes[$attribute->getAttributeCode()] = $attribute;
                if ($attribute->getIsUserDefined()) {
                    $this->_userAttributes[$attribute->getAttributeCode()] = $attribute;
                } else {
                    $this->_systemAttributes[$attribute->getAttributeCode()] = $attribute;
                }
                if (!$this->_isAttributeOmitted($attribute)) {
                    $this->_allowedAttributes[$attribute->getAttributeCode()] = $attribute;
                }
            }
        }
        return $this->_attributes;
    }

    /**
     * Return attribute instance by code or false
     *
     * @param string $attributeCode
     * @return \Magento\Eav\Model\Entity\Attribute|bool
     */
    public function getAttribute($attributeCode)
    {
        $attributes = $this->getAttributes();
        if (isset($attributes[$attributeCode])) {
            return $attributes[$attributeCode];
        }
        return false;
    }

    /**
     * Return array of form user defined attributes
     *
     * @return array
     */
    public function getUserAttributes()
    {
        if ($this->_userAttributes === null) {
            // load attributes
            $this->getAttributes();
        }
        return $this->_userAttributes;
    }

    /**
     * Return array of form system attributes
     *
     * @return array
     */
    public function getSystemAttributes()
    {
        if ($this->_systemAttributes === null) {
            // load attributes
            $this->getAttributes();
        }
        return $this->_systemAttributes;
    }

    /**
     * Get not omitted attributes
     *
     * @return array
     */
    public function getAllowedAttributes()
    {
        if ($this->_allowedAttributes === null) {
            // load attributes
            $this->getAttributes();
        }
        return $this->_allowedAttributes;
    }

    /**
     * Return attribute data model by attribute
     *
     * @param \Magento\Eav\Model\Entity\Attribute $attribute
     * @return \Magento\Eav\Model\Attribute\Data\AbstractData
     */
    protected function _getAttributeDataModel(\Magento\Eav\Model\Entity\Attribute $attribute)
    {
        $dataModel = $this->_attrDataFactory->create($attribute, $this->getEntity());
        $dataModel->setIsAjaxRequest($this->getIsAjaxRequest());

        return $dataModel;
    }

    /**
     * Prepare request with data and returns it
     *
     * @param array $data
     * @return RequestInterface
     */
    public function prepareRequest(array $data)
    {
        $request = clone $this->_httpRequest;
        $request->clearParams();
        $request->setParams($data);
        return $request;
    }

    /**
     * Extract data from request and return associative data array
     *
     * @param RequestInterface $request
     * @param string $scope the request scope
     * @param bool $scopeOnly search value only in scope or search value in global too
     * @return array
     */
    public function extractData(RequestInterface $request, $scope = null, $scopeOnly = true)
    {
        $data = [];
        /** @var $attribute \Magento\Eav\Model\Attribute */
        foreach ($this->getAllowedAttributes() as $attribute) {
            $dataModel = $this->_getAttributeDataModel($attribute);
            $dataModel->setRequestScope($scope);
            $dataModel->setRequestScopeOnly($scopeOnly);
            $data[$attribute->getAttributeCode()] = $dataModel->extractValue($request);
        }
        return $data;
    }

    /**
     * Get validator
     *
     * @param array $data
     * @return \Magento\Framework\Validator
     */
    protected function _getValidator(array $data)
    {
        if ($this->_validator === null) {
            $configFiles = $this->_modulesReader->getConfigurationFiles('validation.xml');
            /** @var $validatorFactory \Magento\Framework\Validator\Config */
            $validatorFactory = $this->_validatorConfigFactory->create(['configFiles' => $configFiles]);
            $builder = $validatorFactory->createValidatorBuilder('eav_entity', 'form');

            $builder->addConfiguration(
                'eav_data_validator',
                ['method' => 'setAttributes', 'arguments' => [$this->getAllowedAttributes()]]
            );
            $builder->addConfiguration(
                'eav_data_validator',
                ['method' => 'setData', 'arguments' => [$data]]
            );
            $this->_validator = $builder->createValidator();
        }
        return $this->_validator;
    }

    /**
     * Validate data array and return true or array of errors
     *
     * @param array $data
     * @return bool|array
     */
    public function validateData(array $data)
    {
        $validator = $this->_getValidator($data);
        if (!$validator->isValid($this->getEntity())) {
            $messages = [];
            foreach ($validator->getMessages() as $errorMessages) {
                $messages = array_merge($messages, (array)$errorMessages);
            }
            return $messages;
        }
        return true;
    }

    /**
     * Compact data array to current entity
     *
     * @param array $data
     * @return $this
     */
    public function compactData(array $data)
    {
        /** @var $attribute \Magento\Eav\Model\Attribute */
        foreach ($this->getAllowedAttributes() as $attribute) {
            $dataModel = $this->_getAttributeDataModel($attribute);
            $dataModel->setExtractedData($data);
            if (!isset($data[$attribute->getAttributeCode()])) {
                $data[$attribute->getAttributeCode()] = false;
            }
            $dataModel->compactValue($data[$attribute->getAttributeCode()]);
        }

        return $this;
    }

    /**
     * Restore data array from SESSION to current entity
     *
     * @param array $data
     * @return $this
     */
    public function restoreData(array $data)
    {
        /** @var $attribute \Magento\Eav\Model\Attribute */
        foreach ($this->getAllowedAttributes() as $attribute) {
            $dataModel = $this->_getAttributeDataModel($attribute);
            $dataModel->setExtractedData($data);
            if (!isset($data[$attribute->getAttributeCode()])) {
                $data[$attribute->getAttributeCode()] = false;
            }
            $dataModel->restoreValue($data[$attribute->getAttributeCode()]);
        }
        return $this;
    }

    /**
     * Return array of entity formatted values
     *
     * @param string $format
     * @return array
     */
    public function outputData($format = \Magento\Eav\Model\AttributeDataFactory::OUTPUT_FORMAT_TEXT)
    {
        $data = [];
        /** @var $attribute \Magento\Eav\Model\Attribute */
        foreach ($this->getAllowedAttributes() as $attribute) {
            $dataModel = $this->_getAttributeDataModel($attribute);
            $dataModel->setExtractedData($data);
            $data[$attribute->getAttributeCode()] = $dataModel->outputValue($format);
        }
        return $data;
    }

    /**
     * Restore entity original data
     *
     * @return $this
     */
    public function resetEntityData()
    {
        /** @var $attribute \Magento\Eav\Model\Attribute */
        foreach ($this->getAllowedAttributes() as $attribute) {
            $value = $this->getEntity()->getOrigData($attribute->getAttributeCode());
            $this->getEntity()->setData($attribute->getAttributeCode(), $value);
        }
        return $this;
    }

    /**
     * Set is AJAX Request flag
     *
     * @param bool $flag
     * @return $this
     */
    public function setIsAjaxRequest($flag = true)
    {
        $this->_isAjax = (bool)$flag;
        return $this;
    }

    /**
     * Return is AJAX Request
     *
     * @return bool
     * @SuppressWarnings(PHPMD.BooleanGetMethodName)
     */
    public function getIsAjaxRequest()
    {
        return $this->_isAjax;
    }

    /**
     * Set default attribute values for new entity
     *
     * @return $this
     */
    public function initDefaultValues()
    {
        if (!$this->getEntity()->getId()) {
            /** @var $attribute \Magento\Eav\Model\Attribute */
            foreach ($this->getAttributes() as $attribute) {
                $default = $attribute->getDefaultValue();
                if ($default != '') {
                    $this->getEntity()->setData($attribute->getAttributeCode(), $default);
                }
            }
        }
        return $this;
    }

    /**
     * Combined getter/setter whether to omit invisible attributes during rendering/validation
     *
     * @param mixed $setValue
     * @return bool|$this
     */
    public function ignoreInvisible($setValue = null)
    {
        if (null !== $setValue) {
            $this->_ignoreInvisible = (bool)$setValue;
            return $this;
        }
        return $this->_ignoreInvisible;
    }

    /**
     * Whether the specified attribute needs to skip rendering/validation
     *
     * @param \Magento\Eav\Model\Attribute $attribute
     * @return bool
     */
    protected function _isAttributeOmitted($attribute)
    {
        if ($this->_ignoreInvisible && !$attribute->getIsVisible()) {
            return true;
        }
        return false;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using Bars2Db.SqlQuery.QueryElements.Enums;
using Bars2Db.SqlQuery.QueryElements.Interfaces;
using Bars2Db.SqlQuery.QueryElements.Predicates.Interfaces;
using Bars2Db.SqlQuery.QueryElements.SqlElements.Interfaces;

namespace Bars2Db.SqlQuery.QueryElements.Predicates
{
    public class IsNull : NotExpr,
        IIsNull
    {
        public IsNull(IQueryExpression exp1, bool isNot)
            : base(exp1, isNot, SqlQuery.Precedence.Comparison)
        {
        }

        public override EQueryElementType ElementType => EQueryElementType.IsNullPredicate;

        protected override ICloneableElement Clone(Dictionary<ICloneableElement, ICloneableElement> objectTree,
            Predicate<ICloneableElement> doClone)
        {
            if (!doClone(this))
                return this;

            ICloneableElement clone;

            if (!objectTree.TryGetValue(this, out clone))
                objectTree.Add(this, clone = new IsNull((IQueryExpression) Expr1.Clone(objectTree, doClone), IsNot));

            return clone;
        }

        protected override void ToStringInternal(StringBuilder sb, Dictionary<IQueryElement, IQueryElement> dic)
        {
            Expr1.ToString(sb, dic);
            sb
                .Append(" IS ")
                .Append(IsNot ? "NOT " : "")
                .Append("NULL");
        }
    }
}


text:
package org.javers.core.diff.appenders.levenshtein;

import org.javers.common.validation.Validate;
import org.javers.core.diff.EqualsFunction;
import org.javers.core.diff.NodePair;
import org.javers.core.diff.appenders.CorePropertyChangeAppender;
import org.javers.core.diff.changetype.container.ContainerElementChange;
import org.javers.core.diff.changetype.container.ListChange;
import org.javers.core.metamodel.object.GlobalId;
import org.javers.core.metamodel.object.GlobalIdFactory;
import org.javers.core.metamodel.object.OwnerContext;
import org.javers.core.metamodel.property.Property;
import org.javers.core.metamodel.type.JaversType;
import org.javers.core.metamodel.type.ListType;
import org.javers.core.metamodel.type.TypeMapper;

import java.util.List;
import java.util.Objects;

import static org.javers.common.collections.Lists.wrapNull;

/**
 * @author kornel kiełczewski
 */
public class LevenshteinListChangeAppender extends CorePropertyChangeAppender<ListChange> {

    private final TypeMapper typeMapper;
    private final GlobalIdFactory globalIdFactory;

    LevenshteinListChangeAppender(TypeMapper typeMapper, GlobalIdFactory globalIdFactory) {
        Validate.argumentsAreNotNull(typeMapper, globalIdFactory);
        this.typeMapper = typeMapper;
        this.globalIdFactory = globalIdFactory;
    }

    @Override
    public boolean supports(JaversType propertyType) {
        return propertyType instanceof ListType;
    }

    @Override
    public ListChange calculateChanges(final NodePair pair, final Property property) {

        final List leftList =  wrapNull( (List) pair.getLeftPropertyValue(property) );
        final List rightList = wrapNull((List) pair.getRightPropertyValue(property));

        EqualsFunction equalsFunction = createDehydratingEqualsFunction(pair, property);
        Backtrack backtrack = new Backtrack(equalsFunction);
        StepsToChanges stepsToChanges = new StepsToChanges(equalsFunction);

        final BacktrackSteps[][] steps = backtrack.evaluateSteps(leftList, rightList);
        final List<ContainerElementChange> changes = stepsToChanges.convert(steps, leftList, rightList);

        return getListChange(pair.getGlobalId(), property, changes);
    }

    private EqualsFunction createDehydratingEqualsFunction(NodePair pair, Property property){
        ListType listType = typeMapper.getPropertyType(property);
        final JaversType listContentType = typeMapper.getJaversType(listType.getItemType());
        final OwnerContext owner = new OwnerContext(pair.getGlobalId(), property.getName());
        return new EqualsFunction() {
            public boolean nullSafeEquals(Object left, Object right) {
                Object leftDehydrated = globalIdFactory.dehydrate(left, listContentType, owner);
                Object rightDehydrated = globalIdFactory.dehydrate(right, listContentType, owner);
                return Objects.equals(leftDehydrated, rightDehydrated);
            }
        };
    }

    private ListChange getListChange(final GlobalId affectedCdoId, final Property property,
                                     final List<ContainerElementChange> changes) {
        final ListChange result;

        if (changes.size() == 0) {
            result = null;
        } else {
            result = new ListChange(affectedCdoId, property.getName(), changes);
        }
        return result;
    }

}


text:
require "mirror/version"

module Mirror
  # Your code goes here...
end


text:
ACCEPTED

#### According to
IRMNG Homonym List

#### Published in
Mém. Soc. natn. Sci. nat. math. Cherbourg 5: 143 (1858)

#### Original name
Odontotrema Nylander, 1858

### Remarks
null


text:
<?php

namespace fecadmin\controllers;
use Yii;
use yii\helpers\Url;
use fec\helpers\CModel;
use fec\helpers\CRequest;
use fec\helpers\CDate;
use fec\helpers\CUrl;
use fec\helpers\CConfig;
use yii\web\Controller;
use fecadmin\models\AdminUser;
use fecadmin\models\AdminUser\AdminUserLogin;
use fecadmin\models\AdminUser\AdminUserLoginRemote;
/**
 * @author Terry Zhao <2358269014@qq.com>
 * @since 1.0
 */
class LoginController extends Controller
{

    public function getViewPath()
    {

        return Yii::getAlias('@fecadmin/views') . DIRECTORY_SEPARATOR . $this->id;
    }

    public function actionSession(){
        $phpsession = CRequest::param("phpsession");
        if($phpsession){
            $_COOKIE['PHPSESSID'] = $phpsession;
        }
    }

    public function getCurrentUser($username,$usercode){
        $user = AdminUser::findOne(['username' => $username]);
        if($user->username){

        }else{
            $u = AdminUser::findOne(['code' => $usercode]);
            if($u->code){
                echo  json_encode(["status"=>"fail","content" =>"user code is exist"]);
                exit;
            }
            $user = new AdminUser;
            $user->username = $username;
            $user->code = $usercode;
            $user->setPassword(md5(CDate::getCurrentDateTime()));
            # 设置默认的用户权限组
            $user->role = CConfig::param("default_role_id");
            //$adminUser->save();
            //$user = AdminUser::findOne(['username' => $username]);
        }
        $user->generateAccessToken();

        $user->save();
        return $user;
    }

    # 通过远程,获取当前用户的access_token
    # 传递username   usercode(可选)
    # 返回json格式的access_token
    public function actionRemoteindex(){

        $key = CRequest::param("key");
        $configKey = CConfig::param("remote_get_access_token_key");
        $username = CRequest::param("username");
        $usercode = CRequest::param("usercode") ? CRequest::param("usercode") : '';

        if(($configKey) && ($key == $configKey) && $username){

            $user = $this->getCurrentUser($username,$usercode);
            if(isset($user['access_token']))
                echo  json_encode(["status"=>"success","access_token" =>$user['access_token']]);
        }

    }

    # 通过access_token 设置登录状态
    public function actionLoginbyaccesstoken(){
        $access_token = CRequest::param("access_token");
        $username = CRequest::param("username");
        if($access_token  ){
            if($username){
                $one = AdminUser::findOne([
                    'username' => $username,
                    'access_token' => $access_token,
                ]);

                if($one->username){
                    $one->generateAccessToken();
                    $one->save();
                    \Yii::$app->user->login($one, 3600 * 24);
                    header('Location: '.CUrl::getHomeUrl());
                }else{
                    echo "User Access Token Is TimeOut";
                }
            }else{
                echo "UserName Can Not Empty";
            }
        }else{
            echo "Access Token Can Not Empty";
        }
    }

    public function actionIndex()
    {
        //exit;
        $isGuest = Yii::$app->user->isGuest;
        //echo $isGuest;exit;
        if(!$isGuest){
            //$this->redirect("/",200);
            Yii::$app->getResponse()->redirect("/")->send();
            return;
        }
        $errors = '';
        $loginParam = \fec\helpers\CRequest::param('login');
        if($loginParam){
            //echo 1;exit;
            $AdminUserLogin = new AdminUserLogin;
            $AdminUserLogin->attributes = $loginParam;
            if($AdminUserLogin->login()){
                \fecadmin\helpers\CSystemlog::saveSystemLog();
                //$this->redirect("/",200)->send();
                Yii::$app->getResponse()->redirect("/")->send();
                return;
            }else{
                $errors = CModel::getErrorStr($AdminUserLogin->errors);
            }
        }
        $this->layout = "login.php";
        return $this->render('index',['error' => $errors]);
    }

}


text:
targets=`find . -type f \( -name '*.go' -and -not -iwholename '*vendor*' \)`
packages=$(go list ./...)

# Apply tools
export PATH=$(pwd)/build-cmd:$PATH
which goimports golint staticcheck gosimple unused qbg
go generate $packages
goimports -w $targets
go tool vet $targets
golint $packages
staticcheck $packages
gosimple $packages
unused $packages

goapp test $packages $@


text:
package com.foc.list.filter;

public interface FocListFilterListener {

  public void visibleArrayReset();
}


text:
import React, { createElement } from 'react';
import PropTypes from 'prop-types';
import { createStore, compose, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import createHistory from 'history/createHashHistory';
import { ConnectedRouter, routerMiddleware } from 'react-router-redux';
import createSagaMiddleware from 'redux-saga';
import { all, fork } from 'redux-saga/effects';
import withContext from 'recompose/withContext';
import { Route, Switch } from 'react-router-dom';

import { USER_LOGOUT } from './actions/authActions';
import Login from './mui/auth/Login';
import createAppReducer from './reducer';
import { crudSaga } from './sideEffect/saga';
import Menu from './mui/layout/Menu';
import Logout from './mui/auth/Logout';
import TranslationProvider from './i18n/TranslationProvider';
import AdminRoutes from './AdminRoutes';

const Admin = ({
    appLayout,
    authClient,
    children,
    customReducers = {},
    customSagas = [],
    customRoutes = [],
    dashboard,
    history,
    locale,
    messages = {},
    menu = Menu,
    catchAll,
    restClient,
    theme,
    title = 'Admin on REST',
    loginPage,
    logoutButton,
    initialState,
}) => {
    const appReducer = createAppReducer(customReducers, locale);
    const resettableAppReducer = (state, action) =>
        appReducer(action.type !== USER_LOGOUT ? state : undefined, action);
    const saga = function* rootSaga() {
        yield all([crudSaga(restClient, authClient), ...customSagas].map(fork));
    };
    const sagaMiddleware = createSagaMiddleware();
    const routerHistory = history || createHistory();
    const store = createStore(
        resettableAppReducer,
        initialState,
        compose(
            applyMiddleware(sagaMiddleware, routerMiddleware(routerHistory)),
            typeof window !== 'undefined' && window.devToolsExtension
                ? window.devToolsExtension()
                : f => f
        )
    );
    sagaMiddleware.run(saga);

    const logout = authClient ? createElement(logoutButton || Logout) : null;

    return (
        <Provider store={store}>
            <TranslationProvider messages={messages}>
                <ConnectedRouter history={routerHistory}>
                    <Switch>
                        {loginPage && (
                            <Route
                                exact
                                path="/login"
                                render={({ location }) =>
                                    createElement(loginPage, {
                                        location,
                                        title,
                                        theme,
                                    })}
                            />
                        )}
                        <Route
                            path="/"
                            render={routeProps => (
                                <AdminRoutes
                                    appLayout={appLayout}
                                    catchAll={catchAll}
                                    customRoutes={customRoutes}
                                    dashboard={dashboard}
                                    logout={logout}
                                    menu={menu}
                                    theme={theme}
                                    title={title}
                                    {...routeProps}
                                >
                                    {children}
                                </AdminRoutes>
                            )}
                        />
                    </Switch>
                </ConnectedRouter>
            </TranslationProvider>
        </Provider>
    );
};

const componentPropType = PropTypes.oneOfType([
    PropTypes.func,
    PropTypes.string,
]);

Admin.propTypes = {
    appLayout: componentPropType,
    authClient: PropTypes.func,
    children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
    catchAll: componentPropType,
    customSagas: PropTypes.array,
    customReducers: PropTypes.object,
    customRoutes: PropTypes.array,
    dashboard: componentPropType,
    history: PropTypes.object,
    loginPage: componentPropType,
    logoutButton: componentPropType,
    menu: componentPropType,
    restClient: PropTypes.func,
    theme: PropTypes.object,
    title: PropTypes.node,
    locale: PropTypes.string,
    messages: PropTypes.object,
    initialState: PropTypes.object,
};

Admin.defaultProps = {
    loginPage: Login,
};

export default withContext(
    {
        authClient: PropTypes.func,
    },
    ({ authClient }) => ({ authClient })
)(Admin);


text:
<!DOCTYPE html>

    <title></title>

Description:

Click Transmit APDU to connect to your smart card and transmit the APDU. The response will be displayed in the output box. This APDU reads the smart card EF.ATR file.

            <button id="TransmitAPDU" class="win-button">Transmit APDU</button>


text:
package com.github.florent37.materialviewpager.sample;

import java.io.IOException;
import java.io.InputStream;

import java.util.ArrayList;
import java.util.HashMap;

import com.github.florent37.materialviewpager.sample.xml.XMLParser;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources.NotFoundException;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.ScaleAnimation;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

public class LearnSchool extends Activity
{
	ListView listView;
	Context context;
	static final String KEY_ITEM = "row"; // parent node
    String id = "";
    School[] Values=null;
	@Override
	protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		//
		id=getIntent().getStringExtra("id");
		context=this;
		setListViewContent();
		TextView textView = (TextView) findViewById(R.id.textView1);
		textView.setText( "آموزشگاه های رانندگی");
		Typeface face = Typeface.createFromAsset(this.getAssets(),"font/"+com.github.florent37.materialviewpager.sample.attrib.attribute.font_title);
		textView.setTextSize(com.github.florent37.materialviewpager.sample.attrib.attribute.title_font_size);
		textView.setTextColor(com.github.florent37.materialviewpager.sample.attrib.attribute.title_font_color);
		textView.setTypeface(face);
		//
		listView.setOnItemClickListener(new OnItemClickListener()
		{
			public void onItemClick(AdapterView<?> parent, View v,int position, long idx)
			{
				ScaleAnimation scale = new ScaleAnimation(1.1f, 0.9f, 1.1f, 0.9f,
			        	ScaleAnimation.RELATIVE_TO_SELF, 1f,
			            ScaleAnimation.RELATIVE_TO_SELF, 1f);
			    scale.setDuration(300);
			    scale.setRepeatCount(0);
				//
				v.startAnimation(scale);
				//
				String con;
				if(Integer.parseInt(id)!=0)
					con="\n"+ Values[position].amozeshgah+"\n"+Values[position].ostan+" "+Values[position].shahr+" "+Values[position].address+
						"\n\n تلفن:"+Values[position].tel;
				else
					con="\n"+ Values[position].amozeshgah+"\n"+Values[position].ostan+" منطقه "+Values[position].shahr+" "+Values[position].address+
					"\n\n تلفن:"+Values[position].tel;
				Intent i=new Intent(LearnSchool.this, Detail.class);
				i.putExtra("content", con);
				startActivity(i);
				overridePendingTransition(R.anim.rotate3d_in_right,R.anim.rotate3d_out_left);
				//

			}
		});
		//
		Button button=(Button)this.findViewById(R.id.back);
		button.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
		    	overridePendingTransition(R.anim.slide_in_right,R.anim.slide_out_left);
			}
		});

	}

	//
	public void setListViewContent()
	{
			this.setContentView(R.layout.list4);
			listView = (ListView) findViewById(R.id.items);
			try{
				 Values=getdata();
			}catch(Exception e)
			{
				Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();
			}
			listView.setAdapter(new SchoolListAdapter(this, Values));
	}

	private School[] getdata() throws NotFoundException, IOException {
		School[] output=null;
		ArrayList<HashMap<String, String>> items= new ArrayList<HashMap<String, String>>();
	    XMLParser parser=new XMLParser();
	    InputStream is = context.getResources().openRawResource(R.raw.m101+Integer.parseInt(id))  ;
	    if(Integer.parseInt(id)!=0)
	    {
	    	String[] s={"radif","ostan","shahr","amozeshgah","address","tel"};
	    	items= parser.getDomElement(is,s);
	    }
	    else
	    {
	    	String[] s={"radif","ostan","amozeshgah","mantagheh","address","tel"};
	    	items= parser.getDomElement(is,s);
	    }
	    //Document docs = parser.getDomElement(xml); // getting DOM element
		//NodeList nl = docs.getElementsByTagName(KEY_ITEM);

		try{
			output=new School[items.size()];
			int i=0;
			for(HashMap<String, String> h : items)
			{
				if(Integer.parseInt(id)!=0)
			    {
					output[i++]= new School(h.get("radif"), h.get("ostan"), h.get("shahr"), h.get("amozeshgah"), h.get("address"), h.get("tel")) ;
			    }
				else
				{
					output[i++]= new School(h.get("radif"), h.get("ostan"), h.get("mantagheh"), h.get("amozeshgah"), h.get("address"), h.get("tel")) ;
				}
			}
			}catch(Exception e)
			{
				Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();
			}

		return output;
	}
	public boolean onKeyDown(int keyCode, KeyEvent event)
	 {
		    //Handle the back button
		    if( keyCode == KeyEvent.KEYCODE_BACK ) {
		        //Ask the user if they want to quit
		    	//Intent i=new Intent(Sign.this, DrivingLowActivity.class);
		    	//startActivity(i);
		    	finish();
		    	overridePendingTransition(R.anim.slide_in_right,R.anim.slide_out_left);
		        return true;
		    }
		    else {
		        return super.onKeyDown(keyCode, event);
		    }
		}

	//
	class School
	{
		String radif,ostan,shahr,amozeshgah,address,tel;
		public School(String r,String o, String s,String a,String ad,String tel)
		{
			this.radif=r;this.ostan=o;this.shahr =s;this.amozeshgah=a;
			this.address=ad;this.tel=tel;
		}
	}
	//
	public class SchoolListAdapter extends BaseAdapter
	{
		private Context context;
		private final School[] Values;

		public SchoolListAdapter(Context context, School[] Values) {
			this.context = context;
			this.Values = Values;
		}

		public View getView(int position, View convertView, ViewGroup parent) {

			LayoutInflater inflater = (LayoutInflater) context
					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

			View gridView;

			if (convertView == null) {

				gridView = new View(context);

				// get layout from mobile.xml
				gridView = inflater.inflate(R.layout.searchrow, null);
				//
				/*
				String mobile = Values[position];
				if (mobile.equals("Windows")) {
					imageView.setImageResource(R.drawable.windows_logo);
				}
				else if (mobile.equals("iOS")) {
					imageView.setImageResource(R.drawable.ios_logo);
				}
				else if (mobile.equals("Blackberry")) {
					imageView.setImageResource(R.drawable.blackberry_logo);
				}
				else {
					imageView.setImageResource(R.drawable.android_logo);
				}
				*/
				// set value into textview

			} else {
				gridView = convertView;
			}
			TextView textView = (TextView) gridView
					.findViewById(R.id.rowtitle);
			textView.setText(Values[position].amozeshgah);
			Typeface face = Typeface.createFromAsset(context.getAssets(),"font/"+com.github.florent37.materialviewpager.sample.attrib.attribute.font_title);
			textView.setTypeface(face);
			textView.setTextSize(com.github.florent37.materialviewpager.sample.attrib.attribute.title1_font_size);
			textView.setTextColor(com.github.florent37.materialviewpager.sample.attrib.attribute.title1_font_color);
			//
			TextView textViewsub = (TextView) gridView
					.findViewById(R.id.rowsub);
			String str=Values[position].ostan+" "+Values[position].shahr+" "+Values[position].address;
			String substr=str.length()<40?str:str.substring(0, 40);
			textViewsub.setText(substr);
			textViewsub.setTypeface(face);
			textViewsub.setTextSize(com.github.florent37.materialviewpager.sample.attrib.attribute.content_font_size);
			textViewsub.setTextColor(com.github.florent37.materialviewpager.sample.attrib.attribute.content_font_color);

			return gridView;
		}

		public int getCount() {
			return Values.length;
		}

		public Object getItem(int position) {
			return null;
		}

		public long getItemId(int position) {
			return 0;
		}
	}
}
//


text:
from piret.checks import aligner
import os
import pytest
import luigi
from piret.counts import featurecounts as fc
from plumbum.cmd import rm, cp

def test_check_aligner_hisat2():

    aln_fdr = os.path.join("tests", "test_check_aligner", "processes")
    if os.path.exists(aln_fdr) is False:
        os.makedirs(aln_fdr)
    with open(os.path.join(aln_fdr, "hisat_index"), 'w') as f:
        f.write("testdata")
    db = aligner.check_aligner(aligner="hisat2",
                               hisat_index="hisat_index",
                               workdir=os.path.join("tests", "test_check_aligner"),
                               star_db="")
    assert os.path.exists(db) is True
    rm_cmd = rm["-rf", "tests/test_check_aligner"]
    rm_cmd()

def test_check_star():

    aln_fdr = os.path.join("tests", "test_check_aligner", "processes", "stardb")
    if os.path.exists(aln_fdr) is False:
        os.makedirs(aln_fdr)
    with open(os.path.join(aln_fdr, "chrName.txt"), 'w') as f:
        f.write("testdata")
    db = aligner.check_aligner(aligner="star",
                               hisat_index="hisat_index",
                               workdir=os.path.join("tests", "test_check_aligner"),
                               star_db="")
    assert os.path.exists(db) is True
    rm_cmd = rm["-rf", "tests/test_check_aligner"]
    rm_cmd()


text:
class NotebooksModel : public QSqlQueryModel{
    Q_OBJECT
    Q_PROPERTY(int currentId MEMBER currentId)
   public:
       explicit NotebooksModel(QObject *parent, QSqlDatabase& db);
       void refresh();
       QVariant data(const QModelIndex &index, int role) const override;

       Q_INVOKABLE int addNotebook(int parent_id, QString name);
       Q_INVOKABLE int addNotebook(QString parent_name, QString name);

       Q_INVOKABLE void update(int id, QString name);
       Q_INVOKABLE int countNotes(int id);
//       Q_INVOKABLE int countNotes();
       Q_INVOKABLE bool doesDayHaveNote(int id, QDate date);
       Q_INVOKABLE bool deleteNotebook(int id);

   signals:

   public slots:

    protected:
       QHash<int, QByteArray> roleNames() const override;
   private:
       void prepareDatabase();
       const static char* COLUMN_NAMES[];
       const static char* SQL_SELECT;
        QHash<int, QByteArray> roles;
        int currentId;
        QSqlDatabase db;
        QString search;
};


text:
package com.ericsson.jigsaw.redis.embedded;

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

import redis.clients.jedis.Pipeline;
import redis.clients.jedis.PipelineBlock;
import redis.clients.jedis.Transaction;
import redis.clients.jedis.TransactionBlock;

public class TransactionServerOperations {

    private EmbeddedJedis jedis;

    public TransactionServerOperations(EmbeddedJedis jedis) {
        this.jedis = jedis;
    }

    public String watch(final byte[]... keys) {
        return "OK";
    }

    public String unwatch() {
        return "OK";
    }

    /**
     * Starts a pipeline, which is a very efficient way to send lots of command
     * and read all the responses when you finish sending them. Try to avoid
     * this version and use pipelined() when possible as it will give better
     * performance.
     *
     * @param jedisPipeline
     * @return The results of the command in the same order you've run them.
     */
    public List<Object> pipelined(final PipelineBlock jedisPipeline) {
        return new ArrayList<Object>();
    }

    public Pipeline pipelined() {
        return new EmbeddedPipeline(jedis);
    }

    public Transaction multi() {
        return null;
    }

    public List<Object> multi(final TransactionBlock jedisTransaction) {
        return new ArrayList<Object>();
    }

}