text:
#import <iWorkImport/TSCHChartCommand.h>

@class NSArray;

// Not exported
@interface TSCHCommandDeleteRows : TSCHChartCommand
{
    struct _NSRange mRowRange;
    NSArray *mCutNames;
    NSArray *mCutValues;
    _Bool mRemovedAllRows;
    NSArray *mCutColumnNames;
}

- (id).cxx_construct;
- (void)saveToArchiver:(id)arg1;
- (id)initFromUnarchiver:(id)arg1;
- (const struct ChartCommandArchive *)chartCommandArchiveFromUnarchiver:(id)arg1;
- (void)redoPrimitive;
- (void)undoPrimitive;
- (void)commitPrimitive;
- (_Bool)process;
- (void)dealloc;
- (id)initWithChartInfo:(id)arg1 rowRange:(struct _NSRange)arg2;

@end


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

<title>Kupenda</title>

<link href="stylesheets/reset.css" media="screen" rel="Stylesheet" type="text/css" />

<link href="stylesheets/site.css" media="screen" rel="Stylesheet" type="text/css" />
<link href="stylesheets/home.css" media="screen" rel="Stylesheet" type="text/css" />

						Kupenda

						(Swahili for "to love") for the children" is a 501 (c)(3)tax-exempt Christian charity that meets the physical, emotional and spiritual needs of handicapped children in the developing world. Currently the focus of Kupenda is on the coast of Kenya but is expanding to other countries.

Get the Flash Player to see this movie.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla nec nisl sit amet lectus rhoncus vulputate. Integer ut odio vel libero convallis vulputate. Mauris blandit. Phasellus at lacus ut enim ultricies consectetuer. In urna. Etiam egestas aliquam nisl. Etiam aliquam sem vel ante. Etiam egestas aliquam nisl. Etiam aliquam sem vel ante.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla nec nisl sit amet lectus rhoncus vulputate. Integer ut odio vel libero convallis vulputate. Mauris blandit. Phasellus at lacus ut enim ultricies consectetuer. In urna. Etiam egestas aliquam nisl. Etiam aliquam sem vel ante. Etiam egestas aliquam nisl. Etiam aliquam sem vel ante.

one

two

three

two

three

two

three

one

two

three

four

five

one

four

five

"Dear children, let us not love with words or tongue but with actions and in truth." ~1 John 3:18

redpajama_set_name: RedPajamaGithub


text:
#include "hal_tick.h"

// A 16-bit timer is used
#if TIM_MST_16BIT

#define DEBUG_TICK 0 // Set to 1 to toggle a pin (see below which pin) at each tick

extern TIM_HandleTypeDef TimMasterHandle;

extern volatile uint32_t SlaveCounter;
extern volatile uint32_t oc_int_part;

volatile uint32_t PreviousVal = 0;

void us_ticker_irq_handler(void);

#if defined(TARGET_STM32F0)
void timer_update_irq_handler(void) {
#else
void timer_irq_handler(void)
{
#endif
    TimMasterHandle.Instance = TIM_MST;

    // Clear Update interrupt flag
    if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_UPDATE) == SET) {
        if (__HAL_TIM_GET_IT_SOURCE(&TimMasterHandle, TIM_IT_UPDATE) == SET) {
            __HAL_TIM_CLEAR_IT(&TimMasterHandle, TIM_IT_UPDATE);
            SlaveCounter++;
        }
    }

#if defined(TARGET_STM32F0)
} // end timer_update_irq_handler function
// Used for mbed timeout (channel 1) and HAL tick (channel 2)
void timer_oc_irq_handler(void)
{
    TimMasterHandle.Instance = TIM_MST;
#endif

    // Channel 1 for mbed timeout
    if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_CC1) == SET) {
        if (__HAL_TIM_GET_IT_SOURCE(&TimMasterHandle, TIM_IT_CC1) == SET) {
            __HAL_TIM_CLEAR_IT(&TimMasterHandle, TIM_IT_CC1);

                if (oc_int_part > 0) {
                    oc_int_part--;
                } else {
                   us_ticker_irq_handler();
                }
        }
    }

    // Channel 2 for HAL tick
    if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_CC2) == SET) {

        if (__HAL_TIM_GET_IT_SOURCE(&TimMasterHandle, TIM_IT_CC2) == SET) {
            __HAL_TIM_CLEAR_IT(&TimMasterHandle, TIM_IT_CC2);
            uint32_t val = __HAL_TIM_GET_COUNTER(&TimMasterHandle);
            if ((val - PreviousVal) >= HAL_TICK_DELAY) {
                // Increment HAL variable
                HAL_IncTick();
                // Prepare next interrupt
                __HAL_TIM_SET_COMPARE(&TimMasterHandle, TIM_CHANNEL_2, val + HAL_TICK_DELAY);
                PreviousVal = val;
#if DEBUG_TICK > 0
                HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_6);
#endif
            }
        }
    }
}

// Reconfigure the HAL tick using a standard timer instead of systick.
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
    // Enable timer clock
    TIM_MST_RCC;

    // Reset timer
    TIM_MST_RESET_ON;
    TIM_MST_RESET_OFF;

    // Update the SystemCoreClock variable
    SystemCoreClockUpdate();

    // Configure time base
    TimMasterHandle.Instance = TIM_MST;
    TimMasterHandle.Init.Period        = 0xFFFF;
    TimMasterHandle.Init.Prescaler     = (uint32_t)(SystemCoreClock / 1000000) - 1; // 1 us tick
    TimMasterHandle.Init.ClockDivision = 0;
    TimMasterHandle.Init.CounterMode   = TIM_COUNTERMODE_UP;
#if !defined(TARGET_STM32L0)
    TimMasterHandle.Init.RepetitionCounter = 0;
#endif
#ifdef TIM_AUTORELOAD_PRELOAD_DISABLE
    TimMasterHandle.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
#endif
    HAL_TIM_Base_Init(&TimMasterHandle);

    //LL_TIM_EnableUpdateEvent(TimMasterHandle.Instance);

    // Configure output compare channel 1 for mbed timeout (enabled later when used)
    HAL_TIM_OC_Start(&TimMasterHandle, TIM_CHANNEL_1);

    // Configure output compare channel 2 for HAL tick
    HAL_TIM_OC_Start(&TimMasterHandle, TIM_CHANNEL_2);
    PreviousVal = __HAL_TIM_GET_COUNTER(&TimMasterHandle);
    __HAL_TIM_SET_COMPARE(&TimMasterHandle, TIM_CHANNEL_2, PreviousVal + HAL_TICK_DELAY);

    // Configure interrupts
    // Update interrupt used for 32-bit counter
    // Output compare channel 1 interrupt for mbed timeout
    // Output compare channel 2 interrupt for HAL tick
#if defined(TARGET_STM32F0)
    NVIC_SetVector(TIM_MST_UP_IRQ, (uint32_t)timer_update_irq_handler);
    NVIC_EnableIRQ(TIM_MST_UP_IRQ);
    NVIC_SetPriority(TIM_MST_UP_IRQ, 0);
    NVIC_SetVector(TIM_MST_OC_IRQ, (uint32_t)timer_oc_irq_handler);
    NVIC_EnableIRQ(TIM_MST_OC_IRQ);
    NVIC_SetPriority(TIM_MST_OC_IRQ, 1);
#else
    NVIC_SetVector(TIM_MST_IRQ, (uint32_t)timer_irq_handler);
    NVIC_EnableIRQ(TIM_MST_IRQ);
#endif

    // Enable interrupts
    __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_UPDATE); // For 32-bit counter
    __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2); // For HAL tick

    // Enable timer
    HAL_TIM_Base_Start(&TimMasterHandle);

#ifndef NDEBUG
#ifdef TIM_MST_DBGMCU_FREEZE
    // Freeze timer on stop/breakpoint
    TIM_MST_DBGMCU_FREEZE;
#endif
#endif

#if DEBUG_TICK > 0
    __HAL_RCC_GPIOB_CLK_ENABLE();
    GPIO_InitTypeDef GPIO_InitStruct;
    GPIO_InitStruct.Pin = GPIO_PIN_6;
    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
    GPIO_InitStruct.Pull = GPIO_PULLUP;
    GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
#endif

    return HAL_OK;
}

/* NOTE: must be called with interrupts disabled! */
void HAL_SuspendTick(void)
{
    __HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2);
}

/* NOTE: must be called with interrupts disabled! */
void HAL_ResumeTick(void)
{
    __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2);
}

#endif // TIM_MST_16BIT


text:
from ccxt.async.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError

class fybse (Exchange):

    def describe(self):
        return self.deep_extend(super(fybse, self).describe(), {
            'id': 'fybse',
            'name': 'FYB-SE',
            'countries': 'SE',  # Sweden
            'hasCORS': False,
            'rateLimit': 1500,
            'urls': {
                'logo': 'https://user-images.githubusercontent.com/1294454/27766512-31019772-5edb-11e7-8241-2e675e6797f1.jpg',
                'api': 'https://www.fybse.se/api/SEK',
                'www': 'https://www.fybse.se',
                'doc': 'http://docs.fyb.apiary.io',
            },
            'api': {
                'public': {
                    'get': [
                        'ticker',
                        'tickerdetailed',
                        'orderbook',
                        'trades',
                    ],
                },
                'private': {
                    'post': [
                        'test',
                        'getaccinfo',
                        'getpendingorders',
                        'getorderhistory',
                        'cancelpendingorder',
                        'placeorder',
                        'withdraw',
                    ],
                },
            },
            'markets': {
                'BTC/SEK': {'id': 'SEK', 'symbol': 'BTC/SEK', 'base': 'BTC', 'quote': 'SEK'},
            },
        })

    async def fetch_balance(self, params={}):
        balance = await self.privatePostGetaccinfo()
        btc = float(balance['btcBal'])
        symbol = self.symbols[0]
        quote = self.markets[symbol]['quote']
        lowercase = quote.lower() + 'Bal'
        fiat = float(balance[lowercase])
        crypto = {
            'free': btc,
            'used': 0.0,
            'total': btc,
        }
        result = {'BTC': crypto}
        result[quote] = {
            'free': fiat,
            'used': 0.0,
            'total': fiat,
        }
        result['info'] = balance
        return self.parse_balance(result)

    async def fetch_order_book(self, symbol, params={}):
        orderbook = await self.publicGetOrderbook(params)
        return self.parse_order_book(orderbook)

    async def fetch_ticker(self, symbol, params={}):
        ticker = await self.publicGetTickerdetailed(params)
        timestamp = self.milliseconds()
        last = None
        volume = None
        if 'last' in ticker:
            last = float(ticker['last'])
        if 'vol' in ticker:
            volume = float(ticker['vol'])
        return {
            'symbol': symbol,
            'timestamp': timestamp,
            'datetime': self.iso8601(timestamp),
            'high': None,
            'low': None,
            'bid': float(ticker['bid']),
            'ask': float(ticker['ask']),
            'vwap': None,
            'open': None,
            'close': None,
            'first': None,
            'last': last,
            'change': None,
            'percentage': None,
            'average': None,
            'baseVolume': volume,
            'quoteVolume': None,
            'info': ticker,
        }

    def parse_trade(self, trade, market):
        timestamp = int(trade['date']) * 1000
        return {
            'info': trade,
            'id': str(trade['tid']),
            'order': None,
            'timestamp': timestamp,
            'datetime': self.iso8601(timestamp),
            'symbol': market['symbol'],
            'type': None,
            'side': None,
            'price': float(trade['price']),
            'amount': float(trade['amount']),
        }

    async def fetch_trades(self, symbol, since=None, limit=None, params={}):
        market = self.market(symbol)
        response = await self.publicGetTrades(params)
        return self.parse_trades(response, market, since, limit)

    async def create_order(self, symbol, type, side, amount, price=None, params={}):
        response = await self.privatePostPlaceorder(self.extend({
            'qty': amount,
            'price': price,
            'type': side[0].upper()
        }, params))
        return {
            'info': response,
            'id': response['pending_oid'],
        }

    async def cancel_order(self, id, symbol=None, params={}):
        return await self.privatePostCancelpendingorder({'orderNo': id})

    def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
        url = self.urls['api'] + '/' + path
        if api == 'public':
            url += '.json'
        else:
            self.check_required_credentials()
            nonce = self.nonce()
            body = self.urlencode(self.extend({'timestamp': nonce}, params))
            headers = {
                'Content-Type': 'application/x-www-form-urlencoded',
                'key': self.apiKey,
                'sig': self.hmac(self.encode(body), self.encode(self.secret), hashlib.sha1)
            }
        return {'url': url, 'method': method, 'body': body, 'headers': headers}

    async def request(self, path, api='public', method='GET', params={}, headers=None, body=None):
        response = await self.fetch2(path, api, method, params, headers, body)
        if api == 'private':
            if 'error' in response:
                if response['error']:
                    raise ExchangeError(self.id + ' ' + self.json(response))
        return response


