text:
using System;
using System.Collections;
using System.Data;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml;
using System.Collections.Generic;

namespace Hydra.Framework.Conversions
{
    //
    // **********************************************************************
    /// <summary>
    /// Class for load data from text file into DataTable.
    /// </summary>
    // **********************************************************************
    //
    public class ConvertTextFileLoader
    {
        #region Member Variables
        //
        // **********************************************************************
        /// <summary>
        /// Data File StateName
        /// </summary>
        // **********************************************************************
        //
        protected string m_DataFileName = null;

        //
        // **********************************************************************
        /// <summary>
        /// File Format
        /// </summary>
        // **********************************************************************
        //
        protected NxFileFormat m_FileFormat = NxFileFormat.Delimited;

        //
        // **********************************************************************
        /// <summary>
        /// Separator
        /// </summary>
        // **********************************************************************
        //
        protected string m_Separator = ",";

        //
        // **********************************************************************
        /// <summary>
        /// Text Qualifier
        /// </summary>
        // **********************************************************************
        //
        protected char m_TextQualifier = '\"';

        //
        // **********************************************************************
        /// <summary>
        /// First Row has Column Names
        /// </summary>
        // **********************************************************************
        //
        protected bool m_IsFirstRowHasColumnNames = false;
        /// <summary>
        /// Decimal Separator
        /// </summary>
        protected char m_DecimalSeparator = '.';

        //
        // **********************************************************************
        /// <summary>
        /// List of Source Columns
        /// </summary>
        // **********************************************************************
        //
        protected ArrayList m_SourceColumnList = new ArrayList();

        //
        // **********************************************************************
        /// <summary>
        /// Source Column Hashmap
        /// </summary>
        // **********************************************************************
        //
        protected Hashtable m_SourceColumnMap = new Hashtable();

        //
        // **********************************************************************
        /// <summary>
        /// Target Column List
        /// </summary>
        // **********************************************************************
        //
        protected ArrayList m_TargetColumnList = new ArrayList();

        //
        // **********************************************************************
        /// <summary>
        /// Target Column Hashmap
        /// </summary>
        // **********************************************************************
        //
        protected Hashtable m_TargetColumnMap = new Hashtable();

        //
        // **********************************************************************
        /// <summary>
        /// Source Table
        /// </summary>
        // **********************************************************************
        //
        protected DataTable m_SourceTable = new DataTable();

        //
        // **********************************************************************
        /// <summary>
        /// Target Table
        /// </summary>
        // **********************************************************************
        //
        protected DataTable m_TargetTable = new DataTable();

        //
        // **********************************************************************
        /// <summary>
        /// CSV Content
        /// </summary>
        // **********************************************************************
        //
        private string m_CsvContent;
        #endregion

        #region Constructors
        //
        // **********************************************************************
        /// <summary>
        /// Initializes a new instance of the <see cref="ConvertTextFileLoader"/> class.
        /// </summary>
        /// <param name="dataFileName">StateName of the data file.</param>
        /// <param name="xmlDescFileName">StateName of the XML desc file.</param>
        // **********************************************************************
        //
        public ConvertTextFileLoader(string dataFileName, string xmlDescFileName)
        {
            m_DataFileName = dataFileName;
            LoadXmlDescription(ConvertXml.LoadDocument(xmlDescFileName));
        }

        //
        // **********************************************************************
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="dataFileName">StateName of the data file.</param>
        /// <param name="xmlDoc">The XML doc.</param>
        // **********************************************************************
        //
        public ConvertTextFileLoader(string dataFileName, XmlDocument xmlDoc)
        {
            m_DataFileName = dataFileName;
            LoadXmlDescription(xmlDoc);
        }

        //
        // **********************************************************************
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="xmlDoc">The XML doc.</param>
        // **********************************************************************
        //
        public ConvertTextFileLoader(XmlDocument xmlDoc)
        {
            LoadXmlDescription(xmlDoc);
        }
        #endregion

        #region Properties
        //
        // **********************************************************************
        /// <summary>
        /// Gets the content of the CSV.
        /// </summary>
        /// <value>The content of the CSV.</value>
        // **********************************************************************
        //
        public string CsvContent
        {
            get
            {
                return m_CsvContent;
            }
        }

        //
        // **********************************************************************
        /// <summary>
        /// Gets or sets data file name.
        /// </summary>
        /// <value>The name of the data file.</value>
        // **********************************************************************
        //
        public string DataFileName
        {
            get
            {
                return m_DataFileName;
            }
            set
            {
                m_DataFileName = value;
            }
        }

        //
        // **********************************************************************
        /// <summary>
        /// Gets or sets data file format.
        /// </summary>
        /// <value>The file format.</value>
        // **********************************************************************
        //
        public NxFileFormat FileFormat
        {
            get
            {
                return m_FileFormat;
            }
            set
            {
                m_FileFormat = value;
            }
        }

        //
        // **********************************************************************
        /// <summary>
        /// Gets or sets field separator.
        /// </summary>
        /// <value>The separator.</value>
        // **********************************************************************
        //
        public string Separator
        {
            get
            {
                return m_Separator;
            }
            set
            {
                m_Separator = value;
            }
        }

        //
        // **********************************************************************
        /// <summary>
        /// Gets or sets field text qualifier.
        /// </summary>
        /// <value>The text qualifier.</value>
        // **********************************************************************
        //
        public char TextQualifier
        {
            get
            {
                return m_TextQualifier;
            }
            set
            {
                m_TextQualifier = value;
            }
        }

        //
        // **********************************************************************
        /// <summary>
        /// True if first row should contain column names.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is first row has column names; otherwise, <c>false</c>.
        /// </value>
        // **********************************************************************
        //
        public bool IsFirstRowHasColumnNames
        {
            get
            {
                return m_IsFirstRowHasColumnNames;
            }
            set
            {
                m_IsFirstRowHasColumnNames = value;
            }
        }

        //
        // **********************************************************************
        /// <summary>
        /// Gets or sets decimal separator.
        /// </summary>
        /// <value>The decimal separator.</value>
        // **********************************************************************
        //
        public char DecimalSeparator
        {
            get
            {
                return m_DecimalSeparator;
            }
            set
            {
                m_DecimalSeparator = value;
            }
        }
        #endregion

        #region Protected / Internal Methods
        //
        // **********************************************************************
        /// <summary>
        /// Loads file description from the XML document.
        /// </summary>
        /// <param name="xmlDoc">The XML doc.</param>
        // **********************************************************************
        //
        protected void LoadXmlDescription(XmlDocument xmlDoc)
        {
            if (xmlDoc != null &&
                xmlDoc.DocumentElement != null)
            {
                XmlElement rootElement = xmlDoc.DocumentElement;

                m_FileFormat = ConvertEnum.Parse<NxFileFormat>(ConvertXml.GetAttr(rootElement, "format"), NxFileFormat.Delimited);

                m_Separator = ConvertXml.GetAttr(rootElement, "separator");

                string textQualifier = ConvertXml.GetAttr(rootElement, "text_qualifier");
                m_TextQualifier = ConvertUtils.NotEmpty(textQualifier) ? textQualifier[0] : '\x0';

                m_IsFirstRowHasColumnNames = ConvertBool.Parse(ConvertXml.GetAttr(rootElement, "first_row_has_column_names"));

                string decimalSeparator = ConvertXml.GetAttr(rootElement, "decimal_separator");
                m_DecimalSeparator = ConvertUtils.NotEmpty(decimalSeparator) ? decimalSeparator[0] : '.';

                XmlElement columnsElement = (XmlElement)rootElement.SelectSingleNode("columns");
                if (columnsElement != null)
                {
                    foreach (XmlElement element in columnsElement.SelectNodes("column"))
                    {
                        ColumnDescription columnDesc = new ColumnDescription(element);
                        m_SourceColumnList.Add(columnDesc);
                        m_SourceColumnMap.Add(columnDesc.Name, columnDesc);
                    }
                }

                XmlElement targetColumnsElement = (XmlElement)rootElement.SelectSingleNode("target_columns");
                if (targetColumnsElement != null)
                {
                    foreach (XmlElement element in targetColumnsElement.SelectNodes("column"))
                    {
                        ColumnDescription columnDesc = new ColumnDescription(element);
                        m_TargetColumnList.Add(columnDesc);
                        m_TargetColumnMap.Add(columnDesc.Name, columnDesc);
                    }
                }
            }
        }

        //
        // **********************************************************************
        /// <summary>
        /// Returns line data splitted to text values of columns.
        /// </summary>
        /// <param name="line">The line.</param>
        /// <returns></returns>
        // **********************************************************************
        //
        protected string[] GetSplittedLineData(string line)
        {
            if (ConvertUtils.NotEmpty(line))
            {
                IList<string> list = null;

                if (m_FileFormat == NxFileFormat.Delimited)
                {
                    list = ConvertText.DecomposeWithSeparator(line, m_Separator, m_TextQualifier);
                }
                else if (m_FileFormat == NxFileFormat.Fixed)
                {
                    list = new List<string>();
                    int currentIndex = 0;
                    foreach (ColumnDescription columnDesc in m_SourceColumnList)
                    {
                        string s = null;
                        if (columnDesc.FixedSize > 0 &&
                            currentIndex + columnDesc.FixedSize <= line.Length)
                            s = line.Substring(currentIndex, columnDesc.FixedSize);

                        if (s != null)
                            list.Add(s.Trim());

                        currentIndex += columnDesc.FixedSize;
                    }
                }

                if (list != null)
                {
                    string[] array = new string[list.Count];
                    list.CopyTo(array, 0);
                    return array;
                }
            }

            return null;
        }

