text:
=pod

=head1 NAME

get-trigger.pl -- Determines triggering tests for all reviewed version pairs in
F<work_dir/$TAB_REV_PAIRS>, or a single version (or range).

=head1 SYNOPSIS

get-trigger.pl -p project_id -w work_dir [-b bug_id]

=head1 OPTIONS

=over 4

=item B<-p C<project_id>>

The id of the project for which the meta data should be generated.

=item B<-w F<work_dir>>

The working directory used for the bug-mining process.

=item B<-b C<bug_id>>

Only analyze this bug id. The bug_id has to follow the format B<(\d+)(:(\d+))?>.
Per default all bug ids, listed in the active-bugs csv, are considered.

=head1 DESCRIPTION

Runs the following workflow for the project C<project_id> and the results are
written to F<work_dir/TAB_TRIGGER>. For all B<reviewed> version pairs in
F<work_dir/$TAB_REV_PAIRS>:

=over 4

=item 1) Checkout fixed version.

=item 2) Compile src and test.

=item 3) Run tests and verify that all tests pass.

=item 4) Checkout buggy version.

=item 5) Compile src and test.

=item 6) Run tests and verify that no test class fails and at least on test
         method fails (all failing test methods are B<individual triggering tests>).

=item 7) Run every triggering test in isolation on the fixed version and verify
         that it passes.

=item 8) Run every triggering test in isolation on the buggy verision and verify
         that it fails.

=item 9) Export triggering tests to F<C<work_dir>/<project_id>/trigger_tests>.

=back

The result for each individual step is stored in F<C<work_dir>/$TAB_TRIGGER>.
For each step the output table contains a column, indicating the result of the
step or '-' if the step was not applicable.

=cut
use warnings;
use strict;
use File::Basename;
use Cwd qw(abs_path);
use Getopt::Std;
use Pod::Usage;

use lib (dirname(abs_path(__FILE__)) . "/../core/");
use Constants;
use Project;
use DB;
use Utils;

my %cmd_opts;
getopts('p:b:w:', \%cmd_opts) or pod2usage(1);

pod2usage(1) unless defined $cmd_opts{p} and defined $cmd_opts{w};

my $PID = $cmd_opts{p};
my $BID = $cmd_opts{b};
my $WORK_DIR = abs_path($cmd_opts{w});

# Check format of target bug id
if (defined $BID) {
    $BID =~ /^(\d+)(:(\d+))?$/ or die "Wrong version id format ((\\d+)(:(\\d+))?): $BID!";
}

# DB_CSVs directory
my $db_dir = $WORK_DIR;

# Add script and core directory to @INC
unshift(@INC, "$WORK_DIR/framework/core");

# Override global constants
$REPO_DIR = "$WORK_DIR/project_repos";
$PROJECTS_DIR = "$WORK_DIR/framework/projects";

# Set the projects and repository directories to the current working directory.
my $PROJECTS_DIR = "$WORK_DIR/framework/projects";

# Temporary directory
my $TMP_DIR = Utils::get_tmp_dir();
system("mkdir -p $TMP_DIR");

# Set up project
my $project = Project::create_project($PID);
$project->{prog_root} = $TMP_DIR;

# Get database handle for results
my $dbh_trigger = DB::get_db_handle($TAB_TRIGGER, $db_dir);
my $dbh_revs = DB::get_db_handle($TAB_REV_PAIRS, $db_dir);
my @COLS = DB::get_tab_columns($TAB_TRIGGER) or die;

# Set up directory for triggering tests
my $OUT_DIR = "$PROJECTS_DIR/$PID/trigger_tests";
system("mkdir -p $OUT_DIR");

# dependent tests saved to this file
my $DEP_TEST_FILE            = "$PROJECTS_DIR/$PID/dependent_tests";

# Temporary files used for saving failed test results in
my $FAILED_TESTS_FILE        = "$TMP_DIR/test.run";
my $FAILED_TESTS_FILE_SINGLE = "$FAILED_TESTS_FILE.single";

# Isolation constants
my $EXPECT_PASS = 0;
my $EXPECT_FAIL = 1;

my @bids = _get_bug_ids($BID);
foreach my $bid (@bids) {
    printf ("%4d: $project->{prog_name}\n", $bid);

    my %data;
    $data{$PROJECT} = $PID;
    $data{$ID} = $bid;

    # V2 must not have any failing tests
    my $list = _get_failing_tests($project, "$TMP_DIR/v2", "${bid}f");
    if (($data{$FAIL_V2} = (scalar(@{$list->{"classes"}}) + scalar(@{$list->{"methods"}}))) != 0) {
        print("Non expected failing test classes/methods on ${PID}-${bid}\n");
        _add_row(\%data);
        next;
    }

    # V1 must not have failing test classes but at least one failing test method
    $list = _get_failing_tests($project, "$TMP_DIR/v1", "${bid}b");
    my $fail_c = scalar(@{$list->{"classes"}}); $data{$FAIL_C_V1} = $fail_c;
    my $fail_m = scalar(@{$list->{"methods"}}); $data{$FAIL_M_V1} = $fail_m;
    if ($fail_c !=0 or $fail_m == 0) {
        print("Expected at least one failing test method on ${PID}-${bid}b\n");
        _add_row(\%data);
        next;
    }

    # Isolation part of workflow
    $list = $list->{methods}; # we only care about the methods from here on.
    my @fail_in_order = @$list; # list to compare isolated tests with

    # Make sure there are no duplicates.
    my %seen;
    for (@$list) {
        die "Duplicate test case failure: $_. Build is probably broken" unless ++$seen{$_} < 2;
    }

    print "List of test methods: \n" . join ("\n",  @$list) . "\n";
    # Run triggering test(s) in isolation on v2 -> tests should pass. Any test not
    # passing is excluded from further processing.
    $list = _run_tests_isolation("$TMP_DIR/v2", $list, $EXPECT_PASS);
    $data{$PASS_ISO_V2} = scalar(@$list);
    print "List of test methods: (passed in isolation on v2)\n" . join ("\n", @$list) . "\n";

    # Run triggering test(s) in isolation on v1 -> tests should fail. Any test not
    # failing is excluded from further processing.
    $list = _run_tests_isolation("$TMP_DIR/v1", $list, $EXPECT_FAIL);
    $data{$FAIL_ISO_V1} = scalar(@$list);
    print "List of test methods: (failed in isolation on v1)\n" . join ("\n", @$list) . "\n";

     # Save non-dependent triggering tests to $OUT_DIR/$bid
    if (scalar(@{$list}) > 0) {
        system("cp $FAILED_TESTS_FILE $OUT_DIR/$bid");
    } else {
        print("No triggering test case has been found. This could either mean that no test" .
              " has been executed or that all test cases pass (e.g., a javadoc change could" .
              " be considered bugfix however it might not be captured by any unit test case)\n");
    }

    # Save dependent tests to $DEP_TEST_FILE

    # Get contents of current dependent tests file
    my @old_dep_tests;

    if (-e $DEP_TEST_FILE){
        open my $contents, '<', $DEP_TEST_FILE or die "Cannot open dependent tests file: $!\n";
        my @old_dep_tests = <$contents>;
        close $contents;
    }

    my @dependent_tests = grep { !($_ ~~  @{$list}) } @fail_in_order;
    for my $dependent_test (@dependent_tests) {
        # Add the test unless it is already in the list.
        unless ($dependent_test ~~ @old_dep_tests) {
            print " ## Warning: Dependent test ($dependent_test) is being added to list.\n";
            system("echo '--- $dependent_test' >> $DEP_TEST_FILE");
            push @old_dep_tests, $dependent_test;
        }
    }

    # Add data
    _add_row(\%data);
}

$dbh_trigger->disconnect();
$dbh_revs->disconnect();
system("rm -rf $TMP_DIR");

#
# Get bug ids from TAB_REV_PAIRS
#
sub _get_bug_ids {
    my $target_bid = shift;

    my $min_id;
    my $max_id;
    if (defined($target_bid) && $target_bid =~ /(\d+)(:(\d+))?/) {
        $min_id = $max_id = $1;
        $max_id = $3 if defined $3;
    }

    my $sth_exists = $dbh_trigger->prepare("SELECT * FROM $TAB_TRIGGER WHERE $PROJECT=? AND $ID=?") or die $dbh_trigger->errstr;

    # Select all version ids from previous step in workflow
    my $sth = $dbh_revs->prepare("SELECT $ID FROM $TAB_REV_PAIRS WHERE $PROJECT=? "
                . "AND $COMP_T2V1=1") or die $dbh_revs->errstr;
    $sth->execute($PID) or die "Cannot query database: $dbh_revs->errstr";
    my @bids = ();
    foreach (@{$sth->fetchall_arrayref}) {
        my $bid = $_->[0];
        # Skip if project & ID already exist in DB file
        $sth_exists->execute($PID, $bid);
        next if ($sth_exists->rows !=0);

        # Filter ids if necessary
        next if (defined $min_id && ($bid<$min_id || $bid>$max_id));

        # Add id to result array
        push(@bids, $bid);
    }
    $sth->finish();

    return @bids;
}

#
# Get a list of all failing tests
#
sub _get_failing_tests {
    my ($project, $root, $vid) = @_;

    # Clean output file
    system(">$FAILED_TESTS_FILE");
    $project->{prog_root} = $root;

    $project->checkout_vid($vid, $root, 1) or die;

    # Compile src and test
    $project->compile() or die;
    $project->compile_tests() or die;

    # Run tests and get number of failing tests
    $project->run_tests($FAILED_TESTS_FILE) or die;
    # Return failing tests
    return Utils::get_failing_tests($FAILED_TESTS_FILE);
}

#
# Run tests in isolation and check for pass/fail
#
sub _run_tests_isolation {
    my ($root, $list, $expect_fail) = @_;

    # Clean output file
    system(">$FAILED_TESTS_FILE");
    $project->{prog_root} = $root;

    my @succeeded_tests = ();

    foreach my $test (@$list) {
        # Clean single test output
        system(">$FAILED_TESTS_FILE_SINGLE");
        $project->run_tests($FAILED_TESTS_FILE_SINGLE, $test) or die;
        my $fail = Utils::get_failing_tests($FAILED_TESTS_FILE_SINGLE);
        if (scalar(@{$fail->{methods}}) == $expect_fail) {
            push @succeeded_tests, $test;
            system("cat $FAILED_TESTS_FILE_SINGLE >> $FAILED_TESTS_FILE"); # save results of single test to overall file.
        }
    }

    # Return reference to the list of methods passed/failed.
    \@succeeded_tests;
}

