text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <link rel="shortcut icon" href="../img/favicon.ico">

	<title>Home - My Docs</title>

        <link href="../css/bootstrap-custom.min.css" rel="stylesheet">
        <link href="../css/font-awesome-4.0.3.css" rel="stylesheet">
        <link href="../css/base.css" rel="stylesheet">
        <link rel="stylesheet" href="../css/highlight.css">
        <link href="../site/site/css/base.css" rel="stylesheet">
        <link href="../site/site/css/bootstrap-custom.min.css" rel="stylesheet">
        <link href="../site/site/css/font-awesome-4.0.3.css" rel="stylesheet">
        <link href="../site/site/css/highlight.css" rel="stylesheet">
        <link href="../site/css/base.css" rel="stylesheet">
        <link href="../site/css/bootstrap-custom.min.css" rel="stylesheet">
        <link href="../site/css/font-awesome-4.0.3.css" rel="stylesheet">
        <link href="../site/css/highlight.css" rel="stylesheet">

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                Toggle navigation

            </button>

            My Docs

                        Data

    Concatenate

    Continuize

    Datainfo

    Datasampler

    Datatable

    Discretize

    Editdomain

    Featureconstructor

    File

    Paintdata

    Pythonscript

    Save

    Selectcolumns

    Selectrows

                        Visualize

    Boxplot

    Distributions

    Heat map

    Modelmapprojectionrank

    Scatterplot

    Sievediagram

    Venn diagram

                        Docs

    Home

                        Classify

    Logisticregression

    Naivebayes

                         Search

                             Previous

                            Next

Welcome to MkDocs

Commands

Project layout

Welcome to MkDocs

For full documentation visit mkdocs.org.

Commands

mkdocs new [dir-name] - Create a new project.

mkdocs serve - Start the live-reloading docs server.

mkdocs build - Build the documentation site.

mkdocs help - Print this help message.

Project layout

mkdocs.yml    # The configuration file.
docs/
    index.md  # The documentation homepage.
    ...       # Other markdown pages, images and other files.

Documentation built with MkDocs.

                        <button type="button" class="close" data-dismiss="modal">×Close</button>

Search

                            From here you can search these documents. Enter
                            your search terms below.

                        <form role="form">

                                <input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query">

                        </form>


text:
@import '../../../shared/styles/font.css';
@import "../../../shared/styles/shadow.css";
@import "../../../shared/styles/z-index.css";
@import "../../../shared/styles/color.css";
@import "../../../shared/styles/border.css";

:root {
  --speed: .2s;
  --easing: cubic-bezier(.55,0,.1,1);
  --modalContentOpacity: 0;
  --scale: scale(0.8);
  --scaleActive: scale(1);
}

.selectorContainer {
  background-color: var(--white);
  margin: 10px 5px;
  min-width: 4em;
  text-align: center;
  transition: background-color 0.2s, box-shadow 0.2s;
  border-radius: var(--radius-small);
  position: relative;
  display: inline-block;
  composes: baseText;

  color: var(--gray-dark);
  fill: var(--gray-dark);

  & .icon polygon {
    fill: var(--gray-dark);
  }

  & .icon svg {
    transition: transform 0.2s, background-color 0.2s;
  }

  &::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: var(--radius-small);
    background-color: transparent;
    transition: background-color 0.2s;
  }

  &:first-child {
    margin-left: 0;
  }

  &:last-child {
    margin-right: 0;
  }
}

.wrapper {
  cursor: pointer;
  display: flex;
  flex-direction: row;
  transform: translateY(0);
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 10px 20px;
}

.valueWrapper {
  flex: 1 0 auto;
  position: relative;
}

.valueHidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.value {
  position: absolute;
}

.material {
  border: none;
  transition: box-shadow 0.2s;
  box-shadow: var(--shadow4);

  &:not(.selectorDisabled) {
    &:hover {
      box-shadow: var(--shadow6);
    }
  }

  & .optionsContainer {
    box-shadow: var(--shadow6);
  }
}

.flat {
  color: var(--gray-dark);
  fill: var(--gray-dark);
  background-color: var(--white);
  transition: border 0.1s;
  border: 1px solid var(--gray);

  & .icon polygon {
    fill: var(--gray-dark);
  }

  & .optionsContainer {
    box-shadow: var(--shadowInput);
    border: 1px solid var(--gray);
  }
}

.selector-white {
  &.material {
    background-color: var(--gray-dark);
    color: var(--white);
    fill: var(--white);

    & .icon polygon {
      fill: var(--white);
    }
  }

  &.flat:not(.selectorDisabled) {
    &:hover {
      border: 1px solid var(--gray);
    }
  }
}

.selector-green {
  &.material {
    fill: var(--white);
    color: var(--white);
    background-color: var(--green);

    & .icon polygon {
      fill: var(--white);
    }
  }

  &.flat:not(.selectorDisabled) {
    &:hover {
      border: 1px solid var(--green);
    }
  }
}

.selector-blue {
  &.material {
    fill: var(--white);
    color: var(--white);
    background-color: var(--blue);

    & .icon polygon {
      fill: var(--white);
    }
  }

  &.flat:not(.selectorDisabled) {
    &:hover {
      border: 1px solid var(--blue);
    }
  }
}

.selectorDisabled {
  cursor: not-allowed;

  & .selector {
    cursor: not-allowed;
  }

  &::before {
    z-index: var(--zIndex1);
    background-color: rgba(255, 255, 255, 0.4);
  }
}

.selectorContainerActive {
  & .optionsContainer {
    z-index: var(--zIndex99);
    visibility: visible;
    opacity: 1;
    transform: var(--scaleActive) translateY(-2px);
  }

  & .icon svg {
    transform: rotate(180deg);
  }
}

/* options */
.optionsContainer {
  position: absolute;
  top: calc(100% + 8px);
  left: -1px;
  right: -1px;
  max-height: 400px;
  flex-direction: column;
  background-color: var(--white);
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  border-radius: var(--radius-small);

  z-index: var(--zIndex0);
  opacity: var(--modalContentOpacity);
  visibility: hidden;
  backface-visibility: hidden;
  transform: var(--scale) translateY(-2px);
  transition: all var(--speed) var(--easing);
}

.option {
  height: 30px;
  width: 100%;
  text-align: left;
  line-height: 30px;
  cursor: pointer;
  color: var(--gray-dark);
  background-color: transparent;
  transition: background-color 0.2s;
  display: inline-block;

  &:hover {
    background-color: #f2f2f2;
  }

  &:first-child {
    border-radius: var(--radius-small) var(--radius-small) 0 0;
  }

  &:last-child {
    border-radius: 0 0 var(--radius-small) var(--radius-small);
  }
}

.optionActive {
  cursor: default;
  background-color: #f2f2f2;
}

.optionDisabled {
  color: #ADADAD;
  cursor: not-allowed;
}

.optionWrapper {
  margin: 0 20px;
}

.optionHidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: inline;
  z-index: var(--zIndexHidden);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.optionHiddenItem {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: inline;
}

redpajama_set_name: RedPajamaGithub


text:
namespace boost
{
namespace mp11
{

// mp_bind_front
template<template<class...> class F, class... T> struct mp_bind_front
{
    // the indirection through mp_defer works around the language inability
    // to expand U... into a fixed parameter list of an alias template

    template<class... U> using fn = typename mp_defer<F, T..., U...>::type;
};

template<class Q, class... T> using mp_bind_front_q = mp_bind_front<Q::template fn, T...>;

// mp_bind_back
template<template<class...> class F, class... T> struct mp_bind_back
{
    template<class... U> using fn = typename mp_defer<F, U..., T...>::type;
};

template<class Q, class... T> using mp_bind_back_q = mp_bind_back<Q::template fn, T...>;

// mp_arg
template<std::size_t I> struct mp_arg
{
    template<class... T> using fn = mp_at_c<mp_list<T...>, I>;
};

using _1 = mp_arg<0>;
using _2 = mp_arg<1>;
using _3 = mp_arg<2>;
using _4 = mp_arg<3>;
using _5 = mp_arg<4>;
using _6 = mp_arg<5>;
using _7 = mp_arg<6>;
using _8 = mp_arg<7>;
using _9 = mp_arg<8>;

// mp_bind
template<template<class...> class F, class... T> struct mp_bind;

namespace detail
{

template<class V, class... T> struct eval_bound_arg
{
    using type = V;
};

template<std::size_t I, class... T> struct eval_bound_arg<mp_arg<I>, T...>
{
    using type = typename mp_arg<I>::template fn<T...>;
};

template<template<class...> class F, class... U, class... T> struct eval_bound_arg<mp_bind<F, U...>, T...>
{
    using type = typename mp_bind<F, U...>::template fn<T...>;
};

template<template<class...> class F, class... U, class... T> struct eval_bound_arg<mp_bind_front<F, U...>, T...>
{
    using type = typename mp_bind_front<F, U...>::template fn<T...>;
};

template<template<class...> class F, class... U, class... T> struct eval_bound_arg<mp_bind_back<F, U...>, T...>
{
    using type = typename mp_bind_back<F, U...>::template fn<T...>;
};

} // namespace detail

template<template<class...> class F, class... T> struct mp_bind
{
#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, == 1915 )
private:

    template<class... U> struct _f { using type = F<typename detail::eval_bound_arg<T, U...>::type...>; };

public:

    template<class... U> using fn = typename _f<U...>::type;

#else

    template<class... U> using fn = F<typename detail::eval_bound_arg<T, U...>::type...>;

#endif
};

template<class Q, class... T> using mp_bind_q = mp_bind<Q::template fn, T...>;

} // namespace mp11
} // namespace boost

#endif // #ifndef BOOST_MP11_BIND_HPP_INCLUDED


text:
<?php

namespace spec\Moccalotto\Maillog;

use PhpSpec\ObjectBehavior;
use Moccalotto\Maillog\LineParser;
use DateTime;

class MaillogFileSpec extends ObjectBehavior
{
    /**
     * @var string
     */
    protected $file = __DIR__ . '/maillog';

