text:
void MemStack::Increment(int amt){
	ASSERT(stackMem.count + amt < limit);
	stackMem.count += amt;
}

void MemStack::Decrement(int amt){
	ASSERT(stackMem.count >= amt);
	stackMem.count -= amt;
}

void MemStack::SetSize(int amt){
	ASSERT(0 <= amt && amt < limit);
	stackMem.count = amt;
}

BNVMReturnReason BNVM::Execute(const char* funcName) {
	return inst.Execute(funcName);
}

BNVMReturnReason BNVM::ExecuteInternal() {
	return inst.ExecuteInternal();
}

void BNVM::InitNewInst(BNVMInstance* newInst) {
	newInst->vm = this;
	newInst->pc = 0;
	newInst->globalVarSize = inst.globalVarSize;
	newInst->globalVarRegs = inst.globalVarRegs;
}

void BNVM::WriteByteCodeToMemStream(MemStream* stream) {
	const char BNVM[] = "BNVM";
	stream->WriteArray(BNVM, 4);
	stream->Write(BNVM_VERSION);
	stream->Write(inst.globalVarSize);

	stream->WriteStringMap(&inst.globalVarRegs);
	stream->WriteStringMap(&functionPointers);
	stream->WriteStringMap(&externFuncIndices);

	stream->Write(code.count);
	stream->WriteArray(code.data, code.count);
	stream->Write(~*(int*)BNVM);
}

void BNVM::WriteByteCodeToFile(const char* fileName) {
	MemStream stream;
	WriteByteCodeToMemStream(&stream);

	FILE* file = fopen(fileName, "wb");
	fwrite(stream.readHead, 1, stream.GetLength(), file);
	fclose(file);
}

void BNVM::ReadByteCodeFromMemStream(MemStream* stream){
	const char BNVM[] = "BNVM";

	int dataTag = stream->Read<int>();
	ASSERT(dataTag == *(int*)BNVM);

	int versionNum = stream->Read<int>();
	ASSERT(versionNum == BNVM_VERSION);

	inst.globalVarSize = stream->Read<int>();

	stream->ReadStringMap(&inst.globalVarRegs);
	stream->ReadStringMap(&functionPointers);
	stream->ReadStringMap(&externFuncIndices);

	int codeSize = stream->Read<int>();
	code.Clear();
	code.EnsureCapacity(codeSize);
	stream->ReadArray(code.data, codeSize);
	code.count = codeSize;

	int footer = stream->Read<int>();
	ASSERT(footer == ~*(int*)BNVM);
}

void BNVM::ReadByteCodeFromFile(const char* fileName) {
	MemStream stream;
	stream.ReadInFromFile(fileName);
	ReadByteCodeFromMemStream(&stream);
}

BNVMReturnReason BNVMInstance::Execute(const char* funcName) {
	varStack.Increment(globalVarSize);

	BNVMReturnReason reason = ExecuteInternalFunc(funcName);
	tempStack.stackMem.count = 0;

	return reason;
}

BNVMReturnReason BNVMInstance::ExecuteInternalFunc(const char* funcName) {
	int startPc = -1;
	bool wasFound = vm->functionPointers.LookUp(funcName, &startPc);

	ASSERT(wasFound && startPc >= 0 && startPc < vm->code.count);

	pc = startPc;

	callStack.Push<int>(vm->code.count);
	callStack.Push<int>(0);

	return ExecuteInternal();
}

BNVMReturnReason BNVMInstance::ExecuteInternal(){
	for(int i = pc; i < vm->code.count; i++){
		Instruction instr = (Instruction)vm->code.data[i];
		switch(instr){

		case I_INVALIDI: {
			ASSERT_WARN("%s: Found invalid instruction at index %d", __FUNCTION__, i);
		} break;

		case I_NOOP: {
			// Do nothing, it's a no-op
		} break;

		case I_ADDI:{
			int a = tempStack.Pop<int>();
			int b = tempStack.Pop<int>();
			tempStack.Push(a+b);
		} break;

		case I_MULTI:{
			int a = tempStack.Pop<int>();
			int b = tempStack.Pop<int>();
			tempStack.Push(a*b);
		} break;

		case I_DIVI:{
			int a = tempStack.Pop<int>();
			int b = tempStack.Pop<int>();
			tempStack.Push(a/b);
		} break;

		case I_SUBI:{
			int a = tempStack.Pop<int>();
			int b = tempStack.Pop<int>();
			tempStack.Push(a-b);
		} break;

		case I_NEGATEI:{

		} break;

		case I_ADDF:{
			float a = tempStack.Pop<float>();
			float b = tempStack.Pop<float>();
			tempStack.Push(a + b);
		} break;

		case I_MULTF:{
			float a = tempStack.Pop<float>();
			float b = tempStack.Pop<float>();
			tempStack.Push(a * b);
		} break;

		case I_DIVF:{
			float a = tempStack.Pop<float>();
			float b = tempStack.Pop<float>();
			tempStack.Push(a / b);
		} break;

		case I_SUBF:{
			float a = tempStack.Pop<float>();
			float b = tempStack.Pop<float>();
			tempStack.Push(a - b);
		} break;

		case I_NEGATEF:{

		} break;

		case I_BRANCH:{
			int branchto = tempStack.Pop<int>();
			i = branchto - 1;
		} break;

		case I_BRANCHIFZERO:{
			int branchto = tempStack.Pop<int>();
			int check = tempStack.Pop<int>();
			if (!check) {
				i = branchto - 1;
			}
		} break;

		case I_BRANCHIFNOTZERO: {
			int branchto = tempStack.Pop<int>();
			int check = tempStack.Pop<int>();
			if (check) {
				i = branchto - 1;
			}
		} break;

		case I_CALL:{
			int stkFrameOffset = tempStack.Pop<int>();
			int jumpTo = tempStack.Pop<int>();

			callStack.Push<int>(i);
			callStack.Push<int>(varStack.stackMem.count);

			varStack.Increment(stkFrameOffset);
			i = jumpTo - 1;
		} break;

		case I_RETURN:{
			int oldStkFrame = callStack.Pop<int>();
			int returnAddr = callStack.Pop<int>();

			varStack.stackMem.count = oldStkFrame;
			i = returnAddr;
		} break;

		case I_PRINTI:{
			int val = tempStack.Pop<int>();
			printf("%d\n", val);
		} break;

		case I_READI:{
			int val = -1;
			int retVal = scanf("%64d", &val);
			// TODO: Some sort of error checking on return value?
			// Now it's just to stop the warning.
			BNS_UNUSED(retVal);
			tempStack.Push(val);
		} break;

		case I_PRINTF:{
			float val = tempStack.Pop<float>();
			printf("%f\n", val);
		} break;

		case I_READF:{
			float val = -1.2f;
			int retVal = scanf("%64f", &val);
			BNS_UNUSED(retVal);
			tempStack.Push(val);
		} break;

		case I_LOADI:{
			int reg = tempStack.Pop<int>();
			int val = *varStack.Access<int>(reg);
			tempStack.Push(val);
		} break;

		case I_STOREI:{
			int reg = tempStack.Pop<int>();
			int val = tempStack.Pop<int>();
			*varStack.Access<int>(reg) = val;
		} break;

		case I_INTLIT:{
			int a = vm->code.data[i+1];
			int b = vm->code.data[i+2];
			int c = vm->code.data[i+3];
			int d = vm->code.data[i+4];

			int val = (a << 24) | (b << 16) | (c << 8) | d;

			tempStack.Push(val);

			i += 4;
		} break;

		case I_FLTLIT:{
			float val = *(float*)&vm->code.data[i + 1];
			tempStack.Push(val);
			i += 4;
		} break;

		case I_EQI: {
			tempStack.Push<int>(tempStack.Pop<int>() == tempStack.Pop<int>());
		} break;

		case I_EQF: {
			tempStack.Push<int>(tempStack.Pop<float>() == tempStack.Pop<float>());
		} break;

		case I_NEQI: {
			tempStack.Push<int>(tempStack.Pop<int>() != tempStack.Pop<int>());
		} break;

		case I_NEQF: {
			tempStack.Push<int>(tempStack.Pop<float>() != tempStack.Pop<float>());
		} break;

		case I_GTI: {
			tempStack.Push<int>(tempStack.Pop<int>() > tempStack.Pop<int>());
		} break;

		case I_GTF: {
			tempStack.Push<int>(tempStack.Pop<float>() > tempStack.Pop<float>());
		} break;

		case I_GTEI: {
			tempStack.Push<int>(tempStack.Pop<int>() >= tempStack.Pop<int>());
		} break;

		case I_GTEF: {
			tempStack.Push<int>(tempStack.Pop<float>() >= tempStack.Pop<float>());
		} break;

		case I_LTI: {
			tempStack.Push<int>(tempStack.Pop<int>() < tempStack.Pop<int>());
		} break;

		case I_LTF: {
			tempStack.Push<int>(tempStack.Pop<float>() < tempStack.Pop<float>());
		} break;

		case I_LTEI: {
			tempStack.Push<int>(tempStack.Pop<int>() <= tempStack.Pop<int>());
		} break;

		case I_LTEF: {
			tempStack.Push<int>(tempStack.Pop<float>() <= tempStack.Pop<float>());
		} break;

		case I_ITOF: {
			int val = tempStack.Pop<int>();
			tempStack.Push<float>(static_cast<float>(val));
		} break;

		case I_EXTERNF: {
			int val = tempStack.Pop<int>();
			ASSERT(val >= 0);
			ASSERT(val < vm->externFunctions.count);
			ASSERT(vm->externFunctions.data[val] != nullptr);

			vm->externFunctions.data[val](&tempStack);
		} break;

		case I_LOADG: {
			int reg = tempStack.Pop<int>();
			int val = *(int*)&varStack.stackMem.data[reg];
			tempStack.Push(val);
		} break;

		case I_STOREG: {
			int reg = tempStack.Pop<int>();
			int val = tempStack.Pop<int>();
			*(int*)&varStack.stackMem.data[reg] = val;
		} break;

		case I_LINE: {
			int fileLinePair = *(int*)&vm->code.data[i + 1];
			currentFileLine = fileLinePair;
			i += 4;

			switch (debugState) {
				case DS_Continue: {
					// Do nothing
				} break;

				case DS_StepNext: {
					pc = i;
					return RR_Break;
				}

			}

		} break;

		case I_PRINTS: {
			int strOffset = tempStack.Pop<int>();
			printf("%s", (const char*)&vm->code.data[strOffset]);
		} break;

		case I_STRINGLIT: {
			int a = vm->code.data[i + 1];
			int b = vm->code.data[i + 2];
			int c = vm->code.data[i + 3];
			int d = vm->code.data[i + 4];

			int strOffset = (a << 24) | (b << 16) | (c << 8) | d;
			tempStack.Push<int>(strOffset);
			i += 4;
		} break;

		case I_INTERNSTRTOEXTERN: {
			int strOffset = tempStack.Pop<int>();
			char* externStr = (char*)&vm->code.data[strOffset];
			tempStack.Push<char*>(externStr);
		} break;

		}
	}

	return RR_Done;
}

