text:
package org.apache.accumulo.test.functional;

import static org.apache.accumulo.test.functional.FunctionalTestUtils.checkRFiles;
import static org.apache.accumulo.test.functional.FunctionalTestUtils.nm;
import static org.junit.Assert.assertEquals;

import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.IteratorSetting;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.conf.Property;
import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
import org.apache.accumulo.core.iterators.user.RowDeletingIterator;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.harness.AccumuloClusterHarness;
import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.junit.Test;

import com.google.common.collect.Iterators;

public class RowDeleteIT extends AccumuloClusterHarness {

  @Override
  public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
    Map<String,String> siteConfig = cfg.getSiteConfig();
    siteConfig.put(Property.TSERV_MAJC_DELAY.getKey(), "50ms");
    cfg.setSiteConfig(siteConfig);
  }

  @Override
  protected int defaultTimeoutSeconds() {
    return 60;
  }

  @Test
  public void run() throws Exception {
    Connector c = getConnector();
    String tableName = getUniqueNames(1)[0];
    c.tableOperations().create(tableName);
    Map<String,Set<Text>> groups = new HashMap<>();
    groups.put("lg1", Collections.singleton(new Text("foo")));
    groups.put("dg", Collections.<Text> emptySet());
    c.tableOperations().setLocalityGroups(tableName, groups);
    IteratorSetting setting = new IteratorSetting(30, RowDeletingIterator.class);
    c.tableOperations().attachIterator(tableName, setting, EnumSet.of(IteratorScope.majc));
    c.tableOperations().setProperty(tableName, Property.TABLE_MAJC_RATIO.getKey(), "100");

    BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());

    bw.addMutation(nm("r1", "foo", "cf1", "v1"));
    bw.addMutation(nm("r1", "bar", "cf1", "v2"));

    bw.flush();
    c.tableOperations().flush(tableName, null, null, true);

    checkRFiles(c, tableName, 1, 1, 1, 1);

    int count;
    try (Scanner scanner = c.createScanner(tableName, Authorizations.EMPTY)) {
      count = Iterators.size(scanner.iterator());
      assertEquals("count == " + count, 2, count);

      bw.addMutation(nm("r1", "", "", RowDeletingIterator.DELETE_ROW_VALUE));

      bw.flush();
      c.tableOperations().flush(tableName, null, null, true);

      checkRFiles(c, tableName, 1, 1, 2, 2);
    }

    try (Scanner scanner = c.createScanner(tableName, Authorizations.EMPTY)) {
      count = Iterators.size(scanner.iterator());
      assertEquals("count == " + count, 3, count);

      c.tableOperations().compact(tableName, null, null, false, true);

      checkRFiles(c, tableName, 1, 1, 0, 0);
    }

    try (Scanner scanner = c.createScanner(tableName, Authorizations.EMPTY)) {
      count = Iterators.size(scanner.iterator());
      assertEquals("count == " + count, 0, count);
      bw.close();
    }
  }

}


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq.Expressions;
using FluentNHibernate.Mapping.Providers;
using FluentNHibernate.MappingModel;
using FluentNHibernate.MappingModel.ClassBased;
using FluentNHibernate.Utils;
using NHibernate.Persister.Entity;

namespace FluentNHibernate.Mapping
{
    /// <summary>
    /// Defines a mapping for an entity. Derive from this class to create a mapping,
    /// and use the constructor to control how your entity is persisted.
    /// </summary>
    /// <example>
    /// public class PersonMap : ClassMap<Person>
    /// {
    ///   public PersonMap()
    ///   {
    ///     Id(x => x.PersonId);
    ///     Map(x => x.Name);
    ///     Map(x => x.Age);
    ///   }
    /// }
    /// </example>
    /// <typeparam name="T">Entity type to map</typeparam>
    public class ClassMap<T> : ClasslikeMapBase<T>, IMappingProvider
    {
        protected readonly AttributeStore attributes;
        readonly MappingProviderStore providers;
        readonly OptimisticLockBuilder<ClassMap<T>> optimisticLock;

        readonly IList<ImportPart> imports = new List<ImportPart>();
        bool nextBool = true;

        readonly HibernateMappingPart hibernateMappingPart = new HibernateMappingPart();
        readonly PolymorphismBuilder<ClassMap<T>> polymorphism;
        readonly SchemaActionBuilder<ClassMap<T>> schemaAction;

        public ClassMap()
            : this(new AttributeStore(), new MappingProviderStore())
        {}

        protected ClassMap(AttributeStore attributes, MappingProviderStore providers)
            : base(providers)
        {
            this.attributes = attributes;
            this.providers = providers;
            optimisticLock = new OptimisticLockBuilder<ClassMap<T>>(this, value => attributes.Set("OptimisticLock", Layer.UserSupplied, value));
            polymorphism = new PolymorphismBuilder<ClassMap<T>>(this, value => attributes.Set("Polymorphism", Layer.UserSupplied, value));
            schemaAction = new SchemaActionBuilder<ClassMap<T>>(this, value => attributes.Set("SchemaAction", Layer.UserSupplied, value));
            Cache = new CachePart(typeof(T));
        }

        /// <summary>
        /// Specify the caching for this entity.
        /// </summary>
        /// <example>
        /// Cache.ReadWrite();
        /// </example>
        public CachePart Cache { get; private set; }

        /// <summary>
        /// Specify settings for the container/hibernate-mapping for this class.
        /// Note: Avoid using this, if possible prefer using conventions.
        /// </summary>
        /// <example>
        /// HibernateMapping.Schema("dto");
        /// </example>
        public HibernateMappingPart HibernateMapping
        {
            get { return hibernateMappingPart; }
        }

        #region Ids

        /// <summary>
        /// Specify the identifier for this entity.
        /// </summary>
        /// <param name="memberExpression">Identity property</param>
        /// <example>
        /// Id(x => x.PersonId);
        /// </example>
        public virtual IdentityPart Id(Expression<Func<T, object>> memberExpression)
        {
            return Id(memberExpression, null);
        }

        /// <summary>
        /// Specify the identifier for this entity.
        /// </summary>
        /// <param name="memberExpression">Identity property</param>
        /// <param name="column">Column name</param>
        /// <example>
        /// Id(x => x.PersonId, "id");
        /// </example>
        public virtual IdentityPart Id(Expression<Func<T, object>> memberExpression, string column)
        {
            var member = memberExpression.ToMember();
#pragma warning disable 612,618
            var part = new IdentityPart(EntityType, member);
#pragma warning restore 612,618

            if (column != null)
                part.Column(column);

            providers.Id = part;

            return part;
        }

        /// <summary>
        /// Create an Id that doesn't have a corresponding property in
        /// the domain object, or a column in the database. This is mainly
        /// for use with read-only access and/or views. Defaults to an int
        /// identity with an "increment" generator.
        /// </summary>
        public IdentityPart Id()
        {
            return Id<int>(null)
                .GeneratedBy.Increment();
        }

        /// <summary>
        /// Create an Id that doesn't have a corresponding property in
        /// the domain object, or a column in the database. This is mainly
        /// for use with read-only access and/or views.
        /// </summary>
        /// <typeparam name="TId">Type of the id</typeparam>
        public IdentityPart Id<TId>()
        {
            return Id<TId>(null);
        }

        /// <summary>
        /// Create an Id that doesn't have a corresponding property in
        /// the domain object.
        /// </summary>
        /// <typeparam name="TId">Type of the id</typeparam>
        /// <param name="column">Name and column name of the id</param>
        public IdentityPart Id<TId>(string column)
        {
            var part = new IdentityPart(typeof(T), typeof(TId));

            if (column != null)
            {
                part.SetName(column);
                part.Column(column);
            }

            providers.Id = part;

            return part;
        }

        /// <summary>
        /// Create a natural identity. This is a secondary identifier
        /// that has "business meaning" moreso than the primary key.
        /// </summary>
        /// <example>
        /// NaturalId()
        ///   .Property(x => x.Name);
        /// </example>
        public virtual NaturalIdPart<T> NaturalId()
        {
            var part = new NaturalIdPart<T>();

            providers.NaturalId = part;

            return part;
        }

        /// <summary>
        /// Create a composite identity. This is an identity composed of multiple
        /// columns.
        /// Note: Prefer using a surrogate key over a composite key whenever possible.
        /// </summary>
        /// <example>
        /// CompositeId()
        ///   .KeyProperty(x => x.FirstName)
        ///   .KeyProperty(x => x.LastName);
        /// </example>
        public virtual CompositeIdentityPart<T> CompositeId()
        {
            var part = new CompositeIdentityPart<T>();

            providers.CompositeId = part;

            return part;
        }

        /// <summary>
        /// Create a composite identity represented by an identity class. This is an
        /// identity composed of multiple columns.
        /// Note: Prefer using a surrogate key over a composite key whenever possible.
        /// </summary>
        /// <param name="memberExpression">Composite id property</param>
        /// <example>
        /// CompositeId(x => x.Id)
        ///   .KeyProperty(x => x.FirstName)
        ///   .KeyProperty(x => x.LastName);
        /// </example>
        public virtual CompositeIdentityPart<TId> CompositeId<TId>(Expression<Func<T, TId>> memberExpression)
        {
            var part = new CompositeIdentityPart<TId>(memberExpression.ToMember().Name);

            providers.CompositeId = part;

            return part;
        }

        #endregion

        /// <summary>
        /// Specifies that this class should be versioned/timestamped using the
        /// given property.
        /// </summary>
        /// <param name="memberExpression">Version/timestamp property</param>
        /// <example>
        /// Version(x => x.Timestamp);
        /// </example>
        public VersionPart Version(Expression<Func<T, object>> memberExpression)
        {
            return Version(memberExpression.ToMember());
        }

        protected virtual VersionPart Version(Member property)
        {
            var versionPart = new VersionPart(typeof(T), property);

            providers.Version = versionPart;

            return versionPart;
        }

        /// <summary>
        /// Specify that this entity should use a discriminator with it's subclasses.
        /// This is a mapping strategy called table-per-inheritance-hierarchy; where all
        /// subclasses are stored in the same table, differenciated by a discriminator
        /// column value.
        /// </summary>
        /// <typeparam name="TDiscriminator">Type of the discriminator column</typeparam>
        /// <param name="columnName">Discriminator column name</param>
        /// <param name="baseClassDiscriminator">Default discriminator value</param>
        public virtual DiscriminatorPart DiscriminateSubClassesOnColumn<TDiscriminator>(string columnName, TDiscriminator baseClassDiscriminator)
        {
            var part = new DiscriminatorPart(columnName, typeof(T), providers.Subclasses.Add, new TypeReference(typeof(TDiscriminator)));

            providers.Discriminator = part;

            attributes.Set("DiscriminatorValue", Layer.UserSupplied, baseClassDiscriminator);

            return part;
        }

        /// <summary>
        /// Specify that this entity should use a discriminator with it's subclasses.
        /// This is a mapping strategy called table-per-inheritance-hierarchy; where all
        /// subclasses are stored in the same table, differenciated by a discriminator
        /// column value.
        /// </summary>
        /// <typeparam name="TDiscriminator">Type of the discriminator column</typeparam>
        /// <param name="columnName">Discriminator column name</param>
        public virtual DiscriminatorPart DiscriminateSubClassesOnColumn<TDiscriminator>(string columnName)
        {
            var part = new DiscriminatorPart(columnName, typeof(T), providers.Subclasses.Add, new TypeReference(typeof(TDiscriminator)));

            providers.Discriminator = part;

            return part;
        }