    public function it_is_initializable()
    {
        $this->beConstructedWith($this->file, new LineParser());

        $this->shouldHaveType('Moccalotto\Maillog\MaillogFile');
    }

    public function it_can_parse_a_file()
    {
        // HACK: we need to ensure that we know the mtime of the file.
        // Otherwise the tests will only work AFTER nov 29th of the given year.
        touch($this->file, strtotime('Nov 29 13:33:00 UTC'));

        $this->beConstructedWith($this->file, new LineParser());

        $this->getLinesNewerThan(new DateTime('1999-01-01 00:00:00 UTC'))->shouldHaveCount(3);

        $this->getLinesNewerThan(new DateTime('Nov 29 13:30:21 UTC'))->shouldHaveCount(1);

        $this->getLinesNewerThan(new DateTime('2200-01-01 UTC'))->shouldHaveCount(0);
    }
}


text:
@class GLProgram, GPUImageFramebuffer, NSString;

@interface GPUImageView : UIView <GPUImageInput>
{
    int inputRotation;
    GPUImageFramebuffer *inputFramebufferForDisplay;
    unsigned int displayRenderbuffer;
    unsigned int displayFramebuffer;
    GLProgram *displayProgram;
    int displayPositionAttribute;
    int displayTextureCoordinateAttribute;
    int displayInputTextureUniform;
    struct CGSize inputImageSize;
    float imageVertices[8];
    float backgroundColorRed;
    float backgroundColorGreen;
    float backgroundColorBlue;
    float backgroundColorAlpha;
    struct CGSize boundsSizeAtFrameBufferEpoch;
    BOOL enabled;
    unsigned int aspectRatio;
    int _fillMode;
    struct CGSize _sizeInPixels;
}

+ (Class)layerClass;
+ (const float *)textureCoordinatesForRotation:(int)arg1;
- (void).cxx_destruct;
@property(nonatomic) unsigned int aspectRatio; // @synthesize aspectRatio;
- (void)commonInit;
- (void)createDisplayFramebuffer;
- (void)dealloc;
- (void)destroyDisplayFramebuffer;
@property(nonatomic) BOOL enabled; // @synthesize enabled;
- (void)endProcessing;
@property(nonatomic) int fillMode; // @synthesize fillMode=_fillMode;
- (id)initWithCoder:(id)arg1;
- (id)initWithFrame:(struct CGRect)arg1;
- (void)layoutSubviews;
- (struct CGSize)maximumOutputSize;
- (void)newFrameReadyAtTime:(CDStruct_1b6d18a9)arg1 atIndex:(int)arg2;
- (int)nextAvailableTextureIndex;
- (void)presentFramebuffer;
- (void)recalculateViewGeometry;
- (void)setBackgroundColorRed:(float)arg1 green:(float)arg2 blue:(float)arg3 alpha:(float)arg4;
- (void)setCurrentlyReceivingMonochromeInput:(BOOL)arg1;
- (void)setDisplayFramebuffer;
- (void)setInputFramebuffer:(id)arg1 atIndex:(int)arg2;
- (void)setInputRotation:(int)arg1 atIndex:(int)arg2;
- (void)setInputSize:(struct CGSize)arg1 atIndex:(int)arg2;
- (BOOL)shouldIgnoreUpdatesToThisTarget;
@property(readonly, nonatomic) struct CGSize sizeInPixels; // @synthesize sizeInPixels=_sizeInPixels;
- (BOOL)wantsMonochromeInput;

// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned int hash;
@property(readonly) Class superclass;

@end


text:
/**
 * @file main.c
 * @author Eric Ponce
 * @date 23 June 2015
 * @brief Main Program File
 */

#include "board.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>

#define UART_BAUD 57600
#define SPI_BAUD  500000
#define CCAN_BAUD 500000

#define UART_RX_BUF_SIZE 0x8
#define CCAN_BUF_SIZE 0x10

#define MCP_BAUD_KHZ  500
#define MCP_INP_CLK_MHZ 11
#define MCP_SJW 1
#define MCP_CS_GPIO 2
#define MCP_CS_PIN 2
#define MCP_INT_GPIO 0
#define MCP_INT_PIN 2

#define MBB_STD_MSG_OBJ 1
#define MBB_EXT_1_MSG_OBJ 2
#define MBB_EXT_2_MSG_OBJ 3
#define MBB_EXT_3_MSG_OBJ 4
#define MBB_EXT_4_MSG_OBJ 5
#define BCM_STD_MSG_OBJ 6
#define BCM_EXT_MSG_OBJ 7

#define BCM_POLL_IDLE_FREQ 1
#define BCM_POLL_CHARGING_FREQ 40
#define BCM_POLL_DRAINING_FREQ 40
#define BCM_POLL_BALANCING_FREQ 40

#define TIMED_MESSAGE_DELAY 1000

#define BRUSA_MAX_MAINS_CAMPS 1500

#define Hertz2Ticks(freq) SystemCoreClock / freq

#define UpdateBCMTimerFreq(freq) (Chip_TIMER_SetMatch(LPC_TIMER32_1, 0, Hertz2Ticks(freq)))

// ------------------------------------------------
// Global Static Variables

static volatile uint64_t msTicks; // Milliseconds

// Uart
uint8_t Rx_Buf[UART_RX_BUF_SIZE];
static char str[100]; // For use with printing
// static char int_str[100]; // For use with printing in interrupts

// Off-Chip CAN
static CCAN_MSG_OBJ_T mcp_msg_obj;
static NLG5_CTL_T brusa_control;
static NLG5_STATUS_T brusa_status;
static NLG5_ACT_I_T brusa_actual_1;
static NLG5_ACT_II_T brusa_actual_2;
static NLG5_TEMP_T brusa_temp;
static NLG5_ERR_T brusa_error;
static NLG5_MESSAGES_T brusa_messages;
static volatile bool brusa_message_send = false;

// On-Chip CCAN
static CCAN_MSG_OBJ_T can_msg_obj;
static RINGBUFF_T rx_buffer;
static CCAN_MSG_OBJ_T _rx_buffer[CCAN_BUF_SIZE];
static uint8_t std_msg_send_count;

// A123 CAN Message Structures
static MBB_CMD_T mbb_cmd;

// State staging variables
static volatile bool new_std_msg_sent = true;

// State Variables
static MODE_T mode = IDLE;
static PACK_STATE_T pack_state;
static OUTPUT_STATE_T out_state;

// Timed Print
static uint64_t last_debug_message = 0;
static uint32_t message_count = 0;

// ------------------------------------------------
// Helper functions that don't belong in util because systick, printing, etc

/**
 * @details Relies on SysTick and therefore will not function with interrupts
 * disabled or in a higher priority interrupt
 *
 * @param ms number of milliseconds to delay
 */
void _delay_ms(uint32_t ms) {
	uint32_t currTicks = msTicks;
	while(msTicks - currTicks < ms) {

	}
}

/**
 * @details Throws error through multiple means: print, flash, and/or hang
 *
 * @param errorNo The error number
 * @param flashLED set to true to have processor flash the main LED
 * @param hang set to true to hang the processor
 */
void _error(ERROR_T errorNo, bool flashLED, bool hang) {
	DEBUG_Print("Error(");
	itoa(errorNo, str, 10);
	DEBUG_Print(str);
	DEBUG_Print(")\r\n");

	do { // Hang forevers
		if (flashLED) {
			uint8_t i;
			for (i = 0; i < errorNo; i++) {
				Board_LED_Off();
				_delay_ms(500);
				Board_LED_On();
				_delay_ms(500);
			}
		}
		_delay_ms(1500);
		Board_LED_Off();
	} while(hang);

	Board_LED_On();
}

// ------------------------------------------------
// IRQs

/**
 * @details Increments millisecond counter
 */
void SysTick_Handler(void) {
	msTicks++;
}

/**
 * @details Timer interrupt to maintain Brusa communication timing
 */
void TIMER32_0_IRQHandler(void) {
	if (Chip_TIMER_MatchPending(LPC_TIMER32_0, 0)) {
		Chip_TIMER_ClearMatch(LPC_TIMER32_0, 0);

		brusa_message_send = true;
	}
}

/**
 * @details Timer interrupt to request A123 MBB information
 */
void TIMER32_1_IRQHandler(void) {
	Chip_TIMER_ClearMatch(LPC_TIMER32_1, 0);
	// Update Battery Status
	if (RingBuffer_IsEmpty(&rx_buffer)) {
		// Send BCM_CMD
		mbb_cmd.request_type = BCM_REQUEST_TYPE_STD;
		mbb_cmd.request_id = 5;
		mbb_cmd.balance = out_state.balance;
		mbb_cmd.balance_target_mVolts = out_state.balance_mVolts;

		can_msg_obj.msgobj = BCM_STD_MSG_OBJ;
		MBB_MakeCMD(&mbb_cmd, &can_msg_obj);
		LPC_CCAN_API->can_transmit(&can_msg_obj);

		new_std_msg_sent = true;
		if (std_msg_send_count++ == 4) {
			std_msg_send_count = 0;

			mbb_cmd.request_type = BCM_REQUEST_TYPE_EXT;
			can_msg_obj.msgobj = BCM_EXT_MSG_OBJ;
			mbb_cmd.request_id = 6;
			MBB_MakeCMD(&mbb_cmd, &can_msg_obj);
			LPC_CCAN_API->can_transmit(&can_msg_obj);

		}
	}
}

// ------------------------------------------------
// CAN Callbacks

/**
 * @details Moves received on-chip CAN messages into ring buffer
 *
 * @param msg_obj_num CAN message object that received message
 */
void CAN_rx(uint8_t msg_obj_num) {
	/* Determine which CAN message has been received */
	can_msg_obj.msgobj = msg_obj_num;
	/* Now load up the msg_obj structure with the CAN message */
	LPC_CCAN_API->can_receive(&can_msg_obj);
	RingBuffer_Insert(&rx_buffer, &can_msg_obj);
}

/**
 * @details On-chip CAN transmit callback. Currently does nothing
 *
 * @param msg_obj_num CAN message object that sent message
 */
