text:
package org.apache.xerces.dom;

import java.util.Vector;

import org.apache.xerces.dom3.as.ASAttributeDeclaration;
import org.apache.xerces.dom3.as.ASContentModel;
import org.apache.xerces.dom3.as.ASElementDeclaration;
import org.apache.xerces.dom3.as.ASEntityDeclaration;
import org.apache.xerces.dom3.as.ASModel;
import org.apache.xerces.dom3.as.ASNamedObjectMap;
import org.apache.xerces.dom3.as.ASNotationDeclaration;
import org.apache.xerces.dom3.as.ASObject;
import org.apache.xerces.dom3.as.ASObjectList;
import org.apache.xerces.dom3.as.DOMASException;
import org.apache.xerces.impl.xs.SchemaGrammar;
import org.w3c.dom.DOMException;

/**
 * To begin with, an abstract schema is a generic structure that could
 * contain both internal and external subsets. An ASModel is an
 * abstract object that could map to a DTD , an XML Schema , a database
 * schema, etc. An ASModel could represent either an internal
 * or an external subset; hence an abstract schema could be composed of an
 * ASModel representing the internal subset and an
 * ASModel representing the external subset. Note that the
 * ASModel representing the external subset could consult the
 * ASModel representing the internal subset. Furthermore, the
 * ASModel representing the internal subset could be set to
 * null by the setInternalAS method as a mechanism for
 * "removal". In addition, only one ASModel representing the
 * external subset can be specified as "active" and it is possible that none
 * are "active". Finally, the ASModel contains the factory
 * methods needed to create a various types of ASObjects like
 * ASElementDeclaration, ASAttributeDeclaration,
 * etc.
 *
See also the
 * Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.
 * @deprecated
 * @author Pavani Mukthipudi
 * @author Neil Graham
 * @version $Id$
 */
public class ASModelImpl implements ASModel {

    //
    // Data
    //
    boolean fNamespaceAware = true;

    // conceptually, an ASModel may contain grammar information and/or
    // other ASModels.  These two fields divide that function.
    protected Vector fASModels;
    protected SchemaGrammar fGrammar = null;

    //
    // Constructors
    //

    public ASModelImpl() {
    	fASModels = new Vector();
    }

    public ASModelImpl(boolean isNamespaceAware) {
    	fASModels = new Vector();
        fNamespaceAware = isNamespaceAware;
    }

    //
    // ASObject methods
    //

    /**
     * A code representing the underlying object as defined above.
     */
    public short getAsNodeType() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The ASModel object associated with this
     * ASObject. For a node of type AS_MODEL, this
     * is null.
     */
    public ASModel getOwnerASModel() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The ASModel object associated with this
     * ASObject. For a node of type AS_MODEL, this
     * is null.
     */
    public void setOwnerASModel(ASModel ownerASModel) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The name of this ASObject depending on the
     * ASObject type.
     */
    public String getNodeName() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The name of this ASObject depending on the
     * ASObject type.
     */
    public void setNodeName(String nodeName) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The namespace prefix of this node, or null if it is
     * unspecified.
     */
    public String getPrefix() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The namespace prefix of this node, or null if it is
     * unspecified.
     */
    public void setPrefix(String prefix) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Returns the local part of the qualified name of this
     * ASObject.
     */
    public String getLocalName() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Returns the local part of the qualified name of this
     * ASObject.
     */
    public void setLocalName(String localName) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The namespace URI of this node, or null if it is
     * unspecified.  defines how a namespace URI is attached to schema
     * components.
     */
    public String getNamespaceURI() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * The namespace URI of this node, or null if it is
     * unspecified.  defines how a namespace URI is attached to schema
     * components.
     */
    public void setNamespaceURI(String namespaceURI) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Creates a copy of this ASObject. See text for
     * cloneNode off of Node but substitute AS
     * functionality.
     * @param deep Setting the deep flag on, causes the whole
     *   subtree to be duplicated. Setting it to false only
     *   duplicates its immediate child nodes.
     * @return Cloned ASObject.
     */
    public ASObject cloneASObject(boolean deep) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    //
    // ASModel methods
    //

