text:
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var egret;
(function (egret) {
    (function (gui) {
        /**
        * @class egret.gui.Label
        * @classdesc
        * 一行或多行不可编辑的文本控件
        * @extends egret.gui.TextBase
        */
        var Label = (function (_super) {
            __extends(Label, _super);
            /**
            * @method egret.gui.Label#constructor
            */
            function Label() {
                _super.call(this);
                this._maxDisplayedLines = 0;
                /**
                * 上一次测量的宽度
                */
                this.lastUnscaledWidth = NaN;
                this._padding = 0;
                this._paddingLeft = NaN;
                this._paddingRight = NaN;
                this._paddingTop = NaN;
                this._paddingBottom = NaN;
                this.addEventListener(gui.UIEvent.UPDATE_COMPLETE, this.updateCompleteHandler, this);
            }
            /**
            * 一个验证阶段完成
            */
            Label.prototype.updateCompleteHandler = function (event) {
                this.lastUnscaledWidth = NaN;
            };

            Object.defineProperty(Label.prototype, "maxDisplayedLines", {
                /**
                * 最大显示行数,0或负值代表不限制。
                * @member egret.gui.Label#maxDisplayedLines
                */
                get: function () {
                    return this._maxDisplayedLines;
                },
                set: function (value) {
                    if (this._maxDisplayedLines == value)
                        return;
                    this._maxDisplayedLines = value;
                    this.invalidateSize();
                    this.invalidateDisplayList();
                },
                enumerable: true,
                configurable: true
            });

            Object.defineProperty(Label.prototype, "padding", {
                /**
                * 四个边缘的共同内边距。若单独设置了任一边缘的内边距,则该边缘的内边距以单独设置的值为准。
                * 此属性主要用于快速设置多个边缘的相同内边距。默认值:0。
                * @member egret.gui.Label#padding
                */
                get: function () {
                    return this._padding;
                },
                set: function (value) {
                    if (this._padding == value)
                        return;
                    this._padding = value;
                    this.invalidateSize();
                    this.invalidateDisplayList();
                },
                enumerable: true,
                configurable: true
            });

            Object.defineProperty(Label.prototype, "paddingLeft", {
                /**
                * 文字距离左边缘的空白像素,若为NaN将使用padding的值,默认值:NaN。
                * @member egret.gui.Label#paddingLeft
                */
                get: function () {
                    return this._paddingLeft;
                },
                set: function (value) {
                    if (this._paddingLeft == value)
                        return;

                    this._paddingLeft = value;
                    this.invalidateSize();
                    this.invalidateDisplayList();
                },
                enumerable: true,
                configurable: true
            });

            Object.defineProperty(Label.prototype, "paddingRight", {
                /**
                * 文字距离右边缘的空白像素,若为NaN将使用padding的值,默认值:NaN。
                * @member egret.gui.Label#paddingRight
                */
                get: function () {
                    return this._paddingRight;
                },
                set: function (value) {
                    if (this._paddingRight == value)
                        return;

                    this._paddingRight = value;
                    this.invalidateSize();
                    this.invalidateDisplayList();
                },
                enumerable: true,
                configurable: true
            });

            Object.defineProperty(Label.prototype, "paddingTop", {
                /**
                * 文字距离顶部边缘的空白像素,若为NaN将使用padding的值,默认值:NaN。
                * @member egret.gui.Label#paddingTop
                */
                get: function () {
                    return this._paddingTop;
                },
                set: function (value) {
                    if (this._paddingTop == value)
                        return;

                    this._paddingTop = value;
                    this.invalidateSize();
                    this.invalidateDisplayList();
                },
                enumerable: true,
                configurable: true
            });

            Object.defineProperty(Label.prototype, "paddingBottom", {
                /**
                * 文字距离底部边缘的空白像素,若为NaN将使用padding的值,默认值:NaN。
                * @member egret.gui.Label#paddingBottom
                */
                get: function () {
                    return this._paddingBottom;
                },
                set: function (value) {
                    if (this._paddingBottom == value)
                        return;

                    this._paddingBottom = value;
                    this.invalidateSize();
                    this.invalidateDisplayList();
                },
                enumerable: true,
                configurable: true
            });

            /**
            * @method egret.gui.Label#measure
            */
            Label.prototype.measure = function () {
                //先提交属性,防止样式发生改变导致的测量不准确问题。
                if (this._invalidatePropertiesFlag)
                    this.validateProperties();
                if (this.isSpecialCase()) {
                    if (isNaN(this.lastUnscaledWidth)) {
                        this._oldPreferWidth = NaN;
                        this._oldPreferHeight = NaN;
                    } else {
                        this.measureUsingWidth(this.lastUnscaledWidth);
                        return;
                    }
                }

                var availableWidth;

                if (!isNaN(this.explicitWidth))
                    availableWidth = this.explicitWidth;
                else if (this.maxWidth != 10000)
                    availableWidth = this.maxWidth;

                this.measureUsingWidth(availableWidth);
            };

            /**
            * 特殊情况,组件尺寸由父级决定,要等到父级UpdateDisplayList的阶段才能测量
            */
            Label.prototype.isSpecialCase = function () {
                return this._maxDisplayedLines != 1 && (!isNaN(this.percentWidth) || (!isNaN(this.left) && !isNaN(this.right))) && isNaN(this.explicitHeight) && isNaN(this.percentHeight);
            };

            /**
            * 使用指定的宽度进行测量
            */
            Label.prototype.measureUsingWidth = function (w) {
                var originalText = this._textField.text;
                if (this._textChanged) {
                    this._textField.text = this._text;
                }

                var padding = isNaN(this._padding) ? 0 : this._padding;
                var paddingL = isNaN(this._paddingLeft) ? padding : this._paddingLeft;
                var paddingR = isNaN(this._paddingRight) ? padding : this._paddingRight;
                var paddingT = isNaN(this._paddingTop) ? padding : this._paddingTop;
                var paddingB = isNaN(this._paddingBottom) ? padding : this._paddingBottom;

                this._textField.width = NaN;
                this._textField.height = NaN;
                if (!isNaN(w)) {
                    this._textField.width = w - paddingL - paddingR;
                    this.measuredWidth = Math.ceil(this._textField.measuredWidth);
                    this.measuredHeight = Math.ceil(this._textField.measuredHeight);
                } else {
                    this.measuredWidth = Math.ceil(this._textField.measuredWidth);
                    this.measuredHeight = Math.ceil(this._textField.measuredHeight);
                }

                if (this._maxDisplayedLines > 0 && this._textField.numLines > this._maxDisplayedLines) {
                    var size = this._textField.size;
                    var lineSpacing = this._textField.lineSpacing;
                    this.measuredHeight = (size + lineSpacing) * this._maxDisplayedLines - lineSpacing;
                }

                this.measuredWidth += paddingL + paddingR;
                this.measuredHeight += paddingT + paddingB;

                this._textField.text = originalText;
            };

            /**
            * @method egret.gui.Label#updateDisplayList
            * @param unscaledWidth {number}
            * @param unscaledHeight {number}
            */
            Label.prototype.updateDisplayList = function (unscaledWidth, unscaledHeight) {
                this.$updateDisplayList(unscaledWidth, unscaledHeight);

                var padding = isNaN(this._padding) ? 0 : this._padding;
                var paddingL = isNaN(this._paddingLeft) ? padding : this._paddingLeft;
                var paddingR = isNaN(this._paddingRight) ? padding : this._paddingRight;
                var paddingT = isNaN(this._paddingTop) ? padding : this._paddingTop;
                var paddingB = isNaN(this._paddingBottom) ? padding : this._paddingBottom;

                this._textField.x = paddingL;
                this._textField.y = paddingT;
                if (this.isSpecialCase()) {
                    var firstTime = isNaN(this.lastUnscaledWidth) || this.lastUnscaledWidth != unscaledWidth;
                    this.lastUnscaledWidth = unscaledWidth;
                    if (firstTime) {
                        this._oldPreferWidth = NaN;
                        this._oldPreferHeight = NaN;
                        this.invalidateSize();
                        return;
                    }
                }

                //防止在父级validateDisplayList()阶段改变的text属性值,
                //接下来直接调用自身的updateDisplayList()而没有经过measure(),使用的测量尺寸是上一次的错误值。
                if (this._invalidateSizeFlag)
                    this.validateSize();

                if (!this._textField.visible)
                    this._textField.visible = true;

                this._textField.width = unscaledWidth - paddingL - paddingR;
                var unscaledTextHeight = unscaledHeight - paddingT - paddingB;
                this._textField.height = unscaledTextHeight;

                if (this._maxDisplayedLines > 0 && this._textField.numLines > this._maxDisplayedLines) {
                    var size = this._textField.size;
                    var lineSpacing = this._textField.lineSpacing;
                    var h = (size + lineSpacing) * this._maxDisplayedLines - lineSpacing;
                    this._textField.height = Math.min(unscaledTextHeight, h);
                }
            };
            return Label;
        })(gui.TextBase);
        gui.Label = Label;
        Label.prototype.__class__ = "egret.gui.Label";
    })(egret.gui || (egret.gui = {}));
    var gui = egret.gui;
})(egret || (egret = {}));


text:
% Figures for first whole cell paper
%
% Author: Jonathan Karr, jkarr@stanford.edu
% Affilitation: Covert Lab, Department of Bioengineering, Stanford University
% Last updated: 12/19/2011
classdef PaperFigures
    methods (Static)
        function run()
            %import classes
            import edu.stanford.covert.cell.sim.analysis.Figures34;
            import edu.stanford.covert.cell.sim.analysis.SingleGeneDeletions;

            %base directory for output
            baseDir = 'documentation/paper/figures/';

            %% Main paper
            %figure 1: designed with Adobe Illustrator
            %- documentation/paper/figures/model overview.ai
            %- documentation/paper/figures/algorithm overview with process-state network.ai

            %figure 2, 3, 5: plotted entirely with MATLAB
            Figures34.run('documentation/paper/figures');

            %figure 4: combination of MATLAB, illustrator
            Figures34.run('documentation/paper/figures');

            %figure 6: plotted entirely with MATLAB
            SingleGeneDeletions.run();                %run analysis and cache results
            SingleGeneDeletions.plotOverview(...      %plot overview figure from cached results
                [baseDir filesep 'figure6.pdf'], ...
                [baseDir filesep 'figure6.xls']);

            %figure 7: combination of MATLAB, illustrator

            %% Supplement
            %state, process schematics: designed with Adobe Illustrator
        end
    end
end

redpajama_set_name: RedPajamaGithub


text:
import Oauth from 'node-twitter-api';
import Twitter from 'twitter';