void CAN_tx(uint8_t msg_obj_num) {
	msg_obj_num++;
}

/**
 * @details On-chip CAN error callback. Currently does nothing
 *
 * @param error_info error info
 */
void CAN_error(uint32_t error_info) {
	error_info++;
	DEBUG_Print("On-chip CAN Error\n\r");
	// _error(error_info, true, false);
}

// ------------------------------------------------
// Init Functions

/**
 * @details Initializes SysTick Peripheral
 */
void Init_Core(void) {
	SystemCoreClockUpdate();

	msTicks = 0;

	// ------------------------------------------------
	// Systick Config
	if (SysTick_Config (SystemCoreClock / 1000)) {
		//Error
		while(1);
	}
}

/**
 * @details Initializes state machines and sets configuration data
 */
void Init_SM(void) {

	CHARGING_CONFIG_T charge_config;
	charge_config.pack_s = CELL_SERIES;
	charge_config.pack_p = CELL_PARALLEL;
	charge_config.max_cell_mVolts = 3600;
	charge_config.cc_cell_mVolts = 3700;
	charge_config.cell_capacity_cAmpHours = 2000; 	// 20 Ahr
	charge_config.cell_mC_rating = 133; 			// .133 C

	DRAINING_CONFIG_T drain_config;
	drain_config.min_cell_mVolts = 2500; //Specs say 2000mV but lets play it safe for now

	Charge_Config(&charge_config);
	Drain_Config(&drain_config);
	SSM_Init();
	PackManager_Init();

}

/**
 * @details Initializes board peripherals
 */
void Init_Board(void) {
	// ------------------------------------------------
	// Board Periph Init
	Board_LED_Init();
	Board_LED_On();
	Board_Switch_Init(SWITCH1);
	Board_Switch_Init(SWITCH2);
	Board_Contactors_Init();

	// ------------------------------------------------
	// Communication Init

	Board_UART_Init(UART_BAUD);
	Board_SPI_Init(SPI_BAUD);
	Board_CCAN_Init(CCAN_BAUD, CAN_rx, CAN_tx, CAN_error);
}

/**
 * @details Initializes statically allocated global variables
 */
void Init_Globals(void) {
	brusa_control.enable = 1;
	brusa_control.clear_error = 0;
	brusa_control.ventilation_request = 1;
	brusa_control.max_mains_cAmps = BRUSA_MAX_MAINS_CAMPS;
	brusa_control.output_mV = 0;
	brusa_control.output_cA = 0;

	pack_state.pack_min_mVolts = 0xFFFFFFFF;
	pack_state.pack_max_mVolts = 0;
	pack_state.pack_cAmps_in = 0;

	out_state.balance_mVolts = BCM_BALANCE_OFF;
	out_state.balance = false;
	out_state.brusa_mVolts = 0;
	out_state.brusa_cAmps = 0;
	out_state.close_contactors = false;
	out_state.brusa_output = false;
	out_state.brusa_clear_latch = false;

	mode = IDLE;

	std_msg_send_count = 0;

	brusa_messages.stat = &brusa_status;
	brusa_messages.act_i = &brusa_actual_1;
	brusa_messages.act_ii = &brusa_actual_2;
	brusa_messages.temp = &brusa_temp;
	brusa_messages.err = &brusa_error;
}

/**
 * @details Initializes both on-chip and off-chip CAN and sets up filters and masks.
 */
void Init_CAN(void) {
	// ------------------------------------------------
	// MCP2515 Init
	MCP2515_Init(MCP_CS_GPIO, MCP_CS_PIN, MCP_INT_GPIO, MCP_INT_PIN);
	uint8_t i = MCP2515_SetBitRate(MCP_BAUD_KHZ, MCP_INP_CLK_MHZ, MCP_SJW);
	itoa(i, str, 10);
	if (i) {
		DEBUG_Print("Baud Error: ");
		DEBUG_Print(str);
		DEBUG_Print("\r\n");
		_error(ERROR_CAN_BUS, true, true);
	}

	Brusa_MakeCTL(&brusa_control, &mcp_msg_obj);
	MCP2515_LoadBuffer(0, &mcp_msg_obj);

	MCP2515_BitModify(RXB0CTRL, RXM_MASK, RXM_STD); //Turn RXB0 Mask
	MCP2515_BitModify(RXB1CTRL, RXM_MASK, RXM_STD);
	MCP2515_BitModify(RXF0SIDH, 0xFF, 0xC2);
	MCP2515_BitModify(RXF0SIDL, 0xE0, 0x00); // Message 610
	MCP2515_BitModify(RXF1SIDH, 0xFF, 0xC2);
	MCP2515_BitModify(RXF1SIDL, 0xE0, 0x80); // Message 614
	MCP2515_BitModify(RXM0SIDH, 0xFF, 0xFF);
	MCP2515_BitModify(RXM0SIDL, 0xE0, 0xE0); // Buffer 0 gets odd
	MCP2515_BitModify(RXF2SIDH, 0xFF, 0xC2);
	MCP2515_BitModify(RXF2SIDL, 0xE0, 0x20); // Message 611
	MCP2515_BitModify(RXF3SIDH, 0xFF, 0xC2);
	MCP2515_BitModify(RXF3SIDL, 0xE0, 0x60); // Message 613
	MCP2515_BitModify(RXF4SIDH, 0xFF, 0xC2);
	MCP2515_BitModify(RXF4SIDL, 0xE0, 0x20); // Message 611
	MCP2515_BitModify(RXF5SIDH, 0xFF, 0xC2);
	MCP2515_BitModify(RXF5SIDL, 0xE0, 0x20); // Message 611
	MCP2515_BitModify(RXM1SIDH, 0xFF, 0xFF);
	MCP2515_BitModify(RXM1SIDL, 0xE0, 0xE0); // Buffer 1 gets even

	MCP2515_Mode(MODE_NORMAL);

	// ------------------------------------------------
	// On-Chip CCAN Init
	RingBuffer_Init(&rx_buffer, _rx_buffer, sizeof(CCAN_MSG_OBJ_T), 8);
	RingBuffer_Flush(&rx_buffer);

	// MBB_STD
	can_msg_obj.msgobj = MBB_STD_MSG_OBJ;
	can_msg_obj.mode_id = 0x200;
	can_msg_obj.mask = 0xF00;
	LPC_CCAN_API->config_rxmsgobj(&can_msg_obj);

	// MBB_EXT_1
	can_msg_obj.msgobj = MBB_EXT_1_MSG_OBJ;
	can_msg_obj.mode_id = 0x300;
	can_msg_obj.mask = 0xF00;
	LPC_CCAN_API->config_rxmsgobj(&can_msg_obj);

	// MBB_EXT_2
	can_msg_obj.msgobj = MBB_EXT_2_MSG_OBJ;
	can_msg_obj.mode_id = 0x400;
	can_msg_obj.mask = 0xF00;
	LPC_CCAN_API->config_rxmsgobj(&can_msg_obj);

	// MBB_EXT_3
	can_msg_obj.msgobj = MBB_EXT_3_MSG_OBJ;
	can_msg_obj.mode_id = 0x500;
	can_msg_obj.mask = 0xF00;
	LPC_CCAN_API->config_rxmsgobj(&can_msg_obj);

	// MBB_EXT_4
	can_msg_obj.msgobj = MBB_EXT_4_MSG_OBJ;
	can_msg_obj.mode_id = 0x600;
	can_msg_obj.mask = 0xF00;
	LPC_CCAN_API->config_rxmsgobj(&can_msg_obj);
}

/**
 * @details Initiizes timers for timer based interrupts
 */
void Init_Timers(void) {
	// ------------------------------------------------
	// Timer 32_0 Init
	Chip_TIMER_Init(LPC_TIMER32_0);
	Chip_TIMER_Reset(LPC_TIMER32_0);
	Chip_TIMER_MatchEnableInt(LPC_TIMER32_0, 0);
	Chip_TIMER_SetMatch(LPC_TIMER32_0, 0, Hertz2Ticks(10));
	Chip_TIMER_ResetOnMatchEnable(LPC_TIMER32_0, 0);

    // Chip_TIMER_Enable(LPC_TIMER32_0);

	/* Enable timer interrupt */
	NVIC_ClearPendingIRQ(TIMER_32_0_IRQn);
	NVIC_EnableIRQ(TIMER_32_0_IRQn);

	// ------------------------------------------------
	// Timer 32_0 Init
	Chip_TIMER_Init(LPC_TIMER32_1);
	Chip_TIMER_Reset(LPC_TIMER32_1);
	Chip_TIMER_MatchEnableInt(LPC_TIMER32_1, 0);
	Chip_TIMER_SetMatch(LPC_TIMER32_1, 0, Hertz2Ticks(BCM_POLL_IDLE_FREQ));
	Chip_TIMER_ResetOnMatchEnable(LPC_TIMER32_1, 0);

	/* Enable timer_32_1 interrupt */
	NVIC_ClearPendingIRQ(TIMER_32_1_IRQn);
	NVIC_EnableIRQ(TIMER_32_1_IRQn);

	Chip_TIMER_Enable(LPC_TIMER32_1);
}

// ------------------------------------------------
// Main Program

/**
 * @details Where all the magic happens
 * @return Shouldn't return
 */