void BNVM::RegisterExternFunc(const char* name, ExternFunc* func){
	int index = -1;
	bool exists = externFuncIndices.LookUp(name, &index);
	ASSERT_MSG(exists, "External function '%s' is being registered without being declared.", name);
	externFunctions.EnsureCapacity(index + 1);
	externFunctions.count = BNS_MAX(externFunctions.count, index + 1);
	externFunctions.data[index] = func;
}

#if defined(BNVM_TEST_MAIN)

CREATE_TEST_CASE("BNVM basic byte code") {
	BNVM vm;

	vm.functionPointers.Insert("main", 0);

	vm.code.PushBack(I_INTLIT);
	vm.code.PushBack(0);
	vm.code.PushBack(0);
	vm.code.PushBack(0);
	vm.code.PushBack(7);
	vm.code.PushBack(I_INTLIT);
	vm.code.PushBack(0);
	vm.code.PushBack(0);
	vm.code.PushBack(0);
	vm.code.PushBack(5);
	vm.code.PushBack(I_MULTI);

	vm.ExecuteInternalFunc("main");

	ASSERT(vm.inst.tempStack.Pop<int>() == 35);

	return 0;
}

#endif


text:
import testUsers from '@ciscospark/test-helper-test-users';

const noStreamText = '{\n  "local": null,\n  "remote": null\n}';

describe('samples/browser-single-party-call-with-mute', () => {
  describe('normal dialing', () => {
    let mccoy, spock;

    const browserSpock = browser.select('browserSpock');
    const browserMccoy = browser.select('browserMccoy');

    before('create test users', () => testUsers.create({count: 2})
      .then((users) => {
        [spock, mccoy] = users;
      }));

    before('reload browser', () => {
      browser.select('browserSpock').reload();
      browser.select('browserMccoy').reload();
    });

    it('loads the app', () => {
      browser.url('/browser-single-party-call-with-mute');
    });

    it('connects mccoy\'s browser', () => {
      browserMccoy.assertTitle('Sample: Local Mute/Unmute');
      browserMccoy.setValueInDOM('[placeholder="Your access token"]', mccoy.token.access_token);
      browserMccoy.assertValue('[placeholder="Your access token"]', mccoy.token.access_token);
      browserMccoy.click('[title="connect"]');
      browserMccoy.waitForExist('.listening');
    });

    it('connects spock\'s browser', () => {
      browserSpock.assertTitle('Sample: Local Mute/Unmute');
      browserSpock.setValueInDOM('[placeholder="Your access token"]', spock.token.access_token);
      browserSpock.assertValue('[placeholder="Your access token"]', spock.token.access_token);
      browserSpock.click('[title="connect"]');
      browserSpock.waitForExist('.listening');
    });

    it('places call from spock to mccoy', () => {
      browserSpock.setValue('[placeholder="Person ID or Email Address or SIP URI or Room ID"]', mccoy.emailAddress);
      browserSpock.click('[title="dial"]');

      browserMccoy.acceptAlert(20000);
    });

    it('turns the local camera off', () => {
      browserSpock.assertNotText('#outgoing-video-stats', noStreamText);
      browserSpock.click('[title="stop sending video"]');
      browserSpock.waitForSpecificText('#outgoing-video-stats', noStreamText);
    });

    it('turns the local camera back on', () => {
      browserSpock.assertText('#outgoing-video-stats', noStreamText);
      browserSpock.click('[title="start sending video"]');
      browserSpock.waitForSpecificText('#outgoing-video-stats', noStreamText, true);
    });

    it('ends the call', () => {
      browser.pause(5000);
      // TODO add assertions around streams

      browserSpock.click('[title="hangup"]');
    });
  });
});

redpajama_set_name: RedPajamaGithub


text:
var gulp = require('gulp');
var del = require('del');
var Spawner = require('./tasks/spawner');
var runSequence = require('run-sequence');

var buildWeb = require('./tasks/buildWeb');
var buildServer = require('./tasks/buildServer');

var spawner = Spawner();

var spawn = (cmd, params) => spawner.spawn(cmd, params, {
    stdio:'inherit',
    cwd: __dirname
});

buildWeb(gulp, spawn);
buildServer(gulp, spawn);

gulp.task('start', function () {
    runSequence('stop', 'clean', 'build', ['server', 'test', 'web']);
});

gulp.task('stop', () => spawner.killAll());

gulp.task('lint', () => spawn('npm', ['run', 'lint']));

gulp.task('test', () => spawn('mocha', ['test/lib/**/*.js']));

gulp.task('cover', () => spawn('npm', ['test']));

gulp.task('clean', () => del(['lib/**/*', 'test/lib/**/*', 'www/dist/**/*']));

//
gulp.task('default', ['start']);

// watch
gulp.watch(['src/**/*.js', 'test/src/**/*.js', 'config/**/*.js', 'www/src/**/*'], ['start']);


text:
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<title>Herramientas ARASAAC: Creador de Frases</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />

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

<link rel="stylesheet" href="../js/autosuggest/css/autosuggest_inquisitor.css" type="text/css" media="screen" charset="utf-8" />

<link rel="STYLESHEET" type="text/css" href="../js/dhtmlxMenu/css/dhtmlXMenu.css">

<form action="creador_frases_2.php" method="post" name="seleccion_simbolos" id="seleccion_simbolos">

CREADOR DE FRASES v 0.1: PASO 1

          Escoge las palabras que forman tu frase. En caso de que la palabra no esté en el diccionario o que se desee añadir la palabra en modo texto (sin pictograma) pulsa en el signo más. Los verbos deben buscarse en infinitivo. En el siguiente paso, será posible conjugar el verbo.

          <input type="text" name="s" id="s" size="95" style="font-size:14px;"/>
            <input type="hidden" id="id_palabra" />

        Borrar palabras de la frase

Frase

Ordenar Selección |
Dejar de Ordenar

<input name="mi_seleccion" type="hidden" id="mi_seleccion"/>

          Para configurar mi frase deseo utilizar:

            Pictogramas de Color
            <input name="pictcolor" type="checkbox" id="pictcolor" value="1" checked="checked" />
            Pictogramas de Blanco y Negro
            <input name="pictnegro" type="checkbox" id="pictnegro" value="1" checked="checked" />
            Imágenes
            <input name="imagenes" type="checkbox" id="imagenes" value="1" checked="checked" />

Antes de ir al paso 2 ordene la frase tal y como desee

              <input name="guardar" type="submit" id="guardar" value="IR AL PASO 2" style="font-size:24px;" />

</form>


text:
@interface PodsDummy_EGTracker : NSObject
@end
@implementation PodsDummy_EGTracker
@end


text:
<?php

declare(strict_types=1);

namespace spec\Sylius\Bundle\UiBundle\Renderer;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Sylius\Bundle\UiBundle\Registry\TemplateBlock;
use Sylius\Bundle\UiBundle\Registry\TemplateBlockRegistryInterface;
use Sylius\Bundle\UiBundle\Renderer\TemplateEventRendererInterface;

final class HtmlDebugTemplateEventRendererSpec extends ObjectBehavior
{
    function let(TemplateEventRendererInterface $templateEventRenderer, TemplateBlockRegistryInterface $templateBlockRegistry): void
    {
        $this->beConstructedWith($templateEventRenderer, $templateBlockRegistry);
    }

    function it_is_a_template_event_renderer(): void
    {
        $this->shouldImplement(TemplateEventRendererInterface::class);
    }

    function it_renders_html_debug_comment_if_at_least_one_template_is_a_html_one(
        TemplateEventRendererInterface $templateEventRenderer,
        TemplateBlockRegistryInterface $templateBlockRegistry,
    ): void {
        $firstTemplateBlock = new TemplateBlock('first_block', 'event_block', 'firstBlock.txt.twig', [], 0, true);
        $secondTemplateBlock = new TemplateBlock('second_block', 'event_block', 'secondBlock.html.twig', [], 0, true);

        $templateBlockRegistry->findEnabledForEvents(['best_event_ever'])->willReturn([$firstTemplateBlock, $secondTemplateBlock]);

        $templateEventRenderer->render(['best_event_ever'], ['foo' => 'bar'])->willReturn("First block\nSecond block");

        $this->render(['best_event_ever'], ['foo' => 'bar'])->shouldReturn(
            '<!-- BEGIN EVENT | event name: "best_event_ever" -->' . "\n" .
            'First block' . "\n" .
            'Second block' . "\n" .
            '<!-- END EVENT | event name: "best_event_ever" -->',
        );
    }

    function it_does_not_render_html_debug_comment_if_no_html_templates_are_found(
        TemplateEventRendererInterface $templateEventRenderer,
        TemplateBlockRegistryInterface $templateBlockRegistry,
    ): void {
        $firstTemplateBlock = new TemplateBlock('first_block', 'event_block', 'firstBlock.txt.twig', [], 0, true);
        $secondTemplateBlock = new TemplateBlock('second_block', 'event_block', 'secondBlock.txt.twig', [], 0, true);

        $templateBlockRegistry->findEnabledForEvents(['best_event_ever'])->willReturn([$firstTemplateBlock, $secondTemplateBlock]);

        $templateEventRenderer->render(['best_event_ever'], ['foo' => 'bar'])->willReturn("First block\nSecond block");

        $this->render(['best_event_ever'], ['foo' => 'bar'])->shouldReturn("First block\nSecond block");
    }

    function it_returns_html_debug_comment_if_no_blocks_are_found_for_an_event(
        TemplateEventRendererInterface $templateEventRenderer,
        TemplateBlockRegistryInterface $templateBlockRegistry,
    ): void {
        $templateBlockRegistry->findEnabledForEvents(['best_event_ever'])->willReturn([]);

        $templateEventRenderer->render(Argument::cetera())->willReturn('');

        $this->render(['best_event_ever'])->shouldReturn(
            '<!-- BEGIN EVENT | event name: "best_event_ever" -->' . "\n" .
            "\n" .
            '<!-- END EVENT | event name: "best_event_ever" -->',
        );
    }
}


text:
module SageoneSdk
  class Client

    # Represents types of sale in Sage One. These are the categories
    # a user can make sales against.
    module IncomeTypes

      # @return [object] Returns all sales types.
      def income_types(options = {})
        get "income_types", options
      end

      # @return [object] Returns the sales type with the given id.
      def income_type(id, options = {})
        get "income_types/#{id}", options
      end
    end
  end
end


text:
import AbilityContext = require('../AbilityContext');
import DrawCard = require('../drawcard');
import { CardGameAction, CardActionProperties } from './CardGameAction';
import { Locations, CardTypes, EventNames }  from '../Constants';

export interface DetachActionProperties extends CardActionProperties {
}

export class DetachAction extends CardGameAction {
    name = 'detach';
    eventName = EventNames.OnCardDetached;
    targetType = [CardTypes.Attachment];

    getEffectMessage(context: AbilityContext): [string, any[]] {
        let target = this.getProperties(context).target as any;
        return ['detach {1} from {0}', [target, target.parent]];
    }

    canAffect(card: DrawCard, context: AbilityContext, additionalProperties = {}): boolean {
        return card && card.location === Locations.PlayArea && card.parent && super.canAffect(card, context, additionalProperties);
    }