text:
package ee.shy.io;

import com.google.gson.*;
import com.google.gson.stream.JsonWriter;
import ee.shy.storage.Hash;

import java.io.*;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Class providing general JSON serialization/deserialization via gson.
 */
public final class Json {
    private Json() {

    }

    /**
     * gson object used for all operations.
     */
    private static final Gson gson = new GsonBuilder()
            .setPrettyPrinting()
            .registerTypeAdapterFactory(new ValidatedTypeAdapterFactory())
            .registerTypeAdapter(Hash.class, new HashBiserializer())
            .registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeBiserializer())
            .create();

    /**
     * Writes an object to an output stream as JSON.
     * @param os output stream to write to
     * @param object object to write
     * @throws IOException if there was a problem writing to the output stream
     */
    public static void write(OutputStream os, Object object) throws IOException {
        try (Writer writer = new OutputStreamWriter(os, StandardCharsets.UTF_8)) {
            JsonWriter jsonWriter = gson.newJsonWriter(writer);
            jsonWriter.setIndent("    ");
            gson.toJson(object, object.getClass(), jsonWriter);
        }
    }

    /**
     * Writes an object to a file as JSON.
     * @param path file to write to
     * @param object object to write
     * @throws IOException if there was a problem writing to the file
     */
    public static void write(Path path, Object object) throws IOException {
        try (OutputStream os = Files.newOutputStream(path)) {
            write(os, object);
        }
    }

    /**
     * Reads an object from an input stream as JSON.
     * @param is input stream to read from
     * @param classofT class of object to read
     * @param <T> type of readable object
     * @return object read
     * @throws IOException if there was a problem reading from the input stream
     */
    public static <T> T read(InputStream is, Class<T> classofT) throws IOException {
        try (Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8)) {
            return gson.fromJson(reader, classofT);
        }
        catch (IllegalArgumentException | IllegalStateException e) {
            throw new IllegalJsonException("illegal arguments", e);
        }
    }

    /**
     * Reads an object from a file as JSON.
     * @param path file to read from
     * @param classofT class of object to read
     * @param <T> type of readable object
     * @return object read
     * @throws IOException if there was a problem reading from the file
     */
    public static <T> T read(Path path, Class<T> classofT) throws IOException {
        try (InputStream is = Files.newInputStream(path)) {
            return read(is, classofT);
        }
    }

    /**
     * Serializer and deserializer for {@link Hash} objects.
     */
    private static class HashBiserializer implements JsonBiserializer<Hash> {
        @Override
        public JsonElement serialize(Hash hash, Type type, JsonSerializationContext jsonSerializationContext) {
            return new JsonPrimitive(hash.toString());
        }
        @Override
        public Hash deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
            return new Hash(jsonElement.getAsString());
        }
    }

    /**
     * Serializer and deserializer for {@link OffsetDateTime} objects in ISO 8601 format.
     */
    private static class OffsetDateTimeBiserializer implements JsonBiserializer<OffsetDateTime> {
        private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ISO_OFFSET_DATE_TIME;

        @Override
        public JsonElement serialize(OffsetDateTime offsetDateTime, Type type, JsonSerializationContext jsonSerializationContext) {
            return new JsonPrimitive(offsetDateTime.toString());
        }

        @Override
        public OffsetDateTime deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
            return FORMATTER.parse(jsonElement.getAsString(), OffsetDateTime::from);
        }
    }
}


