text:
<!DOCTYPE html>

    <title>WritableStream Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>

Core Docs (60% documented)

View on GitHub

        Core Reference

        WritableStream Protocol Reference

            Stream

                ReadableStream

                WritableStream

                DuplexStream

            Logger

                Logger

                – Level

                – Event

                – LocationInfo

                LogAppender

                StandardOutputAppender

            Other Classes

                BufferReadable

                ReadableBuffer

                WritableBuffer

            Other Enums

                EnvironmentError

                System

                SystemError

            Other Extensions

                CharacterSet

                Collection

                Data

                Int

                String

                UUID

                UnsafeRawBufferPointer

            Other Protocols

                BufferInitializable

                BufferRepresentable

                Readable

                Writable

            Other Structs

                Environment

WritableStream

Undocumented

                    open(deadline:)

Undocumented

                    close(deadline:)

Undocumented

© 2017 Zewo. All rights reserved. (Last updated: 2017-06-10)

Generated by jazzy ♪♫ v0.8.1, a Realm project.


text:
import ctypes
import os
import ffi_types
from python_ffi import Yamlate

"""
Python code that tests the C FFI integration
Need to run cargo build --release before running this file
You also need to be in the python/ directory
"""

# load correct library depending on operating system
if os.uname()[0] == 'Darwin':
    lib = ctypes.cdll.LoadLibrary('../target/release/libyamlate.dylib')
else:
    lib = ctypes.cdll.LoadLibrary('../target/release/libyamlate.so')
yamlate = Yamlate(lib)

with yamlate.new_environment() as environment:
    environment.set_integer('hello', 2)
    environment.set_string('world', 'blah')
    environment.set_decimal('blah', 3.14)

    # should print 'blah'
    print 'Environment value for \'world\':', environment.get_string('world')
    # should print '2'
    print 'Environment value for \'hello\':', environment.get_integer('hello')
    # should print '3.14'
    print 'Environment value for \'blah\':', environment.get_decimal('blah')

    with open('../examples/example.yaml', 'r') as yaml_file:
        data = yaml_file.read()

        with yamlate.new_yaml_from_str(data) as root_yaml:
            with root_yaml.hash_get('blah') as blah_yaml:
                print 'Blah\'s type:', ffi_types.yaml_type_to_str(blah_yaml.type())
                # should print '2'
                print 'Blah\'s value:', blah_yaml.get_integer()

            with root_yaml.hash_get('foo') as foo_yaml:
                print 'Foo\'s type:', ffi_types.yaml_type_to_str(foo_yaml.type())
                print 'Foo array length:', foo_yaml.array_len()
                with foo_yaml.array_get(0) as sub_yaml:
                    print 'Foo\'s first array element type:', ffi_types.yaml_type_to_str(sub_yaml.type())

                with foo_yaml.evaluate(environment) as result:
                    # should print '10
                    print 'Foo\'s value:', result.get_integer()

            print 'Root\'s type:', ffi_types.yaml_type_to_str(root_yaml.type())
            # should print ['blah', 'foo']
            print 'Root keys:', root_yaml.hash_keys()

redpajama_set_name: RedPajamaGithub


text:
<?hh

namespace Facebook\HackCodegen;

require_once('vendor/autoload.php');
require_once('core/DormSchema.php');
require_once('core/DormField.php');
require_once('CodegenDorm.php');
require_once('CodegenMutator.php');

if ($argc == 1) {
  echo "  Usage: ".$argv[0]." file_name.php\n\n";
  exit(1);
}
$fname = $argv[1];
if (!file_exists($fname)) {
  echo "  File doesn't exist: $fname\n\n";
  exit(1);
}

$classes = get_declared_classes();
require_once($fname);
$new_classes = array_diff(get_declared_classes(), $classes);

foreach($new_classes as $class_name) {
  $ref = new \ReflectionClass($class_name);
  if ($ref->isAbstract()) {
    continue;
  }
  $instance = $ref->newInstance();
  if (!$instance instanceof DormSchema) {
    continue;
  }
  echo "Generating code for $class_name\n";
  (new CodegenDorm($instance))->generate();
  (new CodegenMutator($instance))->generate();
}


text:
// The following code inverts the matrix input using LU-decomposition with
// backsubstitution of unit vectors. Reference: Numerical Recipies in C, 2nd
// ed., by Press, Teukolsky, Vetterling & Flannery.
// Code written by Fredrik Orderud.
// http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LU_Matrix_Inversion

#ifndef INVERT_MATRIX_HPP
#define INVERT_MATRIX_HPP

// REMEMBER to update "lu.hpp" header includes from boost-CVS
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/vector_proxy.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/triangular.hpp>
#include <boost/numeric/ublas/lu.hpp>
#include <boost/numeric/ublas/io.hpp>

namespace ublas = boost::numeric::ublas;

/* Matrix inversion routine.
   Uses lu_factorize and lu_substitute in uBLAS to invert a matrix */
template<class T>
bool invert_matrix(const ublas::matrix<T>& input, ublas::matrix<T>& inverse)
{
    using namespace boost::numeric::ublas;
    typedef permutation_matrix<std::size_t> pmatrix;
    // create a working copy of the input
    matrix<T> A(input);
    // create a permutation matrix for the LU-factorization
    pmatrix pm(A.size1());

    // perform LU-factorization
    int res = lu_factorize(A,pm);
    if( res != 0 ) return false;

    // create identity matrix of "inverse"
    inverse.assign(ublas::identity_matrix<T>(A.size1()));

    // backsubstitute to get the inverse
    lu_substitute(A, pm, inverse);

    return true;
}

#endif //INVERT_MATRIX_HPP


text:
require_relative "./helper"