const consumerKey = "STEtjjUGjw5bhdCjE1bdRxMh3";
const consumerSecret = "B3mvDiqXsCp8xkoi4Fa8WlIKqzNA2mePSic5BSP0kBGW3SdmLj";

const oauth = new Oauth({
  consumerKey,
  consumerSecret,
  callback: 'http://twitter.com/'
});

let requestToken, requestTokenSecret;
export default {getOauthUrl, getTokens, getApi};
function getOauthUrl(){
  return new Promise((resolve, reject)=>{
    oauth.getRequestToken((error, _requestToken, _requestTokenSecret)=>{
      if (error) {
        console.error("Error getting OAuth request token",error);
        reject(error);
      } else {
        requestToken = _requestToken;
        requestTokenSecret = _requestTokenSecret;
        resolve(oauth.getAuthUrl(_requestToken));
      }
    });
  });
}
function getTokens(oauth_verifier){
  return new Promise((resolve, reject)=>{
    oauth.getAccessToken(requestToken, requestTokenSecret, oauth_verifier,
      (error, accessToken, accessTokenSecret)=>{
        if (error) {
          reject("error accessToken",error);
        } else {
          oauth.verifyCredentials(accessToken, accessTokenSecret,
            (error, data)=>{
              if (error) {
                reject("error Credentials",error);
              } else {
                console.log(accessToken, accessTokenSecret);
                console.log("verified", data.screen_name);
                const tokens = {
                  consumer_key: consumerKey,
                  consumer_secret: consumerSecret,
                  access_token_key: accessToken,
                  access_token_secret: accessTokenSecret
                };
                resolve(tokens);
              }
            }
          );
        }
      }
    );
  });
}
function getApi(tokens){
  return new Twitter(tokens);
}


text:
package g1.example.dagger;

public interface Toaster {
    void toast();
}


text:
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Logic;

namespace Azure.ResourceManager.Logic.Models
{
    /// <summary> The list of integration account partners. </summary>
    internal partial class IntegrationAccountPartnerListResult
    {
        /// <summary> Initializes a new instance of IntegrationAccountPartnerListResult. </summary>
        internal IntegrationAccountPartnerListResult()
        {
            Value = new ChangeTrackingList<IntegrationAccountPartnerData>();
        }

        /// <summary> Initializes a new instance of IntegrationAccountPartnerListResult. </summary>
        /// <param name="value"> The list of integration account partners. </param>
        /// <param name="nextLink"> The URL to get the next set of results. </param>
        internal IntegrationAccountPartnerListResult(IReadOnlyList<IntegrationAccountPartnerData> value, string nextLink)
        {
            Value = value;
            NextLink = nextLink;
        }

        /// <summary> The list of integration account partners. </summary>
        public IReadOnlyList<IntegrationAccountPartnerData> Value { get; }
        /// <summary> The URL to get the next set of results. </summary>
        public string NextLink { get; }
    }
}


text:
package gw.internal.gosu.parser.classTests;

import gw.config.CommonServices;
import gw.internal.gosu.parser.IGosuClassInternal;
import gw.lang.parser.IParseIssue;
import gw.lang.reflect.TypeSystem;
import gw.test.TestClass;

import java.util.List;

/**
 */
public class MethodCallValidatorTest extends TestClass
{
  public void testCatchesInvalidCallAndPassesValidCall()
  {
    if( CommonServices.getEntityAccess().getLanguageLevel().isStandard() )
    {
      // no validation stuff in os gosu
      return;
    }
    IGosuClassInternal gsClass = (IGosuClassInternal) TypeSystem.getByFullName( "gw.internal.gosu.parser.classTests.gwtest.annotations.UsesHasMethodCallValidator" );
    assertFalse( gsClass.isValid() );
    List<IParseIssue> exceptions = gsClass.getParseResultsException().getParseExceptions();
    assertEquals( 1, exceptions.size() );
    assertEquals( 16, exceptions.get( 0 ).getLine() );
    assertEquals( "Must pass single argument that is a block expression with no arguments", exceptions.get( 0 ).getMessageArgs()[0] );
  }

  public void testCatchesInvalidCallAndPassesValidCallForGosu()
  {
    if( CommonServices.getEntityAccess().getLanguageLevel().isStandard() )
    {
      // no validation stuff in os gosu
      return;
    }

    IGosuClassInternal gsClass = (IGosuClassInternal) TypeSystem.getByFullName( "gw.internal.gosu.parser.classTests.gwtest.annotations.GosuMethodCallValidator" );
    assertFalse( gsClass.isValid() );
    List<IParseIssue> exceptions = gsClass.getParseResultsException().getParseExceptions();
    assertEquals( 1, exceptions.size() );
    assertEquals( 16, exceptions.get( 0 ).getLine() );
    assertEquals( "Go Gosu", exceptions.get( 0 ).getMessageArgs()[0] );
  }
}


text:
let unirest = require('unirest');

import assert = require('power-assert');
import {HttpClient} from '../HttpClient';
import {UnirestHttpClient} from '../UnirestHttpClient';

describe('Unirest Http Client', () => {
    let client: HttpClient;

    before((done) => {
        client = new UnirestHttpClient();

        unirest.post('http://localhost:2525/imposters')
            .send(JSON.stringify(
                {
                    port: 4545,
                    protocol: 'http',
                    stubs: [
                        {
                            predicates: [{equals: {headers: {headerOne: 'valueOne'}, method: 'GET'}}],
                            responses: [{is: {body: 'Get response', statusCode: 200}}]
                        },
                        {
                            predicates: [{
                                equals: {
                                    body: 'post rawBody',
                                    headers: {headerTwo: 'valueTwo'},
                                    method: 'POST'
                                }
                            }],
                            responses: [{is: {body: 'Post response', statusCode: 201}}]
                        },
                        {
                            predicates: [{
                                equals: {
                                    body: 'put rawBody',
                                    headers: {headerThree: 'valueThree'},
                                    method: 'PUT'
                                }
                            }],
                            responses: [{is: {body: 'Put response', statusCode: 202}}]
                        },
                        {
                            predicates: [{equals: {headers: {headerFour: 'valueFour'}, method: 'HEAD'}}],
                            responses: [{is: {body: 'Head response', statusCode: 203}}]
                        },
                        {
                            predicates: [{equals: {headers: {headerFive: 'valueFive'}, method: 'DELETE'}}],
                            responses: [{is: {statusCode: 204}}]
                        },
                        {
                            responses: [{is: {statusCode: 205}}]
                        }
                    ]
                }
            ))
            .end(() => {
                done();
            });
    });

    after((done) => {
        unirest.delete('http://localhost:2525/imposters')
            .end(() => {
                done();
            });
    });

    it('should send a GET request', () => {
        return client.get('http://localhost:4545', {headerOne: 'valueOne'}).then((resp) => {
            assert.equal(resp.statusCode, 200);
            assert.equal(resp.rawBody, 'Get response');
        });
    });

    it('should send a POST request', () => {
        return client.post('http://localhost:4545', 'post rawBody', {headerTwo: 'valueTwo'}).then((resp) => {
            assert.equal(resp.statusCode, 201);
            assert.equal(resp.rawBody, 'Post response');
        });
    });

    it('should send a PUT request', () => {
        return client.put('http://localhost:4545', 'put rawBody', {headerThree: 'valueThree'}).then((resp) => {
            assert.equal(resp.statusCode, 202);
            assert.equal(resp.rawBody, 'Put response');
        });
    });

    it('should send a HEAD request', () => {
        return client.head('http://localhost:4545', {headerFour: 'valueFour'}).then((resp) => {
            assert.equal(resp.statusCode, 203);
        });
    });

    it('should send a DELETE request', () => {
        return client.delete('http://localhost:4545', {headerFive: 'valueFive'}).then((resp) => {
            assert.equal(resp.statusCode, 204);
        });
    });

    ['get', 'post', 'put', 'delete', 'head'].forEach((entry) => {
        it('should send ' + entry + ' requests without headers', () => {
            return client[entry]('http://localhost:4545').then((resp) => {
                assert.equal(resp.statusCode, 205);
            });
        });
    });
});


text:
.. testsetup:: *

   from pwnlib.util.cyclic import *

:mod:`pwnlib.util.cyclic` --- Generation of unique sequences
============================================================

.. automodule:: pwnlib.util.cyclic
   :members:


text:
@import UIKit;
@class CollectionDataSource;
@class SWLRill;

@interface CollectionViewController : UIViewController

+ (instancetype)controllerWithLayout:(UICollectionViewLayout *)layout dataSource:(CollectionDataSource *)dataSource;

- (void)setSelectedItemRill:(SWLRill *)selectedItemRill;

@end


text:
<%#
 Copyright 2013-2017 the original author or authors from the JHipster project.

 This file is part of the JHipster project, see http://www.jhipster.tech/
 for more information.

 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.
-%>
(function() {
    'use strict';

    angular
        .module('<%=angularAppName%>')
        .factory('Sessions', Sessions);

    Sessions.$inject = ['$resource'];

    function Sessions ($resource) {
        return $resource(<% if(authenticationType === 'uaa') { %>'<%= uaaBaseName.toLowerCase() %>/api/account/sessions/:series'<%} else { %>'api/account/sessions/:series'<% } %>, {}, {
            'getAll': { method: 'GET', isArray: true}
        });
    }
})();


text:
title:  Ulike slags ofringer
date:  21/02/2022
---

Jesu død ga tilgivelse eller ettergivelse av våre synder. Men tilgivelse er mye mer enn å slette straffen for overtredelse av pakten. Det involverer andre viktige ting. Det er derfor israelittenes offersystem hadde fem slags ofringer. Hvert slag var nødvendig for å uttrykke hele betydningen av Kristi kors.

`Les Ef 3,14–19. Hva ba Paulus om for de troende?`

Brennofferet krevde at hele dyret ble fortært på alteret (3 Mos 1). Det representerte Jesus, for hans liv ble fortært for oss. Forsoning krevde at Jesus ga seg helt for oss. Jesus var lik Gud, men «ga avkall på sitt eget, tok på seg tjenerskikkelse» (Fil 2,5–8).

Kornofferet var en takkegave for at Gud sørget for sitt folk (3 Mos 2). Det representerer også Jesus, «livets brød» (Joh 6,35; Joh 6,48), som gir evig liv.

Fredsofferet innebar et fellesmåltid med familie og venner for å feire det velværet Gud ga (3 Mos 3). Det representerte Kristus, som ga oss fred med sitt offer (Jes 53,5; Rom 5,1; Ef 2,14). Det understreker også at vi må ta del i Jesu offer ved å spise hans kjøtt og drikke hans blod (Joh 6,51–56).