text:
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.DSHttpAdapter=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports = require('./lib/axios');
},{"./lib/axios":3}],2:[function(require,module,exports){
var defaults = require('./../defaults');
var utils = require('./../utils');
var buildUrl = require('./../helpers/buildUrl');
var cookies = require('./../helpers/cookies');
var parseHeaders = require('./../helpers/parseHeaders');
var transformData = require('./../helpers/transformData');
var urlIsSameOrigin = require('./../helpers/urlIsSameOrigin');

module.exports = function xhrAdapter(resolve, reject, config) {
  // Transform request data
  var data = transformData(
    config.data,
    config.headers,
    config.transformRequest
  );

  // Merge headers
  var headers = utils.merge(
    defaults.headers.common,
    defaults.headers[config.method] || {},
    config.headers || {}
  );

  // Create the request
  var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');
  request.open(config.method, buildUrl(config.url, config.params), true);

  // Listen for ready state
  request.onreadystatechange = function () {
    if (request && request.readyState === 4) {
      // Prepare the response
      var headers = parseHeaders(request.getAllResponseHeaders());
      var response = {
        data: transformData(
          request.responseText,
          headers,
          config.transformResponse
        ),
        status: request.status,
        headers: headers,
        config: config
      };

      // Resolve or reject the Promise based on the status
      (request.status >= 200 && request.status < 300
        ? resolve
        : reject)(response);

      // Clean up request
      request = null;
    }
  };

  // Add xsrf header
  var xsrfValue = urlIsSameOrigin(config.url)
    ? cookies.read(config.xsrfCookieName || defaults.xsrfCookieName)
    : undefined;
  if (xsrfValue) {
    headers[config.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue;
  }

  // Add headers to the request
  utils.forEach(headers, function (val, key) {
    // Remove Content-Type if data is undefined
    if (!data && key.toLowerCase() === 'content-type') {
      delete headers[key];
    }
    // Otherwise add header to the request
    else {
      request.setRequestHeader(key, val);
    }
  });

  // Add withCredentials to request if needed
  if (config.withCredentials) {
    request.withCredentials = true;
  }

  // Add responseType to request if needed
  if (config.responseType) {
    try {
      request.responseType = config.responseType;
    } catch (e) {
      if (request.responseType !== 'json') {
        throw e;
      }
    }
  }

  if (utils.isArrayBuffer(data)) {
    data = new DataView(data);
  }

  // Send the request
  request.send(data);
};
},{"./../defaults":4,"./../helpers/buildUrl":5,"./../helpers/cookies":6,"./../helpers/parseHeaders":7,"./../helpers/transformData":9,"./../helpers/urlIsSameOrigin":10,"./../utils":11}],3:[function(require,module,exports){
(function (process){
var Promise = require('es6-promise').Promise;
var defaults = require('./defaults');
var utils = require('./utils');

var axios = module.exports = function axios(config) {
  config = utils.merge({
    method: 'get',
    headers: {},
    transformRequest: defaults.transformRequest,
    transformResponse: defaults.transformResponse
  }, config);

  // Don't allow overriding defaults.withCredentials
  config.withCredentials = config.withCredentials || defaults.withCredentials;

  var promise = new Promise(function (resolve, reject) {
    try {
      // For browsers use XHR adapter
      if (typeof window !== 'undefined') {
        require('./adapters/xhr')(resolve, reject, config);
      }
      // For node use HTTP adapter
      else if (typeof process !== 'undefined') {
        require('./adapters/http')(resolve, reject, config);
      }
    } catch (e) {
      reject(e);
    }
  });

  function deprecatedMethod(method, instead, docs) {
    try {
      console.warn(
        'DEPRECATED method `' + method + '`.' +
        (instead ? ' Use `' + instead + '` instead.' : '') +
        ' This method will be removed in a future release.');

      if (docs) {
        console.warn('For more information about usage see ' + docs);
      }
    } catch (e) {}
  }

  // Provide alias for success
  promise.success = function success(fn) {
    deprecatedMethod('success', 'then', 'https://github.com/mzabriskie/axios/blob/master/README.md#response-api');

    promise.then(function(response) {
      fn(response.data, response.status, response.headers, response.config);
    });
    return promise;
  };

  // Provide alias for error
  promise.error = function error(fn) {
    deprecatedMethod('error', 'catch', 'https://github.com/mzabriskie/axios/blob/master/README.md#response-api');

    promise.then(null, function(response) {
      fn(response.data, response.status, response.headers, response.config);
    });
    return promise;
  };

  return promise;
};

// Expose defaults
axios.defaults = defaults;

// Expose all/spread
axios.all = function (promises) {
  return Promise.all(promises);
};
axios.spread = require('./helpers/spread');

// Provide aliases for supported request methods
createShortMethods('delete', 'get', 'head');
createShortMethodsWithData('post', 'put', 'patch');

function createShortMethods() {
  utils.forEach(arguments, function (method) {
    axios[method] = function (url, config) {
      return axios(utils.merge(config || {}, {
        method: method,
        url: url
      }));
    };
  });
}

function createShortMethodsWithData() {
  utils.forEach(arguments, function (method) {
    axios[method] = function (url, data, config) {
      return axios(utils.merge(config || {}, {
        method: method,
        url: url,
        data: data
      }));
    };
  });
}
}).call(this,require('_process'))
},{"./adapters/http":2,"./adapters/xhr":2,"./defaults":4,"./helpers/spread":8,"./utils":11,"_process":22,"es6-promise":12}],4:[function(require,module,exports){
'use strict';

var utils = require('./utils');

var JSON_START = /^\s*(\[|\{[^\{])/;
var JSON_END = /[\}\]]\s*$/;
var PROTECTION_PREFIX = /^\)\]\}',?\n/;
var DEFAULT_CONTENT_TYPE = {
  'Content-Type': 'application/x-www-form-urlencoded'
};

module.exports = {
  transformRequest: [function (data, headers) {
    if (utils.isArrayBuffer(data)) {
      return data;
    }
    if (utils.isArrayBufferView(data)) {
      return data.buffer;
    }
    if (utils.isObject(data) && !utils.isFile(data) && !utils.isBlob(data)) {
      // Set application/json if no Content-Type has been specified
      if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
        headers['Content-Type'] = 'application/json;charset=utf-8';
      }
      return JSON.stringify(data);
    }
    return data;
  }],

  transformResponse: [function (data) {
    if (typeof data === 'string') {
      data = data.replace(PROTECTION_PREFIX, '');
      if (JSON_START.test(data) && JSON_END.test(data)) {
        data = JSON.parse(data);
      }
    }
    return data;
  }],

  headers: {
    common: {
      'Accept': 'application/json, text/plain, */*'
    },
    patch: utils.merge(DEFAULT_CONTENT_TYPE),
    post: utils.merge(DEFAULT_CONTENT_TYPE),
    put: utils.merge(DEFAULT_CONTENT_TYPE)
  },

  xsrfCookieName: 'XSRF-TOKEN',
  xsrfHeaderName: 'X-XSRF-TOKEN'
};
},{"./utils":11}],5:[function(require,module,exports){
'use strict';

var utils = require('./../utils');

function encode(val) {
  return encodeURIComponent(val).
    replace(/%40/gi, '@').
    replace(/%3A/gi, ':').
    replace(/%24/g, '$').
    replace(/%2C/gi, ',').
    replace(/%20/g, '+');
}

module.exports = function buildUrl(url, params) {
  if (!params) {
    return url;
  }

  var parts = [];

  utils.forEach(params, function (val, key) {
    if (val === null || typeof val === 'undefined') {
      return;
    }
    if (!utils.isArray(val)) {
      val = [val];
    }

    utils.forEach(val, function (v) {
      if (utils.isDate(v)) {
        v = v.toISOString();
      }
      else if (utils.isObject(v)) {
        v = JSON.stringify(v);
      }
      parts.push(encode(key) + '=' + encode(v));
    });
  });

  if (parts.length > 0) {
    url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');
  }

  return url;
};
},{"./../utils":11}],6:[function(require,module,exports){
'use strict';

var utils = require('./../utils');

module.exports = {
  write: function write(name, value, expires, path, domain, secure) {
    var cookie = [];
    cookie.push(name + '=' + encodeURIComponent(value));

    if (utils.isNumber(expires)) {
      cookie.push('expires=' + new Date(expires).toGMTString());
    }

    if (utils.isString(path)) {
      cookie.push('path=' + path);
    }

    if (utils.isString(domain)) {
      cookie.push('domain=' + domain);
    }

    if (secure === true) {
      cookie.push('secure');
    }

    document.cookie = cookie.join('; ');
  },

  read: function read(name) {
    var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
    return (match ? decodeURIComponent(match[3]) : null);
  },

  remove: function remove(name) {
    this.write(name, '', Date.now() - 86400000);
  }
};
},{"./../utils":11}],7:[function(require,module,exports){
'use strict';

var utils = require('./../utils');

/**
 * Parse headers into an object
 *
 * ```
 * Date: Wed, 27 Aug 2014 08:58:49 GMT
 * Content-Type: application/json
 * Connection: keep-alive
 * Transfer-Encoding: chunked
 * ```
 *
 * @param {String} headers Headers needing to be parsed
 * @returns {Object} Headers parsed into an object
 */
module.exports = function parseHeaders(headers) {
  var parsed = {}, key, val, i;

  if (!headers) return parsed;

  utils.forEach(headers.split('\n'), function(line) {
    i = line.indexOf(':');
    key = utils.trim(line.substr(0, i)).toLowerCase();
    val = utils.trim(line.substr(i + 1));

    if (key) {
      parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
    }
  });

  return parsed;
};
},{"./../utils":11}],8:[function(require,module,exports){
/**
 * Syntactic sugar for invoking a function and expanding an array for arguments.
 *
 * Common use case would be to use `Function.prototype.apply`.
 *
 *  ```js
 *  function f(x, y, z) {}
 *  var args = [1, 2, 3];
 *  f.apply(null, args);
 *  ```
 *
 * With `spread` this example can be re-written.
 *
 *  ```js
 *  spread(function(x, y, z) {})([1, 2, 3]);
 *  ```
 *
 * @param {Function} callback
 * @returns {Function}
 */
module.exports = function spread(callback) {
  return function (arr) {
    callback.apply(null, arr);
  };
};
},{}],9:[function(require,module,exports){
'use strict';

var utils = require('./../utils');

/**
 * Transform the data for a request or a response
 *
 * @param {Object|String} data The data to be transformed
 * @param {Array} headers The headers for the request or response
 * @param {Array|Function} fns A single function or Array of functions
 * @returns {*} The resulting transformed data
 */
module.exports = function transformData(data, headers, fns) {
  utils.forEach(fns, function (fn) {
    data = fn(data, headers);
  });

  return data;
};
},{"./../utils":11}],10:[function(require,module,exports){
'use strict';

var msie = /(msie|trident)/i.test(navigator.userAgent);
var utils = require('./../utils');
var urlParsingNode = document.createElement('a');
var originUrl = urlResolve(window.location.href);

/**
 * Parse a URL to discover it's components
 *
 * @param {String} url The URL to be parsed
 * @returns {Object}
 */
function urlResolve(url) {
  var href = url;

  if (msie) {
    // IE needs attribute set twice to normalize properties
    urlParsingNode.setAttribute('href', href);
    href = urlParsingNode.href;
  }

  urlParsingNode.setAttribute('href', href);

  // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  return {
    href: urlParsingNode.href,
    protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
    host: urlParsingNode.host,
    search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
    hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
    hostname: urlParsingNode.hostname,
    port: urlParsingNode.port,
    pathname: (urlParsingNode.pathname.charAt(0) === '/')
      ? urlParsingNode.pathname
      : '/' + urlParsingNode.pathname
  };
}

/**
 * Determine if a URL shares the same origin as the current location
 *
 * @param {String} requestUrl The URL to test
 * @returns {boolean} True if URL shares the same origin, otherwise false
 */
module.exports = function urlIsSameOrigin(requestUrl) {
  var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
  return (parsed.protocol === originUrl.protocol &&
        parsed.host === originUrl.host);
};
},{"./../utils":11}],11:[function(require,module,exports){
// utils is a library of generic helper functions non-specific to axios

var toString = Object.prototype.toString;

/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Array, otherwise false
 */
function isArray(val) {
  return toString.call(val) === '[object Array]';
}

/**
 * Determine if a value is an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
 */
function isArrayBuffer(val) {
  return toString.call(val) === '[object ArrayBuffer]';
}

/**
 * Determine if a value is a view on an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
 */
function isArrayBufferView(val) {
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
    return ArrayBuffer.isView(val);
  } else {
    return (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  }
}

/**
 * Determine if a value is a String
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a String, otherwise false
 */
function isString(val) {
  return typeof val === 'string';
}

/**
 * Determine if a value is a Number
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Number, otherwise false
 */
function isNumber(val) {
  return typeof val === 'number';
}

/**
 * Determine if a value is undefined
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if the value is undefined, otherwise false
 */
function isUndefined(val) {
  return typeof val === 'undefined';
}

/**
 * Determine if a value is an Object
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Object, otherwise false
 */
function isObject(val) {
  return val !== null && typeof val === 'object';
}

/**
 * Determine if a value is a Date
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Date, otherwise false
 */
function isDate(val) {
  return toString.call(val) === '[object Date]';
}

/**
 * Determine if a value is a File
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a File, otherwise false
 */
function isFile(val) {
  return toString.call(val) === '[object File]';
}

/**
 * Determine if a value is a Blob
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Blob, otherwise false
 */
function isBlob(val) {
  return toString.call(val) === '[object Blob]';
}

/**
 * Trim excess whitespace off the beginning and end of a string
 *
 * @param {String} str The String to trim
 * @returns {String} The String freed of excess whitespace
 */
function trim(str) {
  return str.replace(/^\s*/, '').replace(/\s*$/, '');
}

/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array or arguments callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 */
function forEach(obj, fn) {
  // Don't bother if no value provided
  if (obj === null || typeof obj === 'undefined') {
    return;
  }

  // Check if obj is array-like
  var isArray = obj.constructor === Array || typeof obj.callee === 'function';

  // Force an array if not already something iterable
  if (typeof obj !== 'object' && !isArray) {
    obj = [obj];
  }

  // Iterate over array values
  if (isArray) {
    for (var i=0, l=obj.length; i<l; i++) {
      fn.call(null, obj[i], i, obj);
    }
  }
  // Iterate over object keys
  else {
    for (var key in obj) {
      if (obj.hasOwnProperty(key)) {
        fn.call(null, obj[key], key, obj);
      }
    }
  }
}

/**
 * Accepts varargs expecting each argument to be an object, then
 * immutably merges the properties of each object and returns result.
 *
 * When multiple objects contain the same key the later object in
 * the arguments list will take precedence.
 *
 * Example:
 *
 * ```js
 * var result = merge({foo: 123}, {foo: 456});
 * console.log(result.foo); // outputs 456
 * ```
 *
 * @param {Object} obj1 Object to merge
 * @returns {Object} Result of all merge properties
 */
function merge(obj1/*, obj2, obj3, ...*/) {
  var result = {};
  forEach(arguments, function (obj) {
    forEach(obj, function (val, key) {
      result[key] = val;
    });
  });
  return result;
}

module.exports = {
  isArray: isArray,
  isArrayBuffer: isArrayBuffer,
  isArrayBufferView: isArrayBufferView,
  isString: isString,
  isNumber: isNumber,
  isObject: isObject,
  isUndefined: isUndefined,
  isDate: isDate,
  isFile: isFile,
  isBlob: isBlob,
  forEach: forEach,
  merge: merge,
  trim: trim
};
},{}],12:[function(require,module,exports){
"use strict";
var Promise = require("./promise/promise").Promise;
var polyfill = require("./promise/polyfill").polyfill;
exports.Promise = Promise;
exports.polyfill = polyfill;
},{"./promise/polyfill":16,"./promise/promise":17}],13:[function(require,module,exports){
"use strict";
/* global toString */

var isArray = require("./utils").isArray;
var isFunction = require("./utils").isFunction;

/**
  Returns a promise that is fulfilled when all the given promises have been
  fulfilled, or rejected if any of them become rejected. The return promise
  is fulfilled with an array that gives all the values in the order they were
  passed in the `promises` array argument.

  Example:

  ```javascript
  var promise1 = RSVP.resolve(1);
  var promise2 = RSVP.resolve(2);
  var promise3 = RSVP.resolve(3);
  var promises = [ promise1, promise2, promise3 ];

  RSVP.all(promises).then(function(array){
    // The array here would be [ 1, 2, 3 ];
  });
  ```

  If any of the `promises` given to `RSVP.all` are rejected, the first promise
  that is rejected will be given as an argument to the returned promises's
  rejection handler. For example:

  Example:

  ```javascript
  var promise1 = RSVP.resolve(1);
  var promise2 = RSVP.reject(new Error("2"));
  var promise3 = RSVP.reject(new Error("3"));
  var promises = [ promise1, promise2, promise3 ];

  RSVP.all(promises).then(function(array){
    // Code here never runs because there are rejected promises!
  }, function(error) {
    // error.message === "2"
  });
  ```

  @method all
  @for RSVP
  @param {Array} promises
  @param {String} label
  @return {Promise} promise that is fulfilled when all `promises` have been
  fulfilled, or rejected if any of them become rejected.
*/
function all(promises) {
  /*jshint validthis:true */
  var Promise = this;

  if (!isArray(promises)) {
    throw new TypeError('You must pass an array to all.');
  }

  return new Promise(function(resolve, reject) {
    var results = [], remaining = promises.length,
    promise;

    if (remaining === 0) {
      resolve([]);
    }

    function resolver(index) {
      return function(value) {
        resolveAll(index, value);
      };
    }

    function resolveAll(index, value) {
      results[index] = value;
      if (--remaining === 0) {
        resolve(results);
      }
    }

    for (var i = 0; i < promises.length; i++) {
      promise = promises[i];

      if (promise && isFunction(promise.then)) {
        promise.then(resolver(i), reject);
      } else {
        resolveAll(i, promise);
      }
    }
  });
}

exports.all = all;
},{"./utils":21}],14:[function(require,module,exports){
(function (process,global){
"use strict";
var browserGlobal = (typeof window !== 'undefined') ? window : {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
var local = (typeof global !== 'undefined') ? global : (this === undefined? window:this);

// node
function useNextTick() {
  return function() {
    process.nextTick(flush);
  };
}

function useMutationObserver() {
  var iterations = 0;
  var observer = new BrowserMutationObserver(flush);
  var node = document.createTextNode('');
  observer.observe(node, { characterData: true });

  return function() {
    node.data = (iterations = ++iterations % 2);
  };
}

function useSetTimeout() {
  return function() {
    local.setTimeout(flush, 1);
  };
}

var queue = [];
function flush() {
  for (var i = 0; i < queue.length; i++) {
    var tuple = queue[i];
    var callback = tuple[0], arg = tuple[1];
    callback(arg);
  }
  queue = [];
}

var scheduleFlush;

// Decide what async method to use to triggering processing of queued callbacks:
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
  scheduleFlush = useNextTick();
} else if (BrowserMutationObserver) {
  scheduleFlush = useMutationObserver();
} else {
  scheduleFlush = useSetTimeout();
}

function asap(callback, arg) {
  var length = queue.push([callback, arg]);
  if (length === 1) {
    // If length is 1, that means that we need to schedule an async flush.
    // If additional callbacks are queued before the queue is flushed, they
    // will be processed by this flush that we are scheduling.
    scheduleFlush();
  }
}

exports.asap = asap;
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"_process":22}],15:[function(require,module,exports){
"use strict";
var config = {
  instrument: false
};

function configure(name, value) {
  if (arguments.length === 2) {
    config[name] = value;
  } else {
    return config[name];
  }
}

exports.config = config;
exports.configure = configure;
},{}],16:[function(require,module,exports){
(function (global){
"use strict";
/*global self*/
var RSVPPromise = require("./promise").Promise;
var isFunction = require("./utils").isFunction;

function polyfill() {
  var local;

  if (typeof global !== 'undefined') {
    local = global;
  } else if (typeof window !== 'undefined' && window.document) {
    local = window;
  } else {
    local = self;
  }

  var es6PromiseSupport =
    "Promise" in local &&
    // Some of these methods are missing from
    // Firefox/Chrome experimental implementations
    "resolve" in local.Promise &&
    "reject" in local.Promise &&
    "all" in local.Promise &&
    "race" in local.Promise &&
    // Older version of the spec had a resolver object
    // as the arg rather than a function
    (function() {
      var resolve;
      new local.Promise(function(r) { resolve = r; });
      return isFunction(resolve);
    }());

  if (!es6PromiseSupport) {
    local.Promise = RSVPPromise;
  }
}

exports.polyfill = polyfill;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./promise":17,"./utils":21}],17:[function(require,module,exports){
"use strict";
var config = require("./config").config;
var configure = require("./config").configure;
var objectOrFunction = require("./utils").objectOrFunction;
var isFunction = require("./utils").isFunction;
var now = require("./utils").now;
var all = require("./all").all;
var race = require("./race").race;
var staticResolve = require("./resolve").resolve;
var staticReject = require("./reject").reject;
var asap = require("./asap").asap;

var counter = 0;

config.async = asap; // default async is asap;

function Promise(resolver) {
  if (!isFunction(resolver)) {
    throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
  }

  if (!(this instanceof Promise)) {
    throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
  }

  this._subscribers = [];

  invokeResolver(resolver, this);
}

function invokeResolver(resolver, promise) {
  function resolvePromise(value) {
    resolve(promise, value);
  }

  function rejectPromise(reason) {
    reject(promise, reason);
  }

  try {
    resolver(resolvePromise, rejectPromise);
  } catch(e) {
    rejectPromise(e);
  }
}

function invokeCallback(settled, promise, callback, detail) {
  var hasCallback = isFunction(callback),
      value, error, succeeded, failed;

  if (hasCallback) {
    try {
      value = callback(detail);
      succeeded = true;
    } catch(e) {
      failed = true;
      error = e;
    }
  } else {
    value = detail;
    succeeded = true;
  }

  if (handleThenable(promise, value)) {
    return;
  } else if (hasCallback && succeeded) {
    resolve(promise, value);
  } else if (failed) {
    reject(promise, error);
  } else if (settled === FULFILLED) {
    resolve(promise, value);
  } else if (settled === REJECTED) {
    reject(promise, value);
  }
}

var PENDING   = void 0;
var SEALED    = 0;
var FULFILLED = 1;
var REJECTED  = 2;

function subscribe(parent, child, onFulfillment, onRejection) {
  var subscribers = parent._subscribers;
  var length = subscribers.length;

  subscribers[length] = child;
  subscribers[length + FULFILLED] = onFulfillment;
  subscribers[length + REJECTED]  = onRejection;
}

function publish(promise, settled) {
  var child, callback, subscribers = promise._subscribers, detail = promise._detail;

  for (var i = 0; i < subscribers.length; i += 3) {
    child = subscribers[i];
    callback = subscribers[i + settled];

    invokeCallback(settled, child, callback, detail);
  }

  promise._subscribers = null;
}

Promise.prototype = {
  constructor: Promise,

  _state: undefined,
  _detail: undefined,
  _subscribers: undefined,

  then: function(onFulfillment, onRejection) {
    var promise = this;

    var thenPromise = new this.constructor(function() {});

    if (this._state) {
      var callbacks = arguments;
      config.async(function invokePromiseCallback() {
        invokeCallback(promise._state, thenPromise, callbacks[promise._state - 1], promise._detail);
      });
    } else {
      subscribe(this, thenPromise, onFulfillment, onRejection);
    }

    return thenPromise;
  },

  'catch': function(onRejection) {
    return this.then(null, onRejection);
  }
};

Promise.all = all;
Promise.race = race;
Promise.resolve = staticResolve;
Promise.reject = staticReject;

function handleThenable(promise, value) {
  var then = null,
  resolved;

  try {
    if (promise === value) {
      throw new TypeError("A promises callback cannot return that same promise.");
    }

    if (objectOrFunction(value)) {
      then = value.then;

      if (isFunction(then)) {
        then.call(value, function(val) {
          if (resolved) { return true; }
          resolved = true;

          if (value !== val) {
            resolve(promise, val);
          } else {
            fulfill(promise, val);
          }
        }, function(val) {
          if (resolved) { return true; }
          resolved = true;

          reject(promise, val);
        });

        return true;
      }
    }
  } catch (error) {
    if (resolved) { return true; }
    reject(promise, error);
    return true;
  }

  return false;
}

function resolve(promise, value) {
  if (promise === value) {
    fulfill(promise, value);
  } else if (!handleThenable(promise, value)) {
    fulfill(promise, value);
  }
}

function fulfill(promise, value) {
  if (promise._state !== PENDING) { return; }
  promise._state = SEALED;
  promise._detail = value;

  config.async(publishFulfillment, promise);
}

function reject(promise, reason) {
  if (promise._state !== PENDING) { return; }
  promise._state = SEALED;
  promise._detail = reason;

  config.async(publishRejection, promise);
}

function publishFulfillment(promise) {
  publish(promise, promise._state = FULFILLED);
}

function publishRejection(promise) {
  publish(promise, promise._state = REJECTED);
}

exports.Promise = Promise;
},{"./all":13,"./asap":14,"./config":15,"./race":18,"./reject":19,"./resolve":20,"./utils":21}],18:[function(require,module,exports){
"use strict";
/* global toString */
var isArray = require("./utils").isArray;

/**
  `RSVP.race` allows you to watch a series of promises and act as soon as the
  first promise given to the `promises` argument fulfills or rejects.

  Example:

  ```javascript
  var promise1 = new RSVP.Promise(function(resolve, reject){
    setTimeout(function(){
      resolve("promise 1");
    }, 200);
  });

  var promise2 = new RSVP.Promise(function(resolve, reject){
    setTimeout(function(){
      resolve("promise 2");
    }, 100);
  });

  RSVP.race([promise1, promise2]).then(function(result){
    // result === "promise 2" because it was resolved before promise1
    // was resolved.
  });
  ```

  `RSVP.race` is deterministic in that only the state of the first completed
  promise matters. For example, even if other promises given to the `promises`
  array argument are resolved, but the first completed promise has become
  rejected before the other promises became fulfilled, the returned promise
  will become rejected:

  ```javascript
  var promise1 = new RSVP.Promise(function(resolve, reject){
    setTimeout(function(){
      resolve("promise 1");
    }, 200);
  });

  var promise2 = new RSVP.Promise(function(resolve, reject){
    setTimeout(function(){
      reject(new Error("promise 2"));
    }, 100);
  });

  RSVP.race([promise1, promise2]).then(function(result){
    // Code here never runs because there are rejected promises!
  }, function(reason){
    // reason.message === "promise2" because promise 2 became rejected before
    // promise 1 became fulfilled
  });
  ```

  @method race
  @for RSVP
  @param {Array} promises array of promises to observe
  @param {String} label optional string for describing the promise returned.
  Useful for tooling.
  @return {Promise} a promise that becomes fulfilled with the value the first
  completed promises is resolved with if the first completed promise was
  fulfilled, or rejected with the reason that the first completed promise
  was rejected with.
*/
function race(promises) {
  /*jshint validthis:true */
  var Promise = this;

  if (!isArray(promises)) {
    throw new TypeError('You must pass an array to race.');
  }
  return new Promise(function(resolve, reject) {
    var results = [], promise;

    for (var i = 0; i < promises.length; i++) {
      promise = promises[i];

      if (promise && typeof promise.then === 'function') {
        promise.then(resolve, reject);
      } else {
        resolve(promise);
      }
    }
  });
}

exports.race = race;
},{"./utils":21}],19:[function(require,module,exports){
"use strict";
/**
  `RSVP.reject` returns a promise that will become rejected with the passed
  `reason`. `RSVP.reject` is essentially shorthand for the following:

  ```javascript
  var promise = new RSVP.Promise(function(resolve, reject){
    reject(new Error('WHOOPS'));
  });

  promise.then(function(value){
    // Code here doesn't run because the promise is rejected!
  }, function(reason){
    // reason.message === 'WHOOPS'
  });
  ```

  Instead of writing the above, your code now simply becomes the following:

  ```javascript
  var promise = RSVP.reject(new Error('WHOOPS'));

  promise.then(function(value){
    // Code here doesn't run because the promise is rejected!
  }, function(reason){
    // reason.message === 'WHOOPS'
  });
  ```

  @method reject
  @for RSVP
  @param {Any} reason value that the returned promise will be rejected with.
  @param {String} label optional string for identifying the returned promise.
  Useful for tooling.
  @return {Promise} a promise that will become rejected with the given
  `reason`.
*/
function reject(reason) {
  /*jshint validthis:true */
  var Promise = this;

  return new Promise(function (resolve, reject) {
    reject(reason);
  });
}

exports.reject = reject;
},{}],20:[function(require,module,exports){
"use strict";
function resolve(value) {
  /*jshint validthis:true */
  if (value && typeof value === 'object' && value.constructor === this) {
    return value;
  }

  var Promise = this;

  return new Promise(function(resolve) {
    resolve(value);
  });
}

exports.resolve = resolve;
},{}],21:[function(require,module,exports){
"use strict";
function objectOrFunction(x) {
  return isFunction(x) || (typeof x === "object" && x !== null);
}

function isFunction(x) {
  return typeof x === "function";
}

function isArray(x) {
  return Object.prototype.toString.call(x) === "[object Array]";
}

// Date.now is not available in browsers < IE9
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility
var now = Date.now || function() { return new Date().getTime(); };

exports.objectOrFunction = objectOrFunction;
exports.isFunction = isFunction;
exports.isArray = isArray;
exports.now = now;
},{}],22:[function(require,module,exports){
// shim for using process in browser

var process = module.exports = {};

process.nextTick = (function () {
    var canSetImmediate = typeof window !== 'undefined'
    && window.setImmediate;
    var canMutationObserver = typeof window !== 'undefined'
    && window.MutationObserver;
    var canPost = typeof window !== 'undefined'
    && window.postMessage && window.addEventListener
    ;

    if (canSetImmediate) {
        return function (f) { return window.setImmediate(f) };
    }

    var queue = [];

    if (canMutationObserver) {
        var hiddenDiv = document.createElement("div");
        var observer = new MutationObserver(function () {
            var queueList = queue.slice();
            queue.length = 0;
            queueList.forEach(function (fn) {
                fn();
            });
        });

        observer.observe(hiddenDiv, { attributes: true });

        return function nextTick(fn) {
            if (!queue.length) {
                hiddenDiv.setAttribute('yes', 'no');
            }
            queue.push(fn);
        };
    }

    if (canPost) {
        window.addEventListener('message', function (ev) {
            var source = ev.source;
            if ((source === window || source === null) && ev.data === 'process-tick') {
                ev.stopPropagation();
                if (queue.length > 0) {
                    var fn = queue.shift();
                    fn();
                }
            }
        }, true);

        return function nextTick(fn) {
            queue.push(fn);
            window.postMessage('process-tick', '*');
        };
    }

    return function nextTick(fn) {
        setTimeout(fn, 0);
    };
})();

process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];

function noop() {}

process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;

process.binding = function (name) {
    throw new Error('process.binding is not supported');
};

// TODO(shtylman)
process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};

},{}],23:[function(require,module,exports){
var JSData;

try {
  JSData = require('js-data');
} catch (e) {
}

if (!JSData) {
  try {
    JSData = window.JSData;
  } catch (e) {
  }
}

if (!JSData) {
  throw new Error('js-data must be loaded!');
}

var makePath = JSData.DSUtils.makePath;
var deepMixIn = JSData.DSUtils.deepMixIn;
var http = require('axios');

function Defaults() {

}

var defaultsPrototype = Defaults.prototype;

defaultsPrototype.queryTransform = function (resourceName, params) {
  return params;
};

defaultsPrototype.basePath = '';

defaultsPrototype.forceTrailingSlash = '';

defaultsPrototype.httpConfig = {};

defaultsPrototype.log = console ? function (a, b, c, d, e) {
  console.log(a, b, c, d, e);
} : function () {
};

defaultsPrototype.deserialize = function (resourceName, data) {
  return data ? ('data' in data ? data.data : data) : data;
};

defaultsPrototype.serialize = function (resourceName, data) {
  return data;
};

function DSHttpAdapter(options) {
  this.defaults = new Defaults();
  deepMixIn(this.defaults, options);
}

var dsHttpAdapterPrototype = DSHttpAdapter.prototype;

dsHttpAdapterPrototype.getIdPath = function (resourceConfig, options, id) {
  return makePath(options.basePath || this.defaults.basePath || resourceConfig.basePath, resourceConfig.getEndpoint(id, options), id);
};

dsHttpAdapterPrototype.getAllPath = function (resourceConfig, options) {
  return makePath(options.basePath || this.defaults.basePath || resourceConfig.basePath, resourceConfig.getEndpoint(null, options));
};

dsHttpAdapterPrototype.HTTP = function (config) {
  var _this = this;
  var start = new Date().getTime();
  config = deepMixIn(config, _this.defaults.httpConfig);
  if (_this.defaults.forceTrailingSlash && config.url[config.url.length] !== '/') {
    config.url += '/';
  }
  return http(config).then(function (data) {
    if (_this.defaults.log) {
      _this.defaults.log(data.config.method.toUpperCase() + ' request: ' + data.config.url + ' Time taken: ' + (new Date().getTime() - start) + 'ms', data);
    }
    return data;
  });
};

dsHttpAdapterPrototype.GET = function (url, config) {
  config = config || {};
  if (!('method' in config)) {
    config.method = 'get';
  }
  return this.HTTP(deepMixIn(config, {
    url: url
  }));
};

dsHttpAdapterPrototype.POST = function (url, attrs, config) {
  config = config || {};
  if (!('method' in config)) {
    config.method = 'post';
  }
  return this.HTTP(deepMixIn(config, {
    url: url,
    data: attrs
  }));
};

dsHttpAdapterPrototype.PUT = function (url, attrs, config) {
  config = config || {};
  if (!('method' in config)) {
    config.method = 'put';
  }
  return this.HTTP(deepMixIn(config, {
    url: url,
    data: attrs || {}
  }));
};

dsHttpAdapterPrototype.DEL = function (url, config) {
  config = config || {};
  if (!('method' in config)) {
    config.method = 'delete';
  }
  return this.HTTP(deepMixIn(config, {
    url: url
  }));
};

dsHttpAdapterPrototype.find = function (resourceConfig, id, options) {
  var _this = this;
  options = options || {};
  return _this.GET(
    _this.getIdPath(resourceConfig, options, id),
    options
  ).then(function (data) {
      return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig.name, data);
    });
};

dsHttpAdapterPrototype.findAll = function (resourceConfig, params, options) {
  var _this = this;
  options = options || {};
  options.params = options.params || {};
  if (params) {
    params = _this.defaults.queryTransform(resourceConfig.name, params);
    deepMixIn(options.params, params);
  }
  return _this.GET(
    _this.getAllPath(resourceConfig, options),
    options
  ).then(function (data) {
      return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig.name, data);
    });
};

dsHttpAdapterPrototype.create = function (resourceConfig, attrs, options) {
  var _this = this;
  options = options || {};
  return _this.POST(
    makePath(options.basePath || this.defaults.basePath || resourceConfig.basePath, resourceConfig.getEndpoint(attrs, options)),
    options.serialize ? options.serialize(resourceConfig.name, attrs) : _this.defaults.serialize(resourceConfig.name, attrs),
    options
  ).then(function (data) {
      return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig.name, data);
    });
};

dsHttpAdapterPrototype.update = function (resourceConfig, id, attrs, options) {
  var _this = this;
  options = options || {};
  return _this.PUT(
    _this.getIdPath(resourceConfig, options, id),
    options.serialize ? options.serialize(resourceConfig.name, attrs) : _this.defaults.serialize(resourceConfig.name, attrs),
    options
  ).then(function (data) {
      return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig.name, data);
    });
};