#
# Add a row to the database table
#
sub _add_row {
    my $data = shift;

    my @tmp;
    foreach (@COLS) {
        push (@tmp, $dbh_trigger->quote((defined $data->{$_} ? $data->{$_} : "-")));
    }

    my $row = join(",", @tmp);
    $dbh_trigger->do("INSERT INTO $TAB_TRIGGER VALUES ($row)");
}

=pod

=head1 SEE ALSO

Previous step in workflow is F<analyze-project.pl>.

Next step in workflow is running F<get-metadata.pl>.

=cut


text:
#include <stflpp.h>
#include <logger.h>
#include <exception.h>
#include <cerrno>

#include <langinfo.h>
#include <utils.h>

namespace newsbeuter {

/*
 * This is a wrapper around the low-level C functions of STFL.
 * In order to make working with std::string easier, this wrapper
 * was created. This is also useful for logging all stfl-related
 * operations if necessary, and for working around bugs in STFL,
 * especially related to stuff like multithreading fuckups.
 */

stfl::form::form(const std::string& text) : f(0) {
	ipool = stfl_ipool_create(utils::translit(nl_langinfo(CODESET), "WCHAR_T").c_str());
	if (!ipool) {
		throw exception(errno);
	}
	f = stfl_create(stfl_ipool_towc(ipool, text.c_str()));
	if (!f) {
		throw exception(errno);
	}
}

stfl::form::~form() {
	if (f)
		stfl_free(f);
	if (ipool)
		stfl_ipool_destroy(ipool);
}

const char * stfl::form::run(int timeout) {
	return stfl_ipool_fromwc(ipool,stfl_run(f,timeout));
}

std::string stfl::form::get(const std::string& name) {
	const char * text = stfl_ipool_fromwc(ipool,stfl_get(f,stfl_ipool_towc(ipool,name.c_str())));
	std::string retval;
	if (text)
		retval = text;
	stfl_ipool_flush(ipool);
	return retval;
}

void stfl::form::set(const std::string& name, const std::string& value) {
	stfl_set(f, stfl_ipool_towc(ipool,name.c_str()), stfl_ipool_towc(ipool,value.c_str()));
	stfl_ipool_flush(ipool);
}

std::string stfl::form::get_focus() {
	const char * focus = stfl_ipool_fromwc(ipool,stfl_get_focus(f));
	std::string retval;
	if (focus)
		retval = focus;
	stfl_ipool_flush(ipool);
	return retval;
}

void stfl::form::set_focus(const std::string& name) {
	stfl_set_focus(f, stfl_ipool_towc(ipool,name.c_str()));
	LOG(level::DEBUG,"stfl::form::set_focus: %s", name);
}

void stfl::form::modify(const std::string& name, const std::string& mode, const std::string& text) {
	const wchar_t * wname, * wmode, * wtext;
	wname = stfl_ipool_towc(ipool,name.c_str());
	wmode = stfl_ipool_towc(ipool,mode.c_str());
	wtext = stfl_ipool_towc(ipool,text.c_str());
	stfl_modify(f, wname, wmode, wtext);
	stfl_ipool_flush(ipool);
}

void stfl::reset() {
	stfl_reset();
}

static std::mutex quote_mtx;

std::string stfl::quote(const std::string& text) {
	std::lock_guard<std::mutex> lock(quote_mtx);
	stfl_ipool * ipool = stfl_ipool_create(utils::translit(nl_langinfo(CODESET), "WCHAR_T").c_str());
	std::string retval = stfl_ipool_fromwc(ipool,stfl_quote(stfl_ipool_towc(ipool,text.c_str())));
	stfl_ipool_destroy(ipool);
	return retval;
}

std::string stfl::form::dump(const std::string& name, const std::string& prefix, int focus) {
	const char * text = stfl_ipool_fromwc(ipool,stfl_dump(f, stfl_ipool_towc(ipool,name.c_str()), stfl_ipool_towc(ipool,prefix.c_str()), focus));
	std::string retval;
	if (text)
		retval = text;
	stfl_ipool_flush(ipool);
	return retval;
}

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace karster\security\protection;

class GetProtection extends VariableProtection
{
    public function protect()
    {
        return $this->checkVariables($_GET);
    }
}


text:
/* SPDX-License-Identifier: BSD-2-Clause */

#include <tilck_gen_headers/config_boot.h>

#include <tilck/common/basic_defs.h>
#include <tilck/common/printk.h>
#include <tilck/common/string_util.h>
#include <tilck/boot/common.h>

#include "basic_term.h"
#include "vbe.h"
#include "common.h"

struct ModeInfoBlock *usable_vbe_mode_info_block;
struct VbeInfoBlock *vbe_info_block;

static int
legacy_boot_count_modes(video_mode_t *modes)
{
   int cnt = 0;

   while (modes[cnt] != INVALID_VIDEO_MODE)
      cnt++;

   return cnt;
}

static void
alloc_once_vbe_info_blocks(void)
{
   ulong free_mem;

   if (!vbe_info_block) {

      free_mem = get_usable_mem(&g_meminfo, 0x1000, 4 * KB);

      if (!free_mem)
         panic("Unable to allocate memory for VbeInfoBlock\n");

      vbe_info_block = (void *)free_mem;

      free_mem = get_usable_mem(&g_meminfo, free_mem + 4 * KB, 4 * KB);

      if (!free_mem)
         panic("Unable to allocate memory for struct ModeInfoBlock\n");

      usable_vbe_mode_info_block = (void *)free_mem;
   }
}

static bool
is_mode_usable(struct ModeInfoBlock *mi)
{
   if (!(mi->ModeAttributes & VBE_MODE_ATTRS_GFX_MODE))
      return false;

   if (!(mi->ModeAttributes & VBE_MODE_ATTRS_LINEAR_FB))
      return false;

   if (!(mi->ModeAttributes & VBE_MODE_ATTRS_SUPPORTED))
      return false;

   if (mi->MemoryModel != VB_MEM_MODEL_DIRECT_COLOR)
      return false;

   return true;
}

static int
legacy_boot_read_key(void)
{
   return bios_read_char();
}

static bool
legacy_boot_get_mode_info(video_mode_t m, struct generic_video_mode_info *gi)
{
   struct ModeInfoBlock *mi = usable_vbe_mode_info_block;
   bool success = false;

   if (m == VGA_COLOR_TEXT_MODE_80x25) {

      gi->xres = 80;
      gi->yres = 25;
      gi->bpp = 4;
      gi->is_text_mode = true;
      gi->is_usable = true;
      success = true;

   } else if (vbe_get_mode_info(m, mi)) {

      gi->xres = mi->XResolution;
      gi->yres = mi->YResolution;
      gi->bpp = mi->BitsPerPixel;
      gi->is_text_mode = false;
      gi->is_usable = is_mode_usable(mi);
      success = true;
   }

   return success;
}

static void
legacy_boot_clear_screen(void)
{
   init_bt();
}

static video_mode_t
legacy_boot_get_curr_video_mode(void)
{
   return selected_mode;
}

static bool
legacy_boot_set_curr_video_mode(video_mode_t wanted_mode)
{
   if (!vbe_set_video_mode(wanted_mode))
      return false;

   selected_mode = wanted_mode;
   return true;
}

static void
legacy_boot_get_all_video_modes(video_mode_t **modes, int *count)
{
   video_mode_t *all_modes = NULL;
   struct VbeInfoBlock *vb;
   int all_modes_cnt = 0;

   alloc_once_vbe_info_blocks();
   vb = vbe_info_block;

   if (!vbe_get_info_block(vb)) {

      if (BOOT_INTERACTIVE)
         printk("VBE get info failed. Only the text mode is available.\n");

      vb = NULL;
   }

   if (vb->VbeVersion < 0x200) {

      if (BOOT_INTERACTIVE)
         printk("VBE older than 2.0 is not supported.\n");

      vb = NULL;
   }

   if (vb) {
      all_modes = get_flat_ptr(vb->VideoModePtr);
      all_modes_cnt = legacy_boot_count_modes(all_modes);
   }

   *modes = all_modes;
   *count = all_modes_cnt;
}

static bool
legacy_boot_load_kernel_file(const char *path, void **paddr)
{
   if (!load_kernel_file(path))
      return false;

   *paddr = TO_PTR(kernel_file_pa);
   return true;
}

static bool
legacy_boot_load_initrd(void)
{
   bool success;

   if (!kernel_file_pa)
      panic("No loaded kernel file");

   success =
      load_fat_ramdisk(LOADING_INITRD_STR,
                       INITRD_SECTOR,
                       KERNEL_PADDR + get_loaded_kernel_mem_sz(),
                       &initrd_paddr,
                       &initrd_size,
                       true);       /* alloc_extra_page */

   if (!success)
      return false;

   /* Compact initrd's clusters, if necessary */
   initrd_size = rd_compact_clusters((void *)initrd_paddr, initrd_size);

   /*
    * Increase initrd_size by 1 page in order to allow Tilck's kernel to
    * align the first data sector, if necessary.
    */
   initrd_size += 4 * KB;
   return true;
}

const struct bootloader_intf legacy_boot_intf = {

   /* Methods */
   .read_key = &legacy_boot_read_key,
   .write_char = &bt_write_char,
   .clear_screen = &legacy_boot_clear_screen,
   .set_color = &bt_setcolor,
   .get_all_video_modes = &legacy_boot_get_all_video_modes,
   .get_mode_info = &legacy_boot_get_mode_info,
   .get_curr_video_mode = &legacy_boot_get_curr_video_mode,
   .set_curr_video_mode = &legacy_boot_set_curr_video_mode,
   .load_kernel_file = &legacy_boot_load_kernel_file,
   .load_initrd = &legacy_boot_load_initrd,
   .get_cmdline_buf = &legacy_boot_get_cmdline_buf,

   /* Configuration values */
   .text_mode = VGA_COLOR_TEXT_MODE_80x25,
   .efi = false,
};


text:
package pro.taskana;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import pro.taskana.exceptions.SystemException;

/** This enum contains all roles that are known to taskana. */
public enum TaskanaRole {
  USER("taskana.roles.user"),
  BUSINESS_ADMIN("taskana.roles.businessadmin"),
  ADMIN("taskana.roles.admin"),
  MONITOR("taskana.roles.monitor");

  private final String propertyName;

  TaskanaRole(String propertyName) {
    this.propertyName = propertyName;
  }

  public static TaskanaRole fromPropertyName(String name) {
    return Arrays.stream(TaskanaRole.values())
        .filter(x -> x.propertyName.equalsIgnoreCase(name))
        .findFirst()
        .orElseThrow(
            () ->
                new SystemException("Internal System error when processing role property " + name));
  }

  public static List<String> getValidPropertyNames() {
    return Arrays.stream(values()).map(TaskanaRole::getPropertyName).collect(Collectors.toList());
  }