        //
        // **********************************************************************
        /// <summary>
        /// Returns pre-processed line value.
        /// Strips special characters from the line.
        /// </summary>
        /// <param name="line">The line.</param>
        /// <returns></returns>
        // **********************************************************************
        //
        protected string GetPreProcessedLine(string line)
        {
            if (ConvertUtils.NotEmpty(line))
            {
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < line.Length; i++)
                {
                    char ch = line[i];
                    if (ch >= 32 ||
                        char.IsWhiteSpace(ch))
                        sb.Append(line[i]);
                }

                return sb.ToString().Trim();
            }

            return null;
        }

        //
        // **********************************************************************
        /// <summary>
        /// Returns pre-processed text value.
        /// </summary>
        /// <param name="columnDesc">The column desc.</param>
        /// <param name="textValue">The text value.</param>
        /// <returns></returns>
        // **********************************************************************
        //
        protected string GetPreProcessedTextValue(ColumnDescription columnDesc, string textValue)
        {
            if (ConvertUtils.NotEmpty(textValue))
            {
                if (ConvertType.IsNumber(columnDesc.DataType))
                    return textValue.Replace(new String(m_DecimalSeparator, 1), NumberFormatInfo.InvariantInfo.CurrencyDecimalSeparator);
            }

            return textValue;
        }
        #endregion

        #region Public Methods
        //
        // **********************************************************************
        /// <summary>
        /// Reads the full CSV line from the reader, taking into account any possible
        /// caret returns inside it.
        /// </summary>
        /// <param name="reader">the reader to read by</param>
        /// <returns>the full line read</returns>
        // **********************************************************************
        //
        public string ReadFullLine(StreamReader reader)
        {
            string line = reader.ReadLine();

            while (ConvertText.CalcEntriesAmount(line, "\"") % 2 == 1)
                line += Environment.NewLine + reader.ReadLine();

            return line;
        }

        //
        // **********************************************************************
        /// <summary>
        /// Loads data from text file into the data table.
        /// </summary>
        /// <param name="csvContent">Content of the CSV.</param>
        /// <returns></returns>
        // **********************************************************************
        //
        public DataTable LoadData(string csvContent)
        {
            m_CsvContent = csvContent;
            return LoadData();
        }

        //
        // **********************************************************************
        /// <summary>
        /// Loads data from text file into the data table.
        /// </summary>
        /// <returns></returns>
        // **********************************************************************
        //
        public DataTable LoadData()
        {
            m_SourceTable.Clear();
            m_SourceTable.Columns.Clear();
            m_TargetTable.Clear();
            m_TargetTable.Columns.Clear();

            foreach (ColumnDescription columnDesc in m_SourceColumnList)
                m_SourceTable.Columns.Add(columnDesc.Name, columnDesc.DataType);

            foreach (ColumnDescription columnDesc in m_TargetColumnList)
                m_TargetTable.Columns.Add(columnDesc.Name, columnDesc.DataType);

            //
            // Read source file into the source data table.
            //
            StreamReader reader;
            if (CsvContent == null)
                reader = File.OpenText(m_DataFileName);
            else
            {
                MemoryStream ms = new MemoryStream();
                byte[] csvBytes = Encoding.UTF8.GetBytes(CsvContent);
                ms.Write(csvBytes, 0, csvBytes.Length);
                ms.Position = 0;
                reader = new StreamReader(ms);
            }
            try
            {
                Hashtable columnNameMap = null;
                int lineIndex = 0;
                string line = ReadFullLine(reader);
                while (line != null)
                {
                    line = GetPreProcessedLine(line);
                    if (lineIndex == 0 && m_IsFirstRowHasColumnNames)
                    {
                        //
                        // Get column names map from the first line
                        //
                        string[] names = GetSplittedLineData(line);
                        if (names != null && names.Length > 0)
                        {
                            columnNameMap = new Hashtable();
                            for (int i = 0; i < names.Length; i++)
                                columnNameMap[names[i]] = i;
                        }
                    }
                    else
                    {
                        //
                        // Read values from the text line
                        //
                        string[] values = GetSplittedLineData(line);
                        if (values != null && values.Length > 0)
                        {
                            DataRow dr = m_SourceTable.NewRow();
                            for (int i = 0; i < m_SourceTable.Columns.Count; i++)
                            {
                                DataColumn dc = m_SourceTable.Columns[i];
                                int valueIndex = i;
                                if (columnNameMap != null)
                                    valueIndex = ConvertInt.Parse(columnNameMap[dc.ColumnName], -1);

                                if (valueIndex >= 0 && valueIndex < values.Length)
                                {
                                    ColumnDescription columnDesc = (ColumnDescription)m_SourceColumnMap[dc.ColumnName];
                                    if (columnDesc != null)
                                    {
                                        string textValue = GetPreProcessedTextValue(columnDesc, values[valueIndex]);
                                        dr[dc] = columnDesc.GetDataValue(textValue);
                                    }
                                }
                            }

                            m_SourceTable.Rows.Add(dr);
                        }
                    }

                    lineIndex++;
                    line = ReadFullLine(reader);
                }
            }
            finally
            {
                reader.Close();
            }

            if (m_SourceTable.Columns.Count > 0)
            {
                if (m_TargetTable.Columns.Count > 0)
                {
                    //
                    // Map from source data table to the target data table
                    //
                    foreach (DataRow sourceRow in m_SourceTable.Rows)
                    {
                        DataRow targetRow = m_TargetTable.NewRow();
                        foreach (DataColumn targetColumn in m_TargetTable.Columns)
                        {
                            ColumnDescription columnDesc = (ColumnDescription)m_TargetColumnMap[targetColumn.ColumnName];
                            if (columnDesc != null && ConvertUtils.NotEmpty(columnDesc.SourceColumnName))
                            {
                                int sourceIndex = m_SourceTable.Columns.IndexOf(columnDesc.SourceColumnName);
                                if (sourceIndex >= 0)
                                    targetRow[targetColumn] = sourceRow[sourceIndex];
                            }
                        }

                        m_TargetTable.Rows.Add(targetRow);
                    }

                    return m_TargetTable;
                }
                else
                {
                    return m_SourceTable;
                }
            }

            return null;
        }
        #endregion
    }
}


text:
public class Bike {

	/** instance variables*/
	private String color;
	private int price;
	private int size;

	/** new bike with Color and Size*/
public Bike (String color, int size){
this.color = color;
this.size = size;
}
/** constructer */
public Bike (String color, int size, int price){
this.color= color;
this.size = size;
this.price = price;

/**
 *1. Boolean testing whether the color is one of my chosen ones in my MY_COLORS constants.
 *If it's not, set it to the value "Default pink".
 *2. If-statement, testing whether the size and price is within the set values MIN and MAX, if not
 * set the value to 2.
 */
boolean acceptedColor = false;
for (int i = 0; i < Constans.MY_COLORS.length; i++) {
	if (Constans.MY_COLORS[i].equals(color)) {
		acceptedColor = true;
	}
}

if (acceptedColor == true) {
	this.color = color;
} else {
	this.color = "Default Pink";
}

if (size >= Constans.MIN_SIZE && size <= Constans.MAX_SIZE){
	this.size = size;
} else {
	this.size = 0;
}

if (price >= Constans.MIN_PRICE && price <= Constans.MAX_PRICE){
	this.price = price;
} else {
	this.price = 0;
}
}

/** returns the color*/
public String getColor(){
	return this.color;
}

/**returns the size */
public int getSize() {
	return this.size;
}

/**returns the price */
public int getPrice() {
	return this.price;
}

}

redpajama_set_name: RedPajamaGithub


text:
/**
 * @file T6Model.cpp
 * @brief Contains the implementation of class T6Model.
 * $Id$
 */

// This module
#include "T6Model.h"
// This library
#include "core/tgBasicActuator.h"
#include "core/tgRod.h"
#include "core/abstractMarker.h"
#include "tgcreator/tgBuildSpec.h"
#include "tgcreator/tgBasicActuatorInfo.h"
#include "tgcreator/tgRodInfo.h"
#include "tgcreator/tgStructure.h"
#include "tgcreator/tgStructureInfo.h"
// The Bullet Physics library
#include "LinearMath/btVector3.h"
// The C++ Standard Library
#include <stdexcept>

/*
 * helper arrays for node and rod numbering schema
 */
/*returns the number of the rod for a given node */
const int rodNumbersPerNode[13]={0,0,1,1,2,2,3,3,4,4,5,5,6};

/*returns the node that is at the other end of the given node */
const int otherEndOfTheRod[13]={6,7,8,4,3,11,0,1,2,10,9,5,12};

/*returns the node that is at the parallel rod
 * and at the same end of the given node
 */
const int parallelNode[13]={1,0,5,9,10,2,7,6,11,3,4,8,12};

namespace
{
    // Note: This current model of the SUPERball rod is 1.5m long by 4.5cm (0.045m) radius,
    // which is 1.684m*pi*(0.040m)^2 = 0.008545132m^3.
    // For SUPERball v1.5, mass = 3.5kg per strut, which density [kg/m^3] comes out to:
    // density = 3.45kg/0.008545132m^3 = 403.738642402kg/m^3 = 0.403738642402 kg/dm^3

    // see tgBaseString.h for a descripton of some of these rod parameters
    // (specifically, those related to the motor moving the strings.)
    // NOTE that any parameter that depends on units of length will scale
    // with the current gravity scaling. E.g., with gravity as 98.1
    // Thus,
    // Rod Length = 17.00
    // Rod Radius = 0.40
    // density = 0.40374 (length is cubed, so decimal moves 3 places)