Syndofferet eller renselsesofferet ga soning for synd (3 Mos 4,1–5,13). Offeret understreket den rollen dyrets blod hadde – å kjøpe fri fra synd (3 Mos 17,11) og pekte frem til Jesu blod som kjøper oss fri fra våre synder (Matt 26,28; Rom 3,25; Hebr 9,14).

Skyldofferet (3 Mos 5,14–6,7) ga tilgivelse i tilfeller der oppreisning eller tilbakebetaling var mulig. Det viser at Guds tilgivelse ikke løser oss fra ansvaret for å yte erstatning eller tilbakebetaling til dem vi har gjort urett.

Ofringene i helligdommen lærer oss at opplevelsen av frelse er mer enn bare å ta imot Jesus som vår stedfortreder. Vi må også «fore oss» på ham, dele hans fortjeneste med andre og gi erstatning til dem vi har gjort noe galt imot.


text:
import uuid
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.db import models
from django.db.models.signals import pre_delete
from django.dispatch.dispatcher import receiver
from django.conf.global_settings import LANGUAGES as DJANGO_LANG
from django.utils.translation import ugettext_lazy as _
from django.contrib import messages

LANGUAGES = [('en-US', 'US English'), ('pt-BR', 'Brazilian Portuguese')]
for n in DJANGO_LANG:
    LANGUAGES.append(n)

animal_risk = [('no','No Risk'),('lo','Low Risk'),('hi','High Risk')]
accident_type = [('indirect','Indirect Contact'),('mild','Mild Accident'),('severe','Severe Accident')]
contact_type = [('bite','Bite'),('scratch','Scratch'),('handle','Handling Objects'),('lick','Licking'),('needle','Needle Stick; Vaccination Accident')]
wound_area = [('l','Large'),('s','Small')]
wound_depth = [('d','Deep'),('s','Superficial')]
wound_location = [('any','Any Other Location'),('upperlimb','Upper Limb'),('trunk','Trunk'),('sole','Sole'),('superficial','Skin, Superficial Wound'),('deep','Skin, Deep Wound'),('intact','Skin, Intact'),('neck','Neck'),('mucosa','Mucosa'),('lowerlimb','Lower Limb'),('head','Head'),('hand','Hand'),('fingertip','Fingertip'),('face','Face')]

class Victim(models.Model):
    """
    Every encounter must have a registered victim.
    """
    sys_id = models.UUIDField(_("UUID"), default=uuid.uuid4, editable=False, unique=True, help_text=_('A unique system identifier for this victim.'))
    vname = models.CharField(_("victim name"), max_length=110, unique=True,  db_index=True, help_text=_('Enter the name of victim.'))
    local_id = models.CharField(_("victim id"), max_length=110, unique=True, db_index=True, help_text=_('Enter a local ID for this victim, e.g. EMR Number, SSN, other health record ID, drivers license, etc.'))
    id_type = models.CharField(_("id type"), max_length=80, help_text=_('Enter the name of the type of local ID used.'))

    def __str__(self):
        return self.vname

    class Meta:
        verbose_name = _("Victim")
        verbose_name_plural = _("Victims")
        ordering = ['vname']

class Animal(models.Model):
    """
    Selectable animals.
    """
    name = models.CharField(_("name"), max_length=80, help_text=_('Enter the name of a selectable animal.'))
    risk = models.CharField(_("risk"), max_length=2, choices=animal_risk, help_text=_('Select the risk level.'))
    comment = models.CharField(_("comment"), max_length=120, help_text=_('Enter an explanitoory comment.'))

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = _("Animal")
        verbose_name_plural = _("Animals")
        ordering = ['name']

class Encounter(models.Model):
    """
    Every encounter.
    """
    sys_id = models.UUIDField(_("UUID"), default=uuid.uuid4, editable=False, unique=True, help_text=_('A unique system identifier for this encounter.'))
    animal = models.ForeignKey(Animal, verbose_name=_("Animal"), to_field="name", help_text=_('Choose the type of the animal.'))
    accident_type = models.CharField(_("Accident Type"), max_length=8, choices=accident_type, help_text=_('Select the type of accident.'))
    contact_type = models.CharField(_("Contact Type"), max_length=8, choices=contact_type, help_text=_('Select the type of contact.'))
    wound_area = models.CharField(_("Wound Area"), max_length=1, choices=wound_area, help_text=_('Select the wound area indicator.'))
    wound_depth = models.CharField(_("Wound Depth"), max_length=1, choices=wound_depth, help_text=_('Select the wound depth indicator.'))
    wound_location = models.CharField(_("Wound Location"), max_length=30, choices=wound_location, help_text=_('Select the wound location.'))
    risk_result = models.CharField(_("Risk Result"), max_length=30, editable=False, help_text=_('The calculated risk result for this encounter.'))
    victim = models.ForeignKey(Victim, verbose_name=_("Victim Name"), to_field="vname", help_text=_('Choose the name of the victim.'))
    occured_when = models.DateTimeField(_('When Occured'), auto_now=True, help_text=_("When occured."))
    updated = models.DateTimeField(_('last updated'), auto_now=True, help_text=_("Last update."))
    neighborhood = models.CharField(_("neighborhood"), max_length=80, help_text=_('Enter the name of the neighborhood when the encounter occured.'))
    city = models.CharField(_("city"), max_length=80, help_text=_('Enter the name of the city when the encounter occured.'))
    state = models.CharField(_("state"), max_length=80, help_text=_('Enter the name of the state when the encounter occured.'))
    country = models.CharField(_("country"), max_length=80, help_text=_('Enter the name of the country when the encounter occured.'))
    latitude = models.CharField(_("latitude"), max_length=80, help_text=_('Enter the latitude when the encounter occured.'))
    longitude = models.CharField(_("longitude"), max_length=80, help_text=_('Enter the longitude when the encounter occured.'))

    def __str__(self):
        return self.victim

    class Meta:
        verbose_name = _("Encounter")
        verbose_name_plural = _("Encounters")
        ordering = ['victim']


text:
<!--<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context=".MainActivity"
    android:id="@+id/">
-->

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:weightSum="1">

    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Single User Mode"
        android:id="@+id/singleButton"
        android:onClick="singleUserClicked"
        android:layout_above="@+id/textView4"
        android:layout_alignParentTop="true"
        android:background="#91f3ff" />

    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Gameshow Buzzer Mode"
        android:id="@+id/multipleButton"
        android:onClick="gameShowBuzzerClicked"
        android:layout_alignParentBottom="true"
        android:layout_below="@+id/textView4"
        android:background="#b7ff4b" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:text="  "
        android:id="@+id/textView4"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true" />

</RelativeLayout>


text:
<?php

/* YallaWebsiteBackendBundle:Event:new.html.twig */
class __TwigTemplate_49b0ae6420a56e9994c6a4ae893cc126a2e740a7b79dd961d2d2e6d904ec7801 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("YallaWebsiteBackendBundle:Event:base_event.html.twig", "YallaWebsiteBackendBundle:Event:new.html.twig", 1);
        $this->blocks = array(
            'controlleraction' => array($this, 'block_controlleraction'),
            'datepicker' => array($this, 'block_datepicker'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "YallaWebsiteBackendBundle:Event:base_event.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 2
    public function block_controlleraction($context, array $blocks = array())
    {
        // line 3
        echo "

            Create Event

            <form enctype=\"multipart/form-data\" action=\"";
        // line 9
        echo $this->env->getExtension('routing')->getPath("backend_event_new");
        echo "\" method=\"POST\">
                ";
        // line 11
        echo "

                    Event Name
                    ";
        // line 13
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "title", array()), 'widget');
        echo "

                    Event Start Date
                    ";
        // line 18
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "startDate", array()), 'widget');
        echo "

                    Event End Date
                    ";
        // line 23
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "endDate", array()), 'widget');
        echo "

                    Venue Details

                    Check if it's a stored Venue ";
        // line 29
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "isVenue", array()), 'widget');
        echo "

                    ";
        // line 30
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "location", array()), 'widget');
        echo "
                    Venues List

                    ";
        // line 32
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "venue", array()), 'widget');
        echo "

                    Add Tags Separated by Comma
                    ";
        // line 36
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "tags", array()), 'widget');
        echo "

                    Event Description
                    ";
        // line 40
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "content", array()), 'widget');
        echo "

                    Similar Artist
                    ";
        // line 45
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "similarArtist", array()), 'widget');
        echo "

                    Cover Image
                    ";
        // line 49
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "media", array()), 'widget');
        echo "

Only Images.

                ";
        // line 52
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["form"]) ? $context["form"] : null), 'errors');
        echo "
                ";
        // line 53
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "_token", array()), 'row');
        echo "

<input type=\"submit\" class=\"btn btn-default\" value=\"Save\"/>

            </form>

    ";
    }

    // line 60
    public function block_datepicker($context, array $blocks = array())
    {
        // line 61
        echo "        ";
        $this->displayParentBlock("datepicker", $context, $blocks);
        echo "

    ";
    }

    public function getTemplateName()
    {
        return "YallaWebsiteBackendBundle:Event:new.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  133 => 61,  130 => 60,  121 => 53,  117 => 52,  111 => 49,  104 => 45,  96 => 40,  89 => 36,  82 => 32,  77 => 30,  73 => 29,  64 => 23,  56 => 18,  48 => 13,  44 => 11,  40 => 9,  32 => 3,  29 => 2,  11 => 1,);
    }
}
/* {% extends "YallaWebsiteBackendBundle:Event:base_event.html.twig" %}*/
/* {% block controlleraction  %}*/
/*
*/
/*
*/
/*             Create Event*/
/*
*/
/* */
/*
*/
/*             <form enctype="multipart/form-data" action="{{ path('backend_event_new')}}" method="POST">      */
/*                 {#  {{ form_widget(form)}}#}*/
/*
*/
/*                     Event Name*/
/*                     {{ form_widget(form.title)}}*/
/*
*/
/* */
/*
*/
/*                     Event Start Date*/
/*                     {{ form_widget(form.startDate)}}*/
/*
*/
/* */
/*
*/
/*                     Event End Date*/
/*                     {{ form_widget(form.endDate)}}*/
/*
*/
/* */
/* */
/*
*/
/*                     Venue Details
*/
/*                     Check if it's a stored Venue {{ form_widget(form.isVenue) }}
*/
/*                     {{ form_widget(form.location)}}*/
/*                     Venues List
*/
/*                     {{ form_widget(form.venue)}}*/
/*
*/
/*
*/
/*                     Add Tags Separated by Comma */
/*                     {{ form_widget(form.tags)}}*/
/*
*/
/*
*/
/*                     Event Description*/
/*                     {{ form_widget(form.content)}}*/
/*
*/
/*                 */
/*
*/
/*                     Similar Artist*/
/*                     {{ form_widget(form.similarArtist)}}*/
/*
*/
/*
*/
/*                     Cover Image*/
/*                     {{ form_widget(form.media)}}*/
/*
Only Images.
*/
/*
*/
/*                 {{ form_errors(form) }}*/
/*                 {{ form_row(form._token) }}*/
/*
<input type="submit" class="btn btn-default" value="Save"/>
*/
/*             </form>*/
/*
*/
/*     {% endblock %}*/
/* */
/* */
/*     {% block datepicker %}*/
/*         {{ parent() }}*/
/*         */
/*     {% endblock %}*/
/* */


