text:
<?php
declare(strict_types=1);

namespace Yproximite\Api\Client;

use Http\Client\HttpClient;
use Http\Message\MessageFactory;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\StreamInterface;
use Http\Client\Exception\HttpException;
use Http\Discovery\MessageFactoryDiscovery;
use Http\Client\Exception\TransferException as HttpTransferException;

use Yproximite\Api\Exception\LogicException;
use Yproximite\Api\Exception\RequestException;
use Yproximite\Api\Exception\TransferException;
use Yproximite\Api\Exception\AuthenficationException;
use Yproximite\Api\Exception\InvalidResponseException;

/**
 * Class Client
 */
class Client
{
    const BASE_URL = 'https://api.yproximite.fr';

    /**
     * @var string|null
     */
    private $baseUrl;

    /**
     * @var string|null
     */
    private $apiKey;

    /**
     * @var HttpClient
     */
    private $httpClient;

    /**
     * @var MessageFactory|null
     */
    private $messageFactory;

    /**
     * @var string
     */
    private $apiToken;

    /**
     * Used to determine if token was used. In some cases the token could be invalidated during the usage of the API.
     *
     * @var bool
     */
    private $apiTokenFresh = true;

    /**
     * Client constructor.
     *
     * @param HttpClient          $httpClient
     * @param string|null         $apiKey
     * @param string|null         $baseUrl
     * @param MessageFactory|null $messageFactory
     */
    public function __construct(
        HttpClient $httpClient,
        string $apiKey = null,
        string $baseUrl = null,
        MessageFactory $messageFactory = null
    ) {
        $this->httpClient     = $httpClient;
        $this->messageFactory = $messageFactory;
        $this->apiKey         = $apiKey;
        $this->baseUrl        = $baseUrl;
    }

    /**
     * @param null|string $baseUrl
     */
    public function setBaseUrl(string $baseUrl = null)
    {
        $this->baseUrl = $baseUrl;
    }

    /**
     * @param null|string $apiKey
     */
    public function setApiKey(string $apiKey = null)
    {
        $this->apiKey = $apiKey;

        $this->resetApiToken();
    }

    /**
     * Sends a request
     *
     * @param string                                     $method
     * @param string                                     $path
     * @param array|resource|string|StreamInterface|null $body
     * @param array                                      $headers
     *
     * @return mixed
     * @throws TransferException
     * @throws InvalidResponseException
     * @throws AuthenficationException
     */
    public function sendRequest(string $method, string $path, $body = null, array $headers = [])
    {
        $request = $this->createRequest($method, $path, $body, $headers);

        try {
            $content = $this->doSendRequest($request);
        } catch (InvalidResponseException $e) {
            if ($e->getResponse()->getStatusCode() === 401 && !$this->apiTokenFresh) {
                $this->resetApiToken();

                $request = $this->createRequest($method, $path, $body, $headers);
                $content = $this->doSendRequest($request);
            } else {
                throw $e;
            }
        }

        return $content;
    }

    /**
     * @param string $method
     * @param string $path
     * @param null   $body
     * @param array  $headers
     * @param bool   $withAuthorization
     *
     * @return RequestInterface
     */
    private function createRequest(
        string $method,
        string $path,
        $body = null,
        array $headers = [],
        bool $withAuthorization = true
    ): RequestInterface {
        $uri  = $this->getSafeBaseUrl();
        $uri .= '/'.$path;

        $rawData = is_array($body) ? http_build_query($body) : $body;
        $body    = null;

        if (in_array($method, $this->getQueryMethods())) {
            if (is_string($rawData) && $rawData !== '') {
                $uri .= '?'.$rawData;
            }
        } else {
            $body = $rawData;
        }

        $baseHeaders = ['Content-Type' => 'application/x-www-form-urlencoded'];

        if ($withAuthorization) {
            $baseHeaders['Authorization'] = $this->getAuthorizationHeader();
        }

        return $this->getMessageFactory()->createRequest($method, $uri, $headers + $baseHeaders, $body);
    }

    /**
     * @return string
     */
    private function getSafeBaseUrl(): string
    {
        return !is_null($this->baseUrl) ? $this->baseUrl : self::BASE_URL;
    }

    /**
     * @param RequestInterface $request
     *
     * @return mixed
     */
    private function doSendRequest(RequestInterface $request)
    {
        try {
            $response = $this->getHttpClient()->sendRequest($request);
        } catch (HttpTransferException $e) {
            throw new TransferException(
                $e->getMessage(),
                $request,
                $e instanceof HttpException ? $e->getResponse() : null
            );
        }

        if ($response->getStatusCode() >= 400) {
            throw new InvalidResponseException('Bad response status code.', $request, $response);
        }

        $rawData = (string) $response->getBody();

        if (empty($rawData)) {
            return null;
        }

        $data = json_decode($rawData, true);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new InvalidResponseException('Could not decode the response.', $request, $response);
        }

        return $data;
    }

    /**
     * @return HttpClient
     */
    private function getHttpClient(): HttpClient
    {
        return $this->httpClient;
    }

    /**
     * @return MessageFactory
     */
    private function getMessageFactory(): MessageFactory
    {
        if ($this->messageFactory === null) {
            $this->messageFactory = MessageFactoryDiscovery::find();
        }

        return $this->messageFactory;
    }

    /**
     * Returns all methods that uses query string to transfer a request data
     *
     * @return array
     */
    private function getQueryMethods(): array
    {
        return ['GET', 'HEAD', 'DELETE'];
    }

    /**
     * @return string
     */
    private function getApiToken(): string
    {
        if (!is_null($this->apiToken)) {
            $this->apiTokenFresh = false;
        } else {
            $this->updateApiToken();
        }

        return $this->apiToken;
    }

    private function updateApiToken()
    {
        if (is_null($this->apiKey)) {
            throw new LogicException('The api key cannot be empty.');
        }

        $request = $this->createRequest('POST', 'login_check', ['api_key' => $this->apiKey], [], false);

        try {
            $data = $this->doSendRequest($request);
        } catch (RequestException $e) {
            throw new AuthenficationException('Could not request a token.');
        }

        if (!is_array($data) || !array_key_exists('token', $data)) {
            throw new AuthenficationException('Could not retreive a token.');
        }

        $this->apiToken = (string) $data['token'];
    }

    private function resetApiToken()
    {
        $this->apiToken      = null;
        $this->apiTokenFresh = true;
    }

    /**
     * @return string
     */
    private function getAuthorizationHeader(): string
    {
        return sprintf('Bearer %s', $this->getApiToken());
    }
}


text:
package com.fanpics.opensource.android.modelrecord.event;

import com.squareup.otto.Bus;

public class OttoProcessor extends EventProcessor {
    private final Bus bus;

    public OttoProcessor(Bus bus) {
        this.bus = bus;
    }

    @Override
    public void process(Object object) {
        bus.post(object);
    }
}

redpajama_set_name: RedPajamaGithub