    // similarly, frictional parameters are for the tgRod objects.
    const struct Config
    {
        double density;
        double radius;
        double stiffness_passive;
        double stiffness_active;
        double damping;
        double rod_length;
        double rod_space;
        double friction;
        double rollFriction;
        double restitution;
        double pretension;
        bool   hist;
        double maxTens;
        double targetVelocity;
    } c =
   {
	 0.40374,   // density (kg / length^3)
     0.40,      // radius (length)
     998.25,    // stiffness_passive (kg / sec^2)
     3152.36,   // stiffness_active (kg / sec^2)
     50.0,      // damping (kg / sec)
     17.00,     // rod_length (length)
     17.00/4,   // rod_space (length)
     0.99,      // friction (unitless)
     0.01,      // rollFriction (unitless)
     0.0,       // restitution (?)
     0.0,         // pretension (force)
     true,		// History logging (boolean)
     100000,    // maxTens
     10000     // targetVelocity
#if (0)
     20000      // maxAcc
#endif
  };
} // namespace

T6Model::T6Model() : tgModel()
{
}

T6Model::~T6Model()
{
}

void T6Model::addNodes(tgStructure& s)
{
    const double half_length = c.rod_length / 2;

    nodePositions.push_back(btVector3(-c.rod_space,  -half_length, 0));            // 0
    nodePositions.push_back(btVector3(-c.rod_space,   half_length, 0));            // 1
    nodePositions.push_back(btVector3( c.rod_space,  -half_length, 0));            // 2
    nodePositions.push_back(btVector3( c.rod_space,   half_length, 0));            // 3
    nodePositions.push_back(btVector3(0,           -c.rod_space,   -half_length)); // 4
    nodePositions.push_back(btVector3(0,           -c.rod_space,    half_length)); // 5
    nodePositions.push_back(btVector3(0,            c.rod_space,   -half_length)); // 6
    nodePositions.push_back(btVector3(0,            c.rod_space,    half_length)); // 7
    nodePositions.push_back(btVector3(-half_length, 0,            c.rod_space));   // 8
    nodePositions.push_back(btVector3( half_length, 0,            c.rod_space));   // 9
    nodePositions.push_back(btVector3(-half_length, 0,           -c.rod_space));   // 10
    nodePositions.push_back(btVector3( half_length, 0,           -c.rod_space));   // 11

    for(int i=0;i<nodePositions.size();i++)
	{
		s.addNode(nodePositions[i][0],nodePositions[i][1],nodePositions[i][2]);
	}
}

void T6Model::addRods(tgStructure& s)
{
    s.addPair( 0,  1, "rod");
    s.addPair( 2,  3, "rod");
    s.addPair( 4,  5, "rod");
    s.addPair( 6,  7, "rod");
    s.addPair( 8,  9, "rod");
    s.addPair(10, 11, "rod");
}

void T6Model::addMarkers(tgStructure &s) {
    const int nNodes = 12; // 2*nRods
    std::vector <tgRod*> rods=find<tgRod>("rod");

    for(int i=0;i<nNodes;i++) {
        const btRigidBody* bt = rods[rodNumbersPerNode[i]]->getPRigidBody();
        btTransform inverseTransform = bt->getWorldTransform().inverse();
        btVector3 pos = inverseTransform * (nodePositions[i]);
        abstractMarker tmp=abstractMarker(bt,pos,btVector3(0.08*i,1.0 - 0.08*i,.0),i);
        this->addMarker(tmp);
    }
}

void T6Model::addMuscles(tgStructure& s)
{
	// Added ability to have two muscles in a structure.
	// Configuration currently is random, at the moment [27 June 2014]
    s.addPair(0, 4,  "muscle_active");
    s.addPair(0, 5,  "muscle_passive");
    s.addPair(0, 8,  "muscle_active");
    s.addPair(0, 10, "muscle_passive");

    s.addPair(1, 6,  "muscle_active");
    s.addPair(1, 7,  "muscle_passive");
    s.addPair(1, 8,  "muscle_passive");
    s.addPair(1, 10, "muscle_active");

    s.addPair(2, 4,  "muscle_passive");
    s.addPair(2, 5,  "muscle_active");
    s.addPair(2, 9,  "muscle_active");
    s.addPair(2, 11, "muscle_passive");

    s.addPair(3, 7,  "muscle_active");
    s.addPair(3, 6,  "muscle_passive");
    s.addPair(3, 9,  "muscle_passive");
    s.addPair(3, 11, "muscle_active");

    s.addPair(4, 10, "muscle_active");
    s.addPair(4, 11, "muscle_passive");

    s.addPair(5, 8,  "muscle_active");
    s.addPair(5, 9,  "muscle_passive");

    s.addPair(6, 10, "muscle_passive");
    s.addPair(6, 11, "muscle_active");

    s.addPair(7, 8,  "muscle_passive");
    s.addPair(7, 9,  "muscle_active");

}

void T6Model::setup(tgWorld& world)
{

    const tgRod::Config rodConfig(c.radius, c.density, c.friction,
				c.rollFriction, c.restitution);

    tgBasicActuator::Config muscleConfig_passive(c.stiffness_passive, c.damping, c.pretension, c.hist,
					    c.maxTens, c.targetVelocity);

    tgBasicActuator::Config muscleConfig_active(c.stiffness_active, c.damping, c.pretension, c.hist,
    					    c.maxTens, c.targetVelocity);

    // Start creating the structure
    tgStructure s;
    addNodes(s);
    addRods(s);
    addMuscles(s);
    s.move(btVector3(0, 10, 0));

    // Add a rotation. This is needed if the ground slopes too much,
    // otherwise  glitches put a rod below the ground.
    btVector3 rotationPoint = btVector3(0, 0, 0); // origin
    btVector3 rotationAxis = btVector3(0, 1, 0);  // y-axis
    double rotationAngle = M_PI/2;
    s.addRotation(rotationPoint, rotationAxis, rotationAngle);

    // Create the build spec that uses tags to turn the structure into a real model
    tgBuildSpec spec;
    spec.addBuilder("rod", new tgRodInfo(rodConfig));
    spec.addBuilder("muscle_passive", new tgBasicActuatorInfo(muscleConfig_passive));
    spec.addBuilder("muscle_active", new tgBasicActuatorInfo(muscleConfig_active));

    // Create your structureInfo
    tgStructureInfo structureInfo(s, spec);

    // Use the structureInfo to build ourselves
    structureInfo.buildInto(*this, world);

    // We could now use tgCast::filter or similar to pull out the
    // models (e.g. muscles) that we want to control.
    allMuscles = tgCast::filter<tgModel, tgBasicActuator> (getDescendants());
    // Not really sure how to use the find() function in tgModel.h
    passiveMuscles = tgCast::find<tgModel, tgBasicActuator>(tgTagSearch("muscle_passive"), getDescendants());
    activeMuscles = tgCast::find<tgModel, tgBasicActuator>(tgTagSearch("muscle_active"), getDescendants());

    // call the onSetup methods of all observed things e.g. controllers
    notifySetup();

    // Actually setup the children
    tgModel::setup(world);

    //map the rods and add the markers to them
	addMarkers(s);

	btVector3 location(0.0,28.0,0); // Start above ground (positive y)
	btVector3 rotation(0.0,0.6,0.8);
	btVector3 speed(0,0,0);
	this->moveModel(location,rotation,speed);
}

void T6Model::step(double dt)
{
    // Precondition
    if (dt <= 0.0)
    {
        throw std::invalid_argument("dt is not positive");
    }
    else
    {
        // Notify observers (controllers) of the step so that they can take action
        notifyStep(dt);
        tgModel::step(dt);  // Step any children
    }
}

void T6Model::onVisit(tgModelVisitor& r)
{
    tgModel::onVisit(r);
}

// Return the center of mass of this model
// Pre-condition: This model has 6 rods
std::vector<double> T6Model::getBallCOM() {
    std::vector <tgRod*> rods = find<tgRod>("rod");
    assert(!rods.empty());

    btVector3 ballCenterOfMass(0, 0, 0);
    double ballMass = 0.0;
    for (std::size_t i = 0; i < rods.size(); i++) {
        const tgRod* const rod = rods[i];
        assert(rod != NULL);
        const double rodMass = rod->mass();
        const btVector3 rodCenterOfMass = rod->centerOfMass();
        ballCenterOfMass += rodCenterOfMass * rodMass;
        ballMass += rodMass;
    }

    assert(ballMass > 0.0);
    ballCenterOfMass /= ballMass;

    // Copy to the result std::vector
    std::vector<double> result(3);
    for (size_t i = 0; i < 3; ++i) { result[i] = ballCenterOfMass[i]; }
    //std::cout<<"COM: (" << result[0] << ", " << result[1] << ", " << result[2] << ")\n";

    return result;
}

const std::vector<tgBasicActuator*>& T6Model::getAllMuscles() const
{
    return allMuscles;
}

const std::vector<tgBasicActuator*>& T6Model::getPassiveMuscles() const
{
    return passiveMuscles;
}

const std::vector<tgBasicActuator*>& T6Model::getActiveMuscles() const
{
    return activeMuscles;
}

const double T6Model::muscleRatio()
{
	return (c.stiffness_passive/c.stiffness_active);
	//return 2.5;
}

void T6Model::teardown()
{
    tgModel::teardown();
}