dsHttpAdapterPrototype.updateAll = function (resourceConfig, attrs, params, options) {
  var _this = this;
  options = options || {};
  options.params = options.params || {};
  if (params) {
    params = _this.defaults.queryTransform(resourceConfig.name, params);
    deepMixIn(options.params, params);
  }
  return this.PUT(
    _this.getAllPath(resourceConfig, options),
    options.serialize ? options.serialize(resourceConfig.name, attrs) : _this.defaults.serialize(resourceConfig.name, attrs),
    options
  ).then(function (data) {
      return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig.name, data);
    });
};

dsHttpAdapterPrototype.destroy = function (resourceConfig, id, options) {
  var _this = this;
  options = options || {};
  return _this.DEL(
    _this.getIdPath(resourceConfig, options, id),
    options
  ).then(function (data) {
      return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig.name, data);
    });
};

dsHttpAdapterPrototype.destroyAll = function (resourceConfig, params, options) {
  var _this = this;
  options = options || {};
  options.params = options.params || {};
  if (params) {
    params = _this.defaults.queryTransform(resourceConfig.name, params);
    deepMixIn(options.params, params);
  }
  return this.DEL(
    _this.getAllPath(resourceConfig, options),
    options
  ).then(function (data) {
      return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig.name, data);
    });
};