        /// <summary>
        /// Specify that this entity should use a discriminator with it's subclasses.
        /// This is a mapping strategy called table-per-inheritance-hierarchy; where all
        /// subclasses are stored in the same table, differenciated by a discriminator
        /// column value.
        /// </summary>
        /// <param name="columnName">Discriminator column name</param>
        public virtual DiscriminatorPart DiscriminateSubClassesOnColumn(string columnName)
        {
            return DiscriminateSubClassesOnColumn<string>(columnName);
        }

        /// <summary>
        /// Specifies that any subclasses of this entity should be treated as union-subclass
        /// mappings. Don't use this in combination with a discriminator, as they are mutually
        /// exclusive.
        /// </summary>
        public virtual void UseUnionSubclassForInheritanceMapping()
        {
            attributes.Set("Abstract", Layer.UserSupplied, true);
            attributes.Set("IsUnionSubclass", Layer.UserSupplied, true);
        }

        [Obsolete("Inline definitions of subclasses are depreciated. Please create a derived class from SubclassMap in the same way you do with ClassMap.")]
        public virtual void JoinedSubClass<TSubclass>(string keyColumn, Action<JoinedSubClassPart<TSubclass>> action) where TSubclass : T
        {
            var subclass = new JoinedSubClassPart<TSubclass>(keyColumn);

            action(subclass);

            providers.Subclasses[typeof(TSubclass)] = subclass;
        }

        /// <summary>
        /// Sets the schema for this class.
        /// </summary>
        /// <param name="schema">Schema name</param>
        public void Schema(string schema)
        {
            attributes.Set("Schema", Layer.UserSupplied, schema);
        }

        /// <summary>
        /// Sets the table for the class.
        /// </summary>
        /// <param name="tableName">Table name</param>
        public void Table(string tableName)
        {
            attributes.Set("TableName", Layer.UserSupplied, tableName);
        }

        /// <summary>
        /// Inverts the next boolean option
        /// </summary>
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        public ClassMap<T> Not
        {
            get
            {
                nextBool = !nextBool;
                return this;
            }
        }

        /// <summary>
        /// Sets this entity to be lazy-loaded (overrides the default lazy load configuration).
        /// </summary>
        public void LazyLoad()
        {
            attributes.Set("Lazy", Layer.UserSupplied, nextBool);
            nextBool = true;
        }

        /// <summary>
        /// Links this entity to another table, to create a composite entity from two or
        /// more tables.
        /// </summary>
        /// <param name="tableName">Joined table name</param>
        /// <param name="action">Joined table mapping</param>
        /// <example>
        /// Join("another_table", join =>
        /// {
        ///   join.Map(x => x.Name);
        ///   join.Map(x => x.Age);
        /// });
        /// </example>
        public virtual void Join(string tableName, Action<JoinPart<T>> action)
        {
            var join = new JoinPart<T>(tableName);

            action(join);

            providers.Joins.Add(join);
        }

        /// <summary>
        /// Imports an existing type for use in the mapping.
        /// </summary>
        /// <typeparam name="TImport">Type to import.</typeparam>
        public virtual ImportPart ImportType<TImport>()
        {
            var part = new ImportPart(typeof(TImport));

            imports.Add(part);

            return part;
        }

        /// <summary>
        /// Set the mutability of this class, sets the mutable attribute.
        /// </summary>
        public void ReadOnly()
        {
            attributes.Set("Mutable", Layer.UserSupplied, !nextBool);
            nextBool = true;
        }

        /// <summary>
        /// Sets this entity to be dynamic update
        /// </summary>
        public void DynamicUpdate()
        {
            attributes.Set("DynamicUpdate", Layer.UserSupplied, nextBool);
            nextBool = true;
        }

        /// <summary>
        /// Sets this entity to be dynamic insert
        /// </summary>
        public void DynamicInsert()
        {
            attributes.Set("DynamicInsert", Layer.UserSupplied, nextBool);
            nextBool = true;
        }

        /// <summary>
        /// Sets the query batch size for this entity.
        /// </summary>
        /// <param name="size">Batch size</param>
        public ClassMap<T> BatchSize(int size)
        {
            attributes.Set("BatchSize", Layer.UserSupplied, size);
            return this;
        }

        /// <summary>
        /// Sets the optimistic locking strategy
        /// </summary>
        public OptimisticLockBuilder<ClassMap<T>> OptimisticLock
        {
            get { return optimisticLock; }
        }

        /// <summary>
        /// Sets the polymorphism behaviour
        /// </summary>
        public PolymorphismBuilder<ClassMap<T>> Polymorphism
        {
            get { return polymorphism; }
        }

        /// <summary>
        /// Sets the schema action behaviour
        /// </summary>
        public SchemaActionBuilder<ClassMap<T>> SchemaAction
        {
            get { return schemaAction; }
        }

        /// <summary>
        /// Specifies a check constraint
        /// </summary>
        /// <param name="constraint">Constraint name</param>
        public void CheckConstraint(string constraint)
        {
            attributes.Set("Check", Layer.UserSupplied, constraint);
        }

        /// <summary>
        /// Specifies a persister to be used with this entity
        /// </summary>
        /// <typeparam name="TPersister">Persister type</typeparam>
        public void Persister<TPersister>() where TPersister : IEntityPersister
        {
            Persister(typeof(TPersister));
        }

        /// <summary>
        /// Specifies a persister to be used with this entity
        /// </summary>
        /// <param name="type">Persister type</param>
        private void Persister(Type type)
        {
            Persister(type.AssemblyQualifiedName);
        }

        /// <summary>
        /// Specifies a persister to be used with this entity
        /// </summary>
        /// <param name="type">Persister type</param>
        public void Persister(string type)
        {
            attributes.Set("Persister", Layer.UserSupplied, type);
        }

        /// <summary>
        /// Specifies a proxy class for this entity.
        /// </summary>
        /// <typeparam name="TProxy">Proxy type</typeparam>
        public void Proxy<TProxy>()
        {
            Proxy(typeof(TProxy));
        }

        /// <summary>
        /// Specifies a proxy class for this entity.
        /// </summary>
        /// <param name="type">Proxy type</param>
        public void Proxy(Type type)
        {
            Proxy(type.AssemblyQualifiedName);
        }

        /// <summary>
        /// Specifies a proxy class for this entity.
        /// </summary>
        /// <param name="type">Proxy type</param>
        public void Proxy(string type)
        {
            attributes.Set("Proxy", Layer.UserSupplied, type);
        }

        /// <summary>
        /// Specifies that a select should be performed before updating
        /// this entity
        /// </summary>
        public void SelectBeforeUpdate()
        {
            attributes.Set("SelectBeforeUpdate", Layer.UserSupplied, nextBool);
            nextBool = true;
        }

        /// <summary>
		/// Defines a SQL 'where' clause used when retrieving objects of this type.
		/// </summary>
    	public void Where(string where)
    	{
            attributes.Set("Where", Layer.UserSupplied, where);
    	}

        /// <summary>
        /// Sets the SQL statement used in subselect fetching.
        /// </summary>
        /// <param name="subselectSql">Subselect SQL Query</param>
        public void Subselect(string subselectSql)
        {
            attributes.Set("Subselect", Layer.UserSupplied, subselectSql);
        }

        /// <summary>
        /// Specifies an entity-name.
        /// </summary>
        /// <remarks>See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx</remarks>
        public void EntityName(string entityName)
        {
            attributes.Set("EntityName", Layer.UserSupplied, entityName);
        }

        /// <summary>
        /// Applies a filter to this entity given its name.
        /// </summary>
        /// <param name="name">The filter's name</param>
        /// <param name="condition">The condition to apply</param>
        public ClassMap<T> ApplyFilter(string name, string condition)
        {
            var part = new FilterPart(name, condition);
            providers.Filters.Add(part);
            return this;
        }

        /// <summary>
        /// Applies a filter to this entity given its name.
        /// </summary>
        /// <param name="name">The filter's name</param>
        public ClassMap<T> ApplyFilter(string name)
        {
            return ApplyFilter(name, null);
        }

        /// <summary>
        /// Applies a named filter to this entity.
        /// </summary>
        /// <param name="condition">The condition to apply</param>
        /// <typeparam name="TFilter">
        /// The type of a <see cref="FilterDefinition"/> implementation
        /// defining the filter to apply.
        /// </typeparam>
        public ClassMap<T> ApplyFilter<TFilter>(string condition) where TFilter : FilterDefinition, new()
        {
            return ApplyFilter(new TFilter().Name, condition);
        }

        /// <summary>
        /// Applies a named filter to this entity.
        /// </summary>
        /// <typeparam name="TFilter">
        /// The type of a <see cref="FilterDefinition"/> implementation
        /// defining the filter to apply.
        /// </typeparam>
        public ClassMap<T> ApplyFilter<TFilter>() where TFilter : FilterDefinition, new()
        {
            return ApplyFilter<TFilter>(null);
        }

        /// <summary>
        /// Configures the tuplizer for this entity. The tuplizer defines how to transform
        /// a Property-Value to its persistent representation, and viceversa a Column-Value
        /// to its in-memory representation, and the EntityMode defines which tuplizer is in use.
        /// </summary>
        /// <param name="mode">Tuplizer entity-mode</param>
        /// <param name="tuplizerType">Tuplizer type</param>
        public TuplizerPart Tuplizer(TuplizerMode mode, Type tuplizerType)
        {
            providers.TuplizerMapping = new TuplizerMapping();
            providers.TuplizerMapping.Set(x => x.Mode, Layer.UserSupplied, mode);
            providers.TuplizerMapping.Set(x => x.Type, Layer.UserSupplied, new TypeReference(tuplizerType));

            return new TuplizerPart(providers.TuplizerMapping)
                .Type(tuplizerType)
                .Mode(mode);
        }