    eventHandler(event): void {
        event.card.parent.removeAttachment(event.card);
        event.card.controller.cardsInPlay.push(event.card);
    }
}


text:
"""Create, delete or list stanza information from/to Splunk confs."""

import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))

from splunklib.client import connect

try:
    from utils import error, parse
except ImportError:
    raise Exception("Add the SDK repository to your PYTHONPATH to run the examples "
                    "(e.g., export PYTHONPATH=~/splunk-sdk-python.")

class Program:
    """Break up operations into specific methods."""
    def __init__(self, service):
        self.service = service

    def create(self, opts):
        """Create a conf stanza."""

        argv = opts.args
        count = len(argv)

        # unflagged arguments are conf, stanza, key. In this order
        # however, we must have a conf and stanza.
        cpres = True if count > 0 else False
        spres = True if count > 1 else False
        kpres = True if count > 2 else False

        if kpres:
            kvpair = argv[2].split("=")
            if len(kvpair) != 2:
                error("Creating a k/v pair requires key and value", 2)
            else:
                key, value = kvpair

        if not cpres and not spres:
            error("Conf name and stanza name is required for create", 2)

        name = argv[0]
        stan = argv[1]
        conf = self.service.confs[name]

        if not kpres:
            # create stanza
            conf.create(stan)
            return

        # create key/value pair under existing stanza
        stanza = conf[stan]
        stanza.submit({key: value})

    def delete(self, opts):
        """Delete a conf stanza."""

        argv = opts.args
        count = len(argv)

        # unflagged arguments are conf, stanza, key. In this order
        # however, we must have a conf and stanza.
        cpres = True if count > 0 else False
        spres = True if count > 1 else False
        kpres = True if count > 2 else False

        if not cpres:
            error("Conf name is required for delete", 2)

        if not cpres and not spres:
            error("Conf name and stanza name is required for delete", 2)

        if kpres:
            error("Cannot delete individual keys from a stanza", 2)

        name = argv[0]
        stan = argv[1]
        conf = self.service.confs[name]
        conf.delete(stan)

    def list(self, opts):
        """List all confs or if a conf is given, all the stanzas in it."""

        argv = opts.args
        count = len(argv)

        # unflagged arguments are conf, stanza, key. In this order
        # but all are optional
        cpres = True if count > 0 else False
        spres = True if count > 1 else False
        kpres = True if count > 2 else False

        if not cpres:
            # List out the available confs
            for conf in self.service.confs:
                print conf.name
        else:
            # Print out detail on the requested conf
            # check for optional stanza, or key requested (or all)
            name = argv[0]
            conf = self.service.confs[name]

            for stanza in conf:
                if (spres and argv[1] == stanza.name) or not spres:
                    print "[%s]" % stanza.name
                    for key, value in stanza.content.iteritems():
                        if (kpres and argv[2] == key) or not kpres:
                            print "%s = %s" % (key, value)
                print

    def run(self, command, opts):
        """Dispatch the given command & args."""
        handlers = {
            'create': self.create,
            'delete': self.delete,
            'list': self.list
        }
        handler = handlers.get(command, None)
        if handler is None:
            error("Unrecognized command: %s" % command, 2)
        handler(opts)

def main():
    """Main program."""

    usage = "usage: %prog [options] <command> [<args>]"

    argv = sys.argv[1:]

    command = None
    commands = ['create', 'delete', 'list']

    # parse args, connect and setup
    opts = parse(argv, {}, ".splunkrc", usage=usage)
    service = connect(**opts.kwargs)
    program = Program(service)

    if len(opts.args) == 0:
        # no args means list
        command = "list"
    elif opts.args[0] in commands:
        # args and the first in our list of commands, extract
        # command and remove from regular args
        command = opts.args[0]
        opts.args.remove(command)
    else:
        # first one not in our list, default to list
        command = "list"

    program.run(command, opts)

if __name__ == "__main__":
    main()


text:
package com.example.android.sunshine.app.data;

import android.content.UriMatcher;
import android.net.Uri;
import android.test.AndroidTestCase;

/**
 * Created by evast on 29-5-2017.
 */
@SuppressWarnings("deprecation")
public class TestUriMatcher extends AndroidTestCase{
    private static final String LOCATION_QUERY = "London, UK";
    private static final long TEST_DATE = 1419033600L;
    private static final long TEST_LOCATION_ID = 10L;

    private static final Uri TEST_WEATHER_DIR  = WeatherContract.WeatherEntry.CONTENT_URI;
    private static final Uri TEST_WEATHER_WITH_LOCATION_DIR = WeatherContract.WeatherEntry.buildWeatherLocation(LOCATION_QUERY);
    private static final Uri TEST_WEATHER_WITH_LOCATION_AND_DATE_DIR = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(LOCATION_QUERY, TEST_DATE);
    private static final Uri TEST_LOCATION_DIR = WeatherContract.LocationEntry.CONTENT_URI;

    public void testUriMatcher(){
        UriMatcher testMatcher = WeatherProvider.buildUriMatcher();

        assertEquals("Error: The WEATHER URI was matched incorrectly.",
                testMatcher.match(TEST_WEATHER_DIR), WeatherProvider.WEATHER);
        assertEquals("Error: The WEATHER WITH LOCATION URI was matched incorrectly.",
                testMatcher.match(TEST_WEATHER_WITH_LOCATION_DIR), WeatherProvider.WEATHER_WITH_LOCATION);
        assertEquals("Error: The WEATHER WITH LOCATION AND DATE URI was matched incorrectly.",
                testMatcher.match(TEST_WEATHER_WITH_LOCATION_AND_DATE_DIR), WeatherProvider.WEATHER_WITH_LOCATION_AND_DATE);
        assertEquals("Error: The LOCATION URI was matched incorrectly.",
                testMatcher.match(TEST_LOCATION_DIR), WeatherProvider.LOCATION);
    }
}


text:
'''
Import related tests:

- Test how 'import ...' and 'from ... import ...' invoke the
  '__import__' function.
- Test the module name resolution of the '__import__'-function.

The reference is C-python.
'''
import unittest
import exceptions
import imp
import __builtin__
import sys
import types

origImport = __import__

class TestImportStatementError(exceptions.ImportError):
    def __init__(self, args):
        names = ['name', 'globals', 'locals', 'fromlist', 'level']
        self.len = len(args)
        for a in args:
            n = names.pop(0)
            setattr(self, n, a)
        for n in names:
            setattr(self, n, None)

class TestImportStatement(unittest.TestCase):
    """Test the 'import' and 'from ... import' statements

    This class tests, how the compiler calls the
    '__import__'-function for various forms of the
    'import' and 'from ... import' statements.
    """

    AI = "from __future__ import absolute_import ;"

    def importFunction(*args):
        if args[0] == '__future__':
            return origImport(*args)
        raise TestImportStatementError(args)
    importFunction = staticmethod(importFunction)

    def setUp(self):
        __builtin__.__import__ = self.importFunction

    def tearDown(self):
        __builtin__.__import__ = origImport

    def runImport(self, statement):
        l = {}
        g = {}
        try:
            exec statement in g, l
        except TestImportStatementError,e:
            self.assert_(e.globals is g, "globals is changed")
            self.assert_(e.locals is l, "locals is changed")
            return e
        self.fail("Expected a TestImportStatementError")

    def testFromDotsOnly(self):
        dots = ''
        for i in range(1,10):
            dots += '.'
            a = self.runImport("from %s import (A,B)" % (dots,))
            self.assertEqual(a.len, 5)
            self.assertEqual(a.name, "")
            self.assertEqual(a.level, i)
            self.assertEqual(a.fromlist, ('A', 'B'))

    def testFromDotsOnlyAs(self):
        dots = ''
        for i in range(1,10):
            dots += '.'
            a = self.runImport("from %s import A as B" % (dots,))
            self.assertEqual(a.len, 5)
            self.assertEqual(a.name, "")
            self.assertEqual(a.fromlist, ('A',))
            self.assertEqual(a.level, i)

    def testFromDotsAndName(self):
        dots = ''
        for i in range(1,10):
            dots += '.'
            a = self.runImport("from %sX import A" % (dots,))
            self.assertEqual(a.len, 5)
            self.assertEqual(a.name, "X")
            self.assertEqual(a.fromlist, ('A',))
            self.assertEqual(a.level, i)

    def testFromDotsAndDotedName(self):
        dots = ''
        for i in range(1,10):
            dots += '.'
            a = self.runImport("from %sX.Y import A" % (dots,))
            self.assertEqual(a.len, 5)
            self.assertEqual(a.name, "X.Y")
            self.assertEqual(a.fromlist, ('A',))
            self.assertEqual(a.level, i)

    def testAbsoluteFromDotedNameAs(self):
        a = self.runImport(self.AI + "from X.Y import A as B")
        self.assertEqual(a.len, 5)
        self.assertEqual(a.name, "X.Y")
        self.assertEqual(a.fromlist, ('A',))
        self.assertEqual(a.level, 0)

    def testRelativeOrAbsoluteFromDotedNameAs(self):
        a = self.runImport("from X.Y import A as B")
        self.assertEqual(a.name, "X.Y")
        self.assertEqual(a.fromlist, ('A',))
        self.assertEqual(a.len, 4)

    def testAbsoluteFromDotedNameAll(self):
        a = self.runImport(self.AI + "from X.Y import *")
        self.assertEqual(a.len, 5)
        self.assertEqual(a.name, "X.Y")
        self.assertEqual(a.fromlist, ('*',))
        self.assertEqual(a.level, 0)

    def testRelativeOrAbsoluteFromDotedNameAll(self):
        a = self.runImport("from X.Y import *")
        self.assertEqual(a.name, "X.Y")
        self.assertEqual(a.fromlist, ('*',))
        self.assertEqual(a.len, 4)

    def testAbsoluteImportName(self):
        a = self.runImport(self.AI + "import X")
        self.assertEqual(a.len, 5)
        self.assertEqual(a.name, "X")
        self.assertEqual(a.fromlist, None)
        self.assertEqual(a.level, 0)

    def testAbsoluteImportDotedName(self):
        a = self.runImport(self.AI + "import X.Y")
        self.assertEqual(a.len, 5)
        self.assertEqual(a.name, "X.Y")
        self.assertEqual(a.fromlist, None)
        self.assertEqual(a.level, 0)

    def testRelativeOrAbsoluteImportName(self):
        a = self.runImport("import X")
        self.assertEqual(a.name, "X")
        self.assertEqual(a.fromlist, None)
        self.assertEqual(a.len, 4)

    def testRelativeOrAbsoluteImportDotedName(self):
        a = self.runImport("import X.Y")
        self.assertEqual(a.name, "X.Y")
        self.assertEqual(a.fromlist, None)
        self.assertEqual(a.len, 4)

    def testAbsoluteImportDotedNameAs(self):
        a = self.runImport(self.AI + "import X.Y as Z")
        self.assertEqual(a.len, 5)
        self.assertEqual(a.name, "X.Y")
        self.assertEqual(a.fromlist, None)
        self.assertEqual(a.level, 0)

class TestImportFunctionError(exceptions.ImportError):
    pass

