text:
using System;

using IndexReader = Lucene.Net.Index.IndexReader;
using ToStringUtils = Lucene.Net.Util.ToStringUtils;
using Explanation = Lucene.Net.Search.Explanation;
using Scorer = Lucene.Net.Search.Scorer;
using Searcher = Lucene.Net.Search.Searcher;
using Similarity = Lucene.Net.Search.Similarity;
using Weight = Lucene.Net.Search.Weight;
using NearSpansOrdered = Lucene.Net.Search.Spans.NearSpansOrdered;
using NearSpansUnordered = Lucene.Net.Search.Spans.NearSpansUnordered;
using SpanNearQuery = Lucene.Net.Search.Spans.SpanNearQuery;
using SpanQuery = Lucene.Net.Search.Spans.SpanQuery;
using SpanScorer = Lucene.Net.Search.Spans.SpanScorer;
using SpanWeight = Lucene.Net.Search.Spans.SpanWeight;

namespace Lucene.Net.Search.Payloads
{

	///  This class is very similar to
	/// {@link Lucene.Net.Search.Spans.SpanNearQuery} except that it factors
	/// in the value of the payloads located at each of the positions where the
	/// {@link Lucene.Net.Search.Spans.TermSpans} occurs.
	///

	/// In order to take advantage of this, you must override
	/// {@link Lucene.Net.Search.Similarity#ScorePayload(String, byte[],int,int)}
	/// which returns 1 by default.
	///

	/// Payload scores are aggregated using a pluggable {@link PayloadFunction}.
	///
	///
	/// <seealso cref="Lucene.Net.Search.Similarity.ScorePayload(String, byte[], int,int)">
	/// </seealso>
	[Serializable]
	public class PayloadNearQuery:SpanNearQuery, System.ICloneable
	{
		protected internal System.String fieldName;
		protected internal PayloadFunction function;

		public PayloadNearQuery(SpanQuery[] clauses, int slop, bool inOrder):this(clauses, slop, inOrder, new AveragePayloadFunction())
		{
		}

		public PayloadNearQuery(SpanQuery[] clauses, int slop, bool inOrder, PayloadFunction function):base(clauses, slop, inOrder)
		{
			fieldName = clauses[0].GetField(); // all clauses must have same field
			this.function = function;
		}

		public override Weight CreateWeight(Searcher searcher)
		{
			return new PayloadNearSpanWeight(this, this, searcher);
		}

		public override System.Object Clone()
		{
			int sz = clauses.Count;
			SpanQuery[] newClauses = new SpanQuery[sz];

			for (int i = 0; i < sz; i++)
			{
				SpanQuery clause = (SpanQuery) clauses[i];
				newClauses[i] = (SpanQuery) clause.Clone();
			}
			PayloadNearQuery boostingNearQuery = new PayloadNearQuery(newClauses, slop, inOrder);
			boostingNearQuery.SetBoost(GetBoost());
			return boostingNearQuery;
		}

		public override System.String ToString(System.String field)
		{
			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
			buffer.Append("payloadNear([");
			System.Collections.IEnumerator i = clauses.GetEnumerator();
			while (i.MoveNext())
			{
				SpanQuery clause = (SpanQuery) i.Current;
				buffer.Append(clause.ToString(field));
				if (i.MoveNext())
				{
					buffer.Append(", ");
				}
			}
			buffer.Append("], ");
			buffer.Append(slop);
			buffer.Append(", ");
			buffer.Append(inOrder);
			buffer.Append(")");
			buffer.Append(ToStringUtils.Boost(GetBoost()));
			return buffer.ToString();
		}

		// @Override
		public override int GetHashCode()
		{
			int prime = 31;
			int result = base.GetHashCode();
			result = prime * result + ((fieldName == null)?0:fieldName.GetHashCode());
			result = prime * result + ((function == null)?0:function.GetHashCode());
			return result;
		}

		// @Override
		public  override bool Equals(System.Object obj)
		{
			if (this == obj)
				return true;
			if (!base.Equals(obj))
				return false;
			if (GetType() != obj.GetType())
				return false;
			PayloadNearQuery other = (PayloadNearQuery) obj;
			if (fieldName == null)
			{
				if (other.fieldName != null)
					return false;
			}
			else if (!fieldName.Equals(other.fieldName))
				return false;
			if (function == null)
			{
				if (other.function != null)
					return false;
			}
			else if (!function.Equals(other.function))
				return false;
			return true;
		}

		[Serializable]
		public class PayloadNearSpanWeight:SpanWeight
		{
			private void  InitBlock(PayloadNearQuery enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}
			private PayloadNearQuery enclosingInstance;
			public PayloadNearQuery Enclosing_Instance
			{
				get
				{
					return enclosingInstance;
				}

			}
			public PayloadNearSpanWeight(PayloadNearQuery enclosingInstance, SpanQuery query, Searcher searcher):base(query, searcher)
			{
				InitBlock(enclosingInstance);
			}

			public virtual Scorer Scorer(IndexReader reader)
			{
				return new PayloadNearSpanScorer(enclosingInstance, query.GetSpans(reader), this, similarity, reader.Norms(query.GetField()));
			}

			public override Scorer Scorer(IndexReader reader, bool scoreDocsInOrder, bool topScorer)
			{
				return new PayloadNearSpanScorer(enclosingInstance, query.GetSpans(reader), this, similarity, reader.Norms(query.GetField()));
			}
		}

		public class PayloadNearSpanScorer:SpanScorer
		{
			private void  InitBlock(PayloadNearQuery enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
				similarity = GetSimilarity();
			}
			private PayloadNearQuery enclosingInstance;
			public PayloadNearQuery Enclosing_Instance
			{
				get
				{
					return enclosingInstance;
				}

			}
			new internal Lucene.Net.Search.Spans.Spans spans;

			protected internal float payloadScore;
			private int payloadsSeen;
			internal Similarity similarity;

			protected internal PayloadNearSpanScorer(PayloadNearQuery enclosingInstance, Lucene.Net.Search.Spans.Spans spans, Weight weight, Similarity similarity, byte[] norms):base(spans, weight, similarity, norms)
			{
				InitBlock(enclosingInstance);
				this.spans = spans;
			}

			// Get the payloads associated with all underlying subspans
			public virtual void  GetPayloads(Lucene.Net.Search.Spans.Spans[] subSpans)
			{
				for (int i = 0; i < subSpans.Length; i++)
				{
					if (subSpans[i] is NearSpansOrdered)
					{
						if (((NearSpansOrdered) subSpans[i]).IsPayloadAvailable())
						{
							ProcessPayloads(((NearSpansOrdered) subSpans[i]).GetPayload(), subSpans[i].Start(), subSpans[i].End());
						}
						GetPayloads(((NearSpansOrdered) subSpans[i]).GetSubSpans());
					}
					else if (subSpans[i] is NearSpansUnordered)
					{
						if (((NearSpansUnordered) subSpans[i]).IsPayloadAvailable())
						{
							ProcessPayloads(((NearSpansUnordered) subSpans[i]).GetPayload(), subSpans[i].Start(), subSpans[i].End());
						}
						GetPayloads(((NearSpansUnordered) subSpans[i]).GetSubSpans());
					}
				}
			}

			///  By default, uses the {@link PayloadFunction} to score the payloads, but
			/// can be overridden to do other things.
			///
			///
			/// <param name="payLoads">The payloads
			/// </param>
			/// <param name="start">The start position of the span being scored
			/// </param>
			/// <param name="end">The end position of the span being scored
			///
			/// </param>
			/// <seealso cref="Spans">
			/// </seealso>
			protected internal virtual void  ProcessPayloads(System.Collections.Generic.ICollection<byte[]> payLoads, int start, int end)
			{
                foreach (byte[] thePayload in payLoads)
                {
                    payloadScore = Enclosing_Instance.function.CurrentScore(doc, Enclosing_Instance.fieldName, start, end, payloadsSeen, payloadScore, similarity.ScorePayload(doc, Enclosing_Instance.fieldName, spans.Start(), spans.End(), thePayload, 0, thePayload.Length));
                    ++payloadsSeen;
                }
			}

			//
			public /*protected internal*/ override bool SetFreqCurrentDoc()
			{
				if (!more)
				{
					return false;
				}
				Lucene.Net.Search.Spans.Spans[] spansArr = new Lucene.Net.Search.Spans.Spans[1];
				spansArr[0] = spans;
				payloadScore = 0;
				payloadsSeen = 0;
				GetPayloads(spansArr);
				return base.SetFreqCurrentDoc();
			}

			public override float Score()
			{

				return base.Score() * Enclosing_Instance.function.DocScore(doc, Enclosing_Instance.fieldName, payloadsSeen, payloadScore);
			}

			public override Explanation Explain(int doc)
			{
				Explanation result = new Explanation();
				Explanation nonPayloadExpl = base.Explain(doc);
				result.AddDetail(nonPayloadExpl);
				Explanation payloadBoost = new Explanation();
				result.AddDetail(payloadBoost);
				float avgPayloadScore = (payloadsSeen > 0?(payloadScore / payloadsSeen):1);
				payloadBoost.SetValue(avgPayloadScore);
				payloadBoost.SetDescription("scorePayload(...)");
				result.SetValue(nonPayloadExpl.GetValue() * avgPayloadScore);
				result.SetDescription("bnq, product of:");
				return result;
			}
		}
	}
}


text:
package me.thehutch.fusion.api.util;