void T6Model::moveModel(btVector3 positionVector,btVector3 rotationVector,btVector3 speedVector) {
    std::vector<tgRod *> rods=find<tgRod>("rod");

    btQuaternion initialRotationQuat;
    initialRotationQuat.setEuler(rotationVector[0],rotationVector[1],rotationVector[2]);
    btTransform initialTransform;
    initialTransform.setIdentity();
    initialTransform.setRotation(initialRotationQuat);
    initialTransform.setOrigin(positionVector);
    for(int i=0;i<rods.size();i++) {
        rods[i]->getPRigidBody()->setLinearVelocity(speedVector);
        rods[i]->getPRigidBody()->setWorldTransform(initialTransform * rods[i]->getPRigidBody()->getWorldTransform());
    }
}


text:
<!--

-->
<div [class.hidden]="!loading">
    <winery-loader></winery-loader>
</div>
<div *ngIf="!loading" class="form-group">
    <label for="namespace">Namespace</label>
    <input id="namespace"
           class="form-control"
           name="namespace"
           autocomplete=off
           [typeahead]="allNamespaces"
           typeaheadOptionField="namespace"
           [typeaheadOptionsLimit]="typeAheadListLimit"
           [(ngModel)]="selectedNamespace"
           #namespace="ngModel"
           [required]="isRequired">
    <div *ngIf="isRequired && namespace.errors && (namespace.dirty || namespace.touched)"
         class="alert alert-danger">
        <div [hidden]="!namespace.errors.required">
            Namespace is required!
        </div>
    </div>
</div>


text:
from collections import defaultdict
from itertools import chain
from gzip import GzipFile
minsupport = 80

dataset = [[int(tok) for tok in line.strip().split()]
           for line in GzipFile('retail.dat.gz')]

counts = defaultdict(int)
for elem in chain(*dataset):
    counts[elem] += 1

# Only elements that have at least minsupport should be considered.
valid = set(el for el, c in counts.items() if (c >= minsupport))

# Filter the dataset to contain only valid elements
# (This step is not strictly necessary, but will make the rest of the code
# faster as the itemsets will be smaller):
dataset = [[el for el in ds if (el in valid)] for ds in dataset]

# Convert to frozenset for fast processing
dataset = [frozenset(ds) for ds in dataset]

itemsets = [frozenset([v]) for v in valid]
freqsets = itemsets[:]
for i in range(16):
    print("At iteration {}, number of frequent baskets: {}".format(
        i, len(itemsets)))
    nextsets = []

    tested = set()
    for it in itemsets:
        for v in valid:
            if v not in it:
                # Create a new candidate set by adding v to it
                c = (it | frozenset([v]))

                # Check if we have tested it already:
                if c in tested:
                    continue
                tested.add(c)

                # Count support by looping over dataset
                # This step is slow.
                # Check `apriori.py` for a better implementation.
                support_c = sum(1 for d in dataset if d.issuperset(c))
                if support_c > minsupport:
                    nextsets.append(c)
    freqsets.extend(nextsets)
    itemsets = nextsets
    if not len(itemsets):
        break
print("Finished!")

def rules_from_itemset(itemset, dataset, minlift=1.):
    nr_transactions = float(len(dataset))
    for item in itemset:
        consequent = frozenset([item])
        antecedent = itemset-consequent
        base = 0.0
        # acount: antecedent count
        acount = 0.0

        # ccount : consequent count
        ccount = 0.0
        for d in dataset:
          if item in d: base += 1
          if d.issuperset(itemset): ccount += 1
          if d.issuperset(antecedent): acount += 1
        base /= nr_transactions
        p_y_given_x = ccount/acount
        lift = p_y_given_x / base
        if lift > minlift:
            print('Rule {0} ->  {1} has lift {2}'
                  .format(antecedent, consequent,lift))

for itemset in freqsets:
    if len(itemset) > 1:
        rules_from_itemset(itemset, dataset, minlift=4.)


text:
from .langevin import projected_langevin
from .truncnorm import (sample_truncnorm_white,
                        sample_truncnorm_white_sphere,
                        sample_truncnorm_white_ball)


text:
'use strict';

module.exports = {

  up: function (queryInterface, Sequelize) {
    return queryInterface.addColumn('LinkInstance', 'deletedAt', {
      type: Sequelize.DATE
    });
  },

  down: function (queryInterface, Sequelize) {
    return queryInterface.removeColumn('LinkInstance', 'deletedAt');
  }

};


text:
import pika
from config import *

credentials = pika.PlainCredentials(USERNAME,PASSWORD)
conn_params = pika.ConnectionParameters(HOST,PORT,PATH, credentials = credentials)

conn_broker = pika.BlockingConnection(conn_params)

channel = conn_broker.channel()

channel.exchange_declare(exchange = EXCHANGE_NAME, type ="direct",
	passive=False, durable = True, auto_delete = False)

channel.queue_declare(queue = QUEUE_NAME)
channel.queue_bind(queue = QUEUE_NAME, exchange=EXCHANGE_NAME, routing_key=ROUTING)

#user mirror queue for cluster
# queue_args = {"x-ha-policy" : "all"}
# channel.queue_declare(queue="hello-queue", arguments=queue_args)
# queue_args = {"x-ha-policy" : "nodes", "x-ha-policy-params" : ["rabbit@Phantome"]}
def msg_consumer(channel, method, header, body):
	channel.basic_ack(delivery_tag=method.delivery_tag),
	if body == "quit":
		channel.basic_cancel(consumer_tag=CONSUMER_TAG)
		channel.stop_consuming()
	else:
		print body

channel.basic_consume(msg_consumer, queue=QUEUE_NAME, consumer_tag=CONSUMER_TAG)
print 'server has started at %s:%d' % (HOST,PORT)
channel.start_consuming()


text:
import babelpolyfill from 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-default/index.css'
// import './assets/theme/theme-darkblue/index.css'
import './assets/theme/theme-green/index.css'
import VueRouter from 'vue-router'
import store from './vuex/store'
import Vuex from 'vuex'
//import NProgress from 'nprogress'
//import 'nprogress/nprogress.css'
import routes from './routes'
import Mock from './mock'
Mock.bootstrap();
import 'font-awesome/css/font-awesome.min.css'
//jquery引入
import $ from 'jquery'
import 'jquery.nicescroll'
import * as Constant from './common/js/constant.js'
import * as cityinfo from './common/js/cityinfo.js'
import * as md5 from './common/js/jquery.md5.js'
Vue.prototype.Constant = Constant
Vue.prototype.cityinfo = cityinfo
import VueResource from 'vue-resource'
Vue.use(VueResource);

import {getCookie,delCookie,setCookie} from './common/js/Cookie.js';

Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.use(Vuex)

//NProgress.configure({ showSpinner: false });

const router = new VueRouter({
  mode:'history',
  routes
})

router.beforeEach((to, from, next) => {

  //console.log('main.js '+to.path);

  if(!Vue.prototype.$userInfo || !Vue.prototype.$token){
    var c  = getCookie('userInfo');
    var ct  =   getCookie('token');
    if(c&&c!="")  Vue.prototype.$userInfo = JSON.parse(c);
    if(ct&&ct!="")  Vue.prototype.$token = ct;

    console.log('before route');
    console.log(Vue.prototype.$userInfo);
    console.log(Vue.prototype.$token);
  }

  if(to.path == '/login'){
    delete Vue.prototype.$userInfo;
    delete Vue.prototype.$token;
    delCookie('token','userInfo');
  }

  var token = getCookie('token');
  if( to.path != '/login' && token=="")
      next({ path: '/login' })
  else
      next()
})

router.afterEach(transition => {
// NProgress.done();
});

new Vue({
  //el: '#app',
  //template: '<App/>',
  router,
  store,
  //components: { App }
  render: h => h(App)
}).$mount('#app')


text: void test_update();


text:
//AUTOGENERATED_TEXT_E6585F83424849_START
#ifndef INCLUDE_GAURD_E6585F83424849_INCLUDE_GLOAM_CORE_GLIMAGE_HPP
#define INCLUDE_GAURD_E6585F83424849_INCLUDE_GLOAM_CORE_GLIMAGE_HPP
//AUTOGENERATED_TEXT_E6585F83424849_END

#include "GLEnums.hpp"

//AUTOGENERATED_TEXT_E6585F83424849_START
namespace gloam{
//AUTOGENERATED_TEXT_E6585F83424849_END

class GLImage{
public:
	vector<GLsizei> dims; //dimentions
	const ImageFormat_t format;
	const PixelDataType_t pixelType;

	GLImage(
		vector<GLsizei> dims,
		ImageFormat_t format,
		PixelDataType_t pixelType
	) :
		dims(dims),
		format(format),
		pixelType(pixelType)
	{}

	virtual byte_t* getData() = 0;
};

//AUTOGENERATED_TEXT_E6585F83424849_START
}
#endif

//AUTOGENERATED_TEXT_E6585F83424849_END


text:
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Mandrill.Model
{
    public class MandrillInboundInfo
    {
        public string Domain { get; set; }

        [JsonConverter(typeof (IsoDateTimeConverter))]
        public DateTime CreatedAt { get; set; }

        public bool ValidMx { get; set; }
    }
}


text:
package com.evolveum.midpoint.prism.lex;

import com.evolveum.midpoint.prism.*;
import com.evolveum.midpoint.prism.lex.dom.DomLexicalProcessor;
import com.evolveum.midpoint.prism.lex.json.JsonLexicalProcessor;
import com.evolveum.midpoint.prism.lex.json.NullLexicalProcessor;
import com.evolveum.midpoint.prism.lex.json.YamlLexicalProcessor;
import com.evolveum.midpoint.prism.schema.SchemaRegistry;
import com.evolveum.midpoint.util.DebugUtil;
import com.evolveum.midpoint.util.exception.SystemException;
import org.jetbrains.annotations.NotNull;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import static com.evolveum.midpoint.prism.PrismContext.LANG_JSON;
import static com.evolveum.midpoint.prism.PrismContext.LANG_XML;
import static com.evolveum.midpoint.prism.PrismContext.LANG_YAML;