class TestClassifier < Minitest::Test
  include Linguist

  def fixture(name)
    File.read(File.join(samples_path, name))
  end

  def test_classify
    db = {}
    Classifier.train! db, "Ruby", fixture("Ruby/foo.rb")
    Classifier.train! db, "Objective-C", fixture("Objective-C/Foo.h")
    Classifier.train! db, "Objective-C", fixture("Objective-C/Foo.m")

    results = Classifier.classify(db, fixture("Objective-C/hello.m"))
    assert_equal "Objective-C", results.first[0]

    tokens  = Tokenizer.tokenize(fixture("Objective-C/hello.m"))
    results = Classifier.classify(db, tokens)
    assert_equal "Objective-C", results.first[0]
  end

  def test_restricted_classify
    db = {}
    Classifier.train! db, "Ruby", fixture("Ruby/foo.rb")
    Classifier.train! db, "Objective-C", fixture("Objective-C/Foo.h")
    Classifier.train! db, "Objective-C", fixture("Objective-C/Foo.m")

    results = Classifier.classify(db, fixture("Objective-C/hello.m"), ["Objective-C"])
    assert_equal "Objective-C", results.first[0]

    results = Classifier.classify(db, fixture("Objective-C/hello.m"), ["Ruby"])
    assert_equal "Ruby", results.first[0]
  end

  def test_instance_classify_empty
    results = Classifier.classify(Samples.cache, "")
    assert results.first[1] < 0.5, results.first.inspect
  end

  def test_instance_classify_nil
    assert_equal [], Classifier.classify(Samples.cache, nil)
  end

  def test_classify_ambiguous_languages
    Samples.each do |sample|
      language  = Linguist::Language.find_by_name(sample[:language])
      languages = Language.find_by_filename(sample[:path]).map(&:name)
      next if languages.length == 1

      languages = Language.find_by_extension(sample[:path]).map(&:name)
      next if languages.length <= 1

      results = Classifier.classify(Samples.cache, File.read(sample[:path]), languages)
      assert_equal language.name, results.first[0], "#{sample[:path]}\n#{results.inspect}"
    end
  end

  def test_classify_empty_languages
    assert_equal [], Classifier.classify(Samples.cache, fixture("Ruby/foo.rb"), [])
  end
end


text:
package org.apache.beam.sdk.util;

import java.util.Map;
import javax.annotation.Nullable;

/**
 * A collection of static methods for manipulating value representations
 * transfered via the Dataflow API.
 */
public final class Values {
  private Values() {}  // Non-instantiable

  public static Boolean asBoolean(Object value) throws ClassCastException {
    @Nullable Boolean knownResult = checkKnownValue(CloudKnownType.BOOLEAN, value, Boolean.class);
    if (knownResult != null) {
      return knownResult;
    }
    return Boolean.class.cast(value);
  }

  public static Double asDouble(Object value) throws ClassCastException {
    @Nullable Double knownResult = checkKnownValue(CloudKnownType.FLOAT, value, Double.class);
    if (knownResult != null) {
      return knownResult;
    }
    if (value instanceof Double) {
      return (Double) value;
    }
    return ((Float) value).doubleValue();
  }

  public static Long asLong(Object value) throws ClassCastException {
    @Nullable Long knownResult = checkKnownValue(CloudKnownType.INTEGER, value, Long.class);
    if (knownResult != null) {
      return knownResult;
    }
    if (value instanceof Long) {
      return (Long) value;
    }
    return ((Integer) value).longValue();
  }

  public static String asString(Object value) throws ClassCastException {
    @Nullable String knownResult = checkKnownValue(CloudKnownType.TEXT, value, String.class);
    if (knownResult != null) {
      return knownResult;
    }
    return String.class.cast(value);
  }

  @Nullable
  private static <T> T checkKnownValue(CloudKnownType type, Object value, Class<T> clazz) {
    if (!(value instanceof Map)) {
      return null;
    }
    Map<String, Object> map = (Map<String, Object>) value;
    @Nullable String typeName = (String) map.get(PropertyNames.OBJECT_TYPE_NAME);
    if (typeName == null) {
      return null;
    }
    @Nullable CloudKnownType knownType = CloudKnownType.forUri(typeName);
    if (knownType == null || knownType != type) {
      return null;
    }
    @Nullable Object scalar = map.get(PropertyNames.SCALAR_FIELD_NAME);
    if (scalar == null) {
      return null;
    }
    return knownType.parse(scalar, clazz);
  }
}


text:
// ======================================================================== //
// Copyright 2009-2015 Intel Corporation                                    //
//                                                                          //
// Licensed under the Apache License, Version 2.0 (the "License");          //
// you may not use this file except in compliance with the License.         //
// You may obtain a copy of the License at                                  //
//                                                                          //
//     http://www.apache.org/licenses/LICENSE-2.0                           //
//                                                                          //
// Unless required by applicable law or agreed to in writing, software      //
// distributed under the License is distributed on an "AS IS" BASIS,        //
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
// See the License for the specific language governing permissions and      //
// limitations under the License.                                           //
// ======================================================================== //

#pragma once

#include "parallel_for_for.h"
#include "parallel_prefix_sum.h"

namespace embree
{
  template<typename Value>
    struct ParallelForForPrefixSumState : public ParallelForForState
  {
    __forceinline ParallelForForPrefixSumState () {}

    template<typename ArrayArray>
      __forceinline ParallelForForPrefixSumState (ArrayArray& array2, const size_t minStepSize)
      : ParallelForForState(array2,minStepSize) {}

    ParallelPrefixSumState<Value> prefix_state;
  };

  template<typename ArrayArray, typename Index, typename Value, typename Func, typename Reduction>
    __forceinline Value parallel_for_for_prefix_sum( ParallelForForPrefixSumState<Value>& state, ArrayArray& array2, Index minStepSize,
						     const Value& identity, const Func& func, const Reduction& reduction)
  {
    /* calculate number of tasks to use */
    const size_t taskCount = state.taskCount;

    /* perform parallel prefix sum */
    parallel_for(taskCount, [&](const size_t taskIndex)
    {
      const size_t k0 = (taskIndex+0)*state.size()/taskCount;
      const size_t k1 = (taskIndex+1)*state.size()/taskCount;
      size_t i0 = state.i0[taskIndex];
      size_t j0 = state.j0[taskIndex];

      /* iterate over arrays */
      size_t k=k0;
      Value N=identity;
      for (size_t i=i0; k<k1; i++) {
	const size_t size = array2[i] ? array2[i]->size() : 0;
        const size_t r0 = j0, r1 = min(size,r0+k1-k);
        if (r1 > r0) N = reduction(N, func(array2[i],range<size_t>(r0,r1),k,reduction(state.prefix_state.sums[taskIndex],N)));
        k+=r1-r0; j0 = 0;
      }
      state.prefix_state.counts[taskIndex] = N;
    });

    /* calculate prefix sum */
    Value sum=identity;
    for (size_t i=0; i<taskCount; i++)
    {
      const Value c = state.prefix_state.counts[i];
      state.prefix_state.sums[i] = sum;
      sum=reduction(sum,c);
    }

    return sum;
  }

   template<typename ArrayArray, typename Value, typename Func, typename Reduction>
    __forceinline Value parallel_for_for_prefix_sum( ParallelForForPrefixSumState<Value>& state, ArrayArray& array2,
						     const Value& identity, const Func& func, const Reduction& reduction)
  {
    return parallel_for_for_prefix_sum(state,array2,size_t(1),identity,func,reduction);
  }
}


text:
package org.apache.slide.event;

import java.util.EventListener;

/**
 * Generic event listener interface
 *
 * @version $Revision: 1.2 $
 */
public interface GenericEventListener extends EventListener {
    public void vetoableEventFired(GenericEvent event) throws VetoException;

    public void eventFired(GenericEvent event);
}