/**
 * @author thehutch
 */
public abstract class Creatable implements Disposable {
	private boolean mCreated;

	/**
	 * Default constructor for {@link Creatable}.
	 */
	public Creatable() {
		mCreated = false;
	}

	/**
	 * Override this method to use as the initialisation method.
	 * The base method should also be called to set mCreated to true.
	 */
	public void create() {
		mCreated = true;
	}

	/**
	 * @return True if this object has been mCreated
	 */
	public final boolean isCreated() {
		return mCreated;
	}

	/**
	 * Ensures that this object has been mCreated, otherwise throws an
	 * {@link IllegalStateException}.
	 *
	 * @param message The message to display if this object has not been mCreated
	 */
	public final void ensureCreated(String message) {
		if (!mCreated) {
			throw new IllegalStateException(message);
		}
	}

	/**
	 * Ensures that this object has not been mCreated, otherwise throws an
	 * {@link IllegalStateException}.
	 *
	 * @param message The message to display if this object has been mCreated
	 */
	public final void ensureNotCreated(String message) {
		if (mCreated) {
			throw new IllegalStateException(message);
		}
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void dispose() {
		mCreated = false;
	}
}

redpajama_set_name: RedPajamaGithub


text:
/**
 * Created by Michael on 04/05/14.
 */

describe('dirPagination directive', function() {

    var $compile;
    var $scope;
    var containingElement;
    var myCollection;

    beforeEach(module('angularUtils.directives.dirPagination'));
    beforeEach(module('templates-main'));

    beforeEach(inject(function($rootScope, _$compile_) {

        $compile = _$compile_;
        $scope = $rootScope.$new();
        containingElement = angular.element('

');

        myCollection = [];
        for(var i = 1; i <= 100; i++) {
            myCollection.push('item ' + i);
        }
    }));

    function compileElement(collection, itemsPerPage, currentPage, customExpression, totalItems) {
        var expression;
        var totalItemsHtml;
        var html;
        $scope.collection = collection;
        $scope.itemsPerPage = itemsPerPage;
        $scope.currentPage = currentPage || 1;
        $scope.totalItems = totalItems || undefined;
        totalItemsHtml =  (typeof totalItems !== 'undefined') ? 'total-items="totalItems"' : '';
        expression = customExpression || "item in collection | itemsPerPage: itemsPerPage";
        html = '

{{ item }}

 ' +
            '<dir-pagination-controls></dir-pagination-controls>';
        containingElement.append($compile(html)($scope));
        $scope.$apply();
    }

    function getListItems() {
        return containingElement.find('ul.list li').map(function() {
            return $(this).text().trim();
        }).get();
    }

    function getPageLinksArray() {
        return containingElement.find('ul.pagination li').map(function() {
            return $(this).text().trim();
        }).get();
    }

    describe('paginated list', function() {

        it('should throw an exception if itemsPerPage filter not set', function() {
            function compile() {
                var customExpression = "item in collection";
                compileElement(myCollection, 5, 1, customExpression);
            }
            expect(compile).toThrow("pagination directive: the 'itemsPerPage' filter must be set.");
        });

        it('should allow a space after itemsPerPage and before the colon', function() {
            function compile() {
                var customExpression = "item in collection | itemsPerPage : 10";
                compileElement(myCollection, 5, 1, customExpression);
            }
            expect(compile).not.toThrow();
        });

        it('should repeat the items like ng-repeat', function() {
            compileElement(myCollection);
            var listItems = getListItems();

            expect(listItems.length).toBe(100);
        });

        it('should limit the items to match itemsPerPage = 10', function() {
            var listItems;

            compileElement(myCollection, 10);
            listItems = getListItems();
            expect(listItems.length).toBe(10);
        });

        it('should limit the items to match itemsPerPage = 50', function() {
            var listItems;

            compileElement(myCollection, 50);
            listItems = getListItems();
            expect(listItems.length).toBe(50);
        });

        it('should not mutate the collection itself ', function() {
            compileElement(myCollection);
            expect($scope.collection.length).toBe(100);
            compileElement(myCollection, 50);
            expect($scope.collection.length).toBe(100);
            compileElement(myCollection, 5);
            expect($scope.collection.length).toBe(100);
        });

        it('should work correctly with other filters (filter)', function() {
            $scope.filterBy = '2';
            var customExpression = "item in collection | filter: filterBy | itemsPerPage: itemsPerPage";
            compileElement(myCollection, 5, 1, customExpression);

            var listItems = getListItems();
            expect(listItems).toEqual(['item 2', 'item 12', 'item 20', 'item 21', 'item 22']);
        });

        it('should work correctly with other filters (orderBy)', function() {
            var customExpression = "item in collection | orderBy:'toString()':true | itemsPerPage: itemsPerPage";
            compileElement(myCollection, 5, 1, customExpression);

            var listItems = getListItems();
            expect(listItems).toEqual(['item 99', 'item 98', 'item 97', 'item 96', 'item 95']);
        });

        it('should work inside a transcluded directive (ng-if)', function() {
            $scope.collection = myCollection;
            var html = '
' +
                            '

{{ item }}

 ' +
                            '<dir-pagination-controls></dir-pagination-controls>' +
                        '
';
            containingElement.append($compile(html)($scope));
            $scope.$apply();

            var listItems = getListItems();
            expect(listItems).toEqual(['item 1', 'item 2', 'item 3', 'item 4', 'item 5']);
        });

        it('should display the second page when compiled with currentPage = 2', function() {
            var listItems;
            compileElement(myCollection, 3, 2);
            listItems = getListItems();
            expect(listItems).toEqual(['item 4', 'item 5', 'item 6']);
        });

        it('should display the next page when the currentPage changes', function() {
            var listItems;
            compileElement(myCollection, 3);
            listItems = getListItems();
            expect(listItems).toEqual(['item 1', 'item 2', 'item 3']);

            $scope.$apply(function() {
                $scope.currentPage = 2;
            });
            listItems = getListItems();
            expect(listItems).toEqual(['item 4', 'item 5', 'item 6']);

            $scope.$apply(function() {
                $scope.currentPage = 3;
            });
            listItems = getListItems();
            expect(listItems).toEqual(['item 7', 'item 8', 'item 9']);
        });

        it('should work if itemsPerPage is a literal value', function() {
            var customExpression = "item in collection | itemsPerPage: 2";
            compileElement(myCollection, null, 1, customExpression);

            var listItems = getListItems();
            expect(listItems.length).toEqual(2);
            expect(listItems).toEqual(['item 1', 'item 2']);
        });

    });

    describe('if currentPage attribute is not set', function() {

        beforeEach(function() {
            $scope.collection = myCollection;
            html = '

{{ item }}

 ' +
                '<dir-pagination-controls></dir-pagination-controls>';
            containingElement.append($compile(html)($scope));
            $scope.$apply();
        });

        it('should compile', function() {
            var listItems = getListItems();
            expect(listItems).toEqual(['item 1', 'item 2', 'item 3']);
        });

        it('should page correctly', function() {
            var pagination = containingElement.find('ul.pagination');

            pagination.children().eq(3).find('a').triggerHandler('click');
            $scope.$apply();
            expect($scope.__default__currentPage).toBe(3);
            var listItems = getListItems();
            expect(listItems).toEqual(['item 7', 'item 8', 'item 9']);
        });
    });

    describe('pagination controls', function() {

        it('should throw an exception if the dir-paginate directive has not been set up', function() {
            function compile() {
                var html = '<dir-pagination-controls></dir-pagination-controls>';
                containingElement.append($compile(html)($scope));
                $scope.$apply();
            }

            expect(compile).toThrow("pagination directive: the pagination controls cannot be used without the corresponding pagination directive.");
        });

        it('should not display pagination if all rows fit on one page', function() {
            compileElement(myCollection, 9999);
            var paginationLinks = getPageLinksArray();

            expect(paginationLinks.length).toBe(0);
        });

        it('should paginate by default if all items do not fit on page', function() {
            compileElement(myCollection, 40);
            var paginationLinks = getPageLinksArray();

            expect(paginationLinks).toEqual(['‹','1', '2', '3', '›']);
        });

        it('should update the currentPage property of $scope when links clicked', function() {
            compileElement(myCollection, 40);
            var pagination = containingElement.find('ul.pagination');

            pagination.children().eq(3).find('a').triggerHandler('click');
            $scope.$apply();
            expect($scope.currentPage).toBe(3);

            pagination.children().eq(2).find('a').triggerHandler('click');
            $scope.$apply();
            expect($scope.currentPage).toBe(2);

            pagination.children().eq(1).find('a').triggerHandler('click');
            $scope.$apply();
            expect($scope.currentPage).toBe(1);
        });

        it('should set the pagination.current value to 5 when compiled with currentPage = 5', function() {
            compileElement(myCollection, 3, 5);
            var activePageItem = containingElement.find('li.active').eq(0);
            var activePage = activePageItem.text().trim();

            expect(activePage).toEqual('5');
        });

        it('should show the correct pagination links at start of sequence', function() {
            compileElement(myCollection, 1);
            var pageLinks = getPageLinksArray();

            expect(pageLinks).toEqual(['‹','1', '2', '3', '4', '5', '6', '7', '...', '100', '›']);
        });

        it('should show the correct pagination links in middle sequence', function() {
            compileElement(myCollection, 1);
            $scope.$apply(function() {
                $scope.currentPage = 50;
            });
            var pageLinks = getPageLinksArray();

            expect(pageLinks).toEqual(['‹','1', '...', '48', '49', '50', '51', '52', '...', '100', '›']);
        });

        it('should show the correct pagination links at end of sequence', function() {
            compileElement(myCollection, 1);
            $scope.$apply(function() {
                $scope.currentPage = 99;
            });
            var pageLinks = getPageLinksArray();

            expect(pageLinks).toEqual(['‹','1', '...', '94', '95', '96', '97', '98', '99', '100', '›']);
        });

        it('should show the correct pagination links after item removed from cllection', function() {
            compileElement(myCollection, 1);
            $scope.$apply(function() {
                $scope.currentPage = 98;
            });

            $scope.$apply(function() {
                $scope.collection.pop();
            });
            var pageLinks = getPageLinksArray();

            expect(pageLinks).toEqual(['‹','1', '...', '93', '94', '95', '96', '97', '98', '99', '›']);
        });

        it('should calculate pages based off collection after all filters are applied', function() {
            $scope.filterBy = '2';
            var customExpression = "item in collection | filter: filterBy | itemsPerPage: itemsPerPage";
            compileElement(myCollection, 5, 1, customExpression);

            var pageLinks = getPageLinksArray();
            expect(pageLinks.length).toEqual(6);
        });

        it('should update the active page to reflect the value of the current-page property', function() {
            compileElement(myCollection, 10, 3);

            var activeLink = containingElement.find('ul.pagination li.active');
            expect(activeLink.html()).toContain(3);

            $scope.$apply(function() {
                $scope.currentPage = 1;
            });

            activeLink = containingElement.find('ul.pagination li.active');
            expect(activeLink.html()).toContain(1);
        });

        /**
         * Issue raised here https://github.com/michaelbromley/angularUtils/issues/78
         * Where the dir-paginate directive is inside an ngSwitch block (which is initially hidden), so the linking function is not immediately executed.
         * The dir-pagination-controls directive is *outside* the switch block, so it gets both compiled *and* linked on page load.
         */
        it('should allow paginate directive to be defined in a deferred-linking situation without error', function() {
            function compile() {
                var html;
                $scope.collection = myCollection;
                $scope.showList = false;
                html = '
' +
                            '

{{ item }}

 ' +
                        '
' +
                        '<dir-pagination-controls></dir-pagination-controls>';
                containingElement.append($compile(html)($scope));
                $scope.$apply();
            }

            expect(compile).not.toThrow();
            expect(getListItems().length).toEqual(0);

            $scope.$apply(function() {
                $scope.showList = true;
            });
            expect(getListItems().length).toEqual(10);
        });

        describe('optional attributes', function() {

            function compileWithAttributes(attributes) {
                $scope.collection = myCollection;
                $scope.currentPage = 1;
                html = '

{{ item }}

 ' +
                    '<dir-pagination-controls ' + attributes + ' ></dir-pagination-controls>';
                containingElement.append($compile(html)($scope));
                $scope.$apply();
            }

            it('should accept a max-size attribute to limit the length of the control', function() {
                compileWithAttributes(' max-size="5" ');

                var pageLinks = getPageLinksArray();

                expect(pageLinks).toEqual(['‹','1', '2', '3', '...', '10', '›']);
            });

            it('should impose a minimum max-size of 5', function() {
                compileWithAttributes(' max-size="2" ');

                var pageLinks = getPageLinksArray();

                expect(pageLinks).toEqual(['‹','1', '2', '3', '...', '10', '›']);
            });

            it('should go to the last page when clicking the end arrow', function() {
                compileWithAttributes(' boundary-links="true" ');
                var pagination = containingElement.find('ul.pagination');

                pagination.children().eq(10).find('a').triggerHandler('click');
                $scope.$apply();
                expect($scope.currentPage).toBe(10);
            });

            it('should go to the first page when clicking the end arrow', function() {
                compileWithAttributes(' boundary-links="true" ');
                var pagination = containingElement.find('ul.pagination');

                $scope.$apply(function() {
                    $scope.currentPage = 5;
                });
                expect($scope.currentPage).toBe(5);

                pagination.children().eq(0).find('a').triggerHandler('click');
                $scope.$apply();
                expect($scope.currentPage).toBe(1);
            });

            it('should page forward', function() {
                compileWithAttributes('  ');
                var pagination = containingElement.find('ul.pagination');

                pagination.children().eq(10).find('a').triggerHandler('click');
                $scope.$apply();
                expect($scope.currentPage).toBe(2);
            });

            describe('on-page-change callback', function() {

                beforeEach(function() {
                    $scope.myCallback = function(currentPage) {
                        return "The current page is " + currentPage;
                    };
                    spyOn($scope, 'myCallback').and.callThrough();
                    compileWithAttributes(' on-page-change="myCallback(newPageNumber)" ');
                });

                it('should call the callback once when page link clicked', function() {
                    var pagination = containingElement.find('ul.pagination');

                    expect($scope.myCallback.calls.count()).toEqual(0);
                    pagination.children().eq(2).find('a').triggerHandler('click');
                    $scope.$apply();
                    expect($scope.myCallback).toHaveBeenCalled();
                    expect($scope.myCallback.calls.count()).toEqual(1);
                });

                it('should pass the current page number to the callback', function() {
                    var pagination = containingElement.find('ul.pagination');

                    pagination.children().eq(2).find('a').triggerHandler('click');
                    $scope.$apply();
                    expect($scope.myCallback).toHaveBeenCalledWith(2);
                });
            });

            describe('total-items attribute', function() {

                it('should give correct pagination at 200', function() {
                    compileElement(myCollection, 100, 1, false, 200);

                    var pageLinks = getPageLinksArray();
                    expect(pageLinks).toEqual(['‹','1', '2', '›']);
                });

                it('should give correct pagination at 500', function() {
                    compileElement(myCollection, 100, 1, false, 500);

                    var pageLinks = getPageLinksArray();
                    expect(pageLinks).toEqual(['‹','1', '2','3','4','5', '›']);
                });

                it('should correctly display the second page of results', function() {
                    compileElement(myCollection, 100, 2, false, 500);
                    listItems = getListItems();
                    expect(listItems.length).toEqual(100);
                });
            });
        });

    });

    describe('multiple pagination instances per page', function() {

        var collection1, collection2, currentPage1, currentPage2;

        beforeEach(function() {
            collection1 = [];
            collection2 = [];
            for (var i = 0; i < 20; i++) {
                collection1.push('c1:' + i);
                collection2.push('c2:' + i);
            }
        });

        /**
         * Compile function for multiple pagination directives on a single page
         * @param collection
         * @param itemsPerPage
         * @param currentPage
         * @param paginationId
         * @param customExpression
         */
        function compileMultipleInstance(collection, itemsPerPage, currentPage, paginationId, customExpression) {
            var expression;
            var html;
            if ($scope.collection === undefined) {
                $scope.collection = {};
            }
            if ($scope.itemsPerPage === undefined) {
                $scope.itemsPerPage = {};
            }
            if ($scope.currentPage === undefined) {
                $scope.currentPage = {};
            }
            $scope.collection[paginationId] = collection;
            $scope.itemsPerPage[paginationId] = itemsPerPage;
            $scope.currentPage[paginationId] = currentPage || 1;
            expression = customExpression || "item in collection." + paginationId + " | itemsPerPage: itemsPerPage." + paginationId + ": '" + paginationId + "'";
            html = '

{{ item }}

 ' +
                '<dir-pagination-controls pagination-id="' + paginationId + '"></dir-pagination-controls>';
            containingElement.append($compile(html)($scope));
            $scope.$apply();
        }

        function clickPaginationLink(paginationId, index) {
            var pagination = containingElement.find('dir-pagination-controls[pagination-id="' + paginationId + '"]');

            pagination.find('li').eq(index).find('a').triggerHandler('click');
            $scope.$apply();
        }

        function getMultiPageLinksArray(paginationId) {
            return containingElement.find('dir-pagination-controls[pagination-id="' + paginationId + '"] li').map(function() {
                return $(this).text().trim();
            }).get();
        }

        function getMultiListItems(paginationId) {
            return containingElement.find('li[pagination-id="' + paginationId + '"]').map(function() {
                return $(this).text().trim();
            }).get();
        }

        it('should allow pagination-id to control a specific collection', function() {
            compileMultipleInstance(collection1, 5, 1, "c1" );
            compileMultipleInstance(collection2, 5, 1, "c2" );

            clickPaginationLink("c1", 2);
            clickPaginationLink("c2", 4);

            expect($scope.currentPage.c1).toEqual(2);
            expect($scope.currentPage.c2).toEqual(4);
        });

        it('should allow independent changing of items per page', function() {
            compileMultipleInstance(collection1, 5, 1, "c1" );
            compileMultipleInstance(collection2, 5, 1, "c2" );

            expect(getMultiPageLinksArray("c1").length).toBe(6);
            expect(getMultiPageLinksArray("c2").length).toBe(6);

            $scope.$apply(function() {
                $scope.itemsPerPage.c1 = 10;
            });

            expect(getMultiPageLinksArray("c1").length).toBe(4);
            expect(getMultiPageLinksArray("c2").length).toBe(6);

            $scope.$apply(function() {
                $scope.itemsPerPage.c2 = 7;
            });

            expect(getMultiPageLinksArray("c1").length).toBe(4);
            expect(getMultiPageLinksArray("c2").length).toBe(5);
        });

        it('should allow independent filtering', function() {
            compileMultipleInstance(collection1, 5, 1, "c1", "item in collection.c1 | filter: filter1 | itemsPerPage: itemsPerPage.c1: 'c1'");
            compileMultipleInstance(collection2, 5, 1, "c2", "item in collection.c2 | filter: filter2 | itemsPerPage: itemsPerPage.c2: 'c2'" );

            $scope.$apply(function() {
                $scope.filter1 = "7";
                $scope.filter2 = "8";
            });

            expect(getMultiListItems("c1")).toEqual(['c1:7', 'c1:17']);
            expect(getMultiListItems("c2")).toEqual(['c2:8', 'c2:18']);

        });

        it('should allow independent setting of current-page externally', function() {
            compileMultipleInstance(collection1, 2, 1, "c1" );
            compileMultipleInstance(collection2, 2, 1, "c2" );

            $scope.$apply(function() {
                $scope.currentPage.c1 = 2;
                $scope.currentPage.c2 = 4;
            });

            expect(getMultiListItems("c1")).toEqual(['c1:2', 'c1:3']);
            expect(getMultiListItems("c2")).toEqual(['c2:6', 'c2:7']);
        });

        it('should throw an exception if a non-existant paginationId is set in the pagination-controls', function() {
            $scope.collection = [1,2,3,4,5];

            function compile() {
                var html = '

{{ item }}

 ' +
                    '<dir-pagination-controls pagination-id="id2"></dir-pagination-controls>';

                containingElement.append($compile(html)($scope));
                $scope.$apply();
            }

            expect(compile).toThrow("pagination directive: the pagination controls (id: id2) cannot be used without the corresponding pagination directive.");
        });

        it('should throw an exception if a non-existant paginationId is set in the itemsPerPage filter', function() {
            $scope.collection = [1,2,3,4,5];

            function compile() {
                var html = '

{{ item }}

 ' +
                    '<dir-pagination-controls pagination-id="id1"></dir-pagination-controls>';

                containingElement.append($compile(html)($scope));
                $scope.$apply();
            }

            expect(compile).toThrow("pagination directive: the itemsPerPage id argument (id: id2) does not match a registered pagination-id.");
        });

    });

    describe('multi element functionality', function() {

        function compileMultiElement(collection, itemsPerPage, currentPage) {
            var html;
            $scope.collection = collection;
            $scope.itemsPerPage = itemsPerPage || 10;
            $scope.currentPage = currentPage || 1;
            html = '
' +
                        '
header
' +
                        '
{{ item }}
' +
                        '
footer
' +
                    '
 ';
            containingElement.append($compile(html)($scope));
            $scope.$apply();
        }

        it('should compile with multi element syntax', function() {
            function compile() {
                compileMultiElement([]);
            }
            expect(compile).not.toThrow();
        });

        it('should display the list correctly', function() {
            compileMultiElement(myCollection, 3);
            expect(containingElement.find('p').length).toEqual(3);
        });

        it('should page correctly', function() {
            compileMultiElement(myCollection, 3);

            expect(containingElement.find('p').eq(0).html()).toEqual('item 1');

            $scope.$apply(function() {
                $scope.currentPage = 2;
            });

            expect(containingElement.find('p').eq(0).html()).toEqual('item 4');
        });

        it('should work with data-dir-paginate-start syntax', function() {
            function compile() {
                var html = '
' +
                    '
{{ item }}
' +
                    '
stuff
' +
                    '
 ';
                $scope.collection = myCollection;
                containingElement.append($compile(html)($scope));
                $scope.$apply();
            }

            expect(compile).not.toThrow();
            expect(containingElement.find('h1').length).toEqual(3);
            expect(containingElement.find('p').length).toEqual(3);
        });
    });
});


text:
<?xml version="1.0" encoding="utf-8"?>

<resources>
  <string name="commons_facebook">Commons Facebook-side</string>
  <string name="commons_github">Commons Github-kildekode</string>
  <string name="commons_logo">Commons-logo</string>
  <string name="commons_website">Commons-hjemmeside</string>
  <string name="submit">Indsend</string>
  <string name="appwidget_img">Dagens billede</string>
  <plurals name="uploads_pending_notification_indicator">
    <item quantity="one">%1$d fil overføres</item>
    <item quantity="other">%1$d filer overføres</item>
  </plurals>
  <plurals name="contributions_subtitle" fuzzy="true">
    <item quantity="zero">\@string/contributions_subtitle_zero</item>
    <item quantity="one">%1$d overførsel</item>
    <item quantity="other">%1$d overførsler</item>
  </plurals>
  <plurals name="starting_multiple_uploads" fuzzy="true">
    <item quantity="one">Starter %1$d overførsel</item>
    <item quantity="other">Starter %1$d overførsler</item>
  </plurals>
  <plurals name="multiple_uploads_title" fuzzy="true">
    <item quantity="one">%1$d overførsel</item>
    <item quantity="other">%1$d overførsler</item>
  </plurals>
  <string name="share_license_summary" fuzzy="true">Billedet vil blive licenseret under %1$s</string>
  <string name="navigation_item_explore">Udforsk</string>
  <string name="preference_category_appearance">Udseende</string>
  <string name="preference_category_general">Generelt</string>
  <string name="preference_category_feedback">Tilbagemelding</string>
  <string name="preference_category_privacy">Privatliv</string>
  <string name="app_name">Commons</string>
  <string name="bullet">•</string>
  <string name="menu_settings">Indstillinger</string>
  <string name="intent_share_upload_label">Upload til Commons</string>
  <string name="username">Brugernavn</string>
  <string name="password">Adgangskode</string>
  <string name="login_credential">Log ind på din Commons Beta-konto</string>
  <string name="login">Log på</string>
  <string name="forgot_password">Glemt adgangskode?</string>
  <string name="signup">Opret en konto</string>
  <string name="logging_in_title">Logger på</string>
  <string name="logging_in_message">Vent…</string>
  <string name="login_success">Du er nu logget på!</string>
  <string name="login_failed">Det mislykkedes at logge på!</string>
  <string name="upload_failed">Filen blev ikke fundet. Forsøg med en anden fil.</string>
  <string name="authentication_failed">Godkendelse mislykkedes, log venligst på igen</string>
  <string name="uploading_started">Overførsel begyndt!</string>
  <string name="upload_completed_notification_title">%1$s overført!</string>
  <string name="upload_completed_notification_text">Tryk for at få vist din upload</string>
  <string name="upload_progress_notification_title_start" fuzzy="true">Starter med at uploade %1$s</string>
  <string name="upload_progress_notification_title_in_progress">%1$s overføres</string>
  <string name="upload_progress_notification_title_finishing">Afslutter uploadning af %1$s</string>
  <string name="upload_failed_notification_title" fuzzy="true">Overførsel af %1$s mislykkedes</string>
  <string name="upload_failed_notification_subtitle">Klik for at se</string>
  <string name="title_activity_contributions">Mine seneste overførsler</string>
  <string name="contribution_state_queued">I kø</string>
  <string name="contribution_state_failed">Mislykkedes</string>
  <string name="contribution_state_in_progress">%1$d%% færdig</string>
  <string name="contribution_state_starting">Overfører</string>
  <string name="menu_from_gallery">Fra galleriet</string>
  <string name="menu_from_camera">Tag billede</string>
  <string name="menu_nearby">I nærhenden</string>
  <string name="provider_contributions">Mine uploads</string>
  <string name="menu_share">Del</string>
  <string name="share_title_hint">Billedtekst (Påkrævet)</string>
  <string name="share_description_hint">Beskrivelse</string>
  <string name="login_failed_network">Kan ikke logge på - netværksfejl</string>
  <string name="login_failed_throttled">Alt for mange mislykkede forsøg. Prøv igen om et par minutter.</string>
  <string name="login_failed_blocked">Beklager, denne bruger er blevet blokeret på Commons</string>
  <string name="login_failed_2fa_needed">Du skal angive din tofaktorgodkendelseskode.</string>
  <string name="login_failed_generic">Det mislykkedes at logge på</string>
  <string name="share_upload_button">Upload</string>
  <string name="multiple_share_base_title">Navngiv dette sæt</string>
  <string name="provider_modifications">Ændringer</string>
  <string name="menu_upload_single">Upload</string>
  <string name="categories_search_text_hint">Søgekategorier</string>
  <string name="menu_save_categories">Gem</string>
  <string name="refresh_button">Opdater</string>
  <string name="display_list_button">Liste</string>
  <string name="contributions_subtitle_zero" fuzzy="true">Ingen overførelser endnu</string>
  <string name="categories_not_found">Ingen kategorier matchende %1$s er fundet</string>
  <string name="categories_skip_explanation">Tilføj kategorier for at gøre billederne mere synlig på Wikimedia Commons. Tast for at tilføje kategorier.</string>
  <string name="categories_activity_title">Kategorier</string>
  <string name="title_activity_settings">Indstillinger</string>
  <string name="title_activity_signup">Opret konto</string>
  <string name="title_activity_featured_images">Udvalgte billeder</string>
  <string name="title_activity_category_details">Kategori</string>
  <string name="menu_about">Om</string>
  <string name="about_license">Wikimedia Commons-programmet oprettet og udviklet af frivillige i Wikimediafællesskabet. Wikimedia Foundation er ikke involveret i oprettelse, udvikling eller vedligeholdelse af programmet.</string>
  <string name="about_improve">Opret en ny GitHub-sag for fejlrapporter og forslag.</string>
  <string name="about_privacy_policy">Privatlivspolitik</string>
  <string name="about_credits">Tak til</string>
  <string name="title_activity_about">Om</string>
  <string name="menu_feedback">Send tilbagemelding (med e-mail)</string>
  <string name="no_email_client">Ingen e-postklient installeret</string>
  <string name="provider_categories">Nyligt anvendte kategorier</string>
  <string name="waiting_first_sync">Venter på den første synkronisering…</string>
  <string name="no_uploads_yet">Du har endnu ikke uploadet nogen billeder.</string>
  <string name="menu_retry_upload">Forsøg igen</string>
  <string name="menu_cancel_upload">Annullér</string>
  <string name="media_upload_policy">Ved at indsende dette billeder erklærer jeg at det er mit eget arbejde, som ikke indeholder materialer med ophavsret eller selvportrætter og generelt overholder Wikimedia Commons-politikkerne.</string>
  <string name="menu_download">Hent</string>
  <string name="preference_license">Standardlicens</string>
  <string name="use_previous">Brug forrige titel og beskrivelse</string>
  <string name="preference_theme">Tema</string>
  <string name="license_name_cc_by_sa_four"> Attribution-ShareAlike 4.0</string>
  <string name="license_name_cc_by_four"> Attribution 4.0</string>
  <string name="license_name_cc_by_sa"> Attribution-ShareAlike 3.0</string>
  <string name="license_name_cc_by"> Attribution 3.0</string>
  <string name="license_name_cc0">CC0</string>
  <string name="license_name_cc_by_sa_3_0">CC BY-SA 3.0</string>
  <string name="license_name_cc_by_3_0">CC BY 3.0</string>
  <string name="license_name_cc_by_sa_4_0">CC BY-SA 4.0</string>
  <string name="license_name_cc_by_4_0">CC BY 4.0</string>
  <string name="tutorial_1_text">Wikimedia Commons lagrer de fleste billeder, som bruges på Wikipedia.</string>
  <string name="tutorial_1_subtext">Dine billeder hjælper med til at uddanne folk rundt om i verden!</string>
  <string name="tutorial_2_text">Læg venligst kun billeder op som er taget af dig selv:</string>
  <string name="tutorial_2_subtext_1">Naturlige objekter (blomster, dyr, bjerge)</string>
  <string name="tutorial_2_subtext_2">Nyttige objekter (cykler, togstationer)</string>
  <string name="tutorial_2_subtext_3">Berømte personer (din borgmester, olympiske atleter)</string>
  <string name="tutorial_3_text">Overfør venligst IKKE:</string>
  <string name="tutorial_3_subtext_1">Selvportrætter eller billeder af dine venner</string>
  <string name="tutorial_3_subtext_2">Billeder du har hentet fra internettet</string>
  <string name="tutorial_3_subtext_3">Skærmbilleder af proprietære programmer</string>
  <string name="tutorial_4_text">Eksempel på overførsel:</string>
  <string name="tutorial_4_subtext_1">Titel: Sydneys operahus</string>
  <string name="tutorial_4_subtext_2">Beskrivelse: Sydneys operahus set fra den anden side af bugten</string>
  <string name="tutorial_4_subtext_3">Kategorier: Sydneys operahus fra vest, Sydneys operahus eksterne visninger</string>
  <string name="welcome_wikipedia_text">Bidrag med dine billeder. Hjælp Wikipedias artikler med at komme til live!</string>
  <string name="welcome_wikipedia_subtext">Billeder på Wikipedia kommer fra Wikimedia Commons.</string>
  <string name="welcome_copyright_text">Dine billeder hjælper med til at uddanne folk rundt om i verden.</string>
  <string name="welcome_copyright_subtext">Undgå ophavsretligt beskyttede materialer du har fundet på internettet samt billeder af plakater, bogomslag osv.</string>
  <string name="welcome_final_text">Forstået?</string>
  <string name="welcome_final_button_text">Ja!</string>
  <string name="welcome_help_button_text">Flere oplysninger</string>
  <string name="detail_panel_cats_label">Kategorier</string>
  <string name="detail_panel_cats_loading">Indlæser…</string>
  <string name="detail_panel_cats_none">Ingen valgt</string>
  <string name="detail_description_empty">Ingen beskrivelse</string>
  <string name="detail_discussion_empty">Ingen diskussion</string>
  <string name="detail_license_empty">Ukendt licens</string>
  <string name="menu_refresh">Opdater</string>
  <string name="read_storage_permission_rationale">Krævet tilladelse: Læs eksternt lager. Programmet kan ikke tilgå dit galleri uden denne tilladelse.</string>
  <string name="write_storage_permission_rationale" fuzzy="true">Krævet tilladelse: Skriv til eksternt lager. Program kan ikke tilgå dit kamera uden denne funktion.</string>
  <string name="ok">O.k.</string>
  <string name="warning">Advarsel</string>
  <string name="yes">Ja</string>
  <string name="no">Nej</string>
  <string name="media_detail_title">Titel</string>
  <string name="media_detail_description">Beskrivelse</string>
  <string name="media_detail_discussion">Diskussion</string>
  <string name="media_detail_author">Forfatter</string>
  <string name="media_detail_uploaded_date">Overførselsdato</string>
  <string name="media_detail_license">Licens</string>
  <string name="media_detail_coordinates">Koordinater</string>
  <string name="media_detail_coordinates_empty">Ingen angivet</string>
  <string name="become_a_tester_title">Bliv en betatester</string>
  <string name="become_a_tester_description">Registrer dig på vores betakanal på Google Play og få tidlig tilgang til nye funktioner og feilrettelser</string>
  <string name="_2fa_code">2FA-kode</string>
  <string name="logout_verification">Ønsker du at logge ud?</string>
  <string name="mediaimage_failed">Mediebillede mislykkedes</string>
  <string name="no_subcategory_found">Ingen underkategorier fundet</string>
  <string name="no_parentcategory_found">Ingen overordnede kategorier fundet</string>
  <string name="welcome_image_mount_zao">Monter Zao</string>
  <string name="welcome_image_llamas">Lamaer</string>
  <string name="welcome_image_rainbow_bridge">Regnbuebro</string>
  <string name="welcome_image_tulip">Tulipan</string>
  <string name="welcome_image_welcome_wikipedia">Velkommen til Wikipedia</string>
  <string name="welcome_image_welcome_copyright">Velkommen til ophavsret</string>
  <string name="welcome_image_sydney_opera_house">Operahuset i Sydney</string>
  <string name="cancel">Afbryd</string>
  <string name="navigation_drawer_open">Åbn</string>
  <string name="navigation_drawer_close">Luk</string>
  <string name="navigation_item_home">Hjem</string>
  <string name="navigation_item_upload">Overfør</string>
  <string name="navigation_item_nearby">I nærheden</string>
  <string name="navigation_item_about">Om</string>
  <string name="navigation_item_settings">Indstillinger</string>
  <string name="navigation_item_feedback">Tilbagemelding</string>
  <string name="navigation_item_logout">Log af</string>
  <string name="navigation_item_info">Øvelse</string>
  <string name="navigation_item_notification">Påmindelser</string>
  <string name="no_description_found">ingen beskrivelse fundet</string>
  <string name="nearby_info_menu_commons_article">Commons-filside</string>
  <string name="nearby_info_menu_wikidata_article">Wikibase-emne</string>
  <string name="nearby_info_menu_wikipedia_article">Wikipedia artikel</string>
  <string name="description_info">Beskriv mediet så godt som muligt: Hvor blev det taget? Hvad viser det? Hvad er konteksten? Beskriv objekterne eller personerne. Giv information som ikke nemt kan gættes, for eksempel hvornår på dagen billedet blev taget, om det er et landskabsbillede. Om billedet viser noget usædvanligt, forklar hvad som gør det usædvanlig.</string>
  <string name="upload_problem_exist">Mulige problemer med dette billede:</string>
  <string name="upload_problem_image_dark">Billedet er for mørkt.</string>
  <string name="upload_problem_image_blurry">Billedet er slørret.</string>
  <string name="upload_problem_image_duplicate">Billedet er allerede på Commons.</string>
  <string name="upload_problem_different_geolocation">Billedet blev taget et andet sted.</string>
  <string name="upload_problem_do_you_continue">Ønsker du stadig at overføre dette billede?</string>
  <string name="use_external_storage" fuzzy="true">Brug eksternt lager</string>
  <string name="use_external_storage_summary" fuzzy="true">Gem billeder taget med din enheds program på kameraet</string>
  <string name="login_to_your_account">Log ind på din konto</string>
  <string name="send_log_file">Send logfil</string>
  <string name="send_log_file_description" fuzzy="true">Send logfil til udviklerne via e-post</string>
  <string name="no_web_browser">Ingen internetbrowser fundet til at åbne adresse</string>
  <string name="null_url">Fejl! Adressen blev ikke fundet</string>
  <string name="nominate_deletion">Nomineret til sletning</string>
  <string name="nominated_for_deletion">Dette billede er blevet nomineret til sletning.</string>
  <string name="nominated_see_more">Se webstedet for information</string>
  <string name="skip_login">Spring over</string>
  <string name="navigation_item_login">Log på</string>
  <string name="nearby_location_not_available" fuzzy="true">Sted ikke tilgængeligt.</string>
  <string name="location_permission_rationale_nearby">Tilladelse kræves for at vise en liste over steder i nærheden</string>
  <string name="nearby_directions">Rutevejledning</string>
  <string name="nearby_wikidata">Wikidata</string>
  <string name="nearby_wikipedia">Wikipedia</string>
  <string name="nearby_commons">Commons</string>
  <string name="about_rate_us">Vurder os</string>
  <string name="about_faq">Ofte Stillede Spørgsmål</string>
  <string name="welcome_skip_button">Udelad øvelse</string>
  <string name="no_internet">Internet er utilgængeligt</string>
  <string name="no_notifications">Ingen notifikationer fundet</string>
  <string name="about_translate">Oversæt</string>
  <string name="about_translate_title">Sprog</string>
  <string name="about_translate_message">Vælg det sprog som du ønsker at indsende oversættelser for</string>
  <string name="about_translate_proceed">Fortsæt</string>
  <string name="about_translate_cancel">Annullér</string>
  <string name="retry">Prøv igen</string>
  <string name="showcase_view_needs_photo">Dette sted mangler et billede.</string>
  <string name="showcase_view_has_photo">Dette sted har allerede et billede.</string>
  <string name="showcase_view_no_longer_exists">Dette sted findes ikke længere.</string>
  <string name="no_images_found">Ingen billeder fundet!</string>
  <string name="error_loading_images">Der opstod en fejl under indlæsningen af billeder.</string>
  <string name="image_uploaded_by">Lagt op af: %1$s</string>
  <string name="block_notification_title">Blokeret</string>
  <string name="block_notification">Du er blokeret fra at redigere Commons</string>
  <string name="app_widget_heading">Dagens billede</string>
  <string name="menu_search_button">Søg</string>
  <string name="search_commons">Søgning på Commons</string>
  <string name="title_activity_search">Søg</string>
  <string name="search_recent_header">Seneste søgninger:</string>
  <string name="search_tab_title_media">Medier</string>
  <string name="search_tab_title_categories">Kategorier</string>
  <string name="search_tab_title_depictions">Emner</string>
  <string name="explore_tab_title_featured">Fremhævet</string>
  <string name="quiz_question_string">Er det i orden at lægge dette billede op?</string>
  <string name="question">Spørgsmål</string>
  <string name="result">Resultat</string>
  <string name="quiz_result_share_message">Del din quiz med dine venner!</string>
  <string name="continue_message">Fortsæt</string>
  <string name="correct">Rigtigt svar</string>
  <string name="wrong">Forkert svar</string>
  <string name="quiz_screenshot_question">Er det i orden at lægge dette skærmbillede op?</string>
  <string name="share_app_title">Del appen</string>
  <string name="no_recent_searches">Ingen seneste søgninger</string>
  <string name="delete_search_dialog">Ønsker du at slette denne søgning?</string>
  <string name="search_history_deleted">Søgehistorik slettet</string>
  <string name="nominate_delete">Nominer til sletning</string>
  <string name="delete">Slet</string>
  <string name="Achievements">Præstationer</string>
  <string name="Profile">Profil</string>
  <string name="statistics">Statistik</string>
  <string name="statistics_thanks">Tak modtaget</string>
  <string name="statistics_featured">Udvalgte billeder</string>
  <string name="statistics_wikidata_edits">Billeder via \"Steder i nærheden\"</string>
  <string name="level">Niveau</string>
  <string name="images_uploaded">Oplagte billeder</string>
  <string name="images_used_by_wiki">Billeder brugt</string>
  <string name="achievements_revert_limit_message">minimumskrav:</string>
  <string name="error_occurred">Der opstod en fejl!</string>
  <string name="contributions_fragment">Bidrag</string>
  <string name="nearby_fragment">I nærheden</string>
  <string name="list_sheet">Liste</string>
  <string name="storage_permission">Lagringstilladelse</string>
  <string name="step_count">Trin %1$d af %2$d: %3$s</string>
  <string name="next">Næste</string>
  <string name="previous">Forrige</string>
  <string name="title_page_bookmarks_pictures">Billeder</string>
  <string name="title_page_bookmarks_locations">Placeringer</string>
  <string name="menu_bookmark">Tilføj/Fjern bogmærker</string>
  <string name="provider_bookmarks">Bogmærker</string>
  <string name="bookmark_empty">Du har ikke tilføjet nogen bogmærker</string>
  <string name="provider_bookmarks_location">Bogmærker</string>
  <string name="deletion_reason_uploaded_by_mistake">Jeg lagde dette op ved en fejl</string>
  <string name="deletion_reason_publicly_visible">Jeg vidste ikke, det ville være til offentligt skue</string>
  <string name="deletion_reason_bad_for_my_privacy">Jeg indså, det var skidt for mit privatliv</string>
  <string name="no_uploads" fuzzy="true">Velkommen til Commons!\n\nOplæg dit første medie ved at trykke på kamera eller galleri ikonet foroven.</string>
  <string name="no_categories_selected">Ingen valgte kategorier</string>
  <string name="search_this_area">Søg i dette område</string>
  <string name="never_ask_again">Spørg aldrig om dette igen</string>
  <string name="display_location_permission_title">Bed om placeringstilladelse</string>
  <string name="ends_on">Slutter den:</string>
  <string name="display_campaigns">Vis kampagner</string>
  <string name="display_campaigns_explanation">Se aktive kampagner</string>
  <string name="nominate_for_deletion_done">Udført</string>
  <string name="review_no_category">Så for pokker da, dette er ikke engang kategoriseret!</string>
  <string name="review_thanks_yes_button_text">Næste billede</string>
  <string name="review_thanks_no_button_text">Ja, hvorfor ikke</string>
  <string name="no_image">Ingen billeder brugt</string>
  <string name="share_logs_using">Del logs ved hjælp af</string>
  <string name="menu_option_read">Vis læste</string>
  <string name="menu_option_unread">Vis ulæste</string>
  <string name="error_occurred_in_picking_images">Der opstod en fejl under udvælgelse af billeder</string>
  <string name="please_wait">Vent venligst…</string>
  <string name="skip_image">Spring over dette billede</string>
  <string name="exif_tag_name_copyright">Ophavsret</string>
  <string name="exif_tag_name_location">Placering</string>
  <string name="exif_tag_name_cameraModel">Kameramodel</string>
  <string name="exif_tag_name_lensModel">Linsemodel</string>
  <string name="exif_tag_name_serialNumbers">Serienumre</string>
  <string name="share_via">Del app via...</string>
  <string name="no_categories_found">Ingen kategorier blev fundet</string>
  <string name="delete_helper_ask_spam_selfie">et selvportræt der ikke bruges i nogen artikel</string>
  <string name="delete_helper_ask_spam_blurry">totalt sløret</string>
  <string name="delete_helper_ask_spam_nonsense">vrøvl, fuldstændigt ubrugeligt i nogen artikel</string>
  <string name="delete_helper_ask_reason_copyright_internet_photo">Vilkårligt billede fra internettet</string>
  <string name="category_edit_helper_make_edit_toast">Prøver på at opdatere kategorier.</string>
  <string name="category_edit_helper_show_edit_title_success">Succes</string>
  <string name="category_edit_helper_edit_message_else">Kunne ikke tilføje kategorier.</string>
  <string name="category_edit_button_text">Opdater kategorier</string>
  <string name="coordinates_edit_helper_show_edit_title_success">Succes</string>
  <string name="share_image_via">Del billede via</string>
  <string name="account_created">Konto oprettet!</string>
  <string name="some_error">Der var en fejl!</string>
  <string name="place_state">Placeringstatus:</string>
  <string name="place_state_exists">Findes</string>
  <string name="place_state_needs_photo">Mangler et billede</string>
  <string name="place_type">Placeringstype:</string>
  <string name="nearby_search_hint">Bro, museum, hotel, osv.</string>
  <string name="title_app_shortcut_bookmark">Bogmærker</string>
  <string name="title_app_shortcut_setting">Indstillinger</string>
  <string name="remove_bookmark">Fjernet fra bogmærker</string>
  <string name="add_bookmark">Tilføjet til borgmærker</string>
  <string name="theme_default_name">Følg systemet</string>
  <string name="theme_dark_name">Mørkt</string>
  <string name="theme_light_name">Lyst</string>
  <string name="load_more">Indlæs mere</string>
  <string name="todo_improve">Forslag til forbedringer:</string>
  <string name="missing_category">- Tilføj kategorier til dette billede for at forbedre brugbarheden.</string>
  <string name="add_picture_to_wikipedia_article_title">Tilføj billede til Wikipedia</string>
  <string name="confirm">Bekræft</string>
  <string name="instructions_title">Instruktioner</string>
  <string name="wikipedia_instructions_step_7">7. Udgiv artiklen</string>
  <string name="pause">sæt på pause</string>
  <string name="resume">genoptag</string>
  <string name="paused">Sat på pause</string>
  <string name="achievements_tab_title">Præstationer</string>
  <string name="leaderboard_tab_title">Topliste</string>
  <string name="rank_prefix">Rang:</string>
  <string name="leaderboard_column_rank">Rang</string>
  <string name="leaderboard_column_user">Bruger</string>
  <string name="leaderboard_yearly">Årlig</string>
  <string name="leaderboard_weekly">Ugentlig</string>
  <string name="leaderboard_all_time">Hele tiden</string>
  <string name="leaderboard_nearby">I nærheden</string>
  <string name="leaderboard_used">Brugt</string>
  <string name="leaderboard_my_rank_button_text">Min rang</string>
  <string name="limited_connection_mode">Begrænset forbindelsestilstand</string>
  <string name="statistics_quality">Kvalitetsbilleder</string>
  <string name="read_help_link">Læs mere</string>
  <string name="back">Tilbage</string>
  <string name="learn_more">LÆR MERE</string>
</resources>


text:
GLuint load_png_asset_into_texture(const char* relative_path) {
    assert(relative_path != NULL);

    const FileData png_file = get_asset_data(relative_path);
    const RawImageData raw_image_data =
        get_raw_image_data_from_png(png_file.data, png_file.data_length);
    const GLuint texture_object_id = load_texture(
        raw_image_data.width, raw_image_data.height,
        raw_image_data.gl_color_format, raw_image_data.data);

    release_raw_image_data(&raw_image_data);
    release_asset_data(&png_file);

    return texture_object_id;
}

GLuint build_program_from_assets(
    const char* vertex_shader_path, const char* fragment_shader_path) {
    assert(vertex_shader_path != NULL);
    assert(fragment_shader_path != NULL);

    const FileData vertex_shader_source = get_asset_data(vertex_shader_path);
    const FileData fragment_shader_source = get_asset_data(fragment_shader_path);
    const GLuint program_object_id = build_program(
        vertex_shader_source.data, vertex_shader_source.data_length,
        fragment_shader_source.data, fragment_shader_source.data_length);

    release_asset_data(&vertex_shader_source);
    release_asset_data(&fragment_shader_source);

    return program_object_id;
}


text:
using System;
using System.IO;
using Tamir.SharpSsh.java.io;
using Tamir.Streams;

namespace Tamir.SharpSsh.jsch
{
    /* -*-mode:java; c-basic-offset:2; -*- */
    /*
	Copyright (c) 2002,2003,2004 ymnk, JCraft,Inc. All rights reserved.

	Redistribution and use in source and binary forms, with or without
	modification, are permitted provided that the following conditions are met:

	  1. Redistributions of source code must retain the above copyright notice,
		 this list of conditions and the following disclaimer.

	  2. Redistributions in binary form must reproduce the above copyright
		 notice, this list of conditions and the following disclaimer in
		 the documentation and/or other materials provided with the distribution.

	  3. The names of the authors may not be used to endorse or promote products
		 derived from this software without specific prior written permission.

	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
	INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
	INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
	LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
	OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
	LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
	NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
	EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	*/

    public class IO
    {
        internal JStream ins;
        internal JStream outs;
        internal JStream outs_ext;

        private bool in_dontclose = false;
        private bool out_dontclose = false;
        private bool outs_ext_dontclose = false;

        public void setOutputStream(Stream outs)
        {
            if (outs != null)
            {
                this.outs = new JStream(outs);
            }
            else
            {
                this.outs = null;
            }
        }

        public void setOutputStream(Stream outs, bool dontclose)
        {
            this.out_dontclose = dontclose;
            setOutputStream(outs);
        }

        public void setExtOutputStream(Stream outs)
        {
            if (outs != null)
            {
                this.outs_ext = new JStream(outs);
            }
            else
            {
                this.outs_ext = null;
            }
        }

        public void setExtOutputStream(Stream outs, bool dontclose)
        {
            this.outs_ext_dontclose = dontclose;
            setExtOutputStream(outs);
        }

        public void setInputStream(Stream ins)
        {
            //ConsoleStream low buffer patch
            if (ins != null)
            {
                if (ins.GetType() == Type.GetType("System.IO.__ConsoleStream"))
                {
                    ins = new ProtectedConsoleStream(ins);
                }
                else if (ins.GetType() == Type.GetType("System.IO.FileStream"))
                {
                    ins = new ProtectedConsoleStream(ins);
                }
                this.ins = new JStream(ins);
            }
            else
            {
                this.ins = null;
            }
        }

        public void setInputStream(Stream ins, bool dontclose)
        {
            this.in_dontclose = dontclose;
            setInputStream(ins);
        }

        public void put(Packet p)
        {
            outs.Write(p.buffer.buffer, 0, p.buffer.index);
            outs.Flush();
        }

        internal void put(byte[] array, int begin, int length)
        {
            outs.Write(array, begin, length);
            outs.Flush();
        }

        internal void put_ext(byte[] array, int begin, int length)
        {
            outs_ext.Write(array, begin, length);
            outs_ext.Flush();
        }

        internal int getByte()
        {
            int res = ins.ReadByte() & 0xff;
            return res;
        }

        internal void getByte(byte[] array)
        {
            getByte(array, 0, array.Length);
        }

        internal void getByte(byte[] array, int begin, int length)
        {
            do
            {
                int completed = ins.Read(array, begin, length);
                if (completed <= 0)
                {
                    throw new IOException("End of IO Stream Read");
                }
                begin += completed;
                length -= completed;
            } while (length > 0);
        }

        public void close()
        {
            try
            {
                if (ins != null && !in_dontclose) ins.Close();
                ins = null;
            }
            catch (Exception) { }

            try
            {
                if (outs != null && !out_dontclose) outs.Close();
                outs = null;
            }
            catch (Exception) { }

            try
            {
                if (outs_ext != null && !outs_ext_dontclose) outs_ext.Close();
                outs_ext = null;
            }
            catch (Exception) { }
        }

//		public void finalize()
//		{
//			try
//			{
//				if(ins!=null) ins.Close();
//			}
//			catch{}
//			try
//			{
//				if(outs!=null) outs.Close();
//			}
//			catch{}
//		}
    }
}


text:
<link rel="stylesheet" type="text/css" href="style.css">

sine

<input class="typeRange" multiple id="typeRange" type="range" min="1" max="4" step="1" value="1"></input>

Gain

<input class="gainRange" multiple id="gainRange" type="range" min="0" max="10" step="1" value="1"></input>

<canvas id="piano-keys" width="460" height="120">canvas is not supported</canvas>


text:
<TITLE>Review for Alien Nation (1988)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Alien Nation (1988)

reviewed by
Mark R. Leeper

                                 ALIEN NATION
                       A film review by Mark R. Leeper
                        Copyright 1988 Mark R. Leeper

          Capsule review:  The biggest science fiction film of the
     year!  (What a feeble year!)  There is not a whole lot of
     science fiction in this retread of the mismatched-partners
     police film.  There is not even much in the way of new twists
     from the science fiction premise.  Lots of overly familiar
     mindless action to fill out the length to that of a feature
     film.  Rating: -1.

     These days Hollywood science fiction films really need a high budget.
And they need imagination.  Science fiction films need a budget because the
cost of automobile parts has soared.  Car chases are not exciting unless
lots of cars get smashed up, lots of shattered windshields get sprinkled
over the street, and lots of great makeup effects of people smashed up in
the cars.  That costs money.  Then filmmakers need imagination to design new
kinds of guns that the audience has not seen before.  Gunfights with the
same old sorts of guns get boring.  Hollywood has come to see that science
fiction fans want to see new guns in science fiction film gunfights.  ALIEN
NATION is a science fiction film that has the car crashes and the new guns
that fans demand.  And I hope they are happy with what they got.  I suspect
that they will be because ALIEN NATION's basic story usually does very well
whenever it shows up in a film, four or five times a year.

     As the film starts, the "Newcomers" have been on Earth for three years.
Newcomers are aliens who arrived on Earth and were accepted much like, and
to the same degree as, many other ethnic groups.  In fact, the film glosses
almost totally over how much more different an alien species would be from
us than a new and even unfamiliar human ethnic group would be.  There are
references to a very different physiology but they sure look a lot like
humans over 95% of their bodies.  In fact, the camera lingers longingly over
the very human-like breasts of the women.  Now, nobody really knows why
human women have globular breasts that even our closest primate relatives do
not.  And compared to these Newcomers, even daffodils are close relatives,
yet the Newcomers' female breasts are similar enough that our main character
gets a thrill fondling them.  Well, it is just that kind of film.

     But I am digressing.  The aliens live in very human-like ghettos and
have very human-like sorts of problems.  Towards the end of the film we
learn a few more differences, but for most of the film you could easily
substitute "Chinese" for "alien" and could tell the same story.  And
undoubtedly someone has since it is a story that has been done so frequently
in the past.  The story is the "mismatched police partners."  You have seen
it before.  It may not have been called 48 HOURS, RED HEAT, or LETHAL
WEAPON.  There are enough of them to turn listing examples into a party
game.  Yes, there is initial friction between the partners; yes, they come
to like each other.  It is all there, complete with bugs gunfights and car
chases.

     James Caan does a reasonable job as Matthew Sykes, whose old partner is
killed by insidious aliens.  Mandy Patinkin is enjoyable to watch as Sam
Francisco--named that by an insensitive immigration official.  But then it
cannot be really hard for them to play parts that have been done so many
times before.  The film also features in cameo roles lots of products you
can buy in your local grocery store.  The alien makeup is all right if
scientifically unlikely, and all other visual effects of the film have tires
and fenders or bullets.

     What was purported to be the year's biggest science fiction film is a
huge disappointment.  Rate it a -1 in the -4 to +4 scale.

                                        Mark R. Leeper
                                        att!mtgzz!leeper
                                        leeper%mtgzz@att.arpa

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

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

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

Broken URLs inthe reviews are the responsibility of the author.

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

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


text:
module Auth0
  module Api
    module V2
      # Methods to use the users endpoints
      module Users
        attr_reader :users_path

        # Retrieves a list of existing users.
        # @see https://auth0.com/docs/api/v2#!/Users/get_users
        # @param per_page [integer] The amount of entries per page. Default: 50. Max value: 100.
        # @param page [integer]  The page number. Zero based.
        # @param include_totals [boolean] True if a query summary must be included in the result.
        # @param sort [string] The field to use for sorting. 1 == ascending and -1 == descending.
        # @param connection [string] Connection filter.
        # @param fields [string] A comma separated list of fields to include or exclude from the result.
        # @param include_fields [boolean] True if the fields specified are to be included in the result, false otherwise.
        # @param q [string] Query in Lucene query string syntax. Only fields in app_metadata, user_metadata or the
        # normalized user profile are searchable.
        #
        # @return [json] Returns the list of existing users.
        def users(options = {})
          request_params = {
            per_page:       options.fetch(:per_page, nil),
            page:           options.fetch(:page, nil),
            include_totals: options.fetch(:include_totals, nil),
            sort:           options.fetch(:sort, nil),
            connection:     options.fetch(:connection, nil),
            fields:         options.fetch(:fields, nil),
            include_fields: options.fetch(:include_fields, nil),
            q:              options.fetch(:q, nil)
          }
          request_params[:search_engine] = :v2 if request_params[:q]
          get(users_path, request_params)
        end
        alias get_users users

        # Creates a new user according to optional parameters received.
        # The attribute connection is always mandatory but depending on the type of connection you are using there
        # could be others too. For instance, Auth0 DB Connections require email and password.
        # @see https://auth0.com/docs/api/v2#!/Users/post_users
        # @param name [string] The user name.
        # @param connection [string] The connection the user belongs to.
        #
        # @return [json] Returns the created user.
        def create_user(name, options = {})
          request_params = Hash[options.map { |(k, v)| [k.to_sym, v] }]
          request_params[:name] = name
          post(users_path, request_params)
        end

        # Delete all users - USE WITH CAUTION
        # @see https://auth0.com/docs/api/v2#!/Users/delete_users
        def delete_users
          delete(users_path)
        end

        # Retrieves a user given a user_id
        # @see https://auth0.com/docs/api/v2#!/Users/get_users_by_id
        # @param user_id [string] The user_id of the user to retrieve.
        # @param fields [string] A comma separated list of fields to include or exclude from the result.
        # @param include_fields [boolean] True if the fields specified are to be included in the result, false otherwise.
        #
        # @return [json] Returns the user with the given user_id if it exists.
        def user(user_id, fields: nil, include_fields: true)
          raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
          path = "#{users_path}/#{user_id}"
          request_params = {
            fields:         fields,
            include_fields: include_fields
          }
          get(path, request_params)
        end

        # Deletes a single user given its id
        # @see https://auth0.com/docs/api/v2#!/Users/delete_users_by_id
        # @param user_id [string] The user_id of the user to delete.
        def delete_user(user_id)
          raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
          path = "#{users_path}/#{user_id}"
          delete(path)
        end

        # Updates a user with the object's properties received in the optional parameters.
        # These are the attributes that can be updated at the root level:
        # blocked, email_verified, email, verify_email, password, phone_number, phone_verified,
        # verify_password, user_metadata, app_metadata, username
        # Some considerations:
        # The properties of the new object will replace the old ones.
        # The metadata fields are an exception to this rule (user_metadata and app_metadata). These properties are
        # merged instead of being replaced but be careful, the merge only occurs on the first level.
        # If you are updating email_verified, phone_verified, username or password you need to specify the connection
        # property too.
        # If your are updating email or phone_number you need to specify the connection and the client_id properties.
        # @see https://auth0.com/docs/api/v2#!/Users/patch_users_by_id
        # @param user_id [string] The user_id of the user to update.
        # @param body [hash] The optional parametes to update.
        #
        # @return [json] Returns the updated user.
        def patch_user(user_id, body)
          raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
          raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty?
          path = "#{users_path}/#{user_id}"
          patch(path, body)
        end
        alias update_user patch_user

        # Delete a user's multifactor provider
        # @see https://auth0.com/docs/api/v2#!/Users/delete_multifactor_by_provider
        # @param user_id [string] The user_id of the user to delete the multifactor provider from.
        # @param provider_name [string] The multifactor provider. Supported values 'duo' or 'google-authenticator'.
        def delete_user_provider(user_id, provider_name)
          raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
          raise Auth0::InvalidParameter, 'Must supply a valid provider name' if provider_name.to_s.empty?
          path = "#{users_path}/#{user_id}/multifactor/#{provider_name}"
          delete(path)
        end

        # Links the account specified in the body (secondary account) to the account specified by the id param
        # of the URL (primary account).
        # 1. With the authenticated primary account's JWT in the Authorization header, which has the
        # update:current_user_identities scope. In this case only the link_with param is required in the body,
        # containing the JWT obtained upon the secondary account's authentication.
        # 2. With an API V2 generated token with update:users scope. In this case you need to send provider and user_id
        # in the body. Optionally you can also send the connection_id param which is suitable for identifying a
        # particular database connection for the 'auth0' provider.
        # @see https://auth0.com/docs/api/v2#!/Users/post_identities
        # @param user_id [string] The user_id of the primary identity where you are linking the secondary account to.
        # @param body [string] the options to link the account to.
        #
        # @return [json] Returns the new array of the primary account identities.
        def link_user_account(user_id, body)
          raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
          raise Auth0::InvalidParameter, 'Must supply a valid body' if body.to_s.empty?
          path = "#{users_path}/#{user_id}/identities"
          post(path, body)
        end

        # Unlink a user account
        # @see https://auth0.com/docs/api/v2#!/Users/delete_provider_by_user_id
        # @param user_id [string] The user_id of the user identity.
        # @param provider [string] The type of identity provider.
        # @param secondary_user_id [string] The unique identifier for the user for the identity.
        #
        # @return [json] Returns the array of the unlinked account identities.
        def unlink_users_account(user_id, provider, secondary_user_id)
          raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
          raise Auth0::MissingUserId, 'Must supply a valid secondary user_id' if secondary_user_id.to_s.empty?
          raise Auth0::InvalidParameter, 'Must supply a valid provider' if provider.to_s.empty?
          path = "#{users_path}/#{user_id}/identities/#{provider}/#{secondary_user_id}"
          delete(path)
        end

        # Retrieve every log event for a specific user id
        # @see https://auth0.com/docs/api/management/v2#!/Users/get_logs_by_user
        # @param user_id [string] The user_id of the logs to retrieve.
        # @param per_page [integer] The amount of entries per page. Default: 50. Max value: 100.
        # @param page [integer]  The page number. Zero based.
        # @param include_totals [boolean] True if a query summary must be included in the result.
        # @param sort [string] The field to use for sorting. 1 == ascending and -1 == descending.
        #
        # @return [json] Returns the list of existing log entries for the given user_id.
        # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
        def user_logs(user_id, options = {})
          raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
          path = "#{users_path}/#{user_id}/logs"
          request_params = {
            user_id:        user_id,
            per_page:       options.fetch(:per_page, nil),
            page:           options.fetch(:page, nil),
            include_totals: options.fetch(:include_totals, nil),
            sort:           options.fetch(:sort, nil)
          }
          if request_params[:per_page].to_i > 100
            raise Auth0::InvalidParameter, 'The total amount of entries per page should be less than 100'
          end
          sort_pattern = /^(([a-zA-Z0-9_\.]+))\:(1|-1)$/
          if !request_params[:sort].nil? && !sort_pattern.match(request_params[:sort])
            raise Auth0::InvalidParameter, 'Sort does not match pattern ^(([a-zA-Z0-9_\\.]+))\\:(1|-1)$'
          end
          get(path, request_params)
        end
        alias get_user_log_events user_logs

        private

        # Users API path
        def users_path
          @users_path ||= '/api/v2/users'
        end
      end
    end
  end
end


text:
package com.planet_ink.coffee_mud.Locales;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.*;

public class FrozenPlains extends Plains
{
	@Override
	public String ID()
	{
		return "FrozenPlains";
	}

	public FrozenPlains()
	{
		super();
		recoverPhyStats();
		climask=Places.CLIMASK_COLD;
	}

	public static final Integer[] resourceList={
		Integer.valueOf(RawMaterial.RESOURCE_FUR)};
	public static final List<Integer> roomResources=new Vector<Integer>(Arrays.asList(resourceList));

	@Override
	public List<Integer> resourceChoices()
	{
		return Plains.roomResources;
	}
}


text:
#include "wtf/WTFThreadData.h"

#include "wtf/text/TextCodecICU.h"

namespace WTF {

ThreadSpecific<WTFThreadData>* WTFThreadData::staticData;

WTFThreadData::WTFThreadData()
    : m_atomicStringTable(nullptr)
    , m_atomicStringTableDestructor(nullptr)
    , m_compressibleStringTable(nullptr)
    , m_compressibleStringTableDestructor(nullptr)
    , m_cachedConverterICU(adoptPtr(new ICUConverterWrapper))
{
}

WTFThreadData::~WTFThreadData()
{
    if (m_atomicStringTableDestructor)
        m_atomicStringTableDestructor(m_atomicStringTable);
    if (m_compressibleStringTableDestructor)
        m_compressibleStringTableDestructor(m_compressibleStringTable);
}

} // namespace WTF