/**
 * @author mederly
 */
public class LexicalProcessorRegistry {

	private final Map<String, LexicalProcessor> parserMap;

	private final DomLexicalProcessor domLexicalProcessor;
	private final NullLexicalProcessor nullLexicalProcessor;

	public LexicalProcessorRegistry(SchemaRegistry schemaRegistry) {
		domLexicalProcessor = new DomLexicalProcessor(schemaRegistry);
		nullLexicalProcessor = new NullLexicalProcessor();

		parserMap = new HashMap<>();
		parserMap.put(LANG_XML, domLexicalProcessor);
		parserMap.put(LANG_JSON, new JsonLexicalProcessor());
		parserMap.put(LANG_YAML, new YamlLexicalProcessor());
	}

	@NotNull
	private LexicalProcessor findProcessor(File file) throws IOException {
		for (Map.Entry<String,LexicalProcessor> entry: parserMap.entrySet()) {
			LexicalProcessor aLexicalProcessor = entry.getValue();
			if (aLexicalProcessor.canRead(file)) {
				return aLexicalProcessor;
			}
		}
		throw new SystemException("No lexical processor for file '"+file+"' (autodetect)");
	}

	@NotNull
	private LexicalProcessor findProcessor(@NotNull String data){
        for (Map.Entry<String,LexicalProcessor> entry: parserMap.entrySet()) {
            LexicalProcessor aLexicalProcessor = entry.getValue();
            if (aLexicalProcessor.canRead(data)) {
                return aLexicalProcessor;
            }
        }
		throw new SystemException("No lexical processor for data '"+ DebugUtil.excerpt(data,16)+"' (autodetect)");
    }

	@NotNull
	public DomLexicalProcessor domProcessor() {
		return domLexicalProcessor;
	}

	@NotNull
	public <T> LexicalProcessor<T> processorFor(String language) {
		LexicalProcessor<?> lexicalProcessor = parserMap.get(language);
		if (lexicalProcessor == null) {
			throw new SystemException("No lexical processor for language '"+language+"'");
		}
		return (LexicalProcessor<T>) lexicalProcessor;
	}

	@NotNull
	public LexicalProcessor<?> findProcessor(@NotNull ParserSource source) throws IOException {
		if (source instanceof ParserXNodeSource) {
			return nullLexicalProcessor;
		} else if (source instanceof ParserElementSource) {
			return processorFor(LANG_XML);
		} else if (source instanceof ParserFileSource) {
			return findProcessor(((ParserFileSource) source).getFile());
		} else if (source instanceof ParserStringSource) {
			return findProcessor(((ParserStringSource) source).getData());
		} else {
			throw new IllegalArgumentException("Cannot determine lexical processor from " + source.getClass());
		}
	}
}


text:
@interface ItemViewDemo3 : WXTabItemBaseView

@end


text:
package com.facebook.buck.apple;

import static org.junit.Assert.assertEquals;

import com.facebook.buck.model.BuildTargetFactory;
import com.facebook.buck.rules.BuildRuleResolver;
import com.facebook.buck.rules.SourcePathResolver;
import com.facebook.buck.rules.TestSourcePath;

import org.junit.Before;
import org.junit.Test;

import java.nio.file.Path;
import java.nio.file.Paths;

public class PathRelativizerTest {
  private Path outputPath;
  private PathRelativizer pathRelativizer;

  @Before
  public void setUp() {
    outputPath = Paths.get("output0/output1");
    pathRelativizer = new PathRelativizer(
        outputPath,
        new SourcePathResolver(new BuildRuleResolver()).deprecatedPathFunction());
  }

  @Test
  public void testOutputPathToBuildTargetPath() {
    assertEquals(
        Paths.get("../../foo/bar"),
        pathRelativizer.outputDirToRootRelative(Paths.get("foo/bar")));
  }

  @Test
  public void testOutputPathToSourcePath() {
    assertEquals(
        Paths.get("../../source/path/foo.h"),
        pathRelativizer.outputPathToSourcePath(new TestSourcePath("source/path/foo.h")));
  }

  @Test
  public void testOutputDirToRootRelative() {
    assertEquals(
        Paths.get("../../foo/bar"),
        pathRelativizer.outputPathToBuildTargetPath(
            BuildTargetFactory.newInstance("//foo/bar:baz")));
  }

  @Test
  public void testOutputDirToRootRelativeDoesNotAddExtraDotDots() {
    assertEquals(
        Paths.get("something"),
        pathRelativizer.outputDirToRootRelative(Paths.get("output0/output1/something")));
  }

  @Test
  public void testOutputDirToRootRelativeWorksForCurrentDir() {
    assertEquals(
        Paths.get("."),
        pathRelativizer.outputDirToRootRelative(Paths.get("output0/output1")));
  }

  @Test
  public void testOutputDirToRootRelativeWorksForParentDir() {
    assertEquals(
        Paths.get(".."),
        pathRelativizer.outputDirToRootRelative(Paths.get("output0")));
  }
}


text:
#include "drv/chip.h"

/*****************************************************************************
 * Private types/enumerations/variables
 ****************************************************************************/

/*****************************************************************************
 * Public types/enumerations/variables
 ****************************************************************************/

/*****************************************************************************
 * Private functions
 ****************************************************************************/

/*****************************************************************************
 * Public functions
 ****************************************************************************/

/* Set clock source for WKT */
void Chip_WKT_SetClockSource(LPC_WKT_T *pWKT, WKT_CLKSRC_T clkSrc)
{
	if (clkSrc == WKT_CLKSRC_10KHZ) {
		pWKT->CTRL |= WKT_CTRL_CLKSEL;	/* using Low Power clock 10kHz */
	}
	else {
		pWKT->CTRL &= ~WKT_CTRL_CLKSEL;	/* using Divided IRC clock 750kHz */
	}
}

/* Return approximate rate for the selected clock source */
uint32_t Chip_WKT_GetClockRate(LPC_WKT_T *pWKT)
{
	if (Chip_WKT_GetClockSource(pWKT) == WKT_CLKSRC_DIVIRC) {
		/* Approximately 750KHz */
		return (750 * 1000);
	}
	else {
		/* Approximately 10KHz */
		return (10 * 1000);
	}
}

/* Start wake-up timer interrupt, set clock source, set timer interval */
void Chip_WKT_Start(LPC_WKT_T *pWKT, WKT_CLKSRC_T clkSrc, uint32_t cntVal)
{
	/* Set the WKT clock source */
	Chip_WKT_SetClockSource(pWKT, (WKT_CLKSRC_T) clkSrc);

	/* Set the WKT counter & start it */
	pWKT->COUNT = cntVal;
}


text:
package org.slc.sli.validation.schema;

import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;

import javax.annotation.Nullable;
import javax.annotation.PostConstruct;

import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.base.Predicate;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.BiMap;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimaps;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import org.slc.sli.common.constants.ParameterConstants;
import org.slc.sli.validation.SchemaRepository;

@Component
public class SchemaReferencesMetaData {

    private static final Logger LOG = LoggerFactory.getLogger(SchemaReferencesMetaData.class);

    /*
      A map from entityType to a list containing the fields within other entities that refer to the entityType
      {
          student -> [ [attendance, studentId], [studentSchoolAssociation, studentId], [grade, studentId], ...]
          educationOrganization -> [[studentCompetencyObjective, educationOrganizationId], [gradingPeriod, gradingPeriodIdentity, schoolId], ...]
          .
          .
      }
     */
    private ListMultimap<String, List<SchemaReferenceNode>> refNodeLists = ArrayListMultimap.create();

    /*
       A simplified version of  refNodeLists
     */
    private ListMultimap<String, SchemaReferencePath> refPaths;

    /**
     * Some virtual fields in the schema are derived from other fields.
     * Deleting a virtual field requires deletion of underlying fields.
     */
    private BiMap<String, String> fieldMapping =
    ImmutableBiMap.of(
            "assessment.assessmentPeriodDescriptorId", "assessment.assessmentPeriodDescriptor",
            "assessment.assessmentFamilyReference", "assessment." + ParameterConstants.ASSESSMENT_FAMILY_HIERARCHY
            );

    @Autowired
    private SchemaRepository schemaRepo;

    @PostConstruct
    public void init(){
        aggregateForeignKeyReferences();

        refPaths =
        Multimaps.transformValues(refNodeLists, new Function<List<SchemaReferenceNode>, SchemaReferencePath>() {
            @Override
            public SchemaReferencePath apply(@Nullable List<SchemaReferenceNode> schemaReferenceNodes) {
                SchemaReferencePath path = new SchemaReferencePath(schemaReferenceNodes);
                String fullPath = path.getPath();
                String mappedPath = fieldMapping.get(fullPath);
                if(mappedPath != null) {
                    path.setMappedPath(mappedPath);
                }
                return path;
            }
        });
    }

    public List<SchemaReferencePath> getReferencesTo(String type) {
        return refPaths.get(type);
    }

    public Set<String> getReferredEntityTypes() {
        return refNodeLists.keySet();
    }