class TestImportFunction(unittest.TestCase):
    """Test the '__import__' function

    This class tests, how the '__import__'-function
    resolves module names. It uses the 'meta_path' hook,
    to intercept the actual module loading.

    Module Structure:

        Top
          \---- X           package
          |     \-- Y       package
          |     |   \-- Z1  module
          |     |   \-- Z2  module
          |     \-- Y2      package
          \---- X2          module

    """

    nameX = "TestImportFunctionX"

    def setUp(self):
        self.modX = imp.new_module(self.nameX)
        self.modX.__path__ = ['X']

        self.modX2 = imp.new_module(self.nameX+"2")
        self.modY = imp.new_module(self.nameX+".Y")
        self.modY.__path__ = ['X/Y']
        self.modY2 = imp.new_module(self.nameX+".Y2")
        self.modY2.__path__ = ['X/Y']
        self.modZ1 = imp.new_module(self.nameX+".Y.Z1")
        self.modZ2 = imp.new_module(self.nameX+".Y.Z2")

        self.expected = "something_completely_different"
        sys.meta_path.insert(0, self)

    def tearDown(self):
        try:
            sys.meta_path.remove(self)
        except ValueError:
            pass
        for k in sys.modules.keys():
            if k.startswith(self.nameX):
                del sys.modules[k]

    def importX(self):
        sys.modules[self.modX.__name__] = self.modX
    def importX2(self):
        sys.modules[self.modX2.__name__] = self.modX2
    def importY(self):
        self.importX()
        sys.modules[self.modY.__name__] = self.modY
        self.modX.Y = self.modY
    def importY2(self):
        self.importX()
        sys.modules[self.modY2.__name__] = self.modY2
        self.modX.Y2 = self.modY2
    def importZ1(self):
        self.importY()
        sys.modules[self.modZ1.__name__] = self.modZ1
        self.modY.Z1 = self.modZ1
    def top(self):
        if sys.modules.has_key("__main__"):
            return sys.modules["__main__"].__dict__
        return globals()

    def find_module(self, fullname, path=None):
        if self.expected and self.expected != fullname:
            return None
        self.fullname = fullname
        self.path = path
        return self

    def load_module(self, fullname):
        self.assertEqual(fullname, self.fullname)
        raise TestImportFunctionError()

    def runImport(self, expected, name, globals, fromlist=None, level=None):
        self.expected = expected
        if isinstance(globals, types.ModuleType):
            globals = globals.__dict__
        try:
            if level is not None:
                __import__(name, globals, None, fromlist, level)
            else:
                __import__(name, globals, None, fromlist)
        except TestImportFunctionError:
            return
        self.fail("Expected a TestImportFunctionError")

    def testRelativeOrAbsolute_top_X2_1(self):
        self.runImport(None, self.modX2.__name__, self.top())
        self.assertEqual(self.fullname, self.modX2.__name__)
        self.assertEqual(self.path, None)

    def testRelativeOrAbsolute_top_X2_2(self):
        self.runImport(None, self.modX2.__name__, self.top(), None, -1)
        self.assertEqual(self.fullname, self.modX2.__name__)
        self.assertEqual(self.path, None)

    def testRelativeOrAbsolute_top_Y_1(self):
        self.importX()
        self.runImport(None, self.modY.__name__, self.top())
        self.assertEqual(self.fullname, self.modY.__name__)
        self.assertEqual(self.path, ['X'])

    def testRelativeOrAbsolute_top_Y_2(self):
        self.importX()
        self.runImport(None, self.modY.__name__, self.top(), None, -1)
        self.assertEqual(self.fullname, self.modY.__name__)
        self.assertEqual(self.path, ['X'])

    def testAbsolute_top_X2(self):
        self.runImport(None, self.modX2.__name__, globals(), None, 0)
        self.assertEqual(self.fullname, self.modX2.__name__)
        self.assertEqual(self.path, None)

    def testAbsolute_top_Y(self):
        self.importX()
        self.runImport(None, self.modY.__name__, globals(), None, 0)
        self.assertEqual(self.fullname, self.modY.__name__)
        self.assertEqual(self.path, ['X'])

    # Relative case
    def testRelativeOrAbsolute_X_X2_rel1(self):
        self.importX()
        self.runImport(None, self.modX2.__name__, self.modX)
        self.assertEqual(self.fullname, self.nameX + "." + self.modX2.__name__)
        self.assertEqual(self.path, ['X'])

    def testRelativeOrAbsolute_X_X2_rel2(self):
        self.importX()
        self.runImport(None, self.modX2.__name__, self.modX, None, -1)
        self.assertEqual(self.path, ['X'])
        self.assertEqual(self.fullname, self.nameX + "." + self.modX2.__name__)

    # Absolute case
    def testRelativeOrAbsolute_X_X2_abs1(self):
        self.importX()
        self.runImport(self.modX2.__name__, self.modX2.__name__, self.modX)
        self.assertEqual(self.fullname, self.modX2.__name__)
        self.assertEqual(self.path, None)

    def testRelativeOrAbsolute_X_X2_abs2(self):
        self.importX()
        self.runImport(self.modX2.__name__, self.modX2.__name__, self.modX, None, -1)
        self.assertEqual(self.path, None)
        self.assertEqual(self.fullname, self.modX2.__name__)

    def testAbsolute_X_X2(self):
        self.importX()
        self.runImport(None, self.modX2.__name__, self.modX, None, 0)
        self.assertEqual(self.fullname, self.modX2.__name__)
        self.assertEqual(self.path, None)

    def testAbsolute_X_Y(self):
        self.importX()
        self.runImport(None, self.modY.__name__, self.modX, None, 0)
        self.assertEqual(self.fullname, self.modY.__name__)
        self.assertEqual(self.path, ['X'])

    def testRelative_Z1_Z2(self):
        self.importZ1()
        self.runImport(None, "", self.modZ1, ['Z2'], 1)
        self.assertEqual(self.fullname, self.modZ2.__name__)
        self.assertEqual(self.path, ['X/Y'])

    def testRelative_Z1_Y2(self):
        self.importZ1()
        self.runImport(None, "", self.modZ1, ["Y2"], 2)
        self.assertEqual(self.fullname, self.modX.__name__+".Y2")
        self.assertEqual(self.path, ['X'])

    def testRelative_Z1_X2(self):
        # """beyond top level"""
        self.importZ1()
        self.assertRaises(ValueError, self.runImport, None, "", self.modZ1, [self.modX2.__name__], 3)

    def testRelative_X2_X(self):
        # """not a package"""
        self.importX2()
        self.assertRaises(ValueError, self.runImport, None, "", self.modX2, [self.modX.__name__], 1)

    def testRelative_X2_Y(self):
        # """not a package"""
        self.importX2()
        self.importX()
        self.assertRaises(ValueError, self.runImport, None, self.modX.__name__, self.modX2, ["Y"], 1)

    def testRelative_X_Z1_1(self):
        self.importX()
        self.runImport(None, "Y", self.modX, ['Z1'], 1)
        self.assertEqual(self.fullname, self.modY.__name__)
        self.assertEqual(self.path, ['X'])

    def testRelative_X_Z1_2(self):
        self.importY()
        self.runImport(None, "Y", self.modX, ['Z1'], 1)
        self.assertEqual(self.fullname, self.modZ1.__name__)
        self.assertEqual(self.path, ['X/Y'])

    def testRelative_Y_Z1(self):
        self.importY()
        self.runImport(None, "Z1", self.modY, ['A', 'B'], 1)
        self.assertEqual(self.fullname, self.modZ1.__name__)
        self.assertEqual(self.path, ['X/Y'])

    def testRelative_Y2_Z1_1(self):
        self.importY2()
        self.runImport(None, "Y", self.modY2, ['Z1'], 2)
        self.assertEqual(self.fullname, self.modY.__name__)
        self.assertEqual(self.path, ['X'])

    def testRelative_Y2_Z1_2(self):
        self.importY2()
        self.importY()
        self.runImport(None, "Y", self.modY2, ['Z1'], 2)
        self.assertEqual(self.fullname, self.modZ1.__name__)
        self.assertEqual(self.path, ['X/Y'])

try:
    from test import test_support
except ImportError:
    test_main = unittest.main
else:
    def test_main():
        test_support.run_unittest(TestImportStatement,
                              TestImportFunction)

if __name__ == '__main__':
    test_main()


text:
#include <af/dim4.hpp>
#include <Array.hpp>
#include <copy.hpp>
#include <err_cuda.hpp>
#include <JIT/BufferNode.hpp>
#include <scalar.hpp>
#include <memory.hpp>
#include <platform.hpp>
#include <cstddef>

using af::dim4;

namespace cuda
{

    const int MAX_JIT_LEN = 20;
    using JIT::BufferNode;
    using JIT::Node;
    using JIT::Node_ptr;

    template<typename T>
    Array<T>::Array(af::dim4 dims) :
        info(getActiveDeviceId(), dims, af::dim4(0,0,0,0), calcStrides(dims), (af_dtype)dtype_traits<T>::af_type),
        data(memAlloc<T>(dims.elements()), memFree<T>), data_dims(dims),
        node(), offset(0), ready(true), owner(true)
    {}

    template<typename T>
    Array<T>::Array(af::dim4 dims, const T * const in_data, bool is_device, bool copy_device) :
        info(getActiveDeviceId(), dims, af::dim4(0,0,0,0), calcStrides(dims), (af_dtype)dtype_traits<T>::af_type),
        data(((is_device & !copy_device) ? (T *)in_data : memAlloc<T>(dims.elements())), memFree<T>),
        data_dims(dims),
        node(), offset(0), ready(true), owner(true)
    {
#if __cplusplus > 199711L
        static_assert(std::is_standard_layout<Array<T>>::value, "Array<T> must be a standard layout type");
        static_assert(offsetof(Array<T>, info) == 0, "Array<T>::info must be the first member variable of Array<T>");
#endif
        if (!is_device) {
            CUDA_CHECK(cudaMemcpyAsync(data.get(), in_data, dims.elements() * sizeof(T),
                                       cudaMemcpyHostToDevice, cuda::getStream(cuda::getActiveDeviceId())));
            CUDA_CHECK(cudaStreamSynchronize(cuda::getStream(cuda::getActiveDeviceId())));
        } else if (copy_device) {
            CUDA_CHECK(cudaMemcpyAsync(data.get(), in_data, dims.elements() * sizeof(T),
                                       cudaMemcpyDeviceToDevice, cuda::getStream(cuda::getActiveDeviceId())));
            CUDA_CHECK(cudaStreamSynchronize(cuda::getStream(cuda::getActiveDeviceId())));
        }
    }

    template<typename T>
    Array<T>::Array(const Array<T>& parent, const dim4 &dims, const dim4 &offsets, const dim4 &strides) :
        info(parent.getDevId(), dims, offsets, strides, (af_dtype)dtype_traits<T>::af_type),
        data(parent.getData()), data_dims(parent.getDataDims()),
        node(),
        offset(parent.getOffset() + calcOffset(parent.strides(), offsets)),
        ready(true), owner(false)
    { }