        ClassMapping IMappingProvider.GetClassMapping()
        {
            var mapping = new ClassMapping(attributes.Clone());

            mapping.Set(x => x.Type, Layer.Defaults, typeof(T));
            mapping.Set(x => x.Name, Layer.Defaults, typeof(T).AssemblyQualifiedName);

            foreach (var property in providers.Properties)
                mapping.AddProperty(property.GetPropertyMapping());

            foreach (var component in providers.Components)
                mapping.AddComponent(component.GetComponentMapping());

            if (providers.Version != null)
                mapping.Set(x => x.Version, Layer.Defaults, providers.Version.GetVersionMapping());

            foreach (var oneToOne in providers.OneToOnes)
                mapping.AddOneToOne(oneToOne.GetOneToOneMapping());

            foreach (var collection in providers.Collections)
                mapping.AddCollection(collection.GetCollectionMapping());

            foreach (var reference in providers.References)
                mapping.AddReference(reference.GetManyToOneMapping());

            foreach (var any in providers.Anys)
                mapping.AddAny(any.GetAnyMapping());

            foreach (var subclass in providers.Subclasses.Values)
                mapping.AddSubclass(subclass.GetSubclassMapping());

            foreach (var join in providers.Joins)
                mapping.AddJoin(join.GetJoinMapping());

            if (providers.Discriminator != null)
                mapping.Set(x => x.Discriminator, Layer.Defaults, providers.Discriminator.GetDiscriminatorMapping());

            if (Cache.IsDirty)
                mapping.Set(x  => x.Cache, Layer.Defaults, ((ICacheMappingProvider)Cache).GetCacheMapping());

            if (providers.Id != null)
                mapping.Set(x => x.Id, Layer.Defaults, providers.Id.GetIdentityMapping());

            if (providers.CompositeId != null)
                mapping.Set(x => x.Id, Layer.Defaults, providers.CompositeId.GetCompositeIdMapping());

            if (providers.NaturalId != null)
                mapping.Set(x => x.NaturalId, Layer.Defaults, providers.NaturalId.GetNaturalIdMapping());

            mapping.Set(x => x.TableName, Layer.Defaults, GetDefaultTableName());

            foreach (var filter in providers.Filters)
                mapping.AddFilter(filter.GetFilterMapping());

            foreach (var storedProcedure in providers.StoredProcedures)
                mapping.AddStoredProcedure(storedProcedure.GetStoredProcedureMapping());

            mapping.Set(x => x.Tuplizer, Layer.Defaults, providers.TuplizerMapping);

            return mapping;
        }

        HibernateMapping IMappingProvider.GetHibernateMapping()
        {
            var hibernateMapping = ((IHibernateMappingProvider)hibernateMappingPart).GetHibernateMapping();

            foreach (var import in imports)
                hibernateMapping.AddImport(import.GetImportMapping());

            return hibernateMapping;
        }

        string GetDefaultTableName()
        {
#pragma warning disable 612,618
            var tableName = EntityType.Name;

            if (EntityType.IsGenericType)
            {
                // special case for generics: GenericType_GenericParameterType
                tableName = EntityType.Name.Substring(0, EntityType.Name.IndexOf('`'));

                foreach (var argument in EntityType.GetGenericArguments())
                {
                    tableName += "_";
                    tableName += argument.Name;
                }
            }
#pragma warning restore 612,618

            return "`" + tableName + "`";
        }

        IEnumerable<Member> IMappingProvider.GetIgnoredProperties()
        {
            return new Member[0];
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.keycloak.models.sessions.infinispan.events;

/**
 * @author Marek Posolda
 */
public class RemoveAllUserLoginFailuresEvent extends SessionClusterEvent {
}


text:
function UIObject(win) {
	this.core = win;
	if(win.document) {
		this.doc = win.document;
	}

	this.left_value = 0;
	this.left_width = 290;

	this.navInitialized = false;
}

UIObject.prototype.alert = function (msg) {
	return this.core.alert(msg);
};

UIObject.prototype.confirm = function (msg) {
	return this.core.confirm(msg);
};

UIObject.prototype.initNavSidebar = function() {
	if(this.navInitialized) {
		return;
	}
	this.doc.getElementById('sidebar1').style.left = this.left_value + "px";
	this.doc.getElementById('leftborder').style.left = this.left_value + this.left_width + "px";
	this.doc.getElementById('mainContent').style.left = this.left_value + this.left_width + 5 + "px";
	this.navInitialized = true;
};

UIObject.prototype.switchLeft = function() {
	if(!this.navInitialized) {
		this.initNavSidebar();
	}
	if(this.left_value >= 0) {
		this.left_value = -this.left_width;
		this.doc.getElementById('sidebar1').style.left = this.left_value + "px";
		this.doc.getElementById('leftborder').style.left = this.left_value + this.left_width + "px";
		this.doc.getElementById('mainContent').style.left = this.left_value + this.left_width + 5 + "px";
		this.doc.getElementById('leftbutton').style.backgroundImage = "url(cpbrowser/images/right_arrow.gif)";
	} else {
		this.left_value = 0;
		this.doc.getElementById('sidebar1').style.left = this.left_value + "px";
		this.doc.getElementById('leftborder').style.left = this.left_value + this.left_width + "px";
		this.doc.getElementById('mainContent').style.left = this.left_value + this.left_width + 5 + "px";
		this.doc.getElementById('leftbutton').style.backgroundImage = "url(cpbrowser/images/left_arrow.gif)";
	}
};

function fireCoreSignal(signame, sigdata) {
	// fire iron-signals
	document.body.dispatchEvent(new CustomEvent('iron-signal', {bubbles: true, cancelable: true, detail: {name: signame, data: sigdata}}));
}


text:
<?php
if(!defined("INCLUDED"))
	die();

require_once(EMULATION_FOLDER . "vector.php");
require_once(EMULATION_FOLDER . "settings.php");
require_once(EMULATION_FOLDER . "pathfinding.php");
require_once(EMULATION_FOLDER . "player.php");
require_once(EMULATION_FOLDER . "effects.php");
require_once(EMULATION_FOLDER . "laning_effects.php");
require_once(EMULATION_FOLDER . "objectives_effects.php");
require_once(EMULATION_FOLDER . "event.php");
require_once(EMULATION_FOLDER . "events.php");
require_once(EMULATION_FOLDER . "game.php");


text:
"use strict";
/*global alert: true, ODSA, console */
$(document).ready(function () {
  // Process About button: Pop up a message with an Alert
  function about() {
    alert(ODSA.AV.aboutstring("About Box Title", "Author Names"));
  }

  // Connect action callbacks to the HTML entities
  $('#about').click(about);

  //////////////////////////////////////////////////////////////////
  // Start processing here
  //////////////////////////////////////////////////////////////////

  // create a new settings panel and specify the link to show it
  var settings = new JSAV.utils.Settings($(".jsavsettings"));

  // Create a JSAV instance
  var av = new JSAV($('.avcontainer'), {settings: settings});

  // Initialize the display
  av.umsg("This slide holds stuff that you see at the start.");
  av.displayInit();

  av.umsg("Now just make as many slides as we like.");
  av.step();

  av.umsg("The last slide is followed by `av.recorded()`");
  av.recorded(); // done recording changes, will rewind
});


text:
<?php

include_once 'database/database.php';
include_once 'controller/session.php';
include_once 'controller/login.php';

// Use a secure session
startSecureSession();

// Check if user was already logged in
if(isLoggedIn($database))
{
    // User was logged in, go to timeline
    header('Location: timeline.php');
}

?>

<!DOCTYPE html>

        <title>Twittercık - Register</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <link rel="stylesheet" href="css/bootstrap.min.css">

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

        <link rel="shortcut icon" type="image/png" href="img/favicon.png">

		                Register to Twittercık

		            	<form method="POST" action="controller/perform_register.php">

			                            @
			                            <input id="username" name="username" type="text" class="form-control" placeholder="Username">

			                        <input id="password" name="password" type="password" class="form-control" placeholder="Password">

			                        <button name="register-submit" class="btn btn-success" type="submit" onclick="return validateForm(this.form, this.form.username, this.form.password);">Register</button>

		                </form>

		    <?php $errorStyle = (isset($_SESSION['errorMessage']) && !empty($_SESSION['errorMessage'])) ? "display: visible;" : "display: none;"; ?>
		    <div class="row" style="<?php echo $errorStyle; ?>">

<?php echo $_SESSION['errorMessage']; unset($_SESSION['errorMessage']); ?>


text:
import { firstLetterUpperCase, purifyUrl } from "./utils";
import analyzePath from './analyzePath';

function routeFunction(fn, pathInfo, obj){

	let url = pathInfo.path;

	pathInfo.variables.forEach( v => {
		const pattern = `\\(?:${v}\\)?`;
		const regex = new RegExp(pattern, 'ig');
		url = url.replace(regex, (obj ? obj[v] : undefined));
	});

	return fn(purifyUrl(url))
}

const defaultOpts = {
	prefix : "goTo",
	defaultPath : "Index"
};

function createRouteFunction(routingImpl, path, alias, opts = defaultOpts){

	if(path.indexOf('*') !== -1) return null;

	opts = Object.assign({},defaultOpts,opts);

	let name = firstLetterUpperCase(alias);
	const pathInfo = analyzePath(path);
	if(!name){
		name = pathInfo.joinedTokens.length === 0 ? opts.defaultPath : pathInfo.joinedTokens;
	}
	const funcName = `${opts.prefix}${name}`;
	return {
		[funcName]: routeFunction.bind(null, routingImpl, pathInfo )
	}
}

export default createRouteFunction;


text:
Pattern: Invalid function boolean argument

Issue: -

## Description

Invalid function argument: A non-boolean value is required.

## Further Reading

* [Common Weakness Enumeration (CWE) - 628](https://cwe.mitre.org/data/definitions/628.html)


text:
import React from 'react';
import {render} from 'react-dom';
import App from './containers/App'
import { Provider } from 'react-redux'
import store from './store/configurestore'

render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('app'));


text:
Repository for the team project in the JavaScript UI&DOM course at Telerik Academy 2015-2016

#JavaScript DOM & UI: Teamwork Assignment
*****************************************

This document describes the teamwork assignment for Telerik Academy students in JavaScript
UI & DOM course

#Project Description

Implement a client-side JavaScript application using the HTML graphic APIs – canvas and SVG.

The project can be a game, web statistics or anything else. Sample applications:
*   Chess
*   Backgammon
*   Any jumping game – Super Mario, Bomberman or else
*   Statistics application – app showing different charts, based on received data
*   Minesweeper
*   Solitaire
*   Bridge-Belote
*   Paint-like application – drawing shapes, lines, etc

##General Requirements
Please define and implement the following assets in your project:
*   Use the HTML5 canvas
    *   Or a Canvas framework like KineticJS, paper.js or other
*   Use SVG
    *   Or a SVG framework like Raphael JS or other
*   Create animations
    *   Either for the canvas, SVG or both
*   The application must work in the latest versions of the browsers: Google Chrome, Mozilla Firefox, Internet Explorer 10/11, Opera and Apple Safar

##Additional Requirements
Follow the best practices for producing high-quality code:
*   **Correct naming**
*   **Data encapsulation**
    *   Use OOP and modules
*   **Strong cohesion** and **loose coupling**
*   Use **GIT** as a source control system
*   Host it on http://github.com

##Optional Requirements
If you have a chance, time and a suitable situation, you might add some of the following to your project:
*   Use DOM manipulations like native DOM API and/or jQuery
*   Unit and integration testing
*   Backward compatibility (make the application usable on browsers like IE8, IE7 and IE6)

##Non-required Work
*   Completely finished project is not obligatory required. It will not be a big problem if your project is not completely finished or is not working greatly
    *   This team work project is for educational purpose
    *   Its main purpose it to experience using graphics, DOM manipulation and OOP in a real-world-like project and to get some experience in team working and team collaboration with a source control system.
*   Implementation of server-side logic with ASP.NET, PHP, Java or Node.js

##Deliverables
Put the following in a ZIP archive and submit it (each team member submits the same file):
*   The **complete source code**
*   **Brief documentation** of your project (2-3 pages). It should provide the following information (in brief):
    *   **Team name** and **list of team members**
    *   Project purpose – **what problem do you solve?**
    *   The **URL of your Git repository**
    *   Any other information (optionally)
*   Optionally provide a presentation designed for the project defense

##Public Project Defense
Each team will have to deliver a public defense of its work to the other students and trainers. You will have only 10 minutes for the following:
*   Demonstrate the application (very shortly)
*   Show the source code
*   Show the commits logs to confirm that team member have contributed.
*   Optionally you might prepare a presentation (3-4 slides)
Please be **strict in timing!** Be well prepared for presenting maximum of your work for minimum time. Bring your own laptop. Test it preliminary with the multimedia projector. Open the project assets beforehand to save time. You have 10 minutes, no more

##Give Feedback about Your Teammates
You will be invited to provide feedback about all your teammates, their attitude to this project, their technical skills, their team working skills, their contribution to the project, etc. The feedback is important part of the project evaluation so take it seriously and be honest


text:
export * from './headers';
export * from './modals';
export * from './dynamics';
export * from './session-info';
export * from './partials';


text:
package com.navercorp.pinpoint.web.vo.stat.chart.application;

import com.navercorp.pinpoint.common.server.bo.stat.join.JoinLongFieldBo;
import com.navercorp.pinpoint.web.util.TimeWindow;
import com.navercorp.pinpoint.web.vo.Range;
import com.navercorp.pinpoint.web.vo.chart.Chart;
import com.navercorp.pinpoint.web.vo.chart.Point;
import com.navercorp.pinpoint.web.vo.stat.AggreJoinDirectBufferBo;
import com.navercorp.pinpoint.web.vo.stat.chart.StatChartGroup;

import org.junit.Test;

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

import static org.junit.Assert.assertEquals;

/**
 * @author Roy Kim
 */
public class ApplicationDirectBufferChartGroupTest {

    @Test
    public void createApplicationDirectBufferChartGroupTest() {
        long time = 1495418083250L;
        Range range = Range.newRange(time - 240000, time);
        TimeWindow timeWindow = new TimeWindow(range);

        List<AggreJoinDirectBufferBo> aggreDirectBufferList = new ArrayList<>(5);
        AggreJoinDirectBufferBo aggreJoinDirectBufferBo1 = new AggreJoinDirectBufferBo("testApp", 11, 60, "agent1_1", 20, "agent1_2", 11, 60, "agent1_1", 20, "agent1_2", 11, 60, "agent1_1", 20, "agent1_2", 11, 60, "agent1_1", 20, "agent1_2", time);
        AggreJoinDirectBufferBo aggreJoinDirectBufferBo2 = new AggreJoinDirectBufferBo("testApp", 22, 52, "agent2_1", 10, "agent2_2", 22, 52, "agent2_1", 10, "agent2_2", 22, 52, "agent2_1", 10, "agent2_2", 22, 52, "agent2_1", 10, "agent2_2", time - 60000);
        AggreJoinDirectBufferBo aggreJoinDirectBufferBo3 = new AggreJoinDirectBufferBo("testApp", 33, 39, "agent3_1", 9, "agent3_2", 33, 39, "agent3_1", 9, "agent3_2", 33, 39, "agent3_1", 9, "agent3_2", 33, 39, "agent3_1", 9, "agent3_2", time - 120000);
        AggreJoinDirectBufferBo aggreJoinDirectBufferBo4 = new AggreJoinDirectBufferBo("testApp", 44, 42, "agent4_1", 25, "agent4_2", 44, 42, "agent4_1", 25, "agent4_2", 44, 42, "agent4_1", 25, "agent4_2", 44, 42, "agent4_1", 25, "agent4_2", time - 180000);
        AggreJoinDirectBufferBo aggreJoinDirectBufferBo5 = new AggreJoinDirectBufferBo("testApp", 55, 55, "agent5_1", 54, "agent5_2", 55, 55, "agent5_1", 54, "agent5_2", 55, 55, "agent5_1", 54, "agent5_2", 55, 55, "agent5_1", 54, "agent5_2", time - 240000);
        aggreDirectBufferList.add(aggreJoinDirectBufferBo1);
        aggreDirectBufferList.add(aggreJoinDirectBufferBo2);
        aggreDirectBufferList.add(aggreJoinDirectBufferBo3);
        aggreDirectBufferList.add(aggreJoinDirectBufferBo4);
        aggreDirectBufferList.add(aggreJoinDirectBufferBo5);

        StatChartGroup applicationDirectBufferChartGroup = new ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup(timeWindow, aggreDirectBufferList);
        Map<StatChartGroup.ChartType, Chart<? extends Point>> charts = applicationDirectBufferChartGroup.getCharts();
        assertEquals(4, charts.size());

        Chart directCountChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.DIRECT_COUNT);
        List<Point> directCountPoints = directCountChart.getPoints();
        assertEquals(5, directCountPoints.size());
        int index = directCountPoints.size();
        for (Point point : directCountPoints) {
            testDirectCount((LongApplicationStatPoint) point, aggreDirectBufferList.get(--index));
        }

        Chart directMemoryUsedChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.DIRECT_MEMORY_USED);
        List<Point> directMemoryUsedPoints = directMemoryUsedChart.getPoints();
        assertEquals(5, directMemoryUsedPoints.size());
        index = directMemoryUsedPoints.size();
        for (Point point : directMemoryUsedPoints) {
            testDirectMemoryUsed((LongApplicationStatPoint)point, aggreDirectBufferList.get(--index));
        }

        Chart mappedCountChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.MAPPED_COUNT);
        List<Point> mappeedCountPoints = mappedCountChart.getPoints();
        assertEquals(5, mappeedCountPoints.size());
        index = mappeedCountPoints.size();
        for (Point point : mappeedCountPoints) {
            testMappedCount((LongApplicationStatPoint)point, aggreDirectBufferList.get(--index));
        }