    public void aggregateForeignKeyReferences() {
        List<NeutralSchema> schemas = schemaRepo.getSchemas();
        Stack<SchemaReferenceNode> stack = new Stack<SchemaReferenceNode>();
        for(NeutralSchema schema: schemas) {
            String schemaType = schema.getType();
            LOG.debug("Introspecting {} for References.", schemaType);
            SchemaReferenceNode root = new SchemaReferenceNode(schemaType);
            stack.clear();
            stack.push(root);
            collectReferences(schema, stack, refNodeLists);
        }

        //Below code block can be enabled for debugging!
        /*
        NeutralSchema schema = schemaRepo.getSchema("session");
        String schemaType = schema.getType();
        LOG.info("Introspecting {} for References.", schemaType);
        SchemaReferenceNode root = new SchemaReferenceNode(schemaType);
        stack.clear();
        stack.push(root);
        collectReferences(schema, stack, refNodeLists);
        */
    }

    /**
     * A tree walker implementation that searches for leaf nodes of type ReferenceSchema within a NeutralSchema tree.
     *
     * @param schema
     * @param current nesting level e.g. studentCompetency.objectiveId.studentCompetencyObjectiveId
     * @param refMap  A map from entityType to a List of SchemaReferenceNode, each of which represents
     *                a path like studentCompetency.objectiveId.studentCompetencyObjectiveId
     */
    public void collectReferences(NeutralSchema schema, final Stack<SchemaReferenceNode> currentPath, ListMultimap refMap) {
        if(schema instanceof ReferenceSchema) {
            ReferenceSchema reference = (ReferenceSchema)schema;
            AppInfo appInfo = (AppInfo)reference.getAnnotation(Annotation.AnnotationType.APPINFO);
            if(appInfo != null) {

                Stack<SchemaReferenceNode> refPath = new Stack<SchemaReferenceNode>();
                refPath.addAll(currentPath);
                if(refPath.peek().getName().equals("reference")) {
                    refPath.pop();
                }
                String type = appInfo.getReferenceType();
                refPath.peek().setReferences(type);
                refMap.put(type, refPath);
                LOG.debug("Found a Reference from {}->{}", refPath, type);
            } else {
                LOG.warn("No AppInfo for {}. Cannot determine what EntityType it points to!", currentPath);
            }

        } else {
            Map<String, NeutralSchema> fields = schema.getFields();
            for(String fieldName:fields.keySet()) {

                NeutralSchema fieldSchema = fields.get(fieldName);
                Map<String, Object> properties = fieldSchema.getProperties();
                Long minOccurs           =       (Long)  properties.get("minCardinality");
                Long maxOccurs           =       (Long)  properties.get("maxCardinality");
                final String elementType =       (String)properties.get("elementType");

                boolean loop = Iterables.any(currentPath, new Predicate<SchemaReferenceNode>() {
                    @Override
                    public boolean apply(@Nullable SchemaReferenceNode schemaReferenceNode) {
                        String refs =  schemaReferenceNode.getReferences();
                        if(refs != null && elementType != null && refs.equals(elementType)){
                            LOG.debug("Cycle found. Repeating [" + elementType + "]" + " in [" + getTypePath(currentPath) + "]");
                            return true;
                        } else {
                            return false;
                        }
                    }
                });

                if(loop) {
                    continue;
                }

                SchemaReferenceNode pathNode = new SchemaReferenceNode(fieldName);
                pathNode.setMinOccurs(minOccurs); pathNode.setMaxOccurs(maxOccurs);
                pathNode.setReferences(elementType);
                currentPath.push(pathNode);

                if(fieldSchema.getType().equals("list")) {
                    Map<String, NeutralSchema> listFields = fieldSchema.getFields();
                    for(NeutralSchema listFieldSchema:listFields.values()) {
                        collectReferences(listFieldSchema, currentPath, refMap);
                        currentPath.pop();
                    }
                } else {
                    collectReferences(fieldSchema, currentPath, refMap);
                    currentPath.pop();
                }

            }
        }
    }

    private String getTypePath(Stack<SchemaReferenceNode> currentPath) {
        List<String> types =
                Lists.newArrayList(Iterables.transform(currentPath, new Function<SchemaReferenceNode, String>() {
                    @Override
                    public String apply(@Nullable SchemaReferenceNode schemaReferenceNode) {
                        String type = schemaReferenceNode.getReferences();
                        String name = schemaReferenceNode.getName();
                        if(type != null) {
                            return type;
                        }
                        else if(name != null) {
                            return "N{" + name + "}";
                        }
                        else {
                            return null;
                        }
                    }
                }));
        String typePath = Joiner.on(".").useForNull("{NULL}").join(types);
        return typePath;
    }

}


text:
package org.elasolutions.utils.test;

public interface TestExecutionListener {
    void event(TestEvent event, EventStatus status,
            int threadId, int executionCount, long runtime, long totalThreadRuntime);
}


text:
#pragma once
#include <aws/codestar/CodeStar_EXPORTS.h>
#include <aws/codestar/CodeStarErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/codestar/model/AssociateTeamMemberResult.h>
#include <aws/codestar/model/CreateProjectResult.h>
#include <aws/codestar/model/CreateUserProfileResult.h>
#include <aws/codestar/model/DeleteProjectResult.h>
#include <aws/codestar/model/DeleteUserProfileResult.h>
#include <aws/codestar/model/DescribeProjectResult.h>
#include <aws/codestar/model/DescribeUserProfileResult.h>
#include <aws/codestar/model/DisassociateTeamMemberResult.h>
#include <aws/codestar/model/ListProjectsResult.h>
#include <aws/codestar/model/ListResourcesResult.h>
#include <aws/codestar/model/ListTagsForProjectResult.h>
#include <aws/codestar/model/ListTeamMembersResult.h>
#include <aws/codestar/model/ListUserProfilesResult.h>
#include <aws/codestar/model/TagProjectResult.h>
#include <aws/codestar/model/UntagProjectResult.h>
#include <aws/codestar/model/UpdateProjectResult.h>
#include <aws/codestar/model/UpdateTeamMemberResult.h>
#include <aws/codestar/model/UpdateUserProfileResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>

namespace Aws
{

namespace Http
{
  class HttpClient;
  class HttpClientFactory;
} // namespace Http

namespace Utils
{
  template< typename R, typename E> class Outcome;
namespace Threading
{
  class Executor;
} // namespace Threading
} // namespace Utils

namespace Auth
{
  class AWSCredentials;
  class AWSCredentialsProvider;
} // namespace Auth

namespace Client
{
  class RetryStrategy;
} // namespace Client

namespace CodeStar
{

namespace Model
{
        class AssociateTeamMemberRequest;
        class CreateProjectRequest;
        class CreateUserProfileRequest;
        class DeleteProjectRequest;
        class DeleteUserProfileRequest;
        class DescribeProjectRequest;
        class DescribeUserProfileRequest;
        class DisassociateTeamMemberRequest;
        class ListProjectsRequest;
        class ListResourcesRequest;
        class ListTagsForProjectRequest;
        class ListTeamMembersRequest;
        class ListUserProfilesRequest;
        class TagProjectRequest;
        class UntagProjectRequest;
        class UpdateProjectRequest;
        class UpdateTeamMemberRequest;
        class UpdateUserProfileRequest;

        typedef Aws::Utils::Outcome<AssociateTeamMemberResult, CodeStarError> AssociateTeamMemberOutcome;
        typedef Aws::Utils::Outcome<CreateProjectResult, CodeStarError> CreateProjectOutcome;
        typedef Aws::Utils::Outcome<CreateUserProfileResult, CodeStarError> CreateUserProfileOutcome;
        typedef Aws::Utils::Outcome<DeleteProjectResult, CodeStarError> DeleteProjectOutcome;
        typedef Aws::Utils::Outcome<DeleteUserProfileResult, CodeStarError> DeleteUserProfileOutcome;
        typedef Aws::Utils::Outcome<DescribeProjectResult, CodeStarError> DescribeProjectOutcome;
        typedef Aws::Utils::Outcome<DescribeUserProfileResult, CodeStarError> DescribeUserProfileOutcome;
        typedef Aws::Utils::Outcome<DisassociateTeamMemberResult, CodeStarError> DisassociateTeamMemberOutcome;
        typedef Aws::Utils::Outcome<ListProjectsResult, CodeStarError> ListProjectsOutcome;
        typedef Aws::Utils::Outcome<ListResourcesResult, CodeStarError> ListResourcesOutcome;
        typedef Aws::Utils::Outcome<ListTagsForProjectResult, CodeStarError> ListTagsForProjectOutcome;
        typedef Aws::Utils::Outcome<ListTeamMembersResult, CodeStarError> ListTeamMembersOutcome;
        typedef Aws::Utils::Outcome<ListUserProfilesResult, CodeStarError> ListUserProfilesOutcome;
        typedef Aws::Utils::Outcome<TagProjectResult, CodeStarError> TagProjectOutcome;
        typedef Aws::Utils::Outcome<UntagProjectResult, CodeStarError> UntagProjectOutcome;
        typedef Aws::Utils::Outcome<UpdateProjectResult, CodeStarError> UpdateProjectOutcome;
        typedef Aws::Utils::Outcome<UpdateTeamMemberResult, CodeStarError> UpdateTeamMemberOutcome;
        typedef Aws::Utils::Outcome<UpdateUserProfileResult, CodeStarError> UpdateUserProfileOutcome;