int main(void) {

	Init_Core();
	Init_SM();
	Init_Board();
	Init_Globals();
	Init_CAN();
	Init_Timers();

	// ------------------------------------------------
	// Begin

	DEBUG_Print("Started Up\r\n");

	while(1) {

		uint8_t count;
		if ((count = Chip_UART_Read(LPC_USART, Rx_Buf, UART_RX_BUF_SIZE)) != 0) {
			switch (Rx_Buf[0]) {
				case 'a': // Print out Brusa Mains Info
					DEBUG_Print("Actual Mains Voltage: ");
					itoa(brusa_actual_1.mains_mVolts, str, 10);
					DEBUG_Print(str);
					DEBUG_Print("\r\n");

					DEBUG_Print("Mains type: ");
					itoa(brusa_actual_1.mains_cAmps, str, 10);
					DEBUG_Print(str);
					DEBUG_Print("\r\n");

					DEBUG_Print("Temp: ");
					itoa((brusa_temp.power_temp / 10) - 40 , str, 10);
					DEBUG_Print(str);
					DEBUG_Print("\r\n");

					DEBUG_Print("Temp: 0x");
					itoa(brusa_temp.power_temp , str, 16);
					DEBUG_Print(str);
					DEBUG_Print("\r\n");
					break;
				case 'b': // Print out Actual Brusa Output
					DEBUG_Print("Actual Out Voltage: ");
					itoa(brusa_actual_1.output_mVolts, str, 10);
					DEBUG_Println(str);

					DEBUG_Print("Actual Out Current: ");
					itoa(brusa_actual_1.output_cAmps, str, 10);
					DEBUG_Println(str);
					break;
				case 'f': // Print out Pack State
					itoa(pack_state.pack_min_mVolts, str, 10);
					DEBUG_Print("Pack Min Voltage: ");
					DEBUG_Print(str);
					DEBUG_Print("\r\n");
					itoa(pack_state.pack_max_mVolts, str, 10);
					DEBUG_Print("Pack Max Voltage: ");
					DEBUG_Print(str);
					DEBUG_Print("\r\n");

					break;
				case 'y': // Print out Module Balance State
					itoa(PackManager_GetExtModId(0), str, 16);
					DEBUG_Print("Mod 0x");
					DEBUG_Print(str);
					itoa(PackManager_GetExtBal(0), str, 2);
					DEBUG_Print(": 0b");
					DEBUG_Println(str);
					itoa(PackManager_GetExtModId(1), str, 16);
					DEBUG_Print("Mod 0x");
					DEBUG_Print(str);
					itoa(PackManager_GetExtBal(1), str, 2);
					DEBUG_Print(": 0b");
					DEBUG_Println(str);
					break;
				case 'e':
					itoa(brusa_error,str, 2);
					DEBUG_Println(str);
					break;
				case 'm': // Print out charge mode and brusa error
					DEBUG_Print("Charge Mode: ");
					itoa(Charge_GetMode(), str, 10);
					DEBUG_Println(str);
					DEBUG_Print("Error Messages: ");
					itoa((uint64_t)brusa_error, str, 2);
					DEBUG_Println(str);
					break;
				default:
					DEBUG_Print("Unknown Command\r\n");
			}
		}

		//-----------------------------
		// Detect Input Changes (Default to IDLE)

		MODE_INPUT_T inp = INP_IDLE;
		if (!Board_Switch_Read(SWITCH1)) {
			inp = INP_CHRG;
		} else {
			inp = INP_IDLE;
		}

		if (!Board_Switch_Read(SWITCH2)) {
			inp = INP_BALANCE;
		}

		//-----------------------------
		// Update pack_state
		pack_state.contactors_closed = Board_Contactors_Closed();
		pack_state.msTicks = msTicks;
		pack_state.brusa_error = brusa_error;
		pack_state.pack_cAmps_in = brusa_actual_1.output_cAmps;

		//-----------------------------
		// SSM Step
		ERROR_T result = SSM_Step(&pack_state, inp, &out_state);
		if (result != ERROR_NONE) {
			_error(result, true, false);
		}

		//-----------------------------
		// Check if SSM has Changed State
		// Currently only changes Poll Frequency
		// [TODO] Set a status LED!!
		if (SSM_GetMode() != mode) {
			mode = SSM_GetMode();
			switch (SSM_GetMode()) {
				case IDLE:
					Chip_TIMER_SetMatch(LPC_TIMER32_1, 0, Hertz2Ticks(BCM_POLL_IDLE_FREQ));
					Chip_TIMER_Reset(LPC_TIMER32_1); // Otherwise shit gets FUCKED
					break;
				case CHARGING:
					Chip_TIMER_SetMatch(LPC_TIMER32_1, 0, Hertz2Ticks(BCM_POLL_CHARGING_FREQ));
					Chip_TIMER_Reset(LPC_TIMER32_1);
					break;
				case DRAINING:
					Chip_TIMER_SetMatch(LPC_TIMER32_1, 0, Hertz2Ticks(BCM_POLL_DRAINING_FREQ));
					Chip_TIMER_Reset(LPC_TIMER32_1);
					break;
				case BALANCING:
					Chip_TIMER_SetMatch(LPC_TIMER32_1, 0, Hertz2Ticks(BCM_POLL_BALANCING_FREQ));
					Chip_TIMER_Reset(LPC_TIMER32_1);
					break;
			}
		}

		//-----------------------------
		// Carry out out_state
		if (out_state.close_contactors && !Board_Contactors_Closed()) {
			Board_Close_Contactors(true);
		} else if (!out_state.close_contactors && Board_Contactors_Closed()) {
			Board_Close_Contactors(false);
		}

		if (out_state.brusa_output) {
			brusa_control.clear_error = out_state.brusa_clear_latch;
			brusa_control.output_mV = out_state.brusa_mVolts;
			brusa_control.output_cA = out_state.brusa_cAmps;
			Chip_TIMER_Enable(LPC_TIMER32_0);
		} else {
			brusa_control.output_mV = 0;
			brusa_control.output_cA = 0;
			Chip_TIMER_Disable(LPC_TIMER32_0);
		}

		//-----------------------------
		// Retrieve available brusa messages
		int8_t tmp = MCP2515_GetFullReceiveBuffer();
		int8_t res = 0;
		if (tmp == 2) {
			MCP2515_ReadBuffer(&mcp_msg_obj, 0);
			res = Brusa_Decode(&brusa_messages, &mcp_msg_obj);
			if (res == -1) {
				DEBUG_Println("Brusa Decode Error");
				res = 0;
			}
			MCP2515_ReadBuffer(&mcp_msg_obj, 1);
			res = Brusa_Decode(&brusa_messages, &mcp_msg_obj);
		} else if (tmp == 0) { // Receive Buffer 0 Full
			MCP2515_ReadBuffer(&mcp_msg_obj, tmp);
			res = Brusa_Decode(&brusa_messages, &mcp_msg_obj);
		} else if (tmp == 1) { //Receive buffer 1 full
			MCP2515_ReadBuffer(&mcp_msg_obj, tmp);
			res = Brusa_Decode(&brusa_messages, &mcp_msg_obj);
		}

		if (res == -1) {
			DEBUG_Println("Brusa Decode Error");
			res = 0;
		}

		//-----------------------------
		// Send brusa message if its time
		if (brusa_message_send) {
			brusa_message_send = false;
			Brusa_MakeCTL(&brusa_control, &mcp_msg_obj);
			MCP2515_LoadBuffer(0, &mcp_msg_obj);
			MCP2515_SendBuffer(0);
		}

		//-----------------------------
		// Check for and decode A123 Messages
		if (!RingBuffer_IsEmpty(&rx_buffer)) {

			CCAN_MSG_OBJ_T temp_msg;
			RingBuffer_Pop(&rx_buffer, &temp_msg);
			res = PackManager_Update(&temp_msg);

			if (new_std_msg_sent) {
				PackManager_Commit(&pack_state);
				new_std_msg_sent = false;
			}

		}

		if (res == -1) {
			DEBUG_Println("A123 Decode Error");
		}

		//-----------------------------
		// Timed output
		if (msTicks - last_debug_message > TIMED_MESSAGE_DELAY) {
			message_count++;
			last_debug_message = msTicks;
			switch (message_count % 7) {
				case 0:
					if (out_state.balance) {
						itoa(mbb_cmd.balance_target_mVolts, str, 10);
						DEBUG_Print("Balancing to: ");
						DEBUG_Println(str);
					} else {
						DEBUG_Println("Not balancing");
					}

					break;
				case 1:
					itoa(brusa_control.output_mV, str, 10);
					DEBUG_Print("Brusa out V: ");
					DEBUG_Println(str);
					break;
				case 2:
					itoa(brusa_control.output_cA, str, 10);
					DEBUG_Print("Brusa out C: ");
					DEBUG_Println(str);
					break;
				case 3:
					DEBUG_Print("Actual Out Voltage: ");
					itoa(brusa_actual_1.output_mVolts, str, 10);
					DEBUG_Println(str);
					break;
				case 4:
					DEBUG_Print("Actual Out Current: ");
					itoa(brusa_actual_1.output_cAmps, str, 10);
					DEBUG_Println(str);
					break;
				case 5:
					DEBUG_Print("Mode: ");
					if (SSM_GetMode() == CHARGING) {
						DEBUG_Println("Chrg");
					} else if (SSM_GetMode() == DRAINING) {
						DEBUG_Println("Drain");
					} else if (SSM_GetMode() == BALANCING) {
						DEBUG_Println("Bal");
					} else if (SSM_GetMode() == IDLE) {
						DEBUG_Println("Idle");
					} else {
						DEBUG_Println("Unknown");
					}
					break;
				case 6:
					DEBUG_Print("Brusa Output: ");
					itoa(out_state.brusa_output, str, 2);
					DEBUG_Println(str);

					DEBUG_Print("\r\n");
					break;

			}
		}
	}

	return 0;
}


text:
'use strict';

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

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _simpleAssign = require('simple-assign');

var _simpleAssign2 = _interopRequireDefault(_simpleAssign);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _transitions = require('../styles/transitions');

var _transitions2 = _interopRequireDefault(_transitions);

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

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function getStyles(props, context) {
  var inkBar = context.muiTheme.inkBar;

  return {
    root: {
      left: props.left,
      width: props.width,
      bottom: 0,
      display: 'block',
      backgroundColor: props.color || inkBar.backgroundColor,
      height: 2,
      marginTop: -2,
      position: 'relative',
      transition: _transitions2.default.easeOut('1s', 'left')
    }
  };
}