text:
{-# LANGUAGE MagicHash           #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE KindSignatures      #-}
{-# LANGUAGE DataKinds           #-}
{-# LANGUAGE TemplateHaskell     #-}

module Language.Haskellator.Machine.Type
  ( Machine (..)
  , VM

  , readPC
  , incrPC
  , writePC

  , readDM
  , writeDM
  , modifyDM
  )
  where

import           Language.Haskellator.Machine.Memory

import           GHC.TypeLits
import           GHC.Prim (Proxy#, proxy#)

import           Control.Monad.State

import           Lens.Micro
import           Lens.Micro.TH
import           Lens.Micro.Mtl

data Machine d r (pcRegNum :: Nat)
  = Machine
      { _dataMemory   :: DataMemory d
      , _registerFile :: RegisterFile r
      }

makeLenses ''Machine

type VM d r (pcRegNum :: Nat) = State (Machine d r pcRegNum)

(<%) :: forall (m :: * -> *) s a b.
              MonadState s m =>
              ASetter s s a b -> m (a -> b) -> m ()
l <% mf = do
  -- (l %=) =<< mf
  f <- mf
  l %= f

pcIx :: forall d r pcRegNum. KnownNat pcRegNum => VM d r pcRegNum Int
pcIx = return . fromIntegral $ natVal' (proxy# :: Proxy# pcRegNum)

-- PC operations --
readPC :: forall d r pcRegNum. KnownNat pcRegNum => VM d r pcRegNum r
readPC = memRead <$> pcIx <*> gets _registerFile

incrPC :: forall d r pcRegNum.
          (Num r, KnownNat pcRegNum)
            => VM d r pcRegNum ()
incrPC = registerFile <% (memModify (+1) <$> pcIx)

writePC :: forall d r pcRegNum.
         (Num r, KnownNat pcRegNum)
           => r -> VM d r pcRegNum ()
writePC newPC = registerFile <% (memWrite <$> pcIx <*> pure newPC)

-- Data memory operations --
readDM :: (Integral i, Show i) => i -> VM d r pcRegNum d
readDM i = memRead i <$> gets _dataMemory

writeDM :: Integral i => i -> d -> VM d r pcRegNum ()
writeDM i a = dataMemory %= memWrite i a

modifyDM :: Integral i => (d -> d) -> i -> VM d r pcRegNum ()
modifyDM f i = dataMemory %= memModify f i


text:
using System;

/// <summary>
/// System.Nullable<T>.Ctor(T)[v-juwa]
/// </summary>
public class NullableCtor
{
    #region Public Methods
    public bool RunTests()
    {
        bool retVal = true;

        TestLibrary.TestFramework.LogInformation("[Positive]");
        retVal = PosTest1() && retVal;
        retVal = PosTest2() && retVal;

        return retVal;
    }

    #region Positive Test Cases
    public bool PosTest1()
    {
        bool retVal = true;

        const string c_TEST_DESC = "PosTest1: Verify the value parameter is int";
        const string c_TEST_ID = "P001";

        int value = TestLibrary.Generator.GetInt32(-55);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);

        try
        {
            int? nullObj = new Nullable<int>(value);

            if (!nullObj.HasValue)
            {
                string errorDesc = "HasValue is true as expected: Actual(false)";
                errorDesc += "\n value parameter is "+value;
                TestLibrary.TestFramework.LogError("001 " + "TestID_" + c_TEST_ID, errorDesc);
                retVal = false;
            }

            if (nullObj.Value != value)
            {
                string errorDesc = "Value is "+value+" as expected: Actual("+nullObj.Value+")";
                errorDesc += "\n value parameter is " + value;
                TestLibrary.TestFramework.LogError("002 " + "TestID_" + c_TEST_ID, errorDesc);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e+"\n value parameter is "+value);
            TestLibrary.TestFramework.LogInformation(e.StackTrace);
            retVal = false;
        }

        return retVal;
    }

    public bool PosTest2()
    {
        bool retVal = true;

        const string c_TEST_DESC = "PosTest2: Verify the value parameter is char";
        const string c_TEST_ID = "P002";

        char value = TestLibrary.Generator.GetChar(-55);

        TestLibrary.TestFramework.BeginScenario(c_TEST_DESC);

        try
        {
            char? nullObj = new Nullable<char>(value);

            if (!nullObj.HasValue)
            {
                string errorDesc = "HasValue is true as expected: Actual(false)";
                errorDesc += "\n value parameter is " + value;
                TestLibrary.TestFramework.LogError("004 " + "TestID_" + c_TEST_ID, errorDesc);
                retVal = false;
            }

            if (nullObj.Value != value)
            {
                string errorDesc = "Value is " + value + " as expected: Actual(" + nullObj.Value + ")";
                errorDesc += "\n value parameter is " + value;
                TestLibrary.TestFramework.LogError("005 " + "TestID_" + c_TEST_ID, errorDesc);
                retVal = false;
            }
        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e + "\n value parameter is " + value);
            TestLibrary.TestFramework.LogInformation(e.StackTrace);
            retVal = false;
        }

        return retVal;
    }
    #endregion

    #endregion

    public static int Main()
    {
        NullableCtor test = new NullableCtor();

        TestLibrary.TestFramework.BeginTestCase("For Method:System.Nullable<T>.Ctor(T)");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
}


text:
import Users from '../../models/users';
import UsersInfo from '../../models/users-info';
import Api from '../../services/api';
import jwt from '../../utils/jwt';
import logger from '../../utils/logger';
import { uncollect } from '../shared/statistics';
import initialMarks from '../shared/marks';

/* ========================= LOGIN ========================= */

const loginHelper = async (ctx) => {
  const { code } = ctx.request.body;
  const { appName, secretKey } = ctx.state;
  let error = null;
  try {
    const githubToken = await Api.getToken(code, appName);
    const userInfo = await Api.getLogin(githubToken, appName);
    if (userInfo.login) {
      const login = userInfo.login;
      const user = await Users.loginWithGithub(userInfo, ctx.mq);
      if (user) {
        const token = jwt.sign({
          login,
          uuid: user.uuid,
          token: githubToken
        }, secretKey);

        initialMarks({
          login,
          appName,
          token: githubToken,
        });

        logger.info(`[USER:LOGIN:GitHub] ${login}`);
        return {
          token,
          login
        };
      }
    }
    error = 'get api login info failed!';
  } catch (err) {
    error = err;
  }
  if (error) {
    logger.error(error);
  }
  return null;
};

const loginWithGitHub = async (ctx) => {
  const loginResult = await loginHelper(ctx);
  ctx.body = {
    success: true,
    result: loginResult
  };
};

const BASE_INFO = {
  labels: [],
  languages: [],
  groups: []
};

const getInfo = async (ctx, next) => {
  const { login } = ctx.state.user;
  const userInfo = await UsersInfo.findByLogin(login);

  if (!userInfo) {
    ctx.body = {
      success: true,
      result: Object.assign({}, BASE_INFO),
      cache: false
    };
  } else {
    const { labels = [], languages = [], groups = [] } = userInfo;
    ctx.body = {
      success: true,
      result: Object.assign({}, BASE_INFO, {
        labels: labels.map(item => item.label),
        languages: languages.map(item => item.language),
        groups: groups.map(item => item.group)
      })
    };
  }

  await next();
};

const deleteInfo = async (ctx) => {
  const { login } = ctx.state.user;
  const { labels = [], languages = [] } = ctx.request.body;
  uncollect({
    login,
    labels,
    languages
  });
  ctx.body = {
    success: true,
  };
};

const getStatistic = async (ctx, next) => {
  ctx.body = {
    result: [],
    success: true,
  };

  await next();
};

const createGroup = async (ctx) => {
  const { login } = ctx.state.user;
  const { group, markIds = '' } = ctx.request.body;
  const marks = markIds.split(',');
  await UsersInfo.putMarksToGroup({
    login,
    group,
    marks
  });

  ctx.body = {
    success: true,
  };
};

const deleteGroup = async (ctx) => {
  const { login } = ctx.state.user;
  const { group } = ctx.request.body;

  await UsersInfo.deleteGroup({
    login,
    group,
  });

  ctx.body = {
    success: true,
  };
};

const removeMarksInGroup = async (ctx) => {
  const { login } = ctx.state.user;
  const { group, markIds = '' } = ctx.request.body;
  const marks = markIds.split(',');

  await UsersInfo.removeMarksInGroup({
    login,
    group,
    marks
  });

  ctx.body = {
    success: true,
  };
};

export default {
  loginWithGitHub,
  getInfo,
  deleteInfo,
  getStatistic,
  // group
  createGroup,
  deleteGroup,
  removeMarksInGroup
};


text:
local skynet = require "skynet"
require "skynet.manager"
local base_app_mgr = require "base_app_mgr"
local player_mgr = require "player_mgr"

local CMD = {}

function CMD.start()
    -- 初始化base_app_mgr
    base_app_mgr:init()
    base_app_mgr:create_base_apps()
    base_app_mgr:start_base_apps()

    player_mgr:init()
end

-- 为玩家分配一个baseapp
function CMD.get_base_app_addr(account_info)
    for addr, info in pairs(base_app_mgr:get_base_app_tbl()) do
        local ret = skynet.call(addr, "lua", "get_clients")
        skynet.error(string.format("Current clicent of port %d is %d", info.port, ret.clients))

        if ret.clients < 1000 then
            return {ip = "192.168.18.107", port = info.port, token = "token"}
        end
    end

    return {errmsg = "No more base app to connect !"}
end

local function lua_dispatch(_, session, cmd, ...)
    local f = CMD[cmd]
    assert(f, "base_app_mgr can't dispatch cmd ".. (cmd or nil))

    if session > 0 then
        skynet.ret(skynet.pack(f(...)))
    else
        f(...)
    end
end

local function init()
    skynet.register("base_app_mgr")

    skynet.dispatch("lua", lua_dispatch)

    skynet.error("base_app_mgr booted...")
end

skynet.start(init)


text:
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build
SOURCEDIR     = source
BUILDDIR      = ../docs

# Put it first so that "make" without argument is like "make help".
help:
	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# @TODO: CLI - Move make file stuff to pyshgp_cli.py

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


text:
/*globals angular:false*/
(function (angular) {
  'use strict';

  var app;
  app = angular.module('dacos');
  app.factory('Requirement', function (coursesUri, $resource) {
    return $resource(coursesUri + '/catalogs/:catalogCode/modalities/:modalityCode/blocks/:blockCode/requirements/:requirementCode', {'requirementCode' : '@code', 'blockCode' : '@blockCode', 'modalityCode' : '@modalityCode', 'catalogCode' : '@catalogCode'}, {
      'update' : {'method' : 'PUT', 'transformRequest' : function (data) {
        var res;
        res = angular.copy(data);
        res.discipline = data && data.discipline && data.discipline.code ? data.discipline.code : null;
        return angular.toJson(res);
      }},
      'save'   : {'method' : 'POST', 'url' : coursesUri + '/catalogs/:catalogCode/modalities/:modalityCode/blocks/:blockCode/requirements'},
    });
  });
})(angular);


text:
package org.spongepowered.common.item.inventory.lens.comp;

import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import org.spongepowered.api.item.inventory.property.SlotPos;
import org.spongepowered.common.item.inventory.lens.slots.SlotLens;

public interface Inventory2DLens<TInventory, TStack> extends OrderedInventoryLens<TInventory, TStack> {

    int getWidth();

    int getHeight();

    SlotLens<IInventory, ItemStack> getSlot(SlotPos pos);

}


text:
'use strict';

var _ = require('lodash');
var UAParser = require('ua-parser-js');

module.exports = function (app, options) {
  var defs = {path: '$features.webp'};
  var opts = _.merge({}, defs, options || {});

  return function (page, model, params, next) {
    var parser = new UAParser();
    parser.setUA(page.req.headers['user-agent']);
    var browser = parser.getResult().browser.name;
    var webp = browser === 'Chrome' || browser === 'Opera';
    model.set('$features.webp', browser === 'Chrome' || browser === 'Opera');
    next();
  };
};


text:
namespace PlayMe.Server.SoundBoard
{
    public interface ISoundBoardSettings
    {
        bool IsEnabled { get; }
        int SecondsBetweenSkipThreshold { get; }
    }
}


text:
require 'test_helper'

class FooterRendererTest < ActionView::TestCase
  fixtures :all

  def builder posts=Post.all
    @builder ||= TableView::TableBuilder.new(posts).tap do |t|
      t.column :title
      t.column :content
    end
  end

  def renderer
    @renderer ||= TableView::Renderers::FooterRenderer.new(builder, self)
  end

  teardown do
    @builder = @renderer = nil
  end

  test "renders table foot" do
    assert_dom_equal '
' +
        '

' +
      '
', renderer.to_html
  end

  test "renders sums" do
    builder.column :id, :sum => true
    assert_dom_equal '
' +
        '
		' + Post.all.sum(:id).to_s + '
' +
      '
', renderer.to_html
  end
end


text:
<?php

namespace Persona\Hris\Overtime\Model;

use Persona\Hris\Employee\Model\EmployeeInterface;
use Persona\Hris\Repository\RepositoryInterface;

/**
 * @author Muhamad Surya Iksanudin <surya.iksanudin@personahris.com>
 */
interface EmployeeOvertimeRepositoryInterface extends RepositoryInterface
{
    /**
     * @param \DateTime         $date
     * @param EmployeeInterface $employee
     *
     * @return EmployeeOvertimeInterface[]
     */
    public function findByEmployee(\DateTime $date, EmployeeInterface $employee): array;
}


text:
#pragma once

#include "./base.hpp"
#include "./function.hpp"
#include <cstdint>
#include <cstdlib>
#include <utility>
#include <memory>
#include <atomic>
#include <array>
#include <list>

namespace cov {
	template<typename _Tp, template<typename> class _alloc>
	struct _alloc_helper {
		static _alloc<_Tp> allocator;
	};
	template<typename _Tp, template<typename> class _alloc>
	_alloc<_Tp> _alloc_helper<_Tp, _alloc>::allocator;

	template<typename _Tp,
	         template<typename> class _alloc=std::allocator,
	         template<typename> class _atomic=std::atomic>
	class shared_ptr final {
	public:
		typedef _atomic<unsigned long> counter;
		typedef _Tp data_type;
		typedef _Tp *raw_type;
		typedef cov::function<void(raw_type)> deleter;
	private:
		class proxy final {
			friend class shared_ptr<_Tp, _alloc, _atomic>;

			mutable counter ref_count;
			deleter resolve;
			raw_type data = nullptr;

			void add_ref() const
			{
				++ref_count;
			}

			void cut_ref() const
			{
				if (--ref_count == 0) {
					if (resolve.callable())
						resolve(data);
					_alloc_helper<data_type, _alloc>::allocator.destroy(data);
					_alloc_helper<data_type, _alloc>::allocator.deallocate(data, 1);
				}
			}
		};

		proxy *mProxy;
	public:
		shared_ptr() : mProxy(_alloc_helper<proxy, _alloc>::allocator.allocate(1))
		{
			mProxy->ref_count = 1;
			mProxy->data = _alloc_helper<data_type, _alloc>::allocator.allocate(1);
			_alloc_helper<data_type, _alloc>::allocator.construct(mProxy->data);
		}

		shared_ptr(const deleter &f) : mProxy(_alloc_helper<proxy, _alloc>::allocator.allocate(1))
		{
			mProxy->ref_count = 1;
			mProxy->deleter = f;
			mProxy->data = _alloc_helper<data_type, _alloc>::allocator.allocate(1);
			_alloc_helper<data_type, _alloc>::allocator.construct(mProxy->data);
		}

		shared_ptr(const shared_ptr &ptr) : mProxy(ptr.mProxy)
		{
			mProxy->add_ref();
		}

		shared_ptr(const data_type &obj) : mProxy(_alloc_helper<proxy, _alloc>::allocator.allocate(1))
		{
			mProxy->ref_count = 1;
			mProxy->data = _alloc_helper<_Tp, _alloc>::allocator.allocate(1);
			_alloc_helper<data_type, _alloc>::allocator.construct(mProxy->data, obj);
		}

		shared_ptr(const data_type &obj, const deleter &f) : mProxy(
			    _alloc_helper<proxy, _alloc>::allocator.allocate(1))
		{
			mProxy->ref_count = 1;
			mProxy->deleter = f;
			mProxy->data = _alloc_helper<_Tp, _alloc>::allocator.allocate(1);
			_alloc_helper<data_type, _alloc>::allocator.construct(mProxy->data, obj);
		}

		~shared_ptr()
		{
			mProxy->cut_ref();
			if (mProxy->ref_count == 0) {
				_alloc_helper<proxy, _alloc>::allocator.destroy(mProxy);
				_alloc_helper<proxy, _alloc>::allocator.deallocate(mProxy, 1);
			}
		}

		shared_ptr &operator=(const shared_ptr &ptr)
		{
			if (&ptr != this) {
				mProxy->cut_ref();
				if (mProxy->ref_count == 0) {
					_alloc_helper<proxy, _alloc>::allocator.destroy(mProxy);
					_alloc_helper<proxy, _alloc>::allocator.deallocate(mProxy, 1);
				}
				mProxy = ptr.mProxy;
				++mProxy->ref_count;
			}
			return *this;
		}

		data_type &operator*()
		{
			return *mProxy->data;
		}

		raw_type operator->()
		{
			return mProxy->data;
		}

		const data_type &operator*() const
		{
			return *mProxy->data;
		}

		const raw_type operator->() const
		{
			return mProxy->data;
		}
	};

	template<typename T, long blck_size, template<typename> class allocator_t=std::allocator>
	class allocator final {
		allocator_t<T> mAlloc;
		std::array<T *, blck_size> mPool;
		long mOffset = -1;
	public:
		void blance()
		{
			if (mOffset != 0.5 * blck_size) {
				if (mOffset < 0.5 * blck_size) {
					for (; mOffset < 0.5 * blck_size; ++mOffset)
						mPool[mOffset + 1] = mAlloc.allocate(1);
				}
				else {
					for (; mOffset > 0.5 * blck_size; --mOffset)
						mAlloc.deallocate(mPool[mOffset], 1);
				}
			}
		}

		void clean()
		{
			for (; mOffset >= 0; --mOffset)
				mAlloc.deallocate(mPool[mOffset], 1);
		}

		allocator()
		{
			blance();
		}

		allocator(const allocator &) = delete;

		~allocator()
		{
			clean();
		}

		template<typename...ArgsT>
		T *alloc(ArgsT &&...args)
		{
			T *ptr = nullptr;
			if (mOffset >= 0)
				ptr = mPool[mOffset--];
			else
				ptr = mAlloc.allocate(1);
			mAlloc.construct(ptr, std::forward<ArgsT>(args)...);
			return ptr;
		}

		void free(T *ptr)
		{
			mAlloc.destroy(ptr);
			if (mOffset < blck_size - 1)
				mPool[++mOffset] = ptr;
			else
				mAlloc.deallocate(ptr, 1);
		}
	};

	template<typename T, std::size_t pool_size = 10240, template<typename> class allocator_t=std::allocator,
	         template<typename, std::size_t> class array_t=std::array>
	class storage final {
		struct mem_unit {
			T *ptr = nullptr;
			bool raw = true;
		};
		allocator_t<T> allocator;
		array_t<mem_unit, pool_size> pool;
	public:
		class pointer final {
			friend class storage;

			std::size_t posit;

			pointer(std::size_t p) : posit(p) {}

		public:
			pointer() = delete;

			pointer(const pointer &) = default;

			~pointer() = default;

			pointer &operator=(const pointer &) = default;
		};

		storage()
		{
			for (auto &unit:pool)
				unit.ptr = allocator.allocate(1);
		}

		storage(const storage &) = delete;

		~storage()
		{
			for (auto &unit:pool) {
				if (!unit.raw)
					allocator.destroy(unit.ptr);
				allocator.deallocate(unit.ptr, 1);
			}
		}

		template<typename...ArgsT>
		pointer alloc(ArgsT...args)
		{
			for (std::size_t i = 0; i < pool_size; ++i) {
				if (pool[i].raw) {
					allocator.construct(pool[i].ptr, std::forward<ArgsT>(args)...);
					pool[i].raw = false;
					return i;
				}
			}
			throw cov::error("E000M");
		}

		void free(const pointer &p)
		{
			if (p.posit >= pool_size)
				throw cov::error("E000N");
			if (!pool[p.posit].raw) {
				allocator.destroy(pool[p.posit].ptr);
				pool[p.posit].raw = true;
			}
		}

		bool usable(const pointer &p)
		{
			if (p.posit >= pool_size)
				throw cov::error("E000N");
			return !pool[p.posit].raw;
		}

		T &get(const pointer &p)
		{
			if (p.posit >= pool_size)
				throw cov::error("E000N");
			if (pool[p.posit].raw)
				throw cov::error("E000P");
			return *pool[p.posit].ptr;
		}
	};

	class stack final {
	public:
		using byte=uint8_t;
		using size_t=uint64_t;
	private:
		// Stack Start
		void *ss = nullptr;
		// Stack Pointer
		byte *sp = nullptr;
		// Stack Limit
		byte *sl = nullptr;
	public:
		stack() = delete;

		stack(const stack &) = delete;

		stack(size_t size) : ss(::malloc(size))
		{
			sp = reinterpret_cast<byte *>(ss) + size;
			sl = sp;
		}

		~stack()
		{
			::free(ss);
		}

		inline bool empty() const
		{
			return sp == sl;
		}

		void *top()
		{
			if (sp == sl)
				throw std::runtime_error("Stack is empty.");
			return reinterpret_cast<void *>(sp + sizeof(size_t));
		}

		void *push(size_t size)
		{
			if (sp - reinterpret_cast<byte *>(ss) < size + sizeof(size_t))
				throw std::runtime_error("Stack overflow.");
			sp -= size + sizeof(size_t);
			*reinterpret_cast<size_t *>(sp) = size;
			return reinterpret_cast<void *>(sp + sizeof(size_t));
		}

		void pop()
		{
			if (sp == sl)
				throw std::runtime_error("Stack is empty.");
			sp += *reinterpret_cast<size_t *>(sp) + sizeof(size_t);
		}

		size_t size_of(void *ptr)
		{
			return *reinterpret_cast<size_t *>(reinterpret_cast<byte *>(ptr) - sizeof(size_t));
		}
	};

	class heap final {
	public:
		using byte=uint8_t;
		using size_t=uint64_t;
		enum class allocate_policy {
			first_fit, best_fit, worst_fit
		};
	private:
		// Heap Start
		void *hs = nullptr;
		// Heap Pointer
		byte *hp = nullptr;
		// Heap Limit
		byte *hl = nullptr;
		allocate_policy policy = allocate_policy::best_fit;
		bool no_truncate = false;
		std::list<byte *> free_list;

		inline size_t &get_size(byte *ptr)
		{
			return *reinterpret_cast<size_t *>(ptr);
		}

		void compress()
		{
			std::list<byte *> new_list;
			byte *ptr = nullptr;
			// Sort the spaces by address.
			free_list.sort([](byte *lhs, byte *rhs) {
				return lhs < rhs;
			});
			// Compress the free list.
			for (auto p:free_list) {
				if (ptr != nullptr) {
					size_t &size = get_size(ptr);
					if (ptr + size + sizeof(size_t) == p) {
						size += get_size(p) + sizeof(size_t);
					}
					else {
						new_list.push_back(ptr);
						ptr = p;
					}
				}
				else
					ptr = p;
			}
			// Connect the final space and remain spaces.
			if (ptr != nullptr) {
				if (ptr + get_size(ptr) + sizeof(size_t) == hp)
					hp = ptr;
				else
					new_list.push_back(ptr);
			}
			// Swap the new list and old list.
			std::swap(new_list, free_list);
		}

		void *allocate(size_t size)
		{
			// Try to find usable spaces in free list
			if (!free_list.empty()) {
				auto it = free_list.begin();
				switch (policy) {
				case allocate_policy::first_fit: {
					// Find the first fit space.
					for (; it != free_list.end(); ++it)
						if (get_size(*it) >= size)
							break;
					break;
				}
				case allocate_policy::best_fit: {
					// Find the best fit space.
					auto best = it;
					for (; it != free_list.end(); ++it)
						if (get_size(*it) >= size && get_size(*it) < get_size(*best))
							best = it;
					it = best;
					break;
				}
				case allocate_policy::worst_fit: {
					// Find the worst fit space.
					auto max = it;
					for (; it != free_list.end(); ++it)
						if (get_size(*it) > get_size(*max))
							max = it;
					it = max;
					break;
				}
				}
				if (it != free_list.end() && get_size(*it) >= size) {
					// Remove from free list.
					byte *raw = *it;
					free_list.erase(it);
					// Truncate remain spaces
					if (!no_truncate && get_size(raw) - size > sizeof(size_t)) {
						byte *ptr = raw + sizeof(size_t) + size;
						get_size(ptr) = get_size(raw) - size - sizeof(size_t);
						get_size(raw) = size;
						free_list.push_back(ptr);
					}
					return reinterpret_cast<void *>(raw + sizeof(size_t));
				}
			}
			// Checkout remain spaces,if enough,return.
			if (hl - hp >= size + sizeof(size_t)) {
				get_size(hp) = size;
				void *ptr = reinterpret_cast<void *>(hp + sizeof(size_t));
				hp += size + sizeof(size_t);
				return ptr;
			}
			return nullptr;
		}

	public:
		heap() = delete;

		heap(const heap &) = delete;

		explicit heap(size_t size, allocate_policy p = allocate_policy::first_fit, bool nt = false) : hs(
			    ::malloc(size)), policy(p), no_truncate(nt)
		{
			hp = reinterpret_cast<byte *>(hs);
			hl = hp + size;
		}

		~heap()
		{
			::free(hs);
		}

		void *malloc(size_t size)
		{
			// Try to allocate.
			void *ptr = allocate(size);
			// If successed,return
			if (ptr != nullptr)
				return ptr;
			// Compress the memory spaces
			compress();
			// Try to allocate again.
			ptr = allocate(size);
			// If successed,return.
			if (ptr != nullptr)
				return ptr;
			else // There have no usable spaces,throw bad alloc exception.
				throw std::runtime_error("Bad alloc.");
		}

		void free(void *ptr)
		{
			free_list.push_back(reinterpret_cast<byte *>(ptr) - sizeof(size_t));
		}

		size_t size_of(void *ptr)
		{
			return get_size(reinterpret_cast<byte *>(ptr));
		}
	};

	template<typename T, typename...ArgsT>
	void construct(T *ptr, ArgsT &&...args)
	{
		if (ptr != nullptr)
			::new(ptr) T(std::forward<ArgsT>(args)...);
	}

	template<typename T>
	void destroy(T *ptr)
	{
		if (ptr != nullptr)
			ptr->~T();
	}
}


text:
<?php

namespace TwigBroiler\Tests\Twig;

use TwigBroiler\Twig\HelperExtension;

class HelperExtensionTest extends \PHPUnit_Framework_TestCase {

    public function testSimple () {
        $twig = new HelperExtension();
        $this->assertTrue(is_object($twig));
        $this->assertTrue(is_array($twig->getFilters()));
        $this->assertTrue(is_string($twig->getName()));
    }

    public function dataFullUrl ()
    {
        return array(
            array('http://example.com',  'http://example.com'),
            array('https://example.com',  'https://example.com'),
            array('ftp://example.com',  'ftp://example.com'),
            array('//example.com',  '//example.com'),
            array('/example.com',  '//localhost/example.com'),
            array('example.com',  '//localhost/example.com'),
        );
    }

    /**
     * @dataProvider dataFullUrl
     */
    public function testFullUrl ($string, $assertedReturn)
    {
        $twig = new HelperExtension();

        $actualReturn = $twig->fullUrlFilter($string);
        $this->assertTrue(is_string($actualReturn));
        $this->assertEquals($assertedReturn, $actualReturn);
    }

    public function dataNumberFormat ()
    {
        return array(
            array('1',  '01'),
            array(1,    '01'),
            array(11,   '11'),
            array(111,  '111'),
        );
    }

    /**
     * @dataProvider dataNumberFormat
     */
    public function testNumberFormat ($string, $assertedReturn)
    {
        $twig = new HelperExtension();

        $actualReturn = $twig->numberFormatFilter($string);
        $this->assertTrue(is_string($actualReturn));
        $this->assertEquals($assertedReturn, $actualReturn);
    }

    public function datatypoFilter ()
    {
        return array(
            array('123-124', '123–124'),
            array('123 - 124', '123–124'),
            array('Ich weiß ja nicht...', 'Ich weiß ja nicht…'),
            array('Sumpfhuhn(TM) oder so ähnlich', 'Sumpfhuhn™ oder so ähnlich'),
            array('Und da sagt der doch: "Ich würde das anders machen".', 'Und da sagt der doch: "Ich würde das anders machen".'),
        );
    }

    /**
     * @dataProvider datatypoFilter
     */
    public function testtypoFilter ($string, $assertedReturn)
    {
        $twig = new HelperExtension();

        $actualReturn = $twig->typoFilter($string);

        $this->assertTrue(is_string($actualReturn));
        $this->assertEquals($actualReturn, $assertedReturn);
    }
}


text:
namespace EasyCpp
{
	namespace VFS
	{
		class InputOutputStream : public virtual InputStream, public virtual OutputStream
		{

		};
		typedef std::shared_ptr<InputOutputStream> InputOutputStreamPtr;
	}
}


text:
package com.groupon.odo.proxylib.models;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView;

public class Method {
    private int id;
    private String idString;
    private int httpCode = 200;
    private String description = null;
    private String methodName = null;
    private String className = null;
    private String methodType = null;
    private Object[] methodArguments = new Object[0];
    private String[] methodArgumentNames = new String[0];
    private String[] methodDefaultArguments = new String[0];
    private java.lang.reflect.Method method = null;
    private boolean blockRequest = false;
    private int overrideVersion;

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

    @JsonView(ViewFilters.BackupIgnore.class)
    public int getId() {
        return this.id;
    }

    public void setIdString(String idString) {
        this.idString = idString;
    }

    public void setHttpCode(int httpCode) {
        this.httpCode = httpCode;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public int getHttpCode() {
        return this.httpCode;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public String getIdString() {
        return this.idString;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public String getDescription() {
        return this.description;
    }

    public void setMethodType(String methodType) {
        this.methodType = methodType;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public String getMethodType() {
        return this.methodType;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getMethodName() {
        return this.methodName;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getClassName() {
        return this.className;
    }

    public void setMethodArguments(Object[] args) {
        this.methodArguments = args;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public Object[] getMethodArguments() {
        return this.methodArguments;
    }

    public void setMethodArgumentNames(String[] argNames) {
        this.methodArgumentNames = argNames;
    }

    public void setMethodDefaultArguments(String[] defaultArguments) {
        this.methodDefaultArguments = defaultArguments;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public String[] getMethodArgumentNames() {
        return this.methodArgumentNames;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public String[] getMethodDefaultArguments() {
        return this.methodDefaultArguments;
    }

    public void setMethod(java.lang.reflect.Method method) {
        this.method = method;
    }

    // do not put this in JSON output
    @JsonIgnore
    public java.lang.reflect.Method getMethod() {
        return this.method;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public boolean isBlockRequest() {
        return blockRequest;
    }

    public void setBlockRequest(boolean blockRequest) {
        this.blockRequest = blockRequest;
    }

    @JsonView(ViewFilters.BackupIgnore.class)
    public int getOverrideVersion() {
        return overrideVersion;
    }

    public void setOverrideVersion(int overrideVersion) {
        this.overrideVersion = overrideVersion;
    }
}


text:
                <form id="stage-form" class="form-horizontal" role="form">
                    <fieldset>
                        <legend>Start Workflow</legend>

                                Workflow URL

                                    <input id="pp-url"  class="form-control" readonly>

                                Workflow Token

                                    <input id="pp-token" class="form-control" readonly>

                                    Outputs
                                    <button type="button" class="btn btn-success newStartOutput">

                                        New Output
                                    </button>
                                    <button type="button" class="btn btn-inverse deleteStartOutput">

                                        Delete Selected Output
                                    </button>
                                    All outputs of start stage

                    </fieldset>
                </form>


text:
from __future__ import unicode_literals, print_function, absolute_import

import unittest

import boto3
from moto import mock_lambda, mock_s3
from requests.exceptions import ConnectionError

# App imports
from tests import DeployBaseTest
from tests.mocks_utils import MockZipFile

class DeployTest(DeployBaseTest):
    @mock_s3
    @mock_lambda
    def _create_lambda_from_s3(self):
        zip_file = MockZipFile.create_zip("test")

        bucket_name = "test_bucket"
        s3 = boto3.resource('s3')
        bucket = s3.Bucket(bucket_name)
        bucket.create()

        bucket.put_object(
            Key=zip_file,
            Body=MockZipFile.read_file(zip_file)

        )
        self.lambda_conf["Code"] = {'S3Bucket': bucket_name,
                                    'S3Key': zip_file}

        response = self.deploy.remote_create_lambada(**self.lambda_conf)
        self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 201)
        for key in ["FunctionName", "Role", "Runtime", "Handler"]:
            self.assertEqual(response[key], self.lambda_conf[key])

        return response

    @mock_lambda
    def _create_lambda_from_file(self):
        zip_file = MockZipFile.create_zip("test")
        self.lambda_conf["Code"] = {'ZipFile': MockZipFile.read_file(zip_file)}

        response = self.deploy.remote_create_lambada(**self.lambda_conf)
        self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 201)
        for key in ["FunctionName", "Role", "Runtime", "Handler"]:
            self.assertEqual(response[key], self.lambda_conf[key])

    @mock_s3
    @mock_lambda
    def test_remote_list_lambdas(self):
        response = self.deploy.remote_list_lambdas()
        self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 200)
        self.assertEqual(response["Functions"], [])

        zip_file = MockZipFile.create_zip("test")
        self.lambda_conf["Code"] = {'ZipFile': MockZipFile.read_file(zip_file)}

        self._create_lambda_from_file()

    @mock_s3
    @mock_lambda
    def test_remote_get_lambda(self):
        response = self.deploy.remote_get_lambda(**self.lambda_conf)
        self.assertFalse(response)

        self._create_lambda_from_s3()

        response = self.deploy.remote_get_lambda(**self.lambda_conf)
        self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 200)
        for key in ["FunctionName", "Role", "Runtime", "Handler"]:
            self.assertEqual(response["Configuration"][key], self.lambda_conf[key])

    @mock_s3
    @mock_lambda
    def test_remote_update_lambda(self):
        response = self.deploy.remote_get_lambda(**self.lambda_conf)
        self.assertFalse(response)

        self._create_lambda_from_s3()

        response = self.deploy.remote_get_lambda(**self.lambda_conf)
        self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 200)
        for key in ["FunctionName", "Role", "Description", "Runtime", "Handler"]:
            self.assertEqual(response["Configuration"][key], self.lambda_conf[key])

        lambda_new_conf = {
            "FunctionName": "LambdaExample1",
            "Description": "string2",
            "Runtime": "python3.6",
        }

        # TODO: research this error from MOTO
        try:
            response = self.deploy.remote_update_conf_lambada(**self.lambda_conf)
            self.assertEqual(response["ResponseMetadata"]["HTTPStatusCode"], 200)
            for key in ["FunctionName", "Role", "Description", "Runtime", "Handler"]:
                self.assertEqual(response["Configuration"][key], lambda_new_conf[key])
        except ConnectionError:
            pass

if __name__ == '__main__':
    unittest.main()


text:
/**
 * aes-128.h
 *
 * @version 3.0 (December 2000)
 *
 * Optimised ANSI C code for the Rijndael cipher (now AES)
 *
 * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
 * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
 * @author Paulo Barreto <paulo.barreto@terra.com.br>
 *
 * This code is hereby placed in the public domain.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef __RIJNDAEL_ALG_FST_H
#define __RIJNDAEL_ALG_FST_H

typedef unsigned char	u8;
typedef unsigned int	u32;

int aes128KeySetupEnc(u32 rk[/*44*/], const u8 cipherKey[]);
void aes128Encrypt(const u32 rk[/*44*/], const u8 pt[16], u8 ct[16]);

void aes128round(u32 s[4], const u32 rk[4]);
void aes128rounds(const u32 rk[/*44*/], const u8 pt[16], u8 ct[16], int rounds, int start);

#endif


text:
'use strict';

var $ = require('jquery'),
    Marionette = require('../shim/backbone.marionette'),
    Backbone = require('../shim/backbone'),
    router = require('./router').router,
    userModels = require('./user/models'),
    settings = require('./settings');

var App = Marionette.Application.extend({
    initialize: function() {
        this.setupUser();
        this.setupNavigation();
        this.setupPendingLayers();
    },

    setupUser: function() {
        var model = new userModels.UserModel();
        if (window.user) {
            model.set(window.user);
        }
        settings.setUser(model);
    },

    setupNavigation: function() {
        $('#container').on('click', '[data-url]', function(e) {
            e.preventDefault();
            router.navigate($(this).data('url'), { trigger: true });
        });
        Backbone.history.start({ pushState: true });
    },

    setupPendingLayers: function() {
        var pendingLayers = settings.getPendingLayers(),
            user = settings.getUser(),
            pollInterval = 5000;

        if (user.isAuthenticated()) {
            pendingLayers.fetch();
        }

        function poll() {
            if (pendingLayers.existsProcessing()) {
                pendingLayers.fetch();
            }
            setTimeout(poll, pollInterval);
        }
        setTimeout(poll, pollInterval);

        window.onbeforeunload = function() {
            if (pendingLayers.existsUploading()) {
                return 'Leaving this page will cancel uploads in progress.';
            }
        };

        return pendingLayers;
    }
});

module.exports = App;


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Mycologia 32(6): 758 (1940)

#### Original name
Pseudocollema Kanouse & A.H. Sm.

### Remarks
null


text:
<TITLE>Review for Postman, The (1997)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Postman, The (1997)

reviewed by
Steve Rhodes

                              THE POSTMAN
                     A film review by Steve Rhodes
                      Copyright 1997 Steve Rhodes

RATING (0 TO ****):  * 1/2

     Kevin Costner's latest post-apocalyptic epic, THE POSTMAN, asks
the rhetorical question: Is a bad, two hour movie made better by
expanding it to three?

     Pretentious with a capital P, Costner's POSTAL WATERWORLD delivers
such cinematic balderdash that it becomes laughably bad at points.
Perhaps with the fat pruned, say an hour and a half or so, the movie
could be viewed as a delightful parody of the genre, but as delivered,
its pomposity makes laughing at it seem somehow inappropriate, sort of
like laughing in church when the priest gets tongue-tied.

     "The last of the great cities died when my father was a child,"
says the Postman's daughter in the opening.  Costner in his futuristic
Western is known only as The Postman.  Set in the year 2013, the
country formerly known as the United States consists of a series of
disconnected and derelict cities.  The government, once way back in
Washington, is no more, and acting as a feudal lord, General Bethlehem
(Will Patton) rules the land, extracting tribute from each hamlet that
his army visits.

     Like a religious order, the army has its commandments and its
rituals.  "Work, and you'll be fed," the general, a copy machine
salesman before the war, lectures his newly captured recruits.  "Fight,
and you'll be respected.  Die, and you'll be remembered."

     A bad Shakespearean actor and a loner, Costner becomes the Postman
after finding a bag of undelivered mail.  He travels from city to city
delivering the mail and making up stories about a non-existent, new
President Richard Starkey (sound familiar?), who now rules from the
Hubert Humphrey Astrodome in Minneapolis.

     With John Bloomfield's costumes making everyone look like
inhabitants of a lost Dickensian novel about the American West, you
feel like you should feel sorry for these people.  With James Newton
Howard's melodramatic music and Stephen F. Windon's sweeping
cinematography, you know you are supposed to.

     Typical of the ridiculous scenes in the movie is one that involves
a Shakespearean contest pitting a conscripted Costner against the
general.  In a world gone mad, the only intellectual left is the
megalomaniacal general, who demolishes our hero in the contest,
performed to the grunts and applause of the general's bloodthirsty
warriors.

     One of the best scenes in the movie -- best in the sense that it
is so preposterous that ridiculing it seems appropriate -- happens at
an outdoor movie.  As the animalistic soldiers get their evening
entertainment, the projectionist dares to run something other than
their favorite, THE SOUND OF MUSIC.  Their reaction is swift and
vicious as they try to stone him to death.

     The movie flouts realism at every turn.  When the Postman and his
companion, Abby (Olivia Williams), get stuck in a snow bound cabin for
the winter to feast on snow and grass, Amy's coiffure stays immaculate.
Somewhere in the cabin, Amy seems to have a hidden blow dryer and a
make-up bag.

     The story's ending, as rival armies of blue and gold take to the
field, combines elements of GETTYSBURG and HIGH NOON.  I won't give
away who wins, but if you can't figure it out, then you may be part of
just the target audience Costner's self-indulgent movie needs.

     If you're looking for a patriotic postal service movie for
Christmas, then this is your picture.  Otherwise, in a season with more
good movies that we've had all year, go see one of the many excellent
ones instead.

     THE POSTMAN runs an incredibly long 3:00.  It is rated PG-13 for
violence, sex, nudity and dope smoking and would be fine for teenagers.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
<?php

namespace Drupal\Core\Field\Plugin\migrate\field\d7;

use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;

/**
 * @MigrateField(
 *   id = "entityreference",
 *   type_map = {
 *     "entityreference" = "entity_reference",
 *   },
 *   core = {7}
 * )
 */
class EntityReference extends FieldPluginBase {}


text:
#ifndef __vtStorIDrive_h__
#define __vtStorIDrive_h__

#include <memory>
#include <vector>

#include "BusType.h"
#include "DriveProperties.h"
#include "IBuffer.h"
#include "ICommandHandler.h"
#include "IDevice.h"

namespace vtStor
{
    class VTSTOR_API IDrive : public IDevice
    {
    public:
        virtual ~IDrive() {}
        virtual void RegisterCommandHandler(U32 CommandType, std::shared_ptr<ICommandHandler> CommandHandler) = 0;
        virtual eErrorCode IssueCommand(U32 CommandType, std::shared_ptr<const IBuffer> CommandDescriptor, std::shared_ptr<IBuffer> Data) = 0;
        virtual eBusType GetBusType() = 0;
        virtual std::shared_ptr<vtStor::sDriveProperties> GetDriveProperties() = 0;
    };

    using Vector_Drives = std::vector<std::shared_ptr<IDrive>>;
}

#endif // end __vtStorIDrive_h__


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.barracuda</groupId>
		<artifactId>barracuda-parent</artifactId>
		<version>${barracuda.version}</version>
	</parent>
	<artifactId>util-bit</artifactId>

	<dependencies>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-buffer</artifactId>
			<version>5.0.0.Alpha2</version>
		</dependency>
	</dependencies>
</project>


text:
require 'spec_helper'

RSpec.describe Timelog do
  subject { build(:timelog) }

  let(:issue) { create(:issue) }
  let(:merge_request) { create(:merge_request) }

  it { is_expected.to belong_to(:issue).touch(true) }
  it { is_expected.to belong_to(:merge_request).touch(true) }

  it { is_expected.to be_valid }

  it { is_expected.to validate_presence_of(:time_spent) }
  it { is_expected.to validate_presence_of(:user) }

  describe 'Issuable validation' do
    it 'is invalid if issue_id and merge_request_id are missing' do
      subject.attributes = { issue: nil, merge_request: nil }

      expect(subject).to be_invalid
    end

    it 'is invalid if issue_id and merge_request_id are set' do
      subject.attributes = { issue: issue, merge_request: merge_request }

      expect(subject).to be_invalid
    end

    it 'is valid if only issue_id is set' do
      subject.attributes = { issue: issue, merge_request: nil }

      expect(subject).to be_valid
    end

    it 'is valid if only merge_request_id is set' do
      subject.attributes = { merge_request: merge_request, issue: nil }

      expect(subject).to be_valid
    end
  end
end


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <name>Jasig CAS Token-based Authentication Extension</name>
  <groupId>edu.usf.cims</groupId>
  <artifactId>cas-server-extension-token</artifactId>
  <version>0.6.0</version>
  <packaging>jar</packaging>
  <modelVersion>4.0.0</modelVersion>
  <inceptionYear>2012</inceptionYear>

  <licenses>
    <license>
      <name>Apache License v2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:epierce/cas-server-extension-token.git</connection>
    <developerConnection>scm:git:git@github.com:epierce/cas-server-extension-token.git</developerConnection>
    <url>https://github.com/epierce/cas-server-extension-token</url>
    <tag>master</tag>
  </scm>

  <issueManagement>
    <url>https://github.com/epierce/cas-server-extension-token/issues</url>
    <system>Github</system>
  </issueManagement>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <developers>
    <developer>
      <id>epierce</id>
      <name>Eric Pierce</name>
      <email>epierce@usf.edu</email>
      <organization>University of South Florida</organization>
      <organizationUrl>http://www.usf.edu</organizationUrl>
      <roles>
          <role>Developer</role>
      </roles>
    </developer>

    <developer>
      <id>jsumners</id>
      <name>James Sumners</name>
      <email>jamessumners@mail.clayton.edu</email>
      <organization>Clayton State University</organization>
      <organizationUrl>http://www.clayton.edu/</organizationUrl>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
  </developers>

  <properties>
    <cas.version>3.5.2</cas.version>
    <json.version>20090211</json.version>
    <servlet.version>2.5</servlet.version>
    <junit.version>4.11</junit.version>
    <logback.version>1.0.13</logback.version>
    <slf4j.version>1.7.5</slf4j.version>
    <commons-cli.version>1.2</commons-cli.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.jasig.cas</groupId>
      <artifactId>cas-server-core</artifactId>
      <version>${cas.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>${json.version}</version>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${servlet.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>

    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>${commons-cli.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>


text:
<?php
ob_start();
require("../../lib/database.php");
require("../../lib/validator.php");
require("../lib/page.php");

page::header();
$fecha=date('Y-m-d H:i:s');
if(empty($_GET['id']))
{
    $id=null;
    $nombre=null;
    $tipo=null;
    $archivo=null;
    $precio=null;
    $descripcion=null;
}
else
{
    $id = base64_decode($_GET['id']);
    $sql = "SELECT * FROM jugos WHERE id_jugo = ?";
    $params = array($id);
    $data = Database::getRow($sql, $params);
    $nombre = htmlentities($data['nombre']);
    $tipo =  htmlentities($data['id_tipojugo']);
    $archivo=$data['imagen'];
    $precio= htmlentities($data['precio']);
    $descripcion= htmlentities($data['descripcion']);
}

if(!empty($_POST))
{
     $_POST = Validator::validateForm($_POST);
     $nombre= htmlentities($_POST['nombre']);
     $tipo= htmlentities($_POST['tipo']);
     $archivo=$_FILES['imagen'];
     $precio= htmlentities($_POST['precio']);
     $descripcion= htmlentities($_POST['descripcion']);

    try
    {
        if($nombre == null || $tipo == null || $precio == null)
        {
            throw new Exception("Datos incompletos");
        }
        elseif($precio < 1)
        {
            throw new Exception("El precio debe ser mayor a 1");
        }
        elseif( $archivo['name'] != null)
        {
            $base64 = Validator::validateImage($archivo);
            if($base64 != false)
            {
                $imagen = $base64;
            }
            else
            {
                throw new Exception("La imagen seleccionada no es valida.");
            }
        }

        if($id==null)
        {
            if(isset($imagen) != null)
            {
            $sql = "INSERT INTO jugos (nombre, id_tipojugo,precio,imagen,descripcion) VALUES(?,?,?,?,?)";
            $params = array($nombre, $tipo,$precio,$imagen,$descripcion);
                Database::executeRow($sql, $params);
                $sql2 = "INSERT INTO `historial` (`fecha`, `accion`, `id_admin`) VALUES(?, ?,?)";
        $params2=array($fecha,"Inserto el jugo $nombre",$_SESSION['id_admin']);
        Database::executeRow($sql2, $params2);
                @header("location: index.php");
            }
            else
            {
                throw new Exception("Selecccione una imagen.");
            }
        }
        else
        {
            if(isset($imagen) != null)
            {
                $sql = "update jugos set nombre=?, id_tipojugo=?,precio=?,imagen=?,descripcion=? where id_jugo=?";
                $params = array($nombre, $tipo,$precio,$imagen,$descripcion,$id);
                Database::executeRow($sql, $params);
                 $sql2 = "INSERT INTO `historial` (`fecha`, `accion`, `id_admin`) VALUES(?, ?,?)";
        $params2=array($fecha,"Modifico el jugo $nombre",$_SESSION['id_admin']);
        Database::executeRow($sql2, $params2);
                @header("location: index.php");
            }
            else
            {
                $sql = "update jugos set nombre=?, id_tipojugo=?,precio=?,descripcion=? where id_jugo=?";
                $params = array($nombre, $tipo,$precio,$descripcion,$id);
                Database::executeRow($sql, $params);
                 $sql2 = "INSERT INTO `historial` (`fecha`, `accion`, `id_admin`) VALUES(?, ?,?)";
        $params2=array($fecha,"Modifico el jugo $nombre",$_SESSION['id_admin']);
        Database::executeRow($sql2, $params2);
                @header("location: index.php");
            }
        }

    }
    catch (Exception $error)
    {
        print("

error".$error->getMessage()."
");
    }
}
?>

        <form class="form-labels-on-top" autocomplete="off" enctype='multipart/form-data' onkeyup="calcLong('nombre', 'label', this,30)" onkeydown="calcLong('descripcion', 'label', this,40)" name="nada" method="post" onsubmit="return Valida(this);">

Jugos

                    Titulo:
                    <input type="text" name="nombre" required value="<?php print($nombre);?>">

                    Descripcion
                    <textarea name="descripcion" cols="35" rows="6"><?php print($descripcion); ?></textarea>

                Tipo de jugo
                <?php
                    $sql = "SELECT id_tipojugo,nombre FROM tipo_jugo";
                    Page::setCombo("tipo", $tipo, $sql);
                ?>

               Seleccione la imagen
                <input type="file" name="imagen" onchange="comprueba_extension(this.form, this.form.imagen.value)">

                    Amount (in dollars)

$

                      <input type="number" name="precio" max="999" min='0' class="form-control" value="<?php print($precio);?>" placeholder="Precio">

.00

                <button type="submit">Guardar</button>
                <button type="button">Cancelar</button>

        </form>

    <?php page::footer();?>


text:
				รายการเอกสาร

					by itoffside.com

					<a href="<?php echo base_url(); ?>">

						หน้าแรก

					เอกสาร

						<?php echo $result->topic; ?>

					<form role="form" action="">

									<a class="btn btn-app" href="<?php echo base_url('uploads/' . $result->filename); ?>" target="_blank">
                   					  Download File

									หมวดหมู่

								<input type="text" id="document_code" class="form-control" name="document_code" value="<?php echo $result->name; ?>" readonly="">

									รหัสเอกสาร

								<input type="text" id="document_code" class="form-control" name="document_code" value="<?php echo $result->document_code; ?>" readonly="">

									ชื่อเอกสาร

								<input type="text" id="topic" class="form-control" name="topic" value="<?php echo $result->topic; ?>" readonly="">

									วันที่ลงทะเบียนเอกสาร

									<input type="text" class="form-control pull-right" id="register_date" name="register_date" readonly="" data-date-format="yyyy-mm-dd" value="<?php echo date('d/m/Y',strtotime($result->register_date)); ?>">

									อ้างอิงเอกสาร

								<input type="text" id="reference" class="form-control" name="reference" value="<?php echo $result->reference; ?>" readonly="">

									สถานที่จัดเก็บเอกสาร

								<input type="text" id="store" class="form-control" name="store" value="<?php echo $result->store; ?>" readonly="">

									รายละเอียด

								<textarea rows="3" class="form-control" id="description" name="description" readonly=""><?php echo $result->description; ?></textarea>

							<a class="btn btn-danger" href="<?php echo base_url('document/listview'); ?>" role="button">

								ย้อนกลับ

					</form>


text:
export default class EventHandler {
  constructor(game) {
    this.mount(game);
  }

  mount(game) {
    window.addEventListener('keydown', this.handleKeys.bind(this, game));
    window.addEventListener('resize',  this.handleResize.bind(this, game));
    window.addEventListener('click',  this.handleClick.bind(this, game));
    window.addEventListener('touchstart',  this.handleTouch.bind(this, game));
    window.addEventListener('orientationchange', this.handleOrientationChange.bind(this, game));
    window.addEventListener('orientationchange', this.handleResize.bind(this, game));
  }

  handleOrientationChange(game, e) {
    if(game.state.paused && !game.state.currentScore){
      game.setState({
        paused: false,
        landscape: game.landscape()
      })
      game.startGame();
      requestAnimationFrame(() => {game.updateGame();})
    } else if (!game.state.paused) {
      document.querySelector('canvas').style.display="none"
      document.getElementsByClassName('colorBoxes')[0].style.display="none"
      game.pauseGame();
    } else if (game.state.paused) {
      document.querySelector('canvas').style.display=""
      document.getElementsByClassName('colorBoxes')[0].style.display=""
      game.pauseGame();
    }
  }

  handleKeys(game, e) {
    if(game.state.inGame){
      game.state.partySquare[0].respondToUser(e.keyCode, game.state);
    }

    if(game.state.inGame && e.keyCode === 32){
      game.pauseGame();
    }

    if(e.keyCode === 13 && !game.state.inGame && !game.state.newTopScore){
      game.startGame();
    }
  }

  handleClick(game, e) {
    if(e.toElement.className === "startgame") {
      game.startGame();
    } else if (e.toElement.className === "playagain") {
      document.getElementById("nameForm").submit()
    }
  }

  handleTouch(game, e) {
    if(game.state.inGame){
      e.preventDefault();
      let touchPoints = e.changedTouches;
      let y = touchPoints[touchPoints.length - 1].pageY

      if(touchPoints[touchPoints.length - 1].pageX < game.state.screen.height / 4){
        game.state.partySquare[0].respondToTouch('color', game.state, y);
      } else if (touchPoints[touchPoints.length - 1].pageX > game.state.screen.height / 4) {
        game.state.partySquare[0].respondToTouch('jetPack', game.state);
      }
    }
  }

  handleResize(game) {
    game.setState({
      screen: {
        width: window.innerWidth,
        height: window.innerHeight,
        ratio: window.devicePixelRatio || 1
      }
    });
  }
}


text:
require 'active_support'
require 'active_support/core_ext/class'
require 'logger'

module Ferryman
  module Server
    class Base
      class_attribute :logger
      self.logger = Logger.new(STDOUT)

      def initialize(redis, *channels)
        @handler = Handler.new
        @redis = redis
        @response_redis = redis.dup
        @channels = channels
      end

      private

      def primary_channel
        @channels.first
      end

      def process(message, obj)
        response = @handler.handle(message, obj)
        logger.info "[Ferryman::Server] response #{response.to_json}"
        respond(response)
      end

      def respond(response)
        if response.id
          @response_redis.multi do
            @response_redis.rpush(response.id, response.to_json)
            @response_redis.expire(response.id, 60)
          end
        end
      end
    end
  end
end


text:
package com.wenjackp.android.lib.entitys;

import android.view.View;

/**
 * Created by Single on 15-8-9.
 */
public class ViewHolder {

    public View itemView;

    public int currentPosition;
}


text:
package io.github.josehsantos.hack.lang.psi;

import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;

public interface HackXhpAttributeStatement extends HackStatement {

  @NotNull
  List<HackXhpAttributeDeclaration> getXhpAttributeDeclarationList();

}


text:
"""
Tests for trailing commas (ES3) errors

"""

import gflags as flags
import unittest as googletest

from closure_linter import errors
from closure_linter import runner
from closure_linter.common import erroraccumulator

flags.FLAGS.check_trailing_comma = True
class TrailingCommaTest(googletest.TestCase):
  """Test case to for gjslint errorrules."""

  def testGetTrailingCommaArray(self):
    """ warning for trailing commas before closing array
    """
    original = ['q = [1,]', ]

    # Expect line too long.
    expected = errors.COMMA_AT_END_OF_LITERAL

    self._AssertInError(original, expected)

  def testGetTrailingCommaDict(self):
    """ warning for trailing commas before closing array
    """
    original = ['q = {1:1,}', ]

    # Expect line too long.
    expected = errors.COMMA_AT_END_OF_LITERAL

    self._AssertInError(original, expected)

  def _AssertInError(self, original, expected):
    """Asserts that the error fixer corrects original to expected."""

    # Trap gjslint's output parse it to get messages added.
    error_accumulator = erroraccumulator.ErrorAccumulator()
    runner.Run('testing.js', error_accumulator, source=original)
    error_nums = [e.code for e in error_accumulator.GetErrors()]

    self.assertIn(expected, error_nums)

if __name__ == '__main__':
  googletest.main()


text:
using System;
using CG.Web.MegaApiClient;
using IgorSoft.PowerShellCloudProvider.Interface.IO;

namespace IgorSoft.PowerShellCloudProvider.Gateways.Mega
{
    internal static class FileSystemExtensions
    {
        public static FileSystemInfoContract ToFileSystemInfoContract(this INode item) => item.Type == NodeType.Directory
                ? new DirectoryInfoContract(item.Id, item.Name, DateTimeOffset.MinValue, item.LastModificationDate) as FileSystemInfoContract
                : new FileInfoContract(item.Id, item.Name, DateTimeOffset.MinValue, item.LastModificationDate, item.Size, null) as FileSystemInfoContract;
    }
}


text:
package org.wikipathways.bots.utils;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.imageio.ImageIO;

import org.apache.axis.encoding.Base64;
import org.bridgedb.DataSource;
import org.bridgedb.IDMapperException;
import org.bridgedb.IDMapperStack;
import org.bridgedb.Xref;
import org.bridgedb.bio.Organism;
import org.bridgedb.rdb.GdbProvider;
import org.jdom.DocType;
import org.jdom.Document;
import org.jdom.Element;
import org.pathvisio.core.biopax.BiopaxNode;
import org.pathvisio.core.biopax.PublicationXref;
import org.pathvisio.core.model.ConverterException;
import org.pathvisio.core.model.ObjectType;
import org.pathvisio.core.model.Pathway;
import org.pathvisio.core.model.PathwayElement;
import org.pathvisio.core.model.PathwayElement.Comment;
import org.pathvisio.core.view.VPathway;
import org.pathvisio.wikipathways.webservice.WSCurationTag;
import org.pathvisio.wikipathways.webservice.WSPathwayInfo;
import org.wikipathways.client.WikiPathwaysCache;
import org.wikipathways.client.WikiPathwaysClient;

public class GenerateRSSM {

	private String sourceUrl;
	private GdbProvider idmp;

	private DataSource GENE_DS = DataSource.getBySystemCode("L");
	private DataSource MET_DS = DataSource.getBySystemCode("Cpc");

	public static final String COMMENT_DESCRIPTION = "WikiPathways-description";
	public static final String COMMENT_CATEGORY = "WikiPathways-category";

	private int imgSize = 400;

	private String[] includeTags = new String[] {
		"Curation:FeaturedPathway",
		"Curation:AnalysisCollection",
	};

	WikiPathwaysCache cache;
	WikiPathwaysClient client;

	Map<String, String> org2taxid = new HashMap<String, String>();

	public GenerateRSSM(WikiPathwaysCache cache, WikiPathwaysClient client, GdbProvider idmp) throws IOException {
		this.cache = cache;
		this.idmp = idmp;
		this.client = client;
		initTaxids();
	}

	private void initTaxids() throws IOException {
		Pattern p = Pattern.compile("<Id>([0-9]+)<\\/Id>");
		String base = "http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=taxonomy&term=";
		for(String org : client.listOrganisms()) {
			URL url = new URL(base + URLEncoder.encode(org, "UTF-8"));
			BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
			String tax = null;
			String line;
			while ((line = in.readLine()) != null) {
				Matcher m = p.matcher(line);
				if(m.find()) {
					tax = m.group(1);
					break;
				}
			}
			in.close();

			if(tax != null) org2taxid.put(org, tax);
		}
	}

	public void setIncludeTags(String[] includeTags) {
		this.includeTags = includeTags;
	}

//	public void setExcludeTags(String[] excludeTags) {
//		this.excludeTags = excludeTags;
//	}

	public void setSourceUrl(String sourceUrl) {
		this.sourceUrl = sourceUrl;
	}

	public Document createRSSM(Collection<File> pathwayFiles) throws FileNotFoundException, IOException, ConverterException, IDMapperException {
		Document doc = new Document();

		DocType doctype = new DocType("biosystems", "rssm.dtd");
		doc.setDocType(doctype);

		Element root = new Element("biosystems");
		doc.setRootElement(root);

		addGeneralSection(root);

		System.out.println("Getting list of pathways to filter out based on curation tag");
//		Set<String> excludeIds = new HashSet<String>();
//		for(String tag : excludeTags) {
//			for(WSCurationTag t : client.getCurationTagsByName(tag)) {
//				excludeIds.add(t.getPathway().getId());
//			}
//		}
//		log.info("Filtering out " + excludeIds.size() + " pathways based on tag.");
		Set<String> includeIds = new HashSet<String>();
		for(String tag : includeTags) {
			for(WSCurationTag t : client.getCurationTagsByName(tag)) {
				includeIds.add(t.getPathway().getId());
			}
		}
//		log.info("Including " + excludeIds.size() + " pathways based on tag.");

		int i = 0;
		for(File f : pathwayFiles) {
			if(i % 10 == 0) System.out.println("Processing pathway " + ++i + " out of " + pathwayFiles.size());

			WSPathwayInfo info = cache.getPathwayInfo(f);
//			if(excludeTags.length > 0 && excludeIds.contains(info.getId())) {
//				log.info("Skipping " + info.getId() + ", filtered out by curation tag");
//				continue;
//			}
			if(includeTags.length > 0 && !includeIds.contains(info.getId())) {
				System.out.println("Skipping " + info.getId() + ", filtered out because doesn't have one of the curation tags to include.");
				continue;
			}
			addPathway(root, f, info);
		}

		return doc;
	}

	private void addPathway(Element root, File f, WSPathwayInfo info) throws ConverterException, IOException, IDMapperException {
		Pathway p = new Pathway();
		p.readFromXml(f, false);

		Element biosystem = new Element("biosystem");
		root.addContent(biosystem);

		Element extid = new Element("externalid");
		extid.setText(info.getId());
		biosystem.addContent(extid);
		Element name = new Element("name");
		name.setText(info.getName());
		biosystem.addContent(name);
		Element systype = new Element("biosystemtype");
		biosystem.addContent(systype);
		Element orgtype = new Element("organism_specific_biosystem");
		systype.addContent(orgtype);

		String descr = null;
		for(Comment c : p.getMappInfo().getComments()) {
			if(COMMENT_DESCRIPTION.equals(c.getSource())) {
				if(!"".equals(c.getComment())) descr = c.getComment();
			}
		}
		if(descr != null) {
			Element description = new Element("description");
			description.setText(descr);
			biosystem.addContent(description);
		}

		addThumb(biosystem, p);

		Element url = new Element("url");
		url.setText(info.getUrl());
		biosystem.addContent(url);

		String taxid = org2taxid.get(info.getSpecies());
		if(taxid != null) {
			Element taxonomy = new Element("taxonomy");
			biosystem.addContent(taxonomy);
			Element taxnode = new Element("taxnode");
			taxonomy.addContent(taxnode);
			Element tid = new Element("taxid");
			tid.setText(taxid);
			taxnode.addContent(tid);
			Element taxonomyname = new Element("taxonomyname");
			taxonomyname.setText(info.getSpecies());
			taxnode.addContent(taxonomyname);
		}

		addGenes(biosystem, p);
		addMetabolites(biosystem, p);
		addCitations(biosystem, p);
		addLinkedSystems(biosystem, p);
	}

	private void addCitations(Element biosystem, Pathway p) {
		Set<PublicationXref> refs = new HashSet<PublicationXref>();
		for(BiopaxNode bpe : p.getBiopax().getElements()) {
			if(bpe instanceof PublicationXref) {
				refs.add((PublicationXref)bpe);
			}
		}
		if(refs.size() == 0) return;

		Element citations = new Element("citations");
		biosystem.addContent(citations);

		for(PublicationXref x : refs) {
			Element citation = new Element("citation");
			citations.addContent(citation);
			if(!"".equals(x.getPubmedId()) && x.getPubmedId() != null && x.getPubmedId().matches("^[1-9]{1}[0-9]*$")) {
				Element pmid = new Element("pmid");
				pmid.setText(x.getPubmedId());
				citation.addContent(pmid);
			} else {
				Element cit = new Element("textcitation");
				String txt = "";
				if(!"".equals(x.getAuthorString())) txt += x.getAuthorString() + ", ";
				if(!"".equals(x.getTitle())) txt += x.getTitle() + ". ";
				if(!"".equals(x.getSource())) txt += x.getSource() + " ";
				if(!"".equals(x.getYear())) txt += "(" + x.getYear() + ")";

				cit.setText(txt);
				citation.addContent(cit);
			}
		}
	}

	private void addLinkedSystems(Element biosystem, Pathway p) {
		Set<Xref> linkIds = new HashSet<Xref>();
		for(Xref x : p.getDataNodeXrefs()) {
			if(DataSource.getBySystemCode("Wp").equals(x.getDataSource())) {
				linkIds.add(x);
			}
		}

		if(linkIds.size() == 0) return;

		Element linkedsystems = new Element("linkedsystems");
		biosystem.addContent(linkedsystems);
		for(Xref x : linkIds) {
			Element ls = new Element("linkedsystem");
			linkedsystems.addContent(ls);
			Element extid = new Element("externalid");
			extid.setText(x.getId());
			ls.addContent(extid);
			Element type = new Element("linkedsystemtype");
			type.addContent(new Element("linked"));
			ls.addContent(type);
		}
	}

	private void addMetabolites(Element biosystem, Pathway p) throws IDMapperException {
		Map<Xref, PathwayElement> xrefs = gatherXrefs(p, MET_DS);
		if(xrefs.size() == 0) return;

		Element sms = new Element("smallmolecules");
		biosystem.addContent(sms);

		for(Xref x : xrefs.keySet()) {
			PathwayElement pwe = xrefs.get(x);
			Element sm = new Element("smallmolecule");
			sms.addContent(sm);
			Element extid = new Element("externalid");
			extid.setText(pwe.getXref() + "");
			sm.addContent(extid);
			Element name = new Element("name");
			name.setText(pwe.getTextLabel());
			sm.addContent(name);
			Element cid = new Element("cid");
			cid.setText(x.getId());
			sm.addContent(cid);
		}
	}

	private void addGenes(Element biosystem, Pathway p) throws IDMapperException {
		Map<Xref, PathwayElement> xrefs = gatherXrefs(p, GENE_DS);
		if(xrefs.size() == 0) return;

		Element genes = new Element("genes");
		biosystem.addContent(genes);

		for(Xref x : xrefs.keySet()) {
			PathwayElement pwe = xrefs.get(x);
			Element gene = new Element("gene");
			genes.addContent(gene);
			Element extid = new Element("externalid");
			extid.setText(pwe.getXref() + "");
			gene.addContent(extid);
			Element name = new Element("name");
			name.setText(pwe.getTextLabel());
			gene.addContent(name);
			Element entity = new Element("entity");
			gene.addContent(entity);
			Element geneid = new Element("geneid");
			geneid.setText(x.getId());
			entity.addContent(geneid);
		}
	}

	private Map<Xref, PathwayElement> gatherXrefs(Pathway p, DataSource ds) throws IDMapperException {
		Map<Xref, PathwayElement> xrefs = new HashMap<Xref, PathwayElement>();

		IDMapperStack stack = idmp.getStack(Organism.fromLatinName(p.getMappInfo().getOrganism()));

		for(PathwayElement pwe : p.getDataObjects()) {
			if(pwe.getObjectType() == ObjectType.DATANODE) {
				Xref x = pwe.getXref();
				if(x == null || x.getId() == null || "".equals(x.getId()) || x.getId().matches("^\\s+$")|| x.getDataSource() == null) continue;
				if(
						(MET_DS.equals(x.getDataSource()) || GENE_DS.equals(x.getDataSource()))
						&& !x.getId().matches("^[1-9]{1}[0-9]*$")) continue; //Also check for sanity of Entrez identifiers
				for(Xref xx : stack.mapID(x, ds)) xrefs.put(xx, pwe);
				if(ds.equals(x.getDataSource())) xrefs.put(x, pwe);
			}
		}
		return xrefs;
	}

	private void addThumb(Element biosystem, Pathway p) throws IOException {
		VPathway vPathway = new VPathway(null);
		vPathway.fromModel(p);

		double vh = vPathway.getVHeight();
		double vw = vPathway.getVWidth();
		double zoom = 100;
		if(vh >= vw) zoom = (double)imgSize / vPathway.getVHeight();
		if(vw > vh) zoom = (double)imgSize / vPathway.getVWidth();
		vPathway.setPctZoom(zoom * 100);
		BufferedImage imgThumb = new BufferedImage(vPathway.getVWidth(), vPathway.getVHeight(), BufferedImage.TYPE_INT_RGB);
		Graphics2D g = imgThumb.createGraphics();
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
		vPathway.draw(g);
		g.dispose();

		ByteArrayOutputStream o = new ByteArrayOutputStream();
		ImageIO.write(imgThumb, "png", o);
		o.flush();
		byte[] thumbByte = o.toByteArray();
		o.close();

		String base64 = Base64.encode(thumbByte);
		Element thumb = new Element("thumbnail");
		biosystem.addContent(thumb);
		Element image = new Element("image");
		thumb.addContent(image);
		Element type = new Element("type");
		type.addContent(new Element("png"));
		image.addContent(type);
		Element enc = new Element("encodedimage");
		enc.setText(base64);
		image.addContent(enc);
	}

	private void addGeneralSection(Element root) {
		Element source = new Element("source");
		source.setText("WikiPathways");
		root.addContent(source);

		Element feedbackurl = new Element("feedbackurl");
		feedbackurl.setText(sourceUrl + "/index.php/Contact_Us");
		root.addContent(feedbackurl);

		Element sourceurl = new Element("sourceurl");
		sourceurl.setText(sourceUrl);
		root.addContent(sourceurl);

		Element citations = new Element("citations");
		root.addContent(citations);
		Element citation = new Element("citation");
		citations.addContent(citation);
		Element pmid = new Element("pmid");
		pmid.setText("18651794");
		citation.addContent(pmid);
		citation = new Element("citation");
		citations.addContent(citation);
		Element textcitation = new Element("textcitation");
		textcitation.setText("Pico AR, Kelder T, van Iersel MP, Hanspers K, Conklin BR, and C.T.A. Evelo (2008) WikiPathways: Pathway Editing for the People. PLoS Biol 6(7): e184. doi:10.1371/journal.pbio.0060184");
		citation.addContent(textcitation);
	}
}


text:
using System;
using System.ComponentModel;

namespace Azure.Analytics.Synapse.Spark.Models
{
    /// <summary> The SparkStatementLanguageType. </summary>
    public readonly partial struct SparkStatementLanguageType : IEquatable<SparkStatementLanguageType>
    {
        private readonly string _value;

        /// <summary> Determines if two <see cref="SparkStatementLanguageType"/> values are the same. </summary>
        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
        public SparkStatementLanguageType(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string SparkValue = "spark";
        private const string PysparkValue = "pyspark";
        private const string DotnetsparkValue = "dotnetspark";
        private const string SqlValue = "sql";

        /// <summary> spark. </summary>
        public static SparkStatementLanguageType Spark { get; } = new SparkStatementLanguageType(SparkValue);
        /// <summary> pyspark. </summary>
        public static SparkStatementLanguageType Pyspark { get; } = new SparkStatementLanguageType(PysparkValue);
        /// <summary> dotnetspark. </summary>
        public static SparkStatementLanguageType Dotnetspark { get; } = new SparkStatementLanguageType(DotnetsparkValue);
        /// <summary> sql. </summary>
        public static SparkStatementLanguageType Sql { get; } = new SparkStatementLanguageType(SqlValue);
        /// <summary> Determines if two <see cref="SparkStatementLanguageType"/> values are the same. </summary>
        public static bool operator ==(SparkStatementLanguageType left, SparkStatementLanguageType right) => left.Equals(right);
        /// <summary> Determines if two <see cref="SparkStatementLanguageType"/> values are not the same. </summary>
        public static bool operator !=(SparkStatementLanguageType left, SparkStatementLanguageType right) => !left.Equals(right);
        /// <summary> Converts a string to a <see cref="SparkStatementLanguageType"/>. </summary>
        public static implicit operator SparkStatementLanguageType(string value) => new SparkStatementLanguageType(value);

        /// <inheritdoc />
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is SparkStatementLanguageType other && Equals(other);
        /// <inheritdoc />
        public bool Equals(SparkStatementLanguageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        /// <inheritdoc />
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
        /// <inheritdoc />
        public override string ToString() => _value;
    }
}


text:
module Intrigue
module Entity
class AsNumber < Base

  def metadata
    {
      :type => "AsNumber",
      :required_attributes => ["name"]
    }
  end

  def validate(attributes)
    attributes["name"] =~ /^.*$/
  end

end
end
end


text:
using AutoMapper;
using BudgetAttempt.Data.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BudgetAttempt.Finance.Models;

namespace BudgetAttempt.Finance.Repositories
{
    public class PersonRepository : Interfaces.IPersonRepository
    {
        readonly IBudgetStorage _BudgetStorage;

        public PersonRepository(IBudgetStorage budgetStorage)
        {
            if (budgetStorage == null)
                throw new ArgumentNullException("budgetStorage");
            this._BudgetStorage = budgetStorage;
        }

        public Models.Person Create(Models.Person person)
        {
            var p = _BudgetStorage.CreatePerson(Mapper.Map<Data.Models.Person>(person));
            return Mapper.Map<Models.Person>(p);
        }

        public IEnumerable<Person> FetchAll()
        {
            var data = _BudgetStorage.FetchPersons();
            return Mapper.Map<IEnumerable<Person>>(data);
        }

        public Models.Person FetchOne(int Id)
        {
            var p = _BudgetStorage.FetchPerson(Id);
            if(p!=null)
            {
                return Mapper.Map<Models.Person>(p);
            }
            return null;
        }

        public Models.Person Update(Models.Person person)
        {
            var p = _BudgetStorage.UpdatePerson(Mapper.Map<Data.Models.Person>(person));
            return Mapper.Map<Models.Person>(p);
        }
    }
}


text:
/* globals $ */

function getData(url, headers) {
    return $.ajax({
        method: 'GET',
        dataType: 'JSON',
        url: url,
        headers: headers,
    });
}

function postData(url, data, headers) {
    return $.ajax({
        method: 'POST',
        dataType: 'JSON',
        url: url,
        headers: headers,
        data: data,
    });
}


text:
/* eslint-disable react/jsx-one-expression-per-line, max-len */
import React from 'react';
import {useHistory} from 'react-router-dom';
import {FullProjectMonthModel} from '../models/FullProjectMonthModel';
import {t} from '../../utils';
import {Modal} from '../../controls/Modal';
import {ProjectClientTariff} from '../models/getProjectFeature';
import {ProjectDuration} from './ProjectDuration';
import {ProjectMonthLink} from './ProjectMonthLink';
import {NotesModalButton} from '../../controls/form-controls/button/NotesModalButton';
import {Claim} from '../../users/models/UserModel';

import './ProjectMonthModal.scss';

type ProjectMonthModalProps = {
  onClose: () => void;
  projectMonth: FullProjectMonthModel;
}

export const ProjectMonthModal = ({onClose, projectMonth}: ProjectMonthModalProps) => {
  const history = useHistory();
  return (
    <Modal
      show
      onClose={onClose}
      title={(
        <>
          {t(`consultant.types.${projectMonth.consultant.type}`)}:
          {projectMonth.consultant.firstName} {projectMonth.consultant.name}
        </>
      )}
      onConfirm={() => history.push(`/projects/${projectMonth.project._id}`)}
      confirmText={t('projectMonth.linkToDetails')}
      extraButtons={
        <>
          <ProjectMonthLink to={projectMonth.details} className="btn btn-success" />
          <NotesModalButton
            onChange={() => {}}
            disabled={true}
            value={projectMonth.project.notes}
            claim={Claim.ManageProjects}
            title={t('project.project') + ': ' + t('notes')}
            variant="success"
          />
        </>
      }
    >

        <ProjectDuration project={projectMonth.project} />

          {projectMonth.client.name}
          <ProjectClientTariff projectClient={projectMonth.project.client} />
          {projectMonth.project.partner && projectMonth.partner && (

              {t('project.partner.clientId')}:
              {projectMonth.partner.name}
              <ProjectClientTariff projectClient={projectMonth.project.partner} />

          )}

    </Modal>
  );
};


text:
/**
 * @module
 * @description
 * Entry point for all public APIs of the language service package.
 */
import {Version} from '@angular/core';
import * as ts from 'typescript';

import {LanguageServicePlugin} from './src/ts_plugin';

/**
 * @stable
 */
export const VERSION = new Version('0.0.0-PLACEHOLDER');
export {createLanguageService} from './src/language_service';
export {Completion, Completions, Declaration, Declarations, Definition, Diagnostic, Diagnostics, Hover, HoverTextSection, LanguageService, LanguageServiceHost, Location, Span, TemplateSource, TemplateSources} from './src/types';
export {TypeScriptServiceHost, createLanguageServiceFromTypescript} from './src/typescript_host';

export default LanguageServicePlugin;


text:
//
//  Created by Jesse Squires
//  http://www.jessesquires.com
//
//
//  Documentation
//  http://cocoadocs.org/docsets/JSQMessagesViewController
//
//
//  GitHub
//  https://github.com/jessesquires/JSQMessagesViewController
//
//
//  License
//  Copyright (c) 2014 Jesse Squires
//  Released under an MIT license: http://opensource.org/licenses/MIT
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "JSQMessagesBubbleImage.h"

/**
 *  `JSQMessagesBubbleImageFactory` is a factory that provides a means for creating and styling
 *  `JSQMessagesBubbleImage` objects to be displayed in a `JSQMessagesCollectionViewCell` of a `JSQMessagesCollectionView`.
 */
@interface JSQMessagesBubbleImageFactory : NSObject

/**
 *  Creates and returns a new instance of `JSQMessagesBubbleImageFactory` that uses the
 *  default bubble image assets and cap insets.
 *
 *  @return An initialized `JSQMessagesBubbleImageFactory` object if created successfully, `nil` otherwise.
 */
- (instancetype)init;

/**
 *  Creates and returns a new instance of `JSQMessagesBubbleImageFactory` having the specified
 *  bubbleImage and capInsets. These values are used internally in the factory to produce
 *  `JSQMessagesBubbleImage` objects.
 *
 *  @param bubbleImage A template bubble image from which all images will be generated.
 *  The image should represent the *outgoing* message bubble image, which will be flipped
 *  horizontally for generating the corresponding *incoming* message bubble images. This value must not be `nil`.
 *
 *  @param capInsets   The values to use for the cap insets that define the unstretchable regions of the image.
 *  Specify `UIEdgeInsetsZero` to have the factory create insets that allow the image to stretch from its center point.
 *
 *  @return An initialized `JSQMessagesBubbleImageFactory` object if created successfully, `nil` otherwise.
 */
- (instancetype)initWithBubbleImage:(UIImage *)bubbleImage capInsets:(UIEdgeInsets)capInsets;

/**
 *  Creates and returns a `JSQMessagesBubbleImage` object with the specified color for *outgoing* message image bubbles.
 *  The `messageBubbleImage` property of the `JSQMessagesBubbleImage` is configured with a flat bubble image, masked to the given color.
 *  The `messageBubbleHighlightedImage` property is configured similarly, but with a darkened version of the given color.
 *
 *  @param color The color of the bubble image in the image view. This value must not be `nil`.
 *
 *  @return An initialized `JSQMessagesBubbleImage` object if created successfully, `nil` otherwise.
 */
- (JSQMessagesBubbleImage *)outgoingMessagesBubbleImageWithColor:(UIColor *)color;

/**
 *  Creates and returns a `JSQMessagesBubbleImage` object with the specified color for *incoming* message image bubbles.
 *  The `messageBubbleImage` property of the `JSQMessagesBubbleImage` is configured with a flat bubble image, masked to the given color.
 *  The `messageBubbleHighlightedImage` property is configured similarly, but with a darkened version of the given color.
 *
 *  @param color The color of the bubble image in the image view. This value must not be `nil`.
 *
 *  @return An initialized `JSQMessagesBubbleImage` object if created successfully, `nil` otherwise.
 */
- (JSQMessagesBubbleImage *)incomingMessagesBubbleImageWithColor:(UIColor *)color;

@end


text:
// Type definitions for react-spinkit 3.0.0
// Project: https://github.com/KyleAMathews/react-spinkit
// Definitions by: Qubo <https://github.com/tkqubo>, Mleko <https://github.com/mleko>, Tom Crockett <https://github.com/pelotom>, zzanol <https://github.com/zzanol>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6

/// <reference types="react" />

declare namespace spinner {
	export interface SpinnerProps {
        /**
         * Specify spinner to use.
         */
        name?: 'three-bounce' | 'double-bounce' | 'rotating-plane' | 'folding-cube' | 'wave' | 'wandering-cubes' | 'pulse' | 'chasing-dots' | 'circle' | 'cube-grid' | 'wordpress' |
               'ball-grid-beat' | 'ball-grid-pulse' | 'line-spin-fade-loader' | 'ball-spin-fade-loader' | 'ball-pulse-rise' | 'line-scale' | 'line-scale-pulse-out' |
               'line-scale-pulse-out-rapid' | 'line-scale-party' | 'ball-triangle-path' | 'ball-scale-ripple-multiple' | 'ball-pulse-sync' | 'ball-beat' |
               'ball-scale-multiple' | 'ball-zig-zag' | 'ball-zig-zag-deflect' | 'ball-clip-rotate' | 'ball-clip-rotate-pulse' | 'ball-clip-rotate-multiple' |
               'ball-scale-ripple' | 'triangle-skew-spin' | 'pacman'
        /**
         * Set the time before the spinner fades in
         */
        fadeIn?: 'full' | 'half' | 'quarter' | 'none';
        /**
         * Change the default "spinner" className.
         */
        overrideSpinnerClassName?: string;
        /**
         * Component className.
         */
        className?: string;
        /**
         * Programmatically set the color of the spinners (does not work
         * for circle or folding-cube); this can either be a hex value or a color word
         */
        color?: string;
	}

	export interface Spinner extends React.ComponentClass<SpinnerProps> {
	}
}

declare const spinner: spinner.Spinner;
export = spinner;