        typedef std::future<AssociateTeamMemberOutcome> AssociateTeamMemberOutcomeCallable;
        typedef std::future<CreateProjectOutcome> CreateProjectOutcomeCallable;
        typedef std::future<CreateUserProfileOutcome> CreateUserProfileOutcomeCallable;
        typedef std::future<DeleteProjectOutcome> DeleteProjectOutcomeCallable;
        typedef std::future<DeleteUserProfileOutcome> DeleteUserProfileOutcomeCallable;
        typedef std::future<DescribeProjectOutcome> DescribeProjectOutcomeCallable;
        typedef std::future<DescribeUserProfileOutcome> DescribeUserProfileOutcomeCallable;
        typedef std::future<DisassociateTeamMemberOutcome> DisassociateTeamMemberOutcomeCallable;
        typedef std::future<ListProjectsOutcome> ListProjectsOutcomeCallable;
        typedef std::future<ListResourcesOutcome> ListResourcesOutcomeCallable;
        typedef std::future<ListTagsForProjectOutcome> ListTagsForProjectOutcomeCallable;
        typedef std::future<ListTeamMembersOutcome> ListTeamMembersOutcomeCallable;
        typedef std::future<ListUserProfilesOutcome> ListUserProfilesOutcomeCallable;
        typedef std::future<TagProjectOutcome> TagProjectOutcomeCallable;
        typedef std::future<UntagProjectOutcome> UntagProjectOutcomeCallable;
        typedef std::future<UpdateProjectOutcome> UpdateProjectOutcomeCallable;
        typedef std::future<UpdateTeamMemberOutcome> UpdateTeamMemberOutcomeCallable;
        typedef std::future<UpdateUserProfileOutcome> UpdateUserProfileOutcomeCallable;
} // namespace Model

  class CodeStarClient;

    typedef std::function<void(const CodeStarClient*, const Model::AssociateTeamMemberRequest&, const Model::AssociateTeamMemberOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > AssociateTeamMemberResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::CreateProjectRequest&, const Model::CreateProjectOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateProjectResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::CreateUserProfileRequest&, const Model::CreateUserProfileOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateUserProfileResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::DeleteProjectRequest&, const Model::DeleteProjectOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteProjectResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::DeleteUserProfileRequest&, const Model::DeleteUserProfileOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteUserProfileResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::DescribeProjectRequest&, const Model::DescribeProjectOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeProjectResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::DescribeUserProfileRequest&, const Model::DescribeUserProfileOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeUserProfileResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::DisassociateTeamMemberRequest&, const Model::DisassociateTeamMemberOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DisassociateTeamMemberResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::ListProjectsRequest&, const Model::ListProjectsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListProjectsResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::ListResourcesRequest&, const Model::ListResourcesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListResourcesResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::ListTagsForProjectRequest&, const Model::ListTagsForProjectOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTagsForProjectResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::ListTeamMembersRequest&, const Model::ListTeamMembersOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTeamMembersResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::ListUserProfilesRequest&, const Model::ListUserProfilesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListUserProfilesResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::TagProjectRequest&, const Model::TagProjectOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > TagProjectResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::UntagProjectRequest&, const Model::UntagProjectOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UntagProjectResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::UpdateProjectRequest&, const Model::UpdateProjectOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateProjectResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::UpdateTeamMemberRequest&, const Model::UpdateTeamMemberOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateTeamMemberResponseReceivedHandler;
    typedef std::function<void(const CodeStarClient*, const Model::UpdateUserProfileRequest&, const Model::UpdateUserProfileOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateUserProfileResponseReceivedHandler;

  /**
   * <fullname>AWS CodeStar</fullname>
This is the API reference for AWS CodeStar.
   * This reference provides descriptions of the operations and data types for the
   * AWS CodeStar API along with usage examples.

You can use the AWS CodeStar
   * API to work with:

Projects and their resources, by calling the
   * following:

 DeleteProject, which deletes a
   * project.

 DescribeProject, which lists the
   * attributes of a project.

 ListProjects, which
   * lists all projects associated with your AWS account.

   * ListResources, which lists the resources associated with a
   * project.

 ListTagsForProject, which lists the
   * tags associated with a project.

 TagProject,
   * which adds tags to a project.

 UntagProject,
   * which removes tags from a project.

   * UpdateProject, which updates the attributes of a project.

   *

Teams and team members, by calling the following:

   * AssociateTeamMember, which adds an IAM user to the team for a
   * project.

 DisassociateTeamMember, which removes
   * an IAM user from the team for a project.

   * ListTeamMembers, which lists all the IAM users in the team for a
   * project, including their roles and attributes.

   * UpdateTeamMember, which updates a team member's attributes in a
   * project.

Users, by calling the following:

   * CreateUserProfile, which creates a user profile that contains data
   * associated with the user across all projects.

   * DeleteUserProfile, which deletes all user profile information
   * across all projects.

 DescribeUserProfile, which
   * describes the profile of a user.

   * ListUserProfiles, which lists all user profiles.

   * UpdateUserProfile, which updates the profile for a user.

   *

   */
  class AWS_CODESTAR_API CodeStarClient : public Aws::Client::AWSJsonClient
  {
    public:
      typedef Aws::Client::AWSJsonClient BASECLASS;

       /**
        * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
        * is not specified, it will be initialized to default values.
        */
        CodeStarClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());

       /**
        * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
        * is not specified, it will be initialized to default values.
        */
        CodeStarClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());

       /**
        * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
        * the default http client factory will be used
        */
        CodeStarClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
            const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());

        virtual ~CodeStarClient();

        /**
         *
Adds an IAM user to the team for an AWS CodeStar project.

See
         * Also:
   AWS
         * API Reference

         */
        virtual Model::AssociateTeamMemberOutcome AssociateTeamMember(const Model::AssociateTeamMemberRequest& request) const;

        /**
         * A Callable wrapper for AssociateTeamMember that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::AssociateTeamMemberOutcomeCallable AssociateTeamMemberCallable(const Model::AssociateTeamMemberRequest& request) const;

        /**
         * An Async wrapper for AssociateTeamMember that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void AssociateTeamMemberAsync(const Model::AssociateTeamMemberRequest& request, const AssociateTeamMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Creates a project, including project resources. This action creates a project
         * based on a submitted project request. A set of source code files and a toolchain
         * template file can be included with the project request. If these are not
         * provided, an empty project is created.

See Also:
   AWS
         * API Reference

         */
        virtual Model::CreateProjectOutcome CreateProject(const Model::CreateProjectRequest& request) const;

        /**
         * A Callable wrapper for CreateProject that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::CreateProjectOutcomeCallable CreateProjectCallable(const Model::CreateProjectRequest& request) const;

        /**
         * An Async wrapper for CreateProject that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void CreateProjectAsync(const Model::CreateProjectRequest& request, const CreateProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Creates a profile for a user that includes user preferences, such as the
         * display name and email address assocciated with the user, in AWS CodeStar. The
         * user profile is not project-specific. Information in the user profile is
         * displayed wherever the user's information appears to other users in AWS
         * CodeStar.

See Also:
   AWS
         * API Reference

         */
        virtual Model::CreateUserProfileOutcome CreateUserProfile(const Model::CreateUserProfileRequest& request) const;

        /**
         * A Callable wrapper for CreateUserProfile that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::CreateUserProfileOutcomeCallable CreateUserProfileCallable(const Model::CreateUserProfileRequest& request) const;

        /**
         * An Async wrapper for CreateUserProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void CreateUserProfileAsync(const Model::CreateUserProfileRequest& request, const CreateUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Deletes a project, including project resources. Does not delete users
         * associated with the project, but does delete the IAM roles that allowed access
         * to the project.

See Also:
   AWS
         * API Reference

         */
        virtual Model::DeleteProjectOutcome DeleteProject(const Model::DeleteProjectRequest& request) const;

        /**
         * A Callable wrapper for DeleteProject that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::DeleteProjectOutcomeCallable DeleteProjectCallable(const Model::DeleteProjectRequest& request) const;

        /**
         * An Async wrapper for DeleteProject that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void DeleteProjectAsync(const Model::DeleteProjectRequest& request, const DeleteProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Deletes a user profile in AWS CodeStar, including all personal preference
         * data associated with that profile, such as display name and email address. It
         * does not delete the history of that user, for example the history of commits
         * made by that user.

See Also:
   AWS
         * API Reference

         */
        virtual Model::DeleteUserProfileOutcome DeleteUserProfile(const Model::DeleteUserProfileRequest& request) const;

        /**
         * A Callable wrapper for DeleteUserProfile that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::DeleteUserProfileOutcomeCallable DeleteUserProfileCallable(const Model::DeleteUserProfileRequest& request) const;

        /**
         * An Async wrapper for DeleteUserProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void DeleteUserProfileAsync(const Model::DeleteUserProfileRequest& request, const DeleteUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Describes a project and its resources.

See Also:
   AWS
         * API Reference

         */
        virtual Model::DescribeProjectOutcome DescribeProject(const Model::DescribeProjectRequest& request) const;

        /**
         * A Callable wrapper for DescribeProject that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::DescribeProjectOutcomeCallable DescribeProjectCallable(const Model::DescribeProjectRequest& request) const;

        /**
         * An Async wrapper for DescribeProject that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void DescribeProjectAsync(const Model::DescribeProjectRequest& request, const DescribeProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Describes a user in AWS CodeStar and the user attributes across all
         * projects.

See Also:
   AWS
         * API Reference

         */
        virtual Model::DescribeUserProfileOutcome DescribeUserProfile(const Model::DescribeUserProfileRequest& request) const;

        /**
         * A Callable wrapper for DescribeUserProfile that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::DescribeUserProfileOutcomeCallable DescribeUserProfileCallable(const Model::DescribeUserProfileRequest& request) const;

        /**
         * An Async wrapper for DescribeUserProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void DescribeUserProfileAsync(const Model::DescribeUserProfileRequest& request, const DescribeUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Removes a user from a project. Removing a user from a project also removes
         * the IAM policies from that user that allowed access to the project and its
         * resources. Disassociating a team member does not remove that user's profile from
         * AWS CodeStar. It does not remove the user from IAM.

See Also:

         * AWS
         * API Reference

         */
        virtual Model::DisassociateTeamMemberOutcome DisassociateTeamMember(const Model::DisassociateTeamMemberRequest& request) const;