text:
var Aria = require("../Aria");
var ariaUtilsType = require("../utils/Type");
var ariaUtilsArray = require("../utils/Array");
var ariaUtilsQueryString = require("../utils/QueryString");

/**
 * This class drives the test execution by looping on all Tests it is associated to.

 * It also acts as test listener and maintains global informations on the test executions (e.g. what test have been run,
 * how many failures found, etc...). Some UI listeners can be associated to it to display real-time information to the
 * user.

 * Note: Tests are run in an asynchronous way in order to give HTML UIs the possibility to refresh information
 * (otherwise the refresh would only occur at the end of the Thread execution)

 * Note: This class doesn't display any information - see TestRunner to get a runner with an HTML UI
 */
module.exports = Aria.classDefinition({
    $classpath : "aria.jsunit.TestEngine",
    $events : {
        "change" : {
            description : "raised when some data have changed in the test report",
            properties : {
                testReport : "{Object} the test report object",
                changeType : "{Enum} error | failure | testStart | testEnd | testProcessingState"
            }
        }
    },
    $constructor : function () {
        /**
         * Data model representing the test report in real time This data model is a tree where each node as the
         * following structure:
         *
         *

         * [Test]
         * : {
         *      testClass : {String) test classpath
         *      totalNbrOfFailures : {Integer} total number of failures (including sub tests)
         *      totalNbrOfErrors : {Integer} total number of errors (including sub tests)
         *      totalNbrOfAsserts : {Integer} total number of assertions (including sub tests)
         *      state : {String} "loaded", "processing" or "done"
         *      processingState : {String} description of the internal state when processing
         *      subTests : [{Test}] Array of sub-tests - null if none
         *      failures: [{TestFailure}] Array of failures discovered in this test (doesn't include sub-tests)
         *      errors:[{TestError}] Array of the errors caught in this test
         * }
         *
         * [TestFailure] : {
         *      testState: {String} name of the test method in which the failure was found,
         *      description: {String} Failure description
         * }
         *
         * [TestError] : {
         *      testState: {String} name of the test method in which the error was caught,
         *      description: {String} Error description,
         *      exception: {Error} The error object caught in the catchstatement
         * }
         *

         */
        this.testReport = null;

        /**
         * Internal stack used to retrieve a test parent
         * @private
         */
        this._testStack = [];

        /**
         * Last test in the test stack
         * @private
         */
        this._currentTest = null;

        /**
         * Flag checking if the test campaign is finished
         * @type Boolean
         */
        this._isFinished = false;

        /**
         * Whether each test should be run in an isolated environment (iframe)
         * @type Boolean
         */
        this.runIsolated = false;
    },
    $destructor : function () {
        this.testReport = null;
    },
    $prototype : {
        /**
         * Main method called to start a test execution
         * @param {aria.jsunit.Test} testObject the Test to run
         * @param {Array} skipTests A collection of tests to be skipped (Test case or Test suite)
         */
        runTest : function (testObject, skipTests) {
            this.skipTests = skipTests;
            this._registerAsListener(testObject);
            testObject.run();
        },

        /**
         * Event listener called when a failure is discovered in one of the test that the current class is listening to
         * @param {Object} evt the event object
         * @private
         */
        _onFailure : function (evt) {
            // TODO check evt.testClass
            if (this._currentTest.failures == null) {
                this._currentTest.failures = [];
            }

            this._currentTest.failures.push({
                testState : evt.testState,
                description : evt.description
            });

            // increment nbr of failures in all test stack
            var sz = this._testStack.length;
            for (var i = 0; sz > i; i++) {
                this._testStack[i].totalNbrOfFailures++;
            }
            this._raiseChange("failure");
        },

        /**
         * Event listener called when an error is caught in the current test Test report data model is updated
         * @param {Object} evt the event object
         * @private
         */
        _onError : function (evt) {
            // TODO extract exception msg (browser dependent)
            if (this._currentTest.errors == null)
                this._currentTest.errors = [];
            this._currentTest.errors.push({
                testState : evt.testState,
                description : evt.msg,
                exception : evt.exception
            });
            // increment nbr of errors in all test stack
            var sz = this._testStack.length;
            for (var i = 0; sz > i; i++)
                this._testStack[i].totalNbrOfErrors++;

            this._raiseChange("error");
        },

        /**
         * Event listener called when a new test is loaded by a sub-test Note: Test report is not updated as long as the
         * test hasn't started
         * @param {Object} evt the event object
         * @private
         */
        _onTestLoad : function (evt) {
            var testObject = evt.testObject, classpath = testObject.$classpath;

            // verify if the test is supposed to be skipped and store the value
            if (this.skipTests != null && ariaUtilsArray.contains(this.skipTests, testObject.$classpath)) {
                testObject.skipTest = true;
            }
            // verify also that it doesn't extend from a skipped test
            do {
                var definition = Aria.nspace(classpath).classDefinition;
                if (!definition) {
                    break;
                }
                if (ariaUtilsArray.contains(this.skipTests, definition.$extends)) {
                    testObject.skipTest = true;
                }
                classpath = definition.$extends;
            } while (classpath);
            this._registerAsListener(testObject);
        },

        /**
         * Event listener called when a new test execution starts Test report data model is updated to integrate the new
         * test
         * @param {Object} evt the event object
         * @private
         */
        _onTestStart : function (evt) {
            // add new test in the model
            var tst = {
                testClass : evt.testObject.$classpath,
                instance : evt.testObject,
                totalNbrOfFailures : evt.testObject._failedOnCreate ? 1 : 0,
                totalNbrOfErrors : 0,
                totalNbrOfAsserts : 0,
                state : "processing",
                processingState : "",
                subTests : null,
                failures : null,
                errors : null,
                retryURL : this._getRetryTestUrl(evt.testObject.$classpath)
            };
            var sz = this._testStack.length;
            if (sz === 0) {
                this._testStack.push(tst);
                this.testReport = tst;
            } else {
                // add test in parent subTests list
                var parentTest = this._testStack[sz - 1];
                if (parentTest.subTests == null)
                    parentTest.subTests = [];
                parentTest.subTests.push(tst);

                this._testStack.push(tst);
            }
            this._currentTest = tst;
            this._raiseChange("testStart");
        },

        /**
         * Event listener called when a test terminates The internal testStack and the data model must be thus updated
         * @param {Object} evt the event object
         * @private
         */
        _onTestEnd : function (evt) {
            // unregister from the test object
            evt.testObject.$unregisterListeners(this);

            // change processing state and process execution time
            this._currentTest.processingState = "";

            // set the correct state if the test was skipped
            if (evt.testObject.skipTest) {
                this._currentTest.state = "skipped";
            } else {
                this._currentTest.state = "done";
            }

            // increment nbr of assertions in all test stack
            if (evt.nbrOfAsserts) {
                this._currentTest.totalNbrOfAsserts += evt.nbrOfAsserts;
            }

            // remove test from the stack
            this._testStack.pop();
            var sz = this._testStack.length;
            if (sz > 0) {
                this._currentTest = this._testStack[sz - 1];
            } else {
                this._currentTest = null; // last test !
                this._isFinished = true;
            }
            this._raiseChange("testEnd");
        },

        /**
         * Retrieve the status of the test campaign
         * @return {Boolean}
         */
        isFinished : function () {
            return this._isFinished === true;
        },

        /**
         * Event listenere called when a test state changes
         * @param {Object} evt the event object
         * @private
         */
        _onStateChange : function (evt) {
            // update the processingState data
            this._currentTest.processingState = evt.testState;
            this._raiseChange("testProcessingState");
        },

        /**
         * Internal method used to register as a listener on a new test object
         * @param {Object} testObject the test object to register to
         * @private
         */
        _registerAsListener : function (testObject) {
            if (this.runIsolated && ariaUtilsType.isInstanceOf(testObject, 'aria.jsunit.TestSuite')) {
                testObject.runIsolated = true;
            }
            testObject.$on({
                'failure' : this._onFailure,
                'error' : this._onError,
                'start' : this._onTestStart,
                'end' : this._onTestEnd,
                'stateChange' : this._onStateChange,
                'testLoad' : this._onTestLoad,
                scope : this
            });
        },

        /**
         * Raise a change event. The event is not raised if the test is paused, but queued
         * @param {String} changeType Type of change event
         * @private
         */
        _raiseChange : function (changeType) {
            this.$raiseEvent({
                name : "change",
                testReport : this.testReport,
                changeType : changeType
            });
        },

        /**
         * Compute the URL to use to retry a given test This has __NOTHING__ to do in this class but will do for now
         * @private
         * @param {String} testClasspath
         * @return {String} the URL to use to retry the test
         */
        _getRetryTestUrl : function (testClasspath) {
            var queryStringUtil = ariaUtilsQueryString;
            queryStringUtil.getKeyValue("testClasspath");
            var keyValues = queryStringUtil.keyValues;
            keyValues["testClasspath"] = testClasspath;

            var keyValuesArray = [];

            for (var i in keyValues) {
                if (!keyValues.hasOwnProperty(i) || i == "store") {
                    continue;
                }
                keyValuesArray.push([i, keyValues[i]].join("="));
            }
            var searchValue = "?" + keyValuesArray.join("&");

            var window = Aria.$frameworkWindow;
            var retryLinkHref = window.location.href.replace(/#$/, "");
            retryLinkHref = retryLinkHref.replace(window.location.search, "");
            retryLinkHref = retryLinkHref + searchValue;
            return retryLinkHref;
        },

        /**
         * Return the instance of the current running test
         * @return {Object} test,
         * @see _onTestStart
         */
        getCurrentTest : function () {
            return this._currentTest;
        },

        /**
         * Pause the test execution
         * @param {aria.core.CfgBeans:Callback} cb Called when the current test is paused
         */
        pause : function (cb) {
            var instance = this._currentTest.instance, suite;

            if (instance.$TestSuite) {
                suite = instance;
            } else {
                suite = this._testStack[this._testStack.length - 2].instance;
            }

            if (!suite || !suite.$TestSuite) {
                this.$logError("Pause couldn't find a test suite to pause");
                this.$callback(cb);
            } else {
                suite.pause(cb);
            }
        },

        /**
         * Resume the test execution
         * @param {aria.core.CfgBeans:Callback} cb Called before the next test starts
         */
        resume : function (cb) {
            var instance = this._currentTest.instance;

            // Since pause waits for the end of a test, _currentTest should always be a test suite
            instance.resume(cb);
        }
    }
});


text:
import expect = require('expect.js');

import {
  Message, sendMessage
} from 'phosphor/lib/core/messaging';

import {
  PanelLayout
} from 'phosphor/lib/ui/panel';

import {
  Widget, WidgetMessage
} from 'phosphor/lib/ui/widget';

import {
  MarkdownWidget, MarkdownWidgetFactory
} from '../../../lib/markdownwidget/widget';

import {
  DocumentModel
} from '../../../lib/docregistry';

import {
  MockContext
} from '../docmanager/mockcontext';

import {
  defaultRenderMime
} from '../rendermime/rendermime.spec';

const RENDERMIME = defaultRenderMime();

class LogWidget extends MarkdownWidget {
  methods: string[] = [];

  protected onAfterAttach(msg: Message): void {
    super.onAfterAttach(msg);
    this.methods.push('onAfterAttach');
  }

  protected onUpdateRequest(msg: Message): void {
    super.onUpdateRequest(msg);
    this.methods.push('onUpdateRequest');
  }
}

describe('markdownwidget/widget', () => {

  describe('MarkdownWidgetFactory', () => {

    describe('#createNew()', () => {

      it('should require a context parameter', () => {
        let context = new MockContext(new DocumentModel());
        let widgetFactory = new MarkdownWidgetFactory(RENDERMIME);
        expect(widgetFactory.createNew(context)).to.be.a(MarkdownWidget);
      });

    });

  });

  describe('MarkdownWidget', () => {

    describe('#constructor()', () => {

      it('should require a context parameter', () => {
        let context = new MockContext(new DocumentModel());
        let widget = new MarkdownWidget(context, RENDERMIME);
        expect(widget).to.be.a(MarkdownWidget);
      });

    });

    describe('#onAfterAttach()', () => {

      it('should update the widget', () => {
        let context = new MockContext(new DocumentModel());
        let widget = new LogWidget(context, RENDERMIME);
        expect(widget.methods).to.not.contain('onAfterAttach');
        Widget.attach(widget, document.body);
        expect(widget.methods).to.contain('onAfterAttach');
        widget.dispose();
      });

    });

    describe('#onUpdateRequest()', () => {

      it('should update rendered markdown', () => {
        let context = new MockContext(new DocumentModel());
        let widget = new LogWidget(context, RENDERMIME);
        expect(widget.methods).to.not.contain('onUpdateRequest');
        context.model.contentChanged.emit(void 0);
        sendMessage(widget, WidgetMessage.UpdateRequest);
        expect(widget.methods).to.contain('onUpdateRequest');
        widget.dispose();
      });

      it('should replace children on subsequent updates', () => {
        let context = new MockContext(new DocumentModel());
        let widget = new LogWidget(context, RENDERMIME);
        context.model.contentChanged.emit(void 0);
        sendMessage(widget, WidgetMessage.UpdateRequest);

        let layout = widget.layout as PanelLayout;
        let oldChild = layout.widgets.at(0);

        sendMessage(widget, WidgetMessage.UpdateRequest);

        let newChild = layout.widgets.at(0);

        expect(oldChild).to.not.be(newChild);
        expect(layout.widgets.length).to.be(1);
        widget.dispose();
      });

    });

  });

});


text:
export default async function Head({ params }) {
  return (
    <>
      <script async src="/hello3.js" data-slug={params.slug} />
      <title>{`hello from dynamic blog page ${params.slug}`}</title>
    </>
  )
}


text:
NS_ASSUME_NONNULL_BEGIN

NSString *SRURLOrigin(NSURL *url)
{
    NSMutableString *origin = [NSMutableString string];

    NSString *scheme = url.scheme.lowercaseString;
    if ([scheme isEqualToString:@"wss"]) {
        scheme = @"https";
    } else if ([scheme isEqualToString:@"ws"]) {
        scheme = @"http";
    }
    [origin appendFormat:@"%@://%@", scheme, url.host];

    NSNumber *port = url.port;
    BOOL portIsDefault = (!port ||
                          ([scheme isEqualToString:@"http"] && port.integerValue == 80) ||
                          ([scheme isEqualToString:@"https"] && port.integerValue == 443));
    if (!portIsDefault) {
        [origin appendFormat:@":%@", port.stringValue];
    }
    return origin;
}

extern BOOL SRURLRequiresSSL(NSURL *url)
{
    NSString *scheme = url.scheme.lowercaseString;
    return ([scheme isEqualToString:@"wss"] || [scheme isEqualToString:@"https"]);
}

extern NSString *_Nullable SRBasicAuthorizationHeaderFromURL(NSURL *url)
{
    NSData *data = [[NSString stringWithFormat:@"%@:%@", url.user, url.password] dataUsingEncoding:NSUTF8StringEncoding];
    NSString *userAndPasswordBase64Encoded;
    if ([data respondsToSelector:@selector(base64EncodedStringWithOptions:)]) {
        userAndPasswordBase64Encoded = [data base64EncodedStringWithOptions:0];
    } else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
        userAndPasswordBase64Encoded = [data base64Encoding];
#pragma clang diagnostic pop
    }
    return [NSString stringWithFormat:@"Basic %@", userAndPasswordBase64Encoded];
}