var InkBar = function (_React$Component) {
  _inherits(InkBar, _React$Component);

  function InkBar() {
    _classCallCheck(this, InkBar);

    return _possibleConstructorReturn(this, Object.getPrototypeOf(InkBar).apply(this, arguments));
  }

  _createClass(InkBar, [{
    key: 'render',
    value: function render() {
      var style = this.props.style;
      var prepareStyles = this.context.muiTheme.prepareStyles;

      var styles = getStyles(this.props, this.context);

      return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) });
    }
  }]);

  return InkBar;
}(_react2.default.Component);

InkBar.propTypes = {
  color: _react2.default.PropTypes.string,
  left: _react2.default.PropTypes.string.isRequired,

  /**
   * Override the inline-styles of the root element.
   */
  style: _react2.default.PropTypes.object,
  width: _react2.default.PropTypes.string.isRequired
};
InkBar.contextTypes = {
  muiTheme: _react2.default.PropTypes.object.isRequired
};
exports.default = InkBar;


text:
describe('jstube.chromeExtensionCleaner.popup', function() {
    beforeEach(module('jstube.chromeExtensionCleaner.popup'));
    describe('NavbarController', function() {
        var $rootScope, navController;
        beforeEach(inject(function($injector, $controller) {
            $rootScope = $injector.get('$rootScope');
            navController = $controller('NavbarController', {
                $scope: $rootScope.$new()
            });
        }));
        it('should be defined as an object', function() {
            expect(navController).toBeDefined();
            expect(typeof (navController)).toBe('object');
        });
        describe('NavbarController.appStatic', function() {
            it('should be defined as an object', function() {
                expect(navController.appStatic).toBeDefined();
                expect(typeof (navController.appStatic)).toBe('object');
            });
        });
    });
});


text:
import re
import os
import time
import sys
import socket
from neutronclient.v2_0 import client as neutronclient

STATS_PREFIX = "openstack.neutron"

if not re.match(".$", STATS_PREFIX):
	STATS_PREFIX += "."

USER=os.environ['OS_USERNAME']
PASS=os.environ['OS_PASSWORD']
TENANT_NAME=os.environ['OS_TENANT_NAME']
OS_AUTH_URL=os.environ['OS_AUTH_URL']
GRAPHITE_HOST="10.64.140.42"

def neutronConnect():
  return neutronclient.Client(username=USER, password=PASS, tenant_name=TENANT_NAME, auth_url=OS_AUTH_URL)

def collect_metric(name, value, timestamp):
  sock = socket.socket()
  sock.settimeout(5)
  sock.connect( (GRAPHITE_HOST, 2003) )
  print "%s %s %d" % (STATS_PREFIX + name, value, timestamp)
  sock.send("%s %s %d\n" % (STATS_PREFIX + name, value, timestamp))
  sock.close()

def now():
  return time.time()

#main
neutron = neutronConnect()

# network timings/counts
try:

  start = now()
  networks = neutron.list_networks()
  end = now()
  if networks:
    networkstime = round(end - start, 4)
    collect_metric("timings.networks.list", networkstime, now())
except:
  print "networks.list failed"

# exit cleanly
sys.stdout.flush()
sys.stderr.flush()
sys.exit(0)


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('reports', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='report',
            name='lattitude',
            field=models.DecimalField(decimal_places=6, default=12.5, max_digits=9),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='report',
            name='longitude',
            field=models.DecimalField(decimal_places=6, default=12.5, max_digits=9),
            preserve_default=False,
        ),
    ]


text:
layout: page
title: International Sculpture Day 2016
lang: en
header: no
---

In celebration of the International Sculpture Day, ARS.NATURA.UTA – The Project, invites the public to an open-house tour and celebration of its facilities in the rural community of Achocalla in the vicinity of La Paz, Bolivia.

The tour will highlight the main building, styled after the 18th century Jesuit Mission buildings located in Chiquitos, near Santa Cruz, Bolivia, as well as include the sculpture garden and ecological facilities. The tour will be guided by the director and owner of the center, with insight into the inspiration and creation process of Ars.Natura.Uta. There will be also be a small art exhibit inside the courtyard of the main building.

Full-time staff and the local volunteer youth of the community will be available to answer questions on the why and how of the sculptures, as well as provide information and access to the garden flowers, vegetables and farm animals.

There will also be a papermaking demonstration and, following that, a workshop open to all ages. All materials will be covered.

The activities in the ISDay are totally free of charge; however, we ask for reservation to be made, via email, telephone or social media (twitter) with the number of people in your party.

Time: 2 – 7pm

* 2:30 – 3:30: Tour of the grounds
* 3:30 – 4:00: Papermaking Demonstration
* 4:00 – 5:00: Papermaking Workshop (all materials included, all ages)
* 5:00 – 7:00: The unveiling of the Chacana (Andean Cross) will be at sundown (6:18pm) with the Andean traditional ritual known as Ch'alla, followed by music and performance.

There will be light refreshments.


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Registration</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href="css/modern-business.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                Kuorageous

                        About Us

                        Services

								Admission Essay Seminars (For All)

								Annual Member to Coach: Mapping the Road to Success

								High School Mentorships (Applying to Colleges)

								College Mentorships (Applying to Graduate Schools)

								Medical Mentorships (Applying to Residencies/Fellowships/Jobs)

								Scholarship and Loan Applications

								美國學生入學諮詢中心

								私人學術教練

                        Contact

                        Contact Us For Coaching

							Contact Us For Pre-medical Volunteer Roles

                        Registration

					For Seminars

					For High School Mentorships

                                	For Undergraduate Mentorships

					For Medical Mentorships

					For Scholarships and Loans

                                Pricing Table

 -->

                        FAQs

                                FAQs for Premed

								FAQs for High School

								Bengali FAQ (বাঙালি)

								Korean FAQ (한국어)

								Chinese FAQ (中文)

								Spanish FAQ (Español)

						Testimonials

						 Gallery

						 Articles

Registration
                    Seminars

Home

Registration: Seminars

Please fill out the form and then buy it through paypal using the buy now button below

		<form action="https://docs.google.com/forms/d/e/1FAIpQLSdvnwfXFA4gLzKHH1HRPJVj1X0bfqFQ-VX2TvxlA-rI1GcNww/formResponse" method="POST" id="ss-form" target="_self" onsubmit="">

Full Name

*

<input type="text" name="entry.507744886" value="" class="ss-q-short" id="entry_507744886" dir="auto" aria-label="Full Name  " aria-required="true" required="" title="">

Mailing Address

*

<input type="text" name="entry.675039437" value="" class="ss-q-short" id="entry_675039437" dir="auto" aria-label="Mailing Address  " aria-required="true" required="" title="">

Billing Address

<input type="text" name="entry.792036795" value="" class="ss-q-short" id="entry_792036795" dir="auto" aria-label="Billing Address  " title="">

Telephone Number

*

<input type="text" name="entry.1563750683" value="" class="ss-q-short" id="entry_1563750683" dir="auto" aria-label="Telephone Number  " aria-required="true" required="" title="">

Email Address

*

<input type="text" name="entry.1322534008" value="" class="ss-q-short" id="entry_1322534008" dir="auto" aria-label="Email Address  " aria-required="true" required="" title="">

Which school are you currently enrolled?

*

<input type="text" name="entry.1316669990" value="" class="ss-q-short" id="entry_1316669990" dir="auto" aria-label="Which school are you currently enrolled?  " aria-required="true" required="" title="">

Anticipated year of graduation

*

<input type="text" name="entry.1857981745" value="" class="ss-q-short" id="entry_1857981745" dir="auto" aria-label="Anticipated year of graduation  " aria-required="true" required="" title="">

To what program are you applying?

*

(MD, DO, FMG, PA, RN, DDS, DPM, University)

<input type="text" name="entry.1081320966" value="" class="ss-q-short" id="entry_1081320966" dir="auto" aria-label="To what program are you applying?  (MD, DO, FMG, PA, RN, DDS, DPM, University) " aria-required="true" required="" title="">

Your application deadline date

<input type="date" name="entry.1054957261" value="" class="ss-q-date" dir="auto" id="entry_1054957261" aria-label="Your application deadline date  ">

Please give us three dates (and times) which work best for you.

*

MM/DD/YYYY

<textarea name="entry.1689013739" rows="8" cols="0" class="ss-q-long" id="entry_1689013739" dir="auto" aria-label="Please give us three dates (and times) which work best for you. MM/DD/YYYY " aria-required="true" required=""></textarea>

<input type="hidden" name="draftResponse" value="[,,"45681357055304755"]
">
<input type="hidden" name="pageHistory" value="0">

<input type="hidden" name="fbzx" value="45681357055304755">

<input type="submit" name="submit" value="Submit" id="ss-submit" class="jfk-button jfk-button-action ">

</form>

Seminar

                        Contact for pricing

						<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="MKRB8ML96M3G8">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">

</form>

 For this one-time payment, you receive all-inclusive services. (NOT subscription services.)

Copyright © Kuorageous 2015


text:
module PivotalReporter
  module ApplicationHelper

    def pivotal_labels
      "#{@pivotal_unique_label}, remote_user_#{requested_by.gsub(' ', '').underscore}"
    end

    def requested_by
      PivotalReporter::Engine.config.request_user || current_user.full_name
    end

  end
end


text:
"use strict";

const
    BaseValidator = require('./BaseValidator'),
    DateHelper = require('../helpers/DateHelper');

/**
 * @module nodeviau/validator/DateValidator
 * @author Itari <itari.onkar@gmail.com>
 * @licence MIT
 *
 * @class
 * @classdesc Date and time validator
 */
class DateValidator extends BaseValidator{
    /**
     * Init base variables.
     */
    init(){
        super.init();

        if(typeof this.format === 'undefined'){
            this.format = 'Y-m-d';
        }
    }

    /**
     * Validate incoming attribute.
     * @param model
     * @param attributeName
     * @returns void
     */
    validateAttribute(model, attributeName){

        if(this.isEmptyAndIsAllowed(model, attributeName)){
            return;
        }

        let string = model[attributeName];
        if(typeof string !== 'string'){
            model.addError(attributeName, 'Attribute is not string.');
            return;
        }
        string = string.trim();

        if(!DateHelper.strtotime(string, DateHelper.time())){
            model.addError(attributeName, 'Entered date is wrong.');
        }
    }
}