        Chart mappedMemoryUsedChart = charts.get(ApplicationDirectBufferChart.ApplicationDirectBufferChartGroup.DirectBufferChartType.MAPPED_MEMORY_USED);
        List<Point> mappedMemoryUsedPoints = mappedMemoryUsedChart.getPoints();
        assertEquals(5, mappedMemoryUsedPoints.size());
        index = mappedMemoryUsedPoints.size();
        for (Point point : mappedMemoryUsedPoints) {
            testMappedMemoryUsed((LongApplicationStatPoint)point, aggreDirectBufferList.get(--index));
        }
    }

    private void testDirectCount(LongApplicationStatPoint directBufferPoint, AggreJoinDirectBufferBo aggreJoinDirectBufferBo) {
        final JoinLongFieldBo directCountJoinValue = aggreJoinDirectBufferBo.getDirectCountJoinValue();
        assertEquals(directBufferPoint.getXVal(), aggreJoinDirectBufferBo.getTimestamp());
        assertEquals(directBufferPoint.getYValForAvg(), directCountJoinValue.getAvg(), 0);
        assertEquals(directBufferPoint.getYValForMin(), directCountJoinValue.getMin(), 0);
        assertEquals(directBufferPoint.getYValForMax(), directCountJoinValue.getMax(), 0);
        assertEquals(directBufferPoint.getAgentIdForMin(), directCountJoinValue.getMinAgentId());
        assertEquals(directBufferPoint.getAgentIdForMax(), directCountJoinValue.getMaxAgentId());
    }

    private void testDirectMemoryUsed(LongApplicationStatPoint directBufferPoint, AggreJoinDirectBufferBo aggreJoinDirectBufferBo) {
        final JoinLongFieldBo directMemoryUsedJoinValue = aggreJoinDirectBufferBo.getDirectMemoryUsedJoinValue();
        assertEquals(directBufferPoint.getXVal(), aggreJoinDirectBufferBo.getTimestamp());
        assertEquals(directBufferPoint.getYValForAvg(), directMemoryUsedJoinValue.getAvg(), 0);
        assertEquals(directBufferPoint.getYValForMin(), directMemoryUsedJoinValue.getMin(), 0);
        assertEquals(directBufferPoint.getYValForMax(), directMemoryUsedJoinValue.getMax(), 0);
        assertEquals(directBufferPoint.getAgentIdForMin(), directMemoryUsedJoinValue.getMinAgentId());
        assertEquals(directBufferPoint.getAgentIdForMax(), directMemoryUsedJoinValue.getMaxAgentId());
    }

    private void testMappedCount(LongApplicationStatPoint directBufferPoint, AggreJoinDirectBufferBo aggreJoinDirectBufferBo) {
        final JoinLongFieldBo mappedCountJoinValue = aggreJoinDirectBufferBo.getMappedCountJoinValue();
        assertEquals(directBufferPoint.getXVal(), aggreJoinDirectBufferBo.getTimestamp());
        assertEquals(directBufferPoint.getYValForAvg(), mappedCountJoinValue.getAvg(), 0);
        assertEquals(directBufferPoint.getYValForMin(), mappedCountJoinValue.getMin(), 0);
        assertEquals(directBufferPoint.getYValForMax(), mappedCountJoinValue.getMax(), 0);
        assertEquals(directBufferPoint.getAgentIdForMin(), mappedCountJoinValue.getMinAgentId());
        assertEquals(directBufferPoint.getAgentIdForMax(), mappedCountJoinValue.getMaxAgentId());
    }

