text:
'use strict';

/* jshint ignore:start */
/**
 * This code was generated by
 * \ / _    _  _|   _  _
 *  | (_)\/(_)(_|\/| |(/_  v1.0.0
 *       /       /
 */
/* jshint ignore:end */

var _ = require('lodash');  /* jshint ignore:line */
var Holodeck = require('../../../../../holodeck');  /* jshint ignore:line */
var Request = require(
    '../../../../../../../lib/http/request');  /* jshint ignore:line */
var Response = require(
    '../../../../../../../lib/http/response');  /* jshint ignore:line */
var RestException = require(
    '../../../../../../../lib/base/RestException');  /* jshint ignore:line */
var Twilio = require('../../../../../../../lib');  /* jshint ignore:line */

var client;
var holodeck;

describe('Member', function() {
  beforeEach(function() {
    holodeck = new Holodeck();
    client = new Twilio('ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'AUTHTOKEN', {
      httpClient: holodeck
    });
  });
  it('should generate valid fetch request',
    function() {
      holodeck.mock(new Response(500, '{}'));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members('MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').fetch();
      promise = promise.then(function() {
        throw new Error('failed');
      }, function(error) {
        expect(error.constructor).toBe(RestException.prototype.constructor);
      });
      promise.done();

      var solution = {
        serviceSid: 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        channelSid: 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        sid: 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      };
      var url = _.template('https://chat.twilio.com/v1/Services/<%= serviceSid %>/Channels/<%= channelSid %>/Members/<%= sid %>')(solution);

      holodeck.assertHasRequest(new Request({
        method: 'GET',
        url: url
      }));
    }
  );
  it('should generate valid fetch response',
    function() {
      var body = JSON.stringify({
          'sid': 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'channel_sid': 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'service_sid': 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'identity': 'jing',
          'role_sid': 'RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'last_consumed_message_index': null,
          'last_consumption_timestamp': null,
          'date_created': '2016-03-24T21:05:50Z',
          'date_updated': '2016-03-24T21:05:50Z',
          'url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      });

      holodeck.mock(new Response(200, body));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members('MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').fetch();
      promise = promise.then(function(response) {
        expect(response).toBeDefined();
      }, function() {
        throw new Error('failed');
      });

      promise.done();
    }
  );
  it('should generate valid create request',
    function() {
      holodeck.mock(new Response(500, '{}'));

      var opts = {
        identity: 'identity'
      };
      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members.create(opts);
      promise = promise.then(function() {
        throw new Error('failed');
      }, function(error) {
        expect(error.constructor).toBe(RestException.prototype.constructor);
      });
      promise.done();

      var solution = {
        serviceSid: 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        channelSid: 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      };
      var url = _.template('https://chat.twilio.com/v1/Services/<%= serviceSid %>/Channels/<%= channelSid %>/Members')(solution);

      var values = {
        Identity: 'identity',
      };
      holodeck.assertHasRequest(new Request({
          method: 'POST',
          url: url,
          data: values
      }));
    }
  );
  it('should generate valid create response',
    function() {
      var body = JSON.stringify({
          'sid': 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'channel_sid': 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'service_sid': 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'identity': 'jing',
          'role_sid': 'RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'last_consumed_message_index': null,
          'last_consumption_timestamp': null,
          'date_created': '2016-03-24T21:05:50Z',
          'date_updated': '2016-03-24T21:05:50Z',
          'url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      });

      holodeck.mock(new Response(201, body));

      var opts = {
        identity: 'identity'
      };
      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members.create(opts);
      promise = promise.then(function(response) {
        expect(response).toBeDefined();
      }, function() {
        throw new Error('failed');
      });

      promise.done();
    }
  );
  it('should generate valid list request',
    function() {
      holodeck.mock(new Response(500, '{}'));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members.list();
      promise = promise.then(function() {
        throw new Error('failed');
      }, function(error) {
        expect(error.constructor).toBe(RestException.prototype.constructor);
      });
      promise.done();

      var solution = {
        serviceSid: 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        channelSid: 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      };
      var url = _.template('https://chat.twilio.com/v1/Services/<%= serviceSid %>/Channels/<%= channelSid %>/Members')(solution);

      holodeck.assertHasRequest(new Request({
        method: 'GET',
        url: url
      }));
    }
  );
  it('should generate valid read_full response',
    function() {
      var body = JSON.stringify({
          'meta': {
              'page': 0,
              'page_size': 50,
              'first_page_url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=50&Page=0',
              'previous_page_url': null,
              'url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=50&Page=0',
              'next_page_url': null,
              'key': 'members'
          },
          'members': [
              {
                  'sid': 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                  'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                  'channel_sid': 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                  'service_sid': 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                  'identity': 'jing',
                  'role_sid': 'RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                  'last_consumed_message_index': null,
                  'last_consumption_timestamp': null,
                  'date_created': '2016-03-24T21:05:50Z',
                  'date_updated': '2016-03-24T21:05:50Z',
                  'url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
              }
          ]
      });

      holodeck.mock(new Response(200, body));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members.list();
      promise = promise.then(function(response) {
        expect(response).toBeDefined();
      }, function() {
        throw new Error('failed');
      });

      promise.done();
    }
  );
  it('should generate valid read_empty response',
    function() {
      var body = JSON.stringify({
          'meta': {
              'page': 0,
              'page_size': 50,
              'first_page_url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=50&Page=0',
              'previous_page_url': null,
              'url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=50&Page=0',
              'next_page_url': null,
              'key': 'members'
          },
          'members': []
      });

      holodeck.mock(new Response(200, body));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members.list();
      promise = promise.then(function(response) {
        expect(response).toBeDefined();
      }, function() {
        throw new Error('failed');
      });

      promise.done();
    }
  );
  it('should generate valid remove request',
    function() {
      holodeck.mock(new Response(500, '{}'));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members('MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').remove();
      promise = promise.then(function() {
        throw new Error('failed');
      }, function(error) {
        expect(error.constructor).toBe(RestException.prototype.constructor);
      });
      promise.done();

      var solution = {
        serviceSid: 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        channelSid: 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        sid: 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      };
      var url = _.template('https://chat.twilio.com/v1/Services/<%= serviceSid %>/Channels/<%= channelSid %>/Members/<%= sid %>')(solution);

      holodeck.assertHasRequest(new Request({
        method: 'DELETE',
        url: url
      }));
    }
  );
  it('should generate valid delete response',
    function() {
      var body = JSON.stringify(null);

      holodeck.mock(new Response(204, body));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members('MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').remove();
      promise = promise.then(function(response) {
        expect(response).toBe(true);
      }, function() {
        throw new Error('failed');
      });

      promise.done();
    }
  );
  it('should generate valid update request',
    function() {
      holodeck.mock(new Response(500, '{}'));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members('MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').update();
      promise = promise.then(function() {
        throw new Error('failed');
      }, function(error) {
        expect(error.constructor).toBe(RestException.prototype.constructor);
      });
      promise.done();

      var solution = {
        serviceSid: 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        channelSid: 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
        sid: 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      };
      var url = _.template('https://chat.twilio.com/v1/Services/<%= serviceSid %>/Channels/<%= channelSid %>/Members/<%= sid %>')(solution);

      holodeck.assertHasRequest(new Request({
        method: 'POST',
        url: url
      }));
    }
  );
  it('should generate valid update_role_sid response',
    function() {
      var body = JSON.stringify({
          'sid': 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'channel_sid': 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'service_sid': 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'identity': 'jing',
          'role_sid': 'RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'last_consumed_message_index': null,
          'last_consumption_timestamp': null,
          'date_created': '2016-03-24T21:05:50Z',
          'date_updated': '2016-03-24T21:05:50Z',
          'url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      });

      holodeck.mock(new Response(200, body));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members('MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').update();
      promise = promise.then(function(response) {
        expect(response).toBeDefined();
      }, function() {
        throw new Error('failed');
      });

      promise.done();
    }
  );
  it('should generate valid update_last_consumed_message_index response',
    function() {
      var body = JSON.stringify({
          'sid': 'MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'channel_sid': 'CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'service_sid': 'ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'identity': 'jing',
          'role_sid': 'RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
          'last_consumed_message_index': 666,
          'last_consumption_timestamp': null,
          'date_created': '2016-03-24T21:05:50Z',
          'date_updated': '2016-03-24T21:05:50Z',
          'url': 'https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
      });

      holodeck.mock(new Response(200, body));

      var promise = client.chat.v1.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                  .members('MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').update();
      promise = promise.then(function(response) {
        expect(response).toBeDefined();
      }, function() {
        throw new Error('failed');
      });

      promise.done();
    }
  );
});


text:
package com.netflix.ndbench.plugin.geode;

import org.apache.geode.LogWriter;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.security.AuthInitialize;
import org.apache.geode.security.AuthenticationFailedException;

import java.util.Properties;

/**
 * Created by Pulkit Chandra
 */
@SuppressWarnings("unused")
public class ClientAuthInitialize implements AuthInitialize {

  public static final String USER_NAME = "security-username";
  public static final String PASSWORD = "security-password";

  public static AuthInitialize create() {
    return new ClientAuthInitialize();
  }

  @Override
  public void close() {
  }

  @Override
  public Properties getCredentials(Properties arg0, DistributedMember arg1,
                                   boolean arg2) throws AuthenticationFailedException {
    Properties props = new Properties();
    props.put(USER_NAME, arg0.getProperty(USER_NAME));
    props.put(PASSWORD, arg0.getProperty(PASSWORD));
    return props;
  }

  @Override
  public void init(LogWriter arg0, LogWriter arg1)
      throws AuthenticationFailedException {
  }
}

redpajama_set_name: RedPajamaGithub


text:
"""
textParser.py
=============

A set of functions to parse text file data into lists, strings,
reals, integers etc.

"""

# Standard library imports
import re
import string

# Local imports
from nappy.utils.right_strip import *

# Global variables
pattnNoQuotes = re.compile("^[\"'].*\1$")

def readItemFromLine(line, rttype=str):
    """
    Reads an item of type ``rttype`` from ``line``.
    """
    line = rightStripCurlyBraces(line)
    rtitem = pattnNoQuotes.sub("", line.strip())

    if rttype is not str:
        rtitem = rttype(rtitem)
    return rtitem

def readItemsFromLine(line, nitems=None, rttype=str):
    """
    Reads ``nitems`` items of type ``rttype`` from ``line``.
    """
    line = rightStripCurlyBraces(line)
    rtitems = re.split(r"\s+", line.strip())
    if nitems and len(rtitems) != nitems:
        raise Exception("Incorrect number of items (%s) found in line: \n'%s'" % (nitems, line))
    if rttype is not str:
        rtitems = [rttype(x) for x in rtitems]
    return rtitems

def readItemsFromLines(lines, nitems, rttype=str):
    """
    Reads ``nitems`` items of type ``rttype`` from ``lines``
    """
    lines = [rightStripCurlyBraces(line) for line in lines]
    rtitems = []
    for line in lines:
        rtitems = rtitems + [readItemFromLine(line, rttype)]
    if rttype is not str:
        rtitems = [rttype(x) for x in rtitems]
    return rtitems

def readItemsFromUnknownLines(object, nitems, rttype=str):
    """
    Reads from an unknown number of lines until n items have been collected.
    The 'object' argument can be a filehandle (i.e. obj=open('name.ext', 'r'))
    or a string wrapped in a StringIO object (i.e. obj=StringIO.StringIO('abc')).
    The 'object' argument can also be a list, in which case the partially used/read object is
    also returned.
    """

    rtitems = []
    lines = []

    if type(object) == type([2,3]):
        while len(rtitems) < nitems:
	    nextitem = object[0]
	    object = object[1:]
            items = rightStripCurlyBraces(nextitem).strip().split()
            lines.append(items)
            (rtitems, extras) = (rtitems + items[:nitems], items[nitems:])
    else:
        while len(rtitems) < nitems:
            items = rightStripCurlyBraces(object.readline()).strip().split()
            lines.append(items)
            (rtitems, extras) = (rtitems + items[:nitems], items[nitems:])

    if len(extras) > 0:
        raise Exception("Could not split " + `len(lines)` + " lines exactly into required number (" + `nitems` + ") of items: \n" + str(lines))

    if rttype is not str:
        rtitems = [rttype(x) for x in rtitems]

    if type(object) == type([1,2]):
        return (rtitems, object)
    else:
        return rtitems


text:
<?php

/* EstaticasBundle:Default:atencion.html.twig */
class __TwigTemplate_82ed52e9ba7eae462fa3ea25d430396d extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "Hello !
";
    }

    public function getTemplateName()
    {
        return "EstaticasBundle:Default:atencion.html.twig";
    }

    public function getDebugInfo()
    {
        return array (  17 => 1,);
    }
}


text:
/**
 * Imports
 */
import React from 'react';
import {FormattedMessage, FormattedNumber} from 'react-intl';
import {Link} from 'react-router';

import {slugify} from '../../../utils/strings';

// Flux
import IntlStore from '../../../stores/Application/IntlStore';

// Required components
import Text from '../typography/Text';

/**
 * Component
 */
class ProductListItem extends React.Component {

    static contextTypes = {
        getStore: React.PropTypes.func.isRequired
    };

    //*** Initial State ***//

    state = {
        productPlaceholderImage: undefined
    };

    //*** Component Lifecycle ***//

    componentDidMount() {

        // Component styles
        require('./ProductListItem.scss');

        // Load static files
        this.setState({
            productPlaceholderImage: require('../images/image_placeholder.png')
        });
    }

    //*** Template ***//

    render() {

        //
        // Helper methods & variables
        //

        let intlStore = this.context.getStore(IntlStore);

        // Base route params
        let routeParams = {locale: intlStore.getCurrentLocale()};

        // Link params for this product
        let linkParams = Object.assign({
            productId: this.props.product.id,
            productSlug: slugify(intlStore.getMessage(this.props.product.name))
        }, routeParams);

        //
        // Return
        //
        return (

                <Link to="product-slug" params={linkParams}>

                        {this.props.product.images && this.props.product.images.length > 0 ?

                                {`//${this.props.product.images[0].url}`}

                            :
                            null
                        }
                        {this.props.product.images && this.props.product.images.length > 0 ?
                            <img src={`//${this.props.product.images[0].url}`} />
                            :

                        }

                        <Text size="small">
                            <FormattedMessage
                                message={intlStore.getMessage(this.props.product.name)}
                                locales={intlStore.getCurrentLocale()} />
                        </Text>
                        {this.props.product.sku}

                    {this.props.product.pricing ?

                                {this.props.product.pricing.retail}

                                {this.props.product.pricing.currency}

                                <Text size="medium" weight="bold">
                                    <FormattedNumber
                                        value={this.props.product.pricing.retail}
                                        style="currency"
                                        currency={this.props.product.pricing.currency} />
                                </Text>

                        :
                        null
                    }
                </Link>

        );
    }
}

/**
 * Exports
 */
export default ProductListItem;


text: module.exports = require('./src/dct.js');


text:
using System;

namespace PlayMe.Common.Model
{
    public class PlayMeObject
    {

        private MusicProviderDescriptor musicProvider;

        public string Link { get; set; }
        public string Name { get; set; }
        public Uri ExternalLink { get; set; }

        public MusicProviderDescriptor MusicProvider
        {
            get
            {
                //For tracks that were saved before we introduced Music Providers
                return musicProvider ?? new MusicProviderDescriptor { Name = "Spotify", Identifier = "sp" };
            }

            set { musicProvider = value; }
        }

        public override string ToString()
        {
            return string.Format("{0} ({1})", Name, Link);
        }

    }
}


text:
class RoutingController < ApplicationController
	def index
		if student_member_signed_in?
			redirect_to "/homepage/studentmember/"
		elsif coordinator_signed_in?
			redirect_to "/homepage/coordinator/"
		elsif registered_alumni_signed_in?
			redirect_to "/information"
		else
			redirect_to "/homepage/"
		end
	end
end


text:
/* Danish initialisation for the jQuery UI date picker plugin. */
/* Written by Jan Christensen ( deletestuff@gmail.com). */

(function( factory ) {
	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define([ "../datepicker" ], factory );
	} else {

		// Browser globals
		factory( jQuery.datepicker );
	}
}(function( datepicker ) {

datepicker.regional['da'] = {
	closeText: 'Luk',
	prevText: '<Forrige',
	nextText: 'Næste>',
	currentText: 'Idag',
	monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
	'Juli','August','September','Oktober','November','December'],
	monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
	'Jul','Aug','Sep','Okt','Nov','Dec'],
	dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
	dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
	dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
	weekHeader: 'Uge',
	dateFormat: 'dd-mm-yy',
	firstDay: 1,
	isRTL: false,
	showMonthAfterYear: false,
	yearSuffix: ''};
datepicker.setDefaults(datepicker.regional['da']);

return datepicker.regional['da'];

}));