module.exports = DateValidator;


text:
/* global template */

(function() {
  angular.module('fm.code-block')
    .directive('fmCodeBlock', [
      '$log',
      '$window',
      fmCodeBlock
    ]);

  function fmCodeBlock($log, $window) {
    return {
      restrict: 'A',

      link(scope, element, attrs) {
        // Hack to remove the pre tags that markdown it automatically puts in whenever it sees a fenced code block

        $window.Tonic.createNotebook({
          element:  element[0],
          source:   attrs.code,
          readOnly: false,
          onLoad: () => {
            $log.debug('REMOVING CODE');
            element.find('pre').remove();
          },
        });
      },
    };

  }

})();


text:
/**
 * Collects available boosts in a room, optionally filtered by effect.
 */
Room.prototype.getAvailableBoosts = function (type) {
    if (!this.boostsCache) {
        var boosts = {};

        let storage = this.storage || {store:{}};
        let terminal = this.terminal || {store:{}};
        let resourceTypes = _.union(_.keys(storage.store), _.keys(terminal.store));

        for (let workPart in BOOSTS) {
            let mineralBoosts = BOOSTS[workPart];
            for (let mineralType in mineralBoosts) {
                // Only boost using the best boosts. We'll make sure we have what we need through trading.
                if (mineralType.indexOf('X') == -1) continue;

                let boostValues = mineralBoosts[mineralType];

                if (_.indexOf(resourceTypes, mineralType) != -1) {
                    for (let boostType in boostValues) {
                        if (!boosts[boostType]) {
                            boosts[boostType] = {};
                        }

                        boosts[boostType][mineralType] = {
                            effect: boostValues[boostType],
                            available: Math.floor((storage.store[mineralType] || 0 + terminal.store[mineralType] || 0) / 10),
                        };
                    }
                }
            }
        }

        this.boostsCache = boosts;
    }

    if (type) {
        return this.boostsCache[type];
    }

    return this.boostsCache;
};

/**
 * Decides if spawning of boosted creeps is available in this room.
 * Requires at least one unused lab.
 */
Room.prototype.canSpawnBoostedCreeps = function () {
    if (this.isEvacuating()) return false;

    var labs = this.getBoostLabs();

    if (labs.length > 0) {
        return true;
    }
    return false;
};

/**
 * Gets labs used for boosting creeps in this room.
 */
Room.prototype.getBoostLabs = function () {
    var boostLabs = [];
    if (!this.boostManager) return boostLabs;

    if (true || !this.memory.boostManager.labLastChecked || this.memory.boostManager.labLastChecked < Game.time - 953) {
        this.memory.boostManager.labLastChecked = Game.time;

        var labs = this.find(FIND_STRUCTURES, {
            filter: (structure) => {
                if (structure.structureType != STRUCTURE_LAB) return false;
                if (this.memory.labs && _.contains(this.memory.labs.reactor, structure.id)) return false;
                if (this.memory.labs && structure.id == this.memory.labs.source1) return false;
                if (this.memory.labs && structure.id == this.memory.labs.source2) return false;

                return true;
            }
        });

        if (labs.length > 0) {
            if (!this.memory.boostManager.labs[labs[0].id]) {
                this.memory.boostManager.labs = {};
                this.memory.boostManager.labs[labs[0].id] = {};
            }
        }
    }

    for (let id in this.memory.boostManager.labs || []) {
        let lab = Game.getObjectById(id);
        if (lab) {
            boostLabs.push(lab);
        }
    }

    return boostLabs;
};

var BoostManager = function (roomName) {
    this.roomName = roomName;
    this.room = Game.rooms[roomName];

    if (!Memory.rooms[roomName].boostManager) {
        Memory.rooms[roomName].boostManager = {};
    }

    this.memory = Memory.rooms[roomName].boostManager;

    if (!this.memory.creepsToBoost) {
        this.memory.creepsToBoost = {};
    }
    if (!this.memory.labs) {
        this.memory.labs = {};
    }

    // @todo Clean out this.memory.creepsToBoost of creeps that no longer exist.
};

/**
 * Prepares memory for boosting a new creep.
 */
BoostManager.prototype.markForBoosting = function (creepName, boosts) {
    if (!boosts || !creepName) return;
    let memory = Memory.creeps[creepName];

    if (!memory) return;

    memory.needsBoosting = true;
    this.memory.creepsToBoost[creepName] = {};

    for (let bodyPart in boosts) {
        let resourceType = boosts[bodyPart];
        let numParts = memory.body[bodyPart] || 0;

        this.memory.creepsToBoost[creepName][resourceType] = numParts;
    }
};

/**
 * Overrides a creep's logic while it's being boosted.
 */
BoostManager.prototype.overrideCreepLogic = function (creep) {
    if (!creep.memory.needsBoosting) return false;

    if (!this.memory.creepsToBoost[creep.name]) {
        delete creep.memory.needsBoosting;
        return false;
    }

    let memory = this.memory.creepsToBoost[creep.name];
    if (_.size(memory) == 0) {
        delete this.memory.creepsToBoost[creep.name];
        delete creep.memory.needsBoosting;
        return false;
    }

    for (let resourceType in memory) {
        // Find lab to get boosted at.
        for (let id in this.memory.labs) {
            if (this.memory.labs[id].resourceType != resourceType) continue;

            let lab = Game.getObjectById(id);
            if (!lab) continue;

            if (creep.pos.getRangeTo(lab) > 1) {
                creep.moveToRange(lab, 1);
            }
            else {
                // If there is enough energy and resources, boost!
                if (lab.mineralType == resourceType && lab.mineralAmount >= memory[resourceType] * LAB_BOOST_MINERAL && lab.energy >= memory[resourceType] * LAB_BOOST_ENERGY) {
                    if (lab.boostCreep(creep) == OK) {
                        // @todo Prevent trying to boost another creep with this lab on this turn.
                        // Awesome, boost has been applied (in theory).
                        // Clear partial memory, to prevent trying to boost again.
                        delete memory[resourceType];
                    }
                }
            }
            return true;
        }
    }

    return false;
};

/**
 * Gets a list of labs and their designated resource types.
 */
BoostManager.prototype.getLabOrders = function () {
    var labs = this.room.getBoostLabs();

    if (_.size(this.memory.creepsToBoost) == 0) return {};

    var queuedBoosts = {};
    var toDelete = [];
    for (let creepName in this.memory.creepsToBoost) {
        if (!Game.creeps[creepName]) {
            toDelete.push(creepName);
            continue;
        }

        for (let resourceType in this.memory.creepsToBoost[creepName]) {
            queuedBoosts[resourceType] = (queuedBoosts[resourceType] || 0) + this.memory.creepsToBoost[creepName][resourceType];
        }
    }

    for (let i in toDelete) {
        delete this.memory.creepsToBoost[toDelete[i]];
    }

    for (let i in labs) {
        let lab = labs[i];

        if (!this.memory.labs[lab.id]) {
            this.memory.labs[lab.id] = {};
        }
        if (!this.memory.labs[lab.id].resourceType || !queuedBoosts[this.memory.labs[lab.id].resourceType]) {
            let unassigned = _.filter(_.keys(queuedBoosts), (resourceType) => {
                return _.filter(labs, (lab) => this.memory.labs[lab.id].resourceType == resourceType).length == 0;
            });

            if (unassigned.length == 0) {
                delete this.memory.labs[lab.id].resourceType;
            }
            else {
                this.memory.labs[lab.id].resourceType = unassigned[0];
            }
        }
        if (this.memory.labs[lab.id].resourceType) {
            let resourceType = this.memory.labs[lab.id].resourceType;
            this.memory.labs[lab.id].resourceAmount = queuedBoosts[resourceType] * LAB_BOOST_MINERAL;
            this.memory.labs[lab.id].energyAmount = queuedBoosts[resourceType] * LAB_BOOST_ENERGY;
        }
        else {
            delete this.memory.labs[lab.id].resourceAmount;
            delete this.memory.labs[lab.id].energyAmount;
        }
    }

    // Make sure to delete memory of any labs no longer used for boosting.
    let unused = _.filter(_.keys(this.memory.labs), (id) => {
        return _.filter(labs, (lab) => lab.id == id).length == 0;
    });
    for (let i in unused) {
        delete this.memory.labs[unused[i]];
    }

    return this.memory.labs;
};

/**
 * Decides whether helper creeps need to be spawned in this room.
 */
BoostManager.prototype.needsSpawning = function () {
    var maxHelpers = 1;
    var numHelpers = _.filter(this.room.creepsByRole.helper || [], (creeps) => true).length;

    if (numHelpers < maxHelpers) {
        // Make sure we actually need helpers.
        if (_.size(this.memory.creepsToBoost) > 0) {
            return true;
        }
    }

    return false;
};

/**
 * Spawns a helper when necessary.
 */
BoostManager.prototype.spawn = function (spawn) {
    spawn.createManagedCreep({
        role: 'helper',
        body: [MOVE, MOVE, CARRY, CARRY, CARRY, CARRY],
        memory: {
            singleRoom: this.roomName,
        },
    });
};

module.exports = BoostManager;


text:
using namespace Intra;
using namespace IO;

struct IRange
{
	virtual ~IRange() {}
	virtual int First() = 0;
	virtual void PopFirst() = 0;
};

class CycledRange: public IRange
{
	int* mBegin;
	int* mEnd;
	int* mPtr;
public:
	CycledRange(int* arr, size_t count): mBegin(arr), mEnd(arr+count), mPtr(arr) {}
	int First() final {return *mPtr;}
	void PopFirst() final {mPtr++; if(mPtr>=mEnd) mPtr=mBegin;}
};

int TestPolymorphicRange(IRange* range, size_t totalCount)
{
	int sum = 0;
	for(size_t i=0; i<totalCount; i++)
	{
		sum += range->First();
		range->PopFirst();
	}
	return sum;
}

int TestPolymorphicRange2(InputRange<int> range, size_t totalCount)
{
	int sum = 0;
	for(size_t i=0; i<totalCount; i++)
	{
		sum += range.First();
		range.PopFirst();
	}
	return sum;
}

