text:
// SAX exception class.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: SAXParseException.java,v 1.11 2004/04/21 13:05:02 dmegginson Exp $

using System;
#if FEATURE_SERIALIZABLE_EXCEPTIONS
using System.Runtime.Serialization;
using System.Security.Permissions;
#endif

namespace Sax
{
    ///
    /// Encapsulate an XML parse error or warning.
    ///
    /// <remarks>
    /// This module, both source code and documentation, is in the
    /// Public Domain, and comes with NO WARRANTY.
    /// Seehttp://www.saxproject.org
    /// for further information.
    /// <para/>
    /// This exception may include information for locating the error
    /// in the original XML document, as if it came from a <see cref="ILocator"/>
    /// object.  Note that although the application
    /// will receive a SAXParseException as the argument to the handlers
    /// in the <see cref="IErrorHandler"/> interface,
    /// the application is not actually required to throw the exception;
    /// instead, it can simply read the information in it and take a
    /// different action.
    /// <para/>
    /// Since this exception is a subclass of <see cref="SAXException"/>,
    /// it inherits the ability to wrap another exception.
    /// </remarks>
    /// <since>SAX 1.0</since>
    /// <author>David Megginson</author>
    /// <version>2.0.1 (sax2r2)</version>
    /// <seealso cref="SAXException"/>
    /// <seealso cref="ILocator"/>
    /// <seealso cref="IErrorHandler"/>
    // LUCENENET: It is no longer good practice to use binary serialization.
    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
#if FEATURE_SERIALIZABLE_EXCEPTIONS
    [Serializable]
#endif
    public class SAXParseException : SAXException
    {
        //////////////////////////////////////////////////////////////////////
        // Constructors.
        //////////////////////////////////////////////////////////////////////

        ///
        /// Create a new <see cref="SAXParseException"/> from a message and a <see cref="ILocator"/>.
        ///
        /// <remarks>
        /// This constructor is especially useful when an application is
        /// creating its own exception from within a <see cref="IContentHandler"/>
        /// callback.
        /// </remarks>
        /// <param name="message">The error or warning message.</param>
        /// <param name="locator">The locator object for the error or warning (may be null).</param>
        /// <seealso cref="ILocator"/>
        public SAXParseException(string message, ILocator locator)
            : base(message)
        {
            if (locator != null)
            {
                Init(locator.PublicId, locator.SystemId,
                 locator.LineNumber, locator.ColumnNumber);
            }
            else
            {
                Init(null, null, -1, -1);
            }
        }

        ///
        /// Wrap an existing exception in a SAXParseException.
        ///
        /// <remarks>
        /// This constructor is especially useful when an application is
        /// creating its own exception from within a <see cref="IContentHandler"/>
        /// callback, and needs to wrap an existing exception that is not a
        /// subclass of <see cref="SAXException"/>.
        /// </remarks>
        /// <param name="message">The error or warning message, or null to
        /// use the message from the embedded exception.</param>
        /// <param name="locator">The locator object for the error or warning (may be
        /// null).</param>
        /// <param name="e">Any exception.</param>
        /// <seealso cref="ILocator"/>
        public SAXParseException(string message, ILocator locator,
                      Exception e)
            : base(message, e)
        {
            if (locator != null)
            {
                Init(locator.PublicId, locator.SystemId,
                 locator.LineNumber, locator.ColumnNumber);
            }
            else
            {
                Init(null, null, -1, -1);
            }
        }

        ///
        /// Create a new SAXParseException.
        ///
        /// <remarks>
        /// This constructor is most useful for parser writers.
        /// <para/>
        /// All parameters except the message are as if
        /// they were provided by a <see cref="ILocator"/>.  For example, if the
        /// system identifier is a URL (including relative filename), the
        /// caller must resolve it fully before creating the exception.
        /// </remarks>
        /// <param name="message">The error or warning message.</param>
        /// <param name="publicId">The public identifier of the entity that generated the error or warning.</param>
        /// <param name="systemId">The system identifier of the entity that generated the error or warning.</param>
        /// <param name="lineNumber">The line number of the end of the text that caused the error or warning.</param>
        /// <param name="columnNumber">The column number of the end of the text that cause the error or warning.</param>
        public SAXParseException(string message, string publicId, string systemId,
                      int lineNumber, int columnNumber)
            : base(message)
        {
            Init(publicId, systemId, lineNumber, columnNumber);
        }

        ///
        /// Create a new <see cref="SAXParseException"/> with an embedded exception.
        ///
        /// <remarks>
        /// This constructor is most useful for parser writers who
        /// need to wrap an exception that is not a subclass of
        /// <see cref="SAXException"/>.
        /// <para/>
        /// All parameters except the message and exception are as if
        /// they were provided by a <see cref="ILocator"/>.  For example, if the
        /// system identifier is a URL (including relative filename), the
        /// caller must resolve it fully before creating the exception.
        /// </remarks>
        /// <param name="message">The error or warning message, or null to use the message from the embedded exception.</param>
        /// <param name="publicId">The public identifier of the entity that generated the error or warning.</param>
        /// <param name="systemId">The system identifier of the entity that generated the error or warning.</param>
        /// <param name="lineNumber">The line number of the end of the text that caused the error or warning.</param>
        /// <param name="columnNumber">The column number of the end of the text that cause the error or warning.</param>
        /// <param name="e">Another exception to embed in this one.</param>
        public SAXParseException(string message, string publicId, string systemId,
                      int lineNumber, int columnNumber, Exception e)
            : base(message, e)
        {
            Init(publicId, systemId, lineNumber, columnNumber);
        }

#if FEATURE_SERIALIZABLE_EXCEPTIONS
        ///
        /// Construct a new exception with no message.
        ///
        // LUCENENET specific for serialization
        public SAXParseException(string message)
            : base(message)
        {
        }