text:
var  cancelLeaveRecords = function($scope, myfactory) {

        myfactory.cancelData()
        .success(function(cdata){
                console.log(cdata);
            $scope.cancelData = cdata;
        })
        .error(function(data,status,header,config){

        });

    $scope.cancelForLeave = function(cdata) {

        var sId = $(".table-bordered input:radio:checked").attr("id");
        //alert(sId);
         myfactory.cancelDataById(sId)
        .success(function(data){
            //alert(data);
            console.log("data in controller:"+data.applyLeavestatus);
            $(".leave_"+sId).html(data.applyLeavestatus);
        })
         .error(function(data,status,header,config){
                console.log('Error: ' + data);
        });
       /* var id = $("#").val('cdataId.id');
        alert(id);
        myfactory.cancelDataById()
        .success(function(cdataId){
            alert(cdataId);
           var id = $("#leaveType").val('cdataId.id');
            alert(id);
            console.log("id:"+id);
        })
        .error(function(cdata,status,header,config){
                console.log('Error: ' + cdataId);
        });*/
        myfactory.putCancelVal(cdata);
    };

};

cancelLeaveRecords.$inject = ['$scope','myfactory'];
angular.module("myapp").controller("cancelLeaveRecords",cancelLeaveRecords)


text:
require 'spec_helper'

describe 'Umakadata' do
  describe 'Criteria' do
    describe 'ExecutionTime' do

      describe '#execution_time' do
        MALFORMED_QUERY = <<-'SPARQL'
ASK{
SPARQL

        let(:test_class) { Struct.new(:target) { include Umakadata::Criteria::ExecutionTime } }
        let(:target) { test_class.new }

        before do
          @uri = URI("http://example.com")
        end

        it 'should return not nil' do
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, anything)
            .and_return(1000)
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, anything)
            .and_return(10000)
          expect(target.execution_time(@uri)).not_to be_nil
        end

        it 'should return nil when the response time of ask query is nil' do
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, anything)
            .and_return(nil)
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, anything)
            .and_return(10000)
          expect(target.execution_time(@uri)).to be_nil
        end

        it 'should return nil when the response time of target query is nil' do
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, anything)
            .and_return(1000)
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, anything)
          .and_return(nil)
          expect(target.execution_time(@uri)).to be_nil
        end

        it 'should return nil when the response time of ask query is greater than the one of target query' do
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, anything)
            .and_return(10000)
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, anything)
            .and_return(1000)
          expect(target.execution_time(@uri)).to eq (-9000)
        end

        it 'should return 9000 when the response time of ask query is 1000 and the one of target query is 10000' do
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, anything)
            .and_return(1000)
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, anything)
            .and_return(10000)
          expect(target.execution_time(@uri)).to eq 9000
        end

        it 'should return 0 when the response time of ask query is 10000 and the one of target query is 10000' do
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, anything)
            .and_return(10000)
          allow(target).to receive(:response_time).with(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, anything)
            .and_return(10000)
          expect(target.execution_time(@uri)).to eq 0
        end

        describe '#response_time' do
          it 'should return nil when query is malformed' do
            allow(Umakadata::SparqlHelper).to receive(:query).and_raise(@uri, SPARQL::Client::MalformedQuery, logger: anything).and_return(nil)
            expect(target.response_time(@uri, MALFORMED_QUERY, anything)).to eq nil
          end

          it 'should return time when query is correctly' do
            allow(Umakadata::SparqlHelper).to receive(:query).with(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, logger: anything).and_return(Net::HTTPResponse)
            allow(Umakadata::SparqlHelper).to receive(:query).with(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, logger: anything).and_return(Net::HTTPResponse)
            expect(target.response_time(@uri, Umakadata::Criteria::ExecutionTime::BASE_QUERY, anything).instance_of?(Float)).to be true
            expect(target.response_time(@uri, Umakadata::Criteria::ExecutionTime::TARGET_QUERY, anything).instance_of?(Float)).to be true
         end
       end

     end
    end
  end
end


text:
package ch.javasoft.math.varint.array;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

import ch.javasoft.math.BigFraction;
import ch.javasoft.math.array.ArrayOperations;
import ch.javasoft.math.array.NumberArrayOperations;
import ch.javasoft.math.array.NumberOperators;
import ch.javasoft.math.array.impl.DefaultArrayOperations;
import ch.javasoft.math.linalg.DefaultLinAlgOperations;
import ch.javasoft.math.linalg.GaussPivotingFactory;
import ch.javasoft.math.linalg.LinAlgOperations;
import ch.javasoft.math.operator.AbstractBinaryOperator;
import ch.javasoft.math.operator.AbstractBooleanBinaryOperator;
import ch.javasoft.math.operator.AbstractBooleanUnaryOperator;
import ch.javasoft.math.operator.AbstractIntBinaryOperator;
import ch.javasoft.math.operator.AbstractIntUnaryOperator;
import ch.javasoft.math.operator.AbstractNullaryOperator;
import ch.javasoft.math.operator.AbstractUnaryOperator;
import ch.javasoft.math.operator.AggregatingBinaryOperator;
import ch.javasoft.math.operator.AggregatingUnaryOperator;
import ch.javasoft.math.operator.BinaryOperator;
import ch.javasoft.math.operator.BooleanBinaryOperator;
import ch.javasoft.math.operator.BooleanUnaryOperator;
import ch.javasoft.math.operator.ConvertingUnaryOperator;
import ch.javasoft.math.operator.DivisionSupport;
import ch.javasoft.math.operator.IntBinaryOperator;
import ch.javasoft.math.operator.IntUnaryOperator;
import ch.javasoft.math.operator.NullaryOperator;
import ch.javasoft.math.operator.UnaryOperator;
import ch.javasoft.math.operator.AggregatingBinaryOperator.Id;
import ch.javasoft.math.varint.VarIntFactory;
import ch.javasoft.math.varint.VarIntNumber;

/**
 * Number operators for {@link VarIntNumber} numbers. A
 * {@link #INTEGER_DIVISION_INSTANCE default instance} is available as constant,
 * where divisions are performed as integer division, ignoring possible
 * remainders. Alternate instances are available, e.g. if division should throw
 * an exception.
 */
public class VarIntOperators implements NumberOperators<VarIntNumber, VarIntNumber[]> {

	/**
	 * DivisionMode is the method used to divide two integer
	 * values, which might result in a remainder value.
	 */
	public static enum DivisionMode implements DivisionSupport {
		/**
		 * No division is supported. All division and inversion operations throw
		 * an {@link ArithmeticException}, even if the operation would yield
		 * an integer value.
		 */
		None {
			@Override
			public VarIntNumber divide(VarIntNumber dividend, VarIntNumber divisor) {
				throw new ArithmeticException("division not supported");
			}
		},
		/**
		 * Integer division is if exact division is possible. If exact division
		 * is not possible, that is, if the remainder is unequal to zero, an
		 * {@link ArithmeticException} is thrown.
		 */
		Exact {
			@Override
			public VarIntNumber divide(VarIntNumber dividend, VarIntNumber divisor) {
				return dividend.divide(divisor, RoundingMode.UNNECESSARY);
			}
		},
		/**
		 * Integer division is used truncating remainders if necessary. Division
		 * and inversion operations never throw an exception, unless the divisor
		 * is zero.
		 */
		Integer {
			@Override
			public VarIntNumber divide(VarIntNumber dividend, VarIntNumber divisor) {
				return dividend.divide(divisor);
			}
		},
		/**
		 * Division is performed using rounding if necessary. The closest
		 * integer is used as defined by the
		 * {@link RoundingMode#HALF_EVEN HALF_EVEN} rounding mode. Division
		 * and inversion operations never throw an exception, unless the divisor
		 * zero.
		 */
		Round {
			@Override
			public VarIntNumber divide(VarIntNumber dividend, VarIntNumber divisor) {
				return dividend.divide(divisor, RoundingMode.HALF_EVEN);
			}
		};
		/**
		 * Returns true if division always causes an {@link ArithmeticException}.
		 * The method returns {@code true} for {@link #None} division mode.
		 */
		public boolean alwaysCausesException() {
			return None.equals(this);
		}
		/**
		 * Returns true if division might cause an {@link ArithmeticException},
		 * not meaning division by zero, but since rounding or truncation would
		 * be necessary. The method returns {@code true} for {@link #None} and
		 * {@link #Exact} division mode.
		 */
		public boolean mightCauseException() {
			return None.equals(this) || Exact.equals(this);
		}
		/**
		 * Returns true if division is exact, that is, for {@link #Exact}
		 * division mode.
		 */
		public boolean isExact() {
			return DivisionMode.Exact.equals(this);
		}
		/**
		 * Returns true if division is sufficiently exact to be used in an
		 * numeric algorithm. The method returns {@code true} for
		 * {@link #Exact} division mode.
		 */
		public boolean isSufficientlyExact() {
			return DivisionMode.Exact.equals(this);
		}
		/**
		 * Performs the mode specific integer division
		 *
		 * @param dividend	the dividend
		 * @param divisor	the divisor
		 * @return	{@code divident / divisor}
		 */
		abstract public VarIntNumber divide(VarIntNumber dividend, VarIntNumber divisor);
	}
	/**
	 * ConversionMode is the method to use when other numeric
	 * types are converted into a big integer.
	 */
	public static enum ConversionMode {
		/**
		 * Conversion from other number type throws an
		 * {@link ArithmeticException} if the number did not represent
		 * an integer value, that is, if rounding or truncating would be
		 * necessary for conversion.
		 */
		Exact {
			@Override
			public VarIntNumber convert(Number value) {
				if (value instanceof VarIntNumber) {
					return (VarIntNumber)value;
				}
				if (value instanceof BigDecimal) {
					return VarIntFactory.create(((BigDecimal)value).toBigIntegerExact());
				}
				if (value instanceof BigFraction) {
					return VarIntFactory.create(((BigFraction)value).toBigIntegerExact());
				}
				if (value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long || value instanceof AtomicInteger || value instanceof AtomicLong) {
					return VarIntFactory.create(value.longValue());
				}
				if (value instanceof Double || value instanceof Float) {
					return VarIntFactory.create(BigDecimal.valueOf(value.doubleValue()).toBigIntegerExact());
				}
				return VarIntFactory.create(value.toString());
			}
		},
		/**
		 * Conversion is performed using truncation if necessary. For integer
		 * fractions, integer division is used. For floating point numbers, the
		 * decimal places are simply omitted.
		 */
		Truncate {
			@Override
			public VarIntNumber convert(Number value) {
				if (value instanceof VarIntNumber) {
					return (VarIntNumber)value;
				}
				if (value instanceof BigDecimal) {
					return VarIntFactory.create(((BigDecimal)value).toBigInteger());
				}
				if (value instanceof BigFraction) {
					return VarIntFactory.create(((BigFraction)value).toBigInteger());
				}
				if (value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long || value instanceof AtomicInteger || value instanceof AtomicLong) {
					return VarIntFactory.create(value.longValue());
				}
				if (value instanceof Double || value instanceof Float) {
					return VarIntFactory.create(BigDecimal.valueOf(value.doubleValue()).toBigInteger());
				}
				return VarIntFactory.create(value.toString());
			}
		},
		/**
		 * Conversion is performed using rounding if necessary. The closest
		 * integer is used as defined by the
		 * {@link RoundingMode#HALF_EVEN HALF_EVEN} rounding mode.
		 */
		Round {
			public VarIntNumber convertBigDecimal(BigDecimal value) {
				return VarIntFactory.create(value.divide(BigDecimal.ONE, 0, RoundingMode.HALF_EVEN).toBigIntegerExact());
			}
			@Override
			public VarIntNumber convert(Number value) {
				if (value instanceof VarIntNumber) {
					return (VarIntNumber)value;
				}
				if (value instanceof BigDecimal) {
					return convertBigDecimal((BigDecimal)value);
				}
				if (value instanceof BigFraction) {
					return VarIntFactory.create(((BigFraction)value).toBigInteger(RoundingMode.HALF_EVEN));
				}
				if (value instanceof Byte || value instanceof Short || value instanceof Integer || value instanceof Long || value instanceof AtomicInteger || value instanceof AtomicLong) {
					return VarIntFactory.create(value.longValue());
				}
				if (value instanceof Double || value instanceof Float) {
					return convertBigDecimal(BigDecimal.valueOf(value.doubleValue()));
				}
				return VarIntFactory.create(value.toString());
			}
		};