int TestPolymorphicRange3(InputRange<int> range, size_t totalCount)
{
	int sum = 0;
	for(size_t i=0; i<totalCount; i++)
		sum += range.Next();
	return sum;
}

int TestInlinedRange(int* arr, size_t count, size_t totalCount)
{
	int* mBegin = arr;
	int* mEnd = arr+count;
	int* mPtr = arr;
	int sum = 0;
	for(size_t i=0; i<totalCount; i++)
	{
		if(mPtr>=mEnd) mPtr=mBegin;
		sum += *mPtr++;
	}
	return sum;
}

int TestStaticRange(int* arr, size_t count, size_t totalCount)
{
	auto cycle = Range::Cycle(Span<int>(arr, count));
	int sum = 0;
	for(size_t i=0; i<totalCount; i++)
	{
		sum += cycle.First();
		cycle.PopFirst();
	}
	return sum;
}

void RunPolymorphicRangePerfTests(FormattedWriter& output)
{
	Array<int> arr;
	arr.SetCountUninitialized(1000);
	IRange* range = new CycledRange(arr.Data(), arr.Count());

	Stopwatch tim;
	int sum1 = TestPolymorphicRange(range, 100000000);
	double time1 = tim.GetElapsedSecondsAndReset();

	int sum2 = TestPolymorphicRange2(Range::Cycle(arr), 100000000);
	double time2 = tim.GetElapsedSecondsAndReset();

	int sum3 = TestPolymorphicRange3(Range::Cycle(arr), 100000000);
	double time3 = tim.GetElapsedSecondsAndReset();

	int sum4 = TestInlinedRange(arr.Data(), 1000, 100000000);
	double time4 = tim.GetElapsedSecondsAndReset();

	int sum5 = TestStaticRange(arr.Data(), 1000, 100000000);
	double time5 = tim.GetElapsedSecondsAndReset();

	Std.PrintLine(sum1, " ", sum2, " ", sum3, " ", sum4, " ", sum5);

	PrintPerformanceResults(output, "CycledRange 100000000 times",
		{"CycledRange*", "InputRange<int>", "InputRange<int>::GetNext", "manually inlined loop", "Span.Cycle"},
		{time1, time2, time3},
		{time4, time5});
}


text:
#ifndef ARROW_CLIENT_H
#define ARROW_CLIENT_H

typedef void ArrowClient;
typedef void JoinHandle;
typedef void Logger;
typedef void Config;
typedef void Storage;
typedef void CustomStorageBuilder;
typedef void DefaultStorageBuilder;
typedef void CACertStorage;
typedef void ServiceTable;
typedef void Service;

#define SEVERITY_DEBUG      0
#define SEVERITY_INFO       1
#define SEVERITY_WARN       2
#define SEVERITY_ERROR      3

#define CONNECTION_STATE_DISCONNECTED   0
#define CONNECTION_STATE_CONNECTED      1
#define CONNECTION_STATE_UNAUTHORIZED   2

#define SERVICE_TYPE_RTSP               0x0001
#define SERVICE_TYPE_RTSP_LOCKED        0x0002
#define SERVICE_TYPE_RTSP_UNKNOWN       0x0003
#define SERVICE_TYPE_RTSP_UNSUPPORTED   0x0004
#define SERVICE_TYPE_HTTP               0x0005
#define SERVICE_TYPE_MJPEG              0x0006
#define SERVICE_TYPE_MJPEG_LOCKED       0x0007
#define SERVICE_TYPE_TCP                0xffff

typedef void LogCallback(
    void *opaque,
    const char *file,
    uint32_t line,
    uint32_t severity,
    const char *msg);

typedef void ConnectionStateCallback(void* opaque, int state);
typedef void NetworkScannerStateCallback(void* opaque, int state);

typedef int LoadCACertificates(void *opaque, CACertStorage *cert_storage);
typedef int LoadConfiguration(void *opaque, char **configuration);
typedef int LoadPaths(void *opaque, char ***paths, size_t *len);
typedef int SaveConfiguration(void *opaque, const char *configuration);
typedef int SaveConnectionState(void *opaque, int state);

/**
 * Allocate a block of memory with a given size.
 */
void* ac__malloc(size_t size);

/**
 * Free a given block of memory.
 */
void ac__free(void* ptr);

/**
 * Create a new Arrow client from a given config and storage. The function
 * takes ownership of the given config and storage.
 */
ArrowClient* ac__arrow_client__new(
    Config* config,
    Storage* storage,
    const char* arrow_service_address);

/**
 * Free (and close) a given Arrow client.
 */
void ac__arrow_client__free(ArrowClient* client);

/**
 * Start a given Arrow client in the background and return a join handle. The
 * function does nothing if the client has been already started. The returned
 * join handle must be either freed or awaited.
 */
JoinHandle* ac__arrow_client__start(ArrowClient* client);

/**
 * Start a given Arrow client blocking the current thread. The function does
 * nothing if the client has been already started.
 */
void ac__arrow_client__start_blocking(ArrowClient* client);

/**
 * Close a given Arrow client.
 */
void ac__arrow_client__close(ArrowClient* client);

/**
 * Add a given connection state callback.
 */
void ac__arrow_client__add_connection_state_callback(
    ArrowClient* client,
    ConnectionStateCallback* callback,
    void* opaque);

/**
 * Add a given network scanner state callback.
 */
void ac__arrow_client__add_network_scanner_state_callback(
    ArrowClient* client,
    NetworkScannerStateCallback* callback,
    void* opaque);

/**
 * Get Arrow client UUID. The given buffer must have enough space to store at
 * least 16 bytes.
 */
void ac__arrow_client__get_uuid(const ArrowClient* client, uint8_t* uuid);

/**
 * Get MAC address used for Arrow client identification. The given buffer must
 * have enough space to store at least 6 bytes.
 */
void ac__arrow_client__get_mac_address(
    const ArrowClient* client,
    uint8_t* uuid);

/**
 * Get client service table.
 */
ServiceTable* ac__arrow_client__get_service_table(const ArrowClient* client);

/**
 * Scan the local network.
 */
void ac__arrow_client__scan_network(ArrowClient* client);

/**
 * Clear the service table and scan the local network again.
 */
void ac__arrow_client__rescan_network(ArrowClient* client);

/**
 * Free a given join handle.
 */
void ac__join_handle__free(JoinHandle* handle);

/**
 * Await a given join handle. The function takes ownership of the handle.
 */
void ac__join_handle__join(JoinHandle* handle);

/**
 * Create a new Arrow client config.
 */
Config* ac__config__new(void);

/**
 * Free the config.
 */
void ac__config__free(Config* config);

/**
 * Set logger. The function takes ownership of the logger.
 */
void ac__config__set_logger(Config* config, Logger* logger);

/**
 * Set MAC address. The `mac_address` parameter is expected to be a an array
 * of six bytes or NULL.
 */
void ac__config__set_mac_address(Config* config, const uint8_t* mac_address);

/**
 * Enable/disable diagnostic mode.
 */
void ac__config__set_diagnostic_mode(Config* config, int enabled);

/**
 * Enable/disable automatic service discovery.
 */
void ac__config__set_discovery(Config* config, int enabled);

/**
 * Enable/disable verbose mode.
 */
void ac__config__set_verbose(Config* config, int enabled);

/**
 * Create a new logger using a given custom log callback.
 */
Logger* ac__logger__custom(LogCallback* callback, void* opaque);

/**
 * Create a new syslog logger.
 */
Logger* ac__logger__syslog(void);

/**
 * Create a new stderr logger.
 */
Logger* ac__logger__stderr(int pretty);

/**
 * Create a new file logger. The function returns NULL if the log file cannot
 * be open.
 */
Logger* ac__logger__file(const char* path, size_t limit, size_t rotations);

/**
 * Clone a given logger.
 */
Logger* ac__logger__clone(const Logger* logger);

/**
 * Free a give logger.
 */
void ac__logger__free(Logger* logger);

/**
 * Create a new custom storage builder.
 */
CustomStorageBuilder* ac__custom_storage_builder__new(void* opaque);

/**
 * Free the storage.
 */
void ac__custom_storage_builder__free(CustomStorageBuilder* builder);

/**
 * Set function for saving client configuration.
 */
void ac__custom_storage_builder__set_save_configuration_func(
    CustomStorageBuilder* builder,
    SaveConfiguration* func);

/**
 * Set function for loading client configuration. If the load function responds
 * with NULL configuration, a new configuration will be created automatically.
 * The function must allocate the configuration using `ac__malloc()`.
 */
void ac__custom_storage_builder__set_load_configuration_func(
    CustomStorageBuilder* builder,
    LoadConfiguration* load);

/**
 * Set function for saving client connection state.
 */
void ac__custom_storage_builder__set_save_connection_state_func(
    CustomStorageBuilder* builder,
    SaveConnectionState* func);

/**
 * Set function for loading RTSP paths. The function must allocate the paths
 * using `ac__malloc()`.
 */
void ac__custom_storage_builder__set_load_rtsp_paths_func(
    CustomStorageBuilder* builder,
    LoadPaths* load);

/**
 * Set function for loading MJPEG paths. The function must allocate the paths
 * using `ac__malloc()`.
 */
void ac__custom_storage_builder__set_load_mjpeg_paths_func(
    CustomStorageBuilder* builder,
    LoadPaths* load);

/**
 * Set function for loading CA certificates.
 */
void ac__custom_storage_builder__set_load_ca_certificates_func(
    CustomStorageBuilder* builder,
    LoadCACertificates* func);

/**
 * Build the storage. The function takes ownership of the builder.
 */
Storage* ac__custom_storage_builder__build(CustomStorageBuilder* builder);

/**
 * Create a new builder for the default storage. The function takes a path to
 * a configuration file and a path to a lock file. The lock file path may be
 * NULL. The function returns NULL if the lock file cannot be created/locked.
 */
DefaultStorageBuilder* ac__default_storage_builder__new(
    const char* config_file,
    const char* lock_file);