module.exports = DSHttpAdapter;

},{"axios":1,"js-data":"js-data"}]},{},[23])(23)
});


text:
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Gimela.Toolkit.CommandLines.Select")]
[assembly: Guid("5017bef3-7d47-438a-9f4b-9272fa0f6a38")]


text:
package net.meisen.dissertation.impl.parser.query.get;

import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;

import net.meisen.dissertation.model.auth.IAuthManager;
import net.meisen.dissertation.model.auth.permissions.DefinedPermission;
import net.meisen.dissertation.model.data.FieldNameGenerator;
import net.meisen.dissertation.model.parser.query.IQueryResultSet;
import net.meisen.general.genmisc.types.Strings;

/**
 * Gets a query asking for a {@link GetResultType#ROLES}.
 *
 * @author pmeisen
 *
 */
public class GetResultRoles implements IQueryResultSet {
	private final IAuthManager authManager;

	/**
	 * Constructor specifying the {@code authManager} used.
	 *
	 * @param authManager
	 *            the used {@code AuthManager}
	 *
	 * @see IAuthManager
	 */
	public GetResultRoles(final IAuthManager authManager) {
		this.authManager = authManager;
	}

	@Override
	public int[] getCollectedIds() {
		return null;
	}

	@Override
	public Iterator<Object[]> iterator() {
		final Set<String> roles = authManager.getRoles();
		final Set<String> sortedRoles;
		if (roles == null) {
			sortedRoles = Collections.<String> emptySet();
		} else {
			sortedRoles = new TreeSet<String>();
			sortedRoles.addAll(roles);
		}

		return new Iterator<Object[]>() {
			private Iterator<String> it = sortedRoles.iterator();

			@Override
			public boolean hasNext() {
				return it.hasNext();
			}

			@Override
			public Object[] next() {
				final String role = it.next();
				final Set<DefinedPermission> perms = new TreeSet<DefinedPermission>(
						authManager.getRolePermissions(role));

				return new Object[] { role, Strings.join(",", perms) };
			}

			@Override
			public void remove() {
				throw new UnsupportedOperationException(
						"Remove is not supported.");
			}
		};
	}