		/**
		 * Returns true if conversion from another number value might cause
		 * an {@link ArithmeticException}. This is only true for {@link #Exact}
		 * conversion mode.
		 */
		public boolean conversionMightCauseException() {
			return Exact.equals(this);
		}
		/**
		 * Performs the mode specific conversion operation
		 *
		 * @param value		the value to convert
		 * @return	the {@code value} converted into a big integer
		 */
		public abstract VarIntNumber convert(Number value);
	}

	/**
	 * The default instance, all operators perform the plain operations without
	 * rounding. Division is performed as integer division, possible remainders
	 * are ignored. This implementation uses {@link DivisionMode#Integer} and
	 * {@link ConversionMode#Truncate}.
	 */
	public static final VarIntOperators INTEGER_DIVISION_INSTANCE = new VarIntOperators(DivisionMode.Integer, ConversionMode.Truncate);
	/**
	 * The instance without division, that is, all division operations throw
	 * an {@link ArithmeticException}. All conversion operations from another
	 * number type also throw an {@link ArithmeticException} if the number did
	 * not represent an integer value. This implementation uses
	 * {@link DivisionMode#None} and {@link ConversionMode#Exact}.
	 */
	public static final VarIntOperators NO_DIVISION_INSTANCE = new VarIntOperators(DivisionMode.None, ConversionMode.Exact);
	/**
	 * The instance with exact integer division, that is, division operations
	 * throw an {@link ArithmeticException} if it does not yield an integer
	 * value. All conversion operations from another number type also throw an
	 * {@link ArithmeticException} if the number did not represent an integer
	 * value. This implementation uses {@link DivisionMode#Exact} and
	 * {@link ConversionMode#Exact}.
	 */
	public static final VarIntOperators EXACT_DIVISION_INSTANCE = new VarIntOperators(DivisionMode.Exact, ConversionMode.Exact);
	/**
	 * The instance with rounded integer division, that is, division operations
	 * use {@link RoundingMode#HALF_EVEN HALF_EVEN} rounding. This
	 * implementation uses {@link DivisionMode#Round} and
	 * {@link ConversionMode#Round}.
	 */
	public static final VarIntOperators ROUNDED_DIVISION_INSTANCE = new VarIntOperators(DivisionMode.Round, ConversionMode.Round);

	private final LinAlgOperations<VarIntNumber, VarIntNumber[]> 			linAlgOps;

	private final DivisionMode											divisionMode;
	private final ConversionMode										conversionMode;
	private final NullaryOperator<VarIntNumber, VarIntNumber[]>[] 			nullary;
	private final UnaryOperator<VarIntNumber, VarIntNumber[]>[] 			unary;
	private final BooleanUnaryOperator<VarIntNumber, VarIntNumber[]>[] 		boolUnary;
	private final IntUnaryOperator<VarIntNumber, VarIntNumber[]>[] 			intUnary;
	private final ConvertingUnaryOperator<Number, Number[], VarIntNumber, VarIntNumber[]> converter;
	private final BinaryOperator<VarIntNumber, VarIntNumber[]>[] 			binary;
	private final BooleanBinaryOperator<VarIntNumber, VarIntNumber[]>[] 	boolBinary;
	private final IntBinaryOperator<VarIntNumber, VarIntNumber[]>[] 		intBinary;
	private final AggregatingUnaryOperator<VarIntNumber, VarIntNumber[]>[] 	aggUnary;
	private final AggregatingBinaryOperator<VarIntNumber, VarIntNumber[]>[]	aggBinary;

	/**
	 * Constructor for VarIntNumberNumberOperators with division and
	 * conversion mode. Note that constants are available for the most common
	 * modes.
	 *
	 * @param divMode	the division mode
	 * @param convMode	the conversion mode
	 */
	public VarIntOperators(DivisionMode divMode, ConversionMode convMode) {
		divisionMode	= divMode;
		conversionMode	= convMode;
		nullary				= initNullary();
		unary 				= initUnary(divMode);
		boolUnary 			= initBoolUnary();
		intUnary 			= initIntUnary();
		converter			= initConverter(convMode);
		binary 				= initBinary(divMode);
		boolBinary 			= initBoolBinary();
		intBinary 			= initIntBinary();
		aggUnary			= initAggUnary();
		aggBinary 			= initAggBinary();
		linAlgOps			= new DefaultLinAlgOperations<VarIntNumber, VarIntNumber[]>(
			this, new DefaultArrayOperations<VarIntNumber>(VarIntNumber[].class), VarIntGaussPivoting.LEN_L
		);
	}

	public Class<VarIntNumber> numberClass() {
		return VarIntNumber.class;
	}
	public Class<VarIntNumber[]> arrayClass() {
		return VarIntNumber[].class;
	}

	/**
	 * Returns the division mode for this big integer operators, defining how
	 * the method used to divide two integer values, which might result in a
	 * remainder value.
	 */
	public DivisionMode getDivisionMode() {
		return divisionMode;
	}
	public LinAlgOperations<VarIntNumber, VarIntNumber[]> getLinAlgOperations() {
		return linAlgOps;
	}
	public LinAlgOperations<VarIntNumber, VarIntNumber[]> getLinAlgOperations(GaussPivotingFactory<VarIntNumber, VarIntNumber[]> gaussPivotingFactory) {
		return new DefaultLinAlgOperations<VarIntNumber, VarIntNumber[]>(getNumberArrayOperations(), gaussPivotingFactory);
	}
	public ArrayOperations<VarIntNumber[]> getArrayOperations() {
		return linAlgOps.getArrayOperations();
	}
	public NumberArrayOperations<VarIntNumber, VarIntNumber[]> getNumberArrayOperations() {
		return linAlgOps.getNumberArrayOperations();
	}
	/**
	 * Returns the conversion mode for this big integer operators, defining
	 * how numeric values are converted into big integer values.
	 */
	public ConversionMode getConversionMode() {
		return conversionMode;
	}

	public DivisionSupport getDivisionSupport() {
		return divisionMode;
	}

	public VarIntNumber zero() {
		return VarIntNumber.ZERO;
	}
	public VarIntNumber one() {
		return VarIntNumber.ONE;
	}

	public NullaryOperator<VarIntNumber, VarIntNumber[]> constant(VarIntNumber value) {
		if (value.equals(VarIntNumber.ZERO)) {
			return nullary(NullaryOperator.Id.zero);
		}
		else if (value.equals(VarIntNumber.ONE)) {
			return nullary(NullaryOperator.Id.one);
		}
		return new VarIntNumberConstOperator(value);
	}
	public ConvertingUnaryOperator<Number, Number[], VarIntNumber, VarIntNumber[]> converter() {
		return converter;
	}
	public NullaryOperator<VarIntNumber, VarIntNumber[]> nullary(NullaryOperator.Id id) {
		return nullary[id.ordinal()];
	}
	public UnaryOperator<VarIntNumber, VarIntNumber[]> unary(UnaryOperator.Id id) {
		return unary[id.ordinal()];
	}

	public BooleanUnaryOperator<VarIntNumber, VarIntNumber[]> booleanUnary(BooleanUnaryOperator.Id id) {
		return boolUnary[id.ordinal()];
	}

	public IntUnaryOperator<VarIntNumber, VarIntNumber[]> intUnary(IntUnaryOperator.Id id) {
		return intUnary[id.ordinal()];
	}

	public BinaryOperator<VarIntNumber, VarIntNumber[]> binary(BinaryOperator.Id id) {
		return binary[id.ordinal()];
	}

	public BooleanBinaryOperator<VarIntNumber, VarIntNumber[]> booleanBinary(BooleanBinaryOperator.Id id) {
		return boolBinary[id.ordinal()];
	}

	public IntBinaryOperator<VarIntNumber, VarIntNumber[]> intBinary(IntBinaryOperator.Id id) {
		return intBinary[id.ordinal()];
	}

	public AggregatingUnaryOperator<VarIntNumber, VarIntNumber[]> aggregatingUnary(AggregatingUnaryOperator.Id id) {
		return aggUnary[id.ordinal()];
	}

	public AggregatingBinaryOperator<VarIntNumber, VarIntNumber[]> aggregatingBinary(Id id) {
		return aggBinary[id.ordinal()];
	}