    /**
     * true if this ASModel defines the document
     * structure in terms of namespaces and local names ; false
     * if the document structure is defined only in terms of
     * QNames.
     */
    public boolean getIsNamespaceAware() {
    	return fNamespaceAware;
    }

    /**
     *  0 if used internally, 1 if used externally, 2 if not all. An exception
     * will be raised if it is incompatibly shared or in use as an internal
     * subset.
     */
    public short getUsageLocation() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     *  The URI reference.
     */
    public String getAsLocation() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     *  The URI reference.
     */
    public void setAsLocation(String asLocation) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     *  The hint to locating an ASModel.
     */
    public String getAsHint() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     *  The hint to locating an ASModel.
     */
    public void setAsHint(String asHint) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * If usage is EXTERNAL_SUBSET or NOT_USED, and the
     * ASModel is simply a container of other ASModels.
     */
    public boolean getContainer() {
    	return (fGrammar != null);
    }

    /**
     * Instead of returning an all-in-one ASObject with
     * ASModel methods, have discernible top-level/"global"
     * element declarations. If one attempts to add, set, or remove a node
     * type other than the intended one, a hierarchy exception (or
     * equivalent is thrown).
     */
    public ASNamedObjectMap getElementDeclarations() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Instead of returning an all-in-one ASObject with
     * ASModel methods, have discernible top-level/"global"
     * attribute declarations. If one attempts to add, set, or remove a node
     * type other than the intended one, a hierarchy exception (or
     * equivalent is thrown).
     */
    public ASNamedObjectMap getAttributeDeclarations() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Instead of returning an all-in-one ASObject with
     * ASModel methods, have discernible top-level/"global"
     * notation declarations. If one attempts to add, set, or remove a node
     * type other than the intended one, a hierarchy exception (or
     * equivalent is thrown).
     */
    public ASNamedObjectMap getNotationDeclarations() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Instead of returning an all-in-one ASObject with
     * ASModel methods, have discernible top-level/"global"
     * entity declarations. If one attempts to add, set, or remove a node
     * type other than the intended one, a hierarchy exception (or
     * equivalent is thrown).
     */
    public ASNamedObjectMap getEntityDeclarations() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Instead of returning an all-in-one ASObject with
     * ASModel methods, have discernible top-level/"global
     * content model declarations. If one attempts to add, set, or remove a
     * node type other than the intended one, a hierarchy exception (or
     * equivalent is thrown).
     */
    public ASNamedObjectMap getContentModelDeclarations() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * This method will allow the nesting or "importation" of ASModels.
     * @param abstractSchema ASModel to be set. Subsequent calls will nest
     *   the ASModels within the specified ownerASModel.
     */
    public void addASModel(ASModel abstractSchema) {
    	fASModels.addElement(abstractSchema);
    }

    /**
     * To retrieve a list of nested ASModels without reference to names.
     * @return A list of ASModels.
     */
    public ASObjectList getASModels() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Removes only the specified ASModel from the list of
     * ASModels.
     * @param as AS to be removed.
     */
    public void removeAS(ASModel as) {
    	fASModels.removeElement(as);
    }