    template<typename T>
    Array<T>::Array(Param<T> &tmp) :
        info(getActiveDeviceId(), af::dim4(tmp.dims[0], tmp.dims[1], tmp.dims[2], tmp.dims[3]),
                  af::dim4(0, 0, 0, 0),
                  af::dim4(tmp.strides[0], tmp.strides[1], tmp.strides[2], tmp.strides[3]),
                  (af_dtype)dtype_traits<T>::af_type),
        data(tmp.ptr, memFree<T>),
        data_dims(af::dim4(tmp.dims[0], tmp.dims[1], tmp.dims[2], tmp.dims[3])),
        node(), offset(0), ready(true), owner(true)
    {
    }

    template<typename T>
    Array<T>::Array(af::dim4 dims, JIT::Node_ptr n) :
        info(getActiveDeviceId(), dims, af::dim4(0,0,0,0), calcStrides(dims), (af_dtype)dtype_traits<T>::af_type),
        data(), data_dims(dims),
        node(n), offset(0), ready(false), owner(true)
    {
    }

    template<typename T>
    void Array<T>::eval()
    {
        if (isReady()) return;

        this->setId(getActiveDeviceId());
        data = shared_ptr<T>(memAlloc<T>(elements()),
                             memFree<T>);

        Param<T> res;
        res.ptr = data.get();

        for (int  i = 0; i < 4; i++) {
            res.dims[i] = dims()[i];
            res.strides[i] = strides()[i];
        }

        evalNodes(res, this->getNode().get());
        ready = true;

        Node_ptr prev = node;
        prev->resetFlags();
        // FIXME: Replace the current node in any JIT possible trees with the new BufferNode
        node.reset();
    }

    template<typename T>
    void Array<T>::eval() const
    {
        if (isReady()) return;
        const_cast<Array<T> *>(this)->eval();
    }

    template<typename T>
    Array<T>::~Array() {}

    template<typename T>
    Node_ptr Array<T>::getNode() const
    {
        if (!node) {
            bool is_linear = isLinear();
            unsigned bytes = this->getDataDims().elements() * sizeof(T);
            BufferNode<T> *buf_node = new BufferNode<T>(irname<T>(),
                                                        afShortName<T>(), data,
                                                        *this, bytes, is_linear);
            const_cast<Array<T> *>(this)->node = Node_ptr(reinterpret_cast<Node *>(buf_node));
        }

        return node;
    }

    template<typename T>
    Array<T> createNodeArray(const dim4 &dims, Node_ptr node)
    {
        Array<T> out =  Array<T>(dims, node);

        unsigned length =0, buf_count = 0, bytes = 0;

        Node *n = node.get();
        n->getInfo(length, buf_count, bytes);
        n->resetFlags();

        if (length > MAX_JIT_LEN ||
            buf_count >= MAX_BUFFERS ||
            bytes >= MAX_BYTES) {
            out.eval();
        }

        return out;
    }

    template<typename T>
    Array<T> createHostDataArray(const dim4 &size, const T * const data)
    {
        return Array<T>(size, data, false);
    }

    template<typename T>
    Array<T> createDeviceDataArray(const dim4 &size, const void *data)
    {
        return Array<T>(size, (const T * const)data, true);
    }

    template<typename T>
    Array<T> createValueArray(const dim4 &size, const T& value)
    {
        return createScalarNode<T>(size, value);
    }

    template<typename T>
    Array<T> createEmptyArray(const dim4 &size)
    {
        return Array<T>(size);
    }

    template<typename T>
    Array<T> *initArray()
    {
        return new Array<T>(dim4());
    }

    template<typename T>
    Array<T> createSubArray(const Array<T>& parent,
                            const std::vector<af_seq> &index,
                            bool copy)
    {
        parent.eval();

        dim4 dDims = parent.getDataDims();
        dim4 pDims = parent.dims();

        dim4 dims   = toDims  (index, pDims);
        dim4 offset = toOffset(index, dDims);
        dim4 stride = toStride (index, dDims);

        Array<T> out = Array<T>(parent, dims, offset, stride);

        if (!copy) return out;

        if (stride[0] != 1 ||
            stride[1] <  0 ||
            stride[2] <  0 ||
            stride[3] <  0) {

            out = copyArray(out);
        }

        return out;
    }

    template<typename T>
    Array<T> createParamArray(Param<T> &tmp)
    {
        return Array<T>(tmp);
    }

    template<typename T>
    void destroyArray(Array<T> *A)
    {
        delete A;
    }

    template<typename T>
    void
    writeHostDataArray(Array<T> &arr, const T * const data, const size_t bytes)
    {
        if (!arr.isOwner()) {
            arr = createEmptyArray<T>(arr.dims());
        }

        T *ptr = arr.get();

        CUDA_CHECK(cudaMemcpyAsync(ptr + arr.getOffset(), data, bytes, cudaMemcpyHostToDevice,
                    cuda::getStream(cuda::getActiveDeviceId())));
        CUDA_CHECK(cudaStreamSynchronize(cuda::getStream(cuda::getActiveDeviceId())));

        return;
    }

    template<typename T>
    void
    writeDeviceDataArray(Array<T> &arr, const void * const data, const size_t bytes)
    {
        if (!arr.isOwner()) {
            arr = createEmptyArray<T>(arr.dims());
        }

        T *ptr = arr.get();

        CUDA_CHECK(cudaMemcpyAsync(ptr + arr.getOffset(), data,
                                   bytes, cudaMemcpyDeviceToDevice,
                                   cuda::getStream(cuda::getActiveDeviceId())));

        return;
    }

#define INSTANTIATE(T)                                                  \
    template       Array<T>  createHostDataArray<T>   (const dim4 &size, const T * const data); \
    template       Array<T>  createDeviceDataArray<T> (const dim4 &size, const void *data); \
    template       Array<T>  createValueArray<T>      (const dim4 &size, const T &value); \
    template       Array<T>  createEmptyArray<T>      (const dim4 &size); \
    template       Array<T>  *initArray<T      >      ();               \
    template       Array<T>  createParamArray<T>      (Param<T> &tmp);  \
    template       Array<T>  createSubArray<T>        (const Array<T> &parent, \
                                                       const std::vector<af_seq> &index, \
                                                       bool copy);      \
    template       void      destroyArray<T>          (Array<T> *A);    \
    template       Array<T>  createNodeArray<T>       (const dim4 &size, JIT::Node_ptr node); \
    template       Array<T>::Array(af::dim4 dims, const T * const in_data, \
                                   bool is_device, bool copy_device);   \
    template       Array<T>::~Array        ();                          \
    template       void Array<T>::eval();                               \
    template       void Array<T>::eval() const;                         \
    template       void      writeHostDataArray<T>    (Array<T> &arr, const T * const data, const size_t bytes); \
    template       void      writeDeviceDataArray<T>  (Array<T> &arr, const void * const data, const size_t bytes); \

    INSTANTIATE(float)
    INSTANTIATE(double)
    INSTANTIATE(cfloat)
    INSTANTIATE(cdouble)
    INSTANTIATE(int)
    INSTANTIATE(uint)
    INSTANTIATE(uchar)
    INSTANTIATE(char)
    INSTANTIATE(intl)
    INSTANTIATE(uintl)
    INSTANTIATE(short)
    INSTANTIATE(ushort)

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>OpenCV::MAX_VERTICES \ language (API)</title>

OPENCV

/ references

				Name
				MAX_VERTICES

				Examples
				None available

				Description
				The maximum number of contour points available to blob detection (by default)

				Syntax
				int : MAX_VERTICES

				Usage
				Application

				Related
				blobs()


text:
package com.amazonaws.services.comprehend.model.transform;

import java.math.*;

import javax.annotation.Generated;

import com.amazonaws.services.comprehend.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * EntityRecognizerAnnotations JSON Unmarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EntityRecognizerAnnotationsJsonUnmarshaller implements Unmarshaller<EntityRecognizerAnnotations, JsonUnmarshallerContext> {

    public EntityRecognizerAnnotations unmarshall(JsonUnmarshallerContext context) throws Exception {
        EntityRecognizerAnnotations entityRecognizerAnnotations = new EntityRecognizerAnnotations();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL) {
            return null;
        }

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("S3Uri", targetDepth)) {
                    context.nextToken();
                    entityRecognizerAnnotations.setS3Uri(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("TestS3Uri", targetDepth)) {
                    context.nextToken();
                    entityRecognizerAnnotations.setTestS3Uri(context.getUnmarshaller(String.class).unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return entityRecognizerAnnotations;
    }

    private static EntityRecognizerAnnotationsJsonUnmarshaller instance;

    public static EntityRecognizerAnnotationsJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new EntityRecognizerAnnotationsJsonUnmarshaller();
        return instance;
    }
}


text:
#ifndef NAN_CALLBACKS_H_
#define NAN_CALLBACKS_H_

template<typename T> class FunctionCallbackInfo;
template<typename T> class PropertyCallbackInfo;
template<typename T> class Global;

typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
typedef void(*GetterCallback)
    (v8::Local<v8::String>, const PropertyCallbackInfo<v8::Value>&);
typedef void(*SetterCallback)(
    v8::Local<v8::String>,
    v8::Local<v8::Value>,
    const PropertyCallbackInfo<void>&);
typedef void(*PropertyGetterCallback)(
    v8::Local<v8::String>,
    const PropertyCallbackInfo<v8::Value>&);
typedef void(*PropertySetterCallback)(
    v8::Local<v8::String>,
    v8::Local<v8::Value>,
    const PropertyCallbackInfo<v8::Value>&);
typedef void(*PropertyEnumeratorCallback)
    (const PropertyCallbackInfo<v8::Array>&);
typedef void(*PropertyDeleterCallback)(
    v8::Local<v8::String>,
    const PropertyCallbackInfo<v8::Boolean>&);
typedef void(*PropertyQueryCallback)(
    v8::Local<v8::String>,
    const PropertyCallbackInfo<v8::Integer>&);
typedef void(*IndexGetterCallback)(
    uint32_t,
    const PropertyCallbackInfo<v8::Value>&);
typedef void(*IndexSetterCallback)(
    uint32_t,
    v8::Local<v8::Value>,
    const PropertyCallbackInfo<v8::Value>&);
typedef void(*IndexEnumeratorCallback)
    (const PropertyCallbackInfo<v8::Array>&);
typedef void(*IndexDeleterCallback)(
    uint32_t,
    const PropertyCallbackInfo<v8::Boolean>&);
typedef void(*IndexQueryCallback)(
    uint32_t,
    const PropertyCallbackInfo<v8::Integer>&);

namespace imp {
typedef v8::Local<v8::AccessorSignature> Sig;

#define X(NAME)                                                                \
struct NAME ## Wrapper {                                                       \
  explicit NAME ## Wrapper(NAME ## Callback callback_) :                       \
      callback(callback_) {}                                                   \
  NAME ## Callback callback;                                                   \
};

X(Function)
X(Getter)
X(Setter)
X(PropertyGetter)
X(PropertySetter)
X(PropertyEnumerator)
X(PropertyDeleter)
X(PropertyQuery)
X(IndexGetter)
X(IndexSetter)
X(IndexEnumerator)
X(IndexDeleter)
X(IndexQuery)

#undef X

static const int kDataIndex =                    0;

static const int kFunctionIndex =                1;
static const int kFunctionFieldCount =           2;

static const int kGetterIndex =                  1;
static const int kSetterIndex =                  2;
static const int kAccessorFieldCount =           3;

static const int kPropertyGetterIndex =          1;
static const int kPropertySetterIndex =          2;
static const int kPropertyEnumeratorIndex =      3;
static const int kPropertyDeleterIndex =         4;
static const int kPropertyQueryIndex =           5;
static const int kPropertyFieldCount =           6;

static const int kIndexPropertyGetterIndex =     1;
static const int kIndexPropertySetterIndex =     2;
static const int kIndexPropertyEnumeratorIndex = 3;
static const int kIndexPropertyDeleterIndex =    4;
static const int kIndexPropertyQueryIndex =      5;
static const int kIndexPropertyFieldCount =      6;

template<typename T, typename P>
P *GetWrapper(T needle) {
  static std::map<T, P*> haystack;
  typename std::map<T, P*>::iterator it =  // NOLINT(build/include_what_you_use)
      haystack.find(needle);

  if (it == haystack.end()) {
    return haystack.insert(it, std::make_pair(needle, new P(needle)))->second;
  } else {
    return it->second;
  }
}
}  // end of namespace imp