NS_ASSUME_NONNULL_END


text:
namespace Ogre
{
TinyTextureManager::TinyTextureManager()
{
    // Register with group manager
    ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
}

TinyTextureManager::~TinyTextureManager()
{
    // Unregister with group manager
    ResourceGroupManager::getSingleton()._unregisterResourceManager(mResourceType);
}

Resource* TinyTextureManager::createImpl(const String& name, ResourceHandle handle, const String& group,
                                         bool isManual, ManualResourceLoader* loader,
                                         const NameValuePairList* createParams)
{
    return new TinyTexture(this, name, handle, group, isManual, loader);
}

PixelFormat TinyTextureManager::getNativeFormat(TextureType ttype, PixelFormat format, int usage)
{
    // only byte formats supported
    return PF_BYTE_RGBA;
}
} // namespace Ogre


text:
//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: ./core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java
//

#include "J2ObjC_header.h"

#pragma push_macro("INCLUDE_ALL_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter")
#ifdef RESTRICT_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter
#define INCLUDE_ALL_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter 0
#else
#define INCLUDE_ALL_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter 1
#endif
#undef RESTRICT_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter

#if __has_feature(nullability)
#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wnullability"
#pragma GCC diagnostic ignored "-Wnullability-completeness"
#endif

#if !defined (OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_) && (INCLUDE_ALL_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter || defined(INCLUDE_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter))
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_