        ///
        /// Initializes a new instance of this class with serialized data.
        ///
        /// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
        /// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
        protected SAXParseException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            publicId = info.GetString("publicId");
            systemId = info.GetString("systemId");
            lineNumber = info.GetInt32("lineNumber");
            columnNumber = info.GetInt32("columnNumber");
        }

        [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);
            info.AddValue("publicId", publicId, typeof(string));
            info.AddValue("systemId", systemId, typeof(string));
            info.AddValue("lineNumber", lineNumber, typeof(int));
            info.AddValue("columnNumber", columnNumber, typeof(int));
        }
#endif

        ///
        /// Internal initialization method.
        ///
        /// <param name="publicId">The public identifier of the entity which generated the exception, or null.</param>
        /// <param name="systemId">The system identifier of the entity which generated the exception, or null.</param>
        /// <param name="lineNumber">The line number of the error, or -1.</param>
        /// <param name="columnNumber">The column number of the error, or -1.</param>
        private void Init(string publicId, string systemId,
                   int lineNumber, int columnNumber)
        {
            this.publicId = publicId;
            this.systemId = systemId;
            this.lineNumber = lineNumber;
            this.columnNumber = columnNumber;
        }

        ///
        /// Get the public identifier of the entity where the exception occurred.
        /// Returns a string containing the public identifier, or null if none is available.
        ///
        /// <seealso cref="ILocator.PublicId"/>
        public string PublicId => this.publicId;

        ///
        /// Get the system identifier of the entity where the exception occurred.
        /// <para/>
        /// If the system identifier is a URL, it will have been resolved fully.
        /// <para/>
        /// A string containing the system identifier, or null if none is available.
        ///
        /// <seealso cref="ILocator.SystemId"/>
        public string SystemId => this.systemId;

        ///
        /// The line number of the end of the text where the exception occurred.
        /// <para/>
        /// The first line is line 1.
        /// <para/>
        /// An integer representing the line number, or -1 if none is available.
        ///
        /// <seealso cref="ILocator.LineNumber"/>
        public int LineNumber => this.lineNumber;

        ///
        /// The column number of the end of the text where the exception occurred.
        /// <para/>
        /// The first column in a line is position 1.
        /// <para/>
        /// An integer representing the column number, or -1
        /// if none is available.
        ///
        /// <seealso cref="ILocator.ColumnNumber"/>
        public int ColumnNumber => this.columnNumber;

        //////////////////////////////////////////////////////////////////////
        // Internal state.
        //////////////////////////////////////////////////////////////////////

        ///
        /// The public identifier, or null.
        ///
        /// <seealso cref="PublicId"/>
        private string publicId;

        ///
        /// The system identifier, or null.
        ///
        /// <seealso cref="SystemId"/>
        private string systemId;

        ///
        /// The line number, or -1.
        ///
        /// <seealso cref="LineNumber"/>
        private int lineNumber;

        ///
        /// The column number, or -1.
        ///
        /// <seealso cref="ColumnNumber"/>
        private int columnNumber;
    }
}


text:
package com.allanbank.mongodb.builder;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import com.allanbank.mongodb.bson.element.IntegerElement;
import com.allanbank.mongodb.bson.element.StringElement;

/**
 * IndexTest provides tests for the Index helper class.
 *
 * @copyright 2012-2013, Allanbank Consulting, Inc., All Rights Reserved
 */
public class IndexTest {

    /**
     * Test method for {@link Index#asc(String)}.
     */
    @Test
    public void testAsc() {
        assertEquals(new IntegerElement("f", 1), Index.asc("f"));
    }

    /**
     * Test method for {@link Index#desc(String)}.
     */
    @Test
    public void testDesc() {
        assertEquals(new IntegerElement("g", -1), Index.desc("g"));
    }

    /**
     * Test method for {@link Index#geo2d(String)}.
     */
    @Test
    public void testGeo2d() {
        assertEquals(new StringElement("h", "2d"), Index.geo2d("h"));
    }

    /**
     * Test method for {@link Index#geo2dSphere(String)}.
     */
    @Test
    public void testGeo2dSphere() {
        assertEquals(new StringElement("h", "2dsphere"), Index.geo2dSphere("h"));
    }

    /**
     * Test method for {@link Index#geoHaystack(String)}.
     */
    @Test
    public void testGeoHaystack() {
        assertEquals(new StringElement("h", "geoHaystack"),
                Index.geoHaystack("h"));
    }

    /**
     * Test method for {@link Index#hashed(String)}.
     */
    @Test
    public void testHashed() {
        assertEquals(new StringElement("h", "hashed"), Index.hashed("h"));
    }