	@Override
	public Class<?>[] getTypes() {
		return new Class<?>[] { String.class, String.class };
	}

	@Override
	public String[] getNames() {
		final FieldNameGenerator fng = FieldNameGenerator.get();
		return new String[] { fng.getRolesFieldName(),
				fng.getPermissionsFieldName() };
	}

}


text:
/* Visualization implementation */

#include "sles_allinclusive.h"

static SLresult IVisualization_RegisterVisualizationCallback(SLVisualizationItf self,
    slVisualizationCallback callback, void *pContext, SLmilliHertz rate)
{
    SL_ENTER_INTERFACE

    if (!(0 < rate && rate <= 20000)) {
        result = SL_RESULT_PARAMETER_INVALID;
    } else {
        IVisualization *this = (IVisualization *) self;
        interface_lock_exclusive(this);
        this->mCallback = callback;
        this->mContext = pContext;
        this->mRate = rate;
        interface_unlock_exclusive(this);
        result = SL_RESULT_SUCCESS;
    }

    SL_LEAVE_INTERFACE
}

static SLresult IVisualization_GetMaxRate(SLVisualizationItf self, SLmilliHertz *pRate)
{
    SL_ENTER_INTERFACE

    if (NULL == pRate) {
        result = SL_RESULT_PARAMETER_INVALID;
    } else {
        *pRate = 20000;
        result = SL_RESULT_SUCCESS;
    }

    SL_LEAVE_INTERFACE
}

static const struct SLVisualizationItf_ IVisualization_Itf = {
    IVisualization_RegisterVisualizationCallback,
    IVisualization_GetMaxRate
};

void IVisualization_init(void *self)
{
    IVisualization *this = (IVisualization *) self;
    this->mItf = &IVisualization_Itf;
    this->mCallback = NULL;
    this->mContext = NULL;
    this->mRate = 20000;
}


text:
layout: default
---

{{site.title}} - A Tutorial Series

Warning: This website is UNDER CONSTRUCTION!!!

    C++ Party is a tutorial series that doesn't waste your time on topics you
    can quickly find elsewhere. Instead it's focused on the areas of C++
    development that don't have any consolidated, easy to follow walkthroughs.
    Learn the hard stuff so you can have fun and party with C++!

    Who is C++ Party For?

    I intentionally wrote these tutorials in the most approachable way possible.
    However, the ideal target audience is someone who was like me at the time
    of writing. That is, you should be familiar with other C or C(ish)-based
    programming languages like Java, C#, JavaScript, Python, etc. You will not
    see any text wasted on the 10,000th explaination of what a function is here.
    I will only stop to point out and explain the things that (at least to me)
    are non-obvious or common gotchas. If you have a general grasp of
    programming basics then forage on!

    Disclaimer: I consider myself a beginner when it comes to C++ and
    it's ecosystem. I am by no means an expert. Keep in mind that I wrote these
    tutorials as I learned whatever they where about. There may be better ways
    to do what I'm showing you and it's possible I'm not showing you how to do
    everything the 'right' way. However, I'm always open to learning and
    improving, so if you spot a mistake please create a new issue or pull
    request on the
    GitHub page for this
     site. I will also update or rewrite content as I continue to learn more.

Multi-Part Tutorials

Building C++

    Have you ever been frustrated when trying to understand the C++ build
    system? If you're anything like me you've tried and failed to start several
    projects, maybe swearing off C++ itself, just because you couldn't figure
    out how the heck to add all of those depenecies to your project. I'll take
    you from manually building the classic 'Hello World' program with a text
    editor and the command line to an advanced multi-dependency project using
    the fancy new meson build system with the Qt Creator IDE.

Intro To Building from the Command Line

Building Multiple Files from the Command Line

...

Intro to Meson from the Command Line

Version Control for the Lone Programmer

    Are you commiting the sin of not using version control because you don't
    know what it is or how to use it? Maybe you've tried to use it before but
    got confused. Maybe you think it's only for big teams. Well I'm here to tell
    you why you need it and how drop-deap simple it is to setup and use.

Git from the Command Line

Tea

Juice

Indpendent Tutorials

Qt Designer and Meson

    - Qt Designer currently does not support the Meson build system out of the box.
    Learn how to fix that! (Part of the Building C++ series.)

How to Structure Your Project

    - Learn what all of the folders in a standard C++ project are for, and best practices for
    your own project structure.

Using #include

    - Condensed information on how to use multiple source files in your project, and
    the difference between common project #include structures.

C++ The Good Parts (AKA Modern C++)

    - Quickly get up to speed on how C++ ought to be written! I'll show you the
    C++11/14/17 best practices, and the most useful new features without all of
    the arcane stuff you'll never use.

Unit Testing

Generating Documentation