text:
set -e

# cd to the directory this script lives in
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"

if [ $# -ne 3 ]; then
    echo "Usage: $0 <major> <minor> <patch>" >&2
    exit 1
fi

MAJOR="$1"
MINOR="$2"
PATCH="$3"

# TODO(joshlf):
# - Use the --use-core flag once std isn't required (see
#   https://github.com/rust-lang-nursery/rust-bindgen/issues/1015)

# Only include the symbols we want. It's important that we take the minimum
# dependency on BoringSSL so that we provide the minimum burden for them. The
# more symbols we depend on, the more likely it is that a change that they want
# to make will affect us, which they will care about, making them either expend
# effort in a graceful transition or decide to abandon the change. Thus, instead
# of whitelisting broad classes of symbols, we explicitly whitelist the exact
# list of symbols that Mundane depends on.

# TODO(inejge):
# - When https://github.com/rust-lang-nursery/rust-bindgen/issues/1375 is resolved,
#   go back to a single whitelist

# Split the whitelist into function names and other symbols, in order to use the
# former for a consistency check of the postprocessing step which adds the
# #[link_name...] attributes. Any change of the whitelist must be made to the
# appropriate sub-list.
WHITELIST_FUNCS="BN_free|\
BN_init|\
BN_set_u64|\
CBS_init|\
CBS_len|\
CBB_init|\
CBB_cleanup|\
CBB_data|\
CBB_len|\
ED25519_keypair|\
ED25519_sign|\
ED25519_verify|\
ED25519_keypair_from_seed|\
EC_GROUP_new_by_curve_name|\
EC_GROUP_get_curve_name|\
EC_curve_nid2nist|\
EC_KEY_new|\
EC_KEY_free|\
EC_KEY_up_ref|\
EC_KEY_get0_group|\
EC_KEY_set_group|\
EC_KEY_generate_key|\
EC_KEY_parse_private_key|\
EC_KEY_marshal_private_key|\
ECDSA_sign|\
ECDSA_verify|\
ECDSA_size|\
ERR_print_errors_cb|\
EVP_md5|\
EVP_sha1|\
EVP_sha256|\
EVP_sha384|\
EVP_sha512|\
EVP_PKEY_new|\
EVP_PKEY_free|\
EVP_PKEY_up_ref|\
EVP_PKEY_assign_EC_KEY|\
EVP_PKEY_assign_RSA|\
EVP_PKEY_get1_EC_KEY|\
EVP_PKEY_get1_RSA|\
EVP_parse_public_key|\
EVP_marshal_public_key|\
PKCS5_PBKDF2_HMAC|\
EVP_PBE_scrypt|\
HMAC_CTX_init|\
HMAC_CTX_cleanup|\
HMAC_CTX_copy|\
HMAC_Init_ex|\
HMAC_Update|\
HMAC_Final|\
HMAC_size|\
CRYPTO_memcmp|\
MD5_Final|\
MD5_Init|\
MD5_Transform|\
MD5_Update|\
RAND_bytes|\
RSA_bits|\
RSA_free|\
RSA_generate_key_ex|\
RSA_marshal_private_key|\
RSA_new|\
RSA_parse_private_key|\
RSA_sign|\
RSA_sign_pss_mgf1|\
RSA_size|\
RSA_up_ref|\
RSA_verify|\
RSA_verify_pss_mgf1|\
SHA1_Init|\
SHA1_Update|\
SHA1_Final|\
SHA256_Init|\
SHA256_Update|\
SHA256_Final|\
SHA384_Init|\
SHA384_Update|\
SHA384_Final|\
SHA512_Init|\
SHA512_Update|\
SHA512_Final"

WHITELIST_OTHERS="BIGNUM|\
BN_GENCB|\
CBB|\
CBS|\
EC_GROUP|\
EC_KEY|\
ED25519_PRIVATE_KEY_LEN|\
ED25519_PUBLIC_KEY_LEN|\
ED25519_SIGNATURE_LEN|\
EVP_MD|\
EVP_PKEY|\
HMAC_CTX|\
MD5_CTX|\
MD5_DIGEST_LENGTH|\
NID_md5|\
NID_X9_62_prime256v1|\
NID_secp384r1|\
NID_secp521r1|\
NID_sha1|\
NID_sha256|\
NID_sha384|\
NID_sha512|\
RSA|\
RSA_F4|\
SHA_CTX|\
SHA_DIGEST_LENGTH|\
SHA256_CTX|\
SHA256_DIGEST_LENGTH|\
SHA512_CTX|\
SHA384_DIGEST_LENGTH|\
SHA512_CTX|\
SHA512_DIGEST_LENGTH"

WHITELIST="(${WHITELIST_FUNCS}|${WHITELIST_OTHERS})"

# NOTE(joshlf): We pin to a particular version of bindgen since updates
# sometimes change the semantics of the generated bindings (for example, by
# changing the Rust types that are generated for particular C types). If a more
# recent version of bindgen is available, "roll" bindgen by updating the
# `BINDGEN_EXPECTED_VERSION` variable here.
BINDGEN_EXPECTED_VERSION="bindgen 0.53.2"
BINDGEN_GOT_VERSION="$(bindgen --version)"
if [ "$BINDGEN_GOT_VERSION" != "$BINDGEN_EXPECTED_VERSION" ]; then
    echo "Unexpected version of bindgen: got $BINDGEN_GOT_VERSION; wanted $BINDGEN_EXPECTED_VERSION.
If a newer version is available, edit this script to pin to that version." >&2
    exit 1
fi

# NOTE(joshlf): Currently, we don't pass --target since none of the symbols
# we're linking against are architecture-specific (TODO: are any of them
# word-size-specific?). If this ever becomes a problem, then the thing to do is
# probably to generate different files for different platforms
# (boringssl_x86_64.rs, boringssl_arm64.rs, etc) and conditionally compile them
# depending on target.
bindgen bindgen.h --whitelist-function "$WHITELIST" --whitelist-type "$WHITELIST" \
    --whitelist-var "$WHITELIST" -o boringssl.rs -- -I ./boringssl/include

TMP="$(mktemp)"

# Prepend copyright comment, #[allow] for various warnings we don't care about,
# and a line telling Rust to link against libcrypto.
(cat <<'EOF'
// Copyright 2018 Google LLC
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

// Some symbols are only used with certain features enabled, so we need to
// suppress the unused warning when those features aren't enabled.
#![allow(unused)]
// Only necessary for test_symbol_conflict.sh, which exposes these symbols
// through Mundane's public interface.
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]

EOF

# Do this on a separate line because we need string interpolation, but we can't
# use string interpolation in the preceding 'cat' command, or else the !
# characters would be interpreted.
echo "#[link(name = \"crypto_${MAJOR}_${MINOR}_${PATCH}\")] extern {}"
echo

cat boringssl.rs) \
| rustfmt \
| (
# Postprocess the generated bindings, adding the "#[link_name ...]"
# attribute to exported functions. Since the function sites are matched
# lexically, check the consistency of matches against the list of function
# names defined above. An error will be returned if a) a matched function
# is not in the whitelist, b) a name from the whitelist wasn't matched
# in the input, or c) a name was matched more than once (which should
# never happen).
awk -v "vers=${MAJOR}_${MINOR}_${PATCH}_" -v "funcs=${WHITELIST_FUNCS}" '
BEGIN {
    split(funcs, fa, "[|]")
    for (fn in fa)
        f[fa[fn]]
}
/extern "C" {/ {
    print
    getline
    if ($0 ~ "#[[]link_name")
        getline
    if ($0 ~ "pub fn") {
        fn = $3
        sub("[(].*", "", fn)
        if (!(fn in f)) {
            print "fatal: fn not in whitelist: " fn | "cat >&2"
            exit 1
        } else
            f[fn]++
        print "    #[link_name = \"__RUST_MUNDANE_" vers fn "\"]"
    }
}
{ print }
END {
    for (fn in f)
        if (f[fn] != 1) {
            print "fatal: fn match count = " f[fn] + 0 ", should be 1: " fn | "cat >&2"
            exit 1
        }
}') > "$TMP"
mv "$TMP" boringssl.rs


text:
package com.twosigma.beakerx.sql.magic.command;

import com.twosigma.beakerx.KernelTest;
import com.twosigma.beakerx.evaluator.Evaluator;
import com.twosigma.beakerx.kernel.magic.command.MagicCommandType;

import java.util.List;

import static com.twosigma.beakerx.sql.magic.command.DataSourcesMagicCommand.DATASOURCES;
import static com.twosigma.beakerx.sql.magic.command.DefaultDataSourcesMagicCommand.DEFAULT_DATASOURCE;

public class SQLKernelTest extends KernelTest {

  public SQLKernelTest(String id, Evaluator evaluator) {
    super(id, evaluator);
  }

  @Override
  public List<MagicCommandType> getMagicCommandTypes() {
    List<MagicCommandType> magicCommands = super.getMagicCommandTypes();
    magicCommands.add(new MagicCommandType(DATASOURCES, "<jdbc:[dbEngine]:[subsubprotocol:][databaseName]>", new DataSourcesMagicCommand(this)));
    magicCommands.add(new MagicCommandType(DEFAULT_DATASOURCE, "<sourceName=jdbc:[dbEngine]:[subsubprotocol:][databaseName]>", new DefaultDataSourcesMagicCommand(this)));

    return magicCommands;
  }
}


text:
#import "CCResponder.h"
#import "CCScheduler.h"
#import "CCDirector.h"

@class CCScene;
@class CCPhysicsBody;
@class CCAnimationManager;
@class CCRenderer;
@class CCColor;
@class CCAction;
@class CCTimer;

/** CCNode is the base class for all objects displayed by Cocos2D. CCNode handles transformations, can have a content size and provides a coordinate system
 for its child nodes.

 ### Node Hierarchy

 Nodes are hierachically organized in a tree with a CCScene as its root node. This is often referred to as *scene graph*, *node hierarchy* or *node tree*.

 By default every node can have other nodes as child nodes. Some node classes restrict child nodes to a specific instance type, or don't allow child nodes at all.

 A child node is positioned and rotated relative to its parent. Some properties of the parent node are "inherited" by child nodes, for example: scale, visible, paused.
 Other properties are only "inherited" if enabled, see cascadeOpacityEnabled for example.

 ### Draw Order

 Draw order of nodes is controlled primarily by their order in the node hierarchy. The parent node is drawn first, followed by its child nodes in the order they
 were added.

 You can fine-tune draw order via the zOrder property. By default all nodes have a zOrder of 0. Nodes with lower zOrder are drawn before nodes with higher zOrder.
 This applies only to nodes in the same level (sibling nodes) and their parent node, as the zOrder is relative to the zOrder of the parent.

 Assuming you have two parent nodes A and B with zOrder 0 and they are drawn in the order A first, then B. Then all of the children of parent B will be drawn
 in front of any child node of parent A. If B's zOrder is changed to -1, then parent B and all of its children will be drawn behind parent A and its children.

 ### Scheduling Events / Timers

 Implementing a method with a signature of `-(void) update:(CCTime)delta` in a CCNode subclass will have that method run once every frame. `CCTime` is declared as `double`.

 If this doesn't suffice you can use the various schedule methods of a node, such as schedule:interval: or scheduleBlock:delay:. For example the following selector runs
 once every second:

    [self schedule:@selector(everySecond:) interval:1.0];

 The signature of scheduled selectors is always the same with a single CCTime parameter and no return value:

    -(void) everySecond:(CCTime)delta {
        NSLog(@"tic-toc ..");
    }

 **Warning:** Any non-Cocos2D scheduling methods will be unaffected by the node's paused state and may run in indeterminate order, possibly causing rendering
 glitches and timing bugs. It is therfore strongly discouraged to use NSTimer, `performSelector:afterDelay:` or Grand Central Disptach (GCD) `dispatch_xxx` methods
 to time/schedule tasks in Cocos2D.

 #### Pausing

 It is common practice to pause the topmost node of a layer whose contents you want to pause. For instance you should have a gameLayer node that you can use
 to pause the entire game, while the hudLayer and pauseMenuLayer nodes may not need to or shouldn't be paused in order to continue animations and allowing the
 user to interact with a pause menu.

 ### Input Handling

  Any CCNode or subclass can receive touch and mouse events, if enabled. See the CCResponder super class for more information.

 ### Position and Size Types

 Coordinates in the CCNode coordinate system are by default set in points by the position property. The point measurement provides a way to handle different
 screen pixel densities. For instance, on a Retina device one point corresponds to two pixels, but on non-Retina devices point and pixel resolution are identical.

 By using the positionType property you can specify how a node's position is interpreted. For instance, if you set the type to CCPositionTypeNormalized a
 position value of (0.5, 0.5) will place the node in the center of its parent's container. The container is specified by the parent's contentSize.

 It's also possible to set positions relative to the different corners of the parent's container. The CCPositionType has three components, xUnit, yUnit and corner.
 The corner can be any reference corner of the parent's container and the xUnit and yUnit can be any of the following:

 - CCPositionUnitPoints - This is the default, the position value will be in points.
 - CCPositionUnitScaled - The position is scaled by the UIScaleFactor as defined by CCDirector. This is very useful for scaling up game play without changing the game logic.
    E.g. if you want to support both phones and tablets in native resolutions.
 - CCPositionUnitNormalized - Using the normalized type allows you to position object in relative to the parents container. E.g. it can be used to center nodes
    on the screen regardless of the device type your game is running on.

 Similarily to how you set a node's position and positionType you can also set it's contentSize and contentSizeType. However, some classes doesn't allow you
 to set these directly. For instance, the CCSprite sets its contentSize depending on the size of its texture and for descendants of CCControl you should
 set the preferredSize and preferredSizeType rather than changing their contentSize directly. The CCSizeType has two components widthUnit and heightUnit
 which can be any of the following:

 - CCSizeUnitPoints - This is the default, the size will be in points
 - CCSizeUnitScaled - The size is scaled by the UIScaleFactor.
 - CCSizeUnitNormalized - The content size will be set as a normalized value of the parent's container.
 - CCSizeUnitInset - The content size will be the size of it's parent container, but inset by a number of points.
 - CCSizeUnitInsetScaled - The content size will be the size of it's parent container, but inset by a number of points multiplied by the UIScaleFactor.

 Even if the positions and content sizes are not set in points you can use actions to animate the nodes. See the examples and tests for more information on
 how to set positions and content sizes, or use SpriteBuilder to easily play around with the settings. There are also more positioning options available
 by using CCLayout and CCLayoutBox.

#### Prefer to use ..InPoints

 There are typically two properties of each property supporting a "type". For instance the position property returns the raw values whose meaning
 depends on positionType, while positionInPoints will return the position in points regardless of positionType. It is recommended to use the "inPoints"
 variants of properties if you expect the values to be in points.

 Otherwise your code will break if you subsequently change the positionType to something other than points (ie UIPoints or Normalized).

### Subclassing Notes

 A common pattern in building a Cocos2d game is to subclass CCNode, add it to a CCScene and override the methods for handling user input.
 Consider each node subclass as being the view in a MVC model, but it's also the controller for this node and perhaps even the node's branch of the node tree.
 The model can also be represented by the node subclass itself, or made separate (M-VC model).

 A separate model could simply be any NSObject class initialized by the node subclass and assigned to an ivar/property.

 An advanced subclassing style aims to minimize subclassing node classes except for CCNode itself. A CCNode subclass acts as the controller for its node tree,
 with one or more child nodes representing the controller node's views. This is particularly useful for composite nodes, such as a player
 with multiple body parts (head, torso, limbs), attachments (armor, weapons) and effects (health bar, name label, selection rectangle, particle effects).

 The userObject property can be used to add custom data and methods (model, components) to any node, in particular to avoid subclassing where the subclass
 would only add minimal functionality or just data.
 */

@interface CCNode : CCResponder < CCSchedulableTarget > {
	// TODO
	// DisplayColor and Color are kept separate to allow for cascading color and alpha changes through node children.
	// Alphas tend to be multiplied together so you can fade groups of objects that are colored differently.
	GLKVector4	_displayColor, _color;
}

/// -----------------------------------------------------------------------
/// @name Creating a Node
/// -----------------------------------------------------------------------

/** Creates and returns a new node.
 @note Not all subclasses support initialization via the `node` initializer. Prefer to use specialized initializers
 in CCNode subclasses, where available. */
+(instancetype) node;

// purposefully undocumented: init is inherited from NSObject
-(id) init;

/// -----------------------------------------------------------------------
/// @name Storing Custom Information
/// -----------------------------------------------------------------------

/** Used to store a custom object of any type. For instance you could add a NSMutableDictionary to store custom
 data in a node without needing to subclass the node. */
@property(nonatomic,readwrite,strong) id userObject;

/// -----------------------------------------------------------------------
/// @name Position
/// -----------------------------------------------------------------------

/** Position (x,y) of the node in the units specified by the positionType property.
 The distance is measured from one of the corners of the node's parent container, which corner is specified by the positionType property.
 Default setting is referencing the bottom left corner in points.
 @see positionInPoints
 @see positionType */
@property(nonatomic,readwrite,assign) CGPoint position;

/** Position (x,y) of the node in points from the bottom left corner.
 @see position */
@property(nonatomic,readwrite,assign) CGPoint positionInPoints;

/** Defines the position type used for the position property. Changing the position type affects the meaning of the values
 assigned to the position property and allows you to change the referenceCorner relative to the parent container.
 It also allows position to be interpreted as "UIPoints", which are scaled by [CCDirector UIScaleFactor].
 See "Coordinate System and Positioning" in Class Overview for more information.
 @see CCPositionType, CCPositionUnit, CCPositionReferenceCorner
 @see position
 @see positionInPoints */
@property(nonatomic,readwrite,assign) CCPositionType positionType;

/// -----------------------------------------------------------------------
/// @name Rotation and Skew
/// -----------------------------------------------------------------------

/** The rotation (angle) of the node in degrees. Rotation is relative to the parent node's rotation.
 0 is the default rotation angle. Positive values rotate node clockwise. */
@property(nonatomic,readwrite,assign) float rotation;

/** The rotation (angle) of the node in degrees. 0 is the default rotation angle. Positive values rotate node clockwise.
 It only modifies the X rotation performing a horizontal rotational skew.
 @see skewX, skewY */
@property(nonatomic,readwrite,assign) float rotationalSkewX;

/** The rotation (angle) of the node in degrees. 0 is the default rotation angle. Positive values rotate node clockwise.
 It only modifies the Y rotation performing a vertical rotational skew. */
@property(nonatomic,readwrite,assign) float rotationalSkewY;

/** The X skew angle of the node in degrees.
 This angle describes the shear distortion in the X direction.
 Thus, it is the angle between the Y axis and the left edge of the shape
 The default skewX angle is 0, with valid ranges from -90 to 90. Positive values distort the node in a clockwise direction.
 @see skewY, rotationalSkewX */
@property(nonatomic,readwrite,assign) float skewX;

/** The Y skew angle of the node in degrees.
 This angle describes the shear distortion in the Y direction.
 Thus, it is the angle between the X axis and the bottom edge of the shape
 The default skewY angle is 0, with valid ranges from -90 to 90. Positive values distort the node in a counter-clockwise direction.
 @see skewX, rotationalSkewY */
@property(nonatomic,readwrite,assign) float skewY;

/// -----------------------------------------------------------------------
/// @name Scale
/// -----------------------------------------------------------------------

/** The scale factor of the node. 1.0 is the default scale factor (original size). Meaning depends on scaleType.
 It modifies the X and Y scale at the same time, preserving the node's aspect ratio.

 Scale is affected by the parent node's scale, ie if parent's scale is 0.5 then setting the child's scale to 2.0 will make the
 child node appear at its original size.
 @see scaleInPoints
 @see scaleType
 @see scaleX, scaleY */
@property(nonatomic,readwrite,assign) float scale;

/** The scale factor of the node. 1.0 is the default scale factor. It only modifies the X scale factor.

 Scale is affected by the parent node's scale, ie if parent's scale is 0.5 then setting the child's scale to 2.0 will make the
 child node appear at its original size.
 @see scaleY
 @see scaleXInPoints
 @see scale */
@property(nonatomic,readwrite,assign) float scaleX;

/** The scale factor of the node. 1.0 is the default scale factor. It only modifies the Y scale factor.

 Scale is affected by the parent node's scale, ie if parent's scale is 0.5 then setting the child's scale to 2.0 will make the
 child node appear at its original size.
 @see scaleX
 @see scaleYInPoints
 @see scale */
@property(nonatomic,readwrite,assign) float scaleY;

/** The scaleInPoints is the scale factor of the node in both X and Y, measured in points.
 The scaleType property indicates if the scaleInPoints will be scaled by the UIScaleFactor or not.
 See "Coordinate System and Positioning" in class overview for more information.

 Scale is affected by the parent node's scale, ie if parent's scale is 0.5 then setting the child's scale to 2.0 will make the
 child node appear at its original size.

 @see scale
 @see scaleType */
@property (nonatomic,readonly) float scaleInPoints;

/** The scaleInPoints is the scale factor of the node in X, measured in points.

 Scale is affected by the parent node's scale, ie if parent's scale is 0.5 then setting the child's scale to 2.0 will make the
 child node appear at its original size.

 @see scaleY, scaleYInPoints */
@property (nonatomic,readonly) float scaleXInPoints;

/** The scaleInPoints is the scale factor of the node in Y, measured in points.

 Scale is affected by the parent node's scale, ie if parent's scale is 0.5 then setting the child's scale to 2.0 will make the
 child node appear at its original size.

 @see scaleX
 @see scaleXInPoints */
@property (nonatomic,readonly) float scaleYInPoints;

/** The scaleType defines scale behavior for this node. CCScaleTypeScaled indicates that the node will be scaled by [CCDirector UIScaleFactor].
 This property is analagous to positionType. ScaleType affects the scaleInPoints of a CCNode.
 See "Coordinate System and Positioning" in class overview for more information.
 @see CCScaleType
 @see scale
 @see scaleInPoints */
@property (nonatomic,assign) CCScaleType scaleType;

/// -----------------------------------------------------------------------
/// @name Size
/// -----------------------------------------------------------------------

/** The untransformed size of the node in the unit specified by contentSizeType property.
 The contentSize remains the same regardless of whether the node is scaled or rotated.
 @see contentSizeInPoints
 @see contentSizeType */
@property (nonatomic,readwrite,assign) CGSize contentSize;

/** The untransformed size of the node in Points. The contentSize remains the same regardless of whether the node is scaled or rotated.
 contentSizeInPoints will be scaled by the [CCDirector UIScaleFactor] if the contentSizeType is CCSizeUnitUIPoints.
 @see contentSize
 @see contentSizeType */
@property (nonatomic,readwrite,assign) CGSize contentSizeInPoints;

/** Defines the contentSize type used for the width and height components of the contentSize property.

 @see CCSizeType, CCSizeUnit
 @see contentSize
 @see contentSizeInPoints */
@property (nonatomic,readwrite,assign) CCSizeType contentSizeType;

/**
 * Invoked automatically when the OS view has been resized.
 *
 * This implementation simply propagates the same method to the children.
 * Subclasses may override to actually do something when the view resizes.
 * @param newViewSize The new size of the view after it has been resized.
 */
-(void) viewDidResizeTo: (CGSize) newViewSize;

/** Returns an axis aligned bounding box in points, in the parent node's coordinate system.
 @see contentSize
 @see nodeToParentTransform */
- (CGRect) boundingBox;

/// -----------------------------------------------------------------------
/// @name Content Anchor
/// -----------------------------------------------------------------------

/** The anchorPoint is the point around which all transformations (scale, rotate) and positioning manipulations take place.
 The anchorPoint is normalized, like a percentage. (0,0) refers to the bottom-left corner and (1,1) refers to the top-right corner.
 The default anchorPoint is (0,0). It starts in the bottom-left corner. CCSprite and some other node subclasses may have a different
 default anchorPoint, typically centered on the node (0.5,0.5).
 @warning The anchorPoint is not a replacement for moving a node. It defines how the node's content is drawn relative to the node's position.
 @see anchorPointInPoints */
@property(nonatomic,readwrite) CGPoint anchorPoint;

/** The anchorPoint in absolute points.
 It is calculated as follows: `x = contentSizeInPoints.width * anchorPoint.x; y = contentSizeInPoints.height * anchorPoint.y;`
 @note The returned point is relative to the node's contentSize origin, not relative to the node's position.
 @see anchorPoint */
@property(nonatomic,readonly) CGPoint anchorPointInPoints;

/// -----------------------------------------------------------------------
/// @name Working with Node Trees
/// -----------------------------------------------------------------------

/**
  Adds a child to the container with default zOrder (0).
  If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be sent
  to the node immediately.

  @param node CCNode to add as a child.
 @see addChild:z:
 @see addChild:z:name:
 */
-(void) addChild: (CCNode*)node;

/**
  Adds a child to the container with the given zOrder.
  If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be sent
  to the node immediately.

  @param node CCNode to add as a child.
  @param z    Draw order of node. This value will be assigned to the node's zOrder property.
  @see addChild:, addChild:z:name:
  @see zOrder
 */
-(void) addChild: (CCNode*)node z:(NSInteger)z;

/**
  Adds a child to the container with z order and tag.
  If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.

  @param node CCNode to add as a child.
  @param z    Draw order of node. This value will be assigned to the node's zOrder property.
  @param name Name for this node. This string will be assigned to the node's name property.
  @see addChild:, addChild:z:
  @see zOrder
  @see name
 */
-(void) addChild: (CCNode*)node z:(NSInteger)z name:(NSString*)name;

/** Removes the node from its parent node. Will stop the node's scheduled selectors/blocks and actions.
 @note It is typically more efficient to change a node's visible status rather than remove + addChild: if all you need
 is to temporarily remove the node from the screen.
 @see visible */
-(void) removeFromParent;

/**
 Removes a child from the container. The node must be a child of this node.
 Will stop the node's scheduled selectors/blocks and actions.

 @note It is recommended to use `[node removeFromParent]` over `[self removeChild:node]` as the former will always work,
 even in cases where (in this example) the node hierarchy has changed so that node no longer is a child of self.

 @note It is typically more efficient to change a node's visible status rather than remove + addChild: if all you need
 is to temporarily remove the node from the screen.

 @param child The child node to remove.
 @see removeFromParent
 */
-(void) removeChild:(CCNode*)child;

/**
 Removes a child from the container by name. Does nothing if there's no node with that name.
 Will stop the node's scheduled selectors/blocks and actions.

 @param name Name of node to be removed.
 */
-(void) removeChildByName:(NSString*)name;

/**
 Removes all children from the container.
 @note It is unnecessary to call this when replacing scenes or removing nodes. All nodes call this method on themselves automatically
 when removed from a parent node or when a new scene is presented.
 */
-(void) removeAllChildren;

/** A weak reference to the parent. */
@property(nonatomic, unsafe_unretained) CCNode* parent;

/** Array of child nodes. Used to enumerate child nodes, for instance the following allows you to perform a task on all child nodes with a matching name:

    for (CCNode* child in self.children)
    {
        if ([child.name isEqualToString:@"so we meet again"])
        {
            // do stuff here ...
        }
    }
 */
@property(nonatomic,readonly) NSArray *children;

/** The scene this node is added to, or nil if it's not part of a scene.

 @note The scene property is nil during a node's init methods. The scene property is set only after addChild: was used to add it
 as a child node to a node that already is in the scene.
 @see CCScene */
@property(nonatomic, readonly) CCScene *scene;

/** The CCView this node is a member of, accessed via the scene and director associated with this node.

 @see CCView */
@property(nonatomic, readonly) CC_VIEW<CCView> *view;

/** The CCDirector this node is a member of, accessed via the node's scene.

 @see CCDirector */
@property(nonatomic, readonly) CCDirector *director;

/// -----------------------------------------------------------------------
/// @name Removing Nodes without stopping Actions/Scheduling (unsafe!)
/// -----------------------------------------------------------------------

/**
 Removes the node from its parent node. If cleanup is YES the node will also remove all of its actions and scheduled selectors/blocks.

 @note Running `[self removeFromParentAndCleanup:YES]` is identical to running `[self removeFromParent]`.
 You only need to use this method if you intend to *not stop scheduler and actions*, ie `cleanup:NO`.

 @warning Setting cleanup to NO may prevent the node and its children from deallocating. You have to ensure that the node is either re-added
 to the node hierarchy at some point, or send it the `cleanup` method when you no longer need the node (for instance before switching scenes).

 @param cleanup Stops all scheduled selectors/blocks and actions. Set to NO if you intend to "continue" the node at a later point or
 simply want to re-parent the node.
 @see removeFromParent
 */
-(void) removeFromParentAndCleanup:(BOOL)cleanup;

/**
 Removes a child from the container. The node must be a child of this node.
 If cleanup is YES the node will also remove all of its actions and scheduled selectors/blocks.

 @note Running `[self removeChild:node cleanup:YES]` is identical to running `[self removeChild:node]`.
 You only need to use this method if you intend to *not stop scheduler and actions*, ie `cleanup:NO`.

 @note It is recommended to use `[node removeFromParent]` over `[self removeChild:node]` as the former will always work,
 even in cases where (in this example) the node hierarchy has changed so that node no longer is a child of self.

 @warning Setting cleanup to NO may prevent the node and its children from deallocating. You have to ensure that the node is either re-added to the node
 hierarchy at some point, or send it the `cleanup` method when you no longer need the node (for instance before switching scenes).

 @param node    The child node to remove.
 @param cleanup If YES, stops all scheduled events and actions.
 @see removeFromParent
 @see removeChild:
 */
-(void) removeChild: (CCNode*)node cleanup:(BOOL)cleanup;

/**
 Removes a child from the container by name value.
 If cleanup is YES the node will also remove all of its actions and scheduled selectors/blocks.

 @note Running `[self removeChildByName:@"name" cleanup:YES]` is identical to running `[self removeChildByName:@"name"]`.
 You only need to use this method if you intend to *not stop scheduler and actions*, ie `cleanup:NO`.

 @warning Setting cleanup to NO may prevent the node and its children from deallocating. You have to ensure that the node is either re-added to the node
 hierarchy at some point, or send it the `cleanup` method when you no longer need the node (for instance before switching scenes).

 @param name    Name of node to be removed.
 @param cleanup Stops all scheduled events and actions.
 @see removeChildByName:
 */
-(void) removeChildByName:(NSString*)name cleanup:(BOOL)cleanup;

/**
 Removes all children from the container and do a cleanup all running actions depending on the cleanup parameter.

 @note Running `[self removeAllChildrenWithCleanup:YES]` is identical to running `[self removeAllChildren]`.
 You only need to use this method if you intend to *not stop scheduler and actions*, ie `cleanup:NO`.

 @warning Setting cleanup to NO may prevent the children from deallocating. You have to ensure that the children are either re-added to the node
 hierarchy at some point, or send them the `cleanup` method when you no longer need the children (for instance before switching scenes).

 @param cleanup If YES, stops all scheduled events and actions of removed node.
 @see removeAllChildren */
-(void) removeAllChildrenWithCleanup:(BOOL)cleanup;

/// -----------------------------------------------------------------------
/// @name Naming Nodes
/// -----------------------------------------------------------------------

/** A name tag used to help identify the node easily. Can be used both to encode custom data but primarily meant
 to obtain a node by its name.

 @see getChildByName:recursively:
 @see userObject */
@property(nonatomic,strong) NSString* name;

/**
  Search through the children of the container for one matching the name tag.
  If recursive, it returns the first matching node, via a depth first search.
  Otherwise, only immediate children are checked.

  @note Avoid calling this often, ie multiple times per frame, as the lookup cost can add up. Specifically if the search is recursive.

  @param name The name of the node to look for.
  @param isRecursive Search recursively through node's children (its node tree).
  @return Returns the first node with a matching name, or nil if no node with that name was found.
 @see name
 */
-(CCNode*) getChildByName:(NSString *)name recursively:(bool)isRecursive;

/// -----------------------------------------------------------------------
/// @name Working with Actions
/// -----------------------------------------------------------------------

/** If paused is set to YES, all of the node's actions and its scheduled selectors/blocks will be paused until the node is unpaused.

 Changing the paused state of a node will also change the paused state of its children recursively.

 @warning Any non-Cocos2D scheduling methods will be unaffected by the paused state. It is strongly discouraged to use NSTimer,
 `performSelector:afterDelay:` or Grand Central Disptach (GCD) `dispatch_xxx` methods to time/schedule tasks in Cocos2D.
 */
@property(nonatomic, assign) BOOL paused;

/** Returns YES if the node is added to an active scene and neither it nor any of it's ancestors is paused. */
@property(nonatomic, readonly) BOOL active;

/**
 Has the node run an action.

 @note Depending on when in the frame update cycle this method gets called, the action passed in may either start running
 in the current frame or in the next frame.

 @param action Action to run.
 @return The action that is executed (same as the one that was passed in).
 @see CCAction
 */
-(CCAction*) runAction: (CCAction*) action;

/** Stops and removes all actions running on the node.
 @node It is not necessary to call this when removing a node. Removing a node from its parent will also stop its actions. */
-(void) stopAllActions;

/**
 *  Removes an action from the running action list.
 *
 *  @param action Action to remove.
 *  @see CCAction
 */
-(void) stopAction: (CCAction*) action;

/**
 *  Removes an action from the running action list given its tag. If there are multiple actions with the same tag it will
 *  only remove the first action found that has this tag.
 *
 *  @param name Name of the action to remove.
 */
-(void) stopActionByName:(NSString *)name;

/**
 *  Gets an action running on the node given its tag.
 *  If there are multiple actions with the same tag it will get the first action found that has this tag.
 *
 *  @param name Name of the action.
 *
 *  @return The first action with the given name, or nil if there's no running action with this name.
 *  @see CCAction
 */
-(CCAction*) getActionByName:(NSString *)name;

/**
 Return a list of all actions associated with this node.

 @since v4.0
 */
-(NSArray *) actions;

/// -----------------------------------------------------------------------
/// @name SpriteBuilder Animation Manager
/// -----------------------------------------------------------------------

/**
 Returns the Animation Manager of this node, or that of its parent.

 @note The animationManager property is nil during a node's init methods.
 @see CCAnimationManager
 */
@property (nonatomic, readonly) CCAnimationManager * animationManager;

/// -----------------------------------------------------------------------
/// @name Scheduling Selectors and Blocks
/// -----------------------------------------------------------------------

/**
 Schedules a block to run once, after the given delay.

 `CCTimerBlock` is a block typedef declared as `void (^)(CCTimer *timer)`

 @note There is currently no way to stop/cancel an already scheduled block. If a scheduled block should not run under certain circumstances,
 the block's code itself must check these conditions to determine whether it should or shouldn't perform its task.

 @param block Block to execute. The block takes a `CCTimer*` parameter as input and returns nothing.
 @param delay Delay, in seconds.

 @return A newly initialized CCTimer object.
 @see CCTimer
 */
-(CCTimer *) scheduleBlock:(CCTimerBlock)block delay:(CCTime)delay;

/**
 Schedules a custom selector to run repeatedly at the given interval (in seconds).
 If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.

 @note If interval is 0 the selector will run once every frame. It is recommended and slightly more efficient to implement the update: method
 instead. If the update: method is already implemented, just call a selector from update: that runs whatever selector you wanted to schedule with interval 0.

 @param selector Selector to run. The selector must have the following signature: `-(void) theSelector:(CCTime)delta` where *theSelector* is any legal selector name.
 The parameter must be specified with the @selector keyword as `@selector(theSelector:)`.
 @param seconds Interval between executions in seconds.

 @return A newly initialized CCTimer object.
 @see CCTimer
 */
-(CCTimer *) schedule:(SEL)selector interval:(CCTime)seconds;

/**
 Schedules a custom selector to run repeatedly at the given interval (in seconds).

 @param selector Selector to run. The selector must have the following signature: `-(void) theSelector:(CCTime)delta` where *theSelector* is any legal selector name.
 The parameter must be specified with the @selector keyword as `@selector(theSelector:)`.
 @param interval Interval between executions in seconds.
 @param repeat   Number of times to repeat the selector. The selector will run *repeat* times plus one because the first run is not considered a "repeat".
 @param delay    Delay before running the selector for the first time, in seconds.

 @return A newly initialized CCTimer object.
 @see CCTimer
 */
-(CCTimer *) schedule:(SEL)selector interval:(CCTime)interval repeat: (NSUInteger) repeat delay:(CCTime) delay;

/**
 Re-schedules a custom selector with an interval time in seconds.
 If the custom selector you pass in is not already scheduled, this method is equivalent to schedule:interval:.

 The difference between this method and schedule:interval: is that if the selector is already scheduled,
 calling this method will only adjust the interval of the already scheduled selector.

 In contrast, when you call schedule:interval: on an already scheduled selector, your custom selector will be unscheduled and then rescheduled which
 is less efficient.

 @param selector Selector to run. The selector must have the following signature: `-(void) theSelector:(CCTime)delta` where *theSelector* is any legal selector name.
 The parameter must be specified with the @selector keyword as `@selector(theSelector:)`.
 @param interval Interval between execution in seconds.
 @see CCTimer
 */
-(CCTimer*)reschedule:(SEL)selector interval:(CCTime)interval;

/**
 Schedules a selector that runs only once, with an initial delay.

 @param selector Selector to run. The selector must have the following signature: `-(void) theSelector:(CCTime)delta` where *theSelector* is any legal selector name.
 The parameter must be specified with the @selector keyword as `@selector(theSelector:)`.
 @param delay    Delay before selector runs, in seconds.

 @return A newly initialized CCTimer object.
 @see CCTimer
 */
- (CCTimer *) scheduleOnce:(SEL) selector delay:(CCTime) delay;

/**
 Unschedule an already scheduled selector. Does nothing if the given selector isn't scheduled.

 @param selector Selector to unschedule. The parameter must be specified with the @selector keyword as `@selector(theSelector:)`.
 */
-(void)unschedule:(SEL)selector;

/** Unschedules all scheduled selectors.
 @note When removing a node from its parent it will automatically unschedule all of its selectors. It is not required to explicitly call this method.
 */
-(void)unscheduleAllSelectors;

/// -----------------------------------------------------------------------
/// @name Transforms and Matrices
/// -----------------------------------------------------------------------

/** Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
 The matrix is in points.
 @see [GLKMatrix4](https://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKMatrix4/index.html)
 @see parentToNodeMatrix
 */
- (GLKMatrix4)nodeToParentMatrix;

/** Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates. The matrix is in points.
 @see nodeToParentMatrix
*/
- (GLKMatrix4)parentToNodeMatrix;

/** Returns the world transform matrix. The matrix is in points.
 @see [GLKMatrix4](https://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKMatrix4/index.html)
 @see nodeToParentMatrix
 @see worldToNodeMatrix
*/
- (GLKMatrix4)nodeToWorldMatrix;

/** Returns the inverse world transform matrix. The matrix is in points.
 @see [GLKMatrix4](https://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKMatrix4/index.html)
 @see nodeToWorldTransform
*/
- (GLKMatrix4)worldToNodeMatrix;

/// -----------------------------------------------------------------------
/// @name Converting Point and Size "Types"
/// -----------------------------------------------------------------------

/** Converts the given position values to a position in points.

 @param position The position values to convert.
 @param type How the input position values should be interpreted.
 @returns The converted position in points.
 @see positionInPoints
 @see CCPositionType, CCPositionUnit, CCPositionReferenceCorner */
- (CGPoint) convertPositionToPoints:(CGPoint)position type:(CCPositionType)type;

/** Converts the given position in points to position values converted based on the provided CCPositionType.

 @param positionInPoints The position in points to convert.
 @param type How the input position values should be converted.
 @returns The position values in the format specified by type.
 @see position
 @see CCPositionType, CCPositionUnit, CCPositionReferenceCorner */
- (CGPoint) convertPositionFromPoints:(CGPoint)positionInPoints type:(CCPositionType) type;

/** Converts the given content size values to a size in points.

 @param contentSize The contentSize values to convert.
 @param type How the input contentSize values should be interpreted.
 @returns The converted size in points.
 @see contentSizeInPoints
 @see CCSizeType, CCSizeUnit */
- (CGSize) convertContentSizeToPoints:(CGSize)contentSize type:(CCSizeType) type;

/** Converts the given size in points to size values converted based on the provided CCSizeType.

 @param pointSize The size in points to convert.
 @param type How the input size values should be converted.
 @returns The size values in the format specified by type.
 @see contentSize
 @see CCSizeType, CCSizeUnit */
- (CGSize) convertContentSizeFromPoints:(CGSize)pointSize type:(CCSizeType) type;

/// -----------------------------------------------------------------------
/// @name Converting to and from the Node's Coordinate System
/// -----------------------------------------------------------------------

/**
 *  Converts a Point to node (local) space coordinates. The result is in Points.
 *
 *  @param worldPoint World position in points.
 *
 *  @return Local position in points.
 */
- (CGPoint)convertToNodeSpace:(CGPoint)worldPoint;

/**
 *  Converts a Point to world space coordinates. The result is in Points.
 *
 *  @param nodePoint Local position in points.
 *
 *  @return World position in points.
 */
- (CGPoint)convertToWorldSpace:(CGPoint)nodePoint;

/**
 *  Converts a Point to node (local) space coordinates. The result is in Points.
 *  Treats the returned/received node point as relative to the anchorPoint.
 *
 *  @param worldPoint World position in points.
 *
 *  @return Local position in points.
 */
- (CGPoint)convertToNodeSpaceAR:(CGPoint)worldPoint;

/**
 *  Converts a local Point to world space coordinates. The result is in Points.
 *  Treats the returned/received node point as relative to the anchorPoint.
 *
 *  @param nodePoint Local position in points.
 *
 *  @return World position in points.
 */
- (CGPoint)convertToWorldSpaceAR:(CGPoint)nodePoint;

/**
 *  Converts a local Point to Window space (UIKit) coordinates. The result is in Points.
 *
 *  @param nodePoint Local position in points.
 *
 *  @return UI position in points.
 */
- (CGPoint)convertToWindowSpace:(CGPoint)nodePoint;

/// -----------------------------------------------------------------------
/// @name Visibility and Draw Order
/// -----------------------------------------------------------------------

/** Whether the node and its children are visible. Default is YES.

 @note The children nodes will not change their visible property. Nevertheless they won't be drawn if their parent's visible property is NO.
 This means even if a node's visible property may be YES it could still be invisible if one of its parents has visible set to NO.

 @note Nodes that are not visible will not be rendered. For recurring use of the same nodes it is typically more
 efficient to temporarily set `node.visible = NO` compared to removeFromParent and a subsequent addChild:. */
@property(nonatomic,readwrite,assign) BOOL visible;

/** The draw order of the node relative to its sibling (having the same parent) nodes. The default is 0.

 A zOrder of less than 0 will draw nodes behind their parent, a zOrder of 0 or greater will make the nodes draw in front
 of their parent.

 A parent nodes with a lower zOrder value will have itself and its children drawn behind another parent node with a higher zOrder value.
 The zOrder property only affects sibling nodes and their parent, it can not be used to change the draw order of nodes with different
 parents - in that case adjust the parent node's zOrder.

 @note Any sibling nodes with the same zOrder will be drawn in the order they were added as children. It is slightly more efficient
 (and certainly less confusing) to make this natural order work to your advantage.
 */
@property(nonatomic,assign) NSInteger zOrder;

/// -----------------------------------------------------------------------
/// @name Color
/// -----------------------------------------------------------------------

/** Sets and returns the node's color. Alpha is ignored. Changing color has no effect on non-visible nodes (ie CCNode, CCScene).

 @note By default color is not "inherited" by child nodes. This can be enabled via cascadeColorEnabled.
 @see CCColor
 @see colorRGBA
 @see opacity
 @see cascadeColorEnabled
 */
@property (nonatomic,strong) CCColor* color;

/** Sets and returns the node's color including alpha. Changing color has no effect on non-visible nodes (ie CCNode, CCScene).

 @note By default color is not "inherited" by child nodes. This can be enabled via cascadeColorEnabled.
 @see CCColor
 @see color
 @see opacity
 @see cascadeColorEnabled
*/
@property (nonatomic,strong) CCColor* colorRGBA;

/** Returns the actual color used by the node. This may be different from the color and colorRGBA properties if the parent
 node has cascadeColorEnabled.

 @see CCColor
 @see color
 @see colorRGBA
*/
@property (nonatomic, readonly) CCColor* displayedColor;

/**
 CascadeColorEnabled causes changes to this node's color to cascade down to it's children. The new color is multiplied
 in with the color of each child, so it doesn't bash the current color of those nodes. Opacity is unaffected by this
 property, see cascadeOpacityEnabled to change the alpha of nodes.
 @see color
 @see colorRGBA
 @see displayedColor
 @see opacity
 */
@property (nonatomic, getter = isCascadeColorEnabled) BOOL cascadeColorEnabled;

// purposefully undocumented: internal method users needn't know about
/*
 *  Recursive method that updates display color.
 *
 *  @param color Color used for update.
 */
- (void)updateDisplayedColor:(GLKVector4)color;

/// -----------------------------------------------------------------------
/// @name Opacity (Alpha)
/// -----------------------------------------------------------------------

/**
 Sets and returns the opacity in the range 0.0 (fully transparent) to 1.0 (fully opaque).

 @note By default opacity is not "inherited" by child nodes. This can be enabled via cascadeOpacityEnabled.
 @warning If the the texture has premultiplied alpha then the RGB channels will be modified.
 */
@property (nonatomic) CGFloat opacity;

/** Returns the actual opacity, in the range 0.0 to 1.0. This may be different from the opacity property if the parent
 node has cascadeOpacityEnabled.
 @see opacity */
@property (nonatomic, readonly) CGFloat displayedOpacity;

/**
 CascadeOpacity causes changes to this node's opacity to cascade down to it's children. The new opacity is multiplied
 in with the opacity of each child, so it doesn't bash the current opacity of those nodes. Color is unaffected by this
 property. See cascadeColorEnabled for color changes.
 @see opacity
 @see displayedOpacity
 */
@property (nonatomic, getter = isCascadeOpacityEnabled) BOOL cascadeOpacityEnabled;

// purposefully undocumented: internal method users needn't know about
/*
 *  Recursive method that updates the displayed opacity.
 *
 *  @param opacity Opacity to use for update.
 */
- (void)updateDisplayedOpacity:(CGFloat)opacity;

/// -----------------------------------------------------------------------
/// @name Rendering (Implemented in Subclasses)
/// -----------------------------------------------------------------------

/**
 Override this method to add custom rendering code to your node.

 @note You should only use Cocos2D's CCRenderer API to modify the render state and shaders. For further info, please see the CCRenderer documentation.
 @warning You **must not** call `[super draw:transform:];`

 @param renderer The CCRenderer instance to use for drawing.
 @param transform The parent node's transform.
 @see CCRenderer
 */
-(void)draw:(CCRenderer *)renderer transform:(const GLKMatrix4 *)transform;

// purposefully undocumented: internal method, users should prefer to implement draw:transform:
/* Recursive method that visit its children and draw them.
 * @param renderer The CCRenderer instance to use for drawing.
 * @param parentTransform The parent node's transform.
 */
-(void) visit:(CCRenderer *)renderer parentTransform:(const GLKMatrix4 *)parentTransform;

// purposefully undocumented: users needn't override/implement visit in their own subclasses
/* Calls visit:parentTransform: using the current renderer and projection. */
-(void) visit;

/// -----------------------------------------------------------------------
/// @name Scene Management (Implemented in Subclasses)
/// -----------------------------------------------------------------------

/** Called every time the CCNode (or one of its parents) has been added to the scene, or when the scene is presented.
 If a new scene is presented with a transition, this event is sent to nodes when the transition animation starts.

 @warning You must call `[super onEnter]` in your own implementation.
 @see onExit
 @see onEnterTransitionDidFinish
 */
-(void) onEnter __attribute__((objc_requires_super));

/** Called every time the CCNode (or one of its parents) has been added to the scene, or when the scene is presented.
 If a new scene is presented with a transition, this event is sent to nodes after the transition animation ended. Otherwise
 it will be called immediately after onEnter.

 @warning You must call `[super onEnterTransitionDidFinish]` in your own implementation.
 @see onEnter
 @see onExit
 */
-(void) onEnterTransitionDidFinish __attribute__((objc_requires_super));

/** Called every time the CCNode is removed from the node tree.
 If a new scene is presented with a transition, this event is sent when the transition animation ended.

 @warning You must call `[super onExit]` in your own implementation.
 @see onEnter
 @see onExitTransitionDidStart
 */
-(void) onExit __attribute__((objc_requires_super));

/** Called every time the CCNode is removed from the node tree.
 If a new scene is presented with a transition, this event is sent when the transition animation starts.

 @warning You must call `[super onExitTransitionDidStart]` in your own implementation.
 @see onExit
 @see onEnter
 */
-(void) onExitTransitionDidStart __attribute__((objc_requires_super));

/// -----------------------------------------------------------------------
/// @name Physics Body
/// -----------------------------------------------------------------------

/** The physics body (if any) that this node is attached to.
 Initialize and assign a CCPhysicsBody instance to this property to have the node participate in the physics simulation.
 @see CCPhysicsBody
 @see physicsNode
 */
@property(nonatomic, strong) CCPhysicsBody *physicsBody;

@end


text:
import { Request } from "express";

export default interface IGripExpressRequest extends Request {
    _body: boolean;
}


text:
/**
 * Nate Chambers
 * Stanford University
 * October 2009
 */

package nate;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
import java.util.Vector;
import java.util.Set;
import java.util.HashSet;

import opennlp.tools.lang.english.TreebankLinker;
import opennlp.tools.coref.LinkerMode;
import opennlp.tools.parser.Parse;
import opennlp.tools.coref.DiscourseEntity;
import opennlp.tools.coref.Linker;
import opennlp.tools.coref.mention.DefaultParse;
import opennlp.tools.coref.mention.Mention;
import opennlp.tools.coref.mention.MentionContext;
import opennlp.tools.coref.mention.PTBMentionFinder;
//import opennlp.tools.parser.ParserME;
import opennlp.tools.util.Span;

import nate.util.WordNet;
import nate.util.Ling;

/**
 * Runs the opennlp coref system over parse trees.<br>
 * Processes the parse trees and stores the list of entities.
 */
public class Coref {
	TreebankLinker linker;
	List<Mention> document = new ArrayList<Mention>();
	int sentenceNumber = 1;

	public Coref(String resource) {
		try {
			linker = new TreebankLinker(resource, LinkerMode.TEST);
		} catch( Exception ex ) { ex.printStackTrace(); }
	}

	public void reset() {
		sentenceNumber = 1;
		document.clear();
	}

	public List<EntityMention> processParses(Collection<String> parses) {
//	  System.out.println("in opennlp processParses with " + parses.size());
		// reset the document to be empty
		reset();
		// process each parse
		for( String parse : parses ) processParse(parse);
		// return the entities
		return getEntities();
	}

	public void processParse(String parse) {
//	  System.out.println("parse = " + parse);
		parse = parse.replaceAll("ROOT","TOP"); // TOP token for opennlp

		//    System.out.println(parse + "\nlength=" + parse.length() + "\n");
		if( parse.length() > 35 ) {
			//      System.out.println("Adding to document");
			try {
				Parse p = Parse.parseParse(parse);
				DefaultParse dp = new DefaultParse(p,sentenceNumber);

//					System.out.println(p);
//					p.show();
//					System.out.println("Size " + dp.getTokens().size());
//					System.out.println(dp.getTokens());
//					System.out.flush();

				// The getMentions(dp) call freezes on long sentences, usually lists of names and things.
				// I found the 165 size to be the smallest one that froze.
				if( dp.getTokens().size() < 165 ) {

				  Mention[] extents = linker.getMentionFinder().getMentions(dp);
				  //				System.out.println("extents: " + Arrays.toString(extents));
				  //				System.out.flush();

				  // construct new parses for mentions which don't have constituents.
				  //
				  // This code finds parse referents: (NP (PRP$ their) (NN group))
				  // And adds a new NML parent: (NP (NML (PRP$ their)) (NN group))
				  for (int ei=0,en=extents.length;ei<en;ei++) {
				    if (extents[ei].getParse() == null) {
//				      Parse snp = new Parse(p.getText(), extents[ei].getSpan(), "NML", 1.0);
//				      p.insert(snp);
//				      extents[ei].setParse(new DefaultParse(snp,sentenceNumber));
				    }
				  }

				  //				    System.out.println("now:     " + Arrays.toString(extents));
				  document.addAll(Arrays.asList(extents));
				}
				else System.out.println("OpenNLP skipping long sentence: " + p);
			} catch( Exception ex ) {
				System.out.println("--OPENNLP EXCEPTION-- (processParse) Parse skipped...");
				ex.printStackTrace();
			}
		}
		sentenceNumber++;

		/*
      if (document.size() > 0) {
      DiscourseEntity[] entities = linker.getEntities((Mention[]) document.toArray(new Mention[document.size()]));
      showEntities(entities);
      System.out.println("Altering parse trees:");

      List parses = new ArrayList();
      parses.add(p);
      (new CorefParse(parses,entities)).show();
      }
		 */
	}

	public List<EntityMention> getEntities() {
		// This throws an exception when the extents are added
		// correctly.  Sometimes an NML tag is inserted in the wrong place
		// in the tree, and this following code crashes.
		try {
			if( document.size() > 0 ) {
				DiscourseEntity[] entities = linker.getEntities((Mention[]) document.toArray(new Mention[document.size()]));
				//    showEntities(entities);

				// Create mentions of the entities
				List<EntityMention> newmentions = new ArrayList<EntityMention>();
				int i = 0;
				for( DiscourseEntity entity : entities ) {
					for( Iterator<MentionContext> iter = entity.getMentions(); iter.hasNext(); ) {
						MentionContext mc = iter.next();
						EntityMention mention = new EntityMention(mc.getSentenceNumber(),
								mc.toText(), mc.getSpan(), i);
						newmentions.add(mention);
					}
					i++;
				}

				return newmentions;
			}
		} catch( Exception ex ) {
			System.out.println("--OPENNLP EXCEPTION-- (getEntities) Must ignore document...");
			ex.printStackTrace();
		}

		return null;
	}

	public void run() {
		List<Parse> parses = new ArrayList<Parse>();
		String lines[] = {"(TOP (S (NP (person (NNP Dave))) (VP (VBD left) (NP (NP (DT the) (NN job) (JJ first) (NN thing)) (PP (IN in) (NP (DT the) (NN morning))))) (. .)) )", "(TOP (S (NP (PRP He)) (VP (VP (VBD drank) (NP (NP (NNS lots)) (PP (IN of) (NP (NN coffee))))) (CC and) (VP (VBD picked) (NP (PRP her)) (PRT (RP up)))) (. .)) )" };

		for( int i = 0; i < lines.length; i++ ) {
			String line = lines[i];

			Parse p = Parse.parseParse(line);
			parses.add(p);
			Mention[] extents = linker.getMentionFinder().getMentions(new DefaultParse(p,sentenceNumber));
			System.out.println("extents: " + Arrays.toString(extents));
			//construct new parses for mentions which don't have constituents.
			for (int ei=0,en=extents.length;ei<en;ei++) {
				if (extents[ei].getParse() == null) {
//					Parse snp = new Parse(p.getText(),extents[ei].getSpan(),"NML",1.0);
//					p.insert(snp);
//					extents[ei].setParse(new DefaultParse(snp,sentenceNumber));
				}
			}
			System.out.println("now:     " + Arrays.toString(extents));
			document.addAll(Arrays.asList(extents));
			sentenceNumber++;
		}

		if (document.size() > 0) {
			DiscourseEntity[] entities = linker.getEntities((Mention[]) document.toArray(new Mention[document.size()]));
			showEntities(entities);
			System.out.println("Altering parse trees:");
			(new CorefParse(parses,entities)).show();
		}
	}

	private static void showEntities(DiscourseEntity[] entities) {
		for (int ei=0,en=entities.length;ei<en;ei++) {
			System.out.println(ei+" "+entities[ei]);

			Iterator<MentionContext> iter = entities[ei].getMentions();
			while( iter.hasNext() ) {
				MentionContext mc = iter.next();
				System.out.println(mc.getSentenceNumber() + " " + mc.getNounPhraseDocumentIndex() + " " + mc.getNounPhraseSentenceIndex() + " " + mc.getIndexSpan() + " " + mc);
			}

		}
	}

	public static void mergeMentions(int id1, int id2, List<EntityMention> mentions) {
		if( id1 > id2 ) {
			int temp = id1;
			id1 = id2;
			id2 = temp;
		}
		for( EntityMention mention : mentions ) {
			if( mention.entityID() == id2 )
				mention.setEntityID(id1);
		}
	}

	/**
	 * This function takes normal OpenNLP output and merges entities together
	 * that have the same strings.  We use WordNet to lookup the words and
	 * make sure they are unknown ... then merge any entities that have exact matches.
	 */
	public static List<EntityMention> mergeNameEntities(List<EntityMention> mentions,
			WordNet wordnet) {
		Map<String,Set<EntityMention>> unknowns = new HashMap<String,Set<EntityMention>>();
		Set<String> capitalized = new HashSet<String>();
		Set<String> lastwords = new HashSet<String>();
		Map<Integer,List<EntityMention>> byLength = new HashMap<Integer,List<EntityMention>>();

		//    System.out.println("--mergenameentities--");

		for( EntityMention mention : mentions ) {
			// Skip conjunctive mentions.
			if( mention.string().indexOf(" and ") == -1 &&
					mention.string().indexOf(" or ") == -1 ) {
				// split into words.
				String[] words = mention.string().split("\\s+");
				int i = 0;

				// Save mentions in buckets by length of their strings
				if( words.length > 1 ) {
					int length = mention.string().length();
					List<EntityMention> mens = byLength.get(length);
					if( mens == null ) {
						mens = new ArrayList<EntityMention>();
						byLength.put(length, mens);
					}
					mens.add(mention);
				}

				// Save mentions with names.
				for( String word : words ) {
					String lowered = word.toLowerCase();
					if( wordnet.isUnknown(lowered) ) {
						if( !Ling.isPersonPronoun(lowered) &&
								!Ling.isInanimatePronoun(lowered) ) {
							// check if capitalized
							if( Character.isUpperCase(word.charAt(0)) )
								capitalized.add(lowered);
							// check if final word
							if( i == words.length-1 )
								lastwords.add(lowered);
							// save this mention
							Set<EntityMention> seen = unknowns.get(lowered);
							if( seen == null ) {
								seen = new HashSet<EntityMention>();
								unknowns.put(lowered, seen);
							}
							seen.add(mention);
						}
					}
				}
			}
		}

		// Merge (multi-word) mentions with the same exact strings.
		// Multi-word is reliably correct, single words become more ambiguous.
		for( Integer length : byLength.keySet() ) {
			List<EntityMention> mens = byLength.get(length);
			for( int i = 0; i < mens.size()-1; i++ ) {
				for( int j = i+1; j < mens.size(); j++ ) {
					EntityMention mentioni = mens.get(i);
					EntityMention mentionj = mens.get(j);
					if( mentioni.entityID() != mentionj.entityID() ) {
						if( mentioni.string().equalsIgnoreCase(mentionj.string()) ) {
							//	      System.out.println("  -- merging same " + mentioni + " with " + mentionj);
							mergeMentions(mentioni.entityID(), mentionj.entityID(), mentions);
						}
					}
				}
			}
		}

		// Merge mentions with unknown words. --- single word phrases
		for( String word : unknowns.keySet() ) {
			Set<EntityMention> seen = unknowns.get(word);
			if( seen.size() > 1 ) {
				if( capitalized.contains(word) && lastwords.contains(word) ) {
					// find exact matches
					EntityMention[] arr = new EntityMention[seen.size()];
					arr = seen.toArray(arr);
					for( int i = 0; i < arr.length-1; i++ ) {
						for( int j = i+1; j < arr.length; j++ ) {
							EntityMention mentioni = arr[i];
							EntityMention mentionj = arr[j];
							if( mentioni.entityID() != mentionj.entityID() ) {
								if( mentioni.string().equalsIgnoreCase(mentionj.string()) ) {
									//		  System.out.println("  -- merging name " + mentioni + " with " + mentionj);
									mergeMentions(mentioni.entityID(), mentionj.entityID(), mentions);
								}
							}
						}
					}
				}
			}
		}

		return mentions;
	}

	class CorefParse {
		private Map parseMap;
		private List parses;

		public CorefParse(List parses, DiscourseEntity[] entities) {
			this.parses = parses;
			parseMap = new HashMap();
			for (int ei=0,en=entities.length;ei<en;ei++) {
				if (entities[ei].getNumMentions() > 1) {
					for (Iterator mi=entities[ei].getMentions();mi.hasNext();) {
						MentionContext mc = (MentionContext) mi.next();
						Parse mentionParse = ((DefaultParse) mc.getParse()).getParse();
						parseMap.put(mentionParse,new Integer(ei+1));
						//System.err.println("CorefParse: "+mc.getParse().hashCode()+" -> "+ (ei+1));
					}
				}
			}
		}

		public void show() {
			for (int pi=0,pn=parses.size();pi<pn;pi++) {
				Parse p = (Parse) parses.get(pi);
				show(p);
				System.out.println();
			}
		}

		private void show(Parse p) {
			int start;
			start = p.getSpan().getStart();
//			if (!p.getType().equals(ParserME.TOK_NODE)) {
//				System.out.print("(");
//				System.out.print(p.getType());
//				if (parseMap.containsKey(p)) {
//					System.out.print("#"+parseMap.get(p));
//				}
//				//System.out.print(p.hashCode()+"-"+parseMap.containsKey(p));
//				System.out.print(" ");
//			}
			Parse[] children = p.getChildren();
			for (int pi=0,pn=children.length;pi<pn;pi++) {
				Parse c = children[pi];
				Span s = c.getSpan();
				if (start < s.getStart()) {
					System.out.print(p.getText().substring(start, s.getStart()));
				}
				show(c);
				start = s.getEnd();
			}
			System.out.print(p.getText().substring(start, p.getSpan().getEnd()));
//			if (!p.getType().equals(ParserME.TOK_NODE)) {
//				System.out.print(")");
//			}
		}
	}

	public static void main(String[] args) {
		Coref coref = new Coref("/home/nchamber/code/resources/opennlp-tools-1.3.0/models/english/coref");
		//   coref.run();
		coref.processParse("(TOP (S (NP (person (NNP Dave))) (VP (VBD left) (NP (NP (DT the) (NN job) (JJ first) (NN thing)) (PP (IN in) (NP (DT the) (NN morning))))) (. .)) )");
		coref.processParse("(TOP (S (NP (PRP He)) (VP (VP (VBD drank) (NP (NP (NNS lots)) (PP (IN of) (NP (NN coffee))))) (CC and) (VP (VBD picked) (NP (PRP her)) (PRT (RP up)))) (. .)) )");
		System.out.println("Entities: " + coref.getEntities());
	}
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Botanique, Nagpur 9(1-4): 128 (1980)

#### Original name
Palaeoamphisphaerella Ramanujam & Srisailam

### Remarks
null


text:
<?php
//tasks are loaded from the container by 'service', then method 'task' is called with the parameters as first parameter
//the task object/service is loaded from the DI container (see dependencies.php for example)

/*
$tasks['example'] = array(
    'service' => 'examplemodule.task.example',
    'task' => 'exampleTask',
    'parameter' => array(
        'foo' => 'defaultFoo',
        'bar' => false,
        'baz' => 'BAZ'
    ),
    'assign' => array('bar', 'baz')
);
 */


text: this includes `tikz`, `tkz-euclide` and `pgfplots`.


text:
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "/../lib"))
$: << '.'

require 'rspec'
require 'vectorize'