    /**
     * Determines if an ASModel itself is valid, i.e., confirming
     * that it's well-formed and valid per its own formal grammar.
     * @return true if the ASModel is valid,
     *   false otherwise.
     */
    public boolean validate() {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Imports ASObject into ASModel.
     * @param asobject  ASObject to be imported.
     */
    public void importASObject(ASObject asobject) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Inserts ASObject into ASModel.
     * @param asobject  ASObject to be inserted.
     */
    public void insertASObject(ASObject asobject) {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Creates an element declaration for the element type specified.
     * @param namespaceURI The namespace URI of the element type
     *   being declared.
     * @param name The name of the element. The format of the name could be
     *   an NCName as defined by XML Namespaces or a Name as defined by XML
     *   1.0; it's ASModel-dependent.
     * @return A new ASElementDeclaration object with
     *   name attribute set to tagname and
     *   namespaceURI set to systemId. Other
     *   attributes of the element declaration are set through
     *   ASElementDeclaration interface methods.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
     *   illegal character.
     */
    public ASElementDeclaration createASElementDeclaration(String namespaceURI,
                                                           String name)
                                                           throws DOMException {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Creates an attribute declaration.
     * @param namespaceURI The namespace URI of the attribute being declared.
     * @param name The name of the attribute. The format of the name could be
     *   an NCName as defined by XML Namespaces or a Name as defined by XML
     *   1.0; it's ASModel-dependent.
     * @return A new ASAttributeDeclaration object with
     *   appropriate attributes set by input parameters.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the input name
     *   parameter contains an illegal character.
     */
    public ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI,
                                                               String name)
                                                               throws DOMException {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Creates a new notation declaration.
     * @param namespaceURI The namespace URI of the notation being declared.
     * @param name The name of the notation. The format of the name could be
     *   an NCName as defined by XML Namespaces or a Name as defined by XML
     *   1.0; it's ASModel-dependent.
     * @param systemId The system identifier for the notation declaration.
     * @param publicId The public identifier for the notation declaration.
     * @return A new ASNotationDeclaration object with
     *   notationName attribute set to name and
     *   publicId and systemId set to the
     *   corresponding fields.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
     *   illegal character.
     */
    public ASNotationDeclaration createASNotationDeclaration(String namespaceURI, String name,
                                                             String systemId, String publicId)
                                                             throws DOMException {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Creates an ASEntityDeclaration.
     * @param name The name of the entity being declared.
     * @return A new ASEntityDeclaration object with
     *   entityName attribute set to name.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
     *   illegal character.
     */
    public ASEntityDeclaration createASEntityDeclaration(String name)
                                                         throws DOMException {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    /**
     * Creates an object which describes part of an
     * ASElementDeclaration's content model.
     * @param minOccurs The minimum occurrence for the subModels of this
     *   ASContentModel.
     * @param maxOccurs The maximum occurrence for the subModels of this
     *   ASContentModel.
     * @param operator operator of type AS_CHOICE,
     *   AS_SEQUENCE, AS_ALL or
     *   AS_NONE.
     * @return A new ASContentModel object.
     * @exception DOMASException
     *   A DOMASException, e.g., minOccurs > maxOccurs.
     */
    public ASContentModel createASContentModel(int minOccurs, int maxOccurs,
                                               short operator) throws DOMASException {
        String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
    }

    // convenience methods
    public SchemaGrammar getGrammar() {
        return fGrammar;
    }
    public void setGrammar(SchemaGrammar grammar) {
        fGrammar = grammar;
    }

    public Vector getInternalASModels() {
        return fASModels;
    }

}


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Cryptany.Core.DPO.Configuration
{
	public class EntityAttributeConfigurationCollection : Dictionary<string, EntityAttributeConfiguration>
	{
	}

	public class EntityAttributeConfiguration
	{
		private string _name;
		private string _paramaters;

		public static EntityAttributeConfiguration Create(XmlNode node)
		{
			EntityAttributeConfiguration attribute = new EntityAttributeConfiguration();

			if ( node.Name != "Attribute" )
			{
				EntityConfigurationError err = new EntityConfigurationError(ErrorType.InvalidXmlDocument, "A start element expected");
				return null;
			}
			attribute._name = node.Attributes["name"].InnerXml;

			attribute._paramaters = node.Attributes["parameters"].InnerXml;

			return attribute;
		}

		private EntityAttributeConfiguration()
		{
		}

		public string Name
		{
			get
			{
				return _name;
			}
		}

		public string Paramaters
		{
			get
			{
				return _paramaters;
			}
		}

		//public string Compile()
		//{
		//    string code = "";
		//    code = "[" + Name;
		//    if ( Paramaters != null && Paramaters != "" )
		//        code += "(" + Paramaters + ")";
		//    code += "]";
		//    return code;
		//}
	}
}

redpajama_set_name: RedPajamaGithub


text:
int main() {
  using namespace Functions;

  static_assert(noexcept(genericPrintFunctionTwoArg<int>(0, 0)), "noexcept function");

  {
    int i = 2;
    genericPrintFunctionTwoArg(i, 3);
// CHECK:      X: 2
// CHECK-NEXT: Y: 3
  }

  {
    int8_t x = -1;
    genericPrintFunction(x);
// CHECK-NEXT: Int8 value=-1
  }

  {
    uint8_t x = 0xff;
    genericPrintFunction(x);
// CHECK-NEXT: UInt8 value=255
  }

  {
    int16_t x = -9856;
    genericPrintFunction(x);
// CHECK-NEXT: Int16 value=-9856
  }

  {
    uint16_t x = 3248;
    genericPrintFunction(x);
// CHECK-NEXT: UInt16 value=3248
  }

  {
    int32_t x = -0x12343;
    genericPrintFunction(x);
// CHECK-NEXT: Int32 value=-74563
  }

  {
    uint32_t x = 0xC0011334;
    genericPrintFunction(x);
// CHECK-NEXT: UInt32 value=3221295924
  }

  {
    int64_t x = -123456789123;
    genericPrintFunction(x);
// CHECK-NEXT: Int64 value=-123456789123
  }

  {
    uint64_t x = 0x12345678abcd1234;
    genericPrintFunction(x);
// CHECK-NEXT: UInt64 value=1311768467750064692
  }

  {
    float x = -54.0f;
    genericPrintFunction(x);
// CHECK-NEXT: Float value=-54.0
  }

  {
    double x = 1.25;
    genericPrintFunction(x);
// CHECK-NEXT: Double value=1.25
  }

  {
    bool x = true;
    genericPrintFunction(x);
// CHECK-NEXT: Bool value=true
  }

  {
    int i = 0;
    void *x = &i;
    genericPrintFunction(x);
// CHECK-NEXT: OpaquePointer value
  }

  {
    int i = 55;
    int j = 66;
    bool x = false;
    genericPrintFunctionMultiGeneric<int, bool>(-78, i, j, 45, x);
// CHECK-NEXT: Int32 value 1=55
// CHECK-NEXT: Int32 value 2=66
// CHECK-NEXT: Bool value 1=false
// CHECK-NEXT: other values=-78,45
  }

  {
    int x = 42;
    int y = -13;
    genericSwap(x, y);
    assert(x == -13);
    assert(y == 42);
  }

  {
    int x = 4;
    assert(genericRet(x) == 4);
  }

  {
    double x = -19.75;
    assert(genericRet(x) == -19.75);
  }

  {
    auto tc = createTestClass();
    genericPrintFunction(tc);
  }
// CHECK-NEXT: TestClass value=Functions.TestClass
// CHECK-NEXT: deinit TestClass

  {
    auto tc = createTestClass();
    auto tc2 = genericRet(tc);
    assert(swift::_impl::_impl_RefCountedClass::getOpaquePointer(tc) ==
           swift::_impl::_impl_RefCountedClass::getOpaquePointer(tc2));
    genericPrintFunction(tc2);
  }
// CHECK-NEXT: TestClass value=Functions.TestClass
// CHECK-NEXT: deinit TestClass

  {
    auto tc = createTestClass();
    auto tc2 = createTestClass();
    const auto p1 = swift::_impl::_impl_RefCountedClass::getOpaquePointer(tc);
    const auto p2 = swift::_impl::_impl_RefCountedClass::getOpaquePointer(tc2);
    assert(p1 != p2);
    genericSwap(tc, tc2);
    assert(p2 == swift::_impl::_impl_RefCountedClass::getOpaquePointer(tc));
    assert(p1 == swift::_impl::_impl_RefCountedClass::getOpaquePointer(tc2));
  }
// CHECK-NEXT: deinit TestClass
// CHECK-NEXT: deinit TestClass

  {
    auto x = createTestLargeStruct(0);
    genericPrintFunction(x);
  }
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: 0, x2: 1, x3: -1, x4: 0, x5: 2, x6: -2)

  {
    auto x = createTestLargeStruct(11);
    auto y = createTestLargeStruct(-9);
    genericPrintFunction(x);
    genericPrintFunction(y);
    genericSwap(x, y);
    genericPrintFunction(x);
    genericPrintFunction(y);
    auto xy = genericRet(x);
    genericPrintFunction(xy);
    xy.mut();
    genericPrintFunction(xy);
    genericPrintFunction(x);
  }
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: 11, x2: 12, x3: 10, x4: 11, x5: 13, x6: 9)
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: -9, x2: -8, x3: -10, x4: -9, x5: -7, x6: -11)
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: -9, x2: -8, x3: -10, x4: -9, x5: -7, x6: -11)
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: 11, x2: 12, x3: 10, x4: 11, x5: 13, x6: 9)
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: -9, x2: -8, x3: -10, x4: -9, x5: -7, x6: -11)
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: 9, x2: -8, x3: -10, x4: -9, x5: -7, x6: -7)
// CHECK-NEXT: TestLargeStruct value=TestLargeStruct(x1: -9, x2: -8, x3: -10, x4: -9, x5: -7, x6: -11)

  {
    auto x = createTestSmallStruct(45);
    auto y = createTestSmallStruct(0xFed1);
    genericPrintFunction(x);
    genericPrintFunction(y);
    genericSwap(y, x);
    genericPrintFunction(x);
    genericPrintFunction(y);
    auto xy = genericRet(x);
    genericPrintFunction(xy);
    xy.mut();
    genericPrintFunction(xy);
    genericPrintFunction(x);
  }
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 45)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 65233)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 65233)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 45)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 65233)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 4294902062)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 65233)
  {
    auto x = createTestSmallStruct(42);
    int passThru = x.genericMethodPassThrough((int)555);
    assert(passThru == 555);
    auto xprime = x.genericMethodPassThrough(x);
    genericPrintFunction(xprime);
    x.genericMethodMutTake((uint32_t)16);
    genericPrintFunction(xprime);
    genericPrintFunction(x);
    x.genericMethodMutTake(xprime);
    genericPrintFunction(xprime);
    genericPrintFunction(x);
  }
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 42)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 42)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 58)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 42)
// CHECK-NEXT: TestSmallStruct value=TestSmallStruct(x1: 57)
  return 0;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center_vertical"
    android:background="@drawable/item_selector"
    android:padding="12dip" >

    <FrameLayout
        android:id="@id/iv_profile_image_out"
        android:layout_width="@dimen/item_farm_head_width"
        android:layout_height="@dimen/item_farm_head_height"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true" >

        <ImageView
            android:id="@id/iv_profile_image"
            android:layout_width="@dimen/item_farm_head_width"
            android:layout_height="@dimen/item_farm_head_height"
            android:scaleType="fitXY"
            android:src="@drawable/default_farm_head" />

        <ImageView
            android:id="@id/iv_auth_enticate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|right"
            android:scaleType="fitXY"
            android:src="@drawable/auth_enticate"
            android:visibility="invisible" />
    </FrameLayout>

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="6dip"
        android:layout_toRightOf="@id/iv_profile_image_out"
        android:orientation="vertical"
        android:padding="10dip" >

        <TextView
            android:id="@id/tv_item_fram_name"
            style="@style/item_tv_title"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:singleLine="true" />

        <TextView
            android:id="@id/tv_item_farm_slogin"
            style="@style/item_tv_slogin"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:lineSpacingExtra="2sp"
            android:singleLine="true" />

	 <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center_vertical"
            android:orientation="horizontal" >

            <TextView
                android:id="@id/tv_item_update_time"
                style="@style/item_tv_slogin"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="2dip"
                android:layout_toRightOf="@id/iv_flag_time" />

            <ImageView
                android:id="@id/iv_flag_time"
                 android:layout_width="13dip"
                android:layout_height="13dip"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:background="@drawable/near_item_time_selector"/>

            <ImageView
                android:id="@id/iv_flag_photo"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dip"
                android:layout_centerVertical="true"
                android:layout_alignWithParentIfMissing="true"
                android:layout_toRightOf="@id/tv_item_update_time"
                android:background="@drawable/near_item_field_flag_image_selector"
                android:visibility="invisible" />

            <ImageView
                android:id="@id/iv_flag_coupon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dip"
                android:layout_centerVertical="true"
                android:layout_toRightOf="@id/iv_flag_photo"
                android:background="@drawable/near_item_coupon_selector"
                android:layout_alignWithParentIfMissing="true"
                android:visibility="visible" />

            <TextView
                android:id="@id/tv_item_farm_range"
                style="@style/item_tv_slogin"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true" />
        </RelativeLayout>
    </LinearLayout>