/**
 * Free the builder.
 */
void ac__default_storage_builder__free(DefaultStorageBuilder* builder);

/**
 * Set path for the configuration skeleton file.
 */
void ac__default_storage_builder__set_config_skeleton_file(
    DefaultStorageBuilder* builder,
    const char* file);

/**
 * Set path for the connection state file.
 */
void ac__default_storage_builder__set_connection_state_file(
    DefaultStorageBuilder* builder,
    const char* file);

/**
 * Set path for the identity file.
 */
void ac__default_storage_builder__set_identity_file(
    DefaultStorageBuilder* builder,
    const char* file);

/**
 * Set path for the file containing RTSP paths.
 */
void ac__default_storage_builder__set_rtsp_paths_file(
    DefaultStorageBuilder* builder,
    const char* file);

/**
 * Set path for the file containing MJPEG paths.
 */
void ac__default_storage_builder__set_mjpeg_paths_file(
    DefaultStorageBuilder* builder,
    const char* file);

/**
 * Add a path to a CA certificate.
 */
void ac__default_storage_builder__add_ca_cerificate(
    DefaultStorageBuilder* builder,
    const char* file);

/**
 * Set logger.
 */
void ac__default_storage_builder__set_logger(
    DefaultStorageBuilder* builder,
    Logger* logger);

/**
 * Build the storage. The function takes ownership of the builder.
 */
Storage* ac__default_storage_builder__build(DefaultStorageBuilder* builder);

/**
 * Free a given storage.
 */
void ac__storage__free(Storage* storage);

/**
 * Load a given CA certificate file.
 */
int ac__ca_cert_storage__load_ca_file(
    CACertStorage* cert_storage,
    const char* file);

/**
 * Load a given DER certificate.
 */
int ac__ca_cert_storage__load_der(
    CACertStorage* cert_storage,
    const uint8_t* der,
    size_t size);

/**
 * Load a given PEM certificate.
 */
int ac__ca_cert_storage__load_pem(
    CACertStorage* cert_storage,
    const uint8_t* pem,
    size_t size);

/**
 * Free the service table.
 */
void ac__service_table__free(ServiceTable* table);

/**
 * Get number of services in the table.
 */
size_t ac__service_table__get_service_count(const ServiceTable* table);

/**
 * Get service at a given index.
 */
const Service* ac__service_table__get_service(
    const ServiceTable* table,
    size_t index);

/**
 * Get service ID.
 */
uint16_t ac__service__get_id(const Service* service);

/**
 * Get service type.
 */
uint16_t ac__service__get_type(const Service* service);

/**
 * Get service MAC address. The given buffer must have enough space to store at
 * least 6 bytes.
 */
void ac__service__get_mac_address(const Service* service, uint8_t* buffer);

/**
 * Get version of the service IP address.
 */
uint8_t ac__service__get_ip_version(const Service* service);

/**
 * Get service IP address. The given buffer must have enough space to store at
 * least 4 bytes for IPv4 address or 16 bytes for IPv6 address. Version of the
 * IP address is returned.
 */
uint8_t ac__service__get_ip_address(const Service* service, uint8_t* buffer);

/**
 * Get service port.
 */
uint16_t ac__service__get_port(const Service* service);

/**
 * Get service path/endpoint (may be NULL).
 */
const char* ac__service__get_path(const Service* service);

#endif /* ARROW_CLIENT_H */


text:
package com.glaf.matrix.transform.domain;

import java.io.*;
import java.util.*;
import javax.persistence.*;
import com.alibaba.fastjson.*;
import com.fasterxml.jackson.databind.node.ObjectNode;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.glaf.core.base.*;
import com.glaf.core.util.DateUtils;
import com.glaf.matrix.transform.util.*;

/**
 *
 * 实体对象
 *
 */

@Entity
@Table(name = "SYS_COLUMN_TRANSFORM")
public class ColumnTransform implements java.lang.Comparable<ColumnTransform>, Serializable, JSONable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "ID_", nullable = false)
	protected long id;

	@Column(name = "TRANSFORMID_", length = 50, nullable = false)
	protected String transformId;

	/**
	 * 名称
	 */
	@Column(name = "NAME_", length = 50)
	protected String name;

	/**
	 * 标题
	 */
	@Column(name = "TITLE_", length = 200)
	protected String title;

	/**
	 * 表名
	 */
	@Column(name = "TABLENAME_", length = 50)
	protected String tableName;

	/**
	 * 转换列
	 */
	@Column(name = "COLUMNNAME_", length = 50)
	protected String columnName;

	/**
	 * 转换后新列名
	 */
	@Column(name = "TARGETCOLUMNNAME_", length = 50)
	protected String targetColumnName;

	/**
	 * 目标列精度
	 */
	@Column(name = "TARGETCOLUMNPRECISION_")
	protected int targetColumnPrecision;

	/**
	 * 转换后新列类型
	 */
	@Column(name = "TARGETTYPE_", length = 50)
	protected String targetType;

	/**
	 * 转换条件
	 */
	@Column(name = "CONDITION_", length = 500)
	protected String condition;

	/**
	 * SQL条件
	 */
	@Column(name = "SQLCRITERIA_", length = 4000)
	protected String sqlCriteria;

	/**
	 * 转换表达式
	 */
	@Column(name = "EXPRESSION_", length = 500)
	protected String expression;

	/**
	 * 当目标列不为空时是否转换
	 */
	@Column(name = "TRANSFORM_IF_FLAG_", length = 1)
	protected String transformIfTargetColumnNotEmpty;

	/**
	 * 类型
	 */
	@Column(name = "TYPE_", length = 50)
	protected String type;

	/**
	 * 同步状态
	 */
	@Column(name = "SYNCSTATUS_")
	protected int syncStatus;

	/**
	 * 最后同步时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "SYNCTIME_")
	protected Date syncTime;

	/**
	 * 顺序
	 */
	@Column(name = "SORT_")
	protected int sort;

	/**
	 * 是否锁定
	 */
	@Column(name = "LOCKED_")
	protected int locked;

	/**
	 * 创建人
	 */
	@Column(name = "CREATEBY_", length = 50)
	protected String createBy;

	/**
	 * 创建时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATETIME_")
	protected Date createTime;

	/**
	 * 修改人
	 */
	@Column(name = "UPDATEBY_", length = 50)
	protected String updateBy;

	/**
	 * 修改时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATETIME_")
	protected Date updateTime;

	@javax.persistence.Transient
	protected int position;

	public ColumnTransform() {

	}

	public int compareTo(ColumnTransform o) {
		if (o == null) {
			return -1;
		}

		ColumnTransform field = o;

		int l = this.sort - field.getSort();

		int ret = 0;

		if (l > 0) {
			ret = 1;
		} else if (l < 0) {
			ret = -1;
		}
		return ret;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ColumnTransform other = (ColumnTransform) obj;
		if (id != other.id)
			return false;
		return true;
	}

	public String getColumnName() {
		return this.columnName;
	}

	public String getCondition() {
		return condition;
	}

	public String getCreateBy() {
		return this.createBy;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public String getCreateTimeString() {
		if (this.createTime != null) {
			return DateUtils.getDateTime(this.createTime);
		}
		return "";
	}

	public String getExpression() {
		return this.expression;
	}

	public long getId() {
		return this.id;
	}

	public int getLocked() {
		return this.locked;
	}

	public String getName() {
		return this.name;
	}

	public int getPosition() {
		return position;
	}

	public int getSort() {
		return this.sort;
	}

	public String getSqlCriteria() {
		return sqlCriteria;
	}

	public int getSyncStatus() {
		return this.syncStatus;
	}

	public Date getSyncTime() {
		return this.syncTime;
	}

	public String getSyncTimeString() {
		if (this.syncTime != null) {
			return DateUtils.getDateTime(this.syncTime);
		}
		return "";
	}

	public String getTableName() {
		return this.tableName;
	}

	public String getTargetColumnName() {
		if (targetColumnName != null) {
			targetColumnName = targetColumnName.trim().toUpperCase();
		}
		return this.targetColumnName;
	}

	public int getTargetColumnPrecision() {
		return targetColumnPrecision;
	}

	public String getTargetType() {
		return this.targetType;
	}

	public String getTitle() {
		return this.title;
	}

	public String getTransformId() {
		return transformId;
	}

	public String getTransformIfTargetColumnNotEmpty() {
		return transformIfTargetColumnNotEmpty;
	}

	public String getType() {
		return this.type;
	}

	public String getUpdateBy() {
		return this.updateBy;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public String getUpdateTimeString() {
		if (this.updateTime != null) {
			return DateUtils.getDateTime(this.updateTime);
		}
		return "";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}

	public ColumnTransform jsonToObject(JSONObject jsonObject) {
		return ColumnTransformJsonFactory.jsonToObject(jsonObject);
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public void setCondition(String condition) {
		this.condition = condition;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public void setExpression(String expression) {
		this.expression = expression;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setLocked(int locked) {
		this.locked = locked;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public void setSqlCriteria(String sqlCriteria) {
		this.sqlCriteria = sqlCriteria;
	}

	public void setSyncStatus(int syncStatus) {
		this.syncStatus = syncStatus;
	}

	public void setSyncTime(Date syncTime) {
		this.syncTime = syncTime;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public void setTargetColumnName(String targetColumnName) {
		this.targetColumnName = targetColumnName;
	}

	public void setTargetColumnPrecision(int targetColumnPrecision) {
		this.targetColumnPrecision = targetColumnPrecision;
	}

	public void setTargetType(String targetType) {
		this.targetType = targetType;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setTransformId(String transformId) {
		this.transformId = transformId;
	}

	public void setTransformIfTargetColumnNotEmpty(String transformIfTargetColumnNotEmpty) {
		this.transformIfTargetColumnNotEmpty = transformIfTargetColumnNotEmpty;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public JSONObject toJsonObject() {
		return ColumnTransformJsonFactory.toJsonObject(this);
	}

	public ObjectNode toObjectNode() {
		return ColumnTransformJsonFactory.toObjectNode(this);
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

}