        /**
         * A Callable wrapper for DisassociateTeamMember that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::DisassociateTeamMemberOutcomeCallable DisassociateTeamMemberCallable(const Model::DisassociateTeamMemberRequest& request) const;

        /**
         * An Async wrapper for DisassociateTeamMember that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void DisassociateTeamMemberAsync(const Model::DisassociateTeamMemberRequest& request, const DisassociateTeamMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Lists all projects in AWS CodeStar associated with your AWS
         * account.

See Also:
   AWS
         * API Reference

         */
        virtual Model::ListProjectsOutcome ListProjects(const Model::ListProjectsRequest& request) const;

        /**
         * A Callable wrapper for ListProjects that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::ListProjectsOutcomeCallable ListProjectsCallable(const Model::ListProjectsRequest& request) const;

        /**
         * An Async wrapper for ListProjects that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void ListProjectsAsync(const Model::ListProjectsRequest& request, const ListProjectsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Lists resources associated with a project in AWS CodeStar.

See
         * Also:
   AWS
         * API Reference

         */
        virtual Model::ListResourcesOutcome ListResources(const Model::ListResourcesRequest& request) const;

        /**
         * A Callable wrapper for ListResources that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::ListResourcesOutcomeCallable ListResourcesCallable(const Model::ListResourcesRequest& request) const;

        /**
         * An Async wrapper for ListResources that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void ListResourcesAsync(const Model::ListResourcesRequest& request, const ListResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Gets the tags for a project.

See Also:
   AWS
         * API Reference

         */
        virtual Model::ListTagsForProjectOutcome ListTagsForProject(const Model::ListTagsForProjectRequest& request) const;

        /**
         * A Callable wrapper for ListTagsForProject that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::ListTagsForProjectOutcomeCallable ListTagsForProjectCallable(const Model::ListTagsForProjectRequest& request) const;

        /**
         * An Async wrapper for ListTagsForProject that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void ListTagsForProjectAsync(const Model::ListTagsForProjectRequest& request, const ListTagsForProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Lists all team members associated with a project.

See Also:

         * AWS
         * API Reference

         */
        virtual Model::ListTeamMembersOutcome ListTeamMembers(const Model::ListTeamMembersRequest& request) const;

        /**
         * A Callable wrapper for ListTeamMembers that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::ListTeamMembersOutcomeCallable ListTeamMembersCallable(const Model::ListTeamMembersRequest& request) const;

        /**
         * An Async wrapper for ListTeamMembers that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void ListTeamMembersAsync(const Model::ListTeamMembersRequest& request, const ListTeamMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Lists all the user profiles configured for your AWS account in AWS
         * CodeStar.

See Also:
   AWS
         * API Reference

         */
        virtual Model::ListUserProfilesOutcome ListUserProfiles(const Model::ListUserProfilesRequest& request) const;

        /**
         * A Callable wrapper for ListUserProfiles that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::ListUserProfilesOutcomeCallable ListUserProfilesCallable(const Model::ListUserProfilesRequest& request) const;

        /**
         * An Async wrapper for ListUserProfiles that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void ListUserProfilesAsync(const Model::ListUserProfilesRequest& request, const ListUserProfilesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Adds tags to a project.

See Also:
   AWS
         * API Reference

         */
        virtual Model::TagProjectOutcome TagProject(const Model::TagProjectRequest& request) const;

        /**
         * A Callable wrapper for TagProject that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::TagProjectOutcomeCallable TagProjectCallable(const Model::TagProjectRequest& request) const;

        /**
         * An Async wrapper for TagProject that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void TagProjectAsync(const Model::TagProjectRequest& request, const TagProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Removes tags from a project.

See Also:
   AWS
         * API Reference

         */
        virtual Model::UntagProjectOutcome UntagProject(const Model::UntagProjectRequest& request) const;

        /**
         * A Callable wrapper for UntagProject that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::UntagProjectOutcomeCallable UntagProjectCallable(const Model::UntagProjectRequest& request) const;

        /**
         * An Async wrapper for UntagProject that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void UntagProjectAsync(const Model::UntagProjectRequest& request, const UntagProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Updates a project in AWS CodeStar.

See Also:
   AWS
         * API Reference

         */
        virtual Model::UpdateProjectOutcome UpdateProject(const Model::UpdateProjectRequest& request) const;

        /**
         * A Callable wrapper for UpdateProject that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::UpdateProjectOutcomeCallable UpdateProjectCallable(const Model::UpdateProjectRequest& request) const;

        /**
         * An Async wrapper for UpdateProject that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void UpdateProjectAsync(const Model::UpdateProjectRequest& request, const UpdateProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Updates a team member's attributes in an AWS CodeStar project. For example,
         * you can change a team member's role in the project, or change whether they have
         * remote access to project resources.

See Also:
   AWS
         * API Reference

         */
        virtual Model::UpdateTeamMemberOutcome UpdateTeamMember(const Model::UpdateTeamMemberRequest& request) const;

        /**
         * A Callable wrapper for UpdateTeamMember that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::UpdateTeamMemberOutcomeCallable UpdateTeamMemberCallable(const Model::UpdateTeamMemberRequest& request) const;

        /**
         * An Async wrapper for UpdateTeamMember that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void UpdateTeamMemberAsync(const Model::UpdateTeamMemberRequest& request, const UpdateTeamMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

        /**
         *
Updates a user's profile in AWS CodeStar. The user profile is not
         * project-specific. Information in the user profile is displayed wherever the
         * user's information appears to other users in AWS CodeStar.

See
         * Also:
   AWS
         * API Reference

         */
        virtual Model::UpdateUserProfileOutcome UpdateUserProfile(const Model::UpdateUserProfileRequest& request) const;

        /**
         * A Callable wrapper for UpdateUserProfile that returns a future to the operation so that it can be executed in parallel to other requests.
         */
        virtual Model::UpdateUserProfileOutcomeCallable UpdateUserProfileCallable(const Model::UpdateUserProfileRequest& request) const;

        /**
         * An Async wrapper for UpdateUserProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
         */
        virtual void UpdateUserProfileAsync(const Model::UpdateUserProfileRequest& request, const UpdateUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;

      void OverrideEndpoint(const Aws::String& endpoint);
    private:
      void init(const Aws::Client::ClientConfiguration& clientConfiguration);
        void AssociateTeamMemberAsyncHelper(const Model::AssociateTeamMemberRequest& request, const AssociateTeamMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void CreateProjectAsyncHelper(const Model::CreateProjectRequest& request, const CreateProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void CreateUserProfileAsyncHelper(const Model::CreateUserProfileRequest& request, const CreateUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void DeleteProjectAsyncHelper(const Model::DeleteProjectRequest& request, const DeleteProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void DeleteUserProfileAsyncHelper(const Model::DeleteUserProfileRequest& request, const DeleteUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void DescribeProjectAsyncHelper(const Model::DescribeProjectRequest& request, const DescribeProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void DescribeUserProfileAsyncHelper(const Model::DescribeUserProfileRequest& request, const DescribeUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void DisassociateTeamMemberAsyncHelper(const Model::DisassociateTeamMemberRequest& request, const DisassociateTeamMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void ListProjectsAsyncHelper(const Model::ListProjectsRequest& request, const ListProjectsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void ListResourcesAsyncHelper(const Model::ListResourcesRequest& request, const ListResourcesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void ListTagsForProjectAsyncHelper(const Model::ListTagsForProjectRequest& request, const ListTagsForProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void ListTeamMembersAsyncHelper(const Model::ListTeamMembersRequest& request, const ListTeamMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void ListUserProfilesAsyncHelper(const Model::ListUserProfilesRequest& request, const ListUserProfilesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void TagProjectAsyncHelper(const Model::TagProjectRequest& request, const TagProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void UntagProjectAsyncHelper(const Model::UntagProjectRequest& request, const UntagProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void UpdateProjectAsyncHelper(const Model::UpdateProjectRequest& request, const UpdateProjectResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void UpdateTeamMemberAsyncHelper(const Model::UpdateTeamMemberRequest& request, const UpdateTeamMemberResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
        void UpdateUserProfileAsyncHelper(const Model::UpdateUserProfileRequest& request, const UpdateUserProfileResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;

      Aws::String m_uri;
      Aws::String m_configScheme;
      std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
  };

} // namespace CodeStar
} // namespace Aws


text:
CSE567-Project-0
================

Project 0 for CSE 567 at Miami University to learn about Web Security.


text:
require "did_you_mean/version"
require "did_you_mean/core_ext/name_error"

require "did_you_mean/spell_checkable"
require 'did_you_mean/spell_checkers/name_error_checkers'
require 'did_you_mean/spell_checkers/method_name_checker'
require 'did_you_mean/spell_checkers/null_checker'

require "did_you_mean/formatter"

module DidYouMean
  @@trace = TracePoint.new(:raise) do |tp|
    e, b = tp.raised_exception, tp.binding

    if SPELL_CHECKERS.include?(e.class.to_s) && !e.instance_variable_defined?(:@frame_binding)
      e.instance_variable_set(:@frame_binding, b)
    end
  end
  @@trace.enable

  IGNORED_CALLERS = [
    /( |`)missing_name'/,
    /( |`)safe_constantize'/
  ]

  SPELL_CHECKERS = Hash.new(NullChecker)
  SPELL_CHECKERS.merge!({
    "NameError"     => NameErrorCheckers,
    "NoMethodError" => MethodNameChecker
  })
end