</RelativeLayout>


text:
import unittest

import chainer
from chainer.backends import cuda
from chainer import testing
from chainer.testing import attr

class TestUseCuDNN(unittest.TestCase):

    @attr.cudnn
    def test_valid_case_combination(self):
        with chainer.using_config('use_cudnn', 'always'):
            self.assertTrue(chainer.should_use_cudnn('==always'))
            self.assertTrue(chainer.should_use_cudnn('>=auto'))

        with chainer.using_config('use_cudnn', 'auto'):
            self.assertFalse(chainer.should_use_cudnn('==always'))
            self.assertTrue(chainer.should_use_cudnn('>=auto'))

        with chainer.using_config('use_cudnn', 'never'):
            self.assertFalse(chainer.should_use_cudnn('==always'))
            self.assertFalse(chainer.should_use_cudnn('>=auto'))

    @unittest.skip(not cuda.cudnn_enabled)
    def test_no_cudnn_available(self):
        with chainer.using_config('use_cudnn', 'always'):
            self.assertFalse(chainer.should_use_cudnn('==always'))
            self.assertFalse(chainer.should_use_cudnn('>=auto'))

    @attr.cudnn
    def test_invalid_level(self):
        self.assertRaises(ValueError, chainer.should_use_cudnn, '==auto')

    @attr.cudnn
    def test_invalid_config(self):
        with chainer.using_config('use_cudnn', True):
            self.assertRaises(ValueError, chainer.should_use_cudnn, '>=auto')

        with chainer.using_config('use_cudnn', False):
            self.assertRaises(ValueError, chainer.should_use_cudnn, '>=auto')

        with chainer.using_config('use_cudnn', 'on'):
            self.assertRaises(ValueError, chainer.should_use_cudnn, '>=auto')

    @attr.cudnn
    def test_higher_version_required(self):
        with chainer.using_config('use_cudnn', 'always'):
            self.assertFalse(chainer.should_use_cudnn(
                '>=auto', cuda.cuda.cudnn.getVersion() + 1))

