text:
package com.basho.riak.client.itest;

import static org.junit.Assert.*;

import org.apache.commons.httpclient.URIException;

import com.basho.riak.client.request.RequestMeta;
import com.basho.riak.client.response.HttpResponse;

public class Utils {

    public static RequestMeta WRITE_3_REPLICAS() { return RequestMeta.writeParams(3, 3); }

    public static void assertSuccess(HttpResponse response) {
        if (!response.isSuccess()) {
            StringBuilder msg = new StringBuilder("Failed ");
            msg.append(response.getHttpMethod().getName()).append(" ");
            try {
                msg.append(response.getHttpMethod().getURI().toString());
            } catch (URIException e) {
                msg.append(response.getHttpMethod().getPath());
            }
            msg.append(" -- ")
                .append(response.getHttpMethod().getStatusLine()).append("; ")
                .append("Response headers: ").append(response.getHttpHeaders().toString()).append("; ")
                .append("Response body: ").append(response.getBody());
            fail(msg.toString());
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

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

#### Published in
Mycologia 25: 345 (1933)

#### Original name
Paspalomyces Linder

### Remarks
null


text:
/* -----------------------------------------------------------------------------
 *
 * (c) The GHC Team, 2006-2009
 *
 * The RTS stores some "global" values on behalf of libraries, so that
 * some libraries can ensure that certain top-level things are shared
 * even when multiple versions of the library are loaded.  e.g. see
 * Data.Typeable and GHC.Conc.
 *
 * ---------------------------------------------------------------------------*/

#ifndef GLOBALS_H
#define GLOBALS_H

RTS_PRIVATE void initGlobalStore(void);
RTS_PRIVATE void exitGlobalStore(void);

#endif


text:
@interface PodsDummy_Pods_HRLEngine_Tests : NSObject
@end
@implementation PodsDummy_Pods_HRLEngine_Tests
@end


text:
// File Name: createEventMessage.c
//
// Written By: Danny Kent (jaus AT dannykent DOT com), Tom Galluzzo (galluzzo AT gmail DOT com)
//
// Version: 3.3.0b
//
// Date: 09/08/09
//
// Description: This file defines the functionality of a CreateEventMessage

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "jaus.h"

static const int commandCode = JAUS_CREATE_EVENT;
static const int maxDataSizeBytes = 512000; // Max Message size: 500K

static JausBoolean headerFromBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes);
static JausBoolean headerToBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes);
static int headerToString(CreateEventMessage message, char **buf);

static JausBoolean dataFromBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes);
static int dataToBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes);
static void dataInitialize(CreateEventMessage message);
static void dataDestroy(CreateEventMessage message);
static unsigned int dataSize(CreateEventMessage message);

// ************************************************************************************************************** //
//                                    USER CONFIGURED FUNCTIONS
// ************************************************************************************************************** //

// Initializes the message-specific fields
static void dataInitialize(CreateEventMessage message)
{
	// Set initial values of message fields

	message->presenceVector = newJausByte(JAUS_BYTE_PRESENCE_VECTOR_ALL_ON);	// 1: Presence Vector
	message->requestId = newJausByte(0);					// Local request ID for use in confirm event
	message->reportMessageCode = newJausUnsignedShort(0);	// Command Code of the resulting report
	message->eventType = newJausByte(0);					// Enumeration of Event types
	message->eventBoundary = newJausByte(0);				// Enumeration of Event Boundary Conditions
	message->limitDataField = newJausByte(0);				// Field from Report for Limit Trigger
	message->lowerLimit = jausEventLimitCreate();			// Lower Event Limit
	message->lowerLimit->dataType = EVENT_LIMIT_BYTE_TYPE;
	message->upperLimit = jausEventLimitCreate();			// Upper Event Limit
	message->upperLimit->dataType = EVENT_LIMIT_BYTE_TYPE;
	message->stateLimit = jausEventLimitCreate();			// State Event Limit used for Equal Boundary
	message->stateLimit->dataType = EVENT_LIMIT_BYTE_TYPE;
	message->requestedMinimumRate = newJausDouble(0.0);		// For Periodic Events for unchanging value, Scaled UnsignedShort (0, 1092)
	message->requestedUpdateRate = newJausDouble(0.0);		// For Periodic Events, Scaled UnsignedShort (0, 1092)
	message->queryMessage = NULL;							// Query Message (not including header) to use for response
}

// Destructs the message-specific fields
static void dataDestroy(CreateEventMessage message)
{
	// Free message fields
	if(message->queryMessage) jausMessageDestroy(message->queryMessage);
	if(message->lowerLimit) jausEventLimitDestroy(message->lowerLimit);
	if(message->upperLimit) jausEventLimitDestroy(message->upperLimit);
	if(message->stateLimit) jausEventLimitDestroy(message->stateLimit);
}