  public String getPropertyName() {
    return propertyName;
  }
}


text:
/**
 * Dummy implementation of Storage interface with empty methods.
 */
class DummyLocalStorage {
    /**
     * Empty function
     */
    getItem() { }

    /**
     * Empty function
     */
    setItem() { }

    /**
     * Empty function
     */
    removeItem() { }
}

/**
 * Wrapper class for browser's local storage object.
 */
class JitsiLocalStorage extends DummyLocalStorage {
    /**
     * @constructor
     * @param {Storage} storage browser's local storage object.
     */
    constructor(storage) {
        super();
        this.storage = storage || new DummyLocalStorage();
    }

    /**
     * Returns that passed key's value.
     * @param {string} keyName the name of the key you want to retrieve
     * the value of.
     * @returns {String|null} the value of the key. If the key does not exist,
     * null is returned.
     */
    getItem(keyName) {
        return this.storage.getItem(keyName);
    }

    /**
     * Adds a key to the storage, or update key's value if it already exists.
     * @param {string} keyName the name of the key you want to create/update.
     * @param {string} keyValue the value you want to give the key you are
     * creating/updating.
     */
    setItem(keyName, keyValue) {
        return this.storage.setItem(keyName, keyValue);
    }

    /**
     * Remove a key from the storage.
     * @param {string} keyName the name of the key you want to remove.
     */
    removeItem(keyName) {
        return this.storage.removeItem(keyName);
    }
}

export default new JitsiLocalStorage(window.localStorage);


text:
<!DOCTYPE html>

		<title>three.js webgl - materials - TGA texture</title>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<link type="text/css" rel="stylesheet" href="main.css">

			three.js - TGA texture example by Daosheng Mu


text:
namespace UI.WPF.Modules.Update.ViewModels
{
    public class UpdateCheckStatus
    {
    }
}


text:
using System;
using System.Collections.Generic;

namespace VanEmdeBoasTree.Tests
{
    internal static class YFastPerfectHashTableTests
    {
        public static void RunAllTests()
        {
            Insert_Contains_SyntheticTestCase();
        }

        static void Insert_Contains_SyntheticTestCase()
        {
            var universe = 1000;
            var expectedSize = 1024;
            var table = new YFastPerfectHashTable<object>(universe);
            var insertedElementsSet = FillTableWithRandomElements(table, expectedSize);

            AssertTableContainsElements(table, insertedElementsSet, expectedSize);
        }

        private static HashSet<int> FillTableWithRandomElements(YFastPerfectHashTable<object> table, int expectedSize)
        {
            var random = new Random();
            var insertedElements = new List<int>();
            for (var i = 0; i < expectedSize; i += random.Next(1, 4))
            {
                insertedElements.Add(i);
                var element = i;
                byte prefixOrder = 0;
                while (element > 0)
                {
                    table.Add(new YFastNode<object>(element, prefixOrder));
                    element = element >> 1;
                    prefixOrder++;
                }
            }
            var insertedElementsSet = new HashSet<int>(insertedElements);
            return insertedElementsSet;
        }

        private static void AssertTableContainsElements(YFastPerfectHashTable<object> table, HashSet<int> insertedElementsSet, int expectedSize)
        {
            for (var i = 0; i < expectedSize; i++)
            {
                if (insertedElementsSet.Contains(i))
                {
                    var element = i;
                    byte prefixOrder = 0;
                    while (element > 0)
                    {
                        Assert(table.Contains(new YFastNode<object>(element, prefixOrder)));
                        element = element >> 1;
                        prefixOrder++;
                    }
                }
                else
                {
                    Assert(!table.Contains(new YFastNode<object>(i, 0)));
                }
            }
        }

        static void Assert(bool condition)
        {
            if(!condition)
                throw new InvalidOperationException();
        }
    }
}


text:
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-m-rel-xr-w32-bld/build/content/xul/templates/public/nsIXULTemplateBuilder.idl
 */

#ifndef __gen_nsIXULTemplateBuilder_h__
#define __gen_nsIXULTemplateBuilder_h__

#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIAtom; /* forward declaration */

class nsIContent; /* forward declaration */

class nsIXULBuilderListener; /* forward declaration */

class nsIXULTemplateResult; /* forward declaration */

class nsIXULTemplateRuleFilter; /* forward declaration */

class nsIXULTemplateQueryProcessor; /* forward declaration */

class nsIRDFResource; /* forward declaration */

class nsIRDFCompositeDataSource; /* forward declaration */

class nsIDOMDataTransfer; /* forward declaration */

/* starting interface:    nsIXULTemplateBuilder */
#define NS_IXULTEMPLATEBUILDER_IID_STR "a583b676-5b02-4f9c-a0c9-cb850cb99818"

#define NS_IXULTEMPLATEBUILDER_IID \
  {0xa583b676, 0x5b02, 0x4f9c, \
    { 0xa0, 0xc9, 0xcb, 0x85, 0x0c, 0xb9, 0x98, 0x18 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIXULTemplateBuilder : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXULTEMPLATEBUILDER_IID)

  /* readonly attribute nsIDOMElement root; */
  NS_SCRIPTABLE NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) = 0;

  /* attribute nsISupports datasource; */
  NS_SCRIPTABLE NS_IMETHOD GetDatasource(nsISupports * *aDatasource) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetDatasource(nsISupports *aDatasource) = 0;