	@SuppressWarnings("unchecked")
	private static NullaryOperator<VarIntNumber, VarIntNumber[]>[] initNullary() {
		final NullaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new NullaryOperator[NullaryOperator.Id.values().length];
		ops[NullaryOperator.Id.zero.ordinal()] = new VarIntNumberConstOperator(VarIntNumber.ZERO);
		ops[NullaryOperator.Id.one.ordinal()] = new VarIntNumberConstOperator(VarIntNumber.ONE);
		ops[NullaryOperator.Id.random.ordinal()] = new AbstractNullaryOperator<VarIntNumber, VarIntNumber[]>() {
			private final Random rnd = new Random();
			public VarIntNumber operate() {
				return VarIntFactory.create(rnd.nextLong());
			}
			public void operate(VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = VarIntFactory.create(rnd.nextLong());
			}
		};
		return checkComplete(ops, NullaryOperator.Id.values());
	}
	@SuppressWarnings("unchecked")
	private static UnaryOperator<VarIntNumber, VarIntNumber[]>[] initUnary(final DivisionMode divMode) {
		final UnaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new UnaryOperator[UnaryOperator.Id.values().length];
		ops[UnaryOperator.Id.identity.ordinal()] = new AbstractUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand) {
				return operand;
			}
			public VarIntNumber operate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex];
			}
			public void operate(VarIntNumber[] src, int srcIndex, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex];
			}
		};
		ops[UnaryOperator.Id.normalize.ordinal()] = ops[UnaryOperator.Id.identity.ordinal()];
		ops[UnaryOperator.Id.abs.ordinal()] = new AbstractUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand) {
				return operand.abs();
			}
			public VarIntNumber operate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex].abs();
			}
			public void operate(VarIntNumber[] src, int srcIndex, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].abs();
			}
		};
		ops[UnaryOperator.Id.negate.ordinal()] = new AbstractUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand) {
				return operand.negate();
			}
			public VarIntNumber operate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex].negate();
			}
			public void operate(VarIntNumber[] src, int srcIndex, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].negate();
			}
		};
		ops[UnaryOperator.Id.invert.ordinal()] = new AbstractUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand) {
				return divMode.divide(VarIntNumber.ONE, operand);
			}
			public VarIntNumber operate(VarIntNumber[] src, int srcIndex) {
				return divMode.divide(VarIntNumber.ONE, src[srcIndex]);
			}
			public void operate(VarIntNumber[] src, int srcIndex, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = divMode.divide(VarIntNumber.ONE, src[srcIndex]);
			}
		};
		ops[UnaryOperator.Id.square.ordinal()] = new AbstractUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand) {
				return operand.pow(2);
			}
			public VarIntNumber operate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex].pow(2);
			}
			public void operate(VarIntNumber[] src, int srcIndex, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].pow(2);
			}
		};
		return checkComplete(ops, UnaryOperator.Id.values());
	}
	@SuppressWarnings("unchecked")
	private static IntUnaryOperator<VarIntNumber, VarIntNumber[]>[] initIntUnary() {
		final IntUnaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new IntUnaryOperator[IntUnaryOperator.Id.values().length];
		ops[IntUnaryOperator.Id.signum.ordinal()] = new AbstractIntUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public int intOperate(VarIntNumber operand) {
				return operand.signum();
			}
			public int intOperate(VarIntNumber[] operand, int index) {
				return operand[index].signum();
			}
			public void operate(VarIntNumber[] src, int srcIndex, int[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].signum();
			}
		};
		return checkComplete(ops, IntUnaryOperator.Id.values());
	}
	private ConvertingUnaryOperator<Number, Number[], VarIntNumber, VarIntNumber[]> initConverter(final ConversionMode convMode) {
		return new ConvertingUnaryOperator<Number, Number[], VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(Number operand) {
				return convMode.convert(operand);
			}
			public void operate(Number[] src, int srcIndex, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = convMode.convert(src[srcIndex]);
			}
		};
	}
	@SuppressWarnings("unchecked")
	private static BooleanUnaryOperator<VarIntNumber, VarIntNumber[]>[] initBoolUnary() {
		final BooleanUnaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new BooleanUnaryOperator[BooleanUnaryOperator.Id.values().length];
		ops[BooleanUnaryOperator.Id.isZero.ordinal()] = new AbstractBooleanUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand) {
				return VarIntNumber.ZERO.equals(operand);
			}
			public boolean booleanOperate(VarIntNumber[] src, int srcIndex) {
				return VarIntNumber.ZERO.equals(src[srcIndex]);
			}
			public void operate(VarIntNumber[] src, int srcIndex, boolean[] dst, int dstIndex) {
				dst[dstIndex] = VarIntNumber.ZERO.equals(src[srcIndex]);
			}
		};
		ops[BooleanUnaryOperator.Id.isNonZero.ordinal()] = new AbstractBooleanUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand) {
				return !VarIntNumber.ZERO.equals(operand);
			}
			public boolean booleanOperate(VarIntNumber[] src, int srcIndex) {
				return !VarIntNumber.ZERO.equals(src[srcIndex]);
			}
			public void operate(VarIntNumber[] src, int srcIndex, boolean[] dst, int dstIndex) {
				dst[dstIndex] = !VarIntNumber.ZERO.equals(src[srcIndex]);
			}
		};
		ops[BooleanUnaryOperator.Id.isOne.ordinal()] = new AbstractBooleanUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand) {
				return VarIntNumber.ONE.equals(operand);
			}
			public boolean booleanOperate(VarIntNumber[] src, int srcIndex) {
				return VarIntNumber.ONE.equals(src[srcIndex]);
			}
			public void operate(VarIntNumber[] src, int srcIndex, boolean[] dst, int dstIndex) {
				dst[dstIndex] = VarIntNumber.ONE.equals(src[srcIndex]);
			}
		};
		ops[BooleanUnaryOperator.Id.isPositive.ordinal()] = new AbstractBooleanUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand) {
				return operand.signum() > 0;
			}
			public boolean booleanOperate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex].signum() > 0;
			}
			public void operate(VarIntNumber[] src, int srcIndex, boolean[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].signum() > 0;
			}
		};
		ops[BooleanUnaryOperator.Id.isNegative.ordinal()] = new AbstractBooleanUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand) {
				return operand.signum() < 0;
			}
			public boolean booleanOperate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex].signum() < 0;
			}
			public void operate(VarIntNumber[] src, int srcIndex, boolean[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].signum() < 0;
			}
		};
		ops[BooleanUnaryOperator.Id.isNonPositive.ordinal()] = new AbstractBooleanUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand) {
				return operand.signum() <= 0;
			}
			public boolean booleanOperate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex].signum() <= 0;
			}
			public void operate(VarIntNumber[] src, int srcIndex, boolean[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].signum() <= 0;
			}
		};
		ops[BooleanUnaryOperator.Id.isNonNegative.ordinal()] = new AbstractBooleanUnaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand) {
				return operand.signum() >= 0;
			}
			public boolean booleanOperate(VarIntNumber[] src, int srcIndex) {
				return src[srcIndex].signum() >= 0;
			}
			public void operate(VarIntNumber[] src, int srcIndex, boolean[] dst, int dstIndex) {
				dst[dstIndex] = src[srcIndex].signum() >= 0;
			}
		};
		return checkComplete(ops, BooleanUnaryOperator.Id.values());
	}
	@SuppressWarnings("unchecked")
	private static BinaryOperator<VarIntNumber, VarIntNumber[]>[] initBinary(final DivisionMode divMode) {
		final BinaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new BinaryOperator[BinaryOperator.Id.values().length];
		ops[BinaryOperator.Id.add.ordinal()] = new AbstractBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.add(operand2);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].add(operand2[index2]);
			}
		};
		ops[BinaryOperator.Id.subtract.ordinal()] = new AbstractBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.subtract(operand2);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].subtract(operand2[index2]);
			}
		};
		ops[BinaryOperator.Id.multiply.ordinal()] = new AbstractBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.multiply(operand2);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].multiply(operand2[index2]);
			}
		};
		ops[BinaryOperator.Id.divide.ordinal()] = new AbstractBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand1, VarIntNumber operand2) {
				return divMode.divide(operand1, operand2);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = divMode.divide(operand1[index1], operand2[index2]);
			}
		};
		ops[BinaryOperator.Id.min.ordinal()] = new AbstractBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.min(operand2);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].min(operand2[index2]);
			}
		};
		ops[BinaryOperator.Id.max.ordinal()] = new AbstractBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public VarIntNumber operate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.max(operand2);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, VarIntNumber[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].max(operand2[index2]);
			}
		};
		return checkComplete(ops, BinaryOperator.Id.values());
	}
	@SuppressWarnings("unchecked")
	private static BooleanBinaryOperator<VarIntNumber, VarIntNumber[]>[] initBoolBinary() {
		final BooleanBinaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new BooleanBinaryOperator[BooleanBinaryOperator.Id.values().length];
		ops[BooleanBinaryOperator.Id.less.ordinal()] = new AbstractBooleanBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.compareTo(operand2) < 0;
			}
			public boolean booleanOperate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2) {
				return operand1[index1].compareTo(operand2[index2]) < 0;
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, boolean[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].compareTo(operand2[index2]) < 0;
			}
		};
		ops[BooleanBinaryOperator.Id.lessOrEqual.ordinal()] = new AbstractBooleanBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.compareTo(operand2) <= 0;
			}
			public boolean booleanOperate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2) {
				return operand1[index1].compareTo(operand2[index2]) <= 0;
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, boolean[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].compareTo(operand2[index2]) <= 0;
			}
		};
		ops[BooleanBinaryOperator.Id.equal.ordinal()] = new AbstractBooleanBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.equals(operand2);
			}
			public boolean booleanOperate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2) {
				return operand1[index1].equals(operand2[index2]);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, boolean[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].equals(operand2[index2]);
			}
		};
		ops[BooleanBinaryOperator.Id.unequal.ordinal()] = new AbstractBooleanBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand1, VarIntNumber operand2) {
				return !operand1.equals(operand2);
			}
			public boolean booleanOperate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2) {
				return !operand1[index1].equals(operand2[index2]);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, boolean[] dst, int dstIndex) {
				dst[dstIndex] = !operand1[index1].equals(operand2[index2]);
			}
		};
		ops[BooleanBinaryOperator.Id.greaterOrEqual.ordinal()] = new AbstractBooleanBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.compareTo(operand2) >= 0;
			}
			public boolean booleanOperate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2) {
				return operand1[index1].compareTo(operand2[index2]) >= 0;
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, boolean[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].compareTo(operand2[index2]) >= 0;
			}
		};
		ops[BooleanBinaryOperator.Id.greater.ordinal()] = new AbstractBooleanBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public boolean booleanOperate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.compareTo(operand2) > 0;
			}
			public boolean booleanOperate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2) {
				return operand1[index1].compareTo(operand2[index2]) > 0;
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, boolean[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].compareTo(operand2[index2]) > 0;
			}
		};
		return checkComplete(ops, BooleanBinaryOperator.Id.values());
	}
	@SuppressWarnings("unchecked")
	private static IntBinaryOperator<VarIntNumber, VarIntNumber[]>[] initIntBinary() {
		final IntBinaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new IntBinaryOperator[IntBinaryOperator.Id.values().length];
		ops[IntBinaryOperator.Id.compare.ordinal()] = new AbstractIntBinaryOperator<VarIntNumber, VarIntNumber[]>() {
			public int intOperate(VarIntNumber operand1, VarIntNumber operand2) {
				return operand1.compareTo(operand2);
			}
			public int intOperate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2) {
				return operand1[index1].compareTo(operand2[index2]);
			}
			public void operate(VarIntNumber[] operand1, int index1, VarIntNumber[] operand2, int index2, int[] dst, int dstIndex) {
				dst[dstIndex] = operand1[index1].compareTo(operand2[index2]);
			}
		};
		return checkComplete(ops, IntBinaryOperator.Id.values());
	}
	@SuppressWarnings("unchecked")
	private static AggregatingUnaryOperator<VarIntNumber, VarIntNumber[]>[] initAggUnary() {
		final AggregatingUnaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new AggregatingUnaryOperator[AggregatingUnaryOperator.Id.values().length];
		ops[AggregatingUnaryOperator.Id.min.ordinal()] = new VarIntNumberAggregatingUnaryOperator() {
			public VarIntNumber operate(VarIntNumber[] src, int srcIndexFrom, int length) {
				if (length == 0) {
					return null;
				}
				VarIntNumber min = src[srcIndexFrom];
				for (int i = 1; i < length; i++) {
					min = min.min(src[srcIndexFrom + i]);
				}
				return min;
			}
			public VarIntNumber operate(VarIntNumber[][] src, int srcRowFrom, int srcColFrom, int rows, int cols) {
				if (rows == 0 || cols == 0) {
					return null;
				}
				VarIntNumber min = src[srcRowFrom][srcColFrom];
				for (int r = 0; r < rows; r++) {
					for (int c = 0; c < cols; c++) {
						min = min.min(src[srcRowFrom + r][srcColFrom + c]);
					}
				}
				return min;
			}
		};
		ops[AggregatingUnaryOperator.Id.max.ordinal()] = new VarIntNumberAggregatingUnaryOperator() {
			public VarIntNumber operate(VarIntNumber[] src, int srcIndexFrom, int length) {
				if (length == 0) {
					return null;
				}
				VarIntNumber max = src[srcIndexFrom];
				for (int i = 1; i < length; i++) {
					max = max.max(src[srcIndexFrom + i]);
				}
				return max;
			}
			public VarIntNumber operate(VarIntNumber[][] src, int srcRowFrom, int srcColFrom, int rows, int cols) {
				if (rows == 0 || cols == 0) {
					return null;
				}
				VarIntNumber max = src[srcRowFrom][srcColFrom];
				for (int r = 0; r < rows; r++) {
					for (int c = 0; c < cols; c++) {
						max = max.max(src[srcRowFrom + r][srcColFrom + c]);
					}
				}
				return max;
			}
		};
		ops[AggregatingUnaryOperator.Id.sum.ordinal()] = new VarIntNumberAggregatingUnaryOperator() {
			public VarIntNumber operate(VarIntNumber[] src, int srcIndexFrom, int length) {
				VarIntNumber sum = VarIntNumber.ZERO;
				for (int i = 0; i < length; i++) {
					sum = sum.add(src[srcIndexFrom + i]);
				}
				return sum;
			}
			public VarIntNumber operate(VarIntNumber[][] src, int srcRowFrom, int srcColFrom, int rows, int cols) {
				VarIntNumber sum = VarIntNumber.ZERO;
				for (int r = 0; r < rows; r++) {
					for (int c = 0; c < cols; c++) {
						sum = sum.add(src[srcRowFrom + r][srcColFrom + c]);
					}
				}
				return sum;
			}
		};
		ops[AggregatingUnaryOperator.Id.prod.ordinal()] = new VarIntNumberAggregatingUnaryOperator() {
			public VarIntNumber operate(VarIntNumber[] src, int srcIndexFrom, int length) {
				VarIntNumber sum = VarIntNumber.ONE;
				for (int i = 0; i < length; i++) {
					sum = sum.multiply(src[srcIndexFrom + i]);
				}
				return sum;
			}
			public VarIntNumber operate(VarIntNumber[][] src, int srcRowFrom, int srcColFrom, int rows, int cols) {
				VarIntNumber sum = VarIntNumber.ONE;
				for (int r = 0; r < rows; r++) {
					for (int c = 0; c < cols; c++) {
						sum = sum.multiply(src[srcRowFrom + r][srcColFrom + c]);
					}
				}
				return sum;
			}
		};
		ops[AggregatingUnaryOperator.Id.sumSquared.ordinal()] = new VarIntNumberAggregatingUnaryOperator() {
			public VarIntNumber operate(VarIntNumber[] src, int srcIndexFrom, int length) {
				VarIntNumber sum = VarIntNumber.ZERO;
				for (int i = 0; i < length; i++) {
					sum = sum.add(src[srcIndexFrom + i].pow(2));
				}
				return sum;
			}
			public VarIntNumber operate(VarIntNumber[][] src, int srcRowFrom, int srcColFrom, int rows, int cols) {
				VarIntNumber sum = VarIntNumber.ZERO;
				for (int r = 0; r < rows; r++) {
					for (int c = 0; c < cols; c++) {
						sum = sum.add(src[srcRowFrom + r][srcColFrom + c].pow(2));
					}
				}
				return sum;
			}
		};
		ops[AggregatingUnaryOperator.Id.normDivisor.ordinal()] = new VarIntNumberAggregatingUnaryOperator() {
			public VarIntNumber operate(VarIntNumber[] src, int srcIndexFrom, int length) {
				if (length == 0) return VarIntNumber.ZERO;
				VarIntNumber gcd = src[srcIndexFrom].abs();
				for (int i = 1; i < length; i++) {
					final VarIntNumber val = src[srcIndexFrom + i];
					if (gcd.equals(VarIntNumber.ONE)) {
						break;
					}
					gcd = gcd.gcd(val);
				}
				return gcd.signum() == 0 ? VarIntNumber.ZERO : gcd;
			}
			public VarIntNumber operate(VarIntNumber[][] src, int srcRowFrom, int srcColFrom, int rows, int cols) {
				if (rows == 0 || cols == 0) return VarIntNumber.ZERO;
				VarIntNumber gcd = src[srcRowFrom][srcColFrom].abs();
				for (int r = 0; r < rows; r++) {
					for (int c = 0; c < cols; c++) {
						final VarIntNumber val = src[srcRowFrom + r][srcColFrom + c];
						if (gcd.equals(VarIntNumber.ONE)) {
							break;
						}
						gcd = gcd.gcd(val);
					}
				}
				return gcd.signum() == 0 ? VarIntNumber.ZERO : gcd;
			}
		};
		ops[AggregatingUnaryOperator.Id.squeezeDivisor.ordinal()] = ops[AggregatingUnaryOperator.Id.normDivisor.ordinal()];
		return checkComplete(ops, AggregatingUnaryOperator.Id.values());
	}
	@SuppressWarnings("unchecked")
	private static AggregatingBinaryOperator<VarIntNumber, VarIntNumber[]>[] initAggBinary() {
		final AggregatingBinaryOperator<VarIntNumber, VarIntNumber[]>[] ops = new AggregatingBinaryOperator[AggregatingBinaryOperator.Id.values().length];
		ops[AggregatingBinaryOperator.Id.innerProduct.ordinal()] = new VarIntNumberAggregatingBinaryOperator() {
			public VarIntNumber operate(VarIntNumber[] src1, int src1IndexFrom, VarIntNumber[] src2, int src2IndexFrom, int length) {
				VarIntNumber sum = VarIntNumber.ZERO;
				for (int i = 0; i < length; i++) {
					sum = sum.add(src1[src1IndexFrom + i].multiply(src2[src2IndexFrom + i]));
				}
				return sum;
			}
			public VarIntNumber operate(VarIntNumber[][] src1, int src1RowFrom, int src1Col, VarIntNumber[] src2, int src2IndexFrom, int length) {
				VarIntNumber sum = VarIntNumber.ZERO;
				for (int i = 0; i < length; i++) {
					sum = sum.add(src1[src1RowFrom + i][src1Col].multiply(src2[src2IndexFrom + i]));
				}
				return sum;
			}
			public VarIntNumber operate(VarIntNumber[][] src1, int src1RowFrom, int src1Col, VarIntNumber[][] src2, int src2RowFrom, int src2Col, int length) {
				VarIntNumber sum = VarIntNumber.ZERO;
				for (int i = 0; i < length; i++) {
					sum = sum.add(src1[src1RowFrom + i][src1Col].multiply(src2[src2RowFrom + i][src2Col]));
				}
				return sum;
			}
		};
		return checkComplete(ops, AggregatingBinaryOperator.Id.values());
	}

	private static  A[] checkComplete(final A[] arr, Enum[] ids) {
		for (int i = 0; i < arr.length; i++) {
			if (arr[i] == null) throw new RuntimeException("internal error, implementation missing for " + arr.getClass().getComponentType().getName() + " for constant " + ids[i]);
		}
		return arr;
	}

	private static class VarIntNumberConstOperator extends AbstractNullaryOperator<VarIntNumber, VarIntNumber[]> {
		private final VarIntNumber value;
		public VarIntNumberConstOperator(VarIntNumber value) {
			this.value = value;
		}
		public VarIntNumber operate() {
			return value;
		}
		public void operate(VarIntNumber[] dst, int dstIndex) {
			dst[dstIndex] = value;
		}
	}
	private abstract static class VarIntNumberAggregatingUnaryOperator implements AggregatingUnaryOperator<VarIntNumber, VarIntNumber[]> {
		public void operate(VarIntNumber[] src, int srcIndexFrom, int srcIndexTo, VarIntNumber[] dst, int dstIndex) {
			dst[dstIndex] = operate(src, srcIndexFrom, srcIndexTo);
		}
		public void operate(VarIntNumber[][] src, int srcRowFrom, int srcColFrom, int rows, int cols, VarIntNumber[] dst, int dstIndex) {
			dst[dstIndex] = operate(src, srcRowFrom, srcColFrom, rows, cols);
		}
	}
	private abstract static class VarIntNumberAggregatingBinaryOperator implements AggregatingBinaryOperator<VarIntNumber, VarIntNumber[]> {
		public void operate(VarIntNumber[] src1, int src1IndexFrom, VarIntNumber[] src2, int src2IndexFrom, VarIntNumber[] dst, int dstIndex, int length) {
			dst[dstIndex] = operate(src1, src1IndexFrom, src2, src2IndexFrom, length);
		}
		public void operate(VarIntNumber[][] src1, int src1RowFrom, int src1Col, VarIntNumber[] src2, int src2IndexFrom, VarIntNumber[] dst, int dstIndex, int length) {
			dst[dstIndex] = operate(src1, src1RowFrom, src1Col, src2, src2IndexFrom, length);
		}
		public void operate(VarIntNumber[][] src1, int src1RowFrom, int src1Col, VarIntNumber[][] src2, int src2RowFrom, int src2Col, VarIntNumber[] dst, int dstIndex, int length) {
			dst[dstIndex] = operate(src1, src1RowFrom, src1Col, src2, src2RowFrom, src2Col, length);
		}
	}

}