#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
# include "nan_callbacks_12_inl.h"  // NOLINT(build/include)
#else
# include "nan_callbacks_pre_12_inl.h"  // NOLINT(build/include)
#endif

#endif  // NAN_CALLBACKS_H_


text:
#pragma once

#ifndef GEODE_EXCEPTIONTYPES_H_
#define GEODE_EXCEPTIONTYPES_H_

#include "internal/geode_globals.hpp"
#include "geode/Exception.hpp"

namespace apache {
namespace geode {
namespace client {

/*
 *
 * This is the list of exceptions directly derived from
 * apache::geode::client::Exception.
 *
 */

/**
 *@brief A geode assertion exception.
 **/
class APACHE_GEODE_EXPORT AssertionException : public Exception {
 public:
  using Exception::Exception;
  ~AssertionException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::AssertionException";
  }
};

/**
 *@brief Thrown when an argument to a method is illegal.
 **/
class APACHE_GEODE_EXPORT IllegalArgumentException : public Exception {
 public:
  using Exception::Exception;
  ~IllegalArgumentException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::IllegalArgumentException";
  }
};

/**
 *@brief Thrown when the state of cache is manipulated to be illegal.
 **/
class APACHE_GEODE_EXPORT IllegalStateException : public Exception {
 public:
  using Exception::Exception;
  ~IllegalStateException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::IllegalStateException";
  }
};

/**
 *@brief Thrown when an attempt is made to create an existing cache.
 **/
class APACHE_GEODE_EXPORT CacheExistsException : public Exception {
 public:
  using Exception::Exception;
  ~CacheExistsException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheExistsException";
  }
};

/**
 *@brief Thrown when the cache xml is incorrect.
 **/
class APACHE_GEODE_EXPORT CacheXmlException : public Exception {
 public:
  using Exception::Exception;
  ~CacheXmlException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheXmlException";
  }
};
/**
 *@brief Thrown when a timout occurs.
 **/
class APACHE_GEODE_EXPORT TimeoutException : public Exception {
 public:
  using Exception::Exception;
  ~TimeoutException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::TimeoutException";
  }
};

/**
 *@brief Thrown when the cache writer aborts the operation.
 **/
class APACHE_GEODE_EXPORT CacheWriterException : public Exception {
 public:
  using Exception::Exception;
  ~CacheWriterException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheWriterException";
  }
};

/**
 *@brief Thrown when an attempt is made to create an existing region.
 **/
class APACHE_GEODE_EXPORT RegionExistsException : public Exception {
 public:
  using Exception::Exception;
  ~RegionExistsException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::RegionExistsException";
  }
};

/**
 *@brief Thrown when an operation is attempted on a closed cache.
 **/
class APACHE_GEODE_EXPORT CacheClosedException : public Exception {
 public:
  using Exception::Exception;
  ~CacheClosedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheClosedException";
  }
};

/**
 *@brief Thrown when lease of cache proxy has expired.
 **/
class APACHE_GEODE_EXPORT LeaseExpiredException : public Exception {
 public:
  using Exception::Exception;
  ~LeaseExpiredException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::LeaseExpiredException";
  }
};

/**
 *@brief Thrown when the cache loader aborts the operation.
 **/
class APACHE_GEODE_EXPORT CacheLoaderException : public Exception {
 public:
  using Exception::Exception;
  ~CacheLoaderException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheLoaderException";
  }
};

/**
 *@brief Thrown when an operation is attempted on a destroyed region.
 **/
class APACHE_GEODE_EXPORT RegionDestroyedException : public Exception {
 public:
  using Exception::Exception;
  ~RegionDestroyedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::RegionDestroyedException";
  }
};

/**
 *@brief Thrown when an operation is attempted on a destroyed entry.
 **/
class APACHE_GEODE_EXPORT EntryDestroyedException : public Exception {
 public:
  using Exception::Exception;
  ~EntryDestroyedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::EntryDestroyedException";
  }
};

/**
 *@brief Thrown when the connecting target is not running.
 **/
class APACHE_GEODE_EXPORT NoSystemException : public Exception {
 public:
  using Exception::Exception;
  ~NoSystemException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::NoSystemException";
  }
};

/**
 *@brief Thrown when an attempt is made to connect to
 *       DistributedSystem second time.
 **/
class APACHE_GEODE_EXPORT AlreadyConnectedException : public Exception {
 public:
  using Exception::Exception;
  ~AlreadyConnectedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::AlreadyConnectedException";
  }
};

/**
 *@brief Thrown when a non-existing file is accessed.
 **/
class APACHE_GEODE_EXPORT FileNotFoundException : public Exception {
 public:
  using Exception::Exception;
  ~FileNotFoundException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::FileNotFoundException";
  }
};

/**
 *@brief Thrown when an operation is interrupted.
 **/
class APACHE_GEODE_EXPORT InterruptedException : public Exception {
 public:
  using Exception::Exception;
  ~InterruptedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::InterruptedException";
  }
};

/**
 *@brief Thrown when an operation unsupported by the
 *       current configuration is attempted.
 **/
class APACHE_GEODE_EXPORT UnsupportedOperationException : public Exception {
 public:
  using Exception::Exception;
  ~UnsupportedOperationException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::UnsupportedOperationException";
  }
};

/**
 *@brief Thrown when statistics are invoked for a region where
 *       they are disabled.
 **/
class APACHE_GEODE_EXPORT StatisticsDisabledException : public Exception {
 public:
  using Exception::Exception;
  ~StatisticsDisabledException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::StatisticsDisabledException";
  }
};

/**
 *@brief Thrown when a concurrent operation fails.
 **/
class APACHE_GEODE_EXPORT ConcurrentModificationException : public Exception {
 public:
  using Exception::Exception;
  ~ConcurrentModificationException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::ConcurrentModificationException";
  }
};

/**
 *@brief An unknown exception occurred.
 **/
class APACHE_GEODE_EXPORT UnknownException : public Exception {
 public:
  using Exception::Exception;
  ~UnknownException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::UnknownException";
  }
};

/**
 *@brief Thrown when a cast operation fails.
 **/
class APACHE_GEODE_EXPORT ClassCastException : public Exception {
 public:
  using Exception::Exception;
  ~ClassCastException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::ClassCastException";
  }
};

/**
 *@brief Thrown when an operation is attempted on a non-existent entry.
 **/
class APACHE_GEODE_EXPORT EntryNotFoundException : public Exception {
 public:
  using Exception::Exception;
  ~EntryNotFoundException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::EntryNotFoundException";
  }
};

/**
 *@brief Thrown when there is an input/output error.
 **/
class APACHE_GEODE_EXPORT GeodeIOException : public Exception {
 public:
  using Exception::Exception;
  ~GeodeIOException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::GeodeIOException";
  }
};

/**
 *@brief Thrown when geode configuration file is incorrect.
 **/
class APACHE_GEODE_EXPORT GeodeConfigException : public Exception {
 public:
  using Exception::Exception;
  ~GeodeConfigException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::GeodeConfigException";
  }
};

/**
 *@brief Thrown when a null argument is provided to a method
 *       where it is expected to be non-null.
 **/
class APACHE_GEODE_EXPORT NullPointerException : public Exception {
 public:
  using Exception::Exception;
  ~NullPointerException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::NullPointerException";
  }
};

/**
 *@brief Thrown when attempt is made to create an existing entry.
 **/
class APACHE_GEODE_EXPORT EntryExistsException : public Exception {
 public:
  using Exception::Exception;
  ~EntryExistsException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::EntryExistsException";
  }
};

/**
 *@brief Thrown when an operation is attempted before connecting
 *       to the distributed system.
 **/
class APACHE_GEODE_EXPORT NotConnectedException : public Exception {
 public:
  using Exception::Exception;
  ~NotConnectedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::NotConnectedException";
  }
};

/**
 *@brief Thrown when there is an error in the cache proxy.
 **/
class APACHE_GEODE_EXPORT CacheProxyException : public Exception {
 public:
  using Exception::Exception;
  ~CacheProxyException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheProxyException";
  }
};

/**
 *@brief Thrown when the system cannot allocate any more memory.
 **/
class APACHE_GEODE_EXPORT OutOfMemoryException : public Exception {
 public:
  using Exception::Exception;
  ~OutOfMemoryException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::OutOfMemoryException";
  }
};

/**
 *@brief Thrown when an attempt is made to release a lock not
 *       owned by the thread.
 **/
class APACHE_GEODE_EXPORT NotOwnerException : public Exception {
 public:
  using Exception::Exception;
  ~NotOwnerException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::NotOwnerException";
  }
};

/**
 *@brief Thrown when a region is created in an incorrect scope.
 **/
class APACHE_GEODE_EXPORT WrongRegionScopeException : public Exception {
 public:
  using Exception::Exception;
  ~WrongRegionScopeException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::WrongRegionScopeException";
  }
};

/**
 *@brief Thrown when the internal buffer size is exceeded.
 **/
class APACHE_GEODE_EXPORT BufferSizeExceededException : public Exception {
 public:
  using Exception::Exception;
  ~BufferSizeExceededException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::BufferSizeExceededException";
  }
};

/**
 *@brief Thrown when a region creation operation fails.
 **/
class APACHE_GEODE_EXPORT RegionCreationFailedException : public Exception {
 public:
  using Exception::Exception;
  ~RegionCreationFailedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::RegionCreationFailedException";
  }
};

/**
 *@brief Thrown when there is a fatal internal exception in geode.
 */
class APACHE_GEODE_EXPORT FatalInternalException : public Exception {
 public:
  using Exception::Exception;
  ~FatalInternalException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::FatalInternalException";
  }
};

/**
 *@brief Thrown by the persistence manager when a write
 *       fails due to disk failure.
 **/
class APACHE_GEODE_EXPORT DiskFailureException : public Exception {
 public:
  using Exception::Exception;
  ~DiskFailureException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::DiskFailureException";
  }
};