  /* readonly attribute nsIRDFCompositeDataSource database; */
  NS_SCRIPTABLE NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) = 0;

  /* readonly attribute nsIXULTemplateResult rootResult; */
  NS_SCRIPTABLE NS_IMETHOD GetRootResult(nsIXULTemplateResult * *aRootResult) = 0;

  /* [noscript] readonly attribute nsIXULTemplateQueryProcessor queryProcessor; */
  NS_IMETHOD GetQueryProcessor(nsIXULTemplateQueryProcessor * *aQueryProcessor) = 0;

  /* void rebuild (); */
  NS_SCRIPTABLE NS_IMETHOD Rebuild(void) = 0;

  /* void refresh (); */
  NS_SCRIPTABLE NS_IMETHOD Refresh(void) = 0;

  /* void addResult (in nsIXULTemplateResult aResult, in nsIDOMNode aQueryNode); */
  NS_SCRIPTABLE NS_IMETHOD AddResult(nsIXULTemplateResult *aResult, nsIDOMNode *aQueryNode) = 0;

  /* void removeResult (in nsIXULTemplateResult aResult); */
  NS_SCRIPTABLE NS_IMETHOD RemoveResult(nsIXULTemplateResult *aResult) = 0;

  /* void replaceResult (in nsIXULTemplateResult aOldResult, in nsIXULTemplateResult aNewResult, in nsIDOMNode aQueryNode); */
  NS_SCRIPTABLE NS_IMETHOD ReplaceResult(nsIXULTemplateResult *aOldResult, nsIXULTemplateResult *aNewResult, nsIDOMNode *aQueryNode) = 0;

  /* void resultBindingChanged (in nsIXULTemplateResult aResult); */
  NS_SCRIPTABLE NS_IMETHOD ResultBindingChanged(nsIXULTemplateResult *aResult) = 0;

  /* nsIXULTemplateResult getResultForId (in AString aId); */
  NS_SCRIPTABLE NS_IMETHOD GetResultForId(const nsAString & aId, nsIXULTemplateResult * *_retval NS_OUTPARAM) = 0;

  /* nsIXULTemplateResult getResultForContent (in nsIDOMElement aElement); */
  NS_SCRIPTABLE NS_IMETHOD GetResultForContent(nsIDOMElement *aElement, nsIXULTemplateResult * *_retval NS_OUTPARAM) = 0;

  /* boolean hasGeneratedContent (in nsIRDFResource aNode, in nsIAtom aTag); */
  NS_SCRIPTABLE NS_IMETHOD HasGeneratedContent(nsIRDFResource *aNode, nsIAtom *aTag, bool *_retval NS_OUTPARAM) = 0;

  /* void addRuleFilter (in nsIDOMNode aRule, in nsIXULTemplateRuleFilter aFilter); */
  NS_SCRIPTABLE NS_IMETHOD AddRuleFilter(nsIDOMNode *aRule, nsIXULTemplateRuleFilter *aFilter) = 0;

  /* [noscript] void init (in nsIContent aElement); */
  NS_IMETHOD Init(nsIContent *aElement) = 0;

  /* [noscript] void createContents (in nsIContent aElement, in boolean aForceCreation); */
  NS_IMETHOD CreateContents(nsIContent *aElement, bool aForceCreation) = 0;

  /* void addListener (in nsIXULBuilderListener aListener); */
  NS_SCRIPTABLE NS_IMETHOD AddListener(nsIXULBuilderListener *aListener) = 0;

  /* void removeListener (in nsIXULBuilderListener aListener); */
  NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXULTemplateBuilder, NS_IXULTEMPLATEBUILDER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIXULTEMPLATEBUILDER \
  NS_SCRIPTABLE NS_IMETHOD GetRoot(nsIDOMElement * *aRoot); \
  NS_SCRIPTABLE NS_IMETHOD GetDatasource(nsISupports * *aDatasource); \
  NS_SCRIPTABLE NS_IMETHOD SetDatasource(nsISupports *aDatasource); \
  NS_SCRIPTABLE NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase); \
  NS_SCRIPTABLE NS_IMETHOD GetRootResult(nsIXULTemplateResult * *aRootResult); \
  NS_IMETHOD GetQueryProcessor(nsIXULTemplateQueryProcessor * *aQueryProcessor); \
  NS_SCRIPTABLE NS_IMETHOD Rebuild(void); \
  NS_SCRIPTABLE NS_IMETHOD Refresh(void); \
  NS_SCRIPTABLE NS_IMETHOD AddResult(nsIXULTemplateResult *aResult, nsIDOMNode *aQueryNode); \
  NS_SCRIPTABLE NS_IMETHOD RemoveResult(nsIXULTemplateResult *aResult); \
  NS_SCRIPTABLE NS_IMETHOD ReplaceResult(nsIXULTemplateResult *aOldResult, nsIXULTemplateResult *aNewResult, nsIDOMNode *aQueryNode); \
  NS_SCRIPTABLE NS_IMETHOD ResultBindingChanged(nsIXULTemplateResult *aResult); \
  NS_SCRIPTABLE NS_IMETHOD GetResultForId(const nsAString & aId, nsIXULTemplateResult * *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetResultForContent(nsIDOMElement *aElement, nsIXULTemplateResult * *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD HasGeneratedContent(nsIRDFResource *aNode, nsIAtom *aTag, bool *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD AddRuleFilter(nsIDOMNode *aRule, nsIXULTemplateRuleFilter *aFilter); \
  NS_IMETHOD Init(nsIContent *aElement); \
  NS_IMETHOD CreateContents(nsIContent *aElement, bool aForceCreation); \
  NS_SCRIPTABLE NS_IMETHOD AddListener(nsIXULBuilderListener *aListener); \
  NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIXULTEMPLATEBUILDER(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) { return _to GetRoot(aRoot); } \
  NS_SCRIPTABLE NS_IMETHOD GetDatasource(nsISupports * *aDatasource) { return _to GetDatasource(aDatasource); } \
  NS_SCRIPTABLE NS_IMETHOD SetDatasource(nsISupports *aDatasource) { return _to SetDatasource(aDatasource); } \
  NS_SCRIPTABLE NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) { return _to GetDatabase(aDatabase); } \
  NS_SCRIPTABLE NS_IMETHOD GetRootResult(nsIXULTemplateResult * *aRootResult) { return _to GetRootResult(aRootResult); } \
  NS_IMETHOD GetQueryProcessor(nsIXULTemplateQueryProcessor * *aQueryProcessor) { return _to GetQueryProcessor(aQueryProcessor); } \
  NS_SCRIPTABLE NS_IMETHOD Rebuild(void) { return _to Rebuild(); } \
  NS_SCRIPTABLE NS_IMETHOD Refresh(void) { return _to Refresh(); } \
  NS_SCRIPTABLE NS_IMETHOD AddResult(nsIXULTemplateResult *aResult, nsIDOMNode *aQueryNode) { return _to AddResult(aResult, aQueryNode); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveResult(nsIXULTemplateResult *aResult) { return _to RemoveResult(aResult); } \
  NS_SCRIPTABLE NS_IMETHOD ReplaceResult(nsIXULTemplateResult *aOldResult, nsIXULTemplateResult *aNewResult, nsIDOMNode *aQueryNode) { return _to ReplaceResult(aOldResult, aNewResult, aQueryNode); } \
  NS_SCRIPTABLE NS_IMETHOD ResultBindingChanged(nsIXULTemplateResult *aResult) { return _to ResultBindingChanged(aResult); } \
  NS_SCRIPTABLE NS_IMETHOD GetResultForId(const nsAString & aId, nsIXULTemplateResult * *_retval NS_OUTPARAM) { return _to GetResultForId(aId, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetResultForContent(nsIDOMElement *aElement, nsIXULTemplateResult * *_retval NS_OUTPARAM) { return _to GetResultForContent(aElement, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD HasGeneratedContent(nsIRDFResource *aNode, nsIAtom *aTag, bool *_retval NS_OUTPARAM) { return _to HasGeneratedContent(aNode, aTag, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD AddRuleFilter(nsIDOMNode *aRule, nsIXULTemplateRuleFilter *aFilter) { return _to AddRuleFilter(aRule, aFilter); } \
  NS_IMETHOD Init(nsIContent *aElement) { return _to Init(aElement); } \
  NS_IMETHOD CreateContents(nsIContent *aElement, bool aForceCreation) { return _to CreateContents(aElement, aForceCreation); } \
  NS_SCRIPTABLE NS_IMETHOD AddListener(nsIXULBuilderListener *aListener) { return _to AddListener(aListener); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener) { return _to RemoveListener(aListener); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIXULTEMPLATEBUILDER(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetRoot(nsIDOMElement * *aRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRoot(aRoot); } \
  NS_SCRIPTABLE NS_IMETHOD GetDatasource(nsISupports * *aDatasource) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDatasource(aDatasource); } \
  NS_SCRIPTABLE NS_IMETHOD SetDatasource(nsISupports *aDatasource) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDatasource(aDatasource); } \
  NS_SCRIPTABLE NS_IMETHOD GetDatabase(nsIRDFCompositeDataSource * *aDatabase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDatabase(aDatabase); } \
  NS_SCRIPTABLE NS_IMETHOD GetRootResult(nsIXULTemplateResult * *aRootResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRootResult(aRootResult); } \
  NS_IMETHOD GetQueryProcessor(nsIXULTemplateQueryProcessor * *aQueryProcessor) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetQueryProcessor(aQueryProcessor); } \
  NS_SCRIPTABLE NS_IMETHOD Rebuild(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rebuild(); } \
  NS_SCRIPTABLE NS_IMETHOD Refresh(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Refresh(); } \
  NS_SCRIPTABLE NS_IMETHOD AddResult(nsIXULTemplateResult *aResult, nsIDOMNode *aQueryNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddResult(aResult, aQueryNode); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveResult(nsIXULTemplateResult *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveResult(aResult); } \
  NS_SCRIPTABLE NS_IMETHOD ReplaceResult(nsIXULTemplateResult *aOldResult, nsIXULTemplateResult *aNewResult, nsIDOMNode *aQueryNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReplaceResult(aOldResult, aNewResult, aQueryNode); } \
  NS_SCRIPTABLE NS_IMETHOD ResultBindingChanged(nsIXULTemplateResult *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResultBindingChanged(aResult); } \
  NS_SCRIPTABLE NS_IMETHOD GetResultForId(const nsAString & aId, nsIXULTemplateResult * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResultForId(aId, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetResultForContent(nsIDOMElement *aElement, nsIXULTemplateResult * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResultForContent(aElement, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD HasGeneratedContent(nsIRDFResource *aNode, nsIAtom *aTag, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasGeneratedContent(aNode, aTag, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD AddRuleFilter(nsIDOMNode *aRule, nsIXULTemplateRuleFilter *aFilter) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRuleFilter(aRule, aFilter); } \
  NS_IMETHOD Init(nsIContent *aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aElement); } \
  NS_IMETHOD CreateContents(nsIContent *aElement, bool aForceCreation) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateContents(aElement, aForceCreation); } \
  NS_SCRIPTABLE NS_IMETHOD AddListener(nsIXULBuilderListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(aListener); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIXULBuilderListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(aListener); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsXULTemplateBuilder : public nsIXULTemplateBuilder
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIXULTEMPLATEBUILDER

  nsXULTemplateBuilder();

private:
  ~nsXULTemplateBuilder();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsXULTemplateBuilder, nsIXULTemplateBuilder)

nsXULTemplateBuilder::nsXULTemplateBuilder()
{
  /* member initializers and constructor code */
}

nsXULTemplateBuilder::~nsXULTemplateBuilder()
{
  /* destructor code */
}

/* readonly attribute nsIDOMElement root; */
NS_IMETHODIMP nsXULTemplateBuilder::GetRoot(nsIDOMElement * *aRoot)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsISupports datasource; */
NS_IMETHODIMP nsXULTemplateBuilder::GetDatasource(nsISupports * *aDatasource)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsXULTemplateBuilder::SetDatasource(nsISupports *aDatasource)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIRDFCompositeDataSource database; */
NS_IMETHODIMP nsXULTemplateBuilder::GetDatabase(nsIRDFCompositeDataSource * *aDatabase)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIXULTemplateResult rootResult; */
NS_IMETHODIMP nsXULTemplateBuilder::GetRootResult(nsIXULTemplateResult * *aRootResult)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] readonly attribute nsIXULTemplateQueryProcessor queryProcessor; */
NS_IMETHODIMP nsXULTemplateBuilder::GetQueryProcessor(nsIXULTemplateQueryProcessor * *aQueryProcessor)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void rebuild (); */
NS_IMETHODIMP nsXULTemplateBuilder::Rebuild()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void refresh (); */
NS_IMETHODIMP nsXULTemplateBuilder::Refresh()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addResult (in nsIXULTemplateResult aResult, in nsIDOMNode aQueryNode); */
NS_IMETHODIMP nsXULTemplateBuilder::AddResult(nsIXULTemplateResult *aResult, nsIDOMNode *aQueryNode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeResult (in nsIXULTemplateResult aResult); */
NS_IMETHODIMP nsXULTemplateBuilder::RemoveResult(nsIXULTemplateResult *aResult)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void replaceResult (in nsIXULTemplateResult aOldResult, in nsIXULTemplateResult aNewResult, in nsIDOMNode aQueryNode); */
NS_IMETHODIMP nsXULTemplateBuilder::ReplaceResult(nsIXULTemplateResult *aOldResult, nsIXULTemplateResult *aNewResult, nsIDOMNode *aQueryNode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void resultBindingChanged (in nsIXULTemplateResult aResult); */
NS_IMETHODIMP nsXULTemplateBuilder::ResultBindingChanged(nsIXULTemplateResult *aResult)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIXULTemplateResult getResultForId (in AString aId); */
NS_IMETHODIMP nsXULTemplateBuilder::GetResultForId(const nsAString & aId, nsIXULTemplateResult * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIXULTemplateResult getResultForContent (in nsIDOMElement aElement); */
NS_IMETHODIMP nsXULTemplateBuilder::GetResultForContent(nsIDOMElement *aElement, nsIXULTemplateResult * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean hasGeneratedContent (in nsIRDFResource aNode, in nsIAtom aTag); */
NS_IMETHODIMP nsXULTemplateBuilder::HasGeneratedContent(nsIRDFResource *aNode, nsIAtom *aTag, bool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addRuleFilter (in nsIDOMNode aRule, in nsIXULTemplateRuleFilter aFilter); */
NS_IMETHODIMP nsXULTemplateBuilder::AddRuleFilter(nsIDOMNode *aRule, nsIXULTemplateRuleFilter *aFilter)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void init (in nsIContent aElement); */
NS_IMETHODIMP nsXULTemplateBuilder::Init(nsIContent *aElement)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void createContents (in nsIContent aElement, in boolean aForceCreation); */
NS_IMETHODIMP nsXULTemplateBuilder::CreateContents(nsIContent *aElement, bool aForceCreation)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addListener (in nsIXULBuilderListener aListener); */
NS_IMETHODIMP nsXULTemplateBuilder::AddListener(nsIXULBuilderListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeListener (in nsIXULBuilderListener aListener); */
NS_IMETHODIMP nsXULTemplateBuilder::RemoveListener(nsIXULBuilderListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

/* starting interface:    nsIXULTreeBuilderObserver */
#define NS_IXULTREEBUILDEROBSERVER_IID_STR "57ced9a7-ec0b-4a0e-8aeb-5da32ebe951c"

#define NS_IXULTREEBUILDEROBSERVER_IID \
  {0x57ced9a7, 0xec0b, 0x4a0e, \
    { 0x8a, 0xeb, 0x5d, 0xa3, 0x2e, 0xbe, 0x95, 0x1c }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIXULTreeBuilderObserver : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXULTREEBUILDEROBSERVER_IID)

  enum { DROP_BEFORE = -1 };

  enum { DROP_ON = 0 };

  enum { DROP_AFTER = 1 };

  /* boolean canDrop (in long index, in long orientation, in nsIDOMDataTransfer dataTransfer); */
  NS_SCRIPTABLE NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer, bool *_retval NS_OUTPARAM) = 0;

  /* void onDrop (in long row, in long orientation, in nsIDOMDataTransfer dataTransfer); */
  NS_SCRIPTABLE NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer) = 0;

  /* void onToggleOpenState (in long index); */
  NS_SCRIPTABLE NS_IMETHOD OnToggleOpenState(PRInt32 index) = 0;

  /* void onCycleHeader (in wstring colID, in nsIDOMElement elt); */
  NS_SCRIPTABLE NS_IMETHOD OnCycleHeader(const PRUnichar * colID, nsIDOMElement *elt) = 0;

  /* void onCycleCell (in long row, in wstring colID); */
  NS_SCRIPTABLE NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar * colID) = 0;

  /* void onSelectionChanged (); */
  NS_SCRIPTABLE NS_IMETHOD OnSelectionChanged(void) = 0;

  /* void onPerformAction (in wstring action); */
  NS_SCRIPTABLE NS_IMETHOD OnPerformAction(const PRUnichar * action) = 0;

  /* void onPerformActionOnRow (in wstring action, in long row); */
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnRow(const PRUnichar * action, PRInt32 row) = 0;

  /* void onPerformActionOnCell (in wstring action, in long row, in wstring colID); */
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnCell(const PRUnichar * action, PRInt32 row, const PRUnichar * colID) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXULTreeBuilderObserver, NS_IXULTREEBUILDEROBSERVER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIXULTREEBUILDEROBSERVER \
  NS_SCRIPTABLE NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer, bool *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer); \
  NS_SCRIPTABLE NS_IMETHOD OnToggleOpenState(PRInt32 index); \
  NS_SCRIPTABLE NS_IMETHOD OnCycleHeader(const PRUnichar * colID, nsIDOMElement *elt); \
  NS_SCRIPTABLE NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar * colID); \
  NS_SCRIPTABLE NS_IMETHOD OnSelectionChanged(void); \
  NS_SCRIPTABLE NS_IMETHOD OnPerformAction(const PRUnichar * action); \
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnRow(const PRUnichar * action, PRInt32 row); \
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnCell(const PRUnichar * action, PRInt32 row, const PRUnichar * colID);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIXULTREEBUILDEROBSERVER(_to) \
  NS_SCRIPTABLE NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer, bool *_retval NS_OUTPARAM) { return _to CanDrop(index, orientation, dataTransfer, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer) { return _to OnDrop(row, orientation, dataTransfer); } \
  NS_SCRIPTABLE NS_IMETHOD OnToggleOpenState(PRInt32 index) { return _to OnToggleOpenState(index); } \
  NS_SCRIPTABLE NS_IMETHOD OnCycleHeader(const PRUnichar * colID, nsIDOMElement *elt) { return _to OnCycleHeader(colID, elt); } \
  NS_SCRIPTABLE NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar * colID) { return _to OnCycleCell(row, colID); } \
  NS_SCRIPTABLE NS_IMETHOD OnSelectionChanged(void) { return _to OnSelectionChanged(); } \
  NS_SCRIPTABLE NS_IMETHOD OnPerformAction(const PRUnichar * action) { return _to OnPerformAction(action); } \
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnRow(const PRUnichar * action, PRInt32 row) { return _to OnPerformActionOnRow(action, row); } \
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnCell(const PRUnichar * action, PRInt32 row, const PRUnichar * colID) { return _to OnPerformActionOnCell(action, row, colID); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIXULTREEBUILDEROBSERVER(_to) \
  NS_SCRIPTABLE NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanDrop(index, orientation, dataTransfer, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD OnDrop(PRInt32 row, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDrop(row, orientation, dataTransfer); } \
  NS_SCRIPTABLE NS_IMETHOD OnToggleOpenState(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnToggleOpenState(index); } \
  NS_SCRIPTABLE NS_IMETHOD OnCycleHeader(const PRUnichar * colID, nsIDOMElement *elt) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCycleHeader(colID, elt); } \
  NS_SCRIPTABLE NS_IMETHOD OnCycleCell(PRInt32 row, const PRUnichar * colID) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCycleCell(row, colID); } \
  NS_SCRIPTABLE NS_IMETHOD OnSelectionChanged(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSelectionChanged(); } \
  NS_SCRIPTABLE NS_IMETHOD OnPerformAction(const PRUnichar * action) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformAction(action); } \
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnRow(const PRUnichar * action, PRInt32 row) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformActionOnRow(action, row); } \
  NS_SCRIPTABLE NS_IMETHOD OnPerformActionOnCell(const PRUnichar * action, PRInt32 row, const PRUnichar * colID) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnPerformActionOnCell(action, row, colID); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsXULTreeBuilderObserver : public nsIXULTreeBuilderObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIXULTREEBUILDEROBSERVER

  nsXULTreeBuilderObserver();

private:
  ~nsXULTreeBuilderObserver();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsXULTreeBuilderObserver, nsIXULTreeBuilderObserver)

nsXULTreeBuilderObserver::nsXULTreeBuilderObserver()
{
  /* member initializers and constructor code */
}

nsXULTreeBuilderObserver::~nsXULTreeBuilderObserver()
{
  /* destructor code */
}

/* boolean canDrop (in long index, in long orientation, in nsIDOMDataTransfer dataTransfer); */
NS_IMETHODIMP nsXULTreeBuilderObserver::CanDrop(PRInt32 index, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer, bool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDrop (in long row, in long orientation, in nsIDOMDataTransfer dataTransfer); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnDrop(PRInt32 row, PRInt32 orientation, nsIDOMDataTransfer *dataTransfer)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onToggleOpenState (in long index); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnToggleOpenState(PRInt32 index)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onCycleHeader (in wstring colID, in nsIDOMElement elt); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnCycleHeader(const PRUnichar * colID, nsIDOMElement *elt)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onCycleCell (in long row, in wstring colID); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnCycleCell(PRInt32 row, const PRUnichar * colID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onSelectionChanged (); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnSelectionChanged()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onPerformAction (in wstring action); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformAction(const PRUnichar * action)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onPerformActionOnRow (in wstring action, in long row); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformActionOnRow(const PRUnichar * action, PRInt32 row)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onPerformActionOnCell (in wstring action, in long row, in wstring colID); */
NS_IMETHODIMP nsXULTreeBuilderObserver::OnPerformActionOnCell(const PRUnichar * action, PRInt32 row, const PRUnichar * colID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

/* starting interface:    nsIXULTreeBuilder */
#define NS_IXULTREEBUILDER_IID_STR "06b31b15-ebf5-4e74-a0e2-6bc0a18a3969"

#define NS_IXULTREEBUILDER_IID \
  {0x06b31b15, 0xebf5, 0x4e74, \
    { 0xa0, 0xe2, 0x6b, 0xc0, 0xa1, 0x8a, 0x39, 0x69 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIXULTreeBuilder : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXULTREEBUILDER_IID)

  /* nsIRDFResource getResourceAtIndex (in long aRowIndex); */
  NS_SCRIPTABLE NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource * *_retval NS_OUTPARAM) = 0;

  /* long getIndexOfResource (in nsIRDFResource resource); */
  NS_SCRIPTABLE NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval NS_OUTPARAM) = 0;

  /* void addObserver (in nsIXULTreeBuilderObserver aObserver); */
  NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) = 0;

  /* void removeObserver (in nsIXULTreeBuilderObserver aObserver); */
  NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) = 0;

  /* void sort (in nsIDOMElement aColumnElement); */
  NS_SCRIPTABLE NS_IMETHOD Sort(nsIDOMElement *aColumnElement) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXULTreeBuilder, NS_IXULTREEBUILDER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIXULTREEBUILDER \
  NS_SCRIPTABLE NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource * *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver); \
  NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver); \
  NS_SCRIPTABLE NS_IMETHOD Sort(nsIDOMElement *aColumnElement);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIXULTREEBUILDER(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource * *_retval NS_OUTPARAM) { return _to GetResourceAtIndex(aRowIndex, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval NS_OUTPARAM) { return _to GetIndexOfResource(resource, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) { return _to AddObserver(aObserver); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) { return _to RemoveObserver(aObserver); } \
  NS_SCRIPTABLE NS_IMETHOD Sort(nsIDOMElement *aColumnElement) { return _to Sort(aColumnElement); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIXULTREEBUILDER(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResourceAtIndex(aRowIndex, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIndexOfResource(resource, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIXULTreeBuilderObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver); } \
  NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIXULTreeBuilderObserver *aObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } \
  NS_SCRIPTABLE NS_IMETHOD Sort(nsIDOMElement *aColumnElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->Sort(aColumnElement); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsXULTreeBuilder : public nsIXULTreeBuilder
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIXULTREEBUILDER

  nsXULTreeBuilder();

private:
  ~nsXULTreeBuilder();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsXULTreeBuilder, nsIXULTreeBuilder)

nsXULTreeBuilder::nsXULTreeBuilder()
{
  /* member initializers and constructor code */
}

nsXULTreeBuilder::~nsXULTreeBuilder()
{
  /* destructor code */
}

/* nsIRDFResource getResourceAtIndex (in long aRowIndex); */
NS_IMETHODIMP nsXULTreeBuilder::GetResourceAtIndex(PRInt32 aRowIndex, nsIRDFResource * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* long getIndexOfResource (in nsIRDFResource resource); */
NS_IMETHODIMP nsXULTreeBuilder::GetIndexOfResource(nsIRDFResource *resource, PRInt32 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addObserver (in nsIXULTreeBuilderObserver aObserver); */
NS_IMETHODIMP nsXULTreeBuilder::AddObserver(nsIXULTreeBuilderObserver *aObserver)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeObserver (in nsIXULTreeBuilderObserver aObserver); */
NS_IMETHODIMP nsXULTreeBuilder::RemoveObserver(nsIXULTreeBuilderObserver *aObserver)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void sort (in nsIDOMElement aColumnElement); */
NS_IMETHODIMP nsXULTreeBuilder::Sort(nsIDOMElement *aColumnElement)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsIXULTemplateBuilder_h__ */


text:
namespace AngleSharp.Dom
{
    using AngleSharp.Common;
    using AngleSharp.Html;
    using AngleSharp.Html.Dom;
    using AngleSharp.Text;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// A specialized collection containing elements of type HTMLFormControlElement.
    /// </summary>
    sealed class HtmlFormControlsCollection : IHtmlFormControlsCollection
    {
        #region Fields

        private readonly IEnumerable<HtmlFormControlElement> _elements;

        #endregion

        #region ctor

        public HtmlFormControlsCollection(IElement form, IElement? root = null)
        {
            if (root is null)
            {
                root = form.Owner!.DocumentElement;
            }

            _elements = root.GetNodes<HtmlFormControlElement>().Where(m =>
            {
                if (Object.ReferenceEquals(m.Form, form))
                {

                    if (m is not IHtmlInputElement input || !input.Type.Is(InputTypeNames.Image))
                    {
                        return true;
                    }
                }

                return false;
            });
        }

        #endregion

        #region Properties

        public Int32 Length => _elements.Count();

        #endregion

        #region HtmlFormControlElement Implementation

        public HtmlFormControlElement this[Int32 index] => _elements.GetItemByIndex(index);

        public HtmlFormControlElement? this[String id] => _elements.GetElementById(id);

        public IEnumerator<HtmlFormControlElement> GetEnumerator() => _elements.GetEnumerator();

        #endregion

        #region IHtmlCollection Implementation

        IEnumerator IEnumerable.GetEnumerator() => _elements.GetEnumerator();

        IHtmlElement IHtmlCollection<IHtmlElement>.this[Int32 index] => this[index];

        IHtmlElement? IHtmlCollection<IHtmlElement>.this[String id] => this[id];

        IEnumerator<IHtmlElement> IEnumerable<IHtmlElement>.GetEnumerator() => _elements.GetEnumerator();

        #endregion
    }
}


text:
(function() {
  angular.module('MyIonicApp')
    .controller('MainCtrl', MainCtrl);

  MainCtrl.$inject = [];

  function MainCtrl(){
    var vm = this;
  }
})();


text:
# rn-bd-echarts
Baidu echarts for React Native

## Installation

```bash
$ npm install --save rn-bd-echarts
or
$ yarn add rn-bd-echarts
```

## Automatic Install

`react-native link rn-bd-echarts`

## Manual Install

### `Android`

1. Add the following lines to `android/settings.gradle`:
    ```gradle
    include ':rn-bd-echarts'
    project(':rn-bd-echarts').projectDir = new File(settingsDir, '../node_modules/rn-bd-echarts/android')
    ```

2. Add the compile line to the dependencies in `android/app/build.gradle`:
    ```gradle
    dependencies {
        ...
        compile project(':rn-bd-echarts')
    }
    ```

3. Add the import and link the package in `MainApplication.java`:
    ```java
    import com.rnbdecharts.RnBdEchartsPackage; // <-- add this import

    public class MainApplication extends Application implements ReactApplication {
        @Override
        protected List<ReactPackage> getPackages() {
            return Arrays.<ReactPackage>asList(
                new MainReactPackage(),
                new RnBdEchartsPackage() // <-- add this line
            );
        }
    }
    ```

## Usage
```js
/**
    The formatter does not support function in the configuration items
    support `formatter: '{b}: {c}'`
    not support `formatter: function(){}`
**/
import RNECharts from 'rn-bd-echarts';
class ChartTest extends Component{
    render(){
        return (
            <RNECharts
                ref={charts => this.charts = charts}
                option={this.state.option}
            />
        )
    }
}
```

## Methods

- [x] [setOption](http://echarts.baidu.com/api.html#echartsInstance.setOption)
- [x] [getOption](http://echarts.baidu.com/api.html#echartsInstance.getOption)
- [x] [dispatchAction](http://echarts.baidu.com/api.html#echartsInstance.setOption)
- [x] [showLoading](http://echarts.baidu.com/api.html#echartsInstance.showLoading)
- [x] [hideLoading](http://echarts.baidu.com/api.html#echartsInstance.hideLoading)
- [x] [on](http://echarts.baidu.com/api.html#echartsInstance.on)
- [x] [off](http://echarts.baidu.com/api.html#echartsInstance.off)

## Actions
- [x] [Baidu ECharts Actions](http://echarts.baidu.com/api.html#action)

```js
this.charts.dispatchAction({type: 'highlight',seriesIndex: 2});
```

## Events
- [x] [Baidu ECharts Events](http://echarts.baidu.com/api.html#events)

```js
this.charts.on('click', (e) => {console.log(e)});
this.charts.off('click');
```

## License

[MIT](LICENSE)


text:
using System;
using System.Configuration;
using System.Linq;

namespace BrockAllen.MembershipReboot
{
    public class SecuritySettings : ConfigurationSection
    {
        public static SecuritySettings Instance { get; set; }

        static SecuritySettings()
        {
            Instance = FromConfiguration();
        }

        public static SecuritySettings FromConfiguration()
        {
            var instance = new SecuritySettings();
            var configSection = GetConfigSection();
            if (configSection != null)
            {
                foreach (var prop in configSection.Properties.Cast<ConfigurationProperty>())
                {
                    var val = configSection[prop];
                    instance[prop] = val;
                }
            }
            return instance;
        }

        public const string SectionName = "membershipReboot";

        static SecuritySettings GetConfigSection()
        {
            return (SecuritySettings)System.Configuration.ConfigurationManager.GetSection(SectionName);
        }

        private const string MULTITENANT = "multiTenant";
        private const string DEFAULTTENANT = "defaultTenant";
        private const string EMAILISUSERNAME = "emailIsUsername";
        private const string EMAILISUNIQUE = "emailIsUnique";
        private const string USERNAMESUNIQUEACROSSTENANTS = "usernamesUniqueAcrossTenants";
        private const string REQUIREACCOUNTVERIFICATION = "requireAccountVerification";
        private const string ALLOWLOGINAFTERACCOUNTCREATION = "allowLoginAfterAccountCreation";
        private const string ACCOUNTLOCKOUTFAILEDLOGINATTEMPTS = "accountLockoutFailedLoginAttempts";
        private const string ACCOUNTLOCKOUTDURATION = "accountLockoutDuration";
        private const string ALLOWACCOUNTDELETION = "allowAccountDeletion";
        private const string PASSWORDHASHINGITERATIONCOUNT = "passwordHashingIterationCount";
        private const string PASSWORDRESETFREQUENCY = "passwordResetFrequency";
        private const string VERIFICATIONKEYLIFETIME = "verificationKeyLifetime";

        [ConfigurationProperty(MULTITENANT, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.MultiTenant)]
        public bool MultiTenant
        {
            get { return (bool)this[MULTITENANT]; }
            set { this[MULTITENANT] = value; }
        }

        [ConfigurationProperty(DEFAULTTENANT, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.DefaultTenant)]
        public string DefaultTenant
        {
            get { return (string)this[DEFAULTTENANT]; }
            set { this[DEFAULTTENANT] = value; }
        }

        [ConfigurationProperty(EMAILISUSERNAME, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.EmailIsUsername)]
        public bool EmailIsUsername
        {
            get { return (bool)this[EMAILISUSERNAME]; }
            set { this[EMAILISUSERNAME] = value; }
        }

        [ConfigurationProperty(EMAILISUNIQUE, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.EmailIsUnique)]
        public bool EmailIsUnique
        {
            get { return (bool)this[EMAILISUNIQUE]; }
            set { this[EMAILISUNIQUE] = value; }
        }

        [ConfigurationProperty(USERNAMESUNIQUEACROSSTENANTS, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.UsernamesUniqueAcrossTenants)]
        public bool UsernamesUniqueAcrossTenants
        {
            get { return (bool)this[USERNAMESUNIQUEACROSSTENANTS]; }
            set { this[USERNAMESUNIQUEACROSSTENANTS] = value; }
        }

        [ConfigurationProperty(REQUIREACCOUNTVERIFICATION, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.RequireAccountVerification)]
        public bool RequireAccountVerification
        {
            get { return (bool)this[REQUIREACCOUNTVERIFICATION]; }
            set { this[REQUIREACCOUNTVERIFICATION] = value; }
        }

        [ConfigurationProperty(ALLOWLOGINAFTERACCOUNTCREATION, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.AllowLoginAfterAccountCreation)]
        public bool AllowLoginAfterAccountCreation
        {
            get { return (bool)this[ALLOWLOGINAFTERACCOUNTCREATION]; }
            set { this[ALLOWLOGINAFTERACCOUNTCREATION] = value; }
        }

        [ConfigurationProperty(ACCOUNTLOCKOUTFAILEDLOGINATTEMPTS, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.AccountLockoutFailedLoginAttempts)]
        public int AccountLockoutFailedLoginAttempts
        {
            get { return (int)this[ACCOUNTLOCKOUTFAILEDLOGINATTEMPTS]; }
            set { this[ACCOUNTLOCKOUTFAILEDLOGINATTEMPTS] = value; }
        }

        [ConfigurationProperty(ACCOUNTLOCKOUTDURATION, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.AccountLockoutDuration)]
        public TimeSpan AccountLockoutDuration
        {
            get { return (TimeSpan)this[ACCOUNTLOCKOUTDURATION]; }
            set { this[ACCOUNTLOCKOUTDURATION] = value; }
        }

        [ConfigurationProperty(ALLOWACCOUNTDELETION, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.AllowAccountDeletion)]
        public bool AllowAccountDeletion
        {
            get { return (bool)this[ALLOWACCOUNTDELETION]; }
            set { this[ALLOWACCOUNTDELETION] = value; }
        }

        [ConfigurationProperty(PASSWORDHASHINGITERATIONCOUNT, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.PasswordHashingIterationCount)]
        public int PasswordHashingIterationCount
        {
            get { return (int)this[PASSWORDHASHINGITERATIONCOUNT]; }
            set { this[PASSWORDHASHINGITERATIONCOUNT] = value; }
        }

        [ConfigurationProperty(PASSWORDRESETFREQUENCY, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.PasswordResetFrequency)]
        public int PasswordResetFrequency
        {
            get { return (int)this[PASSWORDRESETFREQUENCY]; }
            set { this[PASSWORDRESETFREQUENCY] = value; }
        }

        [ConfigurationProperty(VERIFICATIONKEYLIFETIME, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.VerificationKeyLifetime)]
        public TimeSpan VerificationKeyLifetime
        {
            get { return (TimeSpan)this[VERIFICATIONKEYLIFETIME]; }
            set { this[VERIFICATIONKEYLIFETIME] = value; }
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<class name="XRCamera3D" inherits="Camera3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		A camera node with a few overrules for AR/VR applied, such as location tracking.
	</brief_description>
	<description>
		This is a helper spatial node for our camera; note that, if stereoscopic rendering is applicable (VR-HMD), most of the camera properties are ignored, as the HMD information overrides them. The only properties that can be trusted are the near and far planes.
		The position and orientation of this node is automatically updated by the XR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the XR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the XRCamera3D can lag a few milliseconds behind what is used for rendering as a result.
	</description>
	<tutorials>
		<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
	</tutorials>
</class>


text:
package com.ecommerce.repository.security.impl;

import com.ecommerce.bean.security.AccountCredentials;
import com.ecommerce.bean.users.Customer;
import com.ecommerce.repository.security.AuthenticationRepository;
import com.ecommerce.tools.cryptography.PasswordEncoderGenerator;
import com.ecommerce.tools.jpa_helper.SessionFactoryWrapper;
import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.stereotype.Repository;

@Repository
public class AuthenticationRepositoryImpl implements AuthenticationRepository {

	private final SessionFactoryWrapper sessionFactoryWrapper;
	private final PasswordEncoderGenerator passwordEncoderGenerator;

	public AuthenticationRepositoryImpl(SessionFactoryWrapper sessionFactoryWrapper,
										PasswordEncoderGenerator passwordEncoderGenerator) {
		this.sessionFactoryWrapper = sessionFactoryWrapper;
		this.passwordEncoderGenerator = passwordEncoderGenerator;
	}

	@Override
	public boolean passwordMatch(AccountCredentials accountCredentials) {
		Session session = sessionFactoryWrapper.openSession();
		Query query = session.createQuery("SELECT password FROM Customer s WHERE s.email=:email");
		query.setParameter("email", accountCredentials.getEmail());
		String password = (String) query.uniqueResult();
		sessionFactoryWrapper.closeSession();

		return passwordEncoderGenerator.passwordMatches(accountCredentials.getPassword(), password);
	}

}


text:
/*global io, SOG */

/**
 * @namespace browser
 */
SOG.utils.namespace('SOG.browser.Room');

(function () {
	'use strict';

	/**
	 * Represents a Room.
	 *
	 * @class Room
	 * @extends shared.Room
	 * @constructor
	 * @param options {object} Room options.
	 */
	SOG.browser.Room = function (options) {
		SOG.shared.Room.call(this, options);
		this.set('socket', options.socket);
	};

	SOG.browser.Room.prototype = Object.create(SOG.shared.Room.prototype);

	/**
	 * Send points to server.
	 *
	 * @method sendPoints
	 * @param point {object} The point. TODO See if param really is a object.
	 */
	SOG.browser.Room.prototype.sendPoints = function (point) {
		this.get('socket').emit('canvas', point);
	};

	/**
	 * Fired when a point is received from server.
	 *
	 * @event onReceivePoint
	 * @param fn {function} Callback function.
	 */
	SOG.browser.Room.prototype.onReceivePoint = function (fn) {
		this.get('socket').on('canvas', fn);
	};

	/**
	 * Fired when correct word is guessed.
	 *
	 * @event onCorrectWordGuessed
	 * @param fn {function} Callback function. With a object as param (TODO Keys?).
	 */
	SOG.browser.Room.prototype.onCorrectWordGuessed = function (fn) {
		this.get('socket').on('correct-word', function (data) {
			data.next.player = new SOG.browser.Player(data.next.player);
			data.player = new SOG.browser.Player(data.player);
			fn(data);
		});
	};

	SOG.browser.Room.prototype.onLeaveRoom = function (cb) {
		this.get('socket').on('leave-room', function (data) {
			cb(data.name, data.id);
		});
	};

	/**
	 * Change room.
	 *
	 * @method changeTo
	 * @param roomId {string}
	 * @param cb {function}
	 */
	SOG.browser.Room.prototype.changeTo = function (room, cb) {
		// Ask to join room
		this.get('socket').emit('join-room', room);
		// Take care of response
		this.get('socket').on('join-room', function (data) {
			data.players = data.players.map(function (p) {
				return new SOG.browser.Player(p);
			});
			cb(data);
		});
	};
}());


text:
import { tapParsers } from './helpers'

// --------------------------------------------------------
// Action Names
// --------------------------------------------------------

export const SET_START_TIME = 'TAP::SET_START_TIME'
export const ADD_MESSAGE = 'TAP::ADD_MESSAGE'
export const ADD_FAILURE = 'TAP::ADD_FAILURE'

// --------------------------------------------------------
// Message Parsing
// --------------------------------------------------------

const getFailureInfo = message => {
	const [ , , , failureType, failureReason] = message.match(tapParsers.failure)

	return {
		failureReason,
		failureType,
	}
}

const getMessageInfo = message => {
	const [ , , identifier, , , messageText] = (
		message.match(tapParsers.message)
	)

	const [ , testNumber, text] = (
		messageText.match(tapParsers.test)
		|| messageText.match(tapParsers.header)
	)

	return {
		identifier,
		messageText,
		testNumber: Number(testNumber),
		text,
	}
}

// --------------------------------------------------------
// Action Creators
// --------------------------------------------------------

export const setTapStartTime = () => ({
	startTime: new Date(),
	type: SET_START_TIME,
})

export const addTapMessage = message => ({
	...getMessageInfo(message),
	endTime: new Date(),
	message,
	type: ADD_MESSAGE,
})

export const addTapFailure = message => ({
	...getFailureInfo(message),
	endTime: new Date(),
	message,
	type: ADD_FAILURE,
})


text:
package com.frostwire.jlibtorrent.alerts;

import com.frostwire.jlibtorrent.swig.dht_bootstrap_alert;

/**
 * This alert is posted when the initial DHT bootstrap is done.
 *
 * @author gubatron
 * @author aldenml
 */
public final class DhtBootstrapAlert extends AbstractAlert<dht_bootstrap_alert> {

    public DhtBootstrapAlert(dht_bootstrap_alert alert) {
        super(alert);
    }
}


text:
function love.conf(t)
    t.window.width  = 640
    t.window.height = 640
    t.console = true
    t.window.title = "[PROTOTYPE]"
    t.modules.audio = true
    t.modules.graphics = true
end


text:
/* eslint react/no-find-dom-node: 0 */
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md

import React from 'react';
import PropTypes from 'prop-types';
import { Manager } from 'react-popper';
import classNames from 'classnames';
import { DropdownContext } from './DropdownContext';
import { mapToCssModules, omit, keyCodes, tagPropType } from './utils';
import { InputGroupContext } from './InputGroupContext';

const propTypes = {
  a11y: PropTypes.bool,
  disabled: PropTypes.bool,
  direction: PropTypes.oneOf(['up', 'down', 'start', 'end', 'left', 'right']),
  group: PropTypes.bool,
  isOpen: PropTypes.bool,
  nav: PropTypes.bool,
  active: PropTypes.bool,
  size: PropTypes.string,
  tag: tagPropType,
  toggle: PropTypes.func,
  children: PropTypes.node,
  className: PropTypes.string,
  cssModule: PropTypes.object,
  dropup: PropTypes.bool,
  inNavbar: PropTypes.bool,
  setActiveFromChild: PropTypes.bool,
  menuRole: PropTypes.oneOf(['listbox', 'menu']),
};

const defaultProps = {
  a11y: true,
  isOpen: false,
  direction: 'down',
  nav: false,
  active: false,
  inNavbar: false,
  setActiveFromChild: false,
};

const preventDefaultKeys = [
  keyCodes.space,
  keyCodes.enter,
  keyCodes.up,
  keyCodes.down,
  keyCodes.end,
  keyCodes.home,
];

class Dropdown extends React.Component {
  constructor(props) {
    super(props);

    this.addEvents = this.addEvents.bind(this);
    this.handleDocumentClick = this.handleDocumentClick.bind(this);
    this.handleKeyDown = this.handleKeyDown.bind(this);
    this.removeEvents = this.removeEvents.bind(this);
    this.toggle = this.toggle.bind(this);
    this.handleMenuRef = this.handleMenuRef.bind(this);
    this.handleToggleRef = this.handleToggleRef.bind(this);

    this.containerRef = React.createRef();
    this.menuRef = React.createRef();
    this.toggleRef = React.createRef();
    // ref for DropdownToggle
  }

  componentDidMount() {
    this.handleProps();
  }

  componentDidUpdate(prevProps) {
    if (this.props.isOpen !== prevProps.isOpen) {
      this.handleProps();
    }
  }

  componentWillUnmount() {
    this.removeEvents();
  }

  handleMenuRef(menuRef) {
    this.menuRef.current = menuRef;
  }

  handleToggleRef(toggleRef) {
    this.toggleRef.current = toggleRef;
  }

  handleDocumentClick(e) {
    if (
      e &&
      (e.which === 3 || (e.type === 'keyup' && e.which !== keyCodes.tab))
    )
      return;
    const container = this.getContainer();
    const menu = this.getMenu();
    const toggle = this.getToggle();

    const targetIsToggle = e.target === toggle;
    const clickIsInMenu = menu && menu.contains(e.target) && menu !== e.target;

    let clickIsInInput = false;
    if (container) {
      // this is only for InputGroup with type dropdown
      clickIsInInput =
        container.classList.contains('input-group') &&
        container.classList.contains('dropdown') &&
        e.target.tagName === 'INPUT';
    }

    if (
      ((targetIsToggle && !clickIsInInput) || clickIsInMenu) &&
      (e.type !== 'keyup' || e.which === keyCodes.tab)
    ) {
      return;
    }

    this.toggle(e);
  }

  handleKeyDown(e) {
    const isTargetMenuItem =
      e.target.getAttribute('role') === 'menuitem' ||
      e.target.getAttribute('role') === 'option';
    const isTargetMenuCtrl = this.getMenuCtrl() === e.target;
    const isTab = keyCodes.tab === e.which;

    if (
      /input|textarea/i.test(e.target.tagName) ||
      (isTab && !this.props.a11y) ||
      (isTab && !(isTargetMenuItem || isTargetMenuCtrl))
    ) {
      return;
    }

    if (
      preventDefaultKeys.indexOf(e.which) !== -1 ||
      (e.which >= 48 && e.which <= 90)
    ) {
      e.preventDefault();
    }

    if (this.props.disabled) return;

    if (isTargetMenuCtrl) {
      if (
        [keyCodes.space, keyCodes.enter, keyCodes.up, keyCodes.down].indexOf(
          e.which,
        ) > -1
      ) {
        // Open the menu (if not open) and focus the first menu item
        if (!this.props.isOpen) {
          this.toggle(e);
        }
        setTimeout(() => this.getMenuItems()[0]?.focus());
      } else if (this.props.isOpen && isTab) {
        // Focus the first menu item if tabbing from an open menu. We need this
        // for cases where the DropdownMenu sets a custom container, which may
        // not be the natural next item to tab to from the DropdownToggle.
        e.preventDefault();
        this.getMenuItems()[0]?.focus();
      } else if (this.props.isOpen && e.which === keyCodes.esc) {
        this.toggle(e);
      }
    }

    if (this.props.isOpen && isTargetMenuItem) {
      if ([keyCodes.tab, keyCodes.esc].indexOf(e.which) > -1) {
        this.toggle(e);
        this.getMenuCtrl().focus();
      } else if ([keyCodes.space, keyCodes.enter].indexOf(e.which) > -1) {
        e.target.click();
        this.getMenuCtrl().focus();
      } else if (
        [keyCodes.down, keyCodes.up].indexOf(e.which) > -1 ||
        ([keyCodes.n, keyCodes.p].indexOf(e.which) > -1 && e.ctrlKey)
      ) {
        const $menuitems = this.getMenuItems();
        let index = $menuitems.indexOf(e.target);
        if (keyCodes.up === e.which || (keyCodes.p === e.which && e.ctrlKey)) {
          index = index !== 0 ? index - 1 : $menuitems.length - 1;
        } else if (
          keyCodes.down === e.which ||
          (keyCodes.n === e.which && e.ctrlKey)
        ) {
          index = index === $menuitems.length - 1 ? 0 : index + 1;
        }
        $menuitems[index].focus();
      } else if (keyCodes.end === e.which) {
        const $menuitems = this.getMenuItems();
        $menuitems[$menuitems.length - 1].focus();
      } else if (keyCodes.home === e.which) {
        const $menuitems = this.getMenuItems();
        $menuitems[0].focus();
      } else if (e.which >= 48 && e.which <= 90) {
        const $menuitems = this.getMenuItems();
        const charPressed = String.fromCharCode(e.which).toLowerCase();
        for (let i = 0; i < $menuitems.length; i += 1) {
          const firstLetter =
            $menuitems[i].textContent &&
            $menuitems[i].textContent[0].toLowerCase();
          if (firstLetter === charPressed) {
            $menuitems[i].focus();
            break;
          }
        }
      }
    }
  }

  handleProps() {
    if (this.props.isOpen) {
      this.addEvents();
    } else {
      this.removeEvents();
    }
  }

  getContextValue() {
    return {
      toggle: this.toggle,
      isOpen: this.props.isOpen,
      direction:
        this.props.direction === 'down' && this.props.dropup
          ? 'up'
          : this.props.direction,
      inNavbar: this.props.inNavbar,
      disabled: this.props.disabled,
      // Callback that should be called by DropdownMenu to provide a ref to
      // a HTML tag that's used for the DropdownMenu
      onMenuRef: this.handleMenuRef,
      onToggleRef: this.handleToggleRef,
      menuRole: this.props.menuRole,
    };
  }

  getContainer() {
    return this.containerRef.current;
  }

  getMenu() {
    return this.menuRef.current;
  }

  getToggle() {
    return this.toggleRef.current;
  }

  getMenuCtrl() {
    if (this._$menuCtrl) return this._$menuCtrl;
    this._$menuCtrl = this.getToggle();
    return this._$menuCtrl;
  }

  getItemType() {
    if (this.props.menuRole === 'listbox') {
      return 'option';
    }
    return 'menuitem';
  }

  getMenuItems() {
    // In a real menu with a child DropdownMenu, `this.getMenu()` should never
    // be null, but it is sometimes null in tests. To mitigate that, we just
    // use `this.getContainer()` as the fallback `menuContainer`.
    const menuContainer = this.getMenu() || this.getContainer();
    return [].slice.call(
      menuContainer.querySelectorAll(`[role="${this.getItemType()}"]`),
    );
  }

  addEvents() {
    ['click', 'touchstart', 'keyup'].forEach((event) =>
      document.addEventListener(event, this.handleDocumentClick, true),
    );
  }

  removeEvents() {
    ['click', 'touchstart', 'keyup'].forEach((event) =>
      document.removeEventListener(event, this.handleDocumentClick, true),
    );
  }

  toggle(e) {
    if (this.props.disabled) {
      return e && e.preventDefault();
    }

    return this.props.toggle(e);
  }

  render() {
    const {
      className,
      cssModule,
      direction,
      isOpen,
      group,
      size,
      nav,
      setActiveFromChild,
      active,
      tag,
      menuRole,
      ...attrs
    } = omit(this.props, ['toggle', 'disabled', 'inNavbar', 'a11y']);

    const Tag = tag || (nav ? 'li' : 'div');

    let subItemIsActive = false;
    if (setActiveFromChild) {
      React.Children.map(
        this.props.children[1].props.children,
        (dropdownItem) => {
          if (dropdownItem && dropdownItem.props.active) subItemIsActive = true;
        },
      );
    }

    const classes = mapToCssModules(
      classNames(
        className,
        nav && active ? 'active' : false,
        setActiveFromChild && subItemIsActive ? 'active' : false,
        {
          'btn-group': group,
          [`btn-group-${size}`]: !!size,
          dropdown: !group,
          dropup: direction === 'up',
          dropstart: direction === 'start' || direction === 'left',
          dropend: direction === 'end' || direction === 'right',
          show: isOpen,
          'nav-item': nav,
        },
      ),
      cssModule,
    );

    if (this.context.insideInputGroup) {
      return (
        <DropdownContext.Provider value={this.getContextValue()}>
          <Manager>
            {React.Children.map(this.props.children, (child) =>
              React.cloneElement(child, { onKeyDown: this.handleKeyDown }),
            )}
          </Manager>
        </DropdownContext.Provider>
      );
    }

    return (
      <DropdownContext.Provider value={this.getContextValue()}>
        <Manager>
          <Tag
            {...attrs}
            {...{
              [typeof Tag === 'string' ? 'ref' : 'innerRef']: this.containerRef,
            }}
            onKeyDown={this.handleKeyDown}
            className={classes}
          />
        </Manager>
      </DropdownContext.Provider>
    );
  }
}

Dropdown.propTypes = propTypes;
Dropdown.defaultProps = defaultProps;
Dropdown.contextType = InputGroupContext;

export default Dropdown;


text:
{
	"translatorID": "649c2836-a94d-4bbe-8e28-6771f283702f",
	"label": "TVNZ",
	"creator": "Philipp Zumstein",
	"target": "^https?://(www\\.)?tvnz\\.co\\.nz/one-news/",
	"minVersion": "3.0",
	"maxVersion": "",
	"priority": 100,
	"inRepository": true,
	"translatorType": 4,
	"browserSupport": "gcsibv",
	"lastUpdated": "2019-04-07 18:10:37"
}

function detectWeb(doc, url) {
	if (url.includes("/search?") && getSearchResults(doc, true)) {
		return "multiple";
	}
	if (ZU.xpathText(doc, '//meta[@property="og:type"]/@content')) {
		return "newspaperArticle";
	}
	return false;
}

function scrape(doc, url) {
	var item = new Zotero.Item("newspaperArticle");
	item.title = ZU.xpathText(doc, '//meta[@property="og:title"]/@content');
	item.date = ZU.xpathText(doc, '(//div[contains(@class, "storyPage") and h1]//time)[1]');
	if (item.date) {
		if (item.date.match(/\d\d?:\d\d[pa]m/)) {
			item.date = "Today";
		}
		else if (!item.date.match(/\d\d\d\d/)) {
			item.date += " 2017";
		}
		item.date = ZU.strToISO(item.date);
	}
	item.abstractNote = ZU.xpathText(doc, '//meta[@property="og:description"]/@content');
	var tagString = ZU.xpathText(doc, '//meta[@name="news_keywords"]/@content');
	if (tagString) {
		item.tags = tagString.split(', ');
	}
	item.section = ZU.xpathText(doc, '//div[@class="colStorySectionHeader"]/div[@class="tagItem"]/h2');
	item.url = ZU.xpathText(doc, '//link[@rel="canonical"]/@href') || url;
	item.publicationTitle = "TVNZ";
	item.language = "en-NZ";
	item.complete();
}

function getSearchResults(doc, checkOnly) {
	var items = {};
	var found = false;
	var rows = ZU.xpath(doc, '//div[@class="tileContent"]/a[h3]');
	for (var i = 0; i < rows.length; i++) {
		var href = rows[i].href;
		var title = ZU.trimInternal(rows[i].textContent);
		if (!href || !title) continue;
		if (checkOnly) return true;
		found = true;
		items[href] = title;
	}
	return found ? items : false;
}

function doWeb(doc, url) {
	if (detectWeb(doc, url) == "multiple") {
		Zotero.selectItems(getSearchResults(doc, false), function (items) {
			if (items) ZU.processDocuments(Object.keys(items), scrape);
		});
	}
	else {
		scrape(doc, url);
	}
}

/** BEGIN TEST CASES **/
var testCases = [
	{
		"type": "web",
		"url": "https://www.tvnz.co.nz/one-news/new-zealand/below-average-temperatures-forecast-across-nz-first-half-july",
		"items": [
			{
				"itemType": "newspaperArticle",
				"title": "Below average temperatures forecast across NZ for first half of July",
				"creators": [],
				"date": "2017-07-05",
				"abstractNote": "MetService's long-range forecast for this month has colder temperatures than usual.",
				"language": "en-NZ",
				"libraryCatalog": "TVNZ",
				"publicationTitle": "TVNZ",
				"section": "New Zealand",
				"url": "https://www.tvnz.co.nz/one-news/new-zealand/below-average-temperatures-forecast-across-nz-first-half-july",
				"attachments": [],
				"tags": [
					"new-zealand",
					"nzn",
					"one-news",
					"weather-news"
				],
				"notes": [],
				"seeAlso": []
			}
		]
	},
	{
		"type": "web",
		"url": "https://www.tvnz.co.nz/one-news/new-zealand/watch-stunning-aurora-australis-storm-lights-up-southern-skies",
		"items": [
			{
				"itemType": "newspaperArticle",
				"title": "Watch: Stunning Aurora Australis storm lights up southern skies",
				"creators": [],
				"date": "2017-05-28",
				"abstractNote": "A geomagnetic storm made for some incredible photos in the South Island overnight.",
				"language": "en-NZ",
				"libraryCatalog": "TVNZ",
				"publicationTitle": "TVNZ",
				"section": "New Zealand",
				"shortTitle": "Watch",
				"url": "https://www.tvnz.co.nz/one-news/new-zealand/watch-stunning-aurora-australis-storm-lights-up-southern-skies",
				"attachments": [],
				"tags": [
					"breakfast",
					"new-zealand",
					"space"
				],
				"notes": [],
				"seeAlso": []
			}
		]
	},
	{
		"type": "web",
		"url": "https://www.tvnz.co.nz/one-news/search?q=storm",
		"items": "multiple"
	}
]
/** END TEST CASES **/


text:
<?php
/**
 * PHP fault tolerance library
 *
 * @author    Михаил Красильников <m.krasilnikov@yandex.ru>
 * @license   http://opensource.org/licenses/MIT MIT
 */
namespace Mekras\Obereg\Exception;

/**
 * Runtime exception.
 *
 * @api
 * @since 1.0
 */
class RuntimeException extends \RuntimeException
{
}