// Return boolean of success
static JausBoolean dataFromBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes)
{
	int index = 0;
	JausUnsignedShort tempUShort;
	JausUnsignedInteger queryMessageSize;

	if(bufferSizeBytes == message->dataSize)
	{
		// Unpack Message Fields from Buffer
		// Presence Vector
		if(!jausByteFromBuffer(&message->presenceVector, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_BYTE_SIZE_BYTES;

		// Request ID
		if(!jausByteFromBuffer(&message->requestId, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_BYTE_SIZE_BYTES;

		// Report Message Code
		if(!jausUnsignedShortFromBuffer(&message->reportMessageCode, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;

		// Event Type
		if(!jausByteFromBuffer(&message->eventType, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_BYTE_SIZE_BYTES;

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_BOUNDARY_BIT))
		{
			// Event Boundary
			if(!jausByteFromBuffer(&message->eventBoundary, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_BYTE_SIZE_BYTES;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_DATA_FIELD_BIT))
		{
			// Limit Data Field
			if(!jausByteFromBuffer(&message->limitDataField, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_BYTE_SIZE_BYTES;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_LOWER_LIMIT_BIT))
		{
			// Lower Limit
			if(!jausEventLimitFromBuffer(&message->lowerLimit, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += jausEventLimitSize(message->lowerLimit);
		}
		else
		{
			message->lowerLimit = NULL;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_UPPER_LIMIT_BIT))
		{
			// Upper Limit
			if(!jausEventLimitFromBuffer(&message->upperLimit, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += jausEventLimitSize(message->upperLimit);
		}
		else
		{
			message->upperLimit = NULL;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_STATE_LIMIT_BIT))
		{
			// State Limit
			if(!jausEventLimitFromBuffer(&message->stateLimit, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += jausEventLimitSize(message->stateLimit);
		}
		else
		{
			message->stateLimit = NULL;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_MINIMUM_RATE_BIT))
		{
			// Minimum Periodic Rate
			if(!jausUnsignedShortFromBuffer(&tempUShort, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;

			// Scaled Int (0, 1092);
			message->requestedMinimumRate = jausUnsignedShortToDouble(tempUShort, 0, 1092);
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_REQUESTED_RATE_BIT))
		{
			// Periodic Rate
			if(!jausUnsignedShortFromBuffer(&tempUShort, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;

			// Scaled Int (0, 1092);
			message->requestedUpdateRate = jausUnsignedShortToDouble(tempUShort, 0, 1092);
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_QUERY_MESSAGE_BIT))
		{
			// Query Message Size
			if(!jausUnsignedIntegerFromBuffer(&queryMessageSize, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_UNSIGNED_INTEGER_SIZE_BYTES;

			// Query Message Body
			if(bufferSizeBytes-index < queryMessageSize) return JAUS_FALSE;

			// Setup our Query Message
			message->queryMessage = jausMessageCreate();
			if(!message->queryMessage) return JAUS_FALSE;

			message->queryMessage->dataSize = queryMessageSize;
			jausAddressCopy(message->queryMessage->source, message->source);
			jausAddressCopy(message->queryMessage->destination, message->destination);

			message->queryMessage->commandCode = jausMessageGetComplementaryCommandCode(message->reportMessageCode);

			// Allocate Memory
			message->queryMessage->data = (unsigned char *) malloc(queryMessageSize);

			// Copy query message body to the data member
			memcpy(message->queryMessage->data, buffer+index, queryMessageSize);
			index += queryMessageSize;
		}
		return JAUS_TRUE;
	}
	else
	{
		return JAUS_FALSE;
	}
}

// Returns number of bytes put into the buffer
static int dataToBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes)
{
	int index = 0;
	JausUnsignedShort tempUShort;

	if(bufferSizeBytes >= dataSize(message))
	{
		// Unpack Message Fields from Buffer
		// Presence Vector
		if(!jausByteToBuffer(message->presenceVector, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_BYTE_SIZE_BYTES;

		// Request Id
		if(!jausByteToBuffer(message->requestId, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_BYTE_SIZE_BYTES;

		// Message Code
		if(!jausUnsignedShortToBuffer(message->reportMessageCode, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;

		// Event Type
		if(!jausByteToBuffer(message->eventType, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
		index += JAUS_BYTE_SIZE_BYTES;

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_BOUNDARY_BIT))
		{
			// Event Boundary
			if(!jausByteToBuffer(message->eventBoundary, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_BYTE_SIZE_BYTES;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_DATA_FIELD_BIT))
		{
			// Data Field
			if(!jausByteToBuffer(message->limitDataField, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_BYTE_SIZE_BYTES;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_LOWER_LIMIT_BIT))
		{
			// Lower Limit
			if(!jausEventLimitToBuffer(message->lowerLimit, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += jausEventLimitSize(message->lowerLimit);
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_UPPER_LIMIT_BIT))
		{
			// Upper Limit
			if(!jausEventLimitToBuffer(message->upperLimit, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += jausEventLimitSize(message->upperLimit);
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_STATE_LIMIT_BIT))
		{
			// State Limit
			if(!jausEventLimitToBuffer(message->stateLimit, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += jausEventLimitSize(message->stateLimit);
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_MINIMUM_RATE_BIT))
		{
			// Scaled Int (0, 1092);
			tempUShort = jausUnsignedShortFromDouble(message->requestedMinimumRate, 0, 1092);

			// Minimum Periodic Rate
			if(!jausUnsignedShortToBuffer(tempUShort, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_REQUESTED_RATE_BIT))
		{
			// Scaled Int (0, 1092);
			tempUShort = jausUnsignedShortFromDouble(message->requestedUpdateRate, 0, 1092);

			// Minimum Periodic Rate
			if(!jausUnsignedShortToBuffer(tempUShort, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
			index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;
		}

		if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_QUERY_MESSAGE_BIT))
		{
			//Query Message Size
			if(message->queryMessage)
			{
				if(!jausUnsignedIntegerToBuffer(message->queryMessage->dataSize, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
				index += JAUS_UNSIGNED_INTEGER_SIZE_BYTES;

				// Query Message Body
				if(bufferSizeBytes-index < message->queryMessage->dataSize) return JAUS_FALSE;
				memcpy(buffer+index, message->queryMessage->data, message->queryMessage->dataSize);
				index += message->queryMessage->dataSize;
			}
			else
			{
				if(!jausUnsignedIntegerToBuffer(0, buffer+index, bufferSizeBytes-index)) return JAUS_FALSE;
				index += JAUS_UNSIGNED_INTEGER_SIZE_BYTES;
			}
		}
	}

	return index;
}

static int dataToString(CreateEventMessage message, char **buf)
{
  //message already verified

  //Setup temporary string buffer
  unsigned int bufSize = 1000;
  char* lowerLimitStr = NULL;
  char* upperLimitStr = NULL;
  char* stateLimitStr = NULL;
  char* msgString = NULL;

  (*buf) = (char*)malloc(sizeof(char)*bufSize);

  strcpy((*buf), "\nPresence Vector: " );

  jausByteToHexString(message->presenceVector, (*buf)+strlen(*buf));

  strcat((*buf), "\nRequest Id: " );

  jausByteToString(message->requestId, (*buf)+strlen(*buf));

  strcat((*buf), "\nMessage Code: " );

  jausUnsignedShortToString(message->reportMessageCode, (*buf)+strlen(*buf));

  strcat((*buf), "\nEvent Type: " );

  jausByteToString(message->eventType, (*buf)+strlen(*buf));

  switch(message->eventType)
  {
  case EVENT_PERIODIC_TYPE:
    strcat((*buf), " Periodic(SC)");
    break;

  case EVENT_EVERY_CHANGE_TYPE:
    strcat((*buf), " Every Change");
    break;

  case EVENT_FIRST_CHANGE_TYPE:
    strcat((*buf), " First Change");
    break;

  case EVENT_FIRST_CHANGE_IN_AND_OUT_TYPE:
    strcat((*buf), " First change in and out of boundary");
    break;

  case EVENT_PERIODIC_NO_REPEAT_TYPE:
    strcat((*buf), " Periodic w/o replacement");
    break;

  case EVENT_ONE_TIME_ON_DEMAND_TYPE:
    strcat((*buf), " One time, on demand");
    break;
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_BOUNDARY_BIT))
  {
    strcat((*buf), "\nEvent Boundary: " );

    jausByteToString(message->eventBoundary, (*buf)+strlen(*buf));

    switch(message->eventBoundary)
    {
    case EQUAL_BOUNDARY:
      strcat((*buf), " Equal");
      break;

    case NOT_EQUAL_BOUNDARY:
      strcat((*buf), " Not Equal");
      break;

    case INSIDE_INCLUSIVE_BOUNDARY:
      strcat((*buf), " Inside Inclusive");
      break;

    case INSIDE_EXCLUSIVE_BOUNDARY:
      strcat((*buf), " Inside Exclusive");
      break;

    case OUTSIDE_INCLUSIVE_BOUNDARY:
      strcat((*buf), " Outside Inclusive");
      break;

    case OUTSIDE_EXCLUSIVE_BOUNDARY:
      strcat((*buf), " Outside Exclusive");
      break;

    case GREATER_THAN_OR_EQUAL_BOUNDARY:
      strcat((*buf), " Greater than or Equal");
      break;

    case GREATER_THAN_BOUNDARY:
      strcat((*buf), " Strictly Greater than");
      break;

    case LESS_THAN_OR_EQUAL_BOUNDARY:
      strcat((*buf), " Less than or Equal");
      break;

    case LESS_THAN_BOUNDARY:
      strcat((*buf), " Strictly Less than");
      break;
    }
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_DATA_FIELD_BIT))
  {
    strcat((*buf), "\nLimit Data Field: " );

    jausByteToString(message->limitDataField, (*buf)+strlen(*buf));
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_LOWER_LIMIT_BIT))
  {
    strcat((*buf), "\nLower Limit\n" );

    lowerLimitStr = jausEventLimitToString(message->lowerLimit);
    strcat((*buf), lowerLimitStr);
    free(lowerLimitStr);
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_UPPER_LIMIT_BIT))
  {
    strcat((*buf), "\nUpper Limit\n" );

    upperLimitStr = jausEventLimitToString(message->upperLimit);
    strcat((*buf), upperLimitStr);
    free(upperLimitStr);
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_STATE_LIMIT_BIT))
  {
    strcat((*buf), "\nState Limit\n" );

    stateLimitStr = jausEventLimitToString(message->stateLimit);
    strcat((*buf), stateLimitStr);
    free(stateLimitStr);
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_MINIMUM_RATE_BIT))
  {
    strcat((*buf), "\nRequested Minimum Periodic Rate(Hz): " );
    jausDoubleToString(message->requestedMinimumRate, (*buf)+strlen(*buf));
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_REQUESTED_RATE_BIT))
  {
    strcat((*buf), "\nRequested Periodic Update Rate(Hz): " );
    jausDoubleToString(message->requestedUpdateRate, (*buf)+strlen(*buf));
  }

  if(jausByteIsBitSet(message->presenceVector, UPDATE_EVENT_PV_QUERY_MESSAGE_BIT))
  {
    strcat((*buf), "\nQuery Message" );
    msgString = jausMessageToString(message->queryMessage);
    strcat((*buf), msgString);
    free(msgString);
  }

  return (int)strlen(*buf);
}

// Returns number of bytes put into the buffer
static unsigned int dataSize(CreateEventMessage message)
{
	int index = 0;

	// Presence Vector
	index += JAUS_BYTE_SIZE_BYTES;

	// Request ID
	index += JAUS_BYTE_SIZE_BYTES;

	// Message Code
	index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;

	// Event Type
	index += JAUS_BYTE_SIZE_BYTES;

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_BOUNDARY_BIT))
	{
		index += JAUS_BYTE_SIZE_BYTES;
	}

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_DATA_FIELD_BIT))
	{
		index += JAUS_BYTE_SIZE_BYTES;
	}

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_LOWER_LIMIT_BIT))
	{
		index += jausEventLimitSize(message->lowerLimit);
	}

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_UPPER_LIMIT_BIT))
	{
		index += jausEventLimitSize(message->upperLimit);
	}

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_STATE_LIMIT_BIT))
	{
		index += jausEventLimitSize(message->stateLimit);
	}

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_MINIMUM_RATE_BIT))
	{
		index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;
	}

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_REQUESTED_RATE_BIT))
	{
		index += JAUS_UNSIGNED_SHORT_SIZE_BYTES;
	}

	if(jausByteIsBitSet(message->presenceVector, CREATE_EVENT_PV_QUERY_MESSAGE_BIT))
	{
		index += JAUS_UNSIGNED_INTEGER_SIZE_BYTES;

		// Jaus Message
		if(message->queryMessage) index += message->queryMessage->dataSize;
	}

	return index;
}

// ************************************************************************************************************** //
//                                    NON-USER CONFIGURED FUNCTIONS
// ************************************************************************************************************** //

CreateEventMessage createEventMessageCreate(void)
{
	CreateEventMessage message;

	message = (CreateEventMessage)malloc( sizeof(CreateEventMessageStruct) );
	if(message == NULL)
	{
		return NULL;
	}

	// Initialize Values
	message->properties.priority = JAUS_DEFAULT_PRIORITY;
	message->properties.ackNak = JAUS_ACK_NAK_NOT_REQUIRED;
	message->properties.scFlag = JAUS_NOT_SERVICE_CONNECTION_MESSAGE;
	message->properties.expFlag = JAUS_NOT_EXPERIMENTAL_MESSAGE;
	message->properties.version = JAUS_VERSION_3_3;
	message->properties.reserved = 0;
	message->commandCode = commandCode;
	message->destination = jausAddressCreate();
	message->source = jausAddressCreate();
	message->dataFlag = JAUS_SINGLE_DATA_PACKET;
	message->dataSize = maxDataSizeBytes;
	message->sequenceNumber = 0;

	dataInitialize(message);
	message->dataSize = dataSize(message);

	return message;
}

void createEventMessageDestroy(CreateEventMessage message)
{
	dataDestroy(message);
	jausAddressDestroy(message->source);
	jausAddressDestroy(message->destination);
	free(message);
	message = NULL;
}

JausBoolean createEventMessageFromBuffer(CreateEventMessage message, unsigned char* buffer, unsigned int bufferSizeBytes)
{
	int index = 0;

	if(headerFromBuffer(message, buffer+index, bufferSizeBytes-index))
	{
		index += JAUS_HEADER_SIZE_BYTES;
		if(dataFromBuffer(message, buffer+index, bufferSizeBytes-index))
		{
			return JAUS_TRUE;
		}
		else
		{
			return JAUS_FALSE;
		}
	}
	else
	{
		return JAUS_FALSE;
	}
}

JausBoolean createEventMessageToBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes)
{
	if(bufferSizeBytes < createEventMessageSize(message))
	{
		return JAUS_FALSE; //improper size
	}
	else
	{
		message->dataSize = dataToBuffer(message, buffer+JAUS_HEADER_SIZE_BYTES, bufferSizeBytes - JAUS_HEADER_SIZE_BYTES);
		if(headerToBuffer(message, buffer, bufferSizeBytes))
		{
			return JAUS_TRUE;
		}
		else
		{
			return JAUS_FALSE; // headerToCreateEventBuffer failed
		}
	}
}

CreateEventMessage createEventMessageFromJausMessage(JausMessage jausMessage)
{
	CreateEventMessage message;

	if(jausMessage->commandCode != commandCode)
	{
		return NULL; // Wrong message type
	}
	else
	{
		message = (CreateEventMessage)malloc( sizeof(CreateEventMessageStruct) );
		if(message == NULL)
		{
			return NULL;
		}

		message->properties.priority = jausMessage->properties.priority;
		message->properties.ackNak = jausMessage->properties.ackNak;
		message->properties.scFlag = jausMessage->properties.scFlag;
		message->properties.expFlag = jausMessage->properties.expFlag;
		message->properties.version = jausMessage->properties.version;
		message->properties.reserved = jausMessage->properties.reserved;
		message->commandCode = jausMessage->commandCode;
		message->destination = jausAddressCreate();
		*message->destination = *jausMessage->destination;
		message->source = jausAddressCreate();
		*message->source = *jausMessage->source;
		message->dataSize = jausMessage->dataSize;
		message->dataFlag = jausMessage->dataFlag;
		message->sequenceNumber = jausMessage->sequenceNumber;

		// Unpack jausMessage->data
		if(dataFromBuffer(message, jausMessage->data, jausMessage->dataSize))
		{
			return message;
		}
		else
		{
			return NULL;
		}
	}
}

JausMessage createEventMessageToJausMessage(CreateEventMessage message)
{
	JausMessage jausMessage;

	jausMessage = (JausMessage)malloc( sizeof(struct JausMessageStruct) );
	if(jausMessage == NULL)
	{
		return NULL;
	}

	jausMessage->properties.priority = message->properties.priority;
	jausMessage->properties.ackNak = message->properties.ackNak;
	jausMessage->properties.scFlag = message->properties.scFlag;
	jausMessage->properties.expFlag = message->properties.expFlag;
	jausMessage->properties.version = message->properties.version;
	jausMessage->properties.reserved = message->properties.reserved;
	jausMessage->commandCode = message->commandCode;
	jausMessage->destination = jausAddressCreate();
	*jausMessage->destination = *message->destination;
	jausMessage->source = jausAddressCreate();
	*jausMessage->source = *message->source;
	jausMessage->dataSize = dataSize(message);
	jausMessage->dataFlag = message->dataFlag;
	jausMessage->sequenceNumber = message->sequenceNumber;

	jausMessage->data = (unsigned char *)malloc(jausMessage->dataSize);
	jausMessage->dataSize = dataToBuffer(message, jausMessage->data, jausMessage->dataSize);

	return jausMessage;
}

unsigned int createEventMessageSize(CreateEventMessage message)
{
	return (unsigned int)(dataSize(message) + JAUS_HEADER_SIZE_BYTES);
}

char* createEventMessageToString(CreateEventMessage message)
{
  if(message)
  {
    char* buf1 = NULL;
    char* buf2 = NULL;
    char* buf = NULL;

    int returnVal;

    //Print the message header to the string buffer
    returnVal = headerToString(message, &buf1);

    //Print the message data fields to the string buffer
    returnVal += dataToString(message, &buf2);

buf = (char*)malloc(strlen(buf1)+strlen(buf2)+1);
    strcpy(buf, buf1);
    strcat(buf, buf2);

    free(buf1);
    free(buf2);

    return buf;
  }
  else
  {
    char* buf = "Invalid CreateEvent Message";
    char* msg = (char*)malloc(strlen(buf)+1);
    strcpy(msg, buf);
    return msg;
  }
}
//********************* PRIVATE HEADER FUNCTIONS **********************//

static JausBoolean headerFromBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes)
{
	if(bufferSizeBytes < JAUS_HEADER_SIZE_BYTES)
	{
		return JAUS_FALSE;
	}
	else
	{
		// unpack header
		message->properties.priority = (buffer[0] & 0x0F);
		message->properties.ackNak	 = ((buffer[0] >> 4) & 0x03);
		message->properties.scFlag	 = ((buffer[0] >> 6) & 0x01);
		message->properties.expFlag	 = ((buffer[0] >> 7) & 0x01);
		message->properties.version	 = (buffer[1] & 0x3F);
		message->properties.reserved = ((buffer[1] >> 6) & 0x03);

		message->commandCode = buffer[2] + (buffer[3] << 8);

		message->destination->instance = buffer[4];
		message->destination->component = buffer[5];
		message->destination->node = buffer[6];
		message->destination->subsystem = buffer[7];

		message->source->instance = buffer[8];
		message->source->component = buffer[9];
		message->source->node = buffer[10];
		message->source->subsystem = buffer[11];

		message->dataSize = buffer[12] + ((buffer[13] & 0x0F) << 8);

		message->dataFlag = ((buffer[13] >> 4) & 0x0F);

		message->sequenceNumber = buffer[14] + (buffer[15] << 8);

		return JAUS_TRUE;
	}
}

static JausBoolean headerToBuffer(CreateEventMessage message, unsigned char *buffer, unsigned int bufferSizeBytes)
{
	JausUnsignedShort *propertiesPtr = (JausUnsignedShort*)&message->properties;

	if(bufferSizeBytes < JAUS_HEADER_SIZE_BYTES)
	{
		return JAUS_FALSE;
	}
	else
	{
		buffer[0] = (unsigned char)(*propertiesPtr & 0xFF);
		buffer[1] = (unsigned char)((*propertiesPtr & 0xFF00) >> 8);

		buffer[2] = (unsigned char)(message->commandCode & 0xFF);
		buffer[3] = (unsigned char)((message->commandCode & 0xFF00) >> 8);

		buffer[4] = (unsigned char)(message->destination->instance & 0xFF);
		buffer[5] = (unsigned char)(message->destination->component & 0xFF);
		buffer[6] = (unsigned char)(message->destination->node & 0xFF);
		buffer[7] = (unsigned char)(message->destination->subsystem & 0xFF);

		buffer[8] = (unsigned char)(message->source->instance & 0xFF);
		buffer[9] = (unsigned char)(message->source->component & 0xFF);
		buffer[10] = (unsigned char)(message->source->node & 0xFF);
		buffer[11] = (unsigned char)(message->source->subsystem & 0xFF);

		buffer[12] = (unsigned char)(message->dataSize & 0xFF);
		buffer[13] = (unsigned char)((message->dataFlag & 0xFF) << 4) | (unsigned char)((message->dataSize & 0x0F00) >> 8);

		buffer[14] = (unsigned char)(message->sequenceNumber & 0xFF);
		buffer[15] = (unsigned char)((message->sequenceNumber & 0xFF00) >> 8);

		return JAUS_TRUE;
	}
}

static int headerToString(CreateEventMessage message, char **buf)
{
  //message existance already verified

  //Setup temporary string buffer

  unsigned int bufSize = 500;
  (*buf) = (char*)malloc(sizeof(char)*bufSize);

  strcpy((*buf), jausCommandCodeString(message->commandCode) );
  strcat((*buf), " (0x");
  sprintf((*buf)+strlen(*buf), "%04X", message->commandCode);

  strcat((*buf), ")\nReserved: ");
  jausUnsignedShortToString(message->properties.reserved, (*buf)+strlen(*buf));

  strcat((*buf), "\nVersion: ");
  switch(message->properties.version)
  {
    case 0:
      strcat((*buf), "2.0 and 2.1 compatible");
      break;
    case 1:
      strcat((*buf), "3.0 through 3.1 compatible");
      break;
    case 2:
      strcat((*buf), "3.2 and 3.3 compatible");
      break;
    default:
      strcat((*buf), "Reserved for Future: ");
      jausUnsignedShortToString(message->properties.version, (*buf)+strlen(*buf));
      break;
  }

  strcat((*buf), "\nExp. Flag: ");
  if(message->properties.expFlag == 0)
    strcat((*buf), "Not Experimental");
  else
    strcat((*buf), "Experimental");

  strcat((*buf), "\nSC Flag: ");
  if(message->properties.scFlag == 1)
    strcat((*buf), "Service Connection");
  else
    strcat((*buf), "Not Service Connection");

  strcat((*buf), "\nACK/NAK: ");
  switch(message->properties.ackNak)
  {
  case 0:
    strcat((*buf), "None");
    break;
  case 1:
    strcat((*buf), "Request ack/nak");
    break;
  case 2:
    strcat((*buf), "nak response");
    break;
  case 3:
    strcat((*buf), "ack response");
    break;
  default:
    break;
  }

  strcat((*buf), "\nPriority: ");
  if(message->properties.priority < 12)
  {
    strcat((*buf), "Normal Priority ");
    jausUnsignedShortToString(message->properties.priority, (*buf)+strlen(*buf));
  }
  else
  {
    strcat((*buf), "Safety Critical Priority ");
    jausUnsignedShortToString(message->properties.priority, (*buf)+strlen(*buf));
  }

  strcat((*buf), "\nSource: ");
  jausAddressToString(message->source, (*buf)+strlen(*buf));

  strcat((*buf), "\nDestination: ");
  jausAddressToString(message->destination, (*buf)+strlen(*buf));

  strcat((*buf), "\nData Size: ");
  jausUnsignedIntegerToString(message->dataSize, (*buf)+strlen(*buf));

  strcat((*buf), "\nData Flag: ");
  jausUnsignedIntegerToString(message->dataFlag, (*buf)+strlen(*buf));
  switch(message->dataFlag)
  {
    case 0:
      strcat((*buf), " Only data packet in single-packet stream");
      break;
    case 1:
      strcat((*buf), " First data packet in muti-packet stream");
      break;
    case 2:
      strcat((*buf), " Normal data packet");
      break;
    case 4:
      strcat((*buf), " Retransmitted data packet");
      break;
    case 8:
      strcat((*buf), " Last data packet in stream");
      break;
    default:
      strcat((*buf), " Unrecognized data flag code");
      break;
  }

  strcat((*buf), "\nSequence Number: ");
  jausUnsignedShortToString(message->sequenceNumber, (*buf)+strlen(*buf));

  return (int)strlen(*buf);

}


text:
package main

import (
	"github.com/sorintlab/stolon/cmd/sentinel/cmd"
)

func main() {
	cmd.Execute()
}


text:
<?xml version="1.0"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://jboss.org/schema/arquillian"
    xsi:schemaLocation="http://jboss.org/schema/arquillian
    http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

  <!-- We have to bind the docker hostname and port, otherwise RMI will choose a random port, which we can't forward to the docker host.
   RMI is a difficult protocol to configure :(.    -->

    <extension qualifier="docker">
        <property name="serverVersion">${docker.api.version}</property>
        <property name="serverUri">${docker.api.url}</property>
        <property name="definitionFormat">COMPOSE</property>
        <property name="dockerContainersFile">docker-compose.yml</property>
    </extension>

    <container qualifier="tomcat">
        <configuration>
            <property name="user">admin</property>
            <property name="pass">mypass</property>
        </configuration>
    </container>
</arquillian>


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Scada.Web {

    public partial class WFrmEvents {

        /// <summary>
        /// EventsForm control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlForm EventsForm;

        /// <summary>
        /// lblEvents control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Label lblEvents;

        /// <summary>
        /// rbEvAll control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.RadioButton rbEvAll;

        /// <summary>
        /// rbEvView control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.RadioButton rbEvView;

        /// <summary>
        /// chkEvPause control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.CheckBox chkEvPause;

        /// <summary>
        /// lblEvPause control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Label lblEvPause;
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

  <title>CApplication.ApplicationForm</title>
  <link href="css/style.css" rel="stylesheet" type="text/css">
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >

    Concept Framework 2.2 documentation
  	Contents | Index

CApplication.ApplicationForm

     Name
     Type
     Access
     Version
     Deprecated

     ApplicationForm
     property
     public
     version 1.0
     no

Prototype:

Read/Write property ApplicationForm[=RForm]

Description:

Sets or gets the main form for the application. This property should not be set (is set by the constructor).

Returns:

Returns a RForm representing the main form of the application. If no form is set, it returns null.

Documented by Eduard Suica, generation time: Sun Jan 27 18:15:11 2013
 GMT	(c)2013 Devronium Applications


text:
<?php

namespace Romeroqe\AdminTools\Models;

use Illuminate\Database\Eloquent\Model;

class ExceptionHandler extends Model
{
	protected $table = 'admintools_exception_handler';

    protected $fillable = ['uri','message','code','file','line','trace','reduced','status'];
}


text:
namespace SSS_Windows_Forms.Forms.Tutor
{
    partial class TutorDashboardModal
    {
        /// <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.components = new System.ComponentModel.Container();
            this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer();
            this.IS2G10_DBSSSDataSetBindingSource = new System.Windows.Forms.BindingSource(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.IS2G10_DBSSSDataSetBindingSource)).BeginInit();
            this.SuspendLayout();
            //
            // reportViewer1
            //
            this.reportViewer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.reportViewer1.LocalReport.ReportEmbeddedResource = "SSS_Windows_Forms.Reports.Tutor.TutorDashboardReport.rdlc";
            this.reportViewer1.Location = new System.Drawing.Point(0, 0);
            this.reportViewer1.Name = "reportViewer1";
            this.reportViewer1.ShowToolBar = false;
            this.reportViewer1.Size = new System.Drawing.Size(753, 539);
            this.reportViewer1.TabIndex = 0;
            //
            // IS2G10_DBSSSDataSetBindingSource
            //
            this.IS2G10_DBSSSDataSetBindingSource.DataMember = "AVERAGE_RATINGS";
            //
            // TutorDashboardModal
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(753, 539);
            this.ControlBox = false;
            this.Controls.Add(this.reportViewer1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "TutorDashboardModal";
            this.Text = "TutorDashboardModal";
            this.Load += new System.EventHandler(this.TutorDashboardModal_Load);
            this.VisibleChanged += new System.EventHandler(this.TutorDashboardModal_VisibleChanged);
            ((System.ComponentModel.ISupportInitialize)(this.IS2G10_DBSSSDataSetBindingSource)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private Microsoft.Reporting.WinForms.ReportViewer reportViewer1;
        private System.Windows.Forms.BindingSource IS2G10_DBSSSDataSetBindingSource;
    }
}


text:
package pro.foundev.calculations

import org.apache.spark.rdd.RDD
import pro.foundev.dto.{SessionReport, IpLog}

/**
 * interface for Log Calculation
 */
trait LogCalculator extends Serializable{

  def sessionReport(table: RDD[IpLog]):SessionReport
}


text:
@class UIImage;

@interface CHChatMessageLocationVM : CHChatMessageFileVM<CHChatMessageViewModelProtocol>
@property (nonatomic ,readonly) double longitude;
@property (nonatomic ,readonly) double latitude;
@property (nonatomic ,readonly) CLLocationCoordinate2D coor;
@property (nonatomic ,readonly) NSString *areaDetail;
@property (nonatomic ,readonly) NSString *areaName;
@property (nonatomic ,readonly) UIImage *snapshot;
@end


text:
package ch.bastiangardel.easypay.exception;

public class CheckOutNotFoundException extends RuntimeException {

    public CheckOutNotFoundException(String message){
        super(message);
    }
}


text:
import * as React from 'react';
import { useUtils } from './useUtils';
import { ParseableDate } from '../constants/prop-types';
import { PickerOnChangeFn } from './useViews';
import { getMeridiem, convertToMeridiem } from '../time-utils';

export type OverrideParseableDateProps<TDate, TProps, TKey extends keyof TProps> = Omit<
  TProps,
  TKey
> &
  Partial<Record<TKey, ParseableDate<TDate>>>;

export function useParsedDate<TDate>(
  possiblyUnparsedValue: ParseableDate<TDate>,
): TDate | undefined {
  const utils = useUtils<TDate>();
  return React.useMemo(
    () =>
      typeof possiblyUnparsedValue === 'undefined' ? undefined : utils.date(possiblyUnparsedValue)!,
    [possiblyUnparsedValue, utils],
  );
}

interface MonthValidationOptions {
  disablePast?: boolean;
  disableFuture?: boolean;
  minDate: unknown;
  maxDate: unknown;
}

export function useNextMonthDisabled(
  month: unknown,
  { disableFuture, maxDate }: Pick<MonthValidationOptions, 'disableFuture' | 'maxDate'>,
) {
  const utils = useUtils();
  return React.useMemo(() => {
    const now = utils.date();
    const lastEnabledMonth = utils.startOfMonth(
      disableFuture && utils.isBefore(now, maxDate) ? now : maxDate,
    );
    return !utils.isAfter(lastEnabledMonth, month);
  }, [disableFuture, maxDate, month, utils]);
}

export function usePreviousMonthDisabled(
  month: unknown,
  { disablePast, minDate }: Pick<MonthValidationOptions, 'disablePast' | 'minDate'>,
) {
  const utils = useUtils();

  return React.useMemo(() => {
    const now = utils.date();
    const firstEnabledMonth = utils.startOfMonth(
      disablePast && utils.isAfter(now, minDate) ? now : minDate,
    );
    return !utils.isBefore(firstEnabledMonth, month);
  }, [disablePast, minDate, month, utils]);
}

export function useMeridiemMode<TDate>(
  date: TDate,
  ampm: boolean | undefined,
  onChange: PickerOnChangeFn<TDate>,
) {
  const utils = useUtils<TDate>();
  const meridiemMode = getMeridiem(date, utils);

  const handleMeridiemChange = React.useCallback(
    (mode: 'am' | 'pm') => {
      const timeWithMeridiem = convertToMeridiem<TDate>(date, mode, Boolean(ampm), utils);
      onChange(timeWithMeridiem, 'shallow');
    },
    [ampm, date, onChange, utils],
  );

  return { meridiemMode, handleMeridiemChange };
}


text:
#include <iostream>

#include "eval.h"
#include "env.h"
#include "load.h"
#include "utils.h"

namespace
{
using namespace mclisp;

ConsCell *Evcon(const ConsCell *clauses, ConsCell *env)
{
  TYPECHECK(clauses, Listp);

  if (Null(clauses))
    return kNil;

  TYPECHECK(Car(clauses), Consp);

  if (*Eval(Caar(clauses), env))
    return Eval(Cadar(clauses), env);

  return Evcon(Cdr(clauses), env);
}

ConsCell* Evlis(ConsCell* lst, ConsCell* env)
{
  TYPECHECK(lst, Listp);

  if (Null(lst))
    return kNil;

  return Cons(Eval(Car(lst), env), Evlis(Cdr(lst), env));
}
} // namespace

namespace mclisp
{

ConsCell *Eval(const ConsCell *exp, ConsCell *env /* env::g_user_env */)
{
  if (Atom(exp))
    return env::Lookup(env, exp);

  if (Atom(Car(exp)))
  {
    if (EQ(Car(exp), QUOTE))
      return Cadr(exp);

    if (EQ(Car(exp), ATOM))
      return FromBool(Atom(Eval(Cadr(exp), env)));

    if (EQ(Car(exp), EQ))
      return FromBool(Eq(Eval(Cadr(exp), env), Eval(Caddr(exp), env)));

    if (EQ(Car(exp), COND))
      return Evcon(Cdr(exp), env);

    if (EQ(Car(exp), CAR))
      return Car(Eval(Cadr(exp), env));

    if (EQ(Car(exp), CDR))
      return Cdr(Eval(Cadr(exp), env));

    if (EQ(Car(exp), CONS))
      return Cons(Eval(Cadr(exp), env), Eval(Caddr(exp), env));

    if (EQ(Car(exp), DEFUN))
    {
      ConsCell *fname = Cadr(exp);
      ConsCell *formals = Caddr(exp);
      ConsCell *body = Cdddr(exp);
      ConsCell *lambda = Append(List(BUILTIN(LAMBDA), formals), body);
      env::g_user_env = env::Extend(env::g_user_env, fname, lambda);
      return fname;
    }

    if (EQ(Car(exp), EVAL))
      return Eval(Eval(Cadr(exp), env), env);

    if (EQ(Car(exp), LOAD))
    {
      // We append ".lisp" because '.' can't be a valid symbol character (since
      // symbols can have whitespace and '.' is also used for dotted lists).
      LoadFile(ToLower(SymbolName(Eval(Cadr(exp), env))) + ".lisp");
      return kNil;
    }

    if (EQ(Car(exp), PRINT))
    {
      ConsCell *v = Eval(Cadr(exp), env);
      std::cerr << *v << std::endl;
      return v;
    }

    return Eval(Cons(env::Lookup(env, Car(exp)), Cdr(exp)), env);
  }

  if (EQ(Caar(exp), LABEL))
    return Eval(Cons(Caddar(exp), Cdr(exp)),
                env::Extend(env, Cadar(exp), Car(exp)));

  if (EQ(Caar(exp), LAMBDA))
  {
    ConsCell *body = Caddar(exp);
    ConsCell *formals = Cadar(exp);
    ConsCell *parameters = Cdr(exp);

    if (Listp(formals))
      PARITY_CHECK(formals, parameters);

    // The double Listp check is wasteful, but I think it makes the code easier
    // to read.
    auto extendfn = Listp(formals) ? env::ExtendAll : env::Extend;
    ConsCell *values = Evlis(parameters, env);
    ConsCell *newenv = extendfn(env, formals, values);

    return Eval(body, newenv);
  }

  ERROR("Invalid expression: " + ToString(exp));
}

} // namespace mclisp


text:
<?php

namespace Phalcon\Logger {

	/**
	 * Phalcon\Logger\Item
	 *
	 * Represents each item in a logging transaction
	 *
	 */

	class Item {

		protected $_type;

		protected $_message;

		protected $_time;

		protected $_context;

		/**
		 * \Phalcon\Logger\Item constructor
		 *
		 * @param string $message
		 * @param integer $type
		 * @param integer $time
		 */
		public function __construct($message, $type, $time=null){ }

		/**
		 * Returns the message
		 *
		 * @return string
		 */
		public function getMessage(){ }

		/**
		 * Returns the log type
		 *
		 * @return integer
		 */
		public function getType(){ }

		/**
		 * Returns log timestamp
		 *
		 * @return integer
		 */
		public function getTime(){ }

		public function getContext(){ }

	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Airports | KTI Online</title>
	<meta http-equiv="content-language" content="en" />
	<meta name="description" content="KCI Terminal Renovations            Charles B. Wheeler Downtown Airport            KCI Taxiway Rehab..." />
<meta name="keywords" content="" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/sites/default/files/blueprint_favicon.gif" type="image/x-icon" />
  <link type="text/css" rel="stylesheet" media="all" href="/modules/node/node.css" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/user/user.css" />
<link type="text/css" rel="stylesheet" media="screen,projection" href="/themes/blueprint/blueprint/blueprint/screen.css" />
<link type="text/css" rel="stylesheet" media="screen,projection" href="/themes/blueprint/css/blueprint.css" />
<link type="text/css" rel="stylesheet" media="screen,projection" href="/themes/blueprint/css/style.css" />
<link type="text/css" rel="stylesheet" media="print" href="/themes/blueprint/blueprint/blueprint/print.css" />

Kruger Technologies, Inc.

Client Login

Home

Home

About

History

Locations

Values

Careers

Services

Construction Services

Geotechnical

Environmental

Experience

GSA

Military/Government

Design/Build

Education

Commercial

Airports

Infrastructure

Public Works

People

Contact Us

Airports

KCI Terminal Renovations

Charles B. Wheeler Downtown Airport

KCI Taxiway Rehabilitations

Lee's Summit Municipal Airport

Airports

Airports are unique because of the more stringent requirements for the strength of materials and the frequency of testing and inspection.  Special equipment is required for testing the strength of concrete used in runways and taxiways.  Because of these aspects, KTI employs technicians that are devoted exclusively to aviation related projects.  In the past seven years alone, KTI has participated in construction projects at 38 different airports in Kansas and Missouri, and our experience and capabilities are unsurpassed.

Home   |         About   |   Services   |   Experience   |   People   |   Contact Us   |   Client Login   |   Privacy Policy

KTI is recognized by the Small Business Administration as a SBE.   KTI labs have been inspected and validated by the U.S. Army Corps of Engineers.

To access the machine-readable files created and published by BlueKC, please click
here.

© 2009-2017 Kruger Technologies, Inc. All rights reserved.


text:
static const uint64_t PRIMES[] = {
    108641969, 116049371, 125925907, 133333309, 145678979, 175308587, 197530793, 234567803,
    251851741, 264197411, 330864029, 399999781, 407407183, 459258997, 479012069, 545678687,
    560493491, 607407037, 629629243, 656789717, 716048933, 718518067, 725925469, 733332871,
    753085943, 755555077, 782715551, 790122953, 812345159, 814814293, 893826581, 923456189,
    940740127, 953085797, 985184539, 990122807};
static const uint64_t PRIMES_SIZE = sizeof(PRIMES) / sizeof(PRIMES[0]);

// Calculate hashes of ngrams that preceeds word_index in the sentence
//
// Fills ngram_hashes array with numbers in {0, 1, ..., max_hash_index - 1}
// If add_padding then dummy -1 words are added to the beginning of the sentence
// Return the number of indices filled (maybe less than maxent_order
// for a few first sentence words if add_padding is false)
int CalculateMaxentHashIndices(
    const WordIndex *sen, int word_index,
    int maxent_order, uint64_t max_hash_index,
    bool add_padding,
    uint64_t ngram_hashes[MAX_NGRAM_ORDER]);

class MaxEnt {
 public:
  enum LearningMethod {kSGD, kAdaGrad, kFTRL};

  static const LearningMethod kLearningMethod = kSGD;
  static const size_t kStride = (kLearningMethod == kSGD) ? 1 : (kLearningMethod == kFTRL ? 3 : 2);
  static const Real kAdaGradPower = 0.5;

  MaxEnt() : hash_size_(0), storage_(NULL) {
    // empty constructor
  }

  void Init(size_t hash_size);

  ~MaxEnt();

  void DumpWeights(std::vector<Real>* weights) const;

  Real GetValue(size_t feature_index) const {
    return storage_[feature_index * kStride];
  }

  Real operator()(size_t feature_index) const {
    return GetValue(feature_index);
  }

  bool IsNull(size_t feature_index) const {
    return std::abs(GetValue(feature_index)) < 1e-6;
  }

  void UpdateValue(size_t feature_index, Real learning_rate, Real antigrad, Real l2) {
    if (kLearningMethod == kAdaGrad) {
      Real& n = storage_[feature_index * kStride + 1];
      n += antigrad * antigrad;
      Real adarate = n;
      if (kAdaGradPower == 0.5) {
        adarate = std::sqrt(adarate);
      } else if (kAdaGradPower != 1) {
        adarate = std::pow(adarate, kAdaGradPower);
      }
      learning_rate /= adarate;
      Real& weight = storage_[feature_index * kStride];
      weight += learning_rate * antigrad - weight * l2;
    } else if (kLearningMethod == kFTRL) {
      // TODO: add a separate parameter for l1
      const Real l1 = l2;
      FTRLUpdate(feature_index, learning_rate, antigrad, l1, l2);
    } else {
      // SGD by default
      storage_[feature_index] += learning_rate * antigrad - storage_[feature_index] * l2;
    }
  }

  void Dump(FILE* fo) const;

  void Load(FILE* fo);

 private:
  size_t hash_size_;
  Real* storage_;

  void FTRLUpdate(size_t feature_index, Real learning_rate, Real antigrad, Real l1, Real l2) {
    // see http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41159.pdf
    const Real alpha = learning_rate;
    const Real beta = 0;

    Real& w = storage_[feature_index * kStride];
    Real& n = storage_[feature_index * kStride + 1];
    Real& z = storage_[feature_index * kStride + 2];

    Real sigma = (std::sqrt(n + antigrad * antigrad) - std::sqrt(n)) / alpha;
    z -= antigrad + sigma * w;
    n += antigrad * antigrad;

    Real sign = (z < 0) ? -1 : 1;
    if (sign * z > l1) {
      w = (sign * l1 - z) / ((beta + std::sqrt(n)) / alpha + l2);
    } else {
      w = 0;
    }
  }
};

inline int CalculateMaxentHashIndices(
    const WordIndex *sen, int word_index,
    int maxent_order, uint64_t max_hash,
    bool add_padding,
    uint64_t ngram_hashes[MAX_NGRAM_ORDER]) {

  int maxent_present = (maxent_order > word_index + 1 && !add_padding) ? word_index + 1 : maxent_order;

  if (maxent_present) {
    // (order < maxent_present) <--> (order < maxent_order && order <= word_index)
    for (int order = 0; order < maxent_present; ++order) {
      ngram_hashes[order] = PRIMES[0] * PRIMES[1];
      for (int i = 1; i <= order; ++i) {
        uint64_t word = (word_index - i >= 0) ? sen[word_index - i] : -1;
        ngram_hashes[order] += PRIMES[(order * PRIMES[i] + i) % PRIMES_SIZE] * (word + 1);
      }
      ngram_hashes[order] = ngram_hashes[order] % max_hash;
    }
  }
  return maxent_present;
}

#endif  // FASTER_RNNLM_MAXENT_H_


text:
<?php

namespace Hochstrasser\Wirecard\Request\Seamless\Frontend;

use Hochstrasser\Wirecard\Request\AbstractWirecardRequest;

class ReadDataStorageRequest extends AbstractWirecardRequest
{
    protected $requiredParameters = ['storageId'];
    protected $fingerprintOrder = ['storageId'];
    protected $endpoint = 'https://checkout.wirecard.com/seamless/dataStorage/read';
    protected $resultClass = 'Hochstrasser\Wirecard\Model\Seamless\Frontend\DataStorageReadResult';

    static function withStorageId($storageId)
    {
        $request = new static();
        $request->setStorageId($storageId);

        return $request;
    }

    function setStorageId($storageId)
    {
        return $this->addParam('storageId', $storageId);
    }
}


text:
package uk.co.harrymartland.multijmx.service.commandline;

import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.ParseException;
import uk.co.harrymartland.multijmx.service.options.OptionsService;

@Singleton
public class CommandLineServiceImpl implements CommandLineService {

    private CommandLine commandLine;
    private CommandLineParser commandLineParser;
    private Provider<OptionsService> optionsService;

    @Inject
    public CommandLineServiceImpl(CommandLineParser commandLineParser, Provider<OptionsService> optionsService) {
        this.commandLineParser = commandLineParser;
        this.optionsService = optionsService;
    }

    @Override
    public CommandLine get() {
        if (commandLine == null) {
            throw new IllegalStateException("Command line not set!");
        }
        return commandLine;
    }

    @Override
    public CommandLine create(String[] args) throws ParseException {
        if (commandLine != null) {
            throw new IllegalStateException("Command line already set!");
        }
        return commandLine = commandLineParser.parse(optionsService.get().getOptions(), args);
    }
}


text:
module MATLAB

using Libdl
using SparseArrays

import Base: eltype, close, size, copy, ndims, unsafe_convert

# mxarray
export MxArray, mxClassID, mxComplexity,
       mxclassid, data_ptr,
       classid, nrows, ncols, nelems, elsize

export is_double, is_single,
       is_int8, is_uint8, is_int16, is_uint16,
       is_int32, is_uint32, is_int64, is_uint64,
       is_numeric, is_complex, is_sparse, is_empty,
       is_logical, is_char, is_struct, is_cell

export mxarray, mxsparse, delete,
       mxcellarray, get_cell, set_cell,
       mxstruct, mxstructarray, mxnfields, get_fieldname, get_field, set_field,
       jvalue, jarray, jscalar, jvector, jmatrix, jsparse, jstring, jdict

# engine & matfile
export MSession, MatFile,
       get_default_msession, restart_default_msession, close_default_msession,
       eval_string, get_mvariable, get_variable, put_variable, put_variables,
       variable_names, read_matfile, write_matfile,
       mxcall,
       @mput, @mget, @mat_str

if Sys.iswindows()
    export show_msession, hide_msession, get_msession_visiblity
end

const depsfile = joinpath(dirname(@__DIR__), "deps", "deps.jl")
if isfile(depsfile)
    include(depsfile)
else
    error("MATLAB is not properly installed. Please run Pkg.build(\"MATLAB\") and restart Julia.")
end

# exceptions
struct MEngineError <: Exception
    message::String
end

include("init.jl") # initialize Refs
include("mxarray.jl")
include("matfile.jl")
include("engine.jl")
include("matstr.jl")

if Sys.iswindows()
    # workaround "primary message table for module 77" error
    # creates a dummy Engine session and keeps it open so the libraries used by all other
    # Engine clients are not loaded and unloaded repeatedly
    # see: https://www.mathworks.com/matlabcentral/answers/305877-what-is-the-primary-message-table-for-module-77

    # initialization is delayed untill first call to MSession
    const persistent_msession_ref = Ref{MSession}()
    const persistent_msession_assigned = Ref(false)

    function assign_persistent_msession()
        if persistent_msession_assigned[] == false
            persistent_msession_assigned[] = true
            persistent_msession_ref[] = MSession(0)
        end
    end
end

# helper library access function
engfunc(fun::Symbol) = Libdl.dlsym(libeng[], fun)
mxfunc(fun::Symbol)  = Libdl.dlsym(libmx[], fun)
matfunc(fun::Symbol) = Libdl.dlsym(libmat[], fun)

function __init__()
    check_deps()

    if libmx_size > 0 # non-zero size library path

    # load libraries

    libmx[]  = Libdl.dlopen(joinpath(matlab_libpath, "libmx"), Libdl.RTLD_GLOBAL)
    libmat[] = Libdl.dlopen(joinpath(matlab_libpath, "libmat"), Libdl.RTLD_GLOBAL)
    libeng[] = Libdl.dlopen(joinpath(matlab_libpath, "libeng"), Libdl.RTLD_GLOBAL)

    # engine functions

    eng_open[]          = engfunc(:engOpen)
    eng_close[]         = engfunc(:engClose)
    eng_set_visible[]   = engfunc(:engSetVisible)
    eng_get_visible[]   = engfunc(:engGetVisible)
    eng_output_buffer[] = engfunc(:engOutputBuffer)
    eng_eval_string[]   = engfunc(:engEvalString)
    eng_put_variable[]  = engfunc(:engPutVariable)
    eng_get_variable[]  = engfunc(:engGetVariable)

    # mxarray functions

    mx_destroy_array[]   = mxfunc(:mxDestroyArray)
    mx_duplicate_array[] = mxfunc(:mxDuplicateArray)

    # load functions to access mxarray

    mx_free[]         = mxfunc(:mxFree)

    mx_get_classid[]  = mxfunc(:mxGetClassID)
    mx_get_m[]        = mxfunc(:mxGetM)
    mx_get_n[]        = mxfunc(:mxGetN)
    mx_get_nelems[]   = mxfunc(:mxGetNumberOfElements)
    mx_get_ndims[]    = mxfunc(:mxGetNumberOfDimensions_730)
    mx_get_elemsize[] = mxfunc(:mxGetElementSize)
    mx_get_data[]     = mxfunc(:mxGetData)
    mx_get_dims[]     = mxfunc(:mxGetDimensions_730)
    mx_get_nfields[]  = mxfunc(:mxGetNumberOfFields)
    mx_get_pr[]       = mxfunc(:mxGetPr)
    mx_get_pi[]       = mxfunc(:mxGetPi)
    mx_get_ir[]       = mxfunc(:mxGetIr_730)
    mx_get_jc[]       = mxfunc(:mxGetJc_730)

    mx_is_double[]    = mxfunc(:mxIsDouble)
    mx_is_single[]    = mxfunc(:mxIsSingle)
    mx_is_int64[]     = mxfunc(:mxIsInt64)
    mx_is_uint64[]    = mxfunc(:mxIsUint64)
    mx_is_int32[]     = mxfunc(:mxIsInt32)
    mx_is_uint32[]    = mxfunc(:mxIsUint32)
    mx_is_int16[]     = mxfunc(:mxIsInt16)
    mx_is_uint16[]    = mxfunc(:mxIsUint16)
    mx_is_int8[]      = mxfunc(:mxIsInt8)
    mx_is_uint8[]     = mxfunc(:mxIsUint8)
    mx_is_char[]      = mxfunc(:mxIsChar)

    mx_is_numeric[]   = mxfunc(:mxIsNumeric)
    mx_is_logical[]   = mxfunc(:mxIsLogical)
    mx_is_complex[]   = mxfunc(:mxIsComplex)
    mx_is_sparse[]    = mxfunc(:mxIsSparse)
    mx_is_empty[]     = mxfunc(:mxIsEmpty)
    mx_is_struct[]    = mxfunc(:mxIsStruct)
    mx_is_cell[]      = mxfunc(:mxIsCell)

    # load functions to create & delete MATLAB array

    mx_create_numeric_matrix[]   = mxfunc(:mxCreateNumericMatrix_730)
    mx_create_numeric_array[]    = mxfunc(:mxCreateNumericArray_730)

    mx_create_double_scalar[]  = mxfunc(:mxCreateDoubleScalar)
    mx_create_logical_scalar[] = mxfunc(:mxCreateLogicalScalar)

    mx_create_sparse[]         = mxfunc(:mxCreateSparse_730)
    mx_create_sparse_logical[] = mxfunc(:mxCreateSparseLogicalMatrix_730)

    mx_create_string[]         = mxfunc(:mxCreateString)
    mx_create_char_array[]     = mxfunc(:mxCreateCharArray_730)

    mx_create_cell_array[]     = mxfunc(:mxCreateCellArray_730)

    mx_create_struct_matrix[]  = mxfunc(:mxCreateStructMatrix_730)
    mx_create_struct_array[]   = mxfunc(:mxCreateStructArray_730)

    mx_get_cell[]              = mxfunc(:mxGetCell_730)
    mx_set_cell[]              = mxfunc(:mxSetCell_730)

    mx_get_field[]             = mxfunc(:mxGetField_730)
    mx_set_field[]             = mxfunc(:mxSetField_730)
    mx_get_field_bynum[]       = mxfunc(:mxGetFieldByNumber_730)
    mx_get_fieldname[]         = mxfunc(:mxGetFieldNameByNumber)

    mx_get_string[]            = mxfunc(:mxGetString_730)

    # load I/O mat functions

    mat_open[]         = matfunc(:matOpen)
    mat_close[]        = matfunc(:matClose)
    mat_get_variable[] = matfunc(:matGetVariable)
    mat_put_variable[] = matfunc(:matPutVariable)
    mat_get_dir[]      = matfunc(:matGetDir)

    end
end

###########################################################
#
#   deprecations
#
###########################################################

end


text:
package org.apache.flink.streaming.connectors.kafka;

import org.apache.flink.streaming.util.serialization.JSONKeyValueDeserializationSchema;

import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode;

import org.junit.Assert;
import org.junit.Test;

import java.io.IOException;

/**
 * Tests for the{@link JSONKeyValueDeserializationSchema}.
 */
public class JSONKeyValueDeserializationSchemaTest {
	@Test
	public void testDeserializeWithoutMetadata() throws IOException {
		ObjectMapper mapper = new ObjectMapper();
		ObjectNode initialKey = mapper.createObjectNode();
		initialKey.put("index", 4);
		byte[] serializedKey = mapper.writeValueAsBytes(initialKey);

		ObjectNode initialValue = mapper.createObjectNode();
		initialValue.put("word", "world");
		byte[] serializedValue = mapper.writeValueAsBytes(initialValue);

		JSONKeyValueDeserializationSchema schema = new JSONKeyValueDeserializationSchema(false);
		ObjectNode deserializedValue = schema.deserialize(serializedKey, serializedValue, "", 0, 0);

		Assert.assertTrue(deserializedValue.get("metadata") == null);
		Assert.assertEquals(4, deserializedValue.get("key").get("index").asInt());
		Assert.assertEquals("world", deserializedValue.get("value").get("word").asText());
	}

	@Test
	public void testDeserializeWithMetadata() throws IOException {
		ObjectMapper mapper = new ObjectMapper();
		ObjectNode initialKey = mapper.createObjectNode();
		initialKey.put("index", 4);
		byte[] serializedKey = mapper.writeValueAsBytes(initialKey);

		ObjectNode initialValue = mapper.createObjectNode();
		initialValue.put("word", "world");
		byte[] serializedValue = mapper.writeValueAsBytes(initialValue);

		JSONKeyValueDeserializationSchema schema = new JSONKeyValueDeserializationSchema(true);
		ObjectNode deserializedValue = schema.deserialize(serializedKey, serializedValue, "topic#1", 3, 4);

		Assert.assertEquals(4, deserializedValue.get("key").get("index").asInt());
		Assert.assertEquals("world", deserializedValue.get("value").get("word").asText());
		Assert.assertEquals("topic#1", deserializedValue.get("metadata").get("topic").asText());
		Assert.assertEquals(4, deserializedValue.get("metadata").get("offset").asInt());
		Assert.assertEquals(3, deserializedValue.get("metadata").get("partition").asInt());
	}
}


text:
package com.jetbrains.python.run;

import com.intellij.execution.filters.Filter;
import com.intellij.execution.filters.OpenFileHyperlinkInfo;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.Nullable;

import java.io.File;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author yole
 */
public class PythonTracebackFilter implements Filter {
  private final Project myProject;
  private final String myWorkingDirectory;
  private final Pattern myMatchingPattern = Pattern.compile("File \"([^\"]+)\", line (\\d+)");

  public PythonTracebackFilter(Project project) {
    myProject = project;
    myWorkingDirectory = null;
  }

  public PythonTracebackFilter(Project project, @Nullable String workingDirectory) {
    myProject = project;
    myWorkingDirectory = workingDirectory;
  }

  public Result applyFilter(String line, int entireLength) {
    //   File "C:\Progs\Crack\psidc\scummdc.py", line 72, in ?
    Matcher matcher = myMatchingPattern.matcher(line);
    if (matcher.find()) {
      String fileName = matcher.group(1).replace('\\', '/');
      int lineNumber = Integer.parseInt(matcher.group(2));
      VirtualFile vFile = findFileByName(fileName);

      if (vFile != null) {
        OpenFileHyperlinkInfo hyperlink = new OpenFileHyperlinkInfo(myProject, vFile, lineNumber - 1);
        final int textStartOffset = entireLength - line.length();
        int startPos = line.indexOf('\"') + 1;
        int endPos = line.indexOf('\"', startPos);
        return new Result(startPos + textStartOffset, endPos + textStartOffset, hyperlink);
      }
    }
    return null;
  }

  @Nullable
  protected VirtualFile findFileByName(String fileName) {
    VirtualFile vFile = LocalFileSystem.getInstance().findFileByPath(fileName);
    if (vFile == null && !StringUtil.isEmptyOrSpaces(myWorkingDirectory)) {
      vFile = LocalFileSystem.getInstance().findFileByIoFile(new File(myWorkingDirectory, fileName));
    }
    return vFile;
  }
}


text:
package p01_Geometry.Abstract;

import p01_Geometry.Interfaces.AreaMeasurable;
import p01_Geometry.Interfaces.PerimeterMeasurable;
import p01_Geometry.Vertices.Vertex2D;

public abstract class PlaneShape extends Shape implements AreaMeasurable, PerimeterMeasurable {

	public PlaneShape(Vertex2D[] vertices) {
		this.coordinates = vertices;
	}

	@Override
	public String toString() {
		return String.format(
				"Shape Type: %s\r\n\t" +
						"Area: %.2f\r\n\t" +
						"Perimeter: %.2f\r\n",
				this.getClassName(),
				this.getArea(),
				this.getPerimeter());
	}
}