/**
 *@brief Thrown by the persistence manager when the data
 *@brief to be read from disk is corrupt.
 **/
class APACHE_GEODE_EXPORT DiskCorruptException : public Exception {
 public:
  using Exception::Exception;
  ~DiskCorruptException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::DiskCorruptException";
  }
};

/**
 *@brief Thrown when persistence manager fails to initialize.
 **/
class APACHE_GEODE_EXPORT InitFailedException : public Exception {
 public:
  using Exception::Exception;
  ~InitFailedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::InitFailedException";
  }
};

/**
 *@brief Thrown when persistence manager fails to close properly.
 **/
class APACHE_GEODE_EXPORT ShutdownFailedException : public Exception {
 public:
  using Exception::Exception;
  ~ShutdownFailedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::ShutdownFailedException";
  }
};

/**
 *@brief Thrown when an exception occurs on the cache server.
 **/
class APACHE_GEODE_EXPORT CacheServerException : public Exception {
 public:
  using Exception::Exception;
  ~CacheServerException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheServerException";
  }
};

/**
 *@brief Thrown when bound of array/vector etc. is exceeded.
 **/
class APACHE_GEODE_EXPORT OutOfRangeException : public Exception {
 public:
  using Exception::Exception;
  ~OutOfRangeException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::OutOfRangeException";
  }
};

/**
 *@brief Thrown when query exception occurs at the server.
 **/
class APACHE_GEODE_EXPORT QueryException : public Exception {
 public:
  using Exception::Exception;
  ~QueryException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::QueryException";
  }
};

/**
 *@brief Thrown when an unknown message is received from the server.
 **/
class APACHE_GEODE_EXPORT MessageException : public Exception {
 public:
  using Exception::Exception;
  ~MessageException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::MessageException";
  }
};

/**
 *@brief Thrown when a non authorized operation is done.
 **/
class APACHE_GEODE_EXPORT NotAuthorizedException : public Exception {
 public:
  using Exception::Exception;
  ~NotAuthorizedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::NotAuthorizedException";
  }
};

/**
 *@brief Thrown when authentication fails.
 **/
class APACHE_GEODE_EXPORT AuthenticationFailedException : public Exception {
 public:
  using Exception::Exception;
  ~AuthenticationFailedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::AuthenticationFailedException";
  }
};

/**
 *@brief Thrown when no credentials are provided by client when server expects.
 **/
class APACHE_GEODE_EXPORT AuthenticationRequiredException : public Exception {
 public:
  using Exception::Exception;
  ~AuthenticationRequiredException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::AuthenticationRequiredException";
  }
};

/**
 *@brief Thrown when two durable connect with same Id.
 **/
class APACHE_GEODE_EXPORT DuplicateDurableClientException : public Exception {
 public:
  using Exception::Exception;
  ~DuplicateDurableClientException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::DuplicateDurableClientException";
  }
};

/**
 *@brief Thrown when the cache listener throws an exception.
 **/
class APACHE_GEODE_EXPORT CacheListenerException : public Exception {
 public:
  using Exception::Exception;
  ~CacheListenerException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CacheListenerException";
  }
};
/**
 *@brief Thrown during continuous query execution time.
 **/
class APACHE_GEODE_EXPORT CqException : public Exception {
 public:
  using Exception::Exception;
  ~CqException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CqException";
  }
};
/**
 *@brief Thrown if the Cq on which the operaion performed is closed
 **/
class APACHE_GEODE_EXPORT CqClosedException : public Exception {
 public:
  using Exception::Exception;
  ~CqClosedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CqClosedException";
  }
};
/**
 *@brief Thrown if the Cq Query failed
 **/
class APACHE_GEODE_EXPORT CqQueryException : public Exception {
 public:
  using Exception::Exception;
  ~CqQueryException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CqQueryException";
  }
};
/**
 *@brief Thrown if a Cq by this name already exists on this client
 **/
class APACHE_GEODE_EXPORT CqExistsException : public Exception {
 public:
  using Exception::Exception;
  ~CqExistsException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CqExistsException";
  }
};
/**
 *@brief  Thrown if the query doesnot meet the CQ constraints.
 * E.g.:Query string should refer only one region, join not supported.
 *      The query must be a SELECT statement.
 *      DISTINCT queries are not supported.
 *      Projections are not supported.
 *      Only one iterator in the FROM clause is supported, and it must be a
 *region path.
 *      Bind parameters in the query are not supported for the initial release.
 **/
class APACHE_GEODE_EXPORT CqInvalidException : public Exception {
 public:
  using Exception::Exception;
  ~CqInvalidException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CqInvalidException";
  }
};
/**
 *@brief Thrown if function execution failed
 **/
class APACHE_GEODE_EXPORT FunctionExecutionException : public Exception {
 public:
  using Exception::Exception;
  ~FunctionExecutionException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::FunctionExecutionException";
  }
};
/**
 *@brief Thrown if the No locators are active to reply for new connection.
 **/
class APACHE_GEODE_EXPORT NoAvailableLocatorsException : public Exception {
 public:
  using Exception::Exception;
  ~NoAvailableLocatorsException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::NoAvailableLocatorsException";
  }
};
/**
 *@brief Thrown if all connections in the pool are in use.
 **/
class APACHE_GEODE_EXPORT AllConnectionsInUseException : public Exception {
 public:
  using Exception::Exception;
  ~AllConnectionsInUseException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::AllConnectionsInUseException";
  }
};
/**
 *@brief Thrown if Delta could not be applied.
 **/
class APACHE_GEODE_EXPORT InvalidDeltaException : public Exception {
 public:
  using Exception::Exception;
  ~InvalidDeltaException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::InvalidDeltaException";
  }
};
/**
 *@brief Thrown if a Key is not present in the region.
 **/
class APACHE_GEODE_EXPORT KeyNotFoundException : public Exception {
 public:
  using Exception::Exception;
  ~KeyNotFoundException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::KeyNotFoundException";
  }
};
/**
 * @brief This is for all Exceptions that may be thrown
 * by a Geode transaction.
 **/
class APACHE_GEODE_EXPORT TransactionException : public Exception {
 public:
  using Exception::Exception;
  ~TransactionException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::TransactionException";
  }
};
/**
 * @brief The RollbackException exception indicates that either the transaction
 * has been rolled back or an operation cannot complete because the
 * transaction is marked for rollback only.
 **/
class APACHE_GEODE_EXPORT RollbackException : public Exception {
 public:
  using Exception::Exception;
  ~RollbackException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::RollbackException";
  }
};
/**
 * @brief Thrown when a commit fails due to a write conflict.
 * @see CacheTransactionManager#commit
 **/
class APACHE_GEODE_EXPORT CommitConflictException : public Exception {
 public:
  using Exception::Exception;
  ~CommitConflictException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::CommitConflictException";
  }
};
/**
 * @brief Thrown when the transactional data host has shutdown or no longer has
 *the data
 * being modified by the transaction.
 * This can be thrown while doing transactional operations or during commit.
 **/
class APACHE_GEODE_EXPORT TransactionDataNodeHasDepartedException
    : public Exception {
 public:
  using Exception::Exception;
  ~TransactionDataNodeHasDepartedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::TransactionDataNodeHasDepartedException";
  }
};
/**
 * @brief Thrown when a {@link RebalanceOperation} occurs concurrently with a
 *transaction.
 * This can be thrown while doing transactional operations or during commit.
 **/
class APACHE_GEODE_EXPORT TransactionDataRebalancedException
    : public Exception {
 public:
  using Exception::Exception;
  ~TransactionDataRebalancedException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::TransactionDataRebalancedException";
  }
};

/**
 * @brief Thrown if putAll operation with single hop succeeded partially.
 **/
class APACHE_GEODE_EXPORT PutAllPartialResultException : public Exception {
 public:
  using Exception::Exception;
  ~PutAllPartialResultException() noexcept override {}
  std::string getName() const override {
    return "apache::geode::client::PutAllPartialResultException";
  }
};

}  // namespace client
}  // namespace geode
}  // namespace apache

#endif  // GEODE_EXCEPTIONTYPES_H_


text:
"""Transforms a JSON list of paths using -ffile-prefix-map style rules."""

import argparse
import json
from typing import Iterator, List, TextIO

# Note: This should be List[Tuple[str, str]], but using string.split()
# produces Tuple[Any,...], so this permits that typing for convenience.
PrefixMaps = List[tuple]

def _parse_args() -> argparse.Namespace:
    """Parses and returns the command line arguments."""

    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('in_json',
                        type=argparse.FileType('r'),
                        help='The JSON file containing a list of file names '
                        'that the prefix map operations should be applied to')
    parser.add_argument(
        '--prefix-map-json',
        type=argparse.FileType('r'),
        required=True,
        help=
        'JSON file containing an array of prefix map transformations to apply '
        'to the strings before tokenizing. These string literal '
        'transformations are of the form "from=to". All strings with the '
        'prefix `from` will have the prefix replaced with `to`. '
        'Transformations are applied in the order they are listed in the JSON '
        'file.')

    parser.add_argument('--output',
                        type=argparse.FileType('w'),
                        help='File path to write transformed paths to.')
    return parser.parse_args()

def remap_paths(paths: List[str], prefix_maps: PrefixMaps) -> Iterator[str]:
    for path in paths:
        for from_prefix, to_prefix in prefix_maps:
            if path.startswith(from_prefix):
                path = path.replace(from_prefix, to_prefix, 1)
        yield path

def remap_json_paths(in_json: TextIO, output: TextIO,
                     prefix_map_json: TextIO) -> None:
    paths = json.load(in_json)
    prefix_maps: PrefixMaps = [
        tuple(m.split('=', maxsplit=1)) for m in json.load(prefix_map_json)
    ]

    json.dump(list(remap_paths(paths, prefix_maps)), output)

if __name__ == '__main__':
    remap_json_paths(**vars(_parse_args()))


text:
var React = require('react');
var ReactDOM = require('react-dom');

var Component = React.createClass ({
    render: function() {
        return (

Loaded Hahaha456

        );
    }
});

module.exports = Component;


text:
package com.amazonaws.services.elasticloadbalancingv2.waiters;

import javax.annotation.Generated;

import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.services.elasticloadbalancingv2.AmazonElasticLoadBalancing;
import com.amazonaws.services.elasticloadbalancingv2.model.*;
import com.amazonaws.waiters.*;