    /**
     * Test method for {@link Index#text(String)}.
     */
    @Test
    public void testText() {
        assertEquals(new StringElement("h", "text"), Index.text("h"));
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.tcl.idm.service;

import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;

import com.tcl.idm.main.IdmCliMain;
import com.tcl.idm.model.CustomErrorCode;
import com.tcl.idm.model.CustomHttpResponse;
import com.tcl.idm.model.IDMCLIConfig;
import com.tcl.idm.util.CommonService;
import com.tcl.idm.util.DateFormatterUtils;
import com.tcl.idm.util.FileUtils;
import com.tcl.idm.util.HttpRequestUtils;
import com.tcl.idm.util.IDMServiceUtils;
import com.tcl.idm.util.IdmErrorMessageUtils;
import com.tcl.idm.util.SignatureUtils;
import com.tcl.idm.util.UrlUtils;

/*
 * Group CLI
 *
 * @author yuanhuan
 * 2014Äê3ÔÂ31ÈÕ ÏÂÎç1:02:26
 */
public class GroupService
{
	public static CustomHttpResponse createGroup(String[] args)
	{
		CustomHttpResponse customHttpResponse = new CustomHttpResponse();
		String usage = "Usage: \n" + "    " + IdmCliMain.getIDMCLIName()
		        + " createGroup [-h/--help] [-f/--format-json] groupName (groupName) [description (description)]\n"
		        + "Samples:\n" + "    1. " + IdmCliMain.getIDMCLIName()
		        + " createGroup groupName TCL description 123456\n        Create a group.";
		String groupName = "";
		String description = "";

		int argsLen = args.length;
		if (argsLen == 1)
		{
			if ("-h".equals(args[0]) || "--help".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_OK);
				customHttpResponse.setResponseMessage(usage);
				return customHttpResponse;
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 2)
		{
			if ("groupName".equals(args[0]))
			{
				groupName = args[1];
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;

			}
		}
		else if (argsLen == 4)
		{
			if ("groupName".equals(args[0]) && "description".equals(args[2]))
			{
				groupName = args[1];
				description = args[3];
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;

			}
		}
		else
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		// ¹¹ÔìIDM½Ó¿ÚÇëÇó²ÎÊý
		IDMCLIConfig idmCLIConfig = IDMServiceUtils.getIDMCLIConfig();
		String idmEndPoint = FileUtils.addSlashToPathIfNecessary(idmCLIConfig.getIdmEndPoint()) + "createGroup";
		String paramsWithoutDesc = "twsAccessKeyId=" + idmCLIConfig.getAccessKeyId() + "&signatureMethod="
		        + idmCLIConfig.getSignatureMethod() + "&signatureVersion=" + idmCLIConfig.getSignatureVersion()
		        + "&timestamp=" + DateFormatterUtils.getCurrentUTCTime() + "&groupName=" + groupName;
		String paramsWithDesc = paramsWithoutDesc;
		String paramsWithEncodedDesc = paramsWithoutDesc;
		if (StringUtils.isNotEmpty(description))
		{
			paramsWithDesc += "&description=" + description;
			paramsWithEncodedDesc += "&description=" + CommonService.getURLEncodeString(description);
		}
		String signatureString = SignatureService.genSignatureString("GET", UrlUtils.getHostByEndPoint(idmEndPoint),
		        UrlUtils.getURIByEndPoint(idmEndPoint), paramsWithDesc);
		String signature = SignatureUtils.calculateRFC2104HMAC(signatureString, idmCLIConfig.getSecretAccessKey());
		paramsWithEncodedDesc += "&signature=" + signature;
		String url = idmEndPoint + "?" + paramsWithEncodedDesc;
		CustomHttpResponse result = HttpRequestUtils.sendGetRequest(url);
		return result;
	}

	public static CustomHttpResponse getGroup(String[] args)
	{
		CustomHttpResponse customHttpResponse = new CustomHttpResponse();
		String usage = "Usage: \n" + "    " + IdmCliMain.getIDMCLIName()
		        + " getGroup [-h/--help] [-f/--format-json] groupId (groupId)\n" + "Samples:\n" + "    "
		        + IdmCliMain.getIDMCLIName() + " getGroup groupId 111111-2222-3333333333SAMPLE";
		String groupId = "";

		// ¼ì²é²ÎÊýÊÇ·ñºÏ·¨
		if (null == args || args.length == 0)
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		int argsLen = args.length;
		if (argsLen == 1)
		{
			if ("-h".equals(args[0]) || "--help".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_OK);
				customHttpResponse.setResponseMessage(usage);
				return customHttpResponse;
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 2)
		{
			if (!"groupId".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
			else
			{
				groupId = args[1];
			}
		}
		else
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		// ¹¹ÔìIDM½Ó¿ÚÇëÇó²ÎÊý
		IDMCLIConfig idmCLIConfig = IDMServiceUtils.getIDMCLIConfig();
		String idmEndPoint = FileUtils.addSlashToPathIfNecessary(idmCLIConfig.getIdmEndPoint()) + "getGroup";
		String params = "twsAccessKeyId=" + idmCLIConfig.getAccessKeyId() + "&signatureMethod="
		        + idmCLIConfig.getSignatureMethod() + "&signatureVersion=" + idmCLIConfig.getSignatureVersion()
		        + "&timestamp=" + DateFormatterUtils.getCurrentUTCTime() + "&groupId=" + groupId;
		String signatureString = SignatureService.genSignatureString("GET", UrlUtils.getHostByEndPoint(idmEndPoint),
		        UrlUtils.getURIByEndPoint(idmEndPoint), params);
		String signature = SignatureUtils.calculateRFC2104HMAC(signatureString, idmCLIConfig.getSecretAccessKey());
		params += "&signature=" + signature;
		String url = idmEndPoint + "?" + params;
		CustomHttpResponse result = HttpRequestUtils.sendGetRequest(url);
		return result;
	}

	public static CustomHttpResponse listGroups(String[] args)
	{
		CustomHttpResponse customHttpResponse = new CustomHttpResponse();
		String usage = "Usage: \n" + "    " + IdmCliMain.getIDMCLIName()
		        + " listGroups [-h/--help] [-f/--format-json] [userId (userId)]\n" + "Samples:\n" + "    "
		        + IdmCliMain.getIDMCLIName() + " listGroups userId 111111-2222-3333333333SAMPLE";
		String userId = "";

		// ¼ì²é²ÎÊýÊÇ·ñºÏ·¨
		if (null == args)
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		int argsLen = args.length;
		if (argsLen == 1)
		{
			if ("-h".equals(args[0]) || "--help".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_OK);
				customHttpResponse.setResponseMessage(usage);
				return customHttpResponse;
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 2)
		{
			if (!"userId".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
			else
			{
				userId = args[1];
			}
		}
		else if (argsLen == 0)
		{
			userId = "";
		}
		else
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		// ¹¹ÔìIDM½Ó¿ÚÇëÇó²ÎÊý
		IDMCLIConfig idmCLIConfig = IDMServiceUtils.getIDMCLIConfig();
		String idmEndPoint = FileUtils.addSlashToPathIfNecessary(idmCLIConfig.getIdmEndPoint()) + "listGroups";
		String params = "twsAccessKeyId=" + idmCLIConfig.getAccessKeyId() + "&signatureMethod="
		        + idmCLIConfig.getSignatureMethod() + "&signatureVersion=" + idmCLIConfig.getSignatureVersion()
		        + "&timestamp=" + DateFormatterUtils.getCurrentUTCTime();
		if (StringUtils.isNotEmpty(userId))
		{
			params += "&userId=" + userId;
		}
		String signatureString = SignatureService.genSignatureString("GET", UrlUtils.getHostByEndPoint(idmEndPoint),
		        UrlUtils.getURIByEndPoint(idmEndPoint), params);
		String signature = SignatureUtils.calculateRFC2104HMAC(signatureString, idmCLIConfig.getSecretAccessKey());
		params += "&signature=" + signature;
		String url = idmEndPoint + "?" + params;
		CustomHttpResponse result = HttpRequestUtils.sendGetRequest(url);
		return result;
	}

	public static CustomHttpResponse deleteGroup(String[] args)
	{
		CustomHttpResponse customHttpResponse = new CustomHttpResponse();
		String usage = "Usage: \n" + "    " + IdmCliMain.getIDMCLIName()
		        + " deleteGroup [-h/--help] [-f/--format-json] groupId (groupId)\n" + "Samples:\n" + "    "
		        + IdmCliMain.getIDMCLIName() + " deleteGroup groupId 111111-2222-3333333333SAMPLE";
		String groupId = "";

		// ¼ì²é²ÎÊýÊÇ·ñºÏ·¨
		if (null == args || args.length == 0)
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		int argsLen = args.length;
		if (argsLen == 1)
		{
			if ("-h".equals(args[0]) || "--help".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_OK);
				customHttpResponse.setResponseMessage(usage);
				return customHttpResponse;
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 2)
		{
			if (!"groupId".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
			else
			{
				groupId = args[1];
			}
		}
		else
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		// ¹¹ÔìIDM½Ó¿ÚÇëÇó²ÎÊý
		IDMCLIConfig idmCLIConfig = IDMServiceUtils.getIDMCLIConfig();
		String idmEndPoint = FileUtils.addSlashToPathIfNecessary(idmCLIConfig.getIdmEndPoint()) + "deleteGroup";
		String params = "twsAccessKeyId=" + idmCLIConfig.getAccessKeyId() + "&signatureMethod="
		        + idmCLIConfig.getSignatureMethod() + "&signatureVersion=" + idmCLIConfig.getSignatureVersion()
		        + "&timestamp=" + DateFormatterUtils.getCurrentUTCTime() + "&groupId=" + groupId;
		String signatureString = SignatureService.genSignatureString("GET", UrlUtils.getHostByEndPoint(idmEndPoint),
		        UrlUtils.getURIByEndPoint(idmEndPoint), params);
		String signature = SignatureUtils.calculateRFC2104HMAC(signatureString, idmCLIConfig.getSecretAccessKey());
		params += "&signature=" + signature;
		String url = idmEndPoint + "?" + params;
		CustomHttpResponse result = HttpRequestUtils.sendGetRequest(url);
		return result;
	}

	public static CustomHttpResponse updateGroup(String[] args)
	{
		CustomHttpResponse customHttpResponse = new CustomHttpResponse();
		String usage = "Usage: \n"
		        + "    "
		        + IdmCliMain.getIDMCLIName()
		        + " updateGroup [-h/--help] [-f/--format-json] groupId (groupId) [groupName (groupName) description (description)]\n"
		        + "Samples:\n" + "    " + IdmCliMain.getIDMCLIName()
		        + " updateGroup groupId 111111-2222-3333333333SAMPLE groupName testGroup01";
		String groupId = "";
		String groupName = "";
		String description = "";

		int argsLen = args.length;
		if (argsLen == 1)
		{
			if ("-h".equals(args[0]) || "--help".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_OK);
				customHttpResponse.setResponseMessage(usage);
				return customHttpResponse;
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 4)
		{
			if ("groupId".equals(args[0]) && ("groupName".equals(args[2]) || "description".equals(args[2])))
			{
				groupId = args[1];

				if ("groupName".equals(args[2]))
				{
					groupName = args[3];
				}

				if ("description".equals(args[2]))
				{
					description = args[3];
				}
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 6)
		{
			if ("groupId".equals(args[0]) && "groupName".equals(args[2]) && "description".equals(args[4]))
			{
				groupId = args[1];
				groupName = args[3];
				description = args[5];
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		// ¹¹ÔìIDM½Ó¿ÚÇëÇó²ÎÊý
		IDMCLIConfig idmCLIConfig = IDMServiceUtils.getIDMCLIConfig();
		String idmEndPoint = FileUtils.addSlashToPathIfNecessary(idmCLIConfig.getIdmEndPoint()) + "updateGroup";
		String params = "twsAccessKeyId=" + idmCLIConfig.getAccessKeyId() + "&signatureMethod="
		        + idmCLIConfig.getSignatureMethod() + "&signatureVersion=" + idmCLIConfig.getSignatureVersion()
		        + "&timestamp=" + DateFormatterUtils.getCurrentUTCTime() + "&groupId=" + groupId;
		if (StringUtils.isNotEmpty(groupName))
		{
			params += "&groupName=" + groupName;
		}

		if (StringUtils.isNotEmpty(description))
		{
			params += "&description=" + description;
		}

		String signatureString = SignatureService.genSignatureString("GET", UrlUtils.getHostByEndPoint(idmEndPoint),
		        UrlUtils.getURIByEndPoint(idmEndPoint), params);
		String signature = SignatureUtils.calculateRFC2104HMAC(signatureString, idmCLIConfig.getSecretAccessKey());
		params += "&signature=" + signature;
		String url = idmEndPoint + "?" + params;
		CustomHttpResponse result = HttpRequestUtils.sendGetRequest(url);
		return result;
	}

	public static CustomHttpResponse addUserToGroup(String[] args)
	{
		CustomHttpResponse customHttpResponse = new CustomHttpResponse();
		String usage = "Usage: \n" + "    " + IdmCliMain.getIDMCLIName()
		        + " addUserToGroup [-h/--help] [-f/--format-json] userId (userId) groupId (groupId)\n" + "Samples:\n"
		        + "    " + IdmCliMain.getIDMCLIName()
		        + " addUserToGroup userId 111111-2222-3333333333SAMPLE groupId 222222-1152-3333333333SAMPLE";
		String userId = "";
		String groupId = "";

		int argsLen = args.length;
		if (argsLen == 1)
		{
			if ("-h".equals(args[0]) || "--help".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_OK);
				customHttpResponse.setResponseMessage(usage);
				return customHttpResponse;
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 4)
		{
			if (!"userId".equals(args[0]) || !"groupId".equals(args[2]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
			else
			{
				userId = args[1];
				groupId = args[3];
			}
		}
		else
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		// ¹¹ÔìIDM½Ó¿ÚÇëÇó²ÎÊý
		IDMCLIConfig idmCLIConfig = IDMServiceUtils.getIDMCLIConfig();
		String idmEndPoint = FileUtils.addSlashToPathIfNecessary(idmCLIConfig.getIdmEndPoint()) + "addUserToGroup";
		String params = "twsAccessKeyId=" + idmCLIConfig.getAccessKeyId() + "&signatureMethod="
		        + idmCLIConfig.getSignatureMethod() + "&signatureVersion=" + idmCLIConfig.getSignatureVersion()
		        + "&timestamp=" + DateFormatterUtils.getCurrentUTCTime() + "&userId=" + userId + "&groupId=" + groupId;
		String signatureString = SignatureService.genSignatureString("GET", UrlUtils.getHostByEndPoint(idmEndPoint),
		        UrlUtils.getURIByEndPoint(idmEndPoint), params);
		String signature = SignatureUtils.calculateRFC2104HMAC(signatureString, idmCLIConfig.getSecretAccessKey());
		params += "&signature=" + signature;
		String url = idmEndPoint + "?" + params;
		CustomHttpResponse result = HttpRequestUtils.sendGetRequest(url);
		return result;
	}

	public static CustomHttpResponse removeUserFromGroup(String[] args)
	{
		CustomHttpResponse customHttpResponse = new CustomHttpResponse();
		String usage = "Usage: \n" + "    " + IdmCliMain.getIDMCLIName()
		        + " removeUserFromGroup [-h/--help] [-f/--format-json] userId (userId) groupId (groupId)\n"
		        + "Samples:\n" + "    " + IdmCliMain.getIDMCLIName()
		        + " removeUserFromGroup userId 111111-2222-3333333333SAMPLE groupId Bob";
		String userId = "";
		String groupId = "";

		int argsLen = args.length;
		if (argsLen == 1)
		{
			if ("-h".equals(args[0]) || "--help".equals(args[0]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_OK);
				customHttpResponse.setResponseMessage(usage);
				return customHttpResponse;
			}
			else
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
		}
		else if (argsLen == 4)
		{
			if (!"userId".equals(args[0]) || !"groupId".equals(args[2]))
			{
				customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
				customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
				        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
				return customHttpResponse;
			}
			else
			{
				userId = args[1];
				groupId = args[3];
			}
		}
		else
		{
			customHttpResponse.setHttpStatusCode(HttpServletResponse.SC_BAD_REQUEST);
			customHttpResponse.setResponseMessage(IdmErrorMessageUtils.genErrorMessageInJson(
			        CustomErrorCode.InvalidParameter.getCode(), CustomErrorCode.InvalidParameter.getMessage()));
			return customHttpResponse;
		}

		// ¹¹ÔìIDM½Ó¿ÚÇëÇó²ÎÊý
		IDMCLIConfig idmCLIConfig = IDMServiceUtils.getIDMCLIConfig();
		String idmEndPoint = FileUtils.addSlashToPathIfNecessary(idmCLIConfig.getIdmEndPoint()) + "removeUserFromGroup";
		String params = "twsAccessKeyId=" + idmCLIConfig.getAccessKeyId() + "&signatureMethod="
		        + idmCLIConfig.getSignatureMethod() + "&signatureVersion=" + idmCLIConfig.getSignatureVersion()
		        + "&timestamp=" + DateFormatterUtils.getCurrentUTCTime() + "&userId=" + userId + "&groupId=" + groupId;
		String signatureString = SignatureService.genSignatureString("GET", UrlUtils.getHostByEndPoint(idmEndPoint),
		        UrlUtils.getURIByEndPoint(idmEndPoint), params);
		String signature = SignatureUtils.calculateRFC2104HMAC(signatureString, idmCLIConfig.getSecretAccessKey());
		params += "&signature=" + signature;
		String url = idmEndPoint + "?" + params;
		CustomHttpResponse result = HttpRequestUtils.sendGetRequest(url);
		return result;
	}
}


text:
"""
The Sponge Roll Problem with Columnwise Column Generation for the PuLP Modeller

Authors: Antony Phillips,  Dr Stuart Mitchell  2008
"""

# Import Column Generation functions
from CGcolumnwise import *

# The Master Problem is created
prob, obj, constraints = createMaster()

# A list of starting patterns is created
newPatterns = [[1,0,0],[0,1,0],[0,0,1]]

# New patterns will be added until newPatterns is an empty list
while newPatterns:
    # The new patterns are added to the problem
    addPatterns(obj,constraints,newPatterns)
    # The master problem is solved, and the dual variables are returned
    duals = masterSolve(prob)
    # The sub problem is solved and a new pattern will be returned if there is one
    # which can reduce the master objective function
    newPatterns = subSolve(duals)

# The master problem is solved with Integer Constraints not relaxed
solution, varsdict = masterSolve(prob,relax = False)

# Display Solution
for i,j in list(varsdict.items()):
    print(i, "=", j)

print("objective = ", solution)


text:
import enum

class BugStatus(enum.Enum):

    new = 7
    incomplete = 6
    invalid = 5
    wont_fix = 4
    in_progress = 3
    fix_committed = 2
    fix_released = 1

    by_design = 4
    closed = 1

for status in BugStatus:
    print('{:15} = {}'.format(status.name, status.value))

print('\nSame: by_design is wont_fix: ',
      BugStatus.by_design is BugStatus.wont_fix)

print('Same: closed is fix_released: ',
      BugStatus.closed is BugStatus.fix_released)


text:
<?php

use garethp\ews\API;

$api = API::withUsernameAndPassword('server', 'username', 'password');
$calendar = $api->getCalendar();

//Get all items from midday today
$items = $calendar->getCalendarItems('12:00 PM');

//Get all items from 8 AM to 9 AM today
$start = new DateTime('8:00 AM');
$end = new DateTime('9:00 AM');

$items = $calendar->getCalendarItems($start, $end);

//Get a list of items in a Date Range
$items = $calendar->getCalendarItems('31/05/2015', '31/06/2015');


text:
package org.jetbrains.plugins.scala
package lang
package psi
package api
package toplevel
package typedef

import com.intellij.psi.{PsiClass, PsiElement}
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes

/**
* @author Alexander Podkhalyuzin
* @since 20.02.2008
*/

trait ScTrait extends ScTypeDefinition {
  def getTraitToken: PsiElement = findFirstChildByType(ScalaTokenTypes.kTRAIT)
  def getObjectClassOrTraitToken = getTraitToken
  def fakeCompanionClass: PsiClass
}


text:
from ShareYourSystem.Classors.Representer import _print
from ShareYourSystem.Objects import Appender

#Print a version of the class
_print(dict(Appender.AppenderClass.__dict__.items()))

#Print a version of this object
_print(Appender.AppenderClass())

#Print a version of his __dict__
_print(Appender.AppenderClass().__dict__)

#Test
_print(Appender.attest_append(),**{'RepresentingAlineaIsBool':False})


text:
<?php namespace Controllers;

use Controllers\HelperController as Helper;

class PageController
{
    public static function get($filename)
    {
        $post = __DIR__."/../../".PAGE_FOLDER."/$filename.md";

        list($title, $content) = Helper::parse($post);

        return [
            'TITLE' => $title,
            'CONTENT' => $content
        ];
    }
}


text:
<?php
class Contact extends MY_Model {
	public function __construct() {
		parent::__construct ();
	}

	public function iscontacts($user1,$user2)
	{

	}

	public function invitecontact($inviter,$invitee)
	{

	}
	public function agreeinvitation($invitid)
	{

	}
	public function rejectinvitation($invitid)
	{

	}
	public function removecontact($uid,$contactid)
	{

	}
	public function blockuser($uid,$target)
	{

	}
}

?>


text:
package com.cstewart.android.jniexample;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
 * Testing Fundamentals
 */
public class ApplicationTest extends ApplicationTestCase<Application> {
    public ApplicationTest() {
        super(Application.class);
    }
}


text:
/* @flow */

export {default as ConsoleReporter} from './console/console-reporter.js';
export {default as BufferReporter} from './buffer-reporter.js';
export {default as EventReporter} from './event-reporter.js';
export {default as JSONReporter} from './json-reporter.js';
export {default as NoopReporter} from './base-reporter.js';
export {default as Reporter} from './base-reporter.js';


text:
package ddl

import (
	"github.com/pingcap/errors"
	"github.com/pingcap/parser/ast"
	"github.com/pingcap/tidb/table"
)

// columnGenerationInDDL is a struct for validating generated columns in DDL.
type columnGenerationInDDL struct {
	position    int
	generated   bool
	dependences map[string]struct{}
}

// verifyColumnGeneration is for CREATE TABLE, because we need verify all columns in the table.
func verifyColumnGeneration(colName2Generation map[string]columnGenerationInDDL, colName string) error {
	attribute := colName2Generation[colName]
	if attribute.generated {
		for depCol := range attribute.dependences {
			if attr, ok := colName2Generation[depCol]; ok {
				if attr.generated && attribute.position <= attr.position {
					// A generated column definition can refer to other
					// generated columns occurring earilier in the table.
					err := errGeneratedColumnNonPrior.GenWithStackByArgs()
					return errors.Trace(err)
				}
			} else {
				err := errBadField.GenWithStackByArgs(depCol, "generated column function")
				return errors.Trace(err)
			}
		}
	}
	return nil
}

// columnNamesCover checks whether dependColNames is covered by normalColNames or not.
// it's only for alter table add column because before alter, we can make sure that all
// columns in table are verified already.
func columnNamesCover(normalColNames map[string]struct{}, dependColNames map[string]struct{}) error {
	for name := range dependColNames {
		if _, ok := normalColNames[name]; !ok {
			return errBadField.GenWithStackByArgs(name, "generated column function")
		}
	}
	return nil
}

// findDependedColumnNames returns a set of string, which indicates
// the names of the columns that are depended by colDef.
func findDependedColumnNames(colDef *ast.ColumnDef) (generated bool, colsMap map[string]struct{}) {
	colsMap = make(map[string]struct{})
	for _, option := range colDef.Options {
		if option.Tp == ast.ColumnOptionGenerated {
			generated = true
			colNames := findColumnNamesInExpr(option.Expr)
			for _, depCol := range colNames {
				colsMap[depCol.Name.L] = struct{}{}
			}
			break
		}
	}
	return
}

// findColumnNamesInExpr returns a slice of ast.ColumnName which is referred in expr.
func findColumnNamesInExpr(expr ast.ExprNode) []*ast.ColumnName {
	var c generatedColumnChecker
	expr.Accept(&c)
	return c.cols
}

type generatedColumnChecker struct {
	cols []*ast.ColumnName
}

func (c *generatedColumnChecker) Enter(inNode ast.Node) (outNode ast.Node, skipChildren bool) {
	return inNode, false
}

func (c *generatedColumnChecker) Leave(inNode ast.Node) (node ast.Node, ok bool) {
	switch x := inNode.(type) {
	case *ast.ColumnName:
		c.cols = append(c.cols, x)
	}
	return inNode, true
}

// checkModifyGeneratedColumn checks the modification between
// old and new is valid or not by such rules:
//  1. the modification can't change stored status;
//  2. if the new is generated, check its refer rules.
func checkModifyGeneratedColumn(originCols []*table.Column, oldCol, newCol *table.Column) error {
	// rule 1.
	var stored = [2]bool{false, false}
	var cols = [2]*table.Column{oldCol, newCol}
	for i, col := range cols {
		if !col.IsGenerated() || col.GeneratedStored {
			stored[i] = true
		}
	}
	if stored[0] != stored[1] {
		return errUnsupportedOnGeneratedColumn.GenWithStackByArgs("Changing the STORED status")
	}
	// rule 2.
	var colName2Generation = make(map[string]columnGenerationInDDL, len(originCols))
	for i, column := range originCols {
		// We can compare the pointers simply.
		if column == oldCol {
			colName2Generation[newCol.Name.L] = columnGenerationInDDL{
				position:    i,
				generated:   newCol.IsGenerated(),
				dependences: newCol.Dependences,
			}
		} else if !column.IsGenerated() {
			colName2Generation[column.Name.L] = columnGenerationInDDL{
				position:  i,
				generated: false,
			}
		} else {
			colName2Generation[column.Name.L] = columnGenerationInDDL{
				position:    i,
				generated:   true,
				dependences: column.Dependences,
			}
		}
	}
	// We always need test all columns, even if it's not changed
	// because other can depend on it so its name can't be changed.
	for _, column := range originCols {
		var colName string
		if column == oldCol {
			colName = newCol.Name.L
		} else {
			colName = column.Name.L
		}
		if err := verifyColumnGeneration(colName2Generation, colName); err != nil {
			return errors.Trace(err)
		}
	}
	return nil
}


text:
// @see https://www.npmjs.com/package/grunt-phpcs
// @see https://www.npmjs.com/package/grunt-phplint
// @see https://www.npmjs.com/package/grunt-phpunit
// @see http://mariehogebrandt.se/articles/using-grunt-php-quality-assurance-tools/

module.exports = function( grunt ) {

    //require( 'time-grunt' )(grunt);
    //require( 'load-grunt-tasks' )(grunt);
    grunt.loadTasks( 'tasks' );

    var directoryConfig = {
        basedir: '~/project/cards/',
        build: 'build',
        plugins: 'vendor/bin',
        php: 'dev/src/cards',
        reports: 'docs/reports',
        doc: 'docs'
    };

    grunt.initConfig( {
        phpcs: {
            options: {
                bin: '<%= directories.plugins %>/phpcs',
                standard: 'PSR1'
            },
            application: {
                src: [
                    '<%= directories.php %>/**/*.php',
                    '!<%= directories.php %>/bootstrap/cache/**',
                    '!<%= directories.php %>/database/**',
                    '!<%= directories.php %>/vendor/**'
                ]
            }
        },

        phplint: {
            options: {
                swapPath: '/tmp'
            },
            good: [
                '<%= directories.php %>/**/*.php',
                '!<%= directories.php %>/bootstrap/cache/**',
                '!<%= directories.php %>/database/**',
                '!<%= directories.php %>/vendor/**'
            ]
        },

        phpunit: {
            options: {
                bin: '<%= directories.plugins %>/phpunit',
                bootstrap: '<%= directories.php %>/bootstrap/autoload.php',
                staticBackup: false,
                colors: true,
                noGlobalsBackup: false
            },
            classes: {
                dir: '<%= directories.php %>/tests'
            }
        },

        phpmd: {
            options: {
                bin: '<%= directories.plugins %>/php/phpmd',
                rulesets: 'codesize,unusedcode,naming',
                suffixes: 'php',
                exclude:
                    '*/<%= directories.php %>/bootstrap/cache' + ',' +
                    '*/<%= directories.php %>/database' + ',' +
                    '*/<%= directories.php %>/vendor',
                reportFile:
                    '<%= directories.reports %>/phpmd/<%= grunt.template.today("isoDateTime") %>.xml'
            },
            application: {
                dir: '<%= directories.php %>'
            }
        },

        phpdocumentor: {
            dist: {
                bin: '<%= directories.plugins %>/phpdoc.php',
                directory: '<%= directories.php %>',
                target: '<%= directories.doc %>/api/php',
                ignore: [
                    '<%= directories.php %>/bootstrap/cache/*',
                    '<%= directories.php %>/database/*',
                    '<%= directories.php %>/vendor/*'
                ]
            }
        },

        clean: {
            build: [ '<%= directories.build %>' ]
        },

        copy: {
            build: {
                files: [ { expand: true, src: [ 'dev/**' ], dest: '<%= directories.build %>' } ]
            }
        },

        mkdir: {
            phpmd: {
                options: {
                    create: [ '<%= directories.reports %>/php/phpmd' ]
                }
            }
        },

        shell: {
            options: {
                stderr: false
            },
            target: {
                command: 'ls'
            }
        },

        directories: directoryConfig
    } );

    grunt.loadNpmTasks( 'grunt-shell' );
    grunt.loadNpmTasks( 'grunt-phpcs' );
    grunt.loadNpmTasks( 'grunt-phplint' );
    grunt.loadNpmTasks( 'grunt-phpunit' );
    grunt.loadNpmTasks( 'grunt-contrib-clean' );
    grunt.loadNpmTasks( 'grunt-contrib-copy' );
    grunt.loadNpmTasks( 'grunt-phpcpd' );
    grunt.loadNpmTasks( 'grunt-phpmd' );
    grunt.loadNpmTasks( 'grunt-mkdir' );

    grunt.registerTask( 'phpdocs', [ 'phpdocumentor' ] );
    grunt.registerTask( 'mkdir-phpmd', [ 'mkdir:phpmd', 'phpmd' ] );
    grunt.registerTask( 'test', [ 'phpunit' ] );

    grunt.registerTask( 'build',
        [ 'phpcs', 'phplint:good', 'mkdir-phpmd', 'test', 'clean:build', 'copy:build' ] );

    grunt.registerTask( 'default', [ 'build' ] );

};


text:
<!doctype html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>$QLikeDeferred | @uirouter/react</title>
	<meta name="description" content="Documentation for @uirouter/react">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">

						Search
						<input id="tsd-search-field" type="text" />

Preparing search index...

The search index is not available

					@uirouter/react

						Options

								All

Public

Public/Protected

All

							<input type="checkbox" id="tsd-filter-inherited" checked />
							Inherited
							<input type="checkbox" id="tsd-filter-externals" checked />
							Externals

					Menu

					@uirouter/react

					@uirouter/core/common/coreservices

					$QLikeDeferred

Interface $QLikeDeferred

Hierarchy

						$QLikeDeferred

Index

Properties

promise

reject

resolve

Properties

promise

promise: Promise<any>

Defined in @uirouter/core/src/common/coreservices.ts:26

reject

reject: (reason?: any) => void

Defined in @uirouter/core/src/common/coreservices.ts:25

Type declaration

(reason?: any): void

Parameters

Optional reason: any

Returns void

resolve

resolve: (val?: any) => void

Defined in @uirouter/core/src/common/coreservices.ts:24

Type declaration

(val?: any): void

Parameters

Optional val: any

Returns void

						UIRouter<wbr>React

						Services

						State<wbr>Service

						State<wbr>Registry

						Transition<wbr>Service

						Url<wbr>Service

						Url<wbr>Config

						Url<wbr>Rules

						Interfaces

						React<wbr>State<wbr>Declaration

						Components

						UIRouter

						UIView

						UISref

						UISref<wbr>Active

						React <wbr>Hooks

						use<wbr>Router

						use<wbr>Sref

						use<wbr>Sref<wbr>Active

						use<wbr>Sref<wbr>Active<wbr>Exact

						use<wbr>Transition<wbr>Hook

						use<wbr>Current<wbr>State<wbr>And<wbr>Params

						use<wbr>OnState<wbr>Changed

						use<wbr>IsActive

						Other

						Transition

						Trace

						$<wbr>Injector<wbr>Like

						$QLike

						$QLike<wbr>Deferred

								promise

								reject

								resolve

						Core<wbr>Services

						Location<wbr>Config

						Location<wbr>Services

						make<wbr>Stub

						services

Legend

Generated using TypeDoc


text:
Notifications

        {{ notification.title }}

        You have no notifications at this time.