#define RESTRICT_OrgApacheLuceneCodecsTermVectorsWriter 1
#define INCLUDE_OrgApacheLuceneCodecsTermVectorsWriter 1
#include "org/apache/lucene/codecs/TermVectorsWriter.h"

@class OrgApacheLuceneCodecsCompressingCompressingTermVectorsReader;
@class OrgApacheLuceneCodecsCompressingCompressionMode;
@class OrgApacheLuceneIndexFieldInfo;
@class OrgApacheLuceneIndexFieldInfos;
@class OrgApacheLuceneIndexMergeState;
@class OrgApacheLuceneIndexSegmentInfo;
@class OrgApacheLuceneStoreDataInput;
@class OrgApacheLuceneStoreDirectory;
@class OrgApacheLuceneStoreIOContext;
@class OrgApacheLuceneUtilBytesRef;

/*!
 @brief TermVectorsWriter for CompressingTermVectorsFormat.
 */
@interface OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter : OrgApacheLuceneCodecsTermVectorsWriter
@property (readonly, class) jint MAX_DOCUMENTS_PER_CHUNK NS_SWIFT_NAME(MAX_DOCUMENTS_PER_CHUNK);
@property (readonly, copy, class) NSString *VECTORS_EXTENSION NS_SWIFT_NAME(VECTORS_EXTENSION);
@property (readonly, copy, class) NSString *VECTORS_INDEX_EXTENSION NS_SWIFT_NAME(VECTORS_INDEX_EXTENSION);
@property (readonly, copy, class) NSString *CODEC_SFX_IDX NS_SWIFT_NAME(CODEC_SFX_IDX);
@property (readonly, copy, class) NSString *CODEC_SFX_DAT NS_SWIFT_NAME(CODEC_SFX_DAT);
@property (readonly, class) jint VERSION_START NS_SWIFT_NAME(VERSION_START);
@property (readonly, class) jint VERSION_CHUNK_STATS NS_SWIFT_NAME(VERSION_CHUNK_STATS);
@property (readonly, class) jint VERSION_CURRENT NS_SWIFT_NAME(VERSION_CURRENT);
@property (readonly, class) jint PACKED_BLOCK_SIZE NS_SWIFT_NAME(PACKED_BLOCK_SIZE);
@property (readonly, class) jint POSITIONS NS_SWIFT_NAME(POSITIONS);
@property (readonly, class) jint OFFSETS NS_SWIFT_NAME(OFFSETS);
@property (readonly, class) jint PAYLOADS NS_SWIFT_NAME(PAYLOADS);
@property (readonly, class) jint FLAGS_BITS NS_SWIFT_NAME(FLAGS_BITS);
@property (readonly, copy, class) NSString *BULK_MERGE_ENABLED_SYSPROP NS_SWIFT_NAME(BULK_MERGE_ENABLED_SYSPROP);
@property (readonly, class) jboolean BULK_MERGE_ENABLED NS_SWIFT_NAME(BULK_MERGE_ENABLED);

#pragma mark Public

/*!
 @brief Sole constructor.
 */
