text:
package com.bolyartech.forge.android.misc;

import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;

/**
 * Utility class that contains static methods for working with activities
 */
@SuppressWarnings("unused")
public class ActivityUtils {
    /**
     * Noninstantiable utility class
     */
    private ActivityUtils() {
        throw new AssertionError();
    }

    /**
     * Intercepts long parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both -1 is returned
     * @deprecated Please use {@link #interceptLongParam(Bundle, Intent, String, long)}
     */
    @Deprecated
    public static long interceptLongParam(Bundle savedInstanceState,
                                          Intent intent, String paramName
    ) {
        long ret = -1;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getLong(paramName);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getLong(paramName, -1);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts long parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     * @param savedInstanceState Instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent Intent that was used to start current activity.
     * @param paramName Name of the parameter to be intercepted
     * @param defaultValue Value to return if key does not exist
     * @return  Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both defaultValue is returned
     */
    public static long interceptLongParam(Bundle savedInstanceState,
                                          Intent intent, String paramName,
                                          long defaultValue
    ) {
        long ret = defaultValue;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getLong(paramName);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getLong(paramName, defaultValue);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts Parcelable parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both null is returned
     */
    public static Parcelable interceptParcelableParam(
            Bundle savedInstanceState,
            Intent intent,
            String paramName
    ) {
        Parcelable ret = null;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getParcelable(paramName);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getParcelable(paramName);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts String parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both null is returned
     */
    public static String interceptStringParam(Bundle savedInstanceState,
                                              Intent intent, String paramName
    ) {
        String ret = null;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getString(paramName);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getString(paramName);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts boolean parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both false is returned
     * @deprecated Please use {@link #interceptBooleanParam(Bundle, Intent, String, boolean)}
     */
    @Deprecated
    public static boolean interceptBooleanParam(Bundle savedInstanceState,
                                                Intent intent, String paramName
    ) {
        boolean ret = false;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getBoolean(paramName, false);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getBoolean(paramName, false);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts boolean parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @param defaultValue Value to return if key does not exist
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both defaultValue is returned
     */
    public static boolean interceptBooleanParam(Bundle savedInstanceState,
                                                Intent intent, String paramName,
                                                boolean defaultValue
    ) {
        boolean ret = defaultValue;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getBoolean(paramName, defaultValue);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getBoolean(paramName, defaultValue);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts int parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both -1 is returned
     * @deprecated Please use {@link #interceptIntParam(Bundle, Intent, String, int)}
     */
    @Deprecated
    public static int interceptIntParam(Bundle savedInstanceState,
                                        Intent intent, String paramName
    ) {
        int ret = -1;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getInt(paramName, -1);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getInt(paramName, -1);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts int parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @param defaultValue      Value to return if key does not exist
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both defaultValue is returned
     */
    public static int interceptIntParam(Bundle savedInstanceState,
                                        Intent intent, String paramName,
                                        int defaultValue
    ) {
        int ret = defaultValue;
        if (savedInstanceState != null) {
            ret = savedInstanceState.getInt(paramName, defaultValue);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getInt(paramName, defaultValue);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts float parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both 0 is returned
     * @deprecated Please use {@link #interceptFloatParam(Bundle, Intent, String, float)}
     */
    @Deprecated
    public static float interceptFloatParam(Bundle savedInstanceState,
                                            Intent intent, String paramName
    ) {
        float ret = 0;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getFloat(paramName, 0);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getFloat(paramName, 0);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts float parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @param defaultValue Value to return if key does not exist
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both defaultValue is returned
     */
    public static float interceptFloatParam(Bundle savedInstanceState,
                                            Intent intent, String paramName,
                                            float defaultValue
    ) {
        float ret = defaultValue;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getFloat(paramName, defaultValue);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getFloat(paramName, defaultValue);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts double parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both 0 is returned
     * @deprecated Please use {@link #interceptDoubleParam(Bundle, Intent, String, double)}
     */
    @Deprecated
    public static double interceptDoubleParam(Bundle savedInstanceState,
                                              Intent intent, String paramName
    ) {
        double ret = 0;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getDouble(paramName, 0);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getDouble(paramName, 0);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts double parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @param defaultValue Value to return if key does not exist
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both defaultValue is returned
     */
    public static double interceptDoubleParam(Bundle savedInstanceState,
                                              Intent intent, String paramName,
                                              double defaultValue
    ) {
        double ret = defaultValue;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getDouble(paramName, defaultValue);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getDouble(paramName, defaultValue);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts byte parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both 0 is returned
     * @deprecated Please use {@link #interceptByteParam(Bundle, Intent, String, byte)}
     */
    @Deprecated
    public static byte interceptByteParam(Bundle savedInstanceState,
                                          Intent intent, String paramName
    ) {
        byte ret = 0;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getByte(paramName, (byte) 0);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getByte(paramName, (byte) 0);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts byte parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @param defaultValue Value to return if key does not exist
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both defaultValue is returned
     */
    public static byte interceptByteParam(Bundle savedInstanceState,
                                          Intent intent, String paramName,
                                          byte defaultValue
    ) {
        byte ret = defaultValue;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getByte(paramName, defaultValue);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getByte(paramName, defaultValue);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts char parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both 0 is returned
     * @deprecated Please use {@link #interceptCharParam(Bundle, Intent, String, char)}
     */
    @Deprecated
    public static char interceptCharParam(Bundle savedInstanceState,
                                          Intent intent, String paramName
    ) {
        char ret = 0;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getChar(paramName, (char) 0);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getChar(paramName, (char) 0);
                }
            }
        }

        return ret;
    }

    /**
     * Intercepts char parameter from savedInstanceState or
     * intent (that was used to launch activity with)
     *
     * @param savedInstanceState instance state as passed to {@link android.app.Activity#onCreate(Bundle)}
     * @param intent             Intent that was used to start current activity.
     * @param paramName          Name of the parameter to be intercepted
     * @param defaultValue Value to return if key does not exist
     * @return Parameter's value as found in 1. savedInstanceState or 2. intent.getExtras(). If not found in both defaultValue is returned
     */
    public static char interceptCharParam(Bundle savedInstanceState,
                                          Intent intent, String paramName,
                                          char defaultValue
    ) {
        char ret = defaultValue;

        if (savedInstanceState != null) {
            ret = savedInstanceState.getChar(paramName, defaultValue);
        } else {
            if (intent != null) {
                Bundle incoming = intent.getExtras();
                if (incoming != null) {
                    ret = incoming.getChar(paramName, defaultValue);
                }
            }
        }

        return ret;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">1</int>
</lst>
<result name="response" numFound="1" start="0" maxScore="5.9615436">
  <doc>
    <str name="id">5</str>
    <double name="x_td">2.3</double>
    <double name="y_td">5.5</double>
    <double name="z_td">7.9</double>
    <double name="w_td">-2.4</double>
    <float name="score">5.9615436</float></doc>
</result>
<lst name="debug">
  <str name="rawquerystring">{!func}dist(2, x_td, y_td, 0, 0)</str>
  <str name="querystring">{!func}dist(2, x_td, y_td, 0, 0)</str>
  <str name="parsedquery">FunctionQuery(dist(2.0,vector(double(x_td),double(y_td)),vector(const(0),const(0))))</str>
  <str name="parsedquery_toString">dist(2.0,vector(double(x_td),double(y_td)),vector(const(0),const(0)))</str>
  <lst name="explain">
    <str name="5">
5.9615436 = (MATCH) FunctionQuery(dist(2.0,vector(double(x_td),double(y_td)),vector(const(0),const(0)))), product of:
  5.9615436 = dist(2.0,vector(double(x_td)=2.3,double(y_td)=5.5),vector(const(0),const(0)))
  1.0 = boost
  1.0 = queryNorm
</str>
  </lst>
  <str name="QParser">FunctionQParser</str>
  <arr name="filter_queries">
    <str>id:5</str>
  </arr>
  <arr name="parsed_filter_queries">
    <str>id:5</str>
  </arr>
  <lst name="timing">
    <double name="time">1.0</double>
    <lst name="prepare">
      <double name="time">0.0</double>
      <lst name="org.apache.solr.handler.component.QueryComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.FacetComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.HighlightComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.StatsComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.DebugComponent">
        <double name="time">0.0</double>
      </lst>
    </lst>
    <lst name="process">
      <double name="time">1.0</double>
      <lst name="org.apache.solr.handler.component.QueryComponent">
        <double name="time">1.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.FacetComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.MoreLikeThisComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.HighlightComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.StatsComponent">
        <double name="time">0.0</double>
      </lst>
      <lst name="org.apache.solr.handler.component.DebugComponent">
        <double name="time">0.0</double>
      </lst>
    </lst>
  </lst>
</lst>
</response>

redpajama_set_name: RedPajamaGithub


text:
 /*
  *   LOCATION:    see http://www.boost.org for most recent version.
  *   FILE:        recursion_test.cpp
  *   VERSION:     see <boost/version.hpp>
  *   DESCRIPTION: Test for indefinite recursion and/or stack overrun.
  */

#include <string>
#include <boost/regex.hpp>
#include <boost/detail/lightweight_main.hpp>
#include "../test_macros.hpp"

#ifdef BOOST_INTEL
#pragma warning(disable:1418 981 983 383)
#endif

int cpp_main( int , char* [] )
{
   // this regex will recurse twice for each whitespace character matched:
   boost::regex e("([[:space:]]|.)+");

   std::string bad_text(1024*1024*4, ' ');
   std::string good_text(200, ' ');

   boost::smatch what;

   //
   // Over and over: We want to make sure that after a stack error has
   // been triggered, that we can still conduct a good search and that
   // subsequent stack failures still do the right thing:
   //
   BOOST_CHECK(boost::regex_search(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_search(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_search(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_search(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_search(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_search(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_search(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_search(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_search(good_text, what, e));

   BOOST_CHECK(boost::regex_match(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_match(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_match(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_match(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_match(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_match(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_match(good_text, what, e));
   BOOST_CHECK_THROW(boost::regex_match(bad_text, what, e), std::runtime_error);
   BOOST_CHECK(boost::regex_match(good_text, what, e));

   return 0;
}


text:
#include "mali_kernel_common.h"
#include "mali_osk.h"
#include "mali_hw_core.h"
#include "mali_dma.h"

/**
 * Size of the Mali-450 DMA unit registers in bytes.
 */
#define MALI450_DMA_REG_SIZE 0x08

/**
 * Value that appears in MEMSIZE if an error occurs when reading the command list.
 */
#define MALI450_DMA_BUS_ERR_VAL 0xffffffff

/**
 * Mali DMA registers
 * Used in the register read/write routines.
 * See the hardware documentation for more information about each register.
 */
typedef enum mali_dma_register {

	MALI450_DMA_REG_SOURCE_ADDRESS = 0x0000,
	MALI450_DMA_REG_SOURCE_SIZE = 0x0004,
} mali_dma_register;

struct mali_dma_core {
	struct mali_hw_core  hw_core;      /**< Common for all HW cores */
	_mali_osk_spinlock_t *lock;            /**< Lock protecting access to DMA core */
	mali_dma_pool pool;                /**< Memory pool for command buffers */
};

static struct mali_dma_core *mali_global_dma_core = NULL;

struct mali_dma_core *mali_dma_create(_mali_osk_resource_t *resource)
{
	struct mali_dma_core* dma;
	_mali_osk_errcode_t err;

	MALI_DEBUG_ASSERT(NULL == mali_global_dma_core);

	dma = _mali_osk_malloc(sizeof(struct mali_dma_core));
	if (dma == NULL) goto alloc_failed;

	dma->lock = _mali_osk_spinlock_init(_MALI_OSK_LOCKFLAG_ORDERED, _MALI_OSK_LOCK_ORDER_DMA_COMMAND);
	if (NULL == dma->lock) goto lock_init_failed;

	dma->pool = mali_dma_pool_create(MALI_DMA_CMD_BUF_SIZE, 4, 0);
	if (NULL == dma->pool) goto dma_pool_failed;

	err = mali_hw_core_create(&dma->hw_core, resource, MALI450_DMA_REG_SIZE);
	if (_MALI_OSK_ERR_OK != err) goto hw_core_failed;

	mali_global_dma_core = dma;
	MALI_DEBUG_PRINT(2, ("Mali DMA: Created Mali APB DMA unit\n"));
	return dma;

	/* Error handling */

hw_core_failed:
	mali_dma_pool_destroy(dma->pool);
dma_pool_failed:
	_mali_osk_spinlock_term(dma->lock);
lock_init_failed:
	_mali_osk_free(dma);
alloc_failed:
	MALI_DEBUG_PRINT(2, ("Mali DMA: Failed to create APB DMA unit\n"));
	return NULL;
}

void mali_dma_delete(struct mali_dma_core *dma)
{
	MALI_DEBUG_ASSERT_POINTER(dma);

	MALI_DEBUG_PRINT(2, ("Mali DMA: Deleted Mali APB DMA unit\n"));

	mali_hw_core_delete(&dma->hw_core);
	_mali_osk_spinlock_term(dma->lock);
	mali_dma_pool_destroy(dma->pool);
	_mali_osk_free(dma);
}

static void mali_dma_bus_error(struct mali_dma_core *dma)
{
	u32 addr = mali_hw_core_register_read(&dma->hw_core, MALI450_DMA_REG_SOURCE_ADDRESS);

	MALI_PRINT_ERROR(("Mali DMA: Bus error when reading command list from 0x%lx\n", addr));

	/* Clear the bus error */
	mali_hw_core_register_write(&dma->hw_core, MALI450_DMA_REG_SOURCE_SIZE, 0);
}

static mali_bool mali_dma_is_busy(struct mali_dma_core *dma)
{
	u32 val;
	mali_bool dma_busy_flag = MALI_FALSE;

	MALI_DEBUG_ASSERT_POINTER(dma);

	val = mali_hw_core_register_read(&dma->hw_core, MALI450_DMA_REG_SOURCE_SIZE);

	if (MALI450_DMA_BUS_ERR_VAL == val) {
		/* Bus error reading command list */
		mali_dma_bus_error(dma);
		return MALI_FALSE;
	}
	if (val > 0) {
		dma_busy_flag = MALI_TRUE;
	}

	return dma_busy_flag;
}

static void mali_dma_start_transfer(struct mali_dma_core* dma, mali_dma_cmd_buf *buf)
{
	u32 memsize = buf->size * 4;
	u32 addr = buf->phys_addr;

	MALI_DEBUG_ASSERT_POINTER(dma);
	MALI_DEBUG_ASSERT(memsize < (1 << 16));
	MALI_DEBUG_ASSERT(0 == (memsize & 0x3)); /* 4 byte aligned */

	MALI_DEBUG_ASSERT(!mali_dma_is_busy(dma));

	/* Writes the physical source memory address of chunk containing command headers and data */
	mali_hw_core_register_write(&dma->hw_core, MALI450_DMA_REG_SOURCE_ADDRESS, addr);

	/* Writes the length of transfer */
	mali_hw_core_register_write(&dma->hw_core, MALI450_DMA_REG_SOURCE_SIZE, memsize);
}

_mali_osk_errcode_t mali_dma_get_cmd_buf(mali_dma_cmd_buf *buf)
{
	MALI_DEBUG_ASSERT_POINTER(buf);

	buf->virt_addr = (u32*)mali_dma_pool_alloc(mali_global_dma_core->pool, &buf->phys_addr);
	if (NULL == buf->virt_addr) {
		return _MALI_OSK_ERR_NOMEM;
	}

	/* size contains the number of words in the buffer and is incremented
	 * as commands are added to the buffer. */
	buf->size = 0;

	return _MALI_OSK_ERR_OK;
}

void mali_dma_put_cmd_buf(mali_dma_cmd_buf *buf)
{
	MALI_DEBUG_ASSERT_POINTER(buf);

	if (NULL == buf->virt_addr) return;

	mali_dma_pool_free(mali_global_dma_core->pool, buf->virt_addr, buf->phys_addr);

	buf->virt_addr = NULL;
}

_mali_osk_errcode_t mali_dma_start(struct mali_dma_core* dma, mali_dma_cmd_buf *buf)
{
	_mali_osk_errcode_t err = _MALI_OSK_ERR_OK;

	_mali_osk_spinlock_lock(dma->lock);

	if (mali_dma_is_busy(dma)) {
		err = _MALI_OSK_ERR_BUSY;
		goto out;
	}

	mali_dma_start_transfer(dma, buf);

out:
	_mali_osk_spinlock_unlock(dma->lock);
	return err;
}

void mali_dma_debug(struct mali_dma_core *dma)
{
	MALI_DEBUG_ASSERT_POINTER(dma);
	MALI_DEBUG_PRINT(1, ("DMA unit registers:\n\t%08x, %08x\n",
	                     mali_hw_core_register_read(&dma->hw_core, MALI450_DMA_REG_SOURCE_ADDRESS),
	                     mali_hw_core_register_read(&dma->hw_core, MALI450_DMA_REG_SOURCE_SIZE)
	                    ));

}

struct mali_dma_core *mali_dma_get_global_dma_core(void)
{
	/* Returns the global dma core object */
	return mali_global_dma_core;
}


text:
<?php
namespace Phargs\Formatter;

class Tsv {
  protected $fields = array();
  protected $fieldCount = 0;
  protected $rows = array();

  public function __construct(Array $fields = array()){
    $this->setFields($fields);
  }

  public function setFields(Array $fields){
    $this->fields = $fields;
    $this->fieldCount = sizeOf($this->fields);
  }

  public function getFieldCount(){
    return $this->fieldCount;
  }

  public function getRowCount(){
    return sizeOf($this->rows);
  }

  public function addRow(Array $row){
    if (sizeOf($row) != $this->fieldCount){
      return false;
    }
    $this->rows[] = $row;
  }

  public function addRows(Array $rows){
    foreach ($rows as $row){
      if (!is_array($row)) continue;
      $this->addRow($row);
    }
  }

  protected function getRowString(Array $row){
    return implode("\t", $row);
  }

  public function getTsvString(){
    $out = $this->getRowString($this->fields).PHP_EOL;

    // Rows
    foreach ($this->rows as $row){
      $out .= $this->getRowString($row).PHP_EOL;
    }

    return $out;
  }

  public function __toString(){
    return $this->getTsvString();
  }

}


text:
package com.flexdms.flexims.dbfile;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.io.ByteArrayInputStream;
import java.sql.SQLException;
import java.util.List;

import javax.persistence.EntityManager;
import javax.xml.bind.JAXBException;

import org.apache.commons.io.IOUtils;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;

import com.flexdms.flexims.file.FileInfo;
import com.flexdms.flexims.file.FileServiceI;
import com.flexdms.flexims.unit.CDIContainerRule;
import com.flexdms.flexims.unit.EntityManagerRule;
import com.flexdms.flexims.unit.JPA_JAXB_EmbeddedDerby_Rule;
import com.flexdms.flexims.unit.RequestScopeRule;

public class DBFileTest {

	@ClassRule
	public static CDIContainerRule cdiContainerRule = new CDIContainerRule();
	@ClassRule
	public static JPA_JAXB_EmbeddedDerby_Rule clientSetupRule = new JPA_JAXB_EmbeddedDerby_Rule();

	@Rule
	public EntityManagerRule eManagerRule = new EntityManagerRule();
	@Rule
	public RequestScopeRule requestScopeRule = new RequestScopeRule();

	public EntityManager em;

	@Before
	public void emsetup() throws JAXBException, SQLException {
		em = eManagerRule.em;
	}

	public void testFileServiceFlow(FileServiceI fileService) throws Exception {
		List<FileInfo> temps0 = fileService.findTempFiles();

		String test = "this is a test";
		byte[] bytes = test.getBytes();
		ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);

		FileInfo fileInfo = new FileInfo();
		fileInfo.setName("test.txt");
		fileInfo.setSize(bytes.length);
		fileInfo.setTemp(true);
		fileInfo.setMimeType("text/plain");

		// save
		em.getTransaction().begin();
		fileService.saveFile(inputStream, fileInfo);
		em.getTransaction().commit();
		// read content
		IOUtils.copy(fileService.getContent(fileInfo.getFileID()), System.out);

		FileInfo fileInfo1 = fileService.getFileInfo(fileInfo.getFileID());
		assertTrue(fileInfo1.isTemp());

		// change status permanent
		em.getTransaction().begin();
		fileService.changeStatus(fileInfo.getFileID(), false, "test", "533");
		em.getTransaction().commit();
		FileInfo fileInfo2 = fileService.getFileInfo(fileInfo.getFileID());
		assertFalse(fileInfo2.isTemp());

		// change status: temporary
		em.getTransaction().begin();
		fileService.changeStatus(fileInfo.getFileID(), true, "test", "534");
		em.getTransaction().commit();
		assertTrue(fileService.getFileInfo(fileInfo.getFileID()).isTemp());

		List<FileInfo> temps = fileService.findTempFiles();
		// temp is modified in last two hours and should not be retuend.
		assertTrue(temps.size() == temps0.size());
		em.getTransaction().begin();
		fileService.deleteFile(fileInfo);
		em.getTransaction().commit();
	}

	@Test
	public void testDBFileFlow() throws Exception {
		DBFileService fileService = new DBFileService();
		fileService.em = em;
		testFileServiceFlow(fileService);

	}

}


text:
<?php
namespace Ifresco\ClientBundle\Component\Alfresco\SugarCRM;
/**
 * SugarCRM REST API Class
 *
 * @package       SugarCRM
 * @category      Libraries
 * @author    Asa Kusuma
 * @license    MIT License
 * @link    http://github.com/asakusuma/SugarCRM-REST-API-Wrapper-Class/
 */

class SugarREST {

    ////////////////////////////////////////
    /// Settings Variables
    /// (Edit to configure)
    ////////////////////////////////////////

    /**
    * Variable:    $rest_url
    * Description:    The URL of the SugarCRM REST API
    * Example:    http://mydomain.com/sugarcrm/service/v2/rest.php
    */
    private $rest_url = "https://example.com/service/v2/rest.php";

    /**
    * Variable:    $username
    * Description:    A SugarCRM Username. It's recommended that
    *        you create a seperate SugarCRM User account
    *        to make REST calls.
    */
    private $username = "";

    /**
    * Variable:    $password
    * Description:    The password for the $username SugarCRM account
    */
    private $password = "";

    ////////////////////////////////////////
    /// Other Variables
    /// (Don't edit)
    ////////////////////////////////////////

    /**
    * Variable:    $session
    * Description:    The session ID for REST calls
    */
    private $session;

    /**
    * Variable:    $logged_in
    * Description:    Boolean flag for login status
    */
    private $logged_in;

    /**
    * Variable:    $error
    * Description:    The latest error
    */
    private $error = true;

    /**
    * Function:    Sugar_REST()
    * Parameters:     none
    * Description:    Class constructor
    * Returns:    TRUE on login success, otherwise FALSE
    */
    public function __construct($rest_url=null,$username=null,$password=null,$md5_password=true)
    {
        if (!is_null($rest_url))
        {
            $this->rest_url = $rest_url;
        }

        if (!is_null($username))
        {
            $this->username = $username;
        }

        if (!is_null($password))
        {
            $this->password = $password;
        }

        if($this->login($md5_password)) {
            $this->logged_in = TRUE;
            $data['session'] = $this->session;
        } else {
            $this->logged_in = FALSE;
        }
    }

    /**
    * Function:    get_error()
    * Parameters:     none
    * Description:    Gets the current error. The current error is sent whenever
    *        an API call returns an error. When the function is called,
    *        it returns and clears the current error.
    * Returns:    Returns the error array in the form:
    *            array(
    *                'name' => [value],
    *                'number' => [value],
    *                'description'
    *            )
    *        If there is no error, returns FALSE.
    *        If the error array is corrupted, but there is still an
    *        error, returns TRUE.
    */
    public function get_error() {
        if(isset($this->error['name'])) {
            $error = $this->error;
            $this->error = FALSE;
            return $error;
        } else if(is_bool($this->error)) {
            $error = $this->error;
            $this->error = FALSE;
            return $error;
        } else {
            return TRUE;
        }
    }

    /**
    * Function:    login()
    * Parameters:     none
    * Description:    Makes a 'login' API call which authenticates based on the $username
    *        and $password class variables. If the login call succeeds, sets
    *        the $session class variable as the session ID. If it fails, sets
    *        the current error.
    * Returns:    Returns TRUE on success, otherwise FALSE
    */
    private function login($md5_password=true) {

        // run md5 on password if needed
        $password = $this->password;
        if ($md5_password)
        {
            $password = md5($this->password);
        }

        $result = $this->rest_request(
            'login',
            array(
                'user_auth' => array('user_name'=>$this->username,'password'=>$password),
                'name_value_list' => array(array('name' => 'notifyonsave', 'value' => 'true'))
            )
        );
        if(isset($result['id'])) {
            $this->session = $result['id'];
            return TRUE;
        } else {
            $this->error = $result;
            if(isset($this->error['name']) && isset($this->error['number']) && isset($this->error['description'])) {
                $this->error = $result;
            } else {
                $this->error['name'] = "Unknown Error";
                $this->error['number'] = -1;
                $this->error['description'] = "We are having technical difficulties. We apologize for the inconvenience.";
            }
            return FALSE;
        }
    }

    /**
    * Function:    rest_request()
    * Parameters:     $call_name    = (string) the API call name
    *        $call_arguments    = (array) the arguments for the API call
    * Description:    Makes an API call given a call name and arguments
    *        checkout http://developers.sugarcrm.com/docs for documentation
    *        on the specific API calls
    * Returns:    An array with the API call response data
    */
    private function rest_request($call_name, $call_arguments) {

        $ch = curl_init();

        $post_data = 'method='.$call_name.'&input_type=JSON&response_type=JSON';
        $jsonEncodedData = json_encode($call_arguments);
        $post_data = $post_data . "&rest_data=" . $jsonEncodedData;

        curl_setopt($ch, CURLOPT_URL, $this->rest_url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
        $output = curl_exec($ch);

        $response_data = json_decode($output,true);

        return $response_data;
    }

    /**
    * Function:    is_valid_id($id)
    * Parameters:     $id    = (string) the SugarCRM record ID
    * Description:    Checks to see if the given string is in the valid
    *        format for a SugarCRM record ID. This is for input
    *        data sanitation, does not actually check to see if
    *        if there is a record with the given ID.
    * Returns:    TRUE if valid format, otherwise FALSE
    */
    public function is_valid_id($id) {
        if(!is_string($id)) return FALSE;
        return preg_match("/[0-9a-z\-]+/",$id);
    }

    public function count_records($module, $query) {
        $call_arguments = array(
            'session' => $this->session,
            'module_name' => $module,
            'query' => $query,
            'deleted' => 0
        );

        $result = $this->rest_request(
            'get_entries_count',
            $call_arguments
        );

        if(isset($result['result_count'])) {
            return $result['result_count'];
        } else {
            return FALSE;
        }
    }

    /**
    * Function:    get_with_related($module, $fields, $options)
    * Parameters:     $module    = (string) the SugarCRM module name. Usually first
    *            letter capitalized. This is the name of the base
    *            module. In other words, any other modules involved
    *            in the query will be related to the given base
    *            module.
    *        $fields        = (array) the fields you want to retrieve, based on
    *                the module:
    *                array(
    *                    'Cases' => array(
    *                        'field_name',
    *                        'some_other_field_name'
    *                    ),
    *                    'Acounts' => array(
    *                        'field_name',
    *                        'some_other_field_name'
    *                    )
    *                )
    *        $options     = (array)[optional] Lets you set options for the query:
    *                $options['limit'] = Limit how many records returned
    *                $options['offset'] = Query offset
    *                $options['where'] = WHERE clause for an SQL statement
    *                $options['order_by'] = ORDER BY clause for an SQL statement
    * Description:    Retrieves Sugar Bean records. Essentially returns the result of a
    *        SELECT SQL statement, given a base module, any number of related of modules,
    *        and respective fields for each module. Each row returned represents a
    *        single record of the base module. Each row may have multiple records from.
    *        related modules.
    * Returns:    Result of API call in an array.
    */
    public function get_with_related($module,$fields,$options=null) {

        if(sizeof($fields) < 1) {
            return FALSE;
        }

        //Set the defaults for the options
        if(!isset($options['limit'])) {
            $options['limit'] = 20;
        }
        if(!isset($options['offset'])) {
            $options['offset'] = 0;
        }
        if(!isset($options['where'])) {
            $options['where'] = null;
        }
        if(!isset($options['order_by'])) {
            $options['order_by'] = null;
        }
        if(!isset($fields[$module])) {
            return FALSE;
        }

        $base_fields = $fields[$module];
        unset($fields[$module]);

        $relationships = array();
        foreach($fields as $related_module => $fields_list) {
            $relationships[] = array('name' => strtolower($related_module), 'value' => $fields_list);
        }

        $call_arguments = array(
            'session' => $this->session,
            'module_name' => $module,
            'query' => $options['where'],
            'order_by' => $options['order_by'],
            'offset' => $options['offset'],
            'select_fields' => $base_fields,
            'link_name_to_fields_array' => $relationships,
            'max_results' => $options['limit'],
            'deleted' => "FALSE"
        );

        $result = $this->rest_request(
            'get_entry_list',
            $call_arguments
        );

        return $result;
    }

    /**
    * Function:    get($module, $fields, $options)
    * Parameters:     $module    = (string) the SugarCRM module name. Usually first
    *            letter capitalized. This is the name of the base
    *            module. In other words, any other modules involved
    *            in the query will be related to the given base
    *            module.
    *        $fields        = (array) the fields you want to retrieve:
    *                array(
    *                    'field_name',
    *                    'some_other_field_name'
    *                )
    *        $options    = (array)[optional] Lets you set options for the query:
    *                $options['limit'] = Limit how many records returned
    *                $options['offset'] = Query offset
    *                $options['where'] = WHERE clause for an SQL statement
    *                $options['order_by'] = ORDER BY clause for an SQL statement
    * Description:    Retrieves Sugar Bean records. Essentially returns the result of a
    *        SELECT SQL statement.
    * Returns:    A 2-D array, first dimension is records, second is fields. For instance, the
    *        'name' field in the first record would be accessed in $result[0]['name].
    */
    public function get($module,$fields,$options=null) {
        $results = $this->get_with_related($module,array($module => $fields),$options);
        $records = array();
        if ($results) {
                foreach($results['entry_list'] as $entry) {
                    $record = array();
                    foreach($entry['name_value_list'] as $field) {
                        $record[$field['name']] = $field['value'];
                    }
                    $records[] = $record;
                }
            }
            return $records;
    }

    /**
    * Function:    set($module, $values)
    * Parameters:     $module    = (string) the SugarCRM module name. Usually first
    *            letter capitalized.
    *        $values    = (array) the data of the record to be set in
    *        the form:
    *            array(
    *                'id' => 'some value',
    *                'field_name' => 'some other value'
    *            )
    *
    * Description:    Saves or creates a SugarCRM record, depending on whether
    *        or not the 'id' field in the $values parameter is set.
    * Returns:    Result of API call in an array.
    */
    public function set($module,$values) {
        $call_arguments = array(
            'session' => $this->session,
            'module_name' => $module,
            'name_value_list' => $values,
        );

        $result = $this->rest_request(
            'set_entry',
            $call_arguments
        );

        return $result;
    }

    public function print_results($results) {
        if(isset($results['entry_list'][0]['module_name'])) {
            $module_name = $results['entry_list'][0]['module_name'];
            echo "
".$module_name."
";
            foreach($results['entry_list'] as $i => $entry) {
                echo "
";
                foreach($entry['name_value_list'] as $field) {
                    echo "
".$field['name']." = ".$field['value']."
";
                }
                if(isset($results['relationship_list'][$i])) {
                    foreach($results['relationship_list'][$i] as $module) {
                        echo "
related ".$module['name']."
";
                        foreach($module['records'] as $x=>$record) {
                            echo "
";
                            foreach($record as $field) {
                                echo "
".$field['name']." = ".$field['value']."
";
                            }
                            echo "
";
                        }
                        echo "
";
                    }
                }
                echo "
";
            }
        }
    }

    public function set_relationship($module_name, $module_id, $link_field_name, $related_ids){
        $call_arguments = array(
            'session' => $this->session,
            'module_name' => $module_name,
            'module_id' => $module_id,
            'link_field_name' => $link_field_name,
            'related_ids' => array($related_ids)
        );

        $result = $this->rest_request(
            'set_relationship',
            $call_arguments
        );

        return $result;
    }

    /**
    * Function:    get_note_attachment($note_id)
    * Parameters:     $note_id    = (string) the SugarCRM record ID
    * Description:    Gets the attachment of a note given an id. See
    *        README for an example on use
    * Returns:    Attachment data in an array on success. Actual file
    *        data will be in binary format. Otherwise FALSE.
    */
    public function get_note_attachment($note_id) {
        if($this->is_valid_id($note_id)) {
            $call_arguments = array(
                'session' => $this->session,
                'id' => $note_id
            );

            $result = $this->rest_request(
                'get_note_attachment',
                $call_arguments
            );
            return $result;
        }
        return FALSE;
    }

    /**
    * Function:    set_note_attachment($note_id, $file, $filename)
    * Parameters:     $note_id    = (string) the SugarCRM record ID
    *        $file        = (string) the file in binary format
    *        $filename    = (string) the name of the file
    * Description:    Sets the attachment for a note. Will replace the old
    *                note if one already exists. See README for example on use
    * Returns:        Result of API call in an array.
    */
    public function set_note_attachment($note_id,$file,$filename) {

        $call_arguments = array(
            'session' => $this->session,
            'note' => array(
                'id'=>$note_id,
                'file' => $file,
                'filename' => $filename,
                'related_module_name' => 'Cases'
            )
        );

        $result = $this->rest_request(
            'set_note_attachment',
            $call_arguments
        );

        return $result;
    }

    /**
         * Function:    get_available_modules()
         * Description:    Retrieve the list of available modules on the system available
         *               to the currently logged in user.
         * Returns:    Result of API call in an array.
         */
    public function get_available_modules(){

        $call_arguments = array(
                    'session' => $this->session
                );

                $result = $this->rest_request(
                        'get_available_modules', $call_arguments
                );

            return $result;
    }

        /**
        * Function:     search_by_module($search_string, $modules, $offset, $max_results)
        *
        * Parameters:    $search_string = (string) The name of the string to search
        *                 $modules        = (string[]) The array of modules to query
        *                 $offset        = (int) A specified offset in the query
        *                 $max_results    = (int) Max number of records to return
        * Description:   Given a list of modules to search and a search string, return the id,
       *                module_name, along with the fields.  We will support Accounts, Bug Tracker,
        *         Cases, Contacts, Leads, Opportunities, Project, ProjectTask, and Quotes.
        * Returns:     Result of API call in an array.
    */
        public function search_by_module($search_string, $modules, $offset, $max_results){
                $call_arguments = array(
                'session' => $this->session,
                'search_string' => $search_string,
                'modules' => $modules,
                'offset' => $offset,
                'max_results' => $max_results,
            );

                $result = $this->rest_request(
                        'search_by_module', $call_arguments
               );

            return $result;
        }

    /**
    * Function:    is_logged_in()
    * Parameters:     none
    * Description:    Simple getter for logged_in private variable
    * Returns:    boolean
    */
    function is_logged_in()
    {
        return $this->logged_in;
    }

    /**
    * Function:    __destruct()
    * Parameters:     none
    * Description:    Closes the API connection when the PHP class
    *        object is destroyed
    * Returns:    nothing
    */
    function __destruct() {
        if($this->logged_in) {
            $l = $this->rest_request(
                'logout',
                array(
                    'session' => $this->session
                )
            );
        }
    }
}

?>


text:
<?php

use yii\db\Migration;

/**
 * Initializes Session tables.
 *
 * @author Misbahul D Munir <misbahuldmunir@gmail.com>
 * @since 2.0.8
 */
class m160313_153426_session_init extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function up()
    {
        $dataType = $this->binary();
        $tableOptions = null;

        switch ($this->db->driverName) {
            case 'mysql':
                // https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
                $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
                break;
            case 'sqlsrv':
            case 'mssql':
            case 'dblib':
                $dataType = $this->text();
                break;
        }

        $this->createTable('{{%session}}', [
            'id' => $this->string()->notNull(),
            'expire' => $this->integer(),
            'data' => $dataType,
            'PRIMARY KEY ([[id]])',
        ], $tableOptions);
    }

    /**
     * {@inheritdoc}
     */
    public function down()
    {
        $this->dropTable('{{%session}}');
    }
}


text:
package org.minijs.core.ast;

public class StringLiteral implements Literal {

    private final String mValue;

    private String mToStringCache;

    public StringLiteral() {
        this(null);
    }

    public StringLiteral(String v) {
        mValue = v;
    }

    public String getValue() {
        return mValue;
    }

    @Override
    public String toString() {
        if (mValue == null) {
            return "null";
        }

        if (mToStringCache == null) {
            mToStringCache = String.format("\"%s\"", mValue);
        }
        return mToStringCache;
    }
}


text:
/*istanbul ignore next*/"use strict";

var /*istanbul ignore next*/_isBoolean = require("lodash/lang/isBoolean");

/*istanbul ignore next*/
var _isBoolean2 = _interopRequireDefault(_isBoolean);

var /*istanbul ignore next*/_each = require("lodash/collection/each");

/*istanbul ignore next*/
var _each2 = _interopRequireDefault(_each);

var /*istanbul ignore next*/_map = require("lodash/collection/map");

/*istanbul ignore next*/
var _map2 = _interopRequireDefault(_map);

var /*istanbul ignore next*/_babelTypes = require("babel-types");

/*istanbul ignore next*/
var t = _interopRequireWildcard(_babelTypes);

/*istanbul ignore next*/
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * Crawl a node to test if it contains a CallExpression, a Function, or a Helper.
 *
 * @example
 * crawl(node)
 * // { hasCall: false, hasFunction: true, hasHelper: false }
 */

function crawl(node) {
  /*istanbul ignore next*/var state = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

  if (t.isMemberExpression(node)) {
    crawl(node.object, state);
    if (node.computed) crawl(node.property, state);
  } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
    crawl(node.left, state);
    crawl(node.right, state);
  } else if (t.isCallExpression(node)) {
    state.hasCall = true;
    crawl(node.callee, state);
  } else if (t.isFunction(node)) {
    state.hasFunction = true;
  } else if (t.isIdentifier(node)) {
    state.hasHelper = state.hasHelper || isHelper(node.callee);
  }

  return state;
}

/**
 * Test if a node is or has a helper.
 */

function isHelper(node) {
  if (t.isMemberExpression(node)) {
    return isHelper(node.object) || isHelper(node.property);
  } else if (t.isIdentifier(node)) {
    return node.name === "require" || node.name[0] === "_";
  } else if (t.isCallExpression(node)) {
    return isHelper(node.callee);
  } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
    return t.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  } else {
    return false;
  }
}

function isType(node) {
  return t.isLiteral(node) || t.isObjectExpression(node) || t.isArrayExpression(node) || t.isIdentifier(node) || t.isMemberExpression(node);
}

/**
 * Tests for node types that need whitespace.
 */

exports.nodes = { /*istanbul ignore next*/

  /**
   * Test if AssignmentExpression needs whitespace.
   */

  AssignmentExpression: function AssignmentExpression(node) {
    var state = crawl(node.right);
    if (state.hasCall && state.hasHelper || state.hasFunction) {
      return {
        before: state.hasFunction,
        after: true
      };
    }
  },
  /*istanbul ignore next*/

  /**
   * Test if SwitchCase needs whitespace.
   */

  SwitchCase: function SwitchCase(node, parent) {
    return {
      before: node.consequent.length || parent.cases[0] === node
    };
  },
  /*istanbul ignore next*/

  /**
   * Test if LogicalExpression needs whitespace.
   */

  LogicalExpression: function LogicalExpression(node) {
    if (t.isFunction(node.left) || t.isFunction(node.right)) {
      return {
        after: true
      };
    }
  },
  /*istanbul ignore next*/

  /**
   * Test if Literal needs whitespace.
   */

  Literal: function Literal(node) {
    if (node.value === "use strict") {
      return {
        after: true
      };
    }
  },
  /*istanbul ignore next*/

  /**
   * Test if CallExpression needs whitespace.
   */

  CallExpression: function CallExpression(node) {
    if (t.isFunction(node.callee) || isHelper(node)) {
      return {
        before: true,
        after: true
      };
    }
  },
  /*istanbul ignore next*/

  /**
   * Test if VariableDeclaration needs whitespace.
   */

  VariableDeclaration: function VariableDeclaration(node) {
    for (var i = 0; i < node.declarations.length; i++) {
      var declar = node.declarations[i];

      var enabled = isHelper(declar.id) && !isType(declar.init);
      if (!enabled) {
        var state = crawl(declar.init);
        enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
      }

      if (enabled) {
        return {
          before: true,
          after: true
        };
      }
    }
  },
  /*istanbul ignore next*/

  /**
   * Test if IfStatement needs whitespace.
   */

  IfStatement: function IfStatement(node) {
    if (t.isBlockStatement(node.consequent)) {
      return {
        before: true,
        after: true
      };
    }
  }
};

/**
 * Test if Property or SpreadProperty needs whitespace.
 */

exports.nodes.ObjectProperty = exports.nodes.ObjectMethod = exports.nodes.SpreadProperty = function (node, parent) {
  if (parent.properties[0] === node) {
    return {
      before: true
    };
  }
};

/**
 * Returns lists from node types that need whitespace.
 */

exports.list = { /*istanbul ignore next*/

  /**
   * Return VariableDeclaration declarations init properties.
   */

  VariableDeclaration: function VariableDeclaration(node) {
    return (/*istanbul ignore next*/(0, _map2.default)(node.declarations, "init")
    );
  },
  /*istanbul ignore next*/

  /**
   * Return VariableDeclaration elements.
   */

  ArrayExpression: function ArrayExpression(node) {
    return node.elements;
  },
  /*istanbul ignore next*/

  /**
   * Return VariableDeclaration properties.
   */

  ObjectExpression: function ObjectExpression(node) {
    return node.properties;
  }
};

/**
 * Add whitespace tests for nodes and their aliases.
 */

/*istanbul ignore next*/(0, _each2.default)({
  Function: true,
  Class: true,
  Loop: true,
  LabeledStatement: true,
  SwitchStatement: true,
  TryStatement: true
}, function (amounts, type) {
  if ( /*istanbul ignore next*/(0, _isBoolean2.default)(amounts)) {
    amounts = { after: amounts, before: amounts };
  }

  /*istanbul ignore next*/(0, _each2.default)([type].concat(t.FLIPPED_ALIAS_KEYS[type] || []), function (type) {
    exports.nodes[type] = function () {
      return amounts;
    };
  });
});


text:
REM ** Make sure you edit the name of your mud at the end of this batch file first!
REM ** You may need to modify the word java here to point to your java.exe with a proper
REM **  path.  E.G. c:\jdk1.6.0_01\bin\java -- make sure you are building with java v1.5 or higher!
java -classpath ".;.\lib\js.jar;.\lib\jzlib.jar" -Xms64m -Xmx128m com.planet_ink.coffee_mud.application.MUD "Your Muds Name"


text:
<?php

namespace Ui\Options;

use Zend\Stdlib\AbstractOptions;

class TrackingHelperOptions extends AbstractOptions
{
    /**
     * @var array
     */
    protected $instances = [];

    /**
     * @var TrackingHelperInstanceOptions[]
     */
    protected $options = [];

    /**
     * @param $name
     * @return TrackingHelperInstanceOptions
     */
    public function getInstance($name)
    {
        if (!isset($this->instances[$name])) {
            $this->instances[$name] = [];
        }

        if (!is_object($this->instances[$name])) {
            $options                = $this->instances[$name];
            $this->instances[$name] = new TrackingHelperInstanceOptions($options);
        }

        return $this->instances[$name];
    }

    /**
     * @return array
     */
    public function getInstances()
    {
        return $this->instances;
    }

    /**
     * @param array $instances
     */
    public function setInstances(array $instances)
    {
        $this->instances = $instances;
    }
}


text:
namespace Windows_App_Holdem
{
    partial class TexasHoldemApp
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.lableCardOne = new System.Windows.Forms.Label();
            this.labelCardTwo = new System.Windows.Forms.Label();
            this.handCardTwoNumber = new System.Windows.Forms.TextBox();
            this.handCardOneNumber = new System.Windows.Forms.TextBox();
            this.handCardOneColour = new System.Windows.Forms.TextBox();
            this.handCardTwoColour = new System.Windows.Forms.TextBox();
            this.buttonPlayerReady = new System.Windows.Forms.Button();
            this.TableCardOneColour = new System.Windows.Forms.TextBox();
            this.TableCardOneNumber = new System.Windows.Forms.TextBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.buttonStartNewGame = new System.Windows.Forms.Button();
            this.buttonJoinGame = new System.Windows.Forms.Button();
            this.buttonNextCard = new System.Windows.Forms.Button();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.groupBox5 = new System.Windows.Forms.GroupBox();
            this.TableCardTwoNumber = new System.Windows.Forms.TextBox();
            this.TableCardTwoColour = new System.Windows.Forms.TextBox();
            this.groupBox6 = new System.Windows.Forms.GroupBox();
            this.TableCardThreeColour = new System.Windows.Forms.TextBox();
            this.TableCardThreeNumber = new System.Windows.Forms.TextBox();
            this.groupBox7 = new System.Windows.Forms.GroupBox();
            this.TableCardFourNumber = new System.Windows.Forms.TextBox();
            this.TableCardFourColour = new System.Windows.Forms.TextBox();
            this.groupBox8 = new System.Windows.Forms.GroupBox();
            this.TableCardFiveColour = new System.Windows.Forms.TextBox();
            this.TableCardFiveNumber = new System.Windows.Forms.TextBox();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.groupBoxBestPossibleHand = new System.Windows.Forms.GroupBox();
            this.BestHandCardFiveColour = new System.Windows.Forms.TextBox();
            this.label10 = new System.Windows.Forms.Label();
            this.BestHandCardFourColour = new System.Windows.Forms.TextBox();
            this.BestHandCardFiveNumber = new System.Windows.Forms.TextBox();
            this.label9 = new System.Windows.Forms.Label();
            this.BestHandCardThreeColour = new System.Windows.Forms.TextBox();
            this.BestHandCardFourNumber = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.BestHandCardTwoColour = new System.Windows.Forms.TextBox();
            this.BestHandCardThreeNumber = new System.Windows.Forms.TextBox();
            this.label7 = new System.Windows.Forms.Label();
            this.BestHandCardOneColour = new System.Windows.Forms.TextBox();
            this.BestHandCardTwoNumber = new System.Windows.Forms.TextBox();
            this.label6 = new System.Windows.Forms.Label();
            this.BestHandCardOneNumber = new System.Windows.Forms.TextBox();
            this.groupBox9 = new System.Windows.Forms.GroupBox();
            this.listBoxPlayers = new System.Windows.Forms.ListBox();
            this.labelPlayers = new System.Windows.Forms.Label();
            this.labelGameID = new System.Windows.Forms.Label();
            this.textBoxGameID = new System.Windows.Forms.TextBox();
            this.labelInfoText = new System.Windows.Forms.Label();
            this.groupBox1.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.groupBox4.SuspendLayout();
            this.groupBox5.SuspendLayout();
            this.groupBox6.SuspendLayout();
            this.groupBox7.SuspendLayout();
            this.groupBox8.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBoxBestPossibleHand.SuspendLayout();
            this.groupBox9.SuspendLayout();
            this.SuspendLayout();
            //
            // lableCardOne
            //
            this.lableCardOne.AutoSize = true;
            this.lableCardOne.Location = new System.Drawing.Point(95, 29);
            this.lableCardOne.Name = "lableCardOne";
            this.lableCardOne.Size = new System.Drawing.Size(52, 13);
            this.lableCardOne.TabIndex = 0;
            this.lableCardOne.Text = "Card One";
            //
            // labelCardTwo
            //
            this.labelCardTwo.AutoSize = true;
            this.labelCardTwo.Location = new System.Drawing.Point(256, 29);
            this.labelCardTwo.Name = "labelCardTwo";
            this.labelCardTwo.Size = new System.Drawing.Size(53, 13);
            this.labelCardTwo.TabIndex = 1;
            this.labelCardTwo.Text = "Card Two";
            //
            // handCardTwoNumber
            //
            this.handCardTwoNumber.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.handCardTwoNumber.Location = new System.Drawing.Point(259, 75);
            this.handCardTwoNumber.Name = "handCardTwoNumber";
            this.handCardTwoNumber.ReadOnly = true;
            this.handCardTwoNumber.Size = new System.Drawing.Size(162, 29);
            this.handCardTwoNumber.TabIndex = 2;
            //
            // handCardOneNumber
            //
            this.handCardOneNumber.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.handCardOneNumber.Location = new System.Drawing.Point(87, 75);
            this.handCardOneNumber.Name = "handCardOneNumber";
            this.handCardOneNumber.ReadOnly = true;
            this.handCardOneNumber.Size = new System.Drawing.Size(162, 29);
            this.handCardOneNumber.TabIndex = 3;
            //
            // handCardOneColour
            //
            this.handCardOneColour.Location = new System.Drawing.Point(87, 114);
            this.handCardOneColour.Name = "handCardOneColour";
            this.handCardOneColour.ReadOnly = true;
            this.handCardOneColour.Size = new System.Drawing.Size(162, 20);
            this.handCardOneColour.TabIndex = 4;
            //
            // handCardTwoColour
            //
            this.handCardTwoColour.Location = new System.Drawing.Point(259, 114);
            this.handCardTwoColour.Name = "handCardTwoColour";
            this.handCardTwoColour.ReadOnly = true;
            this.handCardTwoColour.Size = new System.Drawing.Size(162, 20);
            this.handCardTwoColour.TabIndex = 5;
            //
            // buttonPlayerReady
            //
            this.buttonPlayerReady.Enabled = false;
            this.buttonPlayerReady.Location = new System.Drawing.Point(6, 19);
            this.buttonPlayerReady.Name = "buttonPlayerReady";
            this.buttonPlayerReady.Size = new System.Drawing.Size(98, 31);
            this.buttonPlayerReady.TabIndex = 6;
            this.buttonPlayerReady.Text = "I am Ready!";
            this.buttonPlayerReady.UseVisualStyleBackColor = true;
            this.buttonPlayerReady.Click += new System.EventHandler(this.buttonPlayerReady_Click);
            //
            // TableCardOneColour
            //
            this.TableCardOneColour.Location = new System.Drawing.Point(6, 53);
            this.TableCardOneColour.Name = "TableCardOneColour";
            this.TableCardOneColour.ReadOnly = true;
            this.TableCardOneColour.Size = new System.Drawing.Size(80, 20);
            this.TableCardOneColour.TabIndex = 9;
            //
            // TableCardOneNumber
            //
            this.TableCardOneNumber.Location = new System.Drawing.Point(6, 27);
            this.TableCardOneNumber.Name = "TableCardOneNumber";
            this.TableCardOneNumber.ReadOnly = true;
            this.TableCardOneNumber.Size = new System.Drawing.Size(80, 20);
            this.TableCardOneNumber.TabIndex = 8;
            //
            // groupBox1
            //
            this.groupBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
            this.groupBox1.Controls.Add(this.buttonStartNewGame);
            this.groupBox1.Controls.Add(this.buttonJoinGame);
            this.groupBox1.Controls.Add(this.buttonNextCard);
            this.groupBox1.Controls.Add(this.buttonPlayerReady);
            this.groupBox1.Location = new System.Drawing.Point(38, 49);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(200, 277);
            this.groupBox1.TabIndex = 10;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Game Menu";
            //
            // buttonStartNewGame
            //
            this.buttonStartNewGame.Location = new System.Drawing.Point(6, 189);
            this.buttonStartNewGame.Name = "buttonStartNewGame";
            this.buttonStartNewGame.Size = new System.Drawing.Size(98, 31);
            this.buttonStartNewGame.TabIndex = 9;
            this.buttonStartNewGame.Text = "Start New Game";
            this.buttonStartNewGame.UseVisualStyleBackColor = true;
            this.buttonStartNewGame.Click += new System.EventHandler(this.buttonStartNewGame_Click);
            //
            // buttonJoinGame
            //
            this.buttonJoinGame.Location = new System.Drawing.Point(6, 229);
            this.buttonJoinGame.Name = "buttonJoinGame";
            this.buttonJoinGame.Size = new System.Drawing.Size(98, 31);
            this.buttonJoinGame.TabIndex = 8;
            this.buttonJoinGame.Text = "Join Game";
            this.buttonJoinGame.UseVisualStyleBackColor = true;
            this.buttonJoinGame.Click += new System.EventHandler(this.buttonJoinGame_Click);
            //
            // buttonNextCard
            //
            this.buttonNextCard.Enabled = false;
            this.buttonNextCard.Location = new System.Drawing.Point(58, 56);
            this.buttonNextCard.Name = "buttonNextCard";
            this.buttonNextCard.Size = new System.Drawing.Size(75, 23);
            this.buttonNextCard.TabIndex = 7;
            this.buttonNextCard.Text = "Next Card";
            this.buttonNextCard.UseVisualStyleBackColor = true;
            this.buttonNextCard.Click += new System.EventHandler(this.buttonNextCard_Click);
            //
            // groupBox2
            //
            this.groupBox2.BackColor = System.Drawing.SystemColors.ActiveBorder;
            this.groupBox2.Controls.Add(this.groupBox4);
            this.groupBox2.Controls.Add(this.groupBox5);
            this.groupBox2.Controls.Add(this.groupBox6);
            this.groupBox2.Controls.Add(this.groupBox7);
            this.groupBox2.Controls.Add(this.groupBox8);
            this.groupBox2.Location = new System.Drawing.Point(355, 47);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(580, 150);
            this.groupBox2.TabIndex = 11;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Table";
            //
            // groupBox4
            //
            this.groupBox4.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            this.groupBox4.Controls.Add(this.TableCardOneColour);
            this.groupBox4.Controls.Add(this.TableCardOneNumber);
            this.groupBox4.Location = new System.Drawing.Point(6, 36);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new System.Drawing.Size(109, 102);
            this.groupBox4.TabIndex = 22;
            this.groupBox4.TabStop = false;
            this.groupBox4.Text = "1";
            //
            // groupBox5
            //
            this.groupBox5.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            this.groupBox5.Controls.Add(this.TableCardTwoNumber);
            this.groupBox5.Controls.Add(this.TableCardTwoColour);
            this.groupBox5.Location = new System.Drawing.Point(121, 36);
            this.groupBox5.Name = "groupBox5";
            this.groupBox5.Size = new System.Drawing.Size(109, 102);
            this.groupBox5.TabIndex = 23;
            this.groupBox5.TabStop = false;
            this.groupBox5.Text = "2";
            //
            // TableCardTwoNumber
            //
            this.TableCardTwoNumber.Location = new System.Drawing.Point(6, 27);
            this.TableCardTwoNumber.Name = "TableCardTwoNumber";
            this.TableCardTwoNumber.ReadOnly = true;
            this.TableCardTwoNumber.Size = new System.Drawing.Size(80, 20);
            this.TableCardTwoNumber.TabIndex = 14;
            //
            // TableCardTwoColour
            //
            this.TableCardTwoColour.Location = new System.Drawing.Point(6, 53);
            this.TableCardTwoColour.Name = "TableCardTwoColour";
            this.TableCardTwoColour.ReadOnly = true;
            this.TableCardTwoColour.Size = new System.Drawing.Size(80, 20);
            this.TableCardTwoColour.TabIndex = 15;
            //
            // groupBox6
            //
            this.groupBox6.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            this.groupBox6.Controls.Add(this.TableCardThreeColour);
            this.groupBox6.Controls.Add(this.TableCardThreeNumber);
            this.groupBox6.Location = new System.Drawing.Point(236, 36);
            this.groupBox6.Name = "groupBox6";
            this.groupBox6.Size = new System.Drawing.Size(109, 102);
            this.groupBox6.TabIndex = 24;
            this.groupBox6.TabStop = false;
            this.groupBox6.Text = "3";
            //
            // TableCardThreeColour
            //
            this.TableCardThreeColour.Location = new System.Drawing.Point(6, 53);
            this.TableCardThreeColour.Name = "TableCardThreeColour";
            this.TableCardThreeColour.ReadOnly = true;
            this.TableCardThreeColour.Size = new System.Drawing.Size(80, 20);
            this.TableCardThreeColour.TabIndex = 12;
            //
            // TableCardThreeNumber
            //
            this.TableCardThreeNumber.Location = new System.Drawing.Point(6, 27);
            this.TableCardThreeNumber.Name = "TableCardThreeNumber";
            this.TableCardThreeNumber.ReadOnly = true;
            this.TableCardThreeNumber.Size = new System.Drawing.Size(80, 20);
            this.TableCardThreeNumber.TabIndex = 11;
            //
            // groupBox7
            //
            this.groupBox7.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            this.groupBox7.Controls.Add(this.TableCardFourNumber);
            this.groupBox7.Controls.Add(this.TableCardFourColour);
            this.groupBox7.Location = new System.Drawing.Point(351, 36);
            this.groupBox7.Name = "groupBox7";
            this.groupBox7.Size = new System.Drawing.Size(109, 102);
            this.groupBox7.TabIndex = 25;
            this.groupBox7.TabStop = false;
            this.groupBox7.Text = "4";
            //
            // TableCardFourNumber
            //
            this.TableCardFourNumber.Location = new System.Drawing.Point(6, 27);
            this.TableCardFourNumber.Name = "TableCardFourNumber";
            this.TableCardFourNumber.ReadOnly = true;
            this.TableCardFourNumber.Size = new System.Drawing.Size(80, 20);
            this.TableCardFourNumber.TabIndex = 17;
            //
            // TableCardFourColour
            //
            this.TableCardFourColour.Location = new System.Drawing.Point(6, 53);
            this.TableCardFourColour.Name = "TableCardFourColour";
            this.TableCardFourColour.ReadOnly = true;
            this.TableCardFourColour.Size = new System.Drawing.Size(80, 20);
            this.TableCardFourColour.TabIndex = 18;
            //
            // groupBox8
            //
            this.groupBox8.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            this.groupBox8.Controls.Add(this.TableCardFiveColour);
            this.groupBox8.Controls.Add(this.TableCardFiveNumber);
            this.groupBox8.Location = new System.Drawing.Point(466, 36);
            this.groupBox8.Name = "groupBox8";
            this.groupBox8.Size = new System.Drawing.Size(109, 102);
            this.groupBox8.TabIndex = 26;
            this.groupBox8.TabStop = false;
            this.groupBox8.Text = "4";
            //
            // TableCardFiveColour
            //
            this.TableCardFiveColour.Location = new System.Drawing.Point(6, 53);
            this.TableCardFiveColour.Name = "TableCardFiveColour";
            this.TableCardFiveColour.ReadOnly = true;
            this.TableCardFiveColour.Size = new System.Drawing.Size(80, 20);
            this.TableCardFiveColour.TabIndex = 21;
            //
            // TableCardFiveNumber
            //
            this.TableCardFiveNumber.Location = new System.Drawing.Point(6, 27);
            this.TableCardFiveNumber.Name = "TableCardFiveNumber";
            this.TableCardFiveNumber.ReadOnly = true;
            this.TableCardFiveNumber.Size = new System.Drawing.Size(80, 20);
            this.TableCardFiveNumber.TabIndex = 20;
            //
            // groupBox3
            //
            this.groupBox3.BackColor = System.Drawing.Color.Turquoise;
            this.groupBox3.Controls.Add(this.handCardTwoColour);
            this.groupBox3.Controls.Add(this.lableCardOne);
            this.groupBox3.Controls.Add(this.handCardOneColour);
            this.groupBox3.Controls.Add(this.labelCardTwo);
            this.groupBox3.Controls.Add(this.handCardOneNumber);
            this.groupBox3.Controls.Add(this.handCardTwoNumber);
            this.groupBox3.Location = new System.Drawing.Point(407, 340);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(500, 159);
            this.groupBox3.TabIndex = 12;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Your Hand";
            //
            // groupBoxBestPossibleHand
            //
            this.groupBoxBestPossibleHand.BackColor = System.Drawing.Color.Violet;
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardFiveColour);
            this.groupBoxBestPossibleHand.Controls.Add(this.label10);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardFourColour);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardFiveNumber);
            this.groupBoxBestPossibleHand.Controls.Add(this.label9);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardThreeColour);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardFourNumber);
            this.groupBoxBestPossibleHand.Controls.Add(this.label8);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardTwoColour);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardThreeNumber);
            this.groupBoxBestPossibleHand.Controls.Add(this.label7);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardOneColour);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardTwoNumber);
            this.groupBoxBestPossibleHand.Controls.Add(this.label6);
            this.groupBoxBestPossibleHand.Controls.Add(this.BestHandCardOneNumber);
            this.groupBoxBestPossibleHand.Location = new System.Drawing.Point(1046, 47);
            this.groupBoxBestPossibleHand.Name = "groupBoxBestPossibleHand";
            this.groupBoxBestPossibleHand.Size = new System.Drawing.Size(310, 482);
            this.groupBoxBestPossibleHand.TabIndex = 13;
            this.groupBoxBestPossibleHand.TabStop = false;
            this.groupBoxBestPossibleHand.Text = "Best Possible Hand";
            //
            // BestHandCardFiveColour
            //
            this.BestHandCardFiveColour.Location = new System.Drawing.Point(124, 387);
            this.BestHandCardFiveColour.Name = "BestHandCardFiveColour";
            this.BestHandCardFiveColour.ReadOnly = true;
            this.BestHandCardFiveColour.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardFiveColour.TabIndex = 24;
            //
            // label10
            //
            this.label10.AutoSize = true;
            this.label10.Location = new System.Drawing.Point(158, 345);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(13, 13);
            this.label10.TabIndex = 22;
            this.label10.Text = "5";
            //
            // BestHandCardFourColour
            //
            this.BestHandCardFourColour.Location = new System.Drawing.Point(124, 308);
            this.BestHandCardFourColour.Name = "BestHandCardFourColour";
            this.BestHandCardFourColour.ReadOnly = true;
            this.BestHandCardFourColour.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardFourColour.TabIndex = 24;
            //
            // BestHandCardFiveNumber
            //
            this.BestHandCardFiveNumber.Location = new System.Drawing.Point(124, 361);
            this.BestHandCardFiveNumber.Name = "BestHandCardFiveNumber";
            this.BestHandCardFiveNumber.ReadOnly = true;
            this.BestHandCardFiveNumber.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardFiveNumber.TabIndex = 23;
            //
            // label9
            //
            this.label9.AutoSize = true;
            this.label9.Location = new System.Drawing.Point(158, 266);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(13, 13);
            this.label9.TabIndex = 22;
            this.label9.Text = "4";
            //
            // BestHandCardThreeColour
            //
            this.BestHandCardThreeColour.Location = new System.Drawing.Point(124, 233);
            this.BestHandCardThreeColour.Name = "BestHandCardThreeColour";
            this.BestHandCardThreeColour.ReadOnly = true;
            this.BestHandCardThreeColour.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardThreeColour.TabIndex = 24;
            //
            // BestHandCardFourNumber
            //
            this.BestHandCardFourNumber.Location = new System.Drawing.Point(124, 282);
            this.BestHandCardFourNumber.Name = "BestHandCardFourNumber";
            this.BestHandCardFourNumber.ReadOnly = true;
            this.BestHandCardFourNumber.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardFourNumber.TabIndex = 23;
            //
            // label8
            //
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(158, 191);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(13, 13);
            this.label8.TabIndex = 22;
            this.label8.Text = "3";
            //
            // BestHandCardTwoColour
            //
            this.BestHandCardTwoColour.Location = new System.Drawing.Point(124, 158);
            this.BestHandCardTwoColour.Name = "BestHandCardTwoColour";
            this.BestHandCardTwoColour.ReadOnly = true;
            this.BestHandCardTwoColour.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardTwoColour.TabIndex = 24;
            //
            // BestHandCardThreeNumber
            //
            this.BestHandCardThreeNumber.Location = new System.Drawing.Point(124, 207);
            this.BestHandCardThreeNumber.Name = "BestHandCardThreeNumber";
            this.BestHandCardThreeNumber.ReadOnly = true;
            this.BestHandCardThreeNumber.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardThreeNumber.TabIndex = 23;
            //
            // label7
            //
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(158, 116);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(13, 13);
            this.label7.TabIndex = 22;
            this.label7.Text = "2";
            //
            // BestHandCardOneColour
            //
            this.BestHandCardOneColour.Location = new System.Drawing.Point(124, 80);
            this.BestHandCardOneColour.Name = "BestHandCardOneColour";
            this.BestHandCardOneColour.ReadOnly = true;
            this.BestHandCardOneColour.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardOneColour.TabIndex = 24;
            //
            // BestHandCardTwoNumber
            //
            this.BestHandCardTwoNumber.Location = new System.Drawing.Point(124, 132);
            this.BestHandCardTwoNumber.Name = "BestHandCardTwoNumber";
            this.BestHandCardTwoNumber.ReadOnly = true;
            this.BestHandCardTwoNumber.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardTwoNumber.TabIndex = 23;
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(158, 38);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(13, 13);
            this.label6.TabIndex = 22;
            this.label6.Text = "1";
            //
            // BestHandCardOneNumber
            //
            this.BestHandCardOneNumber.Location = new System.Drawing.Point(124, 54);
            this.BestHandCardOneNumber.Name = "BestHandCardOneNumber";
            this.BestHandCardOneNumber.ReadOnly = true;
            this.BestHandCardOneNumber.Size = new System.Drawing.Size(80, 20);
            this.BestHandCardOneNumber.TabIndex = 23;
            //
            // groupBox9
            //
            this.groupBox9.Controls.Add(this.listBoxPlayers);
            this.groupBox9.Controls.Add(this.labelPlayers);
            this.groupBox9.Controls.Add(this.labelGameID);
            this.groupBox9.Controls.Add(this.textBoxGameID);
            this.groupBox9.Location = new System.Drawing.Point(38, 355);
            this.groupBox9.Name = "groupBox9";
            this.groupBox9.Size = new System.Drawing.Size(356, 206);
            this.groupBox9.TabIndex = 15;
            this.groupBox9.TabStop = false;
            this.groupBox9.Text = "INFO";
            //
            // listBoxPlayers
            //
            this.listBoxPlayers.FormattingEnabled = true;
            this.listBoxPlayers.Location = new System.Drawing.Point(81, 75);
            this.listBoxPlayers.Name = "listBoxPlayers";
            this.listBoxPlayers.Size = new System.Drawing.Size(252, 56);
            this.listBoxPlayers.TabIndex = 18;
            //
            // labelPlayers
            //
            this.labelPlayers.AutoSize = true;
            this.labelPlayers.Location = new System.Drawing.Point(32, 75);
            this.labelPlayers.Name = "labelPlayers";
            this.labelPlayers.Size = new System.Drawing.Size(41, 13);
            this.labelPlayers.TabIndex = 17;
            this.labelPlayers.Text = "Players";
            //
            // labelGameID
            //
            this.labelGameID.AutoSize = true;
            this.labelGameID.Location = new System.Drawing.Point(29, 46);
            this.labelGameID.Name = "labelGameID";
            this.labelGameID.Size = new System.Drawing.Size(46, 13);
            this.labelGameID.TabIndex = 16;
            this.labelGameID.Text = "GameID";
            //
            // textBoxGameID
            //
            this.textBoxGameID.ForeColor = System.Drawing.SystemColors.HotTrack;
            this.textBoxGameID.Location = new System.Drawing.Point(81, 40);
            this.textBoxGameID.Name = "textBoxGameID";
            this.textBoxGameID.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.textBoxGameID.Size = new System.Drawing.Size(252, 20);
            this.textBoxGameID.TabIndex = 15;
            //
            // labelInfoText
            //
            this.labelInfoText.AutoSize = true;
            this.labelInfoText.Location = new System.Drawing.Point(594, 257);
            this.labelInfoText.Name = "labelInfoText";
            this.labelInfoText.Size = new System.Drawing.Size(32, 13);
            this.labelInfoText.TabIndex = 16;
            this.labelInfoText.Text = "INFO";
            //
            // TexasHoldemApp
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1368, 593);
            this.Controls.Add(this.labelInfoText);
            this.Controls.Add(this.groupBox9);
            this.Controls.Add(this.groupBoxBestPossibleHand);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.groupBox3);
            this.Name = "TexasHoldemApp";
            this.Text = "Form1";
            this.groupBox1.ResumeLayout(false);
            this.groupBox2.ResumeLayout(false);
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            this.groupBox5.ResumeLayout(false);
            this.groupBox5.PerformLayout();
            this.groupBox6.ResumeLayout(false);
            this.groupBox6.PerformLayout();
            this.groupBox7.ResumeLayout(false);
            this.groupBox7.PerformLayout();
            this.groupBox8.ResumeLayout(false);
            this.groupBox8.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.groupBoxBestPossibleHand.ResumeLayout(false);
            this.groupBoxBestPossibleHand.PerformLayout();
            this.groupBox9.ResumeLayout(false);
            this.groupBox9.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label lableCardOne;
        private System.Windows.Forms.Label labelCardTwo;
        private System.Windows.Forms.TextBox handCardTwoNumber;
        private System.Windows.Forms.TextBox handCardOneNumber;
        private System.Windows.Forms.TextBox handCardOneColour;
        private System.Windows.Forms.TextBox handCardTwoColour;
        private System.Windows.Forms.Button buttonPlayerReady;
        private System.Windows.Forms.TextBox TableCardOneColour;
        private System.Windows.Forms.TextBox TableCardOneNumber;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.GroupBox groupBox2;
        private System.Windows.Forms.GroupBox groupBox3;
        private System.Windows.Forms.TextBox TableCardFiveColour;
        private System.Windows.Forms.TextBox TableCardFiveNumber;
        private System.Windows.Forms.TextBox TableCardFourColour;
        private System.Windows.Forms.TextBox TableCardFourNumber;
        private System.Windows.Forms.TextBox TableCardTwoColour;
        private System.Windows.Forms.TextBox TableCardTwoNumber;
        private System.Windows.Forms.Button buttonNextCard;
        private System.Windows.Forms.GroupBox groupBoxBestPossibleHand;
        private System.Windows.Forms.TextBox BestHandCardFiveColour;
        private System.Windows.Forms.Label label10;
        private System.Windows.Forms.TextBox BestHandCardFourColour;
        private System.Windows.Forms.TextBox BestHandCardFiveNumber;
        private System.Windows.Forms.Label label9;
        private System.Windows.Forms.TextBox BestHandCardThreeColour;
        private System.Windows.Forms.TextBox BestHandCardFourNumber;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.TextBox BestHandCardTwoColour;
        private System.Windows.Forms.TextBox BestHandCardThreeNumber;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.TextBox BestHandCardOneColour;
        private System.Windows.Forms.TextBox BestHandCardTwoNumber;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.TextBox BestHandCardOneNumber;
        private System.Windows.Forms.GroupBox groupBox4;
        private System.Windows.Forms.GroupBox groupBox5;
        private System.Windows.Forms.GroupBox groupBox6;
        private System.Windows.Forms.TextBox TableCardThreeColour;
        private System.Windows.Forms.TextBox TableCardThreeNumber;
        private System.Windows.Forms.GroupBox groupBox7;
        private System.Windows.Forms.GroupBox groupBox8;
        private System.Windows.Forms.Button buttonJoinGame;
        private System.Windows.Forms.GroupBox groupBox9;
        private System.Windows.Forms.TextBox textBoxGameID;
        private System.Windows.Forms.ListBox listBoxPlayers;
        private System.Windows.Forms.Label labelPlayers;
        private System.Windows.Forms.Label labelGameID;
        private System.Windows.Forms.Label labelInfoText;
        private System.Windows.Forms.Button buttonStartNewGame;
    }
}


text:
/*
 * displayboxa.c
 *
 *        displayboxa filein width fileout [fontdir]
 *
 *   This reads a boxa from file and generates a composite view of the
 *   boxes, one per "page", tiled in rows.
 *   The pix that backs each box is chosen to be the minimum size that
 *   supports every box in the boxa.  Each pix (and the box it backs)
 *   is scaled so that the pix width is @width in pixels.
 *   If @fontdir is specified, the number of each box is written below it.
 *
 *   The minimum allowed width of the backing pix is 30, and the default
 *   width is 100.
 */

#include "allheaders.h"

int main(int    argc,
         char **argv)
{
char        *filein, *fileout, *fontdir;
l_int32      w, h, width, sep;
l_float32    scalefact;
L_BMF       *bmf;
BOXA        *boxa1, *boxa2;
PIX         *pixd;
static char  mainName[] = "displayboxa";

    if (argc != 4 && argc != 5) {
        fprintf(stderr, "Syntax error in displayboxa:\n"
           "   displayboxa filein width fileout [fontdir]\n");
         return 1;
    }

    filein = argv[1];
    fileout = argv[3];
    fontdir = (argc == 4) ? NULL : argv[4];
    width = atoi(argv[2]);
    if (width < 30) {
        L_ERROR("width too small; setting to 100\n", mainName);
        width = 100;
    }

    if ((boxa1 = boxaRead(filein)) == NULL)
        return ERROR_INT("boxa not made", mainName, 1);
    boxaGetExtent(boxa1, &w, &h, NULL);
    scalefact = (l_float32)width / (l_float32)w;
    boxa2 = boxaTransform(boxa1, 0, 0, scalefact, scalefact);
    sep = L_MIN(width / 5, 20);
    pixd = boxaDisplayTiled(boxa2, NULL, 1500, 2, 1.0, 0, sep, 2, fontdir);
    pixWrite(fileout, pixd, IFF_PNG);
    pixDisplay(pixd, 100, 100);

    boxaDestroy(&boxa1);
    boxaDestroy(&boxa2);
    pixDestroy(&pixd);
    return 0;
}