text:
define([
   	'jquery',
	'block/block',
	'block/blockmanager',
	'blockdemo/vendor/underscore'
], function(jQuery, block, BlockManager, vcardTemplate) {

	var CompanyBlock = block.AbstractBlock.extend({
		title: 'Company',

		getSchema: function() {
			return {
				symbol: {
					type: 'string',
					label: 'Stock Quote Name'
				}
			};
		},
		init: function($element, postProcessFn) {
			var that = this;
			$element.mouseover(function() {
				$element.append('');
			});
			$element.mouseout(function() {
				$element.find('.stock-quote-overlay').remove();
			});
			postProcessFn();
		},
		update: function($element, postProcessFn) {
			// Mapping Stock-Symbol -- Company Name (Fake!)
			switch (this.attr('symbol')) {
				case 'MSFT':
					$element.html('Microsoft');
					break;
				case 'AAPL':
					$element.html('Apple Inc.');
					break;
				default:
					$element.html(this.attr('symbol'));
			}

			postProcessFn();
		}
	});

	var EditableProductTeaserBlock = block.AbstractBlock.extend({
		title: 'product teaser',

		getSchema: function() {
			return {
				'price': {
					type: 'number',
					label: 'Price'
				}
			}
		},

		update: function($element, postProcessFn) {
			$element.html('' + this.attr('title') + ' (' + this.attr('price') + ')');
			postProcessFn();
		}
	});

	var ProductTeaserBlock = block.AbstractBlock.extend({
		title: 'product teaser',

		getSchema: function() {
			return {
				'title': {
					type: 'string',
					label: 'Product Title'
				},
				'price': {
					type: 'number',
					label: 'Price'
				}
			}
		},

		update: function($element, postProcessFn) {
			$element.html(this.attr('title') + ' (' + this.attr('price') + ' €)');
			postProcessFn();
		}
	});

	var ImageBlock = block.AbstractBlock.extend({
		title: 'Image',
		getSchema: function() {
			return {
				'image': {
					type: 'string',
					label: 'Image URI'
				},
				'position': {
					type: 'select',
					label: 'Position',
					values: [{
						key: '',
						label: 'No Float'
					}, {
						key: 'left',
						label: 'Float left'
					}, {
						key: 'right',
						label: 'Float right'
					}]
				}
			}
		},
		init: function($element, postProcessFn) {
			this.attr('image', $element.find('img').attr('src'));
			postProcessFn();
		},
		update: function($element, postProcessFn) {
			if (this.attr('position') === 'right') {
				$element.css('float', 'right');
			} else if (this.attr('position') === 'left') {
				$element.css('float', 'left');
			} else {
				$element.css('float', '');
			}

			$element.find('img').attr('src', this.attr('image'));
			postProcessFn();
		}
	});

	var EditableImageBlock = ImageBlock.extend({

	});

	var NewsBlock = block.AbstractBlock.extend({
		title: 'News',
		getSchema: function() {
			var that = this;
			return {
				'news': {
					type: 'button',
					buttonLabel: 'Change news',
					callback: function() {
						var numberOfNewsArticles = Math.floor((Math.random()*6)+1);
						alert('Will render ' + numberOfNewsArticles + ' news articles. (This is a placeholder for selecting news articles)');
						that.attr('numberofarticles', numberOfNewsArticles);
					}
				}
			}
		},
		update: function($element, postProcessFn) {
			var numberOfArticlesToBeCreated = this.attr('numberofarticles') - $element.find('.newselement').length;
			if (numberOfArticlesToBeCreated > 0) {
				// Insert specified number of articles
				for (var i=0; i<numberOfArticlesToBeCreated; i++) {
					$element.find('.newselement').first().clone().appendTo($element);
				}
			} else if (numberOfArticlesToBeCreated < 0) {
				// Delete articles
				$element.find('.newselement').slice(numberOfArticlesToBeCreated).remove();
			}
			postProcessFn();
		}
	});

	var SortableNewsBlock = NewsBlock.extend({
		title: 'Sortable News',
		init: function($element, postProcessFn) {
			var that = this;
			$element.sortable({
				stop: function() {
					that._fixScrollPositionBugsInIE();
				},
				cancel: '.aloha-block-handle'
			});

			postProcessFn();
		}
	});

	var ColumnBlock = block.AbstractBlock.extend({
		title: 'Columns',

		getSchema: function() {
			return {
				'columns': {
					type: 'number',
					label: 'Number of Columns',
					range: {
						min: 1,
						max: 4,
						step: 1
					}
				}
			}
		},
		init: function($element, postProcessFn) {
			this.calculateColumnWidths($element);
			postProcessFn();
		},
		update: function($element, postProcessFn) {
			this.updateDataAttributesFromColumnContents($element);

			var numberOfColumns = parseInt(this.attr('columns'));
			var columnDifference = numberOfColumns - $element.children('.column').length;
			if (columnDifference < 0) {
				// we need to remove the last N columns
				$element.children('.column').slice(columnDifference).remove();
			} else {
				// add new columns
				for (var i=0; i<columnDifference; i++) {
					var $column = this.getNewColumn();

					if (this.attr('column-contents-' + (numberOfColumns - columnDifference + i))) {
						$column.html(this.attr('column-contents-' + (numberOfColumns - columnDifference + i)));
					} else {
						$column.html('Some content');
					}

					$element.append($column);
					this.postProcessColumn($column);
				}
			}

			this.calculateColumnWidths($element);
			this.$element.children('.clear').remove();
			this.$element.append(jQuery('
'));
			postProcessFn();
		},
		getNewColumn: function() {
			return jQuery('
');
		},
		postProcessColumn: function($column) {
		},
		updateDataAttributesFromColumnContents: function($element) {
			var that = this;
			$element.children('.column').each(function(i, el) {
				that.attr('column-contents-' + i, jQuery(el).html());
			});
		},
		calculateColumnWidths: function($element) {
			var numberOfColumns = $element.children('.column').length;
			$element.children('.column').css('width', Math.floor(100 / numberOfColumns) + '%');
		}
	});

	var UneditableColumnBlock = ColumnBlock.extend({
		init: function($element, postProcessFn) {
			var that = this;
			this.calculateColumnWidths($element);
			$element.children('.column').each(function() {
				that.postProcessColumn(jQuery(this));
			})
			postProcessFn();
		},
		getNewColumn: function() {
			return jQuery('
');
		},
		postProcessColumn: function($column) {
			var $button = $column.children('button.addNewBlock');
			if ($button.length === 0) {
				$button = jQuery('<button class="addNewBlock">Add new block</button>');
				$column.append($button);
			}
			$button.click(function() {
				var $newBlock = jQuery('
Test
');
				$newBlock.insertBefore($button);
				$newBlock.alohaBlock({

				});
			});
		}
	});

	return {
		CompanyBlock: CompanyBlock,
		EditableProductTeaserBlock: EditableProductTeaserBlock,
		ProductTeaserBlock: ProductTeaserBlock,
		ImageBlock: ImageBlock,
		EditableImageBlock: EditableImageBlock,
		NewsBlock: NewsBlock,
		SortableNewsBlock: SortableNewsBlock,
		ColumnBlock: ColumnBlock,
		UneditableColumnBlock: UneditableColumnBlock
	};
});


text:
<?php
/*
google_calendar.php
Monday July 14, 2014 7:47pm Stefan S.

Google Calendar integration utilities for BBBS Events app

NOTES:

returns a JSON object as follows:
{
	"success":boolean,
	"results":[] Array of bbbs_event objects
}

*/

/* ---------- includes */

require_once "universal/universal.php";

require_once "arcgis_geocode.php";
require_once "event_source.php";
require_once "bbbs_event.php";
require_once "perform_http_get.php";
require_once "secrets.php";

/* ---------- classes */

// Google Calendar
class c_google_calendar extends c_event_source
{
	/* ---------- constants */

	// URI for Google Calendar API
	const k_google_calendar_uri= "https://www.googleapis.com/calendar/v3/calendars/";
	// Google Developer API key for Google Calendar API access
	const k_google_calendar_api_key= GOOGLE_CALENDAR_API_KEY;

	const k_google_calendar_query_time_start= "timeMin";
	const k_google_calendar_query_time_end= "timeMax";

	const k_key_location= "location"; // string
	const k_key_start_time= "start"; // string
		const k_key_start_date_time= "dateTime"; // DateTime
	const k_key_end_time= "end"; // string
		const k_key_end_date_time= "dateTime"; // string
	const k_key_organizer= "creator"; // string
		const k_key_organizer_name= "displayName"; // string
		const k_key_organizer_email= "email"; // string
	const k_key_time_zone= "timeZone";
	const k_key_description= "description"; // string
	const k_key_title= "summary"; // string
	const k_key_url= "htmlLink"; // string

	/* ---------- members */

	private $m_calendar_id= "";

	/* ---------- public methods */

	// constructor
	function __construct($calendar_id)
	{
		$this->m_calendar_id= $calendar_id;

		return;
	}

	/* ---------- c_event_source methods */

	// get_events()
	// $start_date_time: optional input start date / time, or NULL
	// $end_date_time: optional inout end date / time, or NULL
	// returns: array of bbbs_event objects, or NULL
	public function get_events($start_date_time, $end_date_time)
	{
		$bbbs_events_array= NULL;

		$google_events_list_json= $this->try_and_get_events_list_json($this->m_calendar_id, $start_date_time, $end_date_time);

		if (!is_null($google_events_list_json))
		{
			$google_events_array= $this->parse_google_calendar_events_list_json($google_events_list_json);

			if (!is_null($google_events_array))
			{
				$bbbs_events_array= $this->google_calendar_events_to_bbbs_events($google_events_array);
				if (!is_null($bbbs_events_array))
				{
					$google_events_count= count($google_events_array);
					$bbbs_events_count= count($bbbs_events_array);
				}
				else
				{
					debug::warning("failed to convert Google calendar events to BBBS events");
				}
			}
			else
			{
				debug::warning("failed to parse Google events list JSON: " . $google_events_list_json);
			}
		}

		return $bbbs_events_array;
	}

	/* ---------- private methods */

	// returns calendar events query results in JSON format (or NULL on failure)
	// for the input Google Calendar ID
	// ref: https://developers.google.com/google-apps/calendar/v3/reference/events/list
	private function try_and_get_events_list_json($calendar_id, $start_time, $end_time)
	{
		$body_result= NULL;
		$date_time_zone= new DateTimeZone("UTC");
		$start_date_time= isset($start_time) ? new DateTime($start_time, $date_time_zone) : new DateTime("now", $date_time_zone);
		$end_date_time= isset($end_time) ? DateTime($end_time, $date_time_zone) : new DateTime($start_time . " +1 day", $date_time_zone);
		$query_kvp= array(
			"key" => self::k_google_calendar_api_key,
			self::k_google_calendar_query_time_start => $start_date_time->format(DateTime::RFC3339),
			self::k_google_calendar_query_time_end => $end_date_time->format(DateTime::RFC3339)
		);
		$url= (self::k_google_calendar_uri . urlencode($calendar_id) . "/events");
		$json_result= perform_http_get_json($url, $query_kvp, TRUE);
		if (!is_null($json_result))
		{
			$body_result= $json_result;
		}
		else
		{
			debug::warning("failed to retrieve Google Calendar events JSON via HTTP for calendar [" . $calendar_id . "]");
		}

		return $body_result;
	}

	// parse a Google calendar events list JSON blob into a php associative array
	// returns an associative array representation of the Google events list, or an empty array on failure
	private function parse_google_calendar_events_list_json($google_events_list_json)
	{
		$result= array();
		$json_object= json_decode($google_events_list_json, TRUE);
		//debug::log("PARSING: " . $google_events_list_json);
		if (!is_null($json_object))
		{
			//debug::log("PARSED: " . print_r($json_object, TRUE));
			// Google calendar events list is the "items"[] array
			$result= $json_object["items"];
		}
		else
		{
			debug::warning("json_decode() failed for calendar results!");
		}

		return $result;
	}

	// takes a *decoded* $google_event JSON object as input (ie, the $google_event is itself already an associative array)
	// returns a c_bbbs_event object
	private function google_event_to_bbbs_event($google_event)
	{
		$bbbs_event= new c_bbbs_event();

		$bbbs_event->initialize_from_google_calendar_event($google_event);

		return $bbbs_event;
	}

	// convert an array of Google calendar events to an array of BBBS events
	private function google_calendar_events_to_bbbs_events($google_events_array)
	{
		$bbbs_events= array();

		if (!is_null($google_events_array))
		{
			foreach ($google_events_array as $google_event)
			{
				// convert to BBBS event and append to the array
				$bbbs_event= $this->google_event_to_bbbs_event($google_event);
				//debug::log("found event: " . print_r($bbbs_event, TRUE));
				$bbbs_events[]= $bbbs_event;
			}
			// break the reference with the last element
			unset($bbbs_event);
		}

		return $bbbs_events;
	}
}

/* ---------- main */

$calendar_id= "unknown";
$bbbs_events= NULL;

if (isset($_SERVER["REQUEST_METHOD"]))
{
	$http_method= $_SERVER["REQUEST_METHOD"];

	switch ($http_method)
	{
		case "GET":
		{
			$calendar_id= isset($_GET["calendar"]) ? strtolower($_GET["calendar"]) : "fallback_calendar@gmail.com";
			$start_date= isset($_GET["start_date"]) ? $_GET["start_date"] : NULL;
			//###stefan $NOTE: always passing NULL here, which will cause a look-ahead of 1 day. Should clean this up!
			$end_date= NULL; //isset($_GET["end_date"]) ? $_GET["end_date"] : NULL;
			$gcal= new c_google_calendar($calendar_id);
			// retrieve BBBS Events objects
			$bbbs_events= $gcal->get_events($start_date, $end_date);

			if (!is_null($bbbs_events))
			{
				$event_index= 0;
				foreach ($bbbs_events as $input_event)
				{
					if (is_array($input_event))
					{
						debug::error("WHOA: input_event [" . $event_index . "] was an array, not a c_bbbs_event! input_event= " . print_r($input_event, TRUE));
					}
					else if ("c_bbbs_event" != get_class($input_event))
					{
						debug::error("WHOA: input_event [" . $event_index . "] not a c_bbbs_event! input_event= " . print_r($input_event, TRUE));
					}
					$event_index++;
				}
			}
			break;
		}
		case "POST":
		{
			break;
		}
		default:
		{
			break;
		}
	}

	header("Content-type: application/json");
}

if (isset($bbbs_events))
{
	if (0 < count($bbbs_events))
	{
		$bbbs_events= arcgis_geocode_bbbs_event_addresses($bbbs_events);
		if (isset($bbbs_events))
		{
			$results_array= array();

			// extract event details from the objects in the array, then encode into JSON
			foreach ($bbbs_events as $event)
			{
				$results_array[]= $event->get_event_data();
			}

			$event_results= json_encode($results_array, JSON_UNESCAPED_SLASHES);
			//debug::log("###returning event_results= " . $event_results);
			echo("{\"results\":" . $event_results . ",\"success\":true}");
		}
		else
		{
			debug::warning("Failed to get calendar events from [" . $calendar_id . "]!");
			echo("{\"success\":false}");
		}
	}
	else
	{
		debug::log("Calendar [" . $calendar_id . "] had no events in the given date range.");
		echo("{\"success\":false}");
	}
}
else
{
	debug::warning("Failed to get calendar events from [" . $calendar_id . "]!");
	echo("{\"success\":false}");
}

?>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
NXTCommLoggable (leJOS NXJ PC API documentation)
</TITLE>

<META NAME="date" CONTENT="2011-05-16">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

lejos.pc.comm

Class NXTCommLoggable

java.lang.Object
  lejos.pc.comm.NXTCommLoggable

Direct Known Subclasses:
NXTConnector

public abstract class NXTCommLoggable
extends java.lang.Object

Abstract class that allows inheriting class to register and use log listeners.

Author:

Lawrie Griffiths and Matthias Paul Scholz

Field Summary

protected  java.util.ArrayList<NXTCommLogListener>
fLogListeners

Constructor Summary

NXTCommLoggable()

Method Summary

 void
addLogListener(NXTCommLogListener listener)

          register log listener

protected  void
log(java.lang.String s)

          Log a message to all the log listeners

protected  void
log(java.lang.Throwable t)

          Log an exception to all the log listeners

 void
removeLogListener(NXTCommLogListener listener)

          unregister log listener

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fLogListeners

protected java.util.ArrayList<NXTCommLogListener> fLogListeners

Constructor Detail

NXTCommLoggable

public NXTCommLoggable()

Method Detail

addLogListener

public void addLogListener(NXTCommLogListener listener)

register log listener

Parameters:
listener - the log listener

removeLogListener

public void removeLogListener(NXTCommLogListener listener)

unregister log listener

Parameters:
listener - the log listener

log

protected void log(java.lang.Throwable t)

Log an exception to all the log listeners

Parameters:
t - a Throwable

log

protected void log(java.lang.String s)

Log a message to all the log listeners

Parameters:
s - the message

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
namespace ProjetBI_DataGenerator
{
    partial class MainForm
    {
        /// <summary>
        /// Variable nécessaire au concepteur.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Nettoyage des ressources utilisées.
        /// </summary>
        /// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Code généré par le Concepteur Windows Form

        /// <summary>
        /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
        /// le contenu de cette méthode avec l'éditeur de code.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
            this.m_log = new System.Windows.Forms.TextBox();
            this.m_export = new System.Windows.Forms.Button();
            this.m_sizeController = new System.Windows.Forms.TextBox();
            this.m_checkHeader = new System.Windows.Forms.CheckBox();
            this.m_LabelSizeControll = new System.Windows.Forms.Label();
            this.m_optionsTitle = new System.Windows.Forms.Label();
            this.m_Close = new System.Windows.Forms.Button();
            this.SuspendLayout();
            //
            // m_log
            //
            this.m_log.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.m_log.Enabled = false;
            this.m_log.Location = new System.Drawing.Point(12, 12);
            this.m_log.Multiline = true;
            this.m_log.Name = "m_log";
            this.m_log.ReadOnly = true;
            this.m_log.Size = new System.Drawing.Size(156, 208);
            this.m_log.TabIndex = 2;
            //
            // m_export
            //
            this.m_export.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption;
            this.m_export.FlatAppearance.MouseDownBackColor = System.Drawing.Color.White;
            this.m_export.FlatAppearance.MouseOverBackColor = System.Drawing.Color.White;
            this.m_export.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.m_export.Location = new System.Drawing.Point(12, 227);
            this.m_export.Name = "m_export";
            this.m_export.Size = new System.Drawing.Size(156, 23);
            this.m_export.TabIndex = 3;
            this.m_export.Text = "Export to CSV";
            this.m_export.UseVisualStyleBackColor = false;
            this.m_export.Click += new System.EventHandler(this.exportClick);
            //
            // m_sizeController
            //
            this.m_sizeController.HideSelection = false;
            this.m_sizeController.Location = new System.Drawing.Point(174, 48);
            this.m_sizeController.Name = "m_sizeController";
            this.m_sizeController.Size = new System.Drawing.Size(100, 20);
            this.m_sizeController.TabIndex = 4;
            this.m_sizeController.Text = "1";
            //
            // m_checkHeader
            //
            this.m_checkHeader.AutoSize = true;
            this.m_checkHeader.Location = new System.Drawing.Point(174, 74);
            this.m_checkHeader.Name = "m_checkHeader";
            this.m_checkHeader.Size = new System.Drawing.Size(91, 17);
            this.m_checkHeader.TabIndex = 5;
            this.m_checkHeader.Text = "With Headers";
            this.m_checkHeader.UseVisualStyleBackColor = true;
            //
            // m_LabelSizeControll
            //
            this.m_LabelSizeControll.AutoSize = true;
            this.m_LabelSizeControll.Location = new System.Drawing.Point(174, 32);
            this.m_LabelSizeControll.Name = "m_LabelSizeControll";
            this.m_LabelSizeControll.Size = new System.Drawing.Size(83, 13);
            this.m_LabelSizeControll.TabIndex = 6;
            this.m_LabelSizeControll.Text = "Orders needed :";
            //
            // m_optionsTitle
            //
            this.m_optionsTitle.AutoSize = true;
            this.m_optionsTitle.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.m_optionsTitle.Location = new System.Drawing.Point(188, 9);
            this.m_optionsTitle.Name = "m_optionsTitle";
            this.m_optionsTitle.Size = new System.Drawing.Size(81, 23);
            this.m_optionsTitle.TabIndex = 7;
            this.m_optionsTitle.Text = "Options :";
            //
            // m_Close
            //
            this.m_Close.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption;
            this.m_Close.FlatAppearance.MouseDownBackColor = System.Drawing.Color.White;
            this.m_Close.FlatAppearance.MouseOverBackColor = System.Drawing.Color.White;
            this.m_Close.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.m_Close.Location = new System.Drawing.Point(177, 227);
            this.m_Close.Name = "m_Close";
            this.m_Close.Size = new System.Drawing.Size(97, 23);
            this.m_Close.TabIndex = 8;
            this.m_Close.Text = "Exit";
            this.m_Close.UseVisualStyleBackColor = false;
            this.m_Close.Click += new System.EventHandler(this.m_CloseClick);
            //
            // MainForm
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.White;
            this.ClientSize = new System.Drawing.Size(286, 262);
            this.Controls.Add(this.m_Close);
            this.Controls.Add(this.m_optionsTitle);
            this.Controls.Add(this.m_LabelSizeControll);
            this.Controls.Add(this.m_checkHeader);
            this.Controls.Add(this.m_sizeController);
            this.Controls.Add(this.m_export);
            this.Controls.Add(this.m_log);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "MainForm";
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            this.Text = "DataGenerator";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion
        private System.Windows.Forms.TextBox m_log;
        private System.Windows.Forms.Button m_export;
        private System.Windows.Forms.TextBox m_sizeController;
        private System.Windows.Forms.CheckBox m_checkHeader;
        private System.Windows.Forms.Label m_LabelSizeControll;
        private System.Windows.Forms.Label m_optionsTitle;
        private System.Windows.Forms.Button m_Close;
    }
}


text:
package com.example.androsol;

import lib.cards.views.Deck;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;

public abstract class AndroidDeck extends Deck<Bitmap> {

    AndroidDeck() {
    }

    private Resources resources;

    public Resources getResources() {
        return resources;
    }

    public void setResources(Resources resources) {
        this.resources = resources;
    }

    protected abstract int getTextureId(String name);

    @Override
    protected Bitmap loadTexture(String name) {
        /* Set the options */
        Options opts = new Options();
        opts.inDither = true;
        opts.inPreferredConfig = Bitmap.Config.RGB_565;
        opts.inScaled = false; /* Flag for no scaling */

        /* Load the bitmap with the options */
        return BitmapFactory
                .decodeResource(resources, getTextureId(name), opts);
    }
}


text:
package org.grassroot.android.services;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Created by paballo on 2016/10/18.
 */

public class BootBroadCastReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {

        Intent i = new Intent(context, GcmRegistrationService.class);
        context.startService(i);
    }
}


text:
package org.drools.model;

import java.util.List;

public interface Model {

    String getName();

    List<Global> getGlobals();

    List<Rule> getRules();

    List<Query> getQueries();

    List<TypeMetaData> getTypeMetaDatas();
}


text:
package cql.test;

import static org.junit.Assert.*;

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

public class TestChar {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		String test="南海001111";
		System.out.println(test.length());
		System.out.println(test.charAt(0));
		if(test.charAt(0)=='0'){
			System.out.println("hello");
		}
		fail("Not yet implemented");
	}

}


text:
using System;
using System.ComponentModel.Design;
using System.Linq;
using System.Runtime.InteropServices;
using EnvDTE;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell;

namespace Whut.AttachTo
{
    //// This attribute tells the PkgDef creation utility (CreatePkgDef.exe) that this class is a package.
    [PackageRegistration(UseManagedResourcesOnly = true)]
    //// This attribute is used to register the informations needed to show the this package in the Help/About dialog of Visual Studio.
    [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)]
    //// This attribute is needed to let the shell know that this package exposes some menus.
    [ProvideMenuResource("Menus.ctmenu", 1)]
    [Guid(GuidList.guidAttachToPkgString)]
    [ProvideOptionPage(typeof(GeneralOptionsPage), "Whut.AttachTo", "General", 110, 120, false)]
    [ProvideAutoLoad(VSConstants.UICONTEXT.SolutionExists_string)]
    [ProvideAutoLoad(VSConstants.UICONTEXT.NoSolution_string)]
    public sealed class AttachToPackage : Package
    {
        protected override void Initialize()
        {
            base.Initialize();

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            this.AddAttachToCommand(mcs, PkgCmdIDList.cmdidWhutAttachToIIS, gop => gop.ShowAttachToIIS, "w3wp.exe");
            this.AddAttachToCommand(mcs, PkgCmdIDList.cmdidWhutAttachToIISExpress, gop => gop.ShowAttachToIISExpress, "iisexpress.exe");
            this.AddAttachToCommand(mcs, PkgCmdIDList.cmdidWhutAttachToNUnit, gop => gop.ShowAttachToNUnit, "nunit-agent.exe", "nunit.exe", "nunit-console.exe", "nunit-agent-x86.exe", "nunit-x86.exe", "nunit-console-x86.exe");
        }

        private void AddAttachToCommand(OleMenuCommandService mcs, uint commandId, Func<GeneralOptionsPage, bool> isVisible, params string[] programsToAttach)
        {
            OleMenuCommand menuItemCommand = new OleMenuCommand(
                delegate(object sender, EventArgs e)
                {
                    DTE dte = (DTE)this.GetService(typeof(DTE));
                    foreach (Process process in dte.Debugger.LocalProcesses)
                    {
                        if (programsToAttach.Any(p => process.Name.EndsWith(p)))
                        {
                            process.Attach();
                        }
                    }
                },
                new CommandID(GuidList.guidAttachToCmdSet, (int)commandId));
            menuItemCommand.BeforeQueryStatus += (s, e) => menuItemCommand.Visible = isVisible((GeneralOptionsPage)this.GetDialogPage(typeof(GeneralOptionsPage)));
            mcs.AddCommand(menuItemCommand);
        }
    }
}