text:
# Youtube-dl PHP
A PHP wrapper for [youtube-dl](https://github.com/rg3/youtube-dl) tool.

[![Latest Stable Version](https://poser.pugx.org/norkunas/youtube-dl-php/v/stable.svg)](https://packagist.org/packages/norkunas/youtube-dl-php)
[![Latest Unstable Version](https://poser.pugx.org/norkunas/youtube-dl-php/v/unstable.svg)](https://packagist.org/packages/norkunas/youtube-dl-php)
[![License](https://poser.pugx.org/norkunas/youtube-dl-php/license.svg)](https://packagist.org/packages/norkunas/youtube-dl-php)

## Install
First step is to download the [youtube-dl](http://rg3.github.io/youtube-dl/download.html) and add it's path to
environment variables.

Second step is to install the wrapper using [Composer](http://getcomposer.org/):
```
composer require norkunas/youtube-dl-php
```

## Example
```php
<?php
require __DIR__ . '/vendor/autoload.php';

use YoutubeDl\YoutubeDl;
use YoutubeDl\Exception\CopyrightException;
use YoutubeDl\Exception\NotFoundException;
use YoutubeDl\Exception\PrivateVideoException;

$dl = new YoutubeDl([
    'continue' => true, // force resume of partially downloaded files. By default, youtube-dl will resume downloads if possible.
    'format' => 'bestvideo',
]);
// For more options go to https://github.com/rg3/youtube-dl#user-content-options

$dl->setDownloadPath('/home/user/downloads');
// Enable debugging
/*$dl->debug(function ($type, $buffer) {
    if (\Symfony\Component\Process\Process::ERR === $type) {
        echo 'ERR > ' . $buffer;
    } else {
        echo 'OUT > ' . $buffer;
    }
});*/
try {
    $video = $dl->download('https://www.youtube.com/watch?v=oDAw7vW7H0c');
    echo $video->getTitle(); // Will return Phonebloks
    // $dl->getFile(); // \SplFileInfo instance of downloaded file
} catch (NotFoundException $e) {
    // Video not found
} catch (PrivateVideoException $e) {
    // Video is private
} catch (CopyrightException $e) {
    // The YouTube account associated with this video has been terminated due to multiple third-party notifications of copyright infringement
} catch (\Exception $e) {
    // Failed to download
}
```

**Disabled options which would break download:**

list-formats, list-subs, list-thumbnails, get-url, get-title, get-id, get-thumbnail, get-description, get-duration, get-filename, get-format, dump-json, dump-single-json, print-json (used internally), newline, no-progress, console-title, verbose, dump-pages, write-pages, print-traffic, ignore-config (used internally).


text:
import { sortByYAndX } from 'utils/variables/collected-variables-utils';
import maxBy from 'lodash.maxby';

import * as ResponseFormatSimple from './response-format-simple';
import * as ResponseFormatSingle from './response-format-single';
import * as CodeList from './codes-list';
import * as Dimension from './dimension';
import * as Responses from './responses';
import { hasChild } from 'utils/codes-lists/codes-lists-utils';

import {
  DIMENSION_TYPE,
  DIMENSION_FORMATS,
  QUESTION_TYPE_ENUM,
  DATATYPE_NAME,
  DEFAULT_CODES_LIST_SELECTOR_PATH,
} from 'constants/pogues-constants';

const { PRIMARY, SECONDARY, MEASURE, LIST_MEASURE } = DIMENSION_TYPE;
const { LIST, CODES_LIST } = DIMENSION_FORMATS;
const { SIMPLE, SINGLE_CHOICE } = QUESTION_TYPE_ENUM;
const { TEXT } = DATATYPE_NAME;

// HELPERS

function getDimensionsByType(type, dimensions) {
  let dimension;

  for (let i = 0; i < dimensions.length; i += 1) {
    if (dimensions[i].dimensionType === type) {
      dimension = dimensions[i];
      break;
    }
  }

  return dimension;
}

function getDimensionsMeasures(dimensions) {
  return dimensions.reduce((acc, d) => {
    if (d.dimensionType === MEASURE) acc.push(d);
    return acc;
  }, []);
}

function getResponsesOffset(primaryState, secondaryState, activeCodeLists) {
  let responseOffset = 1;

  if (primaryState.type === CODES_LIST) {
    const {
      CODES_LIST: {
        [DEFAULT_CODES_LIST_SELECTOR_PATH]: { id: codesListIdPrimary },
      },
    } = primaryState;
    let responseOffsetSecondary = 1;

    if (secondaryState) {
      const {
        [DEFAULT_CODES_LIST_SELECTOR_PATH]: { id: codesListIdSecondary },
      } = secondaryState;
      responseOffsetSecondary = Object.keys(
        activeCodeLists[codesListIdSecondary].codes,
      ).length;
    }
    const listCodes = Object.keys(
      activeCodeLists[codesListIdPrimary].codes,
    ).map(key => activeCodeLists[codesListIdPrimary].codes[key]);
    const codes = listCodes.filter(code => !hasChild(code, listCodes));
    responseOffset = codes.length * responseOffsetSecondary;
  }
  return responseOffset;
}

function getMeasuresModel(responses, dimensions, offset) {
  const responsesModel = [];
  for (let i = 0; i < dimensions.length; i += 1) {
    if (responses[i].Datatype.typeName === DATATYPE_NAME.DATE) {
      responses[i].Datatype.Format = responses[i].Datatype.Format.toLowerCase();
    }

    if (responses[i].Datatype.typeName === DATATYPE_NAME.DURATION) {
      if (responses[i].Datatype.Minimum !== undefined) {
        const strminimum = responses[i].Datatype.Minimum;
        const matches_minimum = strminimum.match(/\d+/g);
        if (responses[i].Datatype.Format === 'PTnHnM') {
          responses[i].Datatype.Mihours =
            matches_minimum[0] === 0 ? '' : matches_minimum[0];
          responses[i].Datatype.Miminutes =
            matches_minimum[1] === 0 ? '' : matches_minimum[0];
        }
        if (responses[i].Datatype.Format === 'PnYnM') {
          responses[i].Datatype.Miyears =
            matches_minimum[0] === 0 ? '' : matches_minimum[0];
          responses[i].Datatype.Mimonths =
            matches_minimum[1] === 0 ? '' : matches_minimum[0];
        }
        if (responses[i].Datatype.Format === 'HH:CH') {
          responses[i].Datatype.Mihundhours =
            matches_minimum[0][0] === 0
              ? matches_minimum[0].slice(1)
              : matches_minimum[0];
          responses[i].Datatype.Mihundredths =
            matches_minimum[1][0] === 0
              ? matches_minimum[1].slice(1)
              : matches_minimum[1];
        }
      }
      if (responses[i].Datatype.Maximum !== undefined) {
        const strmaximum = responses[i].Datatype.Maximum;
        const matches_maximum = strmaximum.match(/\d+/g);
        if (responses[i].Datatype.Format === 'PTnHnM') {
          responses[i].Datatype.Mahours =
            matches_maximum[0] === 0 ? '' : matches_maximum[0];
          responses[i].Datatype.Maminutes =
            matches_maximum[1] === 0 ? '' : matches_maximum[0];
        }
        if (responses[i].Datatype.Format === 'PnYnM') {
          responses[i].Datatype.Mayears =
            matches_maximum[0] === 0 ? '' : matches_maximum[0];
          responses[i].Datatype.Mamonths =
            matches_maximum[1] === 0 ? '' : matches_maximum[0];
        }
        if (responses[i].Datatype.Format === 'HH:CH') {
          responses[i].Datatype.Mahundhours =
            matches_maximum[0][0] === 0
              ? matches_maximum[0].slice(1)
              : matches_maximum[0];
          responses[i].Datatype.Mahundredths =
            matches_maximum[1][0] === 0
              ? matches_maximum[1].slice(1)
              : matches_maximum[1];
        }
      }
    }

    responsesModel.push({
      Label: dimensions[i].Label,
      response: responses[i * offset],
    });
  }

  return responsesModel;
}

function parseDynamic(dynamic) {
  return dynamic.split('-').map(v => {
    return v.length > 0 ? parseInt(v, 10) : 0;
  });
}

// REMOTE TO STATE

function remoteToStatePrimary(remote) {
  const { totalLabel, dynamic, CodeListReference } = remote;
  let state = {};

  if (totalLabel) {
    state.showTotalLabel = '1';
    state.totalLabel = totalLabel;
  }

  if (CodeListReference) {
    state = {
      ...state,
      type: CODES_LIST,
      [CODES_LIST]: {
        [DEFAULT_CODES_LIST_SELECTOR_PATH]:
          CodeList.remoteToState(CodeListReference),
      },
    };
  } else {
    const [numLinesMin, numLinesMax] = parseDynamic(dynamic);
    state = {
      ...state,
      type: LIST,
      [LIST]: {
        numLinesMin: numLinesMin,
        numLinesMax: numLinesMax,
      },
    };
  }

  return state;
}

function remoteToStateSecondary(remote) {
  const { totalLabel, CodeListReference } = remote;
  const state = {
    showSecondaryAxis: true,
    [DEFAULT_CODES_LIST_SELECTOR_PATH]:
      CodeList.remoteToState(CodeListReference),
  };

  if (totalLabel) {
    state.showTotalLabel = '1';
    state.totalLabel = totalLabel;
  }

  return state;
}

function remoteToStateMeasure(remote) {
  const {
    Label: label,
    response: { CodeListReference, Datatype },
  } = remote;
  const state = {};

  if (CodeListReference) {
    state.type = SINGLE_CHOICE;
    state[SINGLE_CHOICE] = ResponseFormatSingle.remoteToState({
      responses: [{ Datatype, CodeListReference }],
    });
  } else {
    state.type = SIMPLE;
    state[SIMPLE] = ResponseFormatSimple.remoteToState({
      responses: [{ Datatype }],
    });
  }

  return {
    label,
    ...state,
  };
}

export function remoteToState(remote, codesListsStore) {
  const { dimensions, responses } = remote;
  const state = {};

  // Dimensions
  const dimensionSecondaryModel = getDimensionsByType(SECONDARY, dimensions);
  const dimensionPrimaryModel = getDimensionsByType(PRIMARY, dimensions);
  const dimensionMeasuresModel = getDimensionsMeasures(dimensions);

  // Primary and secondary state
  state[PRIMARY] = remoteToStatePrimary(dimensionPrimaryModel);

  if (dimensionSecondaryModel) {
    state[SECONDARY] = remoteToStateSecondary(dimensionSecondaryModel);
  }

  // Measures
  const responsesOffset = getResponsesOffset(
    state[PRIMARY],
    state[SECONDARY],
    codesListsStore,
  );
  const responsesMeasuresModel = getMeasuresModel(
    responses,
    dimensionMeasuresModel,
    responsesOffset,
  );

  if (dimensionSecondaryModel) {
    state[MEASURE] = remoteToStateMeasure(responsesMeasuresModel[0]);
  } else {
    state[LIST_MEASURE] = responsesMeasuresModel.map(m =>
      remoteToStateMeasure(m),
    );
  }

  return state;
}

// STATE TO REMOTE

function stateToResponseState(state) {
  const { type: measureType, [measureType]: measureTypeState } = state;
  let responseState = {};

  if (measureType === SIMPLE) {
    const {
      mandatory,
      type: typeName,
      [typeName]: simpleState,
    } = measureTypeState;

    let customsimpleState = simpleState;

    if (
      customsimpleState.format !== undefined &&
      typeName === DATATYPE_NAME.DATE
    ) {
      const { format, minimum, maximum, ...durationsimpleState } = simpleState;

      durationsimpleState.format = format.toUpperCase();
      if (customsimpleState.minimum !== '') {
        durationsimpleState.minimum = minimum;
      }
      if (customsimpleState.maximum !== '') {
        durationsimpleState.maximum = maximum;
      }
      customsimpleState = durationsimpleState;
    }

    if (typeName === DATATYPE_NAME.DURATION) {
      const {
        miyears,
        mimonths,
        mayears,
        mamonths,
        mihours,
        miminutes,
        mahours,
        maminutes,
        mihundhours,
        mihundredths,
        mahundhours,
        mahundredths,
      } = customsimpleState;
      const durationDataType = {};
      durationDataType.format = simpleState.format;
      if (simpleState.format === 'PnYnM') {
        if (miyears !== '' || mimonths !== '') {
          durationDataType.minimum = `P${miyears || 0}Y${mimonths || 0}M`;
        }
        if (mayears !== '' || mamonths !== '') {
          durationDataType.maximum = `P${mayears || 0}Y${mamonths || 0}M`;
        }
      }
      if (simpleState.format === 'PTnHnM') {
        if (mihours || miminutes) {
          durationDataType.minimum = `PT${mihours || 0}H${miminutes || 0}M`;
        }
        if (mahours || maminutes) {
          durationDataType.maximum = `PT${mahours || 0}H${maminutes || 0}M`;
        }
      }
      if (simpleState.format === 'HH:CH') {
        if (mihundhours || mihundredths) {
          durationDataType.minimum = `${
            mihundhours ? `0${mihundhours}`.slice(-2) : '00'
          }:${mihundredths ? `0${mihundredths}`.slice(-2) : '00'}`;
        }
        if (mahundhours || mahundredths) {
          durationDataType.maximum = `${
            mahundhours ? `0${mahundhours}`.slice(-2) : '00'
          }:${mahundredths ? `0${mahundredths}`.slice(-2) : '00'}`;
        }
      }
      customsimpleState = durationDataType;
    }

    responseState = { mandatory, typeName, ...customsimpleState };
  } else {
    const {
      mandatory,
      visHint,
      [DEFAULT_CODES_LIST_SELECTOR_PATH]: { id: codesListId },
    } = measureTypeState;
    responseState = {
      mandatory,
      codesListId,
      typeName: TEXT,
      maxLength: 1,
      pattern: '',
      visHint,
    };
  }

  return responseState;
}

export function stateToRemote(
  state,
  collectedVariables,
  collectedVariablesStore,
  response,
) {
  const {
    [PRIMARY]: primaryState,
    [SECONDARY]: secondaryState,
    [MEASURE]: measureState,
    [LIST_MEASURE]: listMeasuresState,
  } = state;

  const {
    type,
    [type]: { type: typePrimaryCodesList, ...primaryTypeState },
    ...totalLabelPrimaryState
  } = primaryState;
  const dimensionsModel = [];
  let responsesState = [];

  // Primary and secondary dimension
  dimensionsModel.push(
    Dimension.stateToRemote({
      type: PRIMARY,
      ...primaryTypeState,
      ...totalLabelPrimaryState,
    }),
  );
  if (secondaryState) {
    const { type: typeSecondaryCodesList, ...secondaryTypeState } =
      secondaryState;
    dimensionsModel.push(
      Dimension.stateToRemote({ type: SECONDARY, ...secondaryTypeState }),
    );
  }
  // Measures dimensions
  if (measureState) {
    dimensionsModel.push(
      Dimension.stateToRemote({ type: MEASURE, label: measureState.label }),
    );
    responsesState = [stateToResponseState(measureState)];
  } else {
    for (let i = 0; i < listMeasuresState.length; i += 1) {
      dimensionsModel.push(
        Dimension.stateToRemote({
          type: MEASURE,
          label: listMeasuresState[i].label,
        }),
      );
      responsesState.push(stateToResponseState(listMeasuresState[i]));
    }
  }

  // Responses

  const numDataTypes = measureState
    ? maxBy(
        collectedVariables.map(key => collectedVariablesStore[key]),
        'y',
      ).y || 1
    : listMeasuresState.length;
  let responsesModel = [];
  let mappingsModel = [];
  let attributesModel = [];

  for (let i = 0; i < numDataTypes; i += 1) {
    const collectedVariablesByDatatype = collectedVariables
      .sort(sortByYAndX(collectedVariablesStore))
      .map(key => collectedVariablesStore[key])
      .filter(variable => !variable.y || variable.y === i + 1)
      .map(variable => variable.id);

    const responsesModelByRow = Responses.stateToModel(
      responsesState[measureState ? 0 : i],
      collectedVariablesByDatatype,
      collectedVariablesStore,
      QUESTION_TYPE_ENUM.TABLE,
      response,
    );

    responsesModel = [...responsesModel, ...responsesModelByRow.Response];
    mappingsModel = [...mappingsModel, ...responsesModelByRow.Mapping];
    attributesModel = [...attributesModel, ...responsesModelByRow.Attribute];
  }

  mappingsModel = mappingsModel.sort((m1, m2) => {
    const [x1, y1] = m1.MappingTarget.split(' ');
    const [x2, y2] = m2.MappingTarget.split(' ');
    if (!y1) return parseInt(x1, 10) - parseInt(x2, 10);
    return (
      parseInt(y1, 10) * 100 +
      parseInt(x1, 10) -
      (parseInt(y2, 10) * 100 + parseInt(x2, 10))
    );
  });
  return {
    Dimension: dimensionsModel,
    Response: responsesModel,
    Mapping: mappingsModel,
    Attribute: attributesModel,
  };
}

redpajama_set_name: RedPajamaGithub


text:
var $ = require('jquery');
var Boiler = require('boiler');
var Marionette = require('backbone.marionette');

require('backbone-query-parameters');

Boiler.showView('header', require('views/commons/header'));
Boiler.showView('footer', require('views/commons/footer'));

// active menu item
Marionette.View.prototype.on('render', function() {
	$('.header .nav.navbar-nav > li').removeClass('active');
	$('.header .nav.navbar-nav > li > a').filter('[href|="' + location.hash + '"]').parent().addClass('active');
});


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Camarosporium eriogoni Ellis & Everh.

### Remarks
null


text:
    Welcome back

Cheersee

Contest For a Date

Sign up

      <form name="regForm" novalidate class="css-form">
        <input type="text" placeholder="Name" ng-model="reg.user.name" required />

        You might signup with this email!
        <input type="email" placeholder="Email" ng-model="reg.user.email" name="userEmail" required unique-email/>

        <input type="password" placeholder="Password" ng-model="reg.user.password" name="password" required >

        <input type="password" placeholder="Confirm password" ng-model="reg.user.password_confirmation" name="confirmPassword" required >

        Gender: <input type="radio" ng-model="reg.user.gender" value="male" id="male" />Male
        <input type="radio" ng-model="reg.user.gender" value="female" />Female

<input type="submit" ng-click="register()" value="Lets rock" class="button small radius pinkflower" data-ng-disabled="!reg.user.gender+!reg.user.name+!reg.user.email+!reg.user.password+!reg.user.password_confirmation+regForm.userEmail.$error.uniqueEmail"
       type="submit"/>

      </form>

Just For Fun version


text:
using System;
using NUnit.Framework;

namespace GeneticSharp.Domain.UnitTests.Selections
{
    [TestFixture()]
    [Category("Selections")]
    public class SelectionServiceTest
    {
        [Test()]
        public void GetSelectionTypes_NoArgs_AllAvailableSelections()
        {
            var actual = SelectionService.GetSelectionTypes();

            Assert.AreEqual(6, actual.Count);
            Assert.AreEqual(typeof(EliteSelection), actual[0]);
            Assert.AreEqual(typeof(RankSelection), actual[1]);
            Assert.AreEqual(typeof(RouletteWheelSelection), actual[2]);
            Assert.AreEqual(typeof(StochasticUniversalSamplingSelection), actual[3]);
            Assert.AreEqual(typeof(TournamentSelection), actual[4]);
            Assert.AreEqual(typeof(TruncationSelection), actual[5]);
        }

        [Test()]
        public void GetSelectionNames_NoArgs_AllAvailableSelectionsNames()
        {
            var actual = SelectionService.GetSelectionNames();

            Assert.AreEqual(6, actual.Count);
            Assert.AreEqual("Elite", actual[0]);
            Assert.AreEqual("Rank", actual[1]);
            Assert.AreEqual("Roulette Wheel", actual[2]);
            Assert.AreEqual("Stochastic Universal Sampling", actual[3]);
            Assert.AreEqual("Tournament", actual[4]);
            Assert.AreEqual("Truncation", actual[5]);
        }

        [Test()]
        public void CreateSelectionByName_InvalidName_Exception()
        {
            Assert.Catch<ArgumentException>(() =>
            {
                SelectionService.CreateSelectionByName("Test");
            }, "There is no ISelection implementation with name 'Test'.");
        }

        [Test()]
        public void CreateSelectionByName_ValidNameButInvalidConstructorArgs_Exception()
        {
            Assert.Catch<ArgumentException>(() =>
            {
                SelectionService.CreateSelectionByName("Elite", 1, 2);
            }, "A ISelection's implementation with name 'Elite' was found, but seems the constructor args were invalid.");
        }

        [Test()]
        public void CreateSelectionByName_ValidName_SelectionCreated()
        {
            ISelection actual = SelectionService.CreateSelectionByName("Elite") as EliteSelection;
            Assert.IsNotNull(actual);

            actual = SelectionService.CreateSelectionByName("Rank") as RankSelection;
            Assert.IsNotNull(actual);

            actual = SelectionService.CreateSelectionByName("Roulette Wheel") as RouletteWheelSelection;
            Assert.IsNotNull(actual);

            actual = SelectionService.CreateSelectionByName("Tournament") as TournamentSelection;
            Assert.IsNotNull(actual);

            actual = SelectionService.CreateSelectionByName("Stochastic Universal Sampling") as StochasticUniversalSamplingSelection;
            Assert.IsNotNull(actual);
        }

        [Test()]
        public void GetSelectionTypeByName_InvalidName_Exception()
        {
            Assert.Catch<ArgumentException>(() =>
            {
                SelectionService.GetSelectionTypeByName("Test");
            }, "There is no ISelection implementation with name 'Test'.");
        }

        [Test()]
        public void GetSelectionTypeByName_ValidName_SelectionTpe()
        {
            var actual = SelectionService.GetSelectionTypeByName("Elite");
            Assert.AreEqual(typeof(EliteSelection), actual);

            actual = SelectionService.GetSelectionTypeByName("Rank");
            Assert.AreEqual(typeof(RankSelection), actual);

            actual = SelectionService.GetSelectionTypeByName("Roulette Wheel");
            Assert.AreEqual(typeof(RouletteWheelSelection), actual);

            actual = SelectionService.GetSelectionTypeByName("Tournament");
            Assert.AreEqual(typeof(TournamentSelection), actual);

            actual = SelectionService.GetSelectionTypeByName("Stochastic Universal Sampling");
            Assert.AreEqual(typeof(StochasticUniversalSamplingSelection), actual);
        }
    }
}


text:
var assert = require('assert');

describe('Model', function() {

	var WithSchemaField,
	    WithTranslation,
	    WithComplexSchemaField,
	    data,
	    _id;

	data = {
		firstname : 'Jelle',
		lastname  : 'De Loecker',
		nicknames : ['skerit', 'Jellie'],
		birthdate : new Date('1987-10-29'),
		male      : true
	};

	function testDocument(document, data) {
		assert.strictEqual(document.firstname,     data.firstname);
		assert.strictEqual(document.lastname,      data.lastname);
		assert.deepStrictEqual(document.nicknames, data.nicknames);
		assert.strictEqual(document.birthdate+'',  data.birthdate+'');
		assert.strictEqual(document.male,          data.male);
		assert.strictEqual(String(document._id).isObjectId(), true);
	}

	/**
	 * Inheritance testing
	 */
	describe('inheritance', function() {
		it('lets you inherit from the main Model class', function() {
			global.Person = Function.inherits('Alchemy.Model', function Person(options) {
				Person.super.call(this, options);
			});

			Person.prepareProperty('sort', function sort() {
				return {firstname: 1};
			});

			assert.strictEqual(Person.super, Classes.Alchemy.Model.Model, true);

			global.Event = Function.inherits('Alchemy.Model', function Event(options) {
				Person.super.call(this, options);
			});

			assert.strictEqual(Event.super, Classes.Alchemy.Model.Model, true);

			global.Product = Function.inherits('Alchemy.Model', function Product(options) {
				Product.super.call(this, options);
			});

			global.Project = Function.inherits('Alchemy.Model', function Project(options) {
				Project.super.call(this, options);
			});

			global.ProjectVersion = Function.inherits('Alchemy.Model', function ProjectVersion(options) {
				ProjectVersion.super.call(this, options);
			});

			ProjectVersion.prepareProperty('sort', function sort() {
				return {major: 1, minor: 1, patch: 1};
			});
		});
	});

	describe('.cache_duration', function() {
		it('gets the current cache_duration', function() {
			assert.strictEqual(Person.cache_duration, undefined);
		});

		it('gets the cache duration from the settings', function() {
			alchemy.settings.model_query_cache_duration = '1 second';

			assert.strictEqual(Person.cache_duration, '1 second');

			alchemy.settings.model_query_cache_duration = '2 seconds';
			assert.strictEqual(Person.cache_duration, '1 second', 'Changing the settings should not have affected the existing duration');

			Person.cache_duration = null;
			assert.strictEqual(Person.cache_duration, '2 seconds', 'After setting cache_duration to null, it should revert back to the settings value');
		});

		it('sets the duration for future caches', function() {

			// Warning: this has ZERO effect after the cache has been made
			Person.cache_duration = '3 seconds';
			assert.strictEqual(Person.cache_duration, '3 seconds');

			Person.cache_duration = '1 second';
			assert.strictEqual(Person.cache_duration, '1 second');
		});
	});

	describe('.cache', function() {
		var Animal;

		it('returns false if there is no duration set', function() {

			Animal = Function.inherits('Alchemy.Model', function Animal(options) {
				Animal.super.call(this, options);
			});

			Animal.cache_duration = null;
			assert.strictEqual(Animal.cache_duration, '2 seconds');
			Animal.cache_duration = false;
			assert.strictEqual(Animal.cache_duration, false);

			assert.strictEqual(Animal.cache, false);
		});

		it('returns the cache object', function() {
			Person.cache_duration = '10 ms';
			Animal.cache_duration = '10 ms';
			assert.strictEqual(typeof Animal.cache, 'object');
		});
	});

	/**
	 * The schema
	 */
	describe('.schema', function() {
		it('returns the Model\'s schema', function() {
			assert.strictEqual(Person.schema instanceof Classes.Alchemy.Schema, true);
		});

		it('returns false when getting the schema of the base Model class', function() {
			assert.strictEqual(Model.schema, false);
		});
	});

	/**
	 * Get the Document class for this model
	 */
	describe('.Document', function() {
		it('should create a Document class for this specific Model', function() {

			var PersonDocument = Person.Document;

			assert.strictEqual(PersonDocument,      Person.Document, 'Should return the same constructor instance');
			assert.strictEqual(PersonDocument.name, Person.name,     'The Document class should have the same name as the Model');
			assert.notStrictEqual(PersonDocument,   Person,          'The model & the document are different things');
		});
	});

	/**
	 * Get the ClientDocument class for this model
	 */
	describe('.ClientDocument', function() {
		it('should create a ClientDocument class for this specific Model', function() {

			var PersonDocument = Person.ClientDocument;

			assert.strictEqual(PersonDocument,      Person.ClientDocument, 'Should return the same constructor instance');
			assert.strictEqual(PersonDocument.name, Person.name,           'The Document class should have the same name as the Model');
			assert.notStrictEqual(PersonDocument,   Person,                'The model & the document are different things');
			assert.notStrictEqual(PersonDocument,   Person.Document,       'The ClientDocument & the Document are different things');
		});
	});

	/**
	 * Adding fields to the new Model
	 */
	describe('.addField(name, type, options)', function() {
		it('should add fields (during constitution) - Person example', function(done) {
			Person.constitute(function addFields() {

				this.addField('firstname', 'String');
				this.addField('lastname',  'String');
				this.addField('nicknames', 'String', {array: true});
				this.addField('birthdate', 'Date');
				this.addField('male',      'Boolean');

				this.belongsTo('Parent', 'Person');
				this.hasMany('Children', 'Person', {foreignKey: 'parent_id'});

				done();
			});
		});

		it('should add fields (during constitution) - Event example', function(done) {
			Event.constitute(function addFields() {
				this.addField('name', 'String');
				this.hasAndBelongsToMany('Invited', 'Person');

				done();
			});
		});

		it('should add fields (during constitution) - Product example', function(done) {
			Product.constitute(function addFields() {
				this.addField('name', 'String');

				done();
			});
		});

		it('should add fields (during constitution) - Project example', function(done) {
			Project.constitute(function addFields() {
				this.addField('name', 'String');
				this.hasMany('Versions', 'ProjectVersion');

				done();
			});
		});

		it('should add fields (during constitution) - ProjectVersion example', function(done) {
			ProjectVersion.constitute(function addFields() {
				this.addField('name', 'String');
				this.addField('major', 'Number');
				this.addField('minor', 'Number');
				this.addField('patch', 'Number');
				this.addField('version_string', 'String');
				this.belongsTo('Project');

				done();
			});
		});

		it('should be able to add schema as fields', function(next) {
			next = Function.regulate(next);

			WithSchemaField = Function.inherits('Alchemy.Model', function WithSchemaField(options) {
				WithSchemaField.super.call(this, options);
			});

			WithSchemaField.constitute(function addFields() {
				var schema = new Classes.Alchemy.Schema(this);

				schema.addField('subname', 'String');
				schema.addField('subvalue', 'String');

				this.addField('subschema', schema);

				var schema_two = new Classes.Alchemy.Schema(this);

				schema_two.addField('entryname', 'String');

				this.addField('entries', schema_two, {array: true});

				let sub_sub = new Classes.Alchemy.Schema(this);

				sub_sub.addField('lorem', 'String');
				sub_sub.addField('ipsum', 'String');

				schema_two.addField('sub_sub', sub_sub, {array: true});

				let sub_sub_no_initial_parent = new Classes.Alchemy.Schema();
				sub_sub_no_initial_parent.addField('test', 'String');
				schema_two.addField('sub_nip', sub_sub_no_initial_parent);

				this.addField('name', 'String');

				let translatable_schema = new Classes.Alchemy.Schema(this);
				translatable_schema.addField('name', 'String');
				this.addField('translatable_schema', translatable_schema, {translatable: true});

				this.addField('description', 'String', {translatable: true});

				this.addField('translatable_tags', 'String', {translatable: true, array: true});

				next();
			});
		});

		it('should be able to add translatable & array schema fields', function(next) {

			let pledge = new Classes.Pledge();

			next = Function.regulate(next);

			WithComplexSchemaField = Function.inherits('Alchemy.Model', 'WithComplexSchemaField');

			WithComplexSchemaField.constitute(function addFields() {

				let subschema = new Classes.Alchemy.Schema();

				subschema.addField('name', 'String');
				subschema.addField('value', 'String');

				this.addField('name', 'String');
				this.addField('values', subschema, {array: true, translatable: true});

				this.addField('tags', 'String', {array: true, translatable: true});

				pledge.resolve();
			});

			pledge.done(async function() {

				let WCSF = Model.get('WithComplexSchemaField');

				let doc = WCSF.createDocument();

				doc.name = 'wcsftest';
				doc.values = {
					en : [
						{name: 'en-name', value: 'en'}
					],
					nl: [
						{name: 'nl-name', value: 'nl'}
					]
				};

				doc.tags = {
					en: ['en-tag'],
					nl: ['nl-tag']
				};

				await doc.save();

				let found_doc = await WCSF.find('first');

				assert.deepStrictEqual(doc.tags, {
					en: ['en-tag'],
					nl: ['nl-tag']
				});

				assert.deepStrictEqual(found_doc.tags, {
					en: ['en-tag'],
					nl: ['nl-tag']
				});

				next();
			});
		});

		it('should be able to add cloned schemas', function(next) {

			let pledge = new Classes.Pledge();

			next = Function.regulate(next);

			let Scenario = Function.inherits('Alchemy.Model', function Scenario(options) {
				Scenario.super.call(this, options);
			});

			Scenario.constitute(function addFields() {
				this.addField('name', 'String');

				let components = new Classes.Alchemy.Schema(this);

				components.addField('uid', 'ObjectId', {default: alchemy.ObjectId});

				let connections = new Classes.Alchemy.Schema();
				let connection = new Classes.Alchemy.Schema();

				// Create the anchor schema
				let anchor = new Classes.Alchemy.Schema();
				anchor.addField('node_uid', 'ObjectId');
				anchor.addField('anchor_name', 'String');

				// And we'll use this anchor schema twice!
				connection.addField('source', JSON.clone(anchor));
				connection.addField('target', JSON.clone(anchor));

				// And the connections will also be used twice!
				connections.addField('in', JSON.clone(connection), {array: true});
				connections.addField('out', JSON.clone(connection), {array: true});

				components.addField('connections', connections);

				let pos = new Classes.Alchemy.Schema();
				pos.addField('x', 'Number');
				pos.addField('y', 'Number');

				components.addField('pos', pos);

				// All the blocks of this scenario
				this.addField('components', components, {array: true});

				pledge.resolve();
			});

			pledge.done(async function() {

				let ScenarioModel = Model.get('Scenario'),
				    scenario = ScenarioModel.createDocument();

				scenario.name = 'first-scenario';

				let components = [
					{
						uid : alchemy.ObjectId(),
						pos : {x: 1, y: 2},
						connections : {
							in : [
								{
									source : {
										node_uid     : alchemy.ObjectId(),
										anchor_name  : 'alpha'
									},
									target : {
										node_uid     : alchemy.ObjectId(),
										anchor_name  : 'beta'
									}
								}
							],
							out : []
						}
					}
				];

				scenario.components = components;

				await scenario.save();

				let saved = await ScenarioModel.find('first');

				assert.strictEqual(saved.name, scenario.name);

				let alike = Object.alike(scenario.components, saved.components);

				assert.strictEqual(alike, true);

				next();
			});
		});

		it('should be able to add translatable fields', function(next) {
			next = Function.regulate(next);

			WithTranslation = Function.inherits('Alchemy.Model', function WithTranslation(options) {
				WithTranslation.super.call(this, options);
			});

			WithTranslation.constitute(function addFields() {
				this.addField('name', 'String');
				this.addField('title', 'String', {translatable: true});

				let sub_schema = new Classes.Alchemy.Schema();
				sub_schema.addField('foobar', 'String', {translatable: true});

				this.addField('items', sub_schema, {array: true});

				next();
			});
		});
	});

	/**
	 * Adding validation rules to the model
	 */
	describe('.addRule(validation_name, options)', function() {

		it('should add rules (during constitution) - Person example', function(done) {
			Person.constitute(function addFields() {

				this.addRule('NotEmpty', {fields: ['firstname']});

				done();
			});
		});

		it('should throw an error when trying to create a new record without a firstname', async function() {

			let person = Model.get('Person').createDocument(),
			    caught_err;

			person.lastname = 'Only Lastname';

			try {
				await person.save();
			} catch (err) {
				caught_err = err;
			}

			assert.strictEqual(!!caught_err, true, 'An error should have been thrown while trying to save this record');
			assert.strictEqual(caught_err instanceof Blast.Classes.Alchemy.Error.Validation.Violations, true, 'A `Violations` error should have been thrown');
			assert.strictEqual(caught_err.length, 1, 'The `Violations` error should contain 1 violation');

		});
	});

	/**
	 * Add a belongsTo relation
	 */
	describe('.belongsTo(alias, model)', function() {
		var Group,
		    Member;

		it('adds a new relation', function(next) {

			Function.series(function(next) {

				Group = Function.inherits('Alchemy.Model', function PeopleGroup(options) {
					PeopleGroup.super.call(this, options);
				});

				Group.constitute(function addFields() {

					// Group name
					this.addField('name', 'String');

					next();
				});
			}, function(next) {

				Member = Function.inherits('Alchemy.Model', function Member(options) {
					Member.super.call(this, options);
				});

				Member.constitute(function addFields() {

					// Member name
					this.addField('name', 'String');

					// The group it belongs to
					this.belongsTo('PeopleGroup');

					next();
				});
			}, function done(err) {

				if (err) {
					return next(err);
				}

				let people_group_id = Member.getField('people_group_id');

				assert.strictEqual(people_group_id instanceof Classes.Alchemy.Field.BelongsTo, true, 'Should have made a people_group_id field');
				assert.strictEqual(people_group_id.parent_schema.name, 'Member');
				next();
			});
		});
	});

	/**
	 * Add Document methods
	 */
	describe('.setDocumentMethod(fnc)', function() {
		it('adds a new method to the linked Document class', function() {
			Person.setDocumentMethod(function getFamiliarName() {
				var result;

				if (this.firstname) {
					return this.firstname;
				} else if (this.nicknames && this.nicknames[0]) {
					return this.nicknames[0];
				} else if (this.lastname) {
					return this.lastname;
				} else {
					return 'Unknown';
				}
			});

			assert.strictEqual(Person.Document.prototype.getFamiliarName.name, 'getFamiliarName');
			assert.strictEqual(Person.ClientDocument.prototype.getFamiliarName, undefined);
		});
	});

	/**
	 * Add Document properties
	 */
	describe('.setDocumentProperty(getter)', function() {
		it('adds a new property getter to the linked Document class', function() {
			Person.setDocumentProperty(function upper_firstname() {

				if (!this.firstname) {
					return '';
				}

				return this.firstname.toUpperCase();
			});

			var person = new Person.Document();

			assert.strictEqual(person.upper_firstname, '');

			person.firstname = 'test';

			assert.strictEqual(person.upper_firstname, 'TEST');
		});
	});

	/**
	 * The name of a model
	 */
	describe('#name', function() {
		it('should return the name of the model class', function() {
			var person = Model.get('Person');
			assert.strictEqual(person.name, Person.name);
		});

		it('should allow you to override the name per instance', function() {
			var person = Model.get('Person'),
			    second = Model.get('Person');

			assert.strictEqual(person.name, 'Person');
			assert.strictEqual(second.name, person.name);

			// Now set a different name
			second.name = 'SecondPerson';

			assert.strictEqual(second.name, 'SecondPerson');
			assert.strictEqual(person.name, 'Person');
			assert.strictEqual(Model.get('Person').name, 'Person');
		});
	});

	/**
	 * Getting an instance of the model
	 */
	describe('#get(model_name)', function() {
		it('should create a new instance of the wanted model', function() {

			var person = Model.get('Person');

			assert.strictEqual(person instanceof Person, true);
			assert.strictEqual(person instanceof Classes.Alchemy.Model.Model, true);

		});
	});

	/**
	 * Saving data
	 */
	describe('#save(data, callback)', function() {

		it('should save the data and call back with a DocumentList', function(done) {

			Function.series(function doGriet(next) {

				var griet_data = {
					firstname : 'Griet',
					lastname  : 'De Leener',
					male      : false
				};

				Model.get('Person').save(griet_data, function saved(err, list) {

					if (err) {
						return next(err);
					}

					assert.strictEqual(list.length, 1);

					let document = list[0];
					next(null, document);
				});

			}, function doJelle(next, griet) {

				data.parent_id = griet._id;

				Model.get('Person').save(data, function saved(err, list) {

					if (err) {
						return next(err);
					}

					assert.strictEqual(list.length, 1);

					let document = list[0];

					testDocument(document, data);

					// Save the _id for next tests
					_id = document._id;

					// Save this for later tests
					global.person_doc = document;

					next(null, document);
				});
			}, done);
		});
	});

	describe('#sort', function() {
		it('should be used when no sort parameter is given', async function() {

			var persons = await Model.get('Person').find('all');

			assert.strictEqual(persons[0].firstname, 'Griet');
			assert.strictEqual(persons[1].firstname, 'Jelle');
		});

		it.skip('should allow adding the model name before the field name', function() {
			// @TODO: need to write this!
		});
	});

	/**
	 * Getting data
	 */
	describe('#find(\'first\', options, callback)', function() {
		it('should find 1 document by ObjectId instance', function(done) {
			Model.get('Person').find('first', {conditions: {_id: _id}}, function gotDocument(err, document) {

				if (err) {
					return done(err);
				}

				try {

					assert.notStrictEqual(document instanceof Classes.Alchemy.DocumentList, true, 'Should not have returned a DocumentList');
					assert.strictEqual(document instanceof Classes.Alchemy.Document.Document, true, 'Should have returned a Document');

					assert.strictEqual(String(document._id), String(_id));

					testDocument(document, data);
				} catch (err) {
					return done(err);
				}

				done();
			});
		});

		it('should find 1 document by ObjectId string', function(done) {
			Model.get('Person').find('first', {conditions: {_id: String(_id)}}, function gotDocument(err, document) {

				if (err) {
					return done(err);
				}

				try {
					assert.notStrictEqual(document instanceof Classes.Alchemy.DocumentList, true, 'Should not have returned a DocumentList');
					assert.strictEqual(document instanceof Classes.Alchemy.Document.Document, true, 'Should have returned a Document');

					assert.strictEqual(String(document._id), String(_id));

					testDocument(document, data);
				} catch (err) {
					return done(err);
				}

				done();
			});
		});
	});

	describe('#findById(object_id, callback)', function() {
		it('should find a single document by ObjectId instance', function(done) {
			Model.get('Person').findById(_id, function gotPerson(err, person) {

				if (err) {
					return done(err);
				}

				assert.strictEqual(String(_id), String(person._id));
				assert.strictEqual(person instanceof Classes.Alchemy.Document.Document, true);
				done();
			});
		});

		it('should find a single document by ObjectId string', function(done) {
			Model.get('Person').findById(String(_id), function gotPerson(err, person) {

				if (err) {
					return done(err);
				}

				assert.strictEqual(String(_id), String(person._id));
				assert.strictEqual(person instanceof Classes.Alchemy.Document.Document, true);
				done();
			});
		});
	});

	describe('#ensureIds(list, callback)', function() {

		var product,
		    list;

		list = [
			{
				_id   : '52efff000073570002000000',
				name  : 'screen'
			},
			{
				_id   : '52efff000073570002000001',
				name  : 'mouse'
			},
			{
				_id   : '52efff000073570002000002',
				name  : 'keyboard'
			}
		];

		it('should make sure the given ids & records exist in the database', async function() {

			product = Model.get('Product');

			await product.ensureIds(list, async function done(err) {

				if (err) {
					return done(err);
				}

				let prod;

				prod = await product.findById('52efff000073570002000000');
				assert.strictEqual(prod.name, 'screen');

				prod = await product.findById('52efff000073570002000001');
				assert.strictEqual(prod.name, 'mouse');

				prod = await product.findById('52efff000073570002000002');
				assert.strictEqual(prod.name, 'keyboard');

				let prods = await product.find('all');
				assert.strictEqual(prods.length, 3);

				let removed = await prod.remove();

				assert.strictEqual(removed, true);

				prod = await product.findById('52efff000073570002000002');
				assert.strictEqual(prod, null);

				prods = await product.find('all');
				assert.strictEqual(prods.length, 2, 'There should only be 3 products after one was removed');

				// Ensure them again
				await product.ensureIds(list);

				prods = await product.find('all');
				assert.strictEqual(prods.length, 3, 'There should only be 3 products: only the missing one should have been added');

				prod = await product.findById('52efff000073570002000002');
				assert.strictEqual(prod.name, 'keyboard');
			});
		});
	});

	describe('#createDocument()', function() {
		it('should not break variables that were already documents', function() {

			let Person = Model.get('Person');

			let empty = Person.createDocument();

			assert.strictEqual(empty.is_new_record, true);
			assert.strictEqual(empty.$record.Person.Person, undefined);

			let double = Person.createDocument(empty);

			// Doing anything with this new document will now break the original one!
			let test = double.is_new_record;

			assert.strictEqual(test, true);

			assert.strictEqual(empty.$record.Person.Person, undefined);
		});
	});

	describe('#compose(data, options)', function() {

		it.skip('should set default values', function() {

		});

		it('should set creation fields', async function() {

			let Person = Model.get('Person');

			let empty = Person.createDocument();

			let data = Person.compose(empty, {create: true});

			// Compose is actually not the source of this issue :(
			assert.strictEqual(empty.$record.Person.Person, undefined);

			assert.strictEqual(!!data._id, true, 'No _id field was created');
			assert.strictEqual(!!data.created, true, 'The `created` field was not set');
			assert.strictEqual(!!data.updated, true, 'The `updated` field was not set');
		});
	});
});


text:
package deepDriver.dl.aml.lstm.hred;

public class HredBPTT {

}


text:
#import "NSObject.h"

@class UIView;

@interface SUPurchaseAnimationDelegate : NSObject
{
    UIView *_view;
}

- (void)animationDidStop:(id)arg1 finished:(_Bool)arg2;
- (void)dealloc;
- (id)initWithView:(id)arg1;

@end


text:
<?php

namespace Scool\Attendance\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class NormalController extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}


text:
using NUnit.Framework;
using System;
using Symbooglix;

namespace SymbooglixLibTests
{
    [TestFixture()]
    public class InconsistentAxioms : SymbooglixTest
    {
        private void Init()
        {
            p = LoadProgramFrom("programs/InconsistentAxioms.bpl");
            this.e = GetExecutor(p, new DFSStateScheduler(), GetSolver());
        }

        [Test(),ExpectedException(typeof(Symbooglix.InitialStateTerminated))]
        public void ExceptionThrown()
        {
            Init();
            e.Run(GetMain(p));

        }
    }

}


text:
#include <linux/moduleloader.h>
#include <linux/elf.h>
#include <linux/vmalloc.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/kernel.h>

#if 0
#define DEBUGP printk
#else
#define DEBUGP(fmt...)
#endif

void *module_alloc(unsigned long size)
{
	if (size == 0)
		return NULL;
	return vmalloc(size);
}

/* Free memory returned from module_alloc */
void module_free(struct module *mod, void *module_region)
{
	vfree(module_region);
	/* FIXME: If module_region == mod->init_region, trim exception
           table entries. */
}

/* We don't need anything special. */
int module_frob_arch_sections(Elf_Ehdr *hdr,
			      Elf_Shdr *sechdrs,
			      char *secstrings,
			      struct module *mod)
{
	return 0;
}

int apply_relocate_add(Elf32_Shdr *sechdrs,
		   const char *strtab,
		   unsigned int symindex,
		   unsigned int relsec,
		   struct module *me)
{
	unsigned int i;
	Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
	Elf32_Sym *sym;
	Elf32_Addr relocation;
	uint32_t *location;
	int align;
	int is_shmedia;

	DEBUGP("Applying relocate section %u to %u\n", relsec,
	       sechdrs[relsec].sh_info);
	for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
		/* This is where to make the change */
		location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
			+ rel[i].r_offset;
		/* This is the symbol it is referring to.  Note that all
		   undefined symbols have been resolved.  */
		sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
			+ ELF32_R_SYM(rel[i].r_info);
		relocation = sym->st_value + rel[i].r_addend;
		align = (int)location & 3;

		/* For text addresses, bit2 of the st_other field indicates
		 * whether the symbol is SHmedia (1) or SHcompact (0).  If
		 * SHmedia, the LSB of the symbol needs to be asserted
		 * for the CPU to be in SHmedia mode when it starts executing
		 * the branch target. */
		is_shmedia = (sym->st_other & 4) ? 1 : 0;
		if (is_shmedia) {
			relocation |= 1;
		}

		switch (ELF32_R_TYPE(rel[i].r_info)) {
		case R_SH_DIR32:
			DEBUGP("R_SH_DIR32 @%08lx = %08lx\n", (unsigned long) location, (unsigned long) relocation);
			*location += relocation;
			break;
		case R_SH_REL32:
			DEBUGP("R_SH_REL32 @%08lx = %08lx\n", (unsigned long) location, (unsigned long) relocation);
			relocation -= (Elf32_Addr) location;
			*location += relocation;
			break;
		case R_SH_IMM_LOW16:
			DEBUGP("R_SH_IMM_LOW16 @%08lx = %08lx\n", (unsigned long) location, (unsigned long) relocation);
			*location = (*location & ~0x3fffc00) |
				((relocation & 0xffff) << 10);
			break;
		case R_SH_IMM_MEDLOW16:
			DEBUGP("R_SH_IMM_MEDLOW16 @%08lx = %08lx\n", (unsigned long) location, (unsigned long) relocation);
			*location = (*location & ~0x3fffc00) |
				(((relocation >> 16) & 0xffff) << 10);
			break;
		case R_SH_IMM_LOW16_PCREL:
			DEBUGP("R_SH_IMM_LOW16_PCREL @%08lx = %08lx\n", (unsigned long) location, (unsigned long) relocation);
			relocation -= (Elf32_Addr) location;
			*location = (*location & ~0x3fffc00) |
				((relocation & 0xffff) << 10);
			break;
		case R_SH_IMM_MEDLOW16_PCREL:
			DEBUGP("R_SH_IMM_MEDLOW16_PCREL @%08lx = %08lx\n", (unsigned long) location, (unsigned long) relocation);
			relocation -= (Elf32_Addr) location;
			*location = (*location & ~0x3fffc00) |
				(((relocation >> 16) & 0xffff) << 10);
			break;
		default:
			printk(KERN_ERR "module %s: Unknown relocation: %u\n",
			       me->name, ELF32_R_TYPE(rel[i].r_info));
			return -ENOEXEC;
		}
	}
	return 0;
}

int apply_relocate(Elf32_Shdr *sechdrs,
		       const char *strtab,
		       unsigned int symindex,
		       unsigned int relsec,
		       struct module *me)
{
	printk(KERN_ERR "module %s: REL RELOCATION unsupported\n",
	       me->name);
	return -ENOEXEC;
}

int module_finalize(const Elf_Ehdr *hdr,
		    const Elf_Shdr *sechdrs,
		    struct module *me)
{
	return 0;
}

void module_arch_cleanup(struct module *mod)
{
}


text:
/*
 * Quick and dirty style for virtual keyboard
 */
#email-input_keyboard {
background: #424242;
    padding: 2rem 5rem;
    border-radius: 10px;
    box-shadow: 1px 1px 6px #aaa;
}
/* keyboard - jQuery UI Widget */
.ui-keyboard { padding: .3em; position: absolute; left: 0; top: 0; z-index: 16000; }
.ui-keyboard-has-focus { z-index: 16001; }
.ui-keyboard div { font-size: 1.1em; }
.ui-keyboard-button { height: 2em; min-width: 2em; margin: .1em; cursor: pointer; overflow: hidden; line-height: 2em; -moz-user-focus: ignore; }
.ui-keyboard-button span { padding: 0; margin: 0; white-space:nowrap; display: inline-block; }
.ui-keyboard-button-endrow { clear: left; }
.ui-keyboard-space { width: 15em; }
.ui-keyboard-space span, .ui-keyboard-empty span { font: 0/0 a; text-shadow: none; color: transparent; } /* see http://nicolasgallagher.com/another-css-image-replacement-technique/ */
.ui-keyboard-preview-wrapper { text-align: center; }
.ui-keyboard-preview { text-align: left; margin: 0 0 3px 0; display: inline; width: 99%;} /* width is calculated in IE, since 99% = 99% full browser width =( */
.ui-keyboard-keyset { text-align: center; white-space: nowrap; }
.ui-keyboard-input { text-align: left; }
.ui-keyboard-input-current { -moz-box-shadow: 1px 1px 10px #00f; -webkit-box-shadow: 1px 1px 10px #00f; box-shadow: 1px 1px 10px #00f; }
.ui-keyboard-placeholder { color: #888; }
.ui-keyboard-nokeyboard { color: #888; border-color: #888; } /* disabled or readonly inputs, or use input[disabled='disabled'] { color: #f00; } */
.ui-keyboard-spacer { display: inline-block; width: 1px; height: 0; cursor: default; }
.ui-keyboard-input.light, .ui-keyboard-preview.light { color: #222; background: #ddd; }
.ui-keyboard-input.dark, .ui-keyboard-preview.dark { color: #ddd; background: #222; }

/* combo key styling - toggles diacritics on/off */
.ui-keyboard-button.ui-keyboard-combo.ui-state-default { border-color: #ffaf0f; }

/* (in)valid inputs */
button.ui-keyboard-accept.ui-keyboard-valid-input { border-color: #0c0; background: #080; color: #fff; }
button.ui-keyboard-accept.ui-keyboard-valid-input:hover { background: #0a0; }
button.ui-keyboard-accept.ui-keyboard-invalid-input { border-color: #c00; background: #800; color: #fff; opacity: 0.5; filter: alpha(opacity=50); }
button.ui-keyboard-accept.ui-keyboard-invalid-input:hover { background: #a00; }

/*** Caret extension definition ***/
/* margin-top => is added to the caret height (top & bottom) */
.ui-keyboard-caret { background: #c00; width: 1px; margin-top: 3px; }


text:
define(['src/util/versioning'], function (Versioning) {
  async function getViewInfo() {
    if (
      !Versioning.lastLoaded ||
      !Versioning.lastLoaded.view ||
      !Versioning.lastLoaded.view.url
    ) {
      return {};
    }
    let viewURL = Versioning.lastLoaded.view.url;
    let recordURL = viewURL.replace(/\/view.json.*/, '');
    let response = await fetch(recordURL, { credentials: 'include' });

    let info = { _id: viewURL.replace(/.*\/(.*)\/view.json/, '$1') };
    try {
      info = await response.json();
      info.rev = Number(info._rev.replace(/-.*/, ''));
    } catch (e) {
      console.log(e);
    }

    return info;
  }

  return getViewInfo;
});


text:
extern Clock* g_entitiesClock; //the parent clock for all entities

static size_t s_entityID = 0;

//===========================================================================================================

class Entity;

typedef std::vector<Entity*> Entities;
typedef std::vector<Entity*>::iterator EntityIterator;

typedef std::set<Entity*> EntitySet;
typedef std::set<Entity*>::iterator EntitySetIterator;

//===========================================================================================================

class Entity{

public:
	//methods

	//constructors
	Entity();
	Entity(const XMLNode& node);
	Entity(const std::string& name);
	~Entity();

	//construction helpers
	void InitializeClock();

	//accessors

	//getters
	std::string GetNameID();
	std::string GetName(){ return m_name; }
	size_t GetID(){ return m_id;  }

	//setters
	void SetName(const std::string& name);
	void SetID();

	//update
	virtual void Update();

	void UpdateModelTransformMatrix(double deltaSeconds);

	//rendering
	virtual void Render(OpenGLRenderer* renderer);

	//figure out what to do with these, consider other components
	Clock m_clock;
	ModelViewMatrix m_modelViewTransform;

	//ideally change to a vector of components that can be instantiated dynamically, possibly via xml like ai behaviors
	RenderComponent m_renderComponent;
	DestructibleComponent m_destructibleComponent;

	Vector3 m_worldPosition; //for 2D mode ignore the z

protected:
	size_t m_id; //unique ID for entity
	std::string m_name;
	Rgba m_color;

	int m_debugLevel = 0;

};

//===========================================================================================================
///----------------------------------------------------------------------------------------------------------
///inline methods

inline Entity::Entity(){
	SetID();

	//InitializeClock();
}

//-----------------------------------------------------------------------------------------------------------

inline Entity::~Entity(){
	//do nothing
// 	if (m_clock){
// 		delete m_clock;
// 		m_clock = NULL;
// 	}
}

//-----------------------------------------------------------------------------------------------------------

inline void Entity::InitializeClock(){
	m_clock = Clock(GetNameID(), g_entitiesClock);
}

//-----------------------------------------------------------------------------------------------------------

inline std::string Entity::GetNameID(){
	return m_name + " " + IntToString(m_id);
}

//-----------------------------------------------------------------------------------------------------------

inline void Entity::SetName(const std::string& name){
	//also create a string id entry for name
	int stringID = GetStringID(name);

	m_name = GetStringFromID(stringID);
}

//-----------------------------------------------------------------------------------------------------------

inline void Entity::SetID(){
	m_id = s_entityID;

	//increment id to preserve uniqueness
	s_entityID++;
}

//-----------------------------------------------------------------------------------------------------------

//===========================================================================================================
///----------------------------------------------------------------------------------------------------------
///global helpers

inline void InitializeEntitiesClock(){
	if (!g_entitiesClock){
		g_entitiesClock = new Clock("GlobalEntitiesClock");
		GetGameClock().AddChild(g_entitiesClock);
	}
}

//-----------------------------------------------------------------------------------------------------------

inline void ShutDownEntitiesClock(){
	if (g_entitiesClock){
		delete g_entitiesClock;
		g_entitiesClock = NULL;
	}
}

#endif //__includedEntity__


text:
void testSharedMemory(b3PhysicsClientHandle sm)
{
	int i, dofCount , posVarCount, ret ,numJoints ;
    int sensorJointIndexLeft=-1;
    int sensorJointIndexRight=-1;
	const char* urdfFileName = "r2d2.urdf";
	const char* sdfFileName = "kuka_iiwa/model.sdf";
	double gravx=0, gravy=0, gravz=-9.8;
	double timeStep = 1./60.;
	double startPosX, startPosY,startPosZ;
	int imuLinkIndex = -1;
	int bodyIndex = -1;

	if (b3CanSubmitCommand(sm))
	{
        {
        b3SharedMemoryCommandHandle command = b3InitPhysicsParamCommand(sm);
        b3SharedMemoryStatusHandle statusHandle;
		ret = b3PhysicsParamSetGravity(command,  gravx,gravy, gravz);
		ret = b3PhysicsParamSetTimeStep(command,  timeStep);
		statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
        ASSERT_EQ(b3GetStatusType(statusHandle), CMD_CLIENT_COMMAND_COMPLETED);
        }

        {
            b3SharedMemoryStatusHandle statusHandle;
            int statusType;
            int bodyIndicesOut[10];//MAX_SDF_BODIES = 10
            int numJoints, numBodies;
			int bodyUniqueId;
            b3SharedMemoryCommandHandle command = b3LoadSdfCommandInit(sm, sdfFileName);
            statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
			statusType = b3GetStatusType(statusHandle);
			ASSERT_EQ(statusType, CMD_SDF_LOADING_COMPLETED);

			numBodies = b3GetStatusBodyIndices(statusHandle, bodyIndicesOut, 10);
            ASSERT_EQ(numBodies,1);
            bodyUniqueId = bodyIndicesOut[0];
			{
				{
					b3SharedMemoryStatusHandle statusHandle;
					int statusType;
					b3SharedMemoryCommandHandle command = b3InitRequestVisualShapeInformation(sm, bodyUniqueId);
					statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
					statusType = b3GetStatusType(statusHandle);
					if (statusType == CMD_VISUAL_SHAPE_INFO_COMPLETED)
					{
						struct b3VisualShapeInformation vi;
						b3GetVisualShapeInformation(sm, &vi);
					}
				}
			}

            numJoints = b3GetNumJoints(sm,bodyUniqueId);
            ASSERT_EQ(numJoints,7);

#if 0
            b3Printf("numJoints: %d\n", numJoints);
            for (i=0;i<numJoints;i++)
            {
                struct b3JointInfo jointInfo;
                if (b3GetJointInfo(sm,bodyUniqueId, i,&jointInfo))
                {
                    b3Printf("jointInfo[%d].m_jointName=%s\n",i,jointInfo.m_jointName);
                }
            }
#endif
            {
                b3SharedMemoryStatusHandle statusHandle;
                b3SharedMemoryCommandHandle commandHandle;
                double jointAngle = 0.f;
               	int jointIndex;
                commandHandle = b3CreatePoseCommandInit(sm, bodyUniqueId);
                for (jointIndex=0;jointIndex<numJoints;jointIndex++)
                {
                    b3CreatePoseCommandSetJointPosition(sm, commandHandle, jointIndex, jointAngle);
                }

                statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle);

                ASSERT_EQ(b3GetStatusType(statusHandle), CMD_CLIENT_COMMAND_COMPLETED);
            }

        }

        {
            b3SharedMemoryStatusHandle statusHandle;
			int statusType;
			b3SharedMemoryCommandHandle command = b3LoadUrdfCommandInit(sm, urdfFileName);

            //setting the initial position, orientation and other arguments are optional
            startPosX =2;
            startPosY =0;
            startPosZ = 1;
            ret = b3LoadUrdfCommandSetStartPosition(command, startPosX,startPosY,startPosZ);
            statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
			statusType = b3GetStatusType(statusHandle);
			ASSERT_EQ(statusType, CMD_URDF_LOADING_COMPLETED);
			bodyIndex = b3GetStatusBodyIndex(statusHandle);
        }

		if (bodyIndex>=0)
		{

			numJoints = b3GetNumJoints(sm,bodyIndex);
			for (i=0;i<numJoints;i++)
			{
				struct b3JointInfo jointInfo;
				b3GetJointInfo(sm,bodyIndex, i,&jointInfo);

			//	printf("jointInfo[%d].m_jointName=%s\n",i,jointInfo.m_jointName);
				//pick the IMU link index based on torso name
				if (strstr(jointInfo.m_linkName,"base_link"))
				{
					imuLinkIndex = i;
				}

				//pick the joint index based on joint name
				if (strstr(jointInfo.m_jointName,"base_to_left_leg"))
				{
					sensorJointIndexLeft = i;
				}
				if (strstr(jointInfo.m_jointName,"base_to_right_leg"))
				{
					sensorJointIndexRight = i;
				}

			}

			if ((sensorJointIndexLeft>=0) || (sensorJointIndexRight>=0))
			{
				b3SharedMemoryCommandHandle command = b3CreateSensorCommandInit(sm, bodyIndex);
				b3SharedMemoryStatusHandle statusHandle;
				if (imuLinkIndex>=0)
				{
					 ret = b3CreateSensorEnableIMUForLink(command, imuLinkIndex, 1);
				}

				if (sensorJointIndexLeft>=0)
				{
				  ret = b3CreateSensorEnable6DofJointForceTorqueSensor(command, sensorJointIndexLeft, 1);
				}
				if(sensorJointIndexRight>=0)
				{
					ret = b3CreateSensorEnable6DofJointForceTorqueSensor(command, sensorJointIndexRight, 1);
				}
				statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
                ASSERT_EQ(b3GetStatusType(statusHandle), CMD_CLIENT_COMMAND_COMPLETED);
			}
		}

        {
            b3SharedMemoryStatusHandle statusHandle;
             b3SharedMemoryCommandHandle command = b3CreateBoxShapeCommandInit(sm);
            ret = b3CreateBoxCommandSetStartPosition(command, 0,0,-1);
            ret = b3CreateBoxCommandSetStartOrientation(command,0,0,0,1);
            ret = b3CreateBoxCommandSetHalfExtents(command, 10,10,1);
            statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
            ASSERT_EQ(b3GetStatusType(statusHandle), CMD_RIGID_BODY_CREATION_COMPLETED);

        }

        {
        		int statusType;
            b3SharedMemoryCommandHandle command = b3RequestActualStateCommandInit(sm,bodyIndex);
            b3SharedMemoryStatusHandle statusHandle;
            statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
            statusType = b3GetStatusType(statusHandle);
           ASSERT_EQ(statusType, CMD_ACTUAL_STATE_UPDATE_COMPLETED);

            if (statusType == CMD_ACTUAL_STATE_UPDATE_COMPLETED)
            {
                b3GetStatusActualState(statusHandle,
                                       0, &posVarCount, &dofCount,
                                       0, 0, 0, 0);
                ASSERT_EQ(posVarCount,15);
                ASSERT_EQ(dofCount,14);
            }
        }

        {
#if 0
            b3SharedMemoryStatusHandle statusHandle;
             b3SharedMemoryCommandHandle command = b3JointControlCommandInit( sm, CONTROL_MODE_VELOCITY);
            for ( dofIndex=0;dofIndex<dofCount;dofIndex++)
            {
                b3JointControlSetDesiredVelocity(command,dofIndex,1);
                b3JointControlSetMaximumForce(command,dofIndex,100);
            }
             statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
#endif
        }
        ///perform some simulation steps for testing
        for ( i=0;i<1000;i++)
        {
			b3SharedMemoryStatusHandle statusHandle;
			int statusType;

            if (b3CanSubmitCommand(sm))
            {
                statusHandle = b3SubmitClientCommandAndWaitStatus(sm, b3InitStepSimulationCommand(sm));
                statusType = b3GetStatusType(statusHandle);
                ASSERT_EQ(statusType, CMD_STEP_FORWARD_SIMULATION_COMPLETED);
            } else
            {
                break;
            }
        }

        if (b3CanSubmitCommand(sm))
        {
            b3SharedMemoryStatusHandle state = b3SubmitClientCommandAndWaitStatus(sm, b3RequestActualStateCommandInit(sm,bodyIndex));

			if (sensorJointIndexLeft>=0)
			{

				struct  b3JointSensorState sensorState;
				b3GetJointState(sm,state,sensorJointIndexLeft,&sensorState);

				b3Printf("Sensor for joint [%d] = %f,%f,%f\n", sensorJointIndexLeft,
					sensorState.m_jointForceTorque[0],
					sensorState.m_jointForceTorque[1],
					sensorState.m_jointForceTorque[2]);

			}

			if (sensorJointIndexRight>=0)
			{
				struct  b3JointSensorState sensorState;
				b3GetJointState(sm,state,sensorJointIndexRight,&sensorState);

				b3Printf("Sensor for joint [%d] = %f,%f,%f\n", sensorJointIndexRight,
						 sensorState.m_jointForceTorque[0],
						 sensorState.m_jointForceTorque[1],
						 sensorState.m_jointForceTorque[2]);

			}

            {
                b3SharedMemoryStatusHandle statusHandle;
                statusHandle = b3SubmitClientCommandAndWaitStatus(sm, b3InitResetSimulationCommand(sm));
                ASSERT_EQ(b3GetStatusType(statusHandle), CMD_RESET_SIMULATION_COMPLETED);
            }
        }

	}

	b3DisconnectSharedMemory(sm);
}

#ifdef ENABLE_GTEST

TEST(BulletPhysicsClientServerTest, DirectConnection) {
        b3PhysicsClientHandle sm = b3ConnectPhysicsDirect();
        testSharedMemory(sm);
}

TEST(BulletPhysicsClientServerTest, LoopBackSharedMemory) {
        b3PhysicsClientHandle sm = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY);
        testSharedMemory(sm);
}

#else

int main(int argc, char* argv[])
{
#ifdef PHYSICS_LOOP_BACK
        b3PhysicsClientHandle sm = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY);
#endif

#ifdef PHYSICS_SERVER_DIRECT
        b3PhysicsClientHandle sm = b3ConnectPhysicsDirect();
#endif

#ifdef PHYSICS_IN_PROCESS_EXAMPLE_BROWSER

#ifdef __APPLE__
    b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnectMainThread(argc,argv);
#else
    b3PhysicsClientHandle sm = b3CreateInProcessPhysicsServerAndConnect(argc,argv);
#endif //__APPLE__
#endif

#ifdef PHYSICS_SHARED_MEMORY
        b3PhysicsClientHandle sm = b3ConnectSharedMemory(SHARED_MEMORY_KEY);
#endif //PHYSICS_SHARED_MEMORY

#ifdef PHYSICS_UDP
        b3PhysicsClientHandle sm = b3ConnectPhysicsUDP("localhost",1234);
#endif //PHYSICS_UDP

	testSharedMemory(sm);
}
#endif


text:
package beat

import (
	"bytes"
	"github.com/christiangalsterer/execbeat/config"
	"github.com/elastic/beats/libbeat/logp"
	"github.com/robfig/cron"
	"os/exec"
	"strings"
	"syscall"
	"time"
)

type Executor struct {
	execbeat     *Execbeat
	config       config.ExecConfig
	schedule     string
	documentType string
}

func NewExecutor(execbeat *Execbeat, config config.ExecConfig) *Executor {
	executor := &Executor{
		execbeat: execbeat,
		config:   config,
	}

	return executor
}

func (e *Executor) Run() {

	// setup default config
	e.documentType = config.DefaultDocumentType
	e.schedule = config.DefaultSchedule

	// setup document type
	if e.config.DocumentType != "" {
		e.documentType = e.config.DocumentType
	}

	// setup cron schedule
	if e.config.Schedule != "" {
		logp.Debug("Execbeat", "Use schedule: [%w]", e.config.Schedule)
		e.schedule = e.config.Schedule
	}

	cron := cron.New()
	cron.AddFunc(e.schedule, func() { e.runOneTime() })
	cron.Start()
}

func (e *Executor) runOneTime() error {
	var cmd *exec.Cmd
	var cmdArgs []string
	var err error
	var stdout bytes.Buffer
	var stderr bytes.Buffer
	var waitStatus syscall.WaitStatus
	var exitCode int = 0

	cmdName := strings.TrimSpace(e.config.Command)

	args := strings.TrimSpace(e.config.Args)
	if len(args) > 0 {
		cmdArgs = strings.Split(args, " ")
	}

	// execute command
	now := time.Now()

	if len(cmdArgs) > 0 {
		logp.Debug("Execbeat", "Executing command: [%v] with args [%w]", cmdName, cmdArgs)
		cmd = exec.Command(cmdName, cmdArgs...)
	} else {
		logp.Debug("Execbeat", "Executing command: [%v]", cmdName)
		cmd = exec.Command(cmdName)
	}
	cmd.Stdout = &stdout
	cmd.Stderr = &stderr

	err = cmd.Start()
	if err != nil {
		logp.Err("An error occured while executing command: %v", err)
		exitCode = 127
	}

	err = cmd.Wait()
	if err != nil {
		logp.Err("An error occured while executing command: %v", err)
		if exitError, ok := err.(*exec.ExitError); ok {
			waitStatus = exitError.Sys().(syscall.WaitStatus)
			exitCode = waitStatus.ExitStatus()
		}
	}

	logp.Info("Execbeat", "Executing command: [%v]", stdout.String())

	commandEvent := Exec{
		Command:  cmdName,
		StdOut:   stdout.String(),
		StdErr:   stderr.String(),
		ExitCode: exitCode,
	}

	event := ExecEvent{
		ReadTime:     now,
		DocumentType: e.documentType,
		Fields:       e.config.Fields,
		Exec:         commandEvent,
	}

	e.execbeat.client.PublishEvent(event.ToMapStr())

	return nil
}

func (e *Executor) Stop() {
}


text:
Labels of image with tag '{{ manifest.tag }}'

            {{ label.key }}
            {{ label.value }}

  <ng-template #nolabels>

No labels defined for image with tag '{{ manifest.tag }}'

  </ng-template>


text:
import { Injectable } from '@angular/core';
import { Subject, BehaviorSubject, Observable } from 'rxjs';
import { filter } from 'rxjs/operators';

import { UrlPathId } from 'app/shared/models';
import { NewUrlStateNotificationService, StoreHelperService } from 'app/shared/services';
import { ServerMapData } from 'app/core/components/server-map/class/server-map-data.class';

export enum SOURCE_TYPE {
    MAIN = 'MAIN',
    FILTERED = 'FILTERED_MAP',
    TRANSACTION_VIEW = 'TRANSACTION_VIEW',
    TRANSACTION_LIST = 'TRANSACTION_LIST',
}

export interface IServerMapNotificationData {
    baseApplication: string;
    serverMapData: ServerMapData;
    hidden: boolean;
    error: boolean;
}

@Injectable()
export class ServerMapChangeNotificationService {
    private unsubscribe: Subject<null> = new Subject();
    private outServerMapDataInMain: Subject<IServerMapNotificationData> = new Subject();
    private outServerMapDataInFilteredMap: Subject<IServerMapNotificationData> = new Subject();
    private outServerMapDataInTransactionView: BehaviorSubject<IServerMapNotificationData> = new BehaviorSubject(null);
    private outServerMapDataInTransactionList: BehaviorSubject<IServerMapNotificationData> = new BehaviorSubject(null);
    currentPage: string;
    baseApplication = '';

    constructor(
        private newUrlStateNotificationService: NewUrlStateNotificationService,
        private storeHelperService: StoreHelperService
    ) {
        this.connectStore();
    }
    private connectStore(): void {
        this.newUrlStateNotificationService.onUrlStateChange$.pipe(
            filter((urlService: NewUrlStateNotificationService) => {
                return urlService !== null;
            }),
            filter((urlService: NewUrlStateNotificationService) => {
                return urlService.hasValue(UrlPathId.APPLICATION);
            })
        ).subscribe((urlService: NewUrlStateNotificationService) => {
            this.currentPage = urlService.getStartPath();
            this.baseApplication = urlService.getPathValue(UrlPathId.APPLICATION).getKeyStr();
        });
        this.storeHelperService.getTransactionDetailData(this.unsubscribe).pipe(
            filter((data: ITransactionDetailData) => {
                return data !== undefined;
            })
        ).subscribe((data: ITransactionDetailData) => {
            if (this.baseApplication === '') {
                const applicationId = data.applicationId;
                this.baseApplication = (data.applicationMapData.nodeDataArray as INodeInfo[]).find(({ applicationName }: INodeInfo) => {
                    return applicationId === applicationName;
                }).key;
            }
            this.emitData({
                baseApplication: this.baseApplication,
                serverMapData: new ServerMapData(data.applicationMapData.nodeDataArray, data.applicationMapData.linkDataArray),
                error: false,
                hidden: false
            });
        });
    }
    getObservable(type: string): Observable<any> {
        switch (type) {
            case SOURCE_TYPE.MAIN:
                return this.outServerMapDataInMain.asObservable();
            case SOURCE_TYPE.FILTERED:
                return this.outServerMapDataInFilteredMap.asObservable();
            case SOURCE_TYPE.TRANSACTION_VIEW:
                return this.outServerMapDataInTransactionView.asObservable();
            case SOURCE_TYPE.TRANSACTION_LIST:
                return this.outServerMapDataInTransactionList.asObservable();
            default:
                return this.outServerMapDataInMain.asObservable();
        }
    }
    private emitData(data: IServerMapNotificationData): void {
        this.outServerMapDataInMain.next(data);
        this.outServerMapDataInFilteredMap.next(data);
        this.outServerMapDataInTransactionList.next(data);
        this.outServerMapDataInTransactionView.next(data);
    }
}


text:
import { curry, __ as placeholder } from 'ramda';

function forOwn(obj, fn) {
    for (const key in obj) {
        if (obj.hasOwnProperty(key)) {
            fn(obj[key], key);
        }
    }
}

function isArrayLike(value) {
    return value
        && typeof value === 'object'
        && typeof value.length === 'number'
        && value.length >= 0
        && value.length % 1 === 0;
}

const OWNER_ID_TAG = '@@_______immutableOpsOwnerID';

function fastArrayCopy(arr) {
    const copied = new Array(arr.length);
    for (let i = 0; i < arr.length; i++) {
        copied[i] = arr[i];
    }
    return copied;
}

export function canMutate(obj, ownerID) {
    if (!ownerID) return false;
    return obj[OWNER_ID_TAG] === ownerID;
}

const newOwnerID = typeof Symbol === 'function'
    ? () => Symbol('ownerID')
    : () => ({});

export const getBatchToken = newOwnerID;

function addOwnerID(obj, ownerID) {
    Object.defineProperty(obj, OWNER_ID_TAG, {
        value: ownerID,
        configurable: true,
        enumerable: false,
    });

    return obj;
}

function prepareNewObject(instance, ownerID) {
    if (ownerID) {
        addOwnerID(instance, ownerID);
    }
    return instance;
}

function forceArray(arg) {
    if (!(arg instanceof Array)) {
        return [arg];
    }
    return arg;
}

const PATH_SEPARATOR = '.';

function normalizePath(pathArg) {
    if (typeof pathArg === 'string') {
        if (pathArg.indexOf(PATH_SEPARATOR) === -1) {
            return [pathArg];
        }
        return pathArg.split(PATH_SEPARATOR);
    }

    return pathArg;
}

function mutableSet(key, value, obj) {
    obj[key] = value;
    return obj;
}

function mutableSetIn(_pathArg, value, obj) {
    const originalPathArg = normalizePath(_pathArg);

    const pathLen = originalPathArg.length;

    let done = false;
    let idx = 0;
    let acc = obj;
    let curr = originalPathArg[idx];

    while (!done) {
        if (idx === pathLen - 1) {
            acc[curr] = value;
            done = true;
        } else {
            const currType = typeof acc[curr];

            if (currType === 'undefined') {
                const newObj = {};
                prepareNewObject(newObj, null);
                acc[curr] = newObj;
            } else if (currType !== 'object') {
                const pathRepr = `${originalPathArg[idx - 1]}.${curr}`;
                throw new Error(
                    `A non-object value was encountered when traversing setIn path at ${pathRepr}.`
                );
            }
            acc = acc[curr];
            idx++;
            curr = originalPathArg[idx];
        }
    }

    return obj;
}

function valueInPath(_pathArg, obj) {
    const pathArg = normalizePath(_pathArg);

    let acc = obj;
    for (let i = 0; i < pathArg.length; i++) {
        const curr = pathArg[i];
        const currRef = acc[curr];
        if (i === pathArg.length - 1) {
            return currRef;
        }

        if (typeof currRef === 'object') {
            acc = currRef;
        } else {
            return undefined;
        }
    }
    return undefined;
}

function immutableSetIn(ownerID, _pathArg, value, obj) {
    const pathArg = normalizePath(_pathArg);

    const currentValue = valueInPath(pathArg, obj);
    if (value === currentValue) return obj;

    const pathLen = pathArg.length;

    let acc;
    if (canMutate(obj, ownerID)) {
        acc = obj;
    } else {
        acc = Object.assign(prepareNewObject({}, ownerID), obj);
    }

    const rootObj = acc;

    pathArg.forEach((curr, idx) => {
        if (idx === pathLen - 1) {
            acc[curr] = value;
            return;
        }

        const currRef = acc[curr];
        const currType = typeof currRef;

        if (currType === 'object') {
            if (canMutate(currRef, ownerID)) {
                acc = currRef;
            } else {
                const newObj = prepareNewObject({}, ownerID);
                acc[curr] = Object.assign(newObj, currRef);
                acc = newObj;
            }
            return;
        }

        if (currType === 'undefined') {
            const newObj = prepareNewObject({}, ownerID);
            acc[curr] = newObj;
            acc = newObj;
            return;
        }

        const pathRepr = `${pathArg[idx - 1]}.${curr}`;
        throw new Error(`A non-object value was encountered when traversing setIn path at ${pathRepr}.`);
    });

    return rootObj;
}

function mutableMerge(isDeep, _mergeObjs, baseObj) {
    const mergeObjs = forceArray(_mergeObjs);

    if (isDeep) {
        mergeObjs.forEach(mergeObj => {
            forOwn(mergeObj, (value, key) => {
                if (isDeep && baseObj.hasOwnProperty(key)) {
                    let assignValue;
                    if (typeof value === 'object') {
                        assignValue = mutableMerge(isDeep, [value], baseObj[key]);
                    } else {
                        assignValue = value;
                    }

                    baseObj[key] = assignValue;
                } else {
                    baseObj[key] = value;
                }
            });
        });
    } else {
        Object.assign(baseObj, ...mergeObjs);
    }

    return baseObj;
}

const mutableShallowMerge = mutableMerge.bind(null, false);
const mutableDeepMerge = mutableMerge.bind(null, true);

function mutableOmit(_keys, obj) {
    const keys = forceArray(_keys);
    keys.forEach(key => {
        delete obj[key];
    });
    return obj;
}

function shouldMergeKey(obj, other, key) {
    return obj[key] !== other[key];
}

function immutableMerge(isDeep, ownerID, _mergeObjs, obj) {
    if (canMutate(obj, ownerID)) return mutableMerge(isDeep, _mergeObjs, obj);
    const mergeObjs = forceArray(_mergeObjs);

    let hasChanges = false;
    let nextObject = obj;

    const willChange = () => {
        if (!hasChanges) {
            hasChanges = true;
            nextObject = Object.assign({}, obj);
            prepareNewObject(nextObject, ownerID);
        }
    };

    mergeObjs.forEach(mergeObj => {
        forOwn(mergeObj, (mergeValue, key) => {
            if (isDeep && obj.hasOwnProperty(key)) {
                const currentValue = nextObject[key];
                if (typeof mergeValue === 'object' && !(mergeValue instanceof Array)) {
                    if (shouldMergeKey(nextObject, mergeObj, key)) {
                        const recursiveMergeResult = immutableMerge(
                            isDeep, ownerID, mergeValue, currentValue
                        );

                        if (recursiveMergeResult !== currentValue) {
                            willChange();
                            nextObject[key] = recursiveMergeResult;
                        }
                    }
                    return true; // continue forOwn
                }
            }
            if (shouldMergeKey(nextObject, mergeObj, key)) {
                willChange();
                nextObject[key] = mergeValue;
            }
            return undefined;
        });
    });

    return nextObject;
}

const immutableDeepMerge = immutableMerge.bind(null, true);
const immutableShallowMerge = immutableMerge.bind(null, false);

function immutableArrSet(ownerID, index, value, arr) {
    if (canMutate(arr, ownerID)) return mutableSet(index, value, arr);

    if (arr[index] === value) return arr;

    const newArr = fastArrayCopy(arr);
    newArr[index] = value;
    prepareNewObject(newArr, ownerID);

    return newArr;
}

function immutableSet(ownerID, key, value, obj) {
    if (isArrayLike(obj)) return immutableArrSet(ownerID, key, value, obj);
    if (canMutate(obj, ownerID)) return mutableSet(key, value, obj);

    if (obj[key] === value) return obj;

    const newObj = Object.assign({}, obj);
    prepareNewObject(newObj, ownerID);
    newObj[key] = value;
    return newObj;
}

function immutableOmit(ownerID, _keys, obj) {
    if (canMutate(obj, ownerID)) return mutableOmit(_keys, obj);

    const keys = forceArray(_keys);
    const keysInObj = keys.filter(key => obj.hasOwnProperty(key));

    // None of the keys were in the object, so we can return `obj`.
    if (keysInObj.length === 0) return obj;

    const newObj = Object.assign({}, obj);
    keysInObj.forEach(key => {
        delete newObj[key];
    });
    prepareNewObject(newObj, ownerID);
    return newObj;
}

function mutableArrPush(_vals, arr) {
    const vals = forceArray(_vals);
    arr.push(...vals);
    return arr;
}

function mutableArrFilter(func, arr) {
    let currIndex = 0;
    let originalIndex = 0;
    while (currIndex < arr.length) {
        const item = arr[currIndex];
        if (!func(item, originalIndex)) {
            arr.splice(currIndex, 1);
        } else {
            currIndex++;
        }
        originalIndex++;
    }

    return arr;
}

function mutableArrSplice(index, deleteCount, _vals, arr) {
    const vals = forceArray(_vals);
    arr.splice(index, deleteCount, ...vals);
    return arr;
}

function mutableArrInsert(index, _vals, arr) {
    return mutableArrSplice(index, 0, _vals, arr);
}

function immutableArrSplice(ownerID, index, deleteCount, _vals, arr) {
    if (canMutate(arr, ownerID)) return mutableArrSplice(index, deleteCount, _vals, arr);

    const vals = forceArray(_vals);
    const newArr = arr.slice();
    prepareNewObject(newArr, ownerID);
    newArr.splice(index, deleteCount, ...vals);

    return newArr;
}

function immutableArrInsert(ownerID, index, _vals, arr) {
    if (canMutate(arr, ownerID)) return mutableArrInsert(index, _vals, arr);
    return immutableArrSplice(ownerID, index, 0, _vals, arr);
}

function immutableArrPush(ownerID, vals, arr) {
    return immutableArrInsert(ownerID, arr.length, vals, arr);
}

function immutableArrFilter(ownerID, func, arr) {
    if (canMutate(arr, ownerID)) return mutableArrFilter(func, arr);
    const newArr = arr.filter(func);

    if (newArr.length === arr.length) return arr;

    prepareNewObject(newArr, ownerID);
    return newArr;
}

const immutableOperations = {
    // object operations
    merge: immutableShallowMerge,
    deepMerge: immutableDeepMerge,
    omit: immutableOmit,
    setIn: immutableSetIn,

    // array operations
    insert: immutableArrInsert,
    push: immutableArrPush,
    filter: immutableArrFilter,
    splice: immutableArrSplice,

    // both
    set: immutableSet,
};

const mutableOperations = {
    // object operations
    merge: mutableShallowMerge,
    deepMerge: mutableDeepMerge,
    omit: mutableOmit,
    setIn: mutableSetIn,

    // array operations
    insert: mutableArrInsert,
    push: mutableArrPush,
    filter: mutableArrFilter,
    splice: mutableArrSplice,

    // both
    set: mutableSet,
};

export function getImmutableOps() {
    const immutableOps = Object.assign({}, immutableOperations);
    forOwn(immutableOps, (value, key) => {
        immutableOps[key] = curry(value.bind(null, null));
    });

    const mutableOps = Object.assign({}, mutableOperations);
    forOwn(mutableOps, (value, key) => {
        mutableOps[key] = curry(value);
    });

    const batchOps = Object.assign({}, immutableOperations);
    forOwn(batchOps, (value, key) => {
        batchOps[key] = curry(value);
    });

    function batched(_token, _fn) {
        let token;
        let fn;

        if (typeof _token === 'function') {
            fn = _token;
            token = getBatchToken();
        } else {
            token = _token;
            fn = _fn;
        }

        const immutableOpsBoundToToken = Object.assign({}, immutableOperations);
        forOwn(immutableOpsBoundToToken, (value, key) => {
            immutableOpsBoundToToken[key] = curry(value.bind(null, token));
        });
        return fn(immutableOpsBoundToToken);
    }

    return Object.assign(immutableOps, {
        mutable: mutableOps,
        batch: batchOps,
        batched,
        __: placeholder,
        getBatchToken,
    });
}

export const ops = getImmutableOps();

export default ops;


text:
cygwin=false
case "`uname`" in
CYGWIN*) cygwin=true;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$OPENJMS_HOME" ] && OPENJMS_HOME=`cygpath --unix "$OPENJMS_HOME"`
  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --path --unix "$JSSE_HOME"`
fi

if [ -z "$JAVA_HOME" ]; then
  echo "The JAVA_HOME environment variable is not set."
  echo "This is required to run OpenJMS."
  exit 1
fi
if [ ! -r "$JAVA_HOME"/bin/java ]; then
  echo "The JAVA_HOME environment variable is not set correctly."
  echo "This is required to run OpenJMS."
  exit 1
fi
_RUNJAVA="$JAVA_HOME"/bin/java

# Guess OPENJMS_HOME if it is not set
if [ -z "$OPENJMS_HOME" ]; then
# resolve links - $0 may be a softlink
  PRG="$0"
  while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '.*/.*' > /dev/null; then
      PRG="$link"
    else
      PRG=`dirname "$PRG"`/"$link"
    fi
  done

  PRGDIR=`dirname "$PRG"`
  OPENJMS_HOME=`cd "$PRGDIR/.." ; pwd`
elif [ ! -r "$OPENJMS_HOME"/bin/dbtool.sh ]; then
  echo "The OPENJMS_HOME environment variable is not set correctly."
  echo "This is required to run OpenJMS."
  exit 1
fi

# Set CLASSPATH to empty by default. User jars can be added via the setenv.sh
# script
CLASSPATH=

if [ -r "$OPENJMS_HOME"/bin/setenv.sh ]; then
  . "$OPENJMS_HOME"/bin/setenv.sh
fi

# Add on extra jar files to CLASSPATH
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar
fi
CLASSPATH="$CLASSPATH":"$OPENJMS_HOME"/lib/openjms-tools-0.7.7-beta-1.jar

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
  JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  OPENJMS_HOME=`cygpath --path --windows "$OPENJMS_HOME"`
  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  JSSE_HOME=`cygpath --path --windows "$JSSE_HOME"`
fi

POLICY_FILE="$OPENJMS_HOME"/config/openjms.policy

# Execute the requested command

echo "Using OPENJMS_HOME: $OPENJMS_HOME"
echo "Using JAVA_HOME:    $JAVA_HOME"
echo "Using CLASSPATH:    $CLASSPATH"

exec "$_RUNJAVA" $JAVA_OPTS -Dopenjms.home="$OPENJMS_HOME" \
    -classpath "$CLASSPATH" \
    -Djava.security.manager -Djava.security.policy="$POLICY_FILE" \
    org.exolab.jms.tools.db.DBTool "$@"

fi


text:
<?php

// PHP classes corresponding to the data types in defined in WSDL

class FileLoad {

    /**
     * @var array[0, unbounded] of (object)base64Binary
     */
    public $fileList;

}

class base64Binary {

    /**
     * @var string
     *     NOTE: contentType should follow the following restrictions
     *     Your length of the value should be
     *     Greater than 3
     */
    public $contentType;

    /**
     * @var string
     *     NOTE: fileName should follow the following restrictions
     *     Your length of the value should be
     *     Greater than 3
     */
    public $fileName;

    // The "value" represents the element 'fileList' value..
    // You need to set only one from the following two vars

    /**
     * @var Plain Binary
     */
    public $value;

    /**
     * @var base64Binary
     */
    public $value_encoded;

}

class FileLoadResponse {

    /**
     * @var int
     */
    public $return;

}

// define the class map
$class_map = array(
    "FileLoad" => "FileLoad",
    "base64Binary" => "base64Binary",
    "FileLoadResponse" => "FileLoadResponse");

// define PHP functions that maps to WSDL operations
/**
 * Service function FileLoad
 * @param object of FileLoad $input
 * @return object of FileLoadResponse
 */
function FileLoad($input) {
    // TODO: fill in the business logic
    // NOTE: $input is of type FileLoad
    // NOTE: should return an object of type FileLoadResponse
    error_log(var_export($input,true));
    foreach ($input->fileList as $key => $base64BinaryValue) {
        $ret = 1;
        $filename = $base64BinaryValue->fileName;
        if (empty($base64BinaryValue->fileName))
            $filename = uniqid("tmpfile");
        if (!empty($base64BinaryValue->value)) {
            if (file_put_contents($filename, $base64BinaryValue->value) === false)
                $ret = 0;
        }
    }
    $response = new FileLoadResponse();
    $response->return = $ret;
    return $response;
}

// define the operations map
$operations = array(
    "FileLoad" => "FileLoad");

// define the actions => operations map
$actions = array(
    "urn:FileLoad" => "FileLoad");

//Find to right wsdl links
$hostnameIpPort = ($_SERVER["SERVER_PORT"] == 443 ? "https://" : "http://") . $_SERVER["HTTP_HOST"] . ($_SERVER["SERVER_PORT"] == 80 ? '' : ($_SERVER["SERVER_PORT"] == 443 ? '' : $_SERVER["SERVER_PORT"]));
$wdlUrl = $hostnameIpPort . pathinfo($_SERVER['REQUEST_URI'], PATHINFO_DIRNAME) . "/FileUploadWSDL.php";

// create service in WSDL mode
$service = new WSService(array("wsdl" => $wdlUrl,
    "actions" => $actions,
    "classmap" => $class_map,
    "operations" => $operations,
    "cacheWSDL" => true,
    "useMTOM" => true));

// process client requests and reply
$service->reply();
?>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Sydowia 10: 151 (1957)

#### Original name
Pileolaria domingensis Cif.

### Remarks
null


text:
package org.apache.excalibur.instrument.client;

public interface InstrumentData
    extends ElementData
{
    /** Type which specifies that the type of a Instrument has not yet been determined. */
    int INSTRUMENT_TYPE_NONE = 0;

    /** Type which identifies CounterInstruments. */
    int INSTRUMENT_TYPE_COUNTER = 1;

    /** Type which identifies ValueInstruments. */
    int INSTRUMENT_TYPE_VALUE   = 2;

    /**
     * Returns the registered flag of the remote object.
     *
     * @return The registered flag of the remote object.
     */
    boolean isRegistered();

    /**
     * Returns the type of the Instrument.  Possible values include
     *  InstrumentData.INSTRUMENT_TYPE_COUNTER,
     *  InstrumentData.INSTRUMENT_TYPE_VALUE or
     *  InstrumentData.INSTRUMENT_TYPE_NONE, if the type was never set.
     *
     * @return The type of the Instrument.
     */
    int getType();

    /**
     * Returns an array of the Instrument Samples assigned to the Instrument.
     *
     * @return An array of Instrument Samples.
     */
    InstrumentSampleData[] getInstrumentSamples();

    /**
     * Requests that a sample be created or that its lease be updated.
     *
     * @param description Description to assign to the new sample.
     * @param interval Sample interval of the new sample.
     * @param sampleCount Number of samples in the new sample.
     * @param leaseTime Requested lease time.  The server may not grant the full lease.
     * @param sampleType The type of sample to be created.
     *
     * @return True if successful.
     */
    boolean createInstrumentSample( String description,
                                    long interval,
                                    int sampleCount,
                                    long leaseTime,
                                    int sampleType );
}


text:
module.exports = function (context, req) {
    context.log('Node.js HTTP trigger function processed a request.');

    const res = {
        status: 200,
    };

    context.done(null, res);
};


text:
require 'sequel/core'

module Sequel
  # Delegate to Sequel::Model, only for backwards compatibility.
  def self.cache_anonymous_models
    Model.cache_anonymous_models
  end

  # Delegate to Sequel::Model, only for backwards compatibility.
  def self.cache_anonymous_models=(v)
    Model.cache_anonymous_models = v
  end

  # <tt>Sequel::Model</tt> is an object relational mapper built on top of Sequel core.  Each
  # model class is backed by a dataset instance, and many dataset methods can be
  # called directly on the class.  Model datasets return rows as model instances,
  # which have fairly standard ORM instance behavior.
  #
  # <tt>Sequel::Model</tt> is built completely out of plugins.  Plugins can override any class,
  # instance, or dataset method defined by a previous plugin and call super to get the default
  # behavior.  By default, <tt>Sequel::Model</tt> loads two plugins, <tt>Sequel::Model</tt>
  # (which is itself a plugin) for the base support, and <tt>Sequel::Model::Associations</tt>
  # for the associations support.
  #
  # You can set the +SEQUEL_NO_ASSOCIATIONS+ constant or environment variable to
  # make Sequel not load the associations plugin by default.
  class Model
    OPTS = Sequel::OPTS

    # Map that stores model classes created with <tt>Sequel::Model()</tt>, to allow the reopening
    # of classes when dealing with code reloading.
    ANONYMOUS_MODEL_CLASSES = @Model_cache = {}

    # Mutex protecting access to ANONYMOUS_MODEL_CLASSES
    ANONYMOUS_MODEL_CLASSES_MUTEX = @Model_mutex = Mutex.new

    # Class methods added to model that call the method of the same name on the dataset
    DATASET_METHODS = (Dataset::ACTION_METHODS + Dataset::QUERY_METHODS +
      [:each_server]) - [:and, :or, :[], :columns, :columns!, :delete, :update, :add_graph_aliases, :first, :first!]

    # Boolean settings that can be modified at the global, class, or instance level.
    BOOLEAN_SETTINGS = [:typecast_empty_string_to_nil, :typecast_on_assignment, :strict_param_setting, \
      :raise_on_save_failure, :raise_on_typecast_failure, :require_modification, :use_after_commit_rollback, :use_transactions]

    # Hooks that are called before an action.  Can return false to not do the action.  When
    # overriding these, it is recommended to call +super+ as the last line of your method,
    # so later hooks are called before earlier hooks.
    BEFORE_HOOKS = [:before_create, :before_update, :before_save, :before_destroy, :before_validation]

    # Hooks that are called after an action.  When overriding these, it is recommended to call
    # +super+ on the first line of your method, so later hooks are called after earlier hooks.
    AFTER_HOOKS = [:after_create, :after_update, :after_save, :after_destroy,
      :after_validation, :after_commit, :after_rollback, :after_destroy_commit, :after_destroy_rollback]

    # Hooks that are called around an action.  If overridden, these methods must call super
    # exactly once if the behavior they wrap is desired.  The can be used to rescue exceptions
    # raised by the code they wrap or ensure that some behavior is executed no matter what.
    AROUND_HOOKS = [:around_create, :around_update, :around_save, :around_destroy, :around_validation]

    # Empty instance methods to create that the user can override to get hook/callback behavior.
    # Just like any other method defined by Sequel, if you override one of these, you should
    # call +super+ to get the default behavior (while empty by default, they can also be defined
    # by plugins).  See the {"Model Hooks" guide}[rdoc-ref:doc/model_hooks.rdoc] for
    # more detail on hooks.
    HOOKS = BEFORE_HOOKS + AFTER_HOOKS

    # Class instance variables that are inherited in subclasses.  If the value is <tt>:dup</tt>, dup is called
    # on the superclass's instance variable when creating the instance variable in the subclass.
    # If the value is +nil+, the superclass's instance variable is used directly in the subclass.
    INHERITED_INSTANCE_VARIABLES = {:@allowed_columns=>:dup,
      :@dataset_method_modules=>:dup, :@primary_key=>nil, :@use_transactions=>nil,
      :@raise_on_save_failure=>nil, :@require_modification=>nil,
      :@restricted_columns=>:dup, :@restrict_primary_key=>nil,
      :@simple_pk=>nil, :@simple_table=>nil, :@strict_param_setting=>nil,
      :@typecast_empty_string_to_nil=>nil, :@typecast_on_assignment=>nil,
      :@raise_on_typecast_failure=>nil, :@plugins=>:dup, :@setter_methods=>nil,
      :@use_after_commit_rollback=>nil, :@fast_pk_lookup_sql=>nil,
      :@fast_instance_delete_sql=>nil, :@finders=>:dup, :@finder_loaders=>:dup,
      :@db=>nil, :@default_set_fields_options=>:dup, :@require_valid_table=>nil,
      :@cache_anonymous_models=>nil, :@Model_mutex=>nil}

    # Regular expression that determines if a method name is normal in the sense that
    # it could be used literally in ruby code without using send.  Used to
    # avoid problems when using eval with a string to define methods.
    NORMAL_METHOD_NAME_REGEXP = /\A[A-Za-z_][A-Za-z0-9_]*\z/

    # Regular expression that determines if the method is a valid setter name
    # (i.e. it ends with =).
    SETTER_METHOD_REGEXP = /=\z/

    @allowed_columns = nil
    @cache_anonymous_models = true
    @db = nil
    @db_schema = nil
    @dataset = nil
    @dataset_method_modules = []
    @default_eager_limit_strategy = true
    @default_set_fields_options = {}
    @finders = {}
    @finder_loaders = {}
    @overridable_methods_module = nil
    @fast_pk_lookup_sql = nil
    @fast_instance_delete_sql = nil
    @plugins = []
    @primary_key = :id
    @raise_on_save_failure = true
    @raise_on_typecast_failure = false
    @require_modification = nil
    @require_valid_table = false
    @restrict_primary_key = true
    @restricted_columns = nil
    @setter_methods = nil
    @simple_pk = nil
    @simple_table = nil
    @strict_param_setting = true
    @typecast_empty_string_to_nil = true
    @typecast_on_assignment = true
    @use_after_commit_rollback = nil
    @use_transactions = true

    Sequel.require %w"default_inflections inflections plugins dataset_module base exceptions errors", "model"
    if !defined?(::SEQUEL_NO_ASSOCIATIONS) && !ENV.has_key?('SEQUEL_NO_ASSOCIATIONS')
      Sequel.require 'associations', 'model'
      plugin Model::Associations
    end

    # The setter methods (methods ending with =) that are never allowed
    # to be called automatically via +set+/+update+/+new+/etc..
    RESTRICTED_SETTER_METHODS = instance_methods.map(&:to_s).grep(SETTER_METHOD_REGEXP)

    def_Model(::Sequel)
  end
end