- (instancetype __nonnull)initWithOrgApacheLuceneStoreDirectory:(OrgApacheLuceneStoreDirectory *)directory
                            withOrgApacheLuceneIndexSegmentInfo:(OrgApacheLuceneIndexSegmentInfo *)si
                                                   withNSString:(NSString *)segmentSuffix
                              withOrgApacheLuceneStoreIOContext:(OrgApacheLuceneStoreIOContext *)context
                                                   withNSString:(NSString *)formatName
            withOrgApacheLuceneCodecsCompressingCompressionMode:(OrgApacheLuceneCodecsCompressingCompressionMode *)compressionMode
                                                        withInt:(jint)chunkSize
                                                        withInt:(jint)blockSize;

- (void)addPositionWithInt:(jint)position
                   withInt:(jint)startOffset
                   withInt:(jint)endOffset
withOrgApacheLuceneUtilBytesRef:(OrgApacheLuceneUtilBytesRef *)payload;

- (void)addProxWithInt:(jint)numProx
withOrgApacheLuceneStoreDataInput:(OrgApacheLuceneStoreDataInput *)positions
withOrgApacheLuceneStoreDataInput:(OrgApacheLuceneStoreDataInput *)offsets;

- (void)close;

- (void)finishWithOrgApacheLuceneIndexFieldInfos:(OrgApacheLuceneIndexFieldInfos *)fis
                                         withInt:(jint)numDocs;

- (void)finishDocument;

- (void)finishField;

- (jint)mergeWithOrgApacheLuceneIndexMergeState:(OrgApacheLuceneIndexMergeState *)mergeState;

- (void)startDocumentWithInt:(jint)numVectorFields;

- (void)startFieldWithOrgApacheLuceneIndexFieldInfo:(OrgApacheLuceneIndexFieldInfo *)info
                                            withInt:(jint)numTerms
                                        withBoolean:(jboolean)positions
                                        withBoolean:(jboolean)offsets
                                        withBoolean:(jboolean)payloads;

- (void)startTermWithOrgApacheLuceneUtilBytesRef:(OrgApacheLuceneUtilBytesRef *)term
                                         withInt:(jint)freq;

#pragma mark Package-Private

/*!
 @brief Returns true if we should recompress this reader, even though we could bulk merge compressed data

  The last chunk written for a segment is typically incomplete, so without recompressing,
  in some worst-case situations (e.g. frequent reopen with tiny flushes), over time the
  compression ratio can degrade.
 This is a safety switch.
 */
- (jboolean)tooDirtyWithOrgApacheLuceneCodecsCompressingCompressingTermVectorsReader:(OrgApacheLuceneCodecsCompressingCompressingTermVectorsReader *)candidate;

// Disallowed inherited constructors, do not use.

- (instancetype __nonnull)init NS_UNAVAILABLE;

@end

J2OBJC_STATIC_INIT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_MAX_DOCUMENTS_PER_CHUNK(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_MAX_DOCUMENTS_PER_CHUNK 128
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, MAX_DOCUMENTS_PER_CHUNK, jint)

inline NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_VECTORS_EXTENSION(void);
/*! INTERNAL ONLY - Use accessor function from above. */
FOUNDATION_EXPORT NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_VECTORS_EXTENSION;
J2OBJC_STATIC_FIELD_OBJ_FINAL(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, VECTORS_EXTENSION, NSString *)

inline NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_VECTORS_INDEX_EXTENSION(void);
/*! INTERNAL ONLY - Use accessor function from above. */
FOUNDATION_EXPORT NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_VECTORS_INDEX_EXTENSION;
J2OBJC_STATIC_FIELD_OBJ_FINAL(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, VECTORS_INDEX_EXTENSION, NSString *)

inline NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_CODEC_SFX_IDX(void);
/*! INTERNAL ONLY - Use accessor function from above. */
FOUNDATION_EXPORT NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_CODEC_SFX_IDX;
J2OBJC_STATIC_FIELD_OBJ_FINAL(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, CODEC_SFX_IDX, NSString *)

inline NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_CODEC_SFX_DAT(void);
/*! INTERNAL ONLY - Use accessor function from above. */
FOUNDATION_EXPORT NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_CODEC_SFX_DAT;
J2OBJC_STATIC_FIELD_OBJ_FINAL(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, CODEC_SFX_DAT, NSString *)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_VERSION_START(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_VERSION_START 0
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, VERSION_START, jint)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_VERSION_CHUNK_STATS(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_VERSION_CHUNK_STATS 1
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, VERSION_CHUNK_STATS, jint)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_VERSION_CURRENT(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_VERSION_CURRENT 1
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, VERSION_CURRENT, jint)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_PACKED_BLOCK_SIZE(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_PACKED_BLOCK_SIZE 64
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, PACKED_BLOCK_SIZE, jint)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_POSITIONS(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_POSITIONS 1
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, POSITIONS, jint)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_OFFSETS(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_OFFSETS 2
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, OFFSETS, jint)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_PAYLOADS(void);
#define OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_PAYLOADS 4
J2OBJC_STATIC_FIELD_CONSTANT(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, PAYLOADS, jint)

inline jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_FLAGS_BITS(void);
/*! INTERNAL ONLY - Use accessor function from above. */
FOUNDATION_EXPORT jint OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_FLAGS_BITS;
J2OBJC_STATIC_FIELD_PRIMITIVE_FINAL(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, FLAGS_BITS, jint)

inline NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_BULK_MERGE_ENABLED_SYSPROP(void);
/*! INTERNAL ONLY - Use accessor function from above. */
FOUNDATION_EXPORT NSString *OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_BULK_MERGE_ENABLED_SYSPROP;
J2OBJC_STATIC_FIELD_OBJ_FINAL(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, BULK_MERGE_ENABLED_SYSPROP, NSString *)

inline jboolean OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_get_BULK_MERGE_ENABLED(void);
/*! INTERNAL ONLY - Use accessor function from above. */
FOUNDATION_EXPORT jboolean OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_BULK_MERGE_ENABLED;
J2OBJC_STATIC_FIELD_PRIMITIVE_FINAL(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter, BULK_MERGE_ENABLED, jboolean)

FOUNDATION_EXPORT void OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_initWithOrgApacheLuceneStoreDirectory_withOrgApacheLuceneIndexSegmentInfo_withNSString_withOrgApacheLuceneStoreIOContext_withNSString_withOrgApacheLuceneCodecsCompressingCompressionMode_withInt_withInt_(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter *self, OrgApacheLuceneStoreDirectory *directory, OrgApacheLuceneIndexSegmentInfo *si, NSString *segmentSuffix, OrgApacheLuceneStoreIOContext *context, NSString *formatName, OrgApacheLuceneCodecsCompressingCompressionMode *compressionMode, jint chunkSize, jint blockSize);