text:
<?php
/**
 * undone orders manager controller
 *
 *
 */
class on_handel_order extends MY_Controller {
    public function __construct() {
        parent::__construct();
    }

    public function index() {
        $data['user_id'] = $this->session->userdata('user_id');
        $this->load->view('orders/on_handel_order', $data);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Granular.Collections;

namespace System.Windows.Markup
{
    public class MarkupExtensionParser
    {
        private enum TokenType { Terminal, Identifier, String, Boolean, Integer, Decimal }

        private static readonly Lexer lexer = new Lexer
        (
            new RegexTokenDefinition(TokenType.Terminal, new Granular.Compatibility.Regex("^[{}=,]")),
            new RegexTokenDefinition(TokenType.Boolean, new Granular.Compatibility.Regex("^(true|True|false|False)")),
            new RegexTokenDefinition(TokenType.String, new Granular.Compatibility.Regex("^'([^']|'')*'")),
            new RegexTokenDefinition(TokenType.Integer, new Granular.Compatibility.Regex("^[0-9]+")),
            new RegexTokenDefinition(TokenType.Decimal, new Granular.Compatibility.Regex("^[0-9]*\\.[0-9]+")),
            new RegexTokenDefinition(TokenType.Identifier, new Granular.Compatibility.Regex(@"^[A-Za-z0-9_:\(\)\.]*"))
        );

        private string text;
        private XamlNamespaces namespaces;
        private Uri sourceUri;
        private ReadOnlyStack<Token> tokens;

        private MarkupExtensionParser(string text, XamlNamespaces namespaces, Uri sourceUri)
        {
            this.text = text;
            this.namespaces = namespaces;
            this.sourceUri = sourceUri;
        }

        private XamlElement Parse()
        {
            this.tokens = new ReadOnlyStack<Token>(lexer.GetTokens(text));

            XamlElement root = MatchElement();

            if (!tokens.IsEmpty)
            {
                throw new Granular.Exception("Can't parse \"{0}\", end of stream is expected at index {1}", text, tokens.Peek().Start);
            }

            return root;
        }

        // S -> { Identifier PL }
        private XamlElement MatchElement()
        {
            VerifyTokensExists();

            MatchTerminal("{");
            string typeFullName = MatchIdentifier();
            IEnumerable<XamlMember> membersList = MatchMembersList();
            MatchTerminal("}");

            return new XamlElement(new XamlName(GetTypeName(typeFullName), GetTypeNamespace(typeFullName)), namespaces, sourceUri, members: membersList);
        }

        // PL -> P PL' | epsilon
        private IEnumerable<XamlMember> MatchMembersList()
        {
            VerifyTokensExists();

            List<XamlMember> list = new List<XamlMember>();

            if (tokens.Peek().Value != "}")
            {
                list.Add(MatchMember());
                list.AddRange(MatchMembersListEnd());
            }

            return list;
        }

        // PL' -> , P PL' | epsilon
        private IEnumerable<XamlMember> MatchMembersListEnd()
        {
            VerifyTokensExists();

            List<XamlMember> list = new List<XamlMember>();

            if (tokens.Peek().Value != "}")
            {
                MatchTerminal(",");

                list.Add(MatchMember());
                list.AddRange(MatchMembersListEnd());
            }

            return list;
        }

        // P -> Identifier NV | V
        private XamlMember MatchMember()
        {
            VerifyTokensExists();

            string name = String.Empty;
            object value;

            if ((TokenType)tokens.Peek().Id == TokenType.Identifier)
            {
                string identifier = MatchIdentifier();
                value = MatchNamedValue();

                if (value == null)
                {
                    value = identifier;
                }
                else
                {
                    name = identifier;
                }
            }
            else
            {
                value = MatchValue();
            }

            return new XamlMember(new XamlName(name), namespaces, sourceUri, value);
        }

        // NV -> = V | epsilon
        private object MatchNamedValue()
        {
            VerifyTokensExists();

            Token token = tokens.Peek();
            if ((TokenType)token.Id != TokenType.Terminal || token.Value != "=")
            {
                return null;
            }

            MatchTerminal("=");

            return MatchValue();
        }

        // V -> S | Identifier | String | Boolean | Integer | Decimal
        private object MatchValue()
        {
            VerifyTokensExists();

            if ((TokenType)tokens.Peek().Id == TokenType.Terminal)
            {
                return MatchElement();
            }

            Token token = tokens.Pop();
            object constValue;

            switch ((TokenType)token.Id)
            {
                case TokenType.Identifier: constValue = token.Value; break;
                case TokenType.String: constValue = token.Value.Substring(1, token.Value.Length - 2).Replace("''", "'"); break;
                case TokenType.Boolean: constValue = BooleanParse(token.Value); break;
                case TokenType.Integer: constValue = Int32.Parse(token.Value); break;
                case TokenType.Decimal: constValue = Double.Parse(token.Value); break;
                default: throw new Granular.Exception("Can't parse \"{0}\", value is expected, \"{1}\" was found at index {2}", text, token.Value, token.Start);
            }

            return constValue;
        }

        private static bool BooleanParse(string value)
        {
            value = value.ToLower();
            if (value.CompareTo("true") == 0 || value.CompareTo("false") == 0)
            {
                return value.CompareTo("true") == 0;
            }

            throw new Granular.Exception("Can't parse boolean value \"{0}\"", value);
        }

        private string MatchIdentifier()
        {
            VerifyTokensExists();

            Token token = tokens.Pop();

            if ((TokenType)token.Id != TokenType.Identifier)
            {
                throw new Granular.Exception("Can't parse \"{0}\", identifier is expected, \"{1}\" was found at index {2}", text, token.Value, token.Start);
            }

            return token.Value;
        }

        private Token MatchTerminal(string terminal)
        {
            VerifyTokensExists();

            Token token = tokens.Pop();

            if ((TokenType)token.Id != TokenType.Terminal || token.Value != terminal)
            {
                throw new Granular.Exception("Can't parse \"{0}\", \"{1}\" is expected, \"{2}\" was found at index {3}", text, terminal, token.Value, token.Start);
            }

            return token;
        }

        private void VerifyTokensExists()
        {
            if (tokens.IsEmpty)
            {
                throw new Granular.Exception("Can't parse \"{0}\", stream was terminated unexpectedly", text);
            }
        }

        private string GetTypeName(string typeFullName)
        {
            int namespaceSeparatorIndex = typeFullName.IndexOf(":");
            return namespaceSeparatorIndex != -1 ? typeFullName.Substring(namespaceSeparatorIndex + 1) : typeFullName;
        }

        private string GetTypeNamespace(string typeFullName)
        {
            int namespaceSeparatorIndex = typeFullName.IndexOf(":");
            return namespaces.GetNamespace(namespaceSeparatorIndex != -1 ? typeFullName.Substring(0, namespaceSeparatorIndex) : String.Empty);
        }

        public static object Parse(string text, XamlNamespaces namespaces, Uri sourceUri = null)
        {
            if (IsEscaped(text))
            {
                return GetEscapedText(text);
            }

            if (IsMarkupExtension(text))
            {
                return new MarkupExtensionParser(text, namespaces, sourceUri).Parse();
            }

            return text;
        }

        private static bool IsMarkupExtension(string text)
        {
            text = text.Trim();
            return Granular.Compatibility.String.StartsWith(text, '{') && Granular.Compatibility.String.EndsWith(text, '}');
        }

        private static bool IsEscaped(string text)
        {
            return Granular.Compatibility.String.StartsWith(text, "{}");
        }

        private static string GetEscapedText(string text)
        {
            return text.Substring(2);
        }
    }
}


text:
split_args "$@"

source $CURRENT_COMMAND_DIR/service_namespace.sh

awscli application-autoscaling describe-scheduled-actions --service-namespace $FIRST_RESOURCE --output table --query "ScheduledActions[$(auto_filter ScalableDimension ResourceId ScheduledActionName Schedule -- $SECOND_RESOURCE)].{
  \"1.Name\":ScheduledActionName,
  \"2.Schedule\":Schedule,
  \"3.Resource\":ResourceId,
  \"4.Dimension\":ScalableDimension,
  \"5.New Min/Max\":join('/', [to_string(ScalableTargetAction.MinCapacity), to_string(ScalableTargetAction.MaxCapacity)])
  }"


text:
<?php

declare(strict_types=1);

namespace Symplify\Statie\Tweeter\Exception;

use Exception;

final class TweetTooLongException extends Exception
{
}


text:
package com.pholser.util.properties.conversions.java.lang;

import com.pholser.util.properties.conversions.Conversion;

import java.util.List;

import static java.util.Arrays.asList;

public class DoubleConversion extends Conversion<Double> {
  public DoubleConversion() {
    super(asList(double.class, Double.class));
  }

  @Override public Double convert(String value, List<String> patterns) {
    return Double.valueOf(value);
  }
}


text:
var Spatial = {
  getTransformData: function(start, end) {
    var dy = (end.y - start.y) - start.y;
    var dx = (end.x - start.x) - start.x;
    var length = Math.sqrt(dx*dx + dy*dy);
    var angle = Math.atan(dy/dx);
    if (dx < 0)
      angle += Math.PI;

    return { x: start.x, y: start.y, angle: angle, length: length }
  },
  transform: function(points, data) {
    var mat = Q.matrix2d();
    mat.translate(data.x, data.y);
    mat.rotate(data.angle);
    points.forEach(function(pt) {
      mat.transformArr(pt, pt);
    });
    mat.release();
  }
}