    private void testMappedMemoryUsed(LongApplicationStatPoint directBufferPoint, AggreJoinDirectBufferBo aggreJoinDirectBufferBo) {
        final JoinLongFieldBo mappedMemoryUsedJoinValue = aggreJoinDirectBufferBo.getMappedMemoryUsedJoinValue();
        assertEquals(directBufferPoint.getXVal(), aggreJoinDirectBufferBo.getTimestamp());
        assertEquals(directBufferPoint.getYValForAvg(), mappedMemoryUsedJoinValue.getAvg(), 0);
        assertEquals(directBufferPoint.getYValForMin(), mappedMemoryUsedJoinValue.getMin(), 0);
        assertEquals(directBufferPoint.getYValForMax(), mappedMemoryUsedJoinValue.getMax(), 0);
        assertEquals(directBufferPoint.getAgentIdForMin(), mappedMemoryUsedJoinValue.getMinAgentId());
        assertEquals(directBufferPoint.getAgentIdForMax(), mappedMemoryUsedJoinValue.getMaxAgentId());
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string-array name="click_behaviors" translatable="false">
        <item>@string/settings_click_behavior_run</item>
        <item>@string/settings_click_behavior_edit</item>
        <item>@string/settings_click_behavior_menu</item>
    </string-array>
    <string-array name="click_behaviors_values" translatable="false">
        <item>run</item>
        <item>edit</item>
        <item>menu</item>
    </string-array>
    <string-array name="crash_reporting" translatable="false">
        <item>@string/settings_crash_reporting_allow</item>
        <item>@string/settings_crash_reporting_disallow</item>
    </string-array>
    <string-array name="crash_reporting_values" translatable="false">
        <item>true</item>
        <item>false</item>
    </string-array>

    <string-array name="themes" translatable="false">
        <item>@string/theme_blue</item>
        <item>@string/theme_indigo</item>
        <item>@string/theme_grey</item>
        <item>@string/theme_green</item>
        <item>@string/theme_purple</item>
        <item>@string/theme_red</item>
        <item>@string/theme_orange</item>
    </string-array>

    <string-array name="themes_values" translatable="false">
        <item>blue</item>
        <item>indigo</item>
        <item>grey</item>
        <item>green</item>
        <item>purple</item>
        <item>red</item>
        <item>orange</item>
    </string-array>

    <string-array name="dark_theme_options" translatable="false">
        <item>@string/settings_dark_theme_options_auto</item>
        <item>@string/settings_dark_theme_options_on</item>
        <item>@string/settings_dark_theme_options_off</item>
    </string-array>

    <string-array name="dark_theme_options_values" translatable="false">
        <item>auto</item>
        <item>on</item>
        <item>off</item>
    </string-array>
</resources>


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <title>My document</title>
    <meta http-equiv="Content-type" content='text/html; charset="utf-8"' />
    <link rel="alternate" type="application/rdf+xml" title="RDF Version"
          href="example21.rdf" />

My document


text:
package org.dnal.compiler.validate;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.codehaus.jparsec.functors.Pair;
import org.dnal.api.impl.CompilerContext;
import org.dnal.compiler.et.XErrorTracker;
import org.dnal.compiler.parser.error.ErrorTrackingBase;
import org.dnal.compiler.parser.error.LineLocator;
import org.dnal.core.DType;
import org.dnal.core.DValue;
import org.dnal.core.logger.Log;
import org.dnal.core.nrule.NRule;
import org.dnal.core.nrule.NRuleContext;
import org.dnal.core.nrule.SimpleNRuleRunner;
import org.dnal.core.repository.Repository;
import org.dnal.core.repository.World;

public class ValidationPhase extends ErrorTrackingBase {

	private Map<NRule,Integer> alreadyRunMap = new HashMap<>();
	private ValidationOptions validateOptions;
	private List<DValue> futureValues;
	private CompilerContext context;
	private List<Pair<String, DValue>> pendingL; //transaction items. not yet added to repo but need validation of uniqueness

	public ValidationPhase(CompilerContext context, XErrorTracker et, ValidationOptions validateOptions, LineLocator locator) {
		super(et, locator);
		this.context = context;
		this.validateOptions = validateOptions;
		futureValues = new ArrayList<>();
	}
	public ValidationPhase(CompilerContext context, XErrorTracker et, ValidationOptions validateOptions, List<DValue> futureValues, List<Pair<String, DValue>> pendingList) {
		super(et, null);
		this.context = context;
		this.validateOptions = validateOptions;
		this.futureValues = futureValues;
		this.pendingL = pendingList;
	}

	public boolean validate() {
		/*
		 * Note. i think the reason we validate by walking the repos is to avoid infinite loops.
		 * If we traversed each top-level dval could get into an infinite loop, and also
		 * could end up validating some values multiple times
		 */

		Map<DType,Repository> repoMap = context.world.getRepoMap();
		for(DType type : repoMap.keySet()) {
			Repository repo = repoMap.get(type);
			Log.debugLog("repo %s: %d", type.getName(), repo.size());
			for(DValue dval : repo.getAll()) {
			    //because of y=x and the type of y might be shape but type of x is circle, then
			    //we can't control the order in which x and y are validated.
			    //we want it to be fully validated (as circle) so we should validate even
			    //if the validation state is not UNKNOWN.
				//					if (! dval.getValState().equals(ValidationState.UNKNOWN)) {
				String varName = "unknown";
				if (context.world instanceof World) {
					World worldObj = (World) context.world;
					varName = worldObj.findTopValueValueName(dval);
					if (varName == null) {
						varName = "unk";
					}
				}
				validateDValue(varName, dval, type);
				//					}
			}
		}

		return areNoErrors();
	}

	public boolean validateDValue(String varName, DValue dval, DType type) {
		if (validateOptions.isModeSet(ValidationOptions.VALIDATEMODE_NONE)) {
			return true; //don't do any validation
		}

		SimpleNRuleRunner runner = new SimpleNRuleRunner();

		//pass in alreadyRunMap so we can avoid executing UniqueRule instances more than once
		NRuleContext ctx = new NRuleContext(getET(), alreadyRunMap, validateOptions, futureValues, context, pendingL);
		ctx.setCurrentVarName(varName);
		runner.evaluate(dval, ctx);
		return runner.getValidationErrors().isEmpty();
	}

	public List<DValue> getFutureValues() {
		return futureValues;
	}

}


text:
$standard = @(
    "Add-Take_Ownership-Expanded",
    "Disable-Aero_Shake",
    "Disable-Hide_File_Extensions",
    "Disable-Quick_Access_Show_Frequent_Folders",
    "Disable-Quick_Access_Show_Recent_Files",
    "Disable-Start_Menu_Recommended",
    "Enable-Explorer_This_PC",
    "Run"
)

$expanded = @(
    "Add-Copy_TXT_To_Clipboard",
    "Add-Desktop_Power_Sub_Menu",
    "Add-Desktop_Run",
    "Add-Open_Command_Window_Here-Admin",
    "Add-Open_Command_Window_Here-Icon",
    "Add-Open_PowerShell_Here-Icon",
    "Add-Open_With_Notepad-Icon",
    "Add-Take_Ownership",
    "Add-VBS_as_Administrator",
    "Disable-Aero_Shake",
    "Disable-Hide_File_Extensions",
    "Disable-Internet_Open_With",
    "Disable-Quick_Access_Show_Frequent_Folders",
    "Disable-Quick_Access_Show_Recent_Files",
    "Disable-Shortcut_Text",
    "Disable-Show_snap_groups_in_taskbar_Alt-Tab_Task-View"
    "Disable-Start_Menu_Recommended",
    "Enable-Context_Menu_Actions-Additional",
    "Enable-Explorer_This_PC",
    "Run"
)

$revert = @(
    "Clear-Run",
    "Default-Aero_Shake",
    "Default-Context_Menu_Actions",
    "Default-Explorer_Quick_Access",
    "Default-Hide_File_Extensions",
    "Default-Internet_Open_With",
    "Default-Quick_Access_Show_Frequent_Folders",
    "Default-Quick_Access_Show_Recent_Files",
    "Default-Shortcut_Text",
    "Default-Show_snap_groups_in_taskbar_Alt-Tab_Task-View",
    "Default-Start_Menu_Recommended",
    "Remove-Copy_TXT_To_Clipboard",
    "Remove-Desktop_Power_Sub_Menu",
    "Remove-Desktop_Run",
    "Remove-Open_Command_Window_Here-Admin",
    "Remove-Open_Command_Window_Here",
    "Remove-Open_With_Notepad",
    "Remove-Take_Ownership",
    "Remove-VBS_as_Administrator"
)

# https://stackoverflow.com/questions/28076128/powershell-export-multiple-keys-to-one-reg-file
function Compile-RegistryKeys
{
    Param
    (
        [Parameter(Mandatory=$true)][array] $regs,
        [Parameter(Mandatory=$true)][array] $name
    )

    $outputFile = "$PSScriptRoot\$name.reg"

    'Windows Registry Editor Version 5.00' | Set-Content $outputFile

    foreach ($reg in $regs) {
      Get-Content "$PSScriptRoot\library\$reg.reg" | ? {
        $_ -ne 'Windows Registry Editor Version 5.00'
      } | Add-Content $outputFile
    }
}

Compile-RegistryKeys -regs $standard -name "standard"
Compile-RegistryKeys -regs $expanded -name "expanded"
Compile-RegistryKeys -regs $revert -name "revert"


text:
Incomplete unofficial documentation of Stack Exchange chat interface.

All POST methods require an `fkey` POST form data argument. It won't be
specifically listed for each of them.

## Event JSON Objects

Chat events are represented by JSON objects with at least the following
fields:

- `room_id` - integer
- `room_name` - string
- `event_type` - integer, possible values enumerated below
- `time_stamp` - integer

### `event_type` values

#### Message Events

- `1` - message posted
- `2` - message edited
- `6` - message starred or unstarred

All message events contain the the following fields based on the message
they refer to:

- `message_id` - integer
- `content` - string or missing if the user deleted the message
- `message_edits` - integer or missing if message hasn't been edited.
- `message_stars` - integer or missing if message has no stars.
- `message_owner_stars` - integer or missing if message not pinned.
- `target_user_id` - integer or missing
- `show_parent` - boolean or missing

They also contain the following fields, which may refer to the owner of
the most in some cases (e.g. for an id=1 message posted event), but
others may refer to the user taking the action triggering the event
(e.g. for an id=6 message starred or unstarred event).

- `user_id` - integer
- `user_name` - string

## Reading

### POST `/chats/ROOM_ID/events?mode=Messages`

Returns the most available recent event_type=1 (MessagePosted) Events
for the given ROOM_ID.

#### URL Query String Arguments

##### `before`

Optional. Limits results to events with a `message_id` less than
`before`.

##### `after`

Optional. Limits results to events with a `message_id` greater than or
equal to `after`.

##### `msgCount`

Optional. Number of events to return.
Maximum: 500
Default: 100

### POST `/events`

Returns a list of recent events for a room.

#### POST form data arguments

##### `rROOM_ID`

The name specifies the room we are interested in (e.g. `'r14219'`), and
the value specifies the `time_stamp` we would like to see messages
since.

### GET `/message/MESSAGE_ID`

Returns the text of the specified message.

#### URL Query String Arguments

##### `plain`

Optional. If false or missing, the rendered HTML of the message will be
returned. If true, the original markdown source of the message will be.

### POST `/ws-auth`

Authenticates a websocket connection to listen for events in a given
room. This returns a JSON Object with a `url` field, identifying the URL
to be used for the websocket connection. The `l` query string paramter
should be used with websocket URL to specify the time_stamp after which
we are interested in events.

#### POST form data arguments

##### `roomid`

### GET `/rooms/thumbs/ROOM_ID`

Returns a JSON object with information about the specified room.
Includes the following fields:

- `id` - integer
- `name` - string
- `description` - string
- `isFavorite` - boolean
- `usage` - null or string with HTML displaying graph of room activity
- `tags` - string with HTML displays tags associated with room

#### URL Query String Arguments

##### `showUsage`

Optional Whether the `usage` field should be populated, else null.
Default: false

### POST `/user/info/`

Returns information about users in the context of a given room.

The result is a JSON object with a single field, `users`, a list of
objects each of which has the following keys:

- `id` - integer
- `name` - string
- `reputation` - integer
- `is_moderator` - boolean
- `is_owner` - boolean
- `email_hash` - an hex MD5 hash digest used to identify a gravatar,
  or a `!`-prefixed avatar URL.

#### POST form data arguments

##### `ids`

The ID (comma-seperated list of IDs?) of the users in question.

##### `roomId`

The ID of the room in question.

## Writing

### POST `/chats/ROOM_ID/messages/new`

Attempts to post a message to the specified chat room.

#### POST form data arguments

##### `text`

The content of the message.

### POST `/messages/MESSAGE_ID`

Attempts to edit a message.

#### POST form data arguments

##### `text`

The new content of the message.

### POST `/messages/MESSAGE_ID/star`

Stars or unstars the specified message. You can't specify whether you
want to have starred the message or not, you can just toggle whether
you have.

### POST `/messages/MESSAGE_ID/owner-star`

Pins or unpins the specified message. This is a toggle, like starring.

### POST `/messages/MESSAGE_ID/delete`

Removes `content` of the specified message.

### POST `/admin/movePosts/ROOM_ID`

Moves posts from the specified room to another room.

#### POST form data arguments

- `ids` - comma-seperated list of message_ids
- `to` - room_id of room the messages should be moved to


text:
//================================================================
/**
 * @packageDocumentation
 * @module std
 */
//================================================================
import { InvalidArgument } from "../../exception/InvalidArgument";

/**
 * Laguerre polynomials.
 *
 * @reference https://en.wikipedia.org/wiki/Laguerre_polynomials
 */
export function laguerre(n: number, x: number): number {
    return assoc_laguerre(n, 0, x);
}

/**
 * Associated laguerre polynomials.
 *
 * @reference https://en.wikipedia.org/wiki/Laguerre_polynomials#Generalized_Laguerre_polynomials
 */
export function assoc_laguerre(n: number, m: number, x: number): number {
    // VALIDATE PARAMETERS
    if ((n = Math.floor(n)) < 0 || (m = Math.floor(m)) < 0)
        throw new InvalidArgument(
            `Error on std.assoc_laguerre(): both n and m must be unsigned integer -> (n = ${n}, m = ${m}).`,
        );

    // MEMORIZATION
    const solutions: number[] = [1, -x + m + 1];

    // COMPUTE RETURN VALUE
    return _Compute_assoc_laguerre(n, m, x, solutions);
}

function _Compute_assoc_laguerre(
    n: number,
    m: number,
    x: number,
    solutions: number[],
): number {
    if (solutions.length > n) return solutions[n];

    const ln_1: number = _Compute_assoc_laguerre(n - 1, m, x, solutions);
    const ln_2: number = _Compute_assoc_laguerre(n - 2, m, x, solutions);

    let ret: number = (2 * n - 1 + m - x) * ln_1 - (n + m - 1) * ln_2;
    ret = ret / n;

    solutions[n] = ret;
    return ret;
}


text:
package com.eaw1805.battles.naval.longrange;

import com.eaw1805.battles.naval.NavalBattleProcessor;

/**
 * Long-Range fire of all warships at 75% effectiveness.
 * All warships except class 1 will shoot at enemy ships.
 * This round will take place only at clear and rainy weather conditions.
 */
public class R2LongRangeFire
        extends SOLLongRangeFire {

    /**
     * Default constructor.
     *
     * @param caller the processor requesting the execution of this round.
     */
    public R2LongRangeFire(final NavalBattleProcessor caller) {
        super(caller);
        setRoundModifier(75);
        setRound(ROUND_LR_1);
    }

    /**
     * Check weather to determine if this round will take place.
     *
     * @return true if the weather is CLEAR.
     */
    public boolean checkWeather() {
        return ((getParent().getWeather() == NavalBattleProcessor.WEATHER_CLEAR)
                || (getParent().getWeather() == NavalBattleProcessor.WEATHER_RAIN));
    }

    /**
     * The minimum ship class that can participate in this round.
     *
     * @return 2.
     */
    public int minimumShipClass() {
        return 2;
    }

}


text:
PlayerCreationDialog::PlayerCreationDialog(QWidget *parent) :
    QDialog(parent)
{
}


text:
#region License Header

//

#endregion

namespace ProCenter.Mvc.Infrastructure.Service
{
    #region Using Statements

    using System;
    using System.Threading.Tasks;
    using Agatha.Common;

    #endregion

    /// <summary>Interface for asynchronous request dispatcher.</summary>
    public interface IAsyncRequestDispatcher : IRequestDispatcher
    {
        #region Public Methods and Operators

        /// <summary>
        /// Gets all asynchronous.
        /// </summary>
        /// <returns>A <see cref="Task"/>.</returns>
        Task GetAllAsync ();

        /// <summary>
        /// Gets the asynchronous.
        /// </summary>
        /// <typeparam name="T">The type of response to get.</typeparam>
        /// <returns>A <see cref="Task"/> that returns the response of type <typeparam name="T"></typeparam>.</returns>
        Task<T> GetAsync<T> ()
            where T : Response;

        /// <summary>
        /// Gets the asynchronous.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns>A <see cref="Task"/> that returns a response object.</returns>
        Task<object> GetAsync ( Type type );

        #endregion
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using FluentValidation;
using FluentValidation.Results;
using Moq;
using NUnit.Framework;
using Weapsy.Apps.Text.Domain;
using Weapsy.Apps.Text.Domain.Commands;
using Weapsy.Apps.Text.Domain.Events;

namespace Weapsy.Apps.Text.Tests.Domain
{
    [TestFixture]
    public class AddVersionTests
    {
        private AddVersion _command;
        private Mock<IValidator<AddVersion>> _validatorMock;
        private TextModule _textModule;
        private TextVersion _newVersion;
        private VersionAdded _event;

        [SetUp]
        public void Setup()
        {
            _textModule = TextModuleFactory.Get();

            _command = new AddVersion
            {
                SiteId = Guid.NewGuid(),
                ModuleId = _textModule.ModuleId,
                Id = _textModule.Id,
                VersionId = Guid.NewGuid(),
                Content = "Content",
                Description = "Description",
                Status = TextVersionStatus.Published,
                VersionLocalisations = new List<AddVersion.VersionLocalisation>()
                {
                    new AddVersion.VersionLocalisation
                    {
                        LanguageId = Guid.NewGuid(),
                        Content = "Localised content"
                    }
                }
            };

            _validatorMock = new Mock<IValidator<AddVersion>>();
            _validatorMock.Setup(x => x.Validate(_command)).Returns(new ValidationResult());

            _textModule.AddVersion(_command, _validatorMock.Object);

            _newVersion = _textModule.TextVersions.FirstOrDefault(x => x.Id == _command.VersionId);

            _event = _textModule.Events.OfType<VersionAdded>().SingleOrDefault();
        }

        [Test]
        public void Should_validate_command()
        {
            _validatorMock.Verify(x => x.Validate(_command));
        }

        [Test]
        public void Should_add_new_version()
        {
            Assert.NotNull(_newVersion);
        }

        [Test]
        public void Should_set_id_in_new_version()
        {
            Assert.AreEqual(_command.VersionId, _newVersion.Id);
        }

        [Test]
        public void Should_set_text_module_id_in_new_version()
        {
            Assert.AreEqual(_command.Id, _newVersion.TextModuleId);
        }

        [Test]
        public void Should_set_content_in_new_version()
        {
            Assert.AreEqual(_command.Content, _newVersion.Content);
        }

        [Test]
        public void Should_set_description_in_new_version()
        {
            Assert.AreEqual(_command.Description, _newVersion.Description);
        }

        [Test]
        public void Should_set_status_in_new_version()
        {
            Assert.AreEqual(_command.Status, _newVersion.Status);
        }

        [Test]
        public void Should_set_localisation_in_new_version()
        {
            Assert.NotNull(_newVersion.TextLocalisations[0]);
        }

        [Test]
        public void Should_set_language_id_in_new_version_localisation()
        {
            Assert.AreEqual(_command.VersionLocalisations[0].LanguageId, _newVersion.TextLocalisations[0].LanguageId);
        }

        [Test]
        public void Should_set_content_in_new_version_localisation()
        {
            Assert.AreEqual(_command.VersionLocalisations[0].Content, _newVersion.TextLocalisations[0].Content);
        }

        [Test]
        public void Should_add_version_added_event()
        {
            Assert.IsNotNull(_event);
        }

        [Test]
        public void Should_set_id_in_version_added_event()
        {
            Assert.AreEqual(_textModule.Id, _event.AggregateRootId);
        }

        [Test]
        public void Should_set_site_id_in_version_added_event()
        {
            Assert.AreEqual(_command.SiteId, _event.SiteId);
        }

        [Test]
        public void Should_set_module_id_in_version_added_event()
        {
            Assert.AreEqual(_textModule.ModuleId, _event.ModuleId);
        }

        [Test]
        public void Should_set_version_id_in_version_added_event()
        {
            Assert.AreEqual(_newVersion.Id, _event.VersionId);
        }

        [Test]
        public void Should_set_content_in_version_added_event()
        {
            Assert.AreEqual(_newVersion.Content, _event.Content);
        }

        [Test]
        public void Should_set_description_in_version_added_event()
        {
            Assert.AreEqual(_newVersion.Description, _event.Description);
        }

        [Test]
        public void Should_set_version_status_in_version_added_event()
        {
            Assert.AreEqual(_newVersion.Status, _event.Status);
        }
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Phytologia 49:483. 1981

#### Original name
null

### Remarks
null


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.gift.kelimetrix">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter android:label="@string/view_kelimetrix">
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- Accepts URIs that begin with "http://www.example.com/gizmos" -->
                <data
                    android:host="www.example.com"
                    android:pathPrefix="/gizmos"
                    android:scheme="http" />
                <!-- note that the leading "/" is required for pathPrefix -->
                <!--
                Accepts URIs that begin with "example://gizmos"
                <data android:scheme="example"
                      android:host="gizmos" />
                -->
            </intent-filter>
        </activity>
        <activity android:name=".GameActivity" />
        <activity android:name=".ScoreActivity" />
        <activity android:name=".ScoreTableActivity" />
        <activity android:name=".GameTestActivity"></activity>
    </application>

</manifest>


text:
//******************************************************************************************************
//  TrendingGroupsResource.cs - Gbtc
//
//  Copyright © 2014, Grid Protection Alliance.  All Rights Reserved.
//
//  Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
//  the NOTICE file distributed with this work for additional information regarding copyright ownership.
//  The GPA licenses this file to you under the Eclipse Public License -v 1.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.opensource.org/licenses/eclipse-1.0.php
//
//  Unless agreed to in writing, the subject software distributed under the License is distributed on an
//  "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
//  License for the specific language governing permissions and limitations.
//
//  Code Modification History:
//  ----------------------------------------------------------------------------------------------------
//  07/22/2014 - Stephen C. Wills
//       Generated original version of source code.
//
//******************************************************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using FaultData.DataAnalysis;
using FaultData.DataSets;
using openXDA.Model;

namespace FaultData.DataResources
{
    public class TrendingGroupsResource : DataResourceBase<MeterDataSet>
    {
        #region [ Members ]

        // Fields
        private Dictionary<Channel, List<DataGroup>> m_trendingGroups;

        #endregion

        #region [ Properties ]

        public Dictionary<Channel, List<DataGroup>> TrendingGroups
        {
            get
            {
                return m_trendingGroups;
            }
        }

        #endregion

        #region [ Methods ]

        public override void Initialize(MeterDataSet meterDataSet)
        {
            List<DataGroup> dataGroups = meterDataSet.GetResource<DataGroupsResource>().DataGroups;

            // All the data groups that classify as trend data must be split into multiple data groups by channel.
            // The collection is then flattened into a collection of all the (channel, dataGroup) pairs.
            // The flattened collection is then grouped by channel to get all groups for each channel.
            // The final result is a lookup table from channel to list of all of that channel's data groups
            m_trendingGroups = dataGroups
                .Where(dataGroup => dataGroup.Classification == DataClassification.Trend)
                .Select(dataGroup => dataGroup.DataSeries.GroupBy(dataSeries => dataSeries.SeriesInfo.Channel))
                .SelectMany(channelSeries => channelSeries.Select(grouping => Tuple.Create(grouping.Key, new DataGroup(grouping))))
                .GroupBy(tuple => tuple.Item1, tuple => tuple.Item2)
                .ToDictionary(grouping => grouping.Key, grouping => grouping.ToList());
        }

        #endregion
    }
}


text:
package org.nmrml.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlIDREF;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for SourceFileRefType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="SourceFileRefType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <attribute name="ref" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SourceFileRefType", namespace = "http://nmrml.org/schema")
public class SourceFileRefType {

    @XmlAttribute(name = "ref", required = true)
    @XmlIDREF
    @XmlSchemaType(name = "IDREF")
    protected Object ref;

    /**
     * Gets the value of the ref property.
     *
     * @return
     *     possible object is
     *     {@link Object }
     *
     */
    public Object getRef() {
        return ref;
    }

    /**
     * Sets the value of the ref property.
     *
     * @param value
     *     allowed object is
     *     {@link Object }
     *
     */
    public void setRef(Object value) {
        this.ref = value;
    }

}


text:
import os.path
import sys
from optparse import OptionParser
from keyczar import keyczar

parser = OptionParser(usage="usage: %prog [options] <keyczar keystore directory>")
parser.add_option("-f", "--file", help="the input file", dest="filename", metavar="FILE")
parser.add_option("-d", "--decrypt", action="store_true", help="decrypt the file", dest="decrypt")

(options, args) = parser.parse_args()

if len(args) != 1:
  parser.error("wrong number of arguments")

if not os.path.isdir(args[0]):
  print 'Error: keystore directory "%s" not found' % args[0]
  sys.exit(1)

if options.filename:
  with open(options.filename, 'r') as content_file:
    content = content_file.read()
    keydir = os.path.expanduser(args[0])
    crypter = keyczar.Crypter.Read(keydir)
    if options.decrypt:
      print crypter.Decrypt(content)
    else:
      encrypted_secret = crypter.Encrypt(content)
      print encrypted_secret
else:
  parser.print_help()


text:
(function () {
  'use strict';

  // Init module.
  angular.module('frontend.strapi.dashboard', []);
})();


text:
import { DataSource } from '../data-source';
export declare class LocalDataSource extends DataSource {
    protected data: Array<any>;
    protected filteredAndSorted: Array<any>;
    protected sortConf: Array<any>;
    protected filterConf: any;
    protected pagingConf: any;
    constructor(data?: Array<any>);
    load(data: Array<any>): Promise<any>;
    prepend(element: any): Promise<any>;
    append(element: any): Promise<any>;
    add(element: any): Promise<any>;
    remove(element: any): Promise<any>;
    update(element: any, values: any): Promise<any>;
    find(element: any): Promise<any>;
    getElements(): Promise<any>;
    getFilteredAndSorted(): Promise<any>;
    getAll(): Promise<any>;
    reset(silent?: boolean): void;
    empty(): Promise<any>;
    count(): number;
    /**
     *
     * Array of conf objects
     * [
     *  {field: string, direction: asc|desc|null, compare: Function|null},
     * ]
     * @param conf
     * @param doEmit
     * @returns {LocalDataSource}
     */
    setSort(conf: Array<any>, doEmit?: boolean): LocalDataSource;
    /**
     *
     * Array of conf objects
     * [
     *  {field: string, search: string, filter: Function|null},
     * ]
     * @param conf
     * @param andOperator
     * @param doEmit
     * @returns {LocalDataSource}
     */
    setFilter(conf: Array<any>, andOperator?: boolean, doEmit?: boolean): LocalDataSource;
    addFilter(fieldConf: any, andOperator?: boolean, doEmit?: boolean): LocalDataSource;
    setPaging(page: number, perPage: number, doEmit?: boolean): LocalDataSource;
    setPage(page: number, doEmit?: boolean): LocalDataSource;
    getSort(): any;
    getFilter(): any;
    getPaging(): any;
    protected prepareData(data: Array<any>): Array<any>;
    protected sort(data: Array<any>): Array<any>;
    protected filter(data: Array<any>): Array<any>;
    protected paginate(data: Array<any>): Array<any>;
}


text:
define([
    "./core",
    "./var/slice",
    "./callbacks"
], function (jQuery, slice) {

    jQuery.extend({

        Deferred: function (func) {
            var tuples = [

                    // action, add listener, listener list, final state
                    ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
                    ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
                    ["notify", "progress", jQuery.Callbacks("memory")]
                ],
                state = "pending",
                promise = {
                    state: function () {
                        return state;
                    },
                    always: function () {
                        deferred.done(arguments).fail(arguments);
                        return this;
                    },
                    then: function (/* fnDone, fnFail, fnProgress */) {
                        var fns = arguments;
                        return jQuery.Deferred(function (newDefer) {
                            jQuery.each(tuples, function (i, tuple) {
                                var fn = jQuery.isFunction(fns[i]) && fns[i];

                                // deferred[ done | fail | progress ] for forwarding actions to newDefer
                                deferred[tuple[1]](function () {
                                    var returned = fn && fn.apply(this, arguments);
                                    if (returned && jQuery.isFunction(returned.promise)) {
                                        returned.promise()
                                            .progress(newDefer.notify)
                                            .done(newDefer.resolve)
                                            .fail(newDefer.reject);
                                    } else {
                                        newDefer[tuple[0] + "With"](
                                            this === promise ? newDefer.promise() : this,
                                            fn ? [returned] : arguments
                                        );
                                    }
                                });
                            });
                            fns = null;
                        }).promise();
                    },

                    // Get a promise for this deferred
                    // If obj is provided, the promise aspect is added to the object
                    promise: function (obj) {
                        return obj != null ? jQuery.extend(obj, promise) : promise;
                    }
                },
                deferred = {};

            // Keep pipe for back-compat
            promise.pipe = promise.then;

            // Add list-specific methods
            jQuery.each(tuples, function (i, tuple) {
                var list = tuple[2],
                    stateString = tuple[3];

                // promise[ done | fail | progress ] = list.add
                promise[tuple[1]] = list.add;

                // Handle state
                if (stateString) {
                    list.add(function () {

                        // state = [ resolved | rejected ]
                        state = stateString;

                        // [ reject_list | resolve_list ].disable; progress_list.lock
                    }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
                }

                // deferred[ resolve | reject | notify ]
                deferred[tuple[0]] = function () {
                    deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments);
                    return this;
                };
                deferred[tuple[0] + "With"] = list.fireWith;
            });

            // Make the deferred a promise
            promise.promise(deferred);

            // Call given func if any
            if (func) {
                func.call(deferred, deferred);
            }

            // All done!
            return deferred;
        },

        // Deferred helper
        when: function (subordinate /* , ..., subordinateN */) {
            var i = 0,
                resolveValues = slice.call(arguments),
                length = resolveValues.length,

                // the count of uncompleted subordinates
                remaining = length !== 1 ||
                ( subordinate && jQuery.isFunction(subordinate.promise) ) ? length : 0,

                // the master Deferred.
                // If resolveValues consist of only a single Deferred, just use that.
                deferred = remaining === 1 ? subordinate : jQuery.Deferred(),

                // Update function for both resolve and progress values
                updateFunc = function (i, contexts, values) {
                    return function (value) {
                        contexts[i] = this;
                        values[i] = arguments.length > 1 ? slice.call(arguments) : value;
                        if (values === progressValues) {
                            deferred.notifyWith(contexts, values);
                        } else if (!( --remaining )) {
                            deferred.resolveWith(contexts, values);
                        }
                    };
                },

                progressValues, progressContexts, resolveContexts;

            // Add listeners to Deferred subordinates; treat others as resolved
            if (length > 1) {
                progressValues = new Array(length);
                progressContexts = new Array(length);
                resolveContexts = new Array(length);
                for (; i < length; i++) {
                    if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
                        resolveValues[i].promise()
                            .progress(updateFunc(i, progressContexts, progressValues))
                            .done(updateFunc(i, resolveContexts, resolveValues))
                            .fail(deferred.reject);
                    } else {
                        --remaining;
                    }
                }
            }

            // If we're not waiting on anything, resolve the master
            if (!remaining) {
                deferred.resolveWith(resolveContexts, resolveValues);
            }

            return deferred.promise();
        }
    });

    return jQuery;
});


text:
<?php
/*
|--------------------------------------------------------------------------
| Redirects
|--------------------------------------------------------------------------
|
| Add redirects here instead of your .htaccess file with the key being
| Do NOT include beginning or trailing slashes for BOTH keys and values
|
|	$config['passive_redirects'] = array(
|							'mypage' => 'http://www.mysite.com/my_newpage'),
|							'mypage2' => array('url' => 'http://www.mysite.com/my_newpage', 'case_sensitive' => FALSE, 'http_code' => 302),
|							);
|
| You may also use the following setting to force SSL on specific URI paths
| The keys should match the value in your environments config
|
|	$config['ssl'] = array(
|					'production' => array('mysecurepage$|mysecurepage/:any'),
|					);
*/

// Default HTTP response code to return... 301 = permanent redirect
$config['http_code'] = 301;

// Determines whether the pattern matching for the redirects is case sensitive
$config['case_sensitive'] = TRUE;

// The paths to force SSL with the key being the environment it belongs to
$config['ssl'] = array('development' => array());

// The paths to force NON SSL with the key being the environment it belongs to
$config['non_ssl'] = array('development' => array());

// The host name to enforce (e.g. mysite.com vs www.mysite.com) with the key being the environment it belongs to
$config['host'] = array('production' => '');

// The pages to redirect to regardless if it's found by FUEL.
// WARNING: Run on every request.
$config['aggressive_redirects'] =  array();

// The pages to redirect to only AFTER no page is found by FUEL
$config['passive_redirects'] = array();

// The max number of times to redirect before showing a 404
$config['max_redirects'] = 2;

// DEPRECATED BUT STILL WILL WORK. THIS MAPS TO $config['passive_redirects']
//$redirect = array();

/* End of file redirects.php */
/* Location: ./application/config/redirects.php */


text:
package cn.binarywang.wx.miniapp.api.impl;

import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.safety.request.WxMaUserSafetyRiskRankRequest;
import cn.binarywang.wx.miniapp.bean.safety.response.WxMaUserSafetyRiskRankResponse;
import cn.binarywang.wx.miniapp.test.ApiTestModule;
import com.google.inject.Inject;
import me.chanjar.weixin.common.error.WxErrorException;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;

import static org.testng.AssertJUnit.assertNotNull;

@Test
@Guice(modules = ApiTestModule.class)
public class WxMaSafetyRiskControlServiceImplTest {

  @Inject
  protected WxMaService wxService;

  @Test
  public void testGetUserRiskRank() throws WxErrorException {
    WxMaUserSafetyRiskRankRequest wxMaUserSafetyRiskRankRequest = WxMaUserSafetyRiskRankRequest.builder()
      .appid("")
      .openid("")
      .scene(1)
      .isTest(true)
      .build();
    WxMaUserSafetyRiskRankResponse wxMaUserSafetyRiskRankResponse = this.wxService.getSafetyRiskControlService().getUserRiskRank(wxMaUserSafetyRiskRankRequest);
    assertNotNull(wxMaUserSafetyRiskRankResponse);
  }

}


text:
export {};

// Establish scope.
window['WebComponents'] = window['WebComponents'] || {'flags':{}};

// loading script
let file = 'webcomponents-lite.js';
let script = document.querySelector('script[src*="' + file + '"]');
let flagMatcher = /wc-(.+)/;

// Flags. Convert url arguments to flags
let flags = {};
if (!flags['noOpts']) {
  // from url
  location.search.slice(1).split('&').forEach(function(option) {
    let parts = option.split('=');
    let match;
    if (parts[0] && (match = parts[0].match(flagMatcher))) {
      flags[match[1]] = parts[1] || true;
    }
  });
  // from script
  if (script) {
    for (let i=0, a; (a=script.attributes[i]); i++) {
      if (a.name !== 'src') {
        flags[a.name] = a.value || true;
      }
    }
  }
  // log flags
  if (flags['log'] && flags['log']['split']) {
    let parts = flags['log'].split(',');
    flags['log'] = {};
    parts.forEach(function(f) {
      flags['log'][f] = true;
    });
  } else {
    flags['log'] = {};
  }
}

// exports
window['WebComponents']['flags'] = flags;
let forceShady = flags['shadydom'];
if (forceShady) {
  window['ShadyDOM'] = window['ShadyDOM'] || {};
  window['ShadyDOM']['force'] = forceShady;
}

let forceCE = flags['register'] || flags['ce'];
if (forceCE && window['customElements']) {
  window['customElements']['forcePolyfill'] = forceCE;
}


text:
#pragma once
#include "DX11Demo.h"
#include "Factory.h"
#include "RenderInfo.h"
#include "FxEnum.h"
#include <vector>
#include <map>
#include "PointLight.h"
#include "Meshes.h"
#include "MeshInfo.h"
#include <SpriteBatch.h>
#include "objLoader.h"
#include "RenderTarget.h"

class EdgeDetectionRenderInfo;
class GameObject;
class ArcCamera;
class VROutlineDemo : public DX11Demo
{
public:
	VROutlineDemo();
	virtual ~VROutlineDemo();

	virtual bool load() override;
	virtual void unload() override;

	virtual void update() override;
	virtual void render() override;

private:
	std::map<FX, RenderInfo*>		m_fx;
	std::map<MESH, MeshInfo*>		m_meshes;

	std::vector<GameObject*>		m_gameObjects;
	std::vector<MeshObject*>		m_renderables;
	ArcCamera*						m_camera;
	PointLight						m_light;
	ID3D11PixelShader*				m_postPS = nullptr;
	/*Stuff for post-fx*/
	DirectX::XMFLOAT4X4				m_orthoViewProj;

	EdgeDetectionRenderInfo*		m_edgeDetectionRenderInfo = nullptr;
	std::unique_ptr<DirectX::SpriteBatch> m_spriteBatch;

	RenderTarget					m_depthRenderTarget;
	RenderTarget					m_primaryRenderTarget;
	RenderTarget					m_normalsRenderTarget;
	RenderTarget					m_singleSampledDepth;
	RenderTarget					m_singleSampledPrimary;
	RenderTarget					m_singleSampledNormals;
	RenderTarget					m_secondaryRenderTarget;

	/*For GUI Access*/
	float*							m_outlineColour;
	float*							m_outlineThickness;
	int*							m_celShaded;

	bool loadPostFXResources();
	bool loadFx();
	bool loadMeshes();
	MeshInfo* loadMesh(const ObjModel& model);
	MeshInfo* loadMesh(const std::string& _fpath, const DirectX::XMFLOAT4X4& _transform);
};


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class org.deidentifier.arx.gui.view.impl.common.table.CTStyleConfiguration (ARX GUI Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.deidentifier.arx.gui.view.impl.common.table.CTStyleConfiguration

Packages that use CTStyleConfiguration

Package
Description

org.deidentifier.arx.gui.view.impl.common.table

Uses of CTStyleConfiguration in org.deidentifier.arx.gui.view.impl.common.table

Subclasses of CTStyleConfiguration in org.deidentifier.arx.gui.view.impl.common.table

Modifier and Type
Class and Description

class
StyleConfigurationFillLayout

Style config for fill layouts.

class
StyleConfigurationHeader

Header style.

class
StyleConfigurationSelection

Sets up rendering style used for selected areas and the selection anchor.

class
StyleConfigurationTable

The table style configuration.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
enum TodoConstants
{
    TODO_CREATE,
    TODO_COMPLETE,
    TODO_DESTROY,
    TODO_DESTROY_COMPLETED,
    TODO_TOGGLE_COMPLETE_ALL,
    TODO_UNDO_COMPLETE,
    TODO_UPDATE_TEXT
}

export = TodoConstants;


text:
import * as React from 'react';
import LoadingButton from '@mui/lab/LoadingButton';
import Box from '@mui/material/Box';
import FormControlLabel from '@mui/material/FormControlLabel';
import Switch from '@mui/material/Switch';
import SaveIcon from '@mui/icons-material/Save';
import SendIcon from '@mui/icons-material/Send';

export default function LoadingButtonsTransition() {
  const [loading, setLoading] = React.useState(false);
  function handleClick() {
    setLoading(true);
  }

  return (
    <Box sx={{ '& > button': { m: 1 } }}>
      <FormControlLabel
        sx={{
          display: 'block',
        }}
        control={
          <Switch
            checked={loading}
            onChange={() => setLoading(!loading)}
            name="loading"
            color="primary"
          />
        }
        label="Loading"
      />
      <LoadingButton
        onClick={handleClick}
        loading={loading}
        variant="outlined"
        disabled
      >
        disabled
      </LoadingButton>
      <LoadingButton
        onClick={handleClick}
        loading={loading}
        loadingIndicator="Loading..."
        variant="outlined"
      >
        Fetch data
      </LoadingButton>
      <LoadingButton
        onClick={handleClick}
        endIcon={<SendIcon />}
        loading={loading}
        loadingPosition="end"
        variant="contained"
      >
        Send
      </LoadingButton>
      <LoadingButton
        color="secondary"
        onClick={handleClick}
        loading={loading}
        loadingPosition="start"
        startIcon={<SaveIcon />}
        variant="contained"
      >
        Save
      </LoadingButton>
    </Box>
  );
}


text:
class PostCategory < ApplicationRecord
  include Checkable
  include HasUuid
  include NestedPriority
  include Toggleable

  META_LIMIT = 250
  NAME_LIMIT = 100
  SLUG_LIMIT = 100
  SLUG_PATTERN = /\A[a-z][-_0-9a-z]*[0-9a-z]\z/i.freeze

  toggleable :visible

  belongs_to :post_type
  belongs_to :parent, class_name: PostCategory.to_s, optional: true, touch: true
  belongs_to :site, optional: true
  has_many :child_categories, class_name: PostCategory.to_s, foreign_key: :parent_id, dependent: :destroy
  has_many :post_post_categories, dependent: :delete_all
  has_many :posts, through: :post_post_categories
  has_many :post_category_users, dependent: :delete_all

  before_validation { self.slug = Canonizer.transliterate(name.to_s) if slug.blank? }
  before_validation { self.slug = slug.to_s.downcase }
  before_validation :generate_long_slug
  before_save { children_cache.uniq! }
  after_create :cache_parents!
  after_save { parent&.cache_children! }

  validates_presence_of :name, :slug
  validates_uniqueness_of :name, scope: %i[site_id post_type_id parent_id]
  validates_uniqueness_of :slug, scope: %i[site_id post_type_id]
  validates_length_of :meta_description, maximum: META_LIMIT
  validates_length_of :name, maximum: NAME_LIMIT
  validates_length_of :nav_text, maximum: NAME_LIMIT
  validates_length_of :slug, maximum: SLUG_LIMIT
  validates_format_of :slug, with: SLUG_PATTERN
  validate :parent_matches_type
  validate :parent_is_not_too_deep

  scope :for_current_site, -> { for_site(Site.find_by(uuid: ENV['SITE_ID'])) }
  scope :for_site, ->(v) { where(site: v) }
  scope :visible, -> { for_current_site.where(visible: true, deleted: false) }
  scope :for_tree, ->(post_type_id, parent_id = nil) { for_current_site.where(post_type_id: post_type_id, parent_id: parent_id).ordered_by_priority }
  scope :ids_for_slug, ->(slug) { for_current_site.where(long_slug: slug.to_s.downcase).pluck(:id) }

  def self.entity_parameters
    %i[meta_description name nav_text slug priority visible]
  end

  def self.creation_parameters
    entity_parameters + %i[parent_id post_type_id]
  end

  # @param [PostCategory] entity
  def self.siblings(entity)
    where(post_type_id: entity.post_type_id, parent_id: entity.parent_id)
  end

  # @param [Integer] type_id
  def self.list_for_tree(type_id, site = Site.find_by(uuid: ENV['SITE_ID']))
    buffer = {}
    where(post_type_id: type_id, site: site).ordered_by_priority.each do |item|
      buffer[item.id] = {
        parent_id: item.parent_id,
        item: item
      }
    end
    buffer
  end

  def self.sites
    Site.where(id: pluck(:site_id).uniq).list_for_administration
  end

  def full_title
    (parents.pluck(:name) + [name]).join ' / '
  end

  def depth
    parent_ids.count
  end

  def parent_ids
    parents_cache.split(',').compact
  end

  # @return [Array<Integer>]
  def branch_ids
    parents_cache.split(',').map(&:to_i).reject { |i| i < 1 }.uniq + [id]
  end

  # @return [Array<Integer>]
  def subbranch_ids
    [id] + children_cache
  end

  def parents
    return [] if parents_cache.blank?

    PostCategory.where(id: parent_ids).order('id asc')
  end

  def cache_parents!
    return if parent.nil?

    self.parents_cache = "#{parent.parents_cache},#{parent_id}".gsub(/\A,/, '')
    save!
  end

  def cache_children!
    child_categories.order('id asc').each do |child|
      self.children_cache += [child.id] + child.children_cache
    end
    save!
  end

  def can_be_deleted?
    !locked? && child_categories.count < 1
  end

  # @param [Post] post
  def post?(post)
    post_post_categories.where(post: post).exists?
  end

  # @param [Post] post
  def add_post(post)
    post_post_categories.create(post: post)
  end

  # @param [Post] post
  def remove_post(post)
    post_post_categories.where(post: post).delete_all
  end

  # @param [User] user
  def user?(user)
    post_category_users.where(user: user).exists?
  end

  # @param [User] user
  def add_user(user)
    post_category_users.create(user: user)
  end

  # @param [User] user
  def remove_user(user)
    post_category_users.where(user: user).delete_all
  end

  # @param [Symbol] locale
  def url(locale = I18n.default_locale)
    prefix = locale.nil? || locale == I18n.default_locale ? '' : "/#{locale}"
    "#{prefix}/#{post_type.url_part}/#{long_slug}"
  end

  def text_for_link
    nav_text.blank? ? name : nav_text
  end

  private

  def generate_long_slug
    self.long_slug = parent.nil? ? slug : "#{parent.long_slug}_#{slug}"
  end

  def parent_matches_type
    return if parent.nil? || parent.post_type == post_type

    error = I18n.t('activerecord.errors.messages.mismatches_post_type')
    errors.add(:parent_id, error)
  end

  def parent_is_not_too_deep
    return if parent.nil? || parent.depth < post_type.category_depth

    error = I18n.t('activerecord.errors.models.post_category.attributes.parent_id.is_too_deep')
    errors.add(:parent_id, error)
  end
end