FOUNDATION_EXPORT OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter *new_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_initWithOrgApacheLuceneStoreDirectory_withOrgApacheLuceneIndexSegmentInfo_withNSString_withOrgApacheLuceneStoreIOContext_withNSString_withOrgApacheLuceneCodecsCompressingCompressionMode_withInt_withInt_(OrgApacheLuceneStoreDirectory *directory, OrgApacheLuceneIndexSegmentInfo *si, NSString *segmentSuffix, OrgApacheLuceneStoreIOContext *context, NSString *formatName, OrgApacheLuceneCodecsCompressingCompressionMode *compressionMode, jint chunkSize, jint blockSize) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter *create_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter_initWithOrgApacheLuceneStoreDirectory_withOrgApacheLuceneIndexSegmentInfo_withNSString_withOrgApacheLuceneStoreIOContext_withNSString_withOrgApacheLuceneCodecsCompressingCompressionMode_withInt_withInt_(OrgApacheLuceneStoreDirectory *directory, OrgApacheLuceneIndexSegmentInfo *si, NSString *segmentSuffix, OrgApacheLuceneStoreIOContext *context, NSString *formatName, OrgApacheLuceneCodecsCompressingCompressionMode *compressionMode, jint chunkSize, jint blockSize);

J2OBJC_TYPE_LITERAL_HEADER(OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter)

#endif

#if __has_feature(nullability)
#pragma clang diagnostic pop
#endif
#pragma pop_macro("INCLUDE_ALL_OrgApacheLuceneCodecsCompressingCompressingTermVectorsWriter")


text:
package flex.messaging.endpoints;

import flex.messaging.Server;

/**
 * Extension interface for <tt>Endpoint</tt> that adds support for a
 * referenced <tt>Server</tt> that the endpoint may use.
 */
public interface Endpoint2 extends Endpoint
{
   /**
    * Returns the <tt>Server</tt> that the endpoint is using; null if
    * no server has been assigned.
    */
   Server getServer();

   /**
    * Sets the <tt>Server</tt> that the endpoint will use.
    */
   void setServer(Server server);
}


text:
<#include "*/common/admin-header.html" />

  Home

   20 My Dashboard

   Charts

  101 Widgets

   Tables

   Full width

   Forms

   Buttons

  Elements

   Calendar

   Error

<#include "*/common/admin-footer.html" />


text:
import path from 'path';
import fs from 'fs';
import { expect } from 'chai';
import pdf from 'oadf-pdf-converter';
import Lexer from '../../src/Lexer';
import Token, { TYPES as Type } from '../../src/Token';