import java.util.concurrent.ExecutorService;

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonElasticLoadBalancingWaiters {

    /**
     * Represents the service client
     */
    private final AmazonElasticLoadBalancing client;

    private final ExecutorService executorService = WaiterExecutorServiceFactory.buildExecutorServiceForWaiter("AmazonElasticLoadBalancingWaiters");

    /**
     * Constructs a new AmazonElasticLoadBalancingWaiters with the given client
     *
     * @param client
     *        Service client
     */
    @SdkInternalApi
    public AmazonElasticLoadBalancingWaiters(AmazonElasticLoadBalancing client) {
        this.client = client;
    }

    /**
     * Builds a LoadBalancerAvailable waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter<DescribeLoadBalancersRequest> loadBalancerAvailable() {

        return new WaiterBuilder<DescribeLoadBalancersRequest, DescribeLoadBalancersResult>()
                .withSdkFunction(new DescribeLoadBalancersFunction(client))
                .withAcceptors(new LoadBalancerAvailable.IsActiveMatcher(), new LoadBalancerAvailable.IsProvisioningMatcher(),
                        new LoadBalancerAvailable.IsLoadBalancerNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a TargetDeregistered waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter<DescribeTargetHealthRequest> targetDeregistered() {

        return new WaiterBuilder<DescribeTargetHealthRequest, DescribeTargetHealthResult>().withSdkFunction(new DescribeTargetHealthFunction(client))
                .withAcceptors(new TargetDeregistered.IsInvalidTargetMatcher(), new TargetDeregistered.IsUnusedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a TargetInService waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter<DescribeTargetHealthRequest> targetInService() {

        return new WaiterBuilder<DescribeTargetHealthRequest, DescribeTargetHealthResult>().withSdkFunction(new DescribeTargetHealthFunction(client))
                .withAcceptors(new TargetInService.IsHealthyMatcher(), new TargetInService.IsInvalidInstanceMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a LoadBalancerExists waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter<DescribeLoadBalancersRequest> loadBalancerExists() {

        return new WaiterBuilder<DescribeLoadBalancersRequest, DescribeLoadBalancersResult>().withSdkFunction(new DescribeLoadBalancersFunction(client))
                .withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new LoadBalancerExists.IsLoadBalancerNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a LoadBalancersDeleted waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter<DescribeLoadBalancersRequest> loadBalancersDeleted() {

        return new WaiterBuilder<DescribeLoadBalancersRequest, DescribeLoadBalancersResult>().withSdkFunction(new DescribeLoadBalancersFunction(client))
                .withAcceptors(new LoadBalancersDeleted.IsActiveMatcher(), new LoadBalancersDeleted.IsLoadBalancerNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    public void shutdown() {
        executorService.shutdown();
    }
}


text:
namespace Google.Cloud.Domains.V1.Snippets
{
    // [START domains_v1_generated_Domains_UpdateRegistration_async]
    using Google.Cloud.Domains.V1;
    using Google.LongRunning;
    using Google.Protobuf.WellKnownTypes;
    using System.Threading.Tasks;

    public sealed partial class GeneratedDomainsClientSnippets
    {
        /// <summary>Snippet for UpdateRegistrationAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task UpdateRegistrationRequestObjectAsync()
        {
            // Create client
            DomainsClient domainsClient = await DomainsClient.CreateAsync();
            // Initialize request argument(s)
            UpdateRegistrationRequest request = new UpdateRegistrationRequest
            {
                Registration = new Registration(),
                UpdateMask = new FieldMask(),
            };
            // Make the request
            Operation<Registration, OperationMetadata> response = await domainsClient.UpdateRegistrationAsync(request);

            // Poll until the returned long-running operation is complete
            Operation<Registration, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
            // Retrieve the operation result
            Registration result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<Registration, OperationMetadata> retrievedResponse = await domainsClient.PollOnceUpdateRegistrationAsync(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Registration retrievedResult = retrievedResponse.Result;
            }
        }
    }
    // [END domains_v1_generated_Domains_UpdateRegistration_async]
}


text:
<?php

	/* -----------------------------------------------------------------------------

		Project: Human Centeredness experimental evaluation tool
		Author: Olga Peñalba, Miguel Revuelta
		Date: 2015-09-1
		Version: 2.1 (english)

	----------------------------------------------------------------------------- */

	/*
		Esta página ofrece un formulario dinámico con jquery donde elegir respuestas
		a preguntas sobre los principios de la Computación Centrada en la Persona y
		los envía a otro script para ser procesadas.
	*/

	// Comprobando que haya sido superado el acceso como participante
	if (!isset($_COOKIE['destinatario']) || !isset($_COOKIE['target'])) {
		header("Location: http://localhost/HCXET/Estudio/formestudio.php");
		die();
	}

	// Importando clase de consultas
	require_once '../Web/Classes/DB_functions.php';

	// Captura de datos
	$id_destinatario = $_COOKIE['destinatario'];
	$id_target = $_COOKIE['target'];

	// Instancia de objeto consultas
	$db = new DB_Functions();

	// Nombre del estudio actual
	$study = $db->getNombreestudio($id_target);
	$sistema = $db->getNombresistema($id_target);
?>

<!DOCTYPE html>

		<title> HCXET | Estudio </title>

		<base href="../">

		<meta charset="utf-8">
		<meta name="author" content="Olga Peñalba Rodríguez, Miguel Revuelta Espinosa">
		<meta name="description" content="Human Centered Systems Experimental Evaluation Tool">
		<meta name="keywords" content="HCS, HCC, HCD, Human Centered Systems, Sistemas Centrados en la Persona">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<link rel="stylesheet" href="CSS/reset.css" type="text/css" media="screen">
		<link rel="stylesheet" href="CSS/bootstrap.css" type="text/css" media="screen">
		<link rel="stylesheet" href="CSS/bootstrap-theme.css" type="text/css" media="screen">
		<link rel="stylesheet" href="CSS/hcxet.css" type="text/css" media="screen">

Welcome to the survey <?=$study?>

Evaluating: <?=$sistema?>

				<form action="Estudio/accion-resultados.php" method = "POST" class="abs">

					<input type = "hidden" name = "destinatario" value = "<?=$id_destinatario ?>"></input>
					<input type = "hidden" name = "target" value = "<?=$id_target ?>"></input>

Question group 1

#1- Do you think that the system enhances your capabilities?

									<input type="radio" name="optradio1" value="3" required>Yes, it does

										<input type="radio" name="optradio1" value="2">It does not matter to me

										<input type="radio" name="optradio1" value="1">No, it doesn't

#2- Do you have the opportunity to choose which tasks to perform yourself and which tasks to be performed by the system?

										<input type="radio" name="optradio2" value="3" required>Yes, I can configure the system deciding what tasks do manually or automatically

										<input type="radio" name="optradio2" value="2">It's irrelevant

										<input type="radio" name="optradio2" value="1">The system doesn't have this feature

#3- Do you think the system is suitable for the environment where it is located?

										<input type="radio" name="optradio3" value="3" required>Yes, the system fits perfectly in the environment of use

										<input type="radio" name="optradio3" value="2">Not too much

										<input type="radio" name="optradio3" value="1">It doesn't make sense this system in the environment

Question group  2

#4- Do you perceive the system as something that has been imposed?

										<input type="radio" name="optradio4" value="3" required>No, I am who choose to use this system every day and instead other ones

										<input type="radio" name="optradio4" value="2">It's not imposed but there aren't any other options

										<input type="radio" name="optradio4" value="1">Yes, i prefear to use other tools

#5- Did you make an effort to being able to use the system?

										<input type="radio" name="optradio5" value="3" required>No, i could exploit its features effortlessly from the beginning

										<input type="radio" name="optradio5" value="2">Not many effort

										<input type="radio" name="optradio5" value="1">Yes, in fact i'm still trying to deal with it

#6- Does the system help you to efficiently perform the activities within the environment?

										<input type="radio" name="optradio6" value="3" required>Yes, the system provides comfort for the activities

										<input type="radio" name="optradio6" value="2">Only sometimes

										<input type="radio" name="optradio6" value="1">I'm compelled to use other tools to finish some activities

Question group  3

#7- Is the visual layout of the information appropriate?

										<input type="radio" name="optradio7" value="3" required>Yes, I can use the various components smoothly and efficiently

										<input type="radio" name="optradio7" value="2">There are still some components that cost me access

										<input type="radio" name="optradio7" value="1">If I could , I would change most of the elements location

#8- Do you think the system provides the right amount of information?

										<input type="radio" name="optradio8" value="3" required>All the time i have the information i need

										<input type="radio" name="optradio8" value="2">Sometimes i need more/less information or the information offered in other ways

										<input type="radio" name="optradio8" value="1">I almost never see everything I need as i would like

#9- Do you have the chance to adapt the way the information is provided by the system to your needs?

										<input type="radio" name="optradio9" value="3" required>Yes, both in format and location

										<input type="radio" name="optradio9" value="2">I can configure some elements

										<input type="radio" name="optradio9" value="1">The information is provided allways the same way

Question group  4

#10- Does the system help you to be more expert in your profession?

										<input type="radio" name="optradio10" value="3" required>Yes, I feel I have progressed in my knowledge since using the system

										<input type="radio" name="optradio10" value="2">I have not noticed an extraordinary breakthrough in my knowledge

										<input type="radio" name="optradio10" value="1">No, it doesn't improve my skills

#11- Does the system provide means to capture the knowledge and skills you develop when using it?

										<input type="radio" name="optradio11" value="3" required>Yes, innovative solutions are captured by the system

										<input type="radio" name="optradio11" value="2">Some solutions are collected

										<input type="radio" name="optradio11" value="1">There is no any function like that

#12- Does the system aid participants to share their knowledge of the activities carried out through it?

										<input type="radio" name="optradio12" value="3" required>Yes, in fact it is the main source of sharing knowledge

										<input type="radio" name="optradio12" value="2">it is preferable to use other sources

										<input type="radio" name="optradio12" value="1">This functionality is outside the tool

Question group 5

#13- Is the system consistent with your values?

										<input type="radio" name="optradio13" value="3" required>The system is not against any of my values

										<input type="radio" name="optradio13" value="2">I miss some values, but they are not important

										<input type="radio" name="optradio13" value="1">The system does not reflect my values

#14- Do you think the system achieves consensus on the conflicting values of the participants?

										<input type="radio" name="optradio14" value="3" required>Yes, everybody seem satisfied in this regard

										<input type="radio" name="optradio14" value="2">However, there is no conflict despite there is no consensus

										<input type="radio" name="optradio14" value="1">There is a conflict on this issue that the system worsens

#15- Does the system prevent the breaching of any human rights or supposes a threat to the dignity of any person or group of people?

										<input type="radio" name="optradio15" value="3" required>the system was designed with the concern of defending the Ontological Dignity

										<input type="radio" name="optradio15" value="2">The system doesn't provide facilities to do this

										<input type="radio" name="optradio15" value="1">There is great concern that the system can be used for this purpose with relative ease

End evaluation

Thanks for your collaboration

							<button class="btn btn-lg btn-primary btn-block" type="submit">Send</button>

				</form>


text: export declare const Prerender: (component: any) => any;


text:
import { Class } from 'meteor/jagi:astronomy';
import { Region } from '/imports/model/Region';

export const State = Class.create({
    name: "State",
    collection: new Mongo.Collection("states"),
    fields: {
        name: String,
        regionId: String,
    },
    helpers: {
        region() {
            return Region.findOne(this.regionId);
        }
    },
    behaviors: {
        timestamp: {
            hasCreatedField: true,
            createdFieldName: 'createdAt',
            hasUpdatedField: true,
            updatedFieldName: 'updatedAt'
        },
        softremove: {
            removedFieldName: 'removed',
            hasRemovedAtField: true,
            removedAtFieldName: 'removedAt'
        }
    }
});