testing.run_module(__name__, __file__)


text:
<?php
namespace Briz\Beam;

/**
 * Trait to implement Identity checking.
 */
trait IdentityTrait
{

    protected $identities = [];
    protected $idt_keyIndex = [];

    /**
     * add a new identity.
     *
     * this function can accept any number of arguments. you need to pass
     * minimum two arguments.
     * @param string $name The name of the identity in container
     * @param mixed $value value to be identified
     * @param mixed $value,... additional values
     * @throws \BadMethodCallException
     * @throws \InvalidArgumentException
     */
    public function addIdentity($name, $value)
    {
        $identifiers = $this->container->get('id');
        $arg_list = func_get_args();

        if (empty($arg_list)) {
            throw new \BadMethodCallException("No key specified");
        }
        if (func_num_args() < 2) {
            throw new \BadMethodCallException("Minimum number of arguments for an identity check is 2");
        }
        if (!$identifiers->has($name)) {
            throw new \InvalidArgumentException(sprintf(
                    "The key `%s` is not set as idetity.You need to set it first", $name));
        }

        $identity = $identifiers->get($name);

        if (!isset($this->identities[$name])) {
            $this->identities[$name] = $identity;
            $this->idt_keyIndex[$name] = [];
        }
        if (!in_array($value, $this->idt_keyIndex[$name], true)) {
            $this->idt_keyIndex[$name][] = $value;
        }
        //change identity name to component name for convienience
        $arg_list[0] = __CLASS__;

        call_user_func_array(array($identity, 'addIdentity'), $arg_list);
    }