describe('SELTEC 3 PDF Lexer 32.pdf', () => {
  it('should create the correct tokens', (done) => {
    const filePath = path.join(process.cwd(), 'test/lexer/fixtures/32.pdf');
    const data = new Uint8Array(fs.readFileSync(filePath));
    pdf(data).then((pages) => {
      const tokens = Lexer(pages);
      expect(tokens).to.deep.equal([
        new Token(Type.COMPETITION_NAME, 'MTG Mannheim Vereinsmeisterschaften 2016'),
        new Token(Type.COMPETITION_CITY, 'Mannheim'),
        new Token(Type.COMPETITION_VENUE, 'Michael-Hoffmann-Stadion'),
        new Token(Type.COMPETITION_START_DATE, '03.10.2016'),
        new Token(Type.DISCIPLINE_NAME, '100m (DMT)'),
        new Token(Type.AGE_GROUP_NAME, 'Männer'),
        new Token(Type.EVENT_DATE, '03.10.2016'),
        new Token(Type.EVENT_TIME, '10:30'),
        new Token(Type.ROUND_NAME, 'Team DM'),
        new Token(Type.WIND, 'I:+1,1'),
        new Token(Type.ATHLETE_POSITION, '1'),
        new Token(Type.ATHLETE_BIB, '62'),
        new Token(Type.ATHLETE_FULL_NAME, 'Spissinger Yannick'),
        new Token(Type.ATHLETE_YOB, '1995'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '11,22'),
        new Token(Type.GROUP_NUMBER_PLACE, '1./I'),
        new Token(Type.ATHLETE_POSITION, '2'),
        new Token(Type.ATHLETE_BIB, '33'),
        new Token(Type.ATHLETE_FULL_NAME, 'Ganter Robin'),
        new Token(Type.ATHLETE_YOB, '2001'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '11,90'),
        new Token(Type.GROUP_NUMBER_PLACE, '2./I'),
        new Token(Type.ATHLETE_POSITION, '3'),
        new Token(Type.ATHLETE_BIB, '35'),
        new Token(Type.ATHLETE_FULL_NAME, 'Grau Luca'),
        new Token(Type.ATHLETE_YOB, '2000'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '11,98'),
        new Token(Type.GROUP_NUMBER_PLACE, '3./I'),
        new Token(Type.ATHLETE_POSITION, '4'),
        new Token(Type.ATHLETE_BIB, '34'),
        new Token(Type.ATHLETE_FULL_NAME, 'Graf Michael'),
        new Token(Type.ATHLETE_YOB, '1999'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '12,41'),
        new Token(Type.GROUP_NUMBER_PLACE, '4./I'),
        new Token(Type.ATHLETE_POSITION, '5'),
        new Token(Type.ATHLETE_BIB, '25'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bernhardt Julian'),
        new Token(Type.ATHLETE_YOB, '2001'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '12,65'),
        new Token(Type.GROUP_NUMBER_PLACE, '5./I'),
        new Token(Type.ATHLETE_POSITION, '6'),
        new Token(Type.ATHLETE_BIB, '146'),
        new Token(Type.ATHLETE_FULL_NAME, 'Hepperle Wolfgang'),
        new Token(Type.ATHLETE_YOB, '1966'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'LG Neckar-Enz'),
        new Token(Type.PERFORMANCE, '13,35'),
        new Token(Type.GROUP_NUMBER_PLACE, '6./I'),
        new Token(Type.DISCIPLINE_NAME, '400m (DMT)'),
        new Token(Type.AGE_GROUP_NAME, 'Männer'),
        new Token(Type.EVENT_DATE, '03.10.2016'),
        new Token(Type.EVENT_TIME, '12:00'),
        new Token(Type.ROUND_NAME, 'Team DM'),
        new Token(Type.ATHLETE_POSITION, '1'),
        new Token(Type.ATHLETE_BIB, '61'),
        new Token(Type.ATHLETE_FULL_NAME, 'Schuh Alexander'),
        new Token(Type.ATHLETE_YOB, '1996'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '53,56'),
        new Token(Type.GROUP_NUMBER_PLACE, '1./I'),
        new Token(Type.ATHLETE_POSITION, '2'),
        new Token(Type.ATHLETE_BIB, '33'),
        new Token(Type.ATHLETE_FULL_NAME, 'Ganter Robin'),
        new Token(Type.ATHLETE_YOB, '2001'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '54,39'),
        new Token(Type.GROUP_NUMBER_PLACE, '2./I'),
        new Token(Type.ATHLETE_POSITION, '3'),
        new Token(Type.ATHLETE_BIB, '35'),
        new Token(Type.ATHLETE_FULL_NAME, 'Grau Luca'),
        new Token(Type.ATHLETE_YOB, '2000'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '54,70'),
        new Token(Type.GROUP_NUMBER_PLACE, '3./I'),
        new Token(Type.ATHLETE_POSITION, '4'),
        new Token(Type.ATHLETE_BIB, '25'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bernhardt Julian'),
        new Token(Type.ATHLETE_YOB, '2001'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '58,24'),
        new Token(Type.GROUP_NUMBER_PLACE, '4./I'),
        new Token(Type.DISCIPLINE_NAME, '1500m (DMT)'),
        new Token(Type.AGE_GROUP_NAME, 'Männer'),
        new Token(Type.EVENT_DATE, '03.10.2016'),
        new Token(Type.EVENT_TIME, '17:00'),
        new Token(Type.ROUND_NAME, 'Team DM'),
        new Token(Type.ATHLETE_POSITION, '1'),
        new Token(Type.ATHLETE_BIB, '26'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bernhardt Simon'),
        new Token(Type.ATHLETE_YOB, '1999'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '4:53,54'),
        new Token(Type.GROUP_NUMBER_PLACE, '1./I'),
        new Token(Type.ATHLETE_POSITION, '2'),
        new Token(Type.ATHLETE_BIB, '25'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bernhardt Julian'),
        new Token(Type.ATHLETE_YOB, '2001'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '5:00,92'),
        new Token(Type.GROUP_NUMBER_PLACE, '1./II'),
        new Token(Type.ATHLETE_POSITION, '3'),
        new Token(Type.ATHLETE_BIB, '43'),
        new Token(Type.ATHLETE_FULL_NAME, 'Kriesamer Jonas'),
        new Token(Type.ATHLETE_YOB, '1995'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '5:13,27'),
        new Token(Type.GROUP_NUMBER_PLACE, '2./II'),
        new Token(Type.ATHLETE_POSITION, '4'),
        new Token(Type.ATHLETE_BIB, '51'),
        new Token(Type.ATHLETE_FULL_NAME, 'Otchere Colin'),
        new Token(Type.ATHLETE_YOB, '1994'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '5:14,98'),
        new Token(Type.GROUP_NUMBER_PLACE, '2./I'),
        new Token(Type.ATHLETE_POSITION, '5'),
        new Token(Type.ATHLETE_BIB, '58'),
        new Token(Type.ATHLETE_FULL_NAME, 'Rupp Alexander'),
        new Token(Type.ATHLETE_YOB, '1989'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '5:26,35'),
        new Token(Type.GROUP_NUMBER_PLACE, '3./I'),
        new Token(Type.ATHLETE_POSITION, '6'),
        new Token(Type.ATHLETE_BIB, '29'),
        new Token(Type.ATHLETE_FULL_NAME, 'Domogala Patrick'),
        new Token(Type.ATHLETE_YOB, '1993'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '5:26,52'),
        new Token(Type.GROUP_NUMBER_PLACE, '4./I'),
        new Token(Type.ATHLETE_POSITION, '7'),
        new Token(Type.ATHLETE_BIB, '62'),
        new Token(Type.ATHLETE_FULL_NAME, 'Spissinger Yannick'),
        new Token(Type.ATHLETE_YOB, '1995'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, '5:41,67'),
        new Token(Type.GROUP_NUMBER_PLACE, '5./I'),
        new Token(Type.ATHLETE_BIB, '61'),
        new Token(Type.ATHLETE_FULL_NAME, 'Schuh Alexander'),
        new Token(Type.ATHLETE_YOB, '1996'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'aufg.'),
        new Token(Type.ATHLETE_BIB, '60'),
        new Token(Type.ATHLETE_FULL_NAME, 'Schmunk Rudi'),
        new Token(Type.ATHLETE_YOB, '1994'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'abg.'),
        new Token(Type.ATHLETE_BIB, '38'),
        new Token(Type.ATHLETE_FULL_NAME, 'Hoecker Yannick'),
        new Token(Type.ATHLETE_YOB, '1992'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'abg.'),
        new Token(Type.ATHLETE_BIB, '35'),
        new Token(Type.ATHLETE_FULL_NAME, 'Grau Luca'),
        new Token(Type.ATHLETE_YOB, '2000'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'abg.'),
        new Token(Type.ATHLETE_BIB, '34'),
        new Token(Type.ATHLETE_FULL_NAME, 'Graf Michael'),
        new Token(Type.ATHLETE_YOB, '1999'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'abg.'),
        new Token(Type.ATHLETE_BIB, '24'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bayerl Andreas'),
        new Token(Type.ATHLETE_YOB, '1993'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'abg.'),
        new Token(Type.ATHLETE_BIB, '47'),
        new Token(Type.ATHLETE_FULL_NAME, 'Manke-Reimers Fabian'),
        new Token(Type.ATHLETE_YOB, '1995'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'n.a.'),
        new Token(Type.ATHLETE_BIB, '33'),
        new Token(Type.ATHLETE_FULL_NAME, 'Ganter Robin'),
        new Token(Type.ATHLETE_YOB, '2001'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'n.a.'),
        new Token(Type.ATHLETE_BIB, '37'),
        new Token(Type.ATHLETE_FULL_NAME, 'Herdt Dennis'),
        new Token(Type.ATHLETE_YOB, '1993'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.ATHLETE_CLUB_NAME, 'MTG Mannheim'),
        new Token(Type.PERFORMANCE, 'n.a.'),
        new Token(Type.SPLIT_GROUP, '1'),
        new Token(Type.SPLIT_DISTANCE, '400 m'),
        new Token(Type.SPLIT_TIME, '1:09,56'),
        new Token(Type.ATHLETE_BIB, '26'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bernhardt Simon'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.SPLIT_DISTANCE, '800 m'),
        new Token(Type.SPLIT_TIME, '2:42,24'),
        new Token(Type.ATHLETE_BIB, '26'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bernhardt Simon'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.SPLIT_DISTANCE, '1200 m'),
        new Token(Type.SPLIT_TIME, '4:02,48'),
        new Token(Type.ATHLETE_BIB, '26'),
        new Token(Type.ATHLETE_FULL_NAME, 'Bernhardt Simon'),
        new Token(Type.ATHLETE_COUNTRY, 'GER'),
        new Token(Type.END),
      ]);
      done();
    }).catch((e) => {
      done(e);
    });
  });
});