    /**
     * Remove an added Identity.
     *
     * @param string $name name of the identity
     * @param mixed $key the second argument passed when an idenity was added
     */
    public function removeIdentity($name, $key)
    {
        $identifiers = $this->container->get('id');
        $identity = $identifiers->get($name);
        $identity->removeIdentity(__CLASS__, $key);
        if (isset($this->idt_keyIndex[$name])) {
            $position = array_search($key, $this->idt_keyIndex[$name]);
            unset($this->idt_keyIndex[$name][$position]);
            if (empty($this->idt_keyIndex[$name])) {
                unset($this->identities[$name]);
                unset($this->idt_keyIndex[$name]);
            }
        }
    }

    /**
     * Remove all identity.
     *
     * if a name is specified it will only remove all identities under that name
     * @param string|null $name optional name
     */
    public function removeAllIdentity($name = null)
    {
        if (null === $name) {
            foreach ($this->identities as $identity) {
                $identity->removeComponent(__CLASS__);
                $this->identities = [];
                $this->idt_keyIndex = [];
            }
        } else {
            $identifiers = $this->container->get('id');
            $identity = $identifiers->get($name);
            $identity->removeComponent(__CLASS__);
            unset($this->identities[$name]);
            unset($this->idt_keyIndex[$name]);
        }
    }

    /**
     * check if all added identities matches.
     *
     * @return bool
     */
    public function identifyAll()
    {
        foreach ($this->identities as $identity) {
            if (!$identity->checkByComponent(__CLASS__)) {
                return false;
            }
        }
        return true;
    }

    /**
     * Identify by name.
     *
     * identifies everything under a name if no key is specified
     * otherwise check for identity matched by key
     * @param string $name name of the identity
     * @param mixed|null $key second parameter when added Identity
     * @return bool
     */
    public function identifyByName($name, $key = null)
    {
        $identifiers = $this->container->get('id');
        $identity = $identifiers->get($name);
        if (null === $identity) {
            return true;
        }
        if (null === $key) {
            return $identity->checkByComponent(__CLASS__);
        } else {
            return $identity->checkByKey(__CLASS__, $key);
        }
    }
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

var _ = require('lodash');

exports.default = {
  test: function test() {
    return true;
  },
  toUnderscored: function toUnderscored(obj) {
    _.forEach(obj, function (k, v) {
      obj[k] = v.replace(/(?:^|\.?)([A-Z])/g, function (x, y) {
        return "_" + y.toLowerCase();
      }).replace(/^_/, "");
    });
    return obj;
  }
};
module.exports = exports['default'];


text:
'use strict';
var express = require('express');
var signupRouter = express.Router();
var _ = require('lodash');

var routes = function (User) {
    var signupController = require('./../../controllers/signupController')(User);
    signupRouter.route('/')
            .post(signupController.saveUser);
    return signupRouter;
};

module.exports = routes;


text:
layout: attachment
title: boomerang_tag_cloud
date: 2015-05-20 08:44:37.000000000 +01:00
categories: []
tags: []
status: inherit
type: attachment
published: false
meta:
  _wp_attachment_image_alt: Tag cloud image
author:
  login: garfieldmoore
  email: garfieldmoore@gmail.com
  display_name: Garfield Moore
  first_name: ''
  last_name: ''
excerpt: !ruby/object:Hpricot::Doc
  options: {}
---


text:
/* This checks .  */

#include "defines.h"
#include "macros.h"

int
main (void)
{
  /* Integral types.  */
  run_signed_tests3(check_array_size_and_align, char, TYPE_SIZE_CHAR, TYPE_ALIGN_CHAR);
  run_signed_tests3(check_array_size_and_align, short, TYPE_SIZE_SHORT, TYPE_ALIGN_SHORT);
  run_signed_tests3(check_array_size_and_align, int, TYPE_SIZE_INT, TYPE_ALIGN_INT);
  run_signed_tests3(check_array_size_and_align, long, TYPE_SIZE_LONG, TYPE_ALIGN_LONG);
  run_signed_tests3(check_array_size_and_align, long long, TYPE_SIZE_LONG_LONG, TYPE_ALIGN_LONG_LONG);
#ifdef CHECK_INT128
  run_signed_tests3(check_array_size_and_align, __int128, TYPE_SIZE_INT128, TYPE_ALIGN_INT128);
#endif
  check_array_size_and_align(enum dummytype, TYPE_SIZE_ENUM, TYPE_ALIGN_ENUM);

  /* Floating point types.  */
  check_array_size_and_align(float, TYPE_SIZE_FLOAT, TYPE_ALIGN_FLOAT);
  check_array_size_and_align(double, TYPE_SIZE_DOUBLE, TYPE_ALIGN_DOUBLE);
#ifdef CHECK_LONG_DOUBLE
  check_array_size_and_align(long double, TYPE_SIZE_LONG_DOUBLE, TYPE_ALIGN_LONG_DOUBLE);
#endif
#ifdef CHECK_FLOAT128
  check_array_size_and_align(__float128, TYPE_SIZE_FLOAT128, TYPE_ALIGN_FLOAT128);
#endif

  /* Packed types - MMX, 3DNow!, SSE and SSE2.  */
#ifdef CHECK_M64_M128
  check_array_size_and_align(__m64, TYPE_SIZE_M64, TYPE_ALIGN_M64);
  check_array_size_and_align(__m128, TYPE_SIZE_M128, TYPE_ALIGN_M128);
#endif

  /* Pointer types. The function pointer doesn't work with these macros.  */
  check_array_size_and_align(void *, TYPE_SIZE_POINTER, TYPE_ALIGN_POINTER);

  return 0;
}


text:
START_ATF_NAMESPACE
    struct _off_part_request_clzo
    {
        _STORAGE_POS_INDIV Item;
    };
END_ATF_NAMESPACE


text:
package buildutil_test

import (
	"go/build"
	"os"
	"path/filepath"
	"runtime"
	"testing"

	"code.google.com/p/go.tools/go/buildutil"
)

func TestContainingPackage(t *testing.T) {
	// unvirtualized:
	goroot := runtime.GOROOT()
	gopath := filepath.SplitList(os.Getenv("GOPATH"))[0]

	for _, test := range [][2]string{
		{goroot + "/src/fmt/print.go", "fmt"},
		{goroot + "/src/encoding/json/foo.go", "encoding/json"},
		{goroot + "/src/encoding/missing/foo.go", "(not found)"},
		{gopath + "/src/code.google.com/p/go.tools/go/buildutil/util_test.go",
			"code.google.com/p/go.tools/go/buildutil"},
	} {
		file, want := test[0], test[1]
		bp, err := buildutil.ContainingPackage(&build.Default, ".", file)
		got := bp.ImportPath
		if err != nil {
			got = "(not found)"
		}
		if got != want {
			t.Errorf("ContainingPackage(%q) = %s, want %s", file, got, want)
		}
	}

	// TODO(adonovan): test on virtualized GOPATH too.
}