text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>B-Index (Media Authoring with Java API)</title>
<meta name="date" content="2016-02-05">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Media Authoring with Java API (MAJ)

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I J K L M N O P Q R S T U V W X Z _

B

BadCloseException - Exception in tv.amwa.maj.exception

Thrown when an attempt is made to open a file that has not yet been closed.

BadCloseException(String) - Constructor for exception tv.amwa.maj.exception.BadCloseException

Create a new bad file close exception with the given descriptive message.

BadCloseException() - Constructor for exception tv.amwa.maj.exception.BadCloseException

Create a new bad file close exception with no message.

BadLengthException - Exception in tv.amwa.maj.exception

Thrown when an out of range length value is set for a component
 or fade in the current context.

BadLengthException(String) - Constructor for exception tv.amwa.maj.exception.BadLengthException

Create a new bad length exception with the given descriptive message.

BadLengthException() - Constructor for exception tv.amwa.maj.exception.BadLengthException

Create a new bad length exception with no message.

BadOpenException - Exception in tv.amwa.maj.exception

Thrown when an attempt is made to perform an operation on a random access file
 that is not currently open.

BadOpenException(String) - Constructor for exception tv.amwa.maj.exception.BadOpenException

Create a new bad open exception with the given descriptive message.

BadOpenException() - Constructor for exception tv.amwa.maj.exception.BadOpenException

Create a new bad open exception with no message.

BadParameterException - Exception in tv.amwa.maj.exception

Thrown when a lookup operation fails because the given parameter cannot be
 found in a known collection of values.

BadParameterException(String) - Constructor for exception tv.amwa.maj.exception.BadParameterException

Create a new bad parameter exception with the given descriptive message.

BadParameterException() - Constructor for exception tv.amwa.maj.exception.BadParameterException

Create a new bad parameter exception with no message.

BadPropertyException - Exception in tv.amwa.maj.exception

Thrown when an optional property should be omitted in the current context.

BadPropertyException(String) - Constructor for exception tv.amwa.maj.exception.BadPropertyException

Create a new bad property exception with the given descriptive message.

BadPropertyException() - Constructor for exception tv.amwa.maj.exception.BadPropertyException

Create a new bad property exception with no message.

BadRateException - Exception in tv.amwa.maj.exception

Thrown if an unacceptable edit rate is set for a source package's track.

BadRateException(String) - Constructor for exception tv.amwa.maj.exception.BadRateException

Create a new bad rate exception with the given descriptive message.

BadRateException() - Constructor for exception tv.amwa.maj.exception.BadRateException

Create a new bad rate exception with no message.

BadSampleOffsetException - Exception in tv.amwa.maj.exception

Thrown when an offset into a segment or some
 file-based essence, specified by timecode or frames, is out of range.

BadSampleOffsetException(String) - Constructor for exception tv.amwa.maj.exception.BadSampleOffsetException

Create a new bad sample offset exception with the given descriptive message.

BadSampleOffsetException() - Constructor for exception tv.amwa.maj.exception.BadSampleOffsetException

Create a new bad sample offset exception with no message.

BadSizeException - Exception in tv.amwa.maj.exception

Thrown when an array is not of the required number of elements.

BadSizeException(String) - Constructor for exception tv.amwa.maj.exception.BadSizeException

Create a new bad size exception with the given descriptive message.

BadSizeException() - Constructor for exception tv.amwa.maj.exception.BadSizeException

Create a new bad size exception with no message.

BadTypeException - Exception in tv.amwa.maj.exception

Thrown when a method call on an object in the meta dictionary passes in the
 wrong type of property value as a
 parameter.

BadTypeException(String) - Constructor for exception tv.amwa.maj.exception.BadTypeException

Create a new bad type exception with the given descriptive message.

BadTypeException() - Constructor for exception tv.amwa.maj.exception.BadTypeException

Create a new bad type exception with no message.

BaseIntegerValue() - Constructor for class tv.amwa.maj.meta.impl.TypeDefinitionIntegerImpl.BaseIntegerValue

BaseStringValue() - Constructor for class tv.amwa.maj.meta.impl.TypeDefinitionStringImpl.BaseStringValue

BaseUniversalLabel - Static variable in interface tv.amwa.maj.record.PackageID

Base universal label to use to create SMPTE-compliant package identifiers.

BLACKREFLEVEL_DEFAULT - Static variable in interface tv.amwa.maj.model.CDCIDescriptor

Default value for the black reference level property which is 0.

BLOCKSTARTOFFSET_DEFAULT - Static variable in interface tv.amwa.maj.model.AES3PCMDescriptor

Default value for the block start offset property, which is 0.

BodyClosedCompletePartitionPack - Interface in tv.amwa.maj.io.mxf

Represents the description of body partition that is closed
 and complete.

BodyClosedCompletePartitionPackImpl - Class in tv.amwa.maj.io.mxf.impl

BodyClosedCompletePartitionPackImpl() - Constructor for class tv.amwa.maj.io.mxf.impl.BodyClosedCompletePartitionPackImpl

BodyClosedIncompletePartitionPack - Interface in tv.amwa.maj.io.mxf

Represents the description of body partition that is closed
 and incomplete.

BodyClosedIncompletePartitionPackImpl - Class in tv.amwa.maj.io.mxf.impl

BodyClosedIncompletePartitionPackImpl() - Constructor for class tv.amwa.maj.io.mxf.impl.BodyClosedIncompletePartitionPackImpl

BodyOpenCompletePartitionPack - Interface in tv.amwa.maj.io.mxf

Represents the description of body partition that is open
 and complete.

BodyOpenCompletePartitionPackImpl - Class in tv.amwa.maj.io.mxf.impl

BodyOpenCompletePartitionPackImpl() - Constructor for class tv.amwa.maj.io.mxf.impl.BodyOpenCompletePartitionPackImpl

BodyOpenIncompletePartitionPack - Interface in tv.amwa.maj.io.mxf

Represents the description of body partition that is open
 and incomplete.

BodyOpenIncompletePartitionPackImpl - Class in tv.amwa.maj.io.mxf.impl

BodyOpenIncompletePartitionPackImpl() - Constructor for class tv.amwa.maj.io.mxf.impl.BodyOpenIncompletePartitionPackImpl

BodyPartition - Interface in tv.amwa.maj.io.mxf

Represents a body partition of an MXF file, providing access to its constituent parts.

BodyPartitionImpl - Class in tv.amwa.maj.io.mxf.impl

BodyPartitionImpl() - Constructor for class tv.amwa.maj.io.mxf.impl.BodyPartitionImpl

BodyPartitionPack - Interface in tv.amwa.maj.io.mxf

Represents the description of a body partition, including its
 size and what it contains.

BodyPartitionPackImpl - Class in tv.amwa.maj.io.mxf.impl

BodyPartitionPackImpl() - Constructor for class tv.amwa.maj.io.mxf.impl.BodyPartitionPackImpl

BodyReader - Class in tv.amwa.maj.io.mxf

Reads data from the body of a MXF file.

BodyReader(MXFFileImpl) - Constructor for class tv.amwa.maj.io.mxf.BodyReader

BODYSID_DEFAULT - Static variable in interface tv.amwa.maj.io.mxf.PartitionPack

Default value for the identity of any stream of essence (body) in
 this partition, which is 0.

BODYSID_TAG - Static variable in class tv.amwa.maj.io.mxf.impl.RandomIndexItemImpl

Bool - Annotation Type in tv.amwa.maj.misctype

Label for a Java boolean value used to represent an AAF Boolean value.

Boolean - Enum in tv.amwa.maj.enumeration

Representation of Boolean values as an enumeration, as per the AAF-defined representation.

Boolean - Static variable in interface tv.amwa.maj.industry.TypeDefinitions

Defines the type of Boolean values that are either true or
 false.

BSpline - Static variable in interface tv.amwa.maj.constant.InterpolationConstant

Interpolation defined over a set of control points
 where the output is computed by the calculation of a B-spline function.

buildPartitionsBackwards(PartitionPack) - Method in class tv.amwa.maj.io.mxf.impl.MXFFileImpl

buildPartitionsTable() - Method in class tv.amwa.maj.io.mxf.impl.MXFFileImpl

buildPartitionsTable() - Method in interface tv.amwa.maj.io.mxf.MXFFile

Build a partition table from this MXF file containing all the byte offsets
 of all the partitions in this MXF file.

buildRIP() - Method in class tv.amwa.maj.io.mxf.impl.MXFFileImpl

buildRIP() - Method in interface tv.amwa.maj.io.mxf.MXFFile

BWFImportDescriptor - Interface in tv.amwa.maj.model

Specifies the description of audio essence that is formatted according the the
 Broadcast Wave Format
 specifications, which is a file essence source that is not directly manipulated by an AAF application.

BWFImportDescriptorImpl - Class in tv.amwa.maj.model.impl

Implements the description of audio essence that is formatted according the the
 Broadcast Wave Format
 specifications, which is a file essence source that is not directly manipulated by an AAF application.

BWFImportDescriptorImpl() - Constructor for class tv.amwa.maj.model.impl.BWFImportDescriptorImpl

Creates and initializes a new BWF import descriptor, which specifies audio data
 essence according to the Broadcast Wave specifications.

BYTE - Static variable in interface tv.amwa.maj.meta.TypeDefinitionInteger

Number of bytes used to represent a Java byte value.

byteFromCharacter(char) - Static method in class tv.amwa.maj.util.Utilities

Convert a character representing a hexidecimal digit to the 4 least significant bits
 of a byte value of equivalent value.

BYTEOFFSET_TAG - Static variable in class tv.amwa.maj.io.mxf.impl.RandomIndexItemImpl

ByteOrder - Enum in tv.amwa.maj.enumeration

Specifies the byte order of a file, such as an AAF file.

ByteOrderPropertyID - Static variable in interface tv.amwa.maj.io.aaf.AAFConstants

bytesToHexChars(byte[]) - Static method in class tv.amwa.maj.util.Utilities

Convert binary data into a sequence of pairs of hexadecimal character values.

A B C D E F G H I J K L M N O P Q R S T U V W X Z _

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Media Authoring with Java API (MAJ)

Prev Letter

Next Letter

Frames

No Frames

All Classes

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed 						under Apache 2 license and subject to the AMWA IPR policy.

redpajama_set_name: RedPajamaGithub


text:
* [Search](search)
  * [binary search](search/binary_search)
  * [linear search](search/linear_search)
  * [jump search](search/jump_search)
  * [ternary search](search/ternary_search)
  * [interpolation search](search/interpolation_search)
  * [best first search](search/best_first_search)
* [Sort](sort)
  * [bubble sort](sort/bubble_sort)
  * [bogo sort](sort/bogo_sort)
  * [insertion sort](sort/insertion_sort)
  * [quick sort](sort/quick_sort)
  * [merge sort](sort/merge_sort)
  * [heap sort](sort/heap_sort)
  * [selection sort](sort/selection_sort)
  * [counting sort](sort/counting_sort)
  * [radix sort](sort/radix_sort)
  * [shell sort](sort/shell_sort)
  * [shaker sort](sort/shaker_sort)
  * [comb sort](sort/Comb_sort)
  * [bucket sort](sort/bucket_sort)
  * [cycle sort](sort/cycle_sort)
  * [python bucket sort](sort/python_bucket_sort)
  * [binary insertion sort](sort/binary%20insertion%20sort.cpp)
  * [slow sort](sort/Slow_Sort)
* [Math](math)
  * [russian peasant](math/russian_peasant)
  * [towers of hanoi](math/towers_of_hanoi)
  * [armstrong number](math/armstrong_number)
  * [euclid's gcd](math/euclids_gcd)
  * [prime seive](math/prime_seive)
  * [strong number](math/strong_number)
  * [factorial](math/factorial)
  * [fibonacci sequence](math/fibonacci)
  * [sum of digits](math/sum_of_digits)
  * [fast exponentiation](math/fast_exponentiation)
  * [add binary numbers](math/AddBinaryNumbers)
  * [interval bisection](math/interval_bisection)
  * [lucas series](math/lucas_series)
  * [numerical integration](math/numerical_integration)
  * [pernicious number](math/pernicious_number)
  * [catalan number](math/catalan)
  * [moments](math/moments)
  * [primality check](math/is_prime)
  * [euler's totient](math/eulers_totient_function)
  * [gauss legendre](math/gauss_legendre)
  * [gram schmidt process](math/gram-schmidt_process)
  * [binomial coefficient](math/binomial_coefficient)
  * [perfect number](math/perfect_number)
  * [basic](math/basic)
  * [average stream numbers](math/average_stream_numbers)
  * [babylonian method](math/babylonian_method)
  * [arithmetic on very large numbers](math/arithmetic%20on%20very%20large%20numbers)
  * [automorphic numbers](math/automorphic_numbers)
  * [josepheus_problem](math/josepheus_problem)
  * [fast pow](math/fast_pow)
* [Cryptography](cryptography)
  * [affine cipher](cryptography/affine_cipher)
  * [autokey cipher](cryptography/autokey_cipher)
  * [baconian cipher](cryptography/baconian_cipher)
  * [morse cipher](cryptography/morse_cipher)
  * [porta cipher](cryptography/porta_cipher)
  * [rot13 cipher](cryptogrpahy/rot13_cipher)
  * [rsa](cryptography/rsa)
  * [running key cipher](cryptography/runningkey_cipher)
  * [caesar cipher](cryptography/caesar_cipher)
  * [substitution cipher](cryptography/substitution_cipher)
  * [vernam cipher](cryptography/vernam_cipher)
  * [vigenere cipher](cryptography/vigenere_cipher)
  * [playfair cipher](cryptography/playfair_cipher)
  * [chinese cipher](cryptography/chinese_cipher)
  * [codewheel](cryptography/codewheel)
  * [end to end](cryptography/end_to_end)
  * [polybius cipher](cryptography/polybius_cipher)
  * [atbash cipher](cryptography/atbash_cipher)
  * [hill cipher](cryptography/hillcipher)
  * [rail fence cipher](cryptography/rail_fence_cipher)
  * [ElGamal](cryptography/ElGamal)
* [Geometry](geometry)
  * [graham scan](geometry/graham_scan)
* [Greedy](greedy)
  * [dijkstra's algorithm](greedy/dijkstra_shortest_path)
  * [huffman coding](greedy/huffman_coding)
  * [minimum coins](greedy/minimum_coins)
  * [kruskal's algorithm](greedy/kruskal's_algorithm)
  * [prim's algorithm](greedy/prim's_algorithm)
  * [job sequencing problem](greedy/Job_sequencing_problem)
  * [egyptian fraction](greedy/egyptian_fraction)
  * [activity selection](greedy/activity_selection)
  * [activity selection problem](greedy/activity_selection_problem)
  * [knapsack problem](greedy/knapsack_problem)
* [Graphs](data_structures/Graphs/graphsearch)
  * [bellman ford algorithm](data_structures/Graphs/graphsearch/bellman_ford_algorithm)
  * [cycle directed graph](data_structures/Graphs/graphsearch/cycle_directed_graph)
  * [cycle undirected graph](data_structures/Graphs/graphsearch/cycle_undirected_graph)
  * [graph coloring](data_structures/Graphs/graphsearch/graph_coloring)
  * [longest path directed acyclic graph](data_structures/Graphs/graphsearch/longest_path_directed_acyclic_graph)
  * [transitive closure graph](data_structures/Graphs/graphsearch/transitive_closure_graph)
  * [travelling salesman mst](data_structures/Graphs/graphsearch/travelling_salesman_mst)
  * [breadth-first-search](data_structures/Graphs/graphsearch/breadth-first-search)
  * [depth-first-search](data_structures/Graphs/graphsearch/depth-first-search)
  * [topological sorting](data_structures/Graphs/graphsearch/topological_sorting)
  * [a-star search](data_structures/Graphs/graphsearch/a-star-search)
  * [dijkstra](data_structures/Graphs/graphsearch/dijkstra)
  * [dinics algorithm](data_structures/Graphs/graphsearch/dinics_algorithm)
* [String search](string_search)
  * [knuth morris pratt](string_search/knuth_morris_pratt)
  * [rabin karp](string_search/rabin_karp)
  * [quick search](string_search/quick_search)
  * [tries](string_search/Tries)
* [Cluster analysis](cluster_analysis)
  * [k-means](cluster_analysis/k-means)
  * [DBSCAN](cluster_analysis/dbscan)
* [Dynamic Programming](dp)
  * [kadane algorithm](dp/kadane-_algorithm)
  * [knapsack algorithm](dp/knapsack_problem)
  * [levenshtein distance](dp/levenshtein_distance)
  * [minimum cost path](dp/min_cost_path)
  * [matrix chain multiplication](dp/matrix_chain_multiplication)
  * [floyd Warshall algorithm](dp/floyd_warshall_algorithm)
  * [coin change](dp/coin_change)
  * [longest common subsequence](dp/longest_common_subsequence)
  * [longest increasing subsequence](dp/longest_increasing_subsequence)
  * [longest palindromic subsequence](dp/longest_palindromic_subsequence)
  * [maximum subarray problem](dp/maximum_subarray_problem)
  * [rod cutting](dp/rod_cutting)
  * [subset sum](dp/subset_sum)
* [Data structures](data_structures)
  * [disjoint set union](data_structures/disjoint_set_union)
  * [graphs](data_structures/graphs)
  * [heap](data_structures/heap)
  * [kd tree](data_structures/kd_tree)
  * [linked list](data_structures/linked_list)
  * [avl tree](data_structures/avl_tree)
  * [heap](data_structures/heap)
  * [b tree](data_structures/b_tree)
  * [dictionary](data_structures/dictionary)
  * [queue](data_structures/Queue)
  * [stack](data_structures/Stack)
  * [hash table](data_structures/hash_table)
  * [binary search tree](data_structures/binarySearch_tree)
  * [binary indexed tree](data_structures/binary_indexed_tree)
  * [red and black tree](data_structures/red_and_black_tree)
  * [segment tree](data_structures/segment_tree)
  * [splay tree](data_structures/Splay_trees)
* [Backtracking](backtracking)
  * [sudoku](backtracking/sudoku)
  * [permutations](backtracking/permutations)
  * [knights tour](backtracking/knightsTour)
  * [n queens](backtracking/n-queens)
  * [rat in a maze](backtracking/rat_in_a_maze)
  * [wordsearch](backtracking/wordsearch)
* [Synchronization](synchronization)
  * [Producer consumer problem](synchronization/ProducerConsumer)


text:
package alec_wam.CrystalMod.world.crystex.biomes;

import java.util.Random;

import alec_wam.CrystalMod.blocks.ModBlocks;
import alec_wam.CrystalMod.util.CrystalColors;
import alec_wam.CrystalMod.world.WorldGenCrystalTree;
import alec_wam.CrystalMod.world.generation.WorldGenCustomTallGrass;
import net.minecraft.world.biome.BiomeForest;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenerator;

public class BiomeCrystexForest extends BiomeForest implements ICrystexColorBiome {

	public final WorldGenCrystalTree CRYSTAL_TREE;
	public final WorldGenCrystalTree CRYSTAL_TREE_SPECIAL;
    public final CrystalColors.SuperSpecial color;
	public BiomeCrystexForest(CrystalColors.SuperSpecial color, BiomeProperties properties) {
		super(Type.NORMAL, properties);
		this.color = color;
		CRYSTAL_TREE = new WorldGenCrystalTree(false, 4, color, false);
		CRYSTAL_TREE_SPECIAL = new WorldGenCrystalTree(false, 6, color, true);
		topBlock = ModBlocks.crystexGrass.getDefaultState().withProperty(CrystalColors.COLOR_SUPER, color);
	}

	@Override
	public WorldGenAbstractTree genBigTreeChance(Random rand)
    {
        return (WorldGenAbstractTree)(rand.nextInt(10) == 0 ? CRYSTAL_TREE_SPECIAL : CRYSTAL_TREE);
    }

	@Override
	public WorldGenerator getRandomWorldGenForGrass(Random rand)
    {
		return new WorldGenCustomTallGrass(ModBlocks.crystexTallGrass.getDefaultState().withProperty(CrystalColors.COLOR_SUPER, color));
    }

	@Override
	public CrystalColors.SuperSpecial getColor() {
		return color;
	}

	//TODO Add Crystex Flower Gen

}


text:
title: Tutorials
priority: 0
subtitle: Tutorials for getting start with Dataform web.
---


text:
package com.blazebit.persistence.view.impl.filter;

import java.io.Serializable;
import java.text.ParseException;

import com.blazebit.text.FormatUtils;

/**
 *
 * @author Christian Beikov
 * @since 1.0.0
 */
public final class FilterUtils {

    private FilterUtils() {
    }

    @SuppressWarnings("unchecked")
    public static Object parseValue(Class<?> clazz, Object value) {
        try {
            return FormatUtils.getParsedValue((Class<? extends Serializable>) clazz, value.toString());
        } catch (ParseException ex) {
            throw new IllegalArgumentException("The given value '" + value + "' could not be parsed into an object of type '" + clazz.getName() + "'", ex);
        }
    }
}


text:
#include "rtc_base/synchronization/yield_policy.h"

#include <thread>  // Not allowed in production per Chromium style guide.

#include "rtc_base/event.h"
#include "test/gmock.h"
#include "test/gtest.h"

namespace rtc {
namespace {
class MockYieldHandler : public YieldInterface {
 public:
  MOCK_METHOD0(YieldExecution, void());
};
}  // namespace
TEST(YieldPolicyTest, HandlerReceivesYieldSignalWhenSet) {
  ::testing::StrictMock<MockYieldHandler> handler;
  {
    Event event;
    EXPECT_CALL(handler, YieldExecution()).Times(1);
    ScopedYieldPolicy policy(&handler);
    event.Set();
    event.Wait(Event::kForever);
  }
  {
    Event event;
    EXPECT_CALL(handler, YieldExecution()).Times(0);
    event.Set();
    event.Wait(Event::kForever);
  }
}

TEST(YieldPolicyTest, IsThreadLocal) {
  Event events[3];
  std::thread other_thread([&]() {
    ::testing::StrictMock<MockYieldHandler> local_handler;
    // The local handler is never called as we never Wait on this thread.
    EXPECT_CALL(local_handler, YieldExecution()).Times(0);
    ScopedYieldPolicy policy(&local_handler);
    events[0].Set();
    events[1].Set();
    events[2].Set();
  });

  // Waiting until the other thread has entered the scoped policy.
  events[0].Wait(Event::kForever);
  // Wait on this thread should not trigger the handler of that policy as it's
  // thread local.
  events[1].Wait(Event::kForever);

  // We can set a policy that's active on this thread independently.
  ::testing::StrictMock<MockYieldHandler> main_handler;
  EXPECT_CALL(main_handler, YieldExecution()).Times(1);
  ScopedYieldPolicy policy(&main_handler);
  events[2].Wait(Event::kForever);
  other_thread.join();
}
}  // namespace rtc


text:
"""
Django settings for project project.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
        },
    },
]

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'restclients',
    'rc_django',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'travis-ci.urls'

WSGI_APPLICATION = 'travis-ci.wsgi.application'

# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/

STATIC_URL = '/static/'

# Test the memcached cache code
RESTCLIENTS_TEST_MEMCACHED = True
RESTCLIENTS_MEMCACHED_SERVERS = ('localhost:11211', )
RESTCLIENTS_REQUIRE_VIEW_TESTS = True

AUTHZ_GROUP_BACKEND = "authz_group.authz_implementation.all_ok.AllOK"
RESTCLIENTS_ADMIN_GROUP = "x"


text:
/// <reference path='./Scripts/DlhSoft.ProjectData.GanttChart.HTML.Controls.d.ts'/>
import GanttChartView = DlhSoft.Controls.GanttChartView;
import GanttChartItem = GanttChartView.Item;
import PredecessorItem = GanttChartView.PredecessorItem;

// Query string syntax: ?theme
// Supported themes: Default, Generic-bright, Generic-blue, DlhSoft-gray, Purple-green, Steel-blue, Dark-black, Cyan-green, Blue-navy, Orange-brown, Teal-green, Purple-beige, Gray-blue, Aero.
var queryString = window.location.search;
var theme = queryString ? queryString.substr(1) : null;
declare var initializeGanttChartTheme;

// Retrieve and store the control element for reference purposes.
var ganttChartViewElement = <HTMLElement>document.querySelector('#ganttChartView');

var date = new Date(), year = date.getFullYear(), month = date.getMonth();
var items = <GanttChartItem[]>[
    { content: 'Task 1', isExpanded: false, start: new Date() },
    { content: 'Task 1.1', indentation: 1, start: new Date(year, month, 2, 8, 0, 0), finish: new Date(year, month, 4, 16, 0, 0) },
    { content: 'Task 1.2', indentation: 1, start: new Date(year, month, 3, 8, 0, 0), finish: new Date(year, month, 5, 12, 0, 0) },
    { content: 'Task 2', isExpanded: true, start: new Date() },
    { content: 'Task 2.1', indentation: 1, start: new Date(year, month, 2, 8, 0, 0), finish: new Date(year, month, 8, 16, 0, 0), completedFinish: new Date(year, month, 5, 16, 0, 0), assignmentsContent: 'Resource 1, Resource 2 [50%]' },
    { content: 'Task 2.2', indentation: 1, start: new Date() },
    { content: 'Task 2.2.1', indentation: 2, start: new Date(year, month, 11, 8, 0, 0), finish: new Date(year, month, 14, 16, 0, 0), completedFinish: new Date(year, month, 14, 16, 0, 0), assignmentsContent: 'Resource 2' },
    { content: 'Task 2.2.2', indentation: 2, start: new Date(year, month, 12, 12, 0, 0), finish: new Date(year, month, 14, 16, 0, 0), assignmentsContent: 'Resource 2' },
    { content: 'Task 3', indentation: 1, start: new Date(year, month, 15, 16, 0, 0), isMilestone: true }];
items[3].predecessors = [{ item: items[0], dependencyType: 'SS' }];
items[7].predecessors = [{ item: items[6], lag: 2 * 60 * 60 * 1000 }];
items[8].predecessors = [{ item: items[4] }, { item: items[5] }];
for (var i = 4; i <= 16; i++)
    items.push({ content: 'Task ' + i, indentation: i >= 8 && i % 3 == 2 ? 0 : 1, start: new Date(year, month, 2 + (i <= 8 ? (i - 4) * 3 : i - 8), 8, 0, 0), finish: new Date(year, month, 2 + (i <= 8 ? (i - 4) * 3 + (i > 8 ? 6 : 1) : i - 2), 16, 0, 0) });

var settings = <GanttChartView.Settings>{ currentTime: new Date(year, month, 2, 12, 0, 0) };

// Optionally, initialize custom themes (themes.js).
initializeGanttChartTheme(settings, theme);

// Define custom assignments template.
var assignmentsTemplate = (item) => {
    var undefinedType = 'undefined', svgns = 'http://www.w3.org/2000/svg', hourDuration = 60 * 60 * 1000;
    var ganttChartView = item.ganttChartView;
    var settings = ganttChartView.settings;
    var document = ganttChartView.ownerDocument;
    var group = document.createElementNS(svgns, 'g');
    var icon = document.createElementNS(svgns, 'image');
    var text = document.createElementNS(svgns, 'text');
    var itemRight = ganttChartView.getChartPosition(item.finish);
    if (item.isMilestone || (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled)))
        itemRight += settings.barHeight / 2;
    icon.setAttribute('x', itemRight + 7);
    icon.setAttribute('y', settings.barMargin);
    icon.setAttribute('width', '16px');
    icon.setAttribute('height', '16px');
    text.setAttribute('x', itemRight + 7 + 16 + 2);
    text.setAttribute('y', settings.barMargin + settings.barHeight - 1);
    var content = item.assignmentsContent;
    if (typeof content === undefinedType)
        content = '';
    var resource = content;
    var resourceCommaIndex = resource.indexOf(',');
    if (resourceCommaIndex >= 0)
        resource = resource.substr(0, resourceCommaIndex);
    if (resource && resource != 'Resource 1' && resource != 'Resource 2')
        resource = 'Other';
    icon.setAttribute('href', 'Images/' + resource + '.png');
    text.appendChild(document.createTextNode(content));
    if (typeof settings.assignmentsClass !== undefinedType)
        text.setAttribute('class', settings.assignmentsClass);
    else if (typeof settings.assignmentsStyle !== undefinedType)
        text.setAttribute('style', settings.assignmentsStyle);
    if (resource)
        group.appendChild(icon);
    group.appendChild(text);
    return group;
};
settings.assignmentsTemplate = assignmentsTemplate;

// Initialize the component.
var ganttChartView = DlhSoft.Controls.GanttChartView.initialize(ganttChartViewElement, items, settings);


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Machilus suaveolens S.K.Lee

### Remarks
null


text:
use strict;

use Data::Dumper;
use lib '%VHFFS_LIB_DIR%';
use Vhffs;
use Vhffs::Services::DNS;

my $vhffs = new Vhffs;

die("Usage: $0 domainname\n") unless(@ARGV == 1);

my ($domainname) = @ARGV;

my $dns = Vhffs::Services::DNS::get_by_domainname($vhffs, $domainname);

die("Domain name not found\n") unless(defined $dns);

print Dumper $dns;


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

var _ = require('lodash');
var Promise = require('bluebird');
var ractiveLoad = require('ractive-load');

var rr = require('./ractive-render');
var utils = require('./utils');
module.exports = load;

/**
 * Ractive load config
 */
ractiveLoad.cache = false;

/**
 * Create a component from the given file using RVC
 *
 * @param {String} file
 * @param {Object} options
 * @returns {Promise}
 * @public
 */
function load(file, options) {
	console.log("Load load", file);
	if (options.cache && rr.cache['load!' + file]) {
		return Promise.resolve(rr.cache['load!' + file]);
	}

	return ractiveLoad(file.replace(/\\/g, '/')).then(function (Component) {
		return utils.wrap(utils.selectTemplate(options, Component), options).then(function (template) {
			var basePath = path.relative(options.settings.views, path.dirname(file));
			Component.defaults.template = options.template = template;

			return Promise.join(utils.buildComponentsRegistry(options), utils.buildPartialsRegistry(basePath, options), function (components, partials) {
				_.assign(Component.components, components);
				_.assign(Component.partials, partials);
				options.components = {};
				options.partials = {};

				if (options.cache) {
					rr.cache['load!' + file] = Component;
				}

				return Component;
			});
		});
	});
}


text:
@name(light-footed)
@author(Ryan Sandor Richards)

# Passive: Light Footed
A racial passive that is granted by the `halfling` race. Players with the light
footed passive receive a 10% bonus to the `speed` ability score. This bonus
applies after all other additive bonuses (e.g. equipment, buffs) have been
applied.

See also: `halfling`


text:
package edu.mayo.mprc.messaging;

import edu.mayo.mprc.MprcException;
import org.apache.log4j.Logger;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.io.Serializable;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * Simple test of the messaging.
 */
public final class SendReceiveTest extends MessagingTestBase {
	private static final Logger LOGGER = Logger.getLogger(SendReceiveTest.class);
	private static final String REQUEST_1 = "Request!";
	private static final String RESPONSE_1 = "Response!";
	private static final String REQUEST_2 = "Request 2!";
	private static final String RESPONSE_2 = "Response 2!";
	private static final int TOTAL_REQUESTS = 1023;
	public static final int PRIORITY = 5;
	private final AtomicInteger numRequests = new AtomicInteger(0);
	private final AtomicInteger numResponses = new AtomicInteger(0);
	private int expectedNumRequests;
	private int expectedNumResponses;

	private static final int MAX_WAIT_FOR_MESSAGES_TO_ARRIVE = 10000;

	private void logChatty(final String message) {
		LOGGER.debug(message);
	}

	private void restartBroker() {
		LOGGER.debug("Restarting broker");
		broker.deleteAllMessages();
		LOGGER.debug("Broker restarted");
	}

	private void init() {
		startBroker();
		numRequests.set(0);
		numResponses.set(0);
		expectedNumRequests = 0;
		expectedNumResponses = 0;
	}

	private void cleanup() {
		try {
			int totalSleep = 0;
			while (numRequests.get() != expectedNumRequests || numResponses.get() != expectedNumResponses) {
				logChatty("Waiting for messages to be delivered. Requests :" + numRequests.get() + "/" + expectedNumRequests + " Responses: " + numResponses.get() + "/" + expectedNumResponses);
				try {
					Thread.sleep(100);
				} catch (InterruptedException e) {
					throw new MprcException("Sleep interrupted", e);
				}
				totalSleep += 100;
				if (totalSleep >= MAX_WAIT_FOR_MESSAGES_TO_ARRIVE) {
					Assert.fail("Slept for " + MAX_WAIT_FOR_MESSAGES_TO_ARRIVE + " and yet the expected amount of messages was not received: "
							+ numRequests.get() + "/" + expectedNumRequests + " requests, "
							+ numResponses.get() + "/" + expectedNumResponses + " responses.");
					break;
				}
			}

			Assert.assertEquals(numRequests.get(), expectedNumRequests, "The requests did not arrive ok.");
			Assert.assertEquals(numResponses.get(), expectedNumResponses, "The responses did not arrive ok.");
		} finally {
			stopBroker();
		}
	}

	@Test(enabled = true, groups = {"unit", "fast"})
	public void testJmsRequestOnly() {
		init();
		expectedNumRequests = 1;
		expectedNumResponses = 0;

		(new Thread() {
			@Override
			public void run() {
				final Request request = receiveRequest();

				Assert.assertEquals(request.getMessageData(), REQUEST_1, "Received wrong data");
				sendResponse(request);
				numRequests.incrementAndGet();
			}
		}).start();

		// Not interested in response
		LOGGER.debug("Sending single request");
		service.sendRequest(REQUEST_1, PRIORITY, null);
		cleanup();
	}

	private void sendResponse(final Request request) {
		try {
			logChatty("Sending response to request");
			request.sendResponse(RESPONSE_1, true);
		} catch (MprcException e) {
			Assert.fail(e.getMessage());
		}
	}

	private Request receiveRequest() {
		logChatty("Waiting to receive request");
		final Request request = service.receiveRequest(10000);
		if (request == null) {
			throw new MprcException("No request received within 10 seconds");
		}
		logChatty("Request received: " + request.toString());
		request.processed();
		return request;
	}

	@Test(enabled = true, groups = {"unit", "fast"}, dependsOnMethods = {"testJmsRequestOnly"})
	public void testJmsRequestResponse() {
		init();
		expectedNumRequests = 1;
		expectedNumResponses = 1;

		(new Thread() {
			@Override
			public void run() {
				final Request request = receiveRequest();

				Assert.assertEquals(request.getMessageData(), REQUEST_1, "Received wrong data");
				sendResponse(request);
				numRequests.incrementAndGet();
			}
		}).start();

		// Send request
		logChatty("Sending request, waiting for response");
		service.sendRequest(REQUEST_1, PRIORITY, new ResponseListener() {
			@Override
			public void responseReceived(final Serializable response, final boolean isClosing) {
				Assert.assertEquals(response, RESPONSE_1, "Response does not match expectations");
				Assert.assertTrue(isClosing, "This must be the only message sent");
				numResponses.incrementAndGet();
			}
		});
		cleanup();
	}

	@Test(enabled = true, groups = {"unit", "fast"})
	public void testMultipleMessages() {
		init();
		expectedNumRequests = TOTAL_REQUESTS;
		expectedNumResponses = TOTAL_REQUESTS;

		final Thread thread = new Thread() {
			@Override
			public void run() {
				while (TOTAL_REQUESTS > numRequests.get()) {
					Request request = null;
					try {
						logChatty("Receiving request");
						request = service.receiveRequest(0);
						if (request != null) {
							logChatty("Request received: " + request.toString());
							final String response = "response " + Integer.toString(numRequests.get() + 1);
							logChatty("Sending response: " + response);
							request.sendResponse(response, true);
							logChatty("Response sent: " + response);
						} else {
							LOGGER.debug("Request was null - no request arrived within timeout");
						}
					} catch (MprcException e) {
						Assert.fail(e.getMessage());
					} finally {
						if (request != null) {
							numRequests.incrementAndGet();
							logChatty("Request marked as processed: " + request.toString());
							request.processed();
						}
					}
				}
			}
		};
		thread.start();

		final ResponseListener listener = new ResponseListener() {
			private AtomicInteger expectedRequest = new AtomicInteger(1);

			@Override
			public void responseReceived(final Serializable response, final boolean isLast) {
				logChatty("Response received: " + response.toString() + " is last: " + isLast);
				numResponses.incrementAndGet();
				final int expected = expectedRequest.getAndIncrement();
				Assert.assertEquals(response, "response " + Integer.toString(expected), "Response does not match expectations");
				Assert.assertEquals(isLast, true, "Closing flag not set properly");
			}
		};

		for (int i = 1; i <= TOTAL_REQUESTS; i++) {
			// Send request
			logChatty("Sending request #" + i);
			service.sendRequest("request " + Integer.toString(i), PRIORITY, listener);
		}

		try {
			thread.join(10000);
		} catch (InterruptedException e) {
			throw new MprcException("Interrupted join", e);
		}
		cleanup();
	}

	@Test(enabled = true, groups = {"unit", "fast"})
	public void testMultipleMessagesWithRestart() {
		init();
		restartBroker();
		testMultipleMessages();
		cleanup();
	}

	@Test(dependsOnMethods = {"testMultipleMessagesWithRestart"})
	public void shouldContinueProcessingWhenInterrupted() {
		init();

		// Send two messages
		for (int i = 1; i <= 2; i++) {
			service.sendRequest(Integer.valueOf(i), PRIORITY, new ResponseListener() {
				@Override
				public void responseReceived(final Serializable response, final boolean isLast) {
					LOGGER.debug(response);
				}
			});
		}

		// Process first request
		{
			final Request request = service.receiveRequest(10000);
			Assert.assertEquals(request.getMessageData(), 1, "Request value does not match");
			request.processed();
		}

		// Process second request but do not acknowledge
		{
			final Request request = service.receiveRequest(10000);
			Assert.assertEquals(request.getMessageData(), 2, "Request value does not match");
			// Close the receiver instead
			service.stop();
			service.start();
		}

		// Process second request
		{
			final Request request = service.receiveRequest(10000);
			Assert.assertEquals(request.getMessageData(), 2, "Request value does not match");
			request.processed();
		}

		final Request request = service.receiveRequest(10);
		Assert.assertNull(request, "There should be no request left");

		cleanup();
	}

}


text:
<!DOCTYPE html>

<title>Shared transitions: capture root elements</title>
<link rel="help" href="https://github.com/WICG/shared-element-transitions">
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="match" href="old-content-captures-root-ref.html">
<meta name="fuzzy" content="old-content-captures-root-ref.html:0-1;0-500">


text:
using System;
using Microsoft.Owin;

namespace PetsWonderland.Business.MVP.Identity.Registration.Args
{
    public class RegistrationEventArgs : EventArgs
    {
        public string Email { get; set; }

        public string UserName { get; set; }

        public string FirstName { get; set; }

        public string LastName { get; set; }

        public string Password { get; set; }

        public string ConfirmedPassword { get; set; }

        public string UserType { get; set; }

        public IOwinContext OwinCtx { get; set; }
    }
}


text:
import * as React from 'react';
import { InternalStandardProps as StandardProps } from '..';

export interface ToggleButtonGroupProps
  extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'children'> {
  /**
   * The content of the component.
   */
  children?: React.ReactNode;
  /**
   * Override or extend the styles applied to the component.
   */
  classes?: {
    /** Styles applied to the root element. */
    root?: string;
    /** Styles applied to the root element if `orientation="vertical"`. */
    vertical?: string;
    /** Styles applied to the children. */
    grouped?: string;
    /** Styles applied to the children if `orientation="horizontal"`. */
    groupedHorizontal?: string;
    /** Styles applied to the children if `orientation="vertical"`. */
    groupedVertical?: string;
  };
  /**
   * If `true`, only allow one of the child ToggleButton values to be selected.
   * @default false
   */
  exclusive?: boolean;
  /**
   * Callback fired when the value changes.
   *
   * @param {object} event The event source of the callback.
   * @param {any} value of the selected buttons. When `exclusive` is true
   * this is a single value; when false an array of selected values. If no value
   * is selected and `exclusive` is true the value is null; when false an empty array.
   */
  onChange?: (event: React.MouseEvent<HTMLElement>, value: any) => void;
  /**
   * The component orientation (layout flow direction).
   * @default 'horizontal'
   */
  orientation?: 'horizontal' | 'vertical';
  /**
   * The size of the component.
   * @default 'medium'
   */
  size?: 'small' | 'medium' | 'large';
  /**
   * The currently selected value within the group or an array of selected
   * values when `exclusive` is false.
   *
   * The value must have reference equality with the option in order to be selected.
   */
  value?: any;
}

export type ToggleButtonGroupClassKey = keyof NonNullable<ToggleButtonGroupProps['classes']>;

/**
 *
 * Demos:
 *
 * - [Toggle Button](https://material-ui.com/components/toggle-button/)
 *
 * API:
 *
 * - [ToggleButtonGroup API](https://material-ui.com/api/toggle-button-group/)
 */
export default function ToggleButtonGroup(props: ToggleButtonGroupProps): JSX.Element;


text:
@charset "UTF-8";
.ipm_body {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	color: #666;
	background-color: #FFF;
	height: auto;
	width: 98%;
	border: 1px solid #666;
	border-radius: 7px;
	moz-border-radius: 7px;
	margin: auto;
	padding-left: 10px;
	padding-right: 10px;
	padding-bottom: 10px;
	padding-top: 20px;
	position: relative;
}
h1 {
	font-size: 24px;
}
body {
	margin-top: 10px;
	margin-left: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
	background-attachment: fixed;
	background-color: #919191;
	background-image: url(../images/ipm_bg.jpg);
	background-repeat: repeat-x;
	background-position: 0px 0px;
}
.banner {
	width:100%;
	height:80px;
}
.banner #ipm_banner {
	float:left;
}
.banner #ipm_search {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	color: #666;
	background-color: #ffffff;
	height: 30px;
	width: 200px;
	border-top: 1px solid #666;
	border-left: 1px solid #666;
	border-bottom: 1px solid #666;
	border-top-left-radius: 7px;
	border-bottom-left-radius: 7px;
	moz-border-top-left-radius: 7px;
	moz-border-bottom-left-radius: 7px;
	position:relative;
	float:left;
	margin-top: 20px;
	margin-left: 50px;
}
.banner #search {
	position:absolute;
	left:10px;
	border:none;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 16px;
	color: #666;
	width:180px;
	height:28px;
	float:left;
}
.banner #ipm_search_button {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	color: #666;
	background-color: #ffffff;
	height: 30px;
	width: 30px;
	border-top: 1px solid #666;
	border-right: 1px solid #666;
	border-bottom: 1px solid #666;
	border-top-right-radius: 7px;
	border-bottom-right-radius: 7px;
	moz-border-top-right-radius: 7px;
	moz-border-bottom-right-radius: 7px;
	moz-border-radius: 7px;
	position:relative;
	float:left;
	margin-top: 20px;
	margin-left: 0px;
}
.banner #ipm_search_icon {
	position:absolute;
	top:50%;
	margin-top: -10px;
}
.banner #ipm_header {
	position:relative;
	float:left;
	margin-top: 20px;
	margin-left: 50px;
}
.banner #ipm_search_cancel {
	position:absolute;
	top:50%;
	margin-top:-7px;
	right:-50px;
}
.input_standard {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	color: #666;
	background-color: #efefef;
	border: 1px solid #dedede;
	border-radius: 5px;
	moz-border-radius: 3px;
}
.input_selected {
	font-family: Verdana, Geneva, sans-serif;
	color: #555555;
	border: none;
	background-color:none;
	font-weight:bold;
}
.input_providewizard {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	color: #666;
	font-weight:bold;
	background-color: #efefef;
	border: 2px solid #dedede;
	border-radius: 5px;
	moz-border-radius: 3px;
	text-decoration:none;
	padding:5px;
	margin:10px;
}
.text_red {
	color: red;
}
.ipm_footer {
	width:50%;
	margin: auto;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	color: #666;
	text-align:center;
}
.ipm_nav {
	position:absolute;
	width:auto;
	height: 25px;
	top: -12px;
	box-shadow: 2px 2px 5px #888888;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
}
a {
	color:#2262B5;
}
.searchQ {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	color: #666;
	position:absolute;
	left: 360px;
	top:55px;
	width:auto;
	background-color: #ffffff;
	height:auto;
	padding:2px;
	display:none;
	z-index:12000;
	box-shadow: 2px 2px 5px #888888;
	border: 1px solid #ccc;
}
.searchQ_1 {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	color: #666;
	position:absolute;
	width:auto;
	background-color: #ffffff;
	height:auto;
	padding:2px;
	display:none;
	z-index:12000;
	border: 1px solid #ccc;
}
input:focus {
    outline: none;
}
input[type="submit"] {
	background-color:#efefef;
	border: solid 2px #dedede;
}
input[type="button"] {
	background-color:#efefef;
	border: solid 2px #dedede;
}
img {
	border: none;
}
.ipm_linkview_ctrl {
	width:100%;
}
.ipm_linkview {
	position:relative;
	left: 20px;
	height: 200px;
	width:625px;
	border-top: 1px solid #ccc;
	border-left: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	border-right: 1px dashed #ccc;
	border-radius: 5px;
	moz-border-radius: 5px;
	margin-top: 30px;
	float:left;
}
.ipm_linkview #ipm_linkview_nodea {
	left:50px;
	position:absolute;
	width: 500px;
	height: 30px;
	margin-top: -18px;
	padding: 3px;
	background-color:#ffffff;
	border: 1px solid #ccc;
	border-radius: 5px;
	moz-border-radius: 5px;
	text-align:center;
	background-color:#fafafa;
}
.ipm_linkview #ipm_linkview_porta_icon {
	position:absolute;
	width: 70px;
	height: 70px;
	top: 50%;
	left: 10px;
	margin-top: -45px;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
	padding: 10px;
	text-align: center;

}
.ipm_linkview #ipm_linkview_vlana {
	position:absolute;
	width: 100px;
	height: 80px;
	top: 50%;
	left: 101px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
}
.ipm_linkview #ipm_linkview_vpna {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 425px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	background-image: url('../images/ipm_bg_vpn.png');
	background-repeat: no-repeat;
	background-position: center middle;
	border: none;
}
.ipm_linkview #ipm_linkview_vpna_none {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 425px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	background-image: url('../images/ipm_bg_vpn_none.png');
	background-repeat: no-repeat;
	background-position: center middle;
	border: none;
}
.ipm_linkview #ipm_linkview_ipa {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 222px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
	overflow:auto;
	background-image: url('../images/ipm_icon_network.png');
	background-repeat: no-repeat;
	background-position: top left;
	z-index: 100;
}
.ipm_linkview #ipm_linkview_ipa_none {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 222px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
	overflow:auto;
	background-image: url('../images/ipm_icon_network_none.png');
	background-repeat: no-repeat;
	background-position: center center;
}
.ipm_linkviewb {
	position:relative;
	left: 20px;
	height: 200px;
	width:625px;
	border-top: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	border-left: 1px dashed #ccc;
	border-radius: 5px;
	moz-border-radius: 5px;
	margin-top: 30px;
	float:left;
}
.ipm_linkviewb_none {
	position:relative;
	left: 20px;
	height: 200px;
	width:625px;
	border-top: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	border-left: 1px dashed #ccc;
	border-radius: 5px;
	moz-border-radius: 5px;
	margin-top: 30px;
	float:left;
	background-image: url('../images/ipm_nodeb_none.png');
	background-repeat: no-repeat;
	background-position: center center;
}
.ipm_linkviewb_vpn {
	position:relative;
	left: 20px;
	height: 200px;
	width:625px;
	border-top: 1px solid #ccc;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	border-left: 1px dashed #ccc;
	border-radius: 5px;
	moz-border-radius: 5px;
	margin-top: 30px;
	float:left;
	background-image: url('../images/ipm_bg_vpnb_none.png');
	background-repeat: no-repeat;
	background-position: center center;
}
.ipm_linkviewb #ipm_linkview_vpnb {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 0px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	background-image: url('../images/ipm_bg_vpnb.png');
	background-repeat: no-repeat;
	background-position: center middle;
	border: none;
}
.ipm_linkviewb #ipm_linkview_vpnb_none {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 0px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	background-image: url('../images/ipm_bg_vpnb_none.png');
	background-repeat: no-repeat;
	background-position: center middle;
	border: none;
}
.ipm_linkviewb #ipm_linkview_ipb {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 180px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
	overflow:auto;
	background-image: url('../images/ipm_icon_network.png');
	background-repeat: no-repeat;
	background-position: top right;
	z-index: 100;
}
.ipm_linkviewb #ipm_linkview_ipb_none {
	position:absolute;
	width: 200px;
	height: 80px;
	top: 50%;
	left: 180px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
	overflow:auto;
	background-image: url('../images/ipm_icon_network_none.png');
	background-repeat: no-repeat;
	background-position: center center;
}
.ipm_linkviewb #ipm_linkview_vlanb {
	position:absolute;
	width: 100px;
	height: 80px;
	top: 50%;
	left: 401px;
	margin-top: -50px;
	padding: 10px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
}
.ipm_linkviewb #ipm_linkview_portb_icon {
	position:absolute;
	width: 70px;
	height: 70px;
	top: 50%;
	left: 522px;
	margin-top: -45px;
	border: 1px dashed #ccc;
	border-radius: 7px;
	moz-border-radius: 7px;
	padding: 10px;
	text-align: center;

}
.ipm_linkviewb #ipm_linkview_nodeb {
	left:50px;
	position:absolute;
	width: 500px;
	height: 30px;
	margin-top: -18px;
	padding: 3px;
	background-color:#ffffff;
	border: 1px solid #ccc;
	border-radius: 5px;
	moz-border-radius: 5px;
	text-align:center;
	background-color:#fafafa;
}
.wizard_summary {
	float:right;
	position:relative;
	width:500px;
	height:auto;
	padding:10px;
	background-color:#AEBDD0;
	border:#0D5E93 solid 1px;
	border-radius: 7px;
	moz-border-radius: 7px;
	color:#0D5E93;
	margin:10px;
}

.report_objectheader {
	border-bottom: solid 1px #666666;
	font-size:14px;
}
.report_objectsubheader {
	border-bottom: solid 1px #666666;
	font-size:12px;
}
.report_objectrow {
	border-bottom: solid 1px #DEDEDE;
}
.report_subheader {
	font-size:10px;
}


text:
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of actividad_has_proveedores
 *
 * @author wilmerarteaga
 */
class ActividadHasProveedores extends ActiveRecord {
    //put your code here
}

?>


text:
package org.apache.camel.component.bean;

import org.apache.camel.ContextTestSupport;
import org.apache.camel.language.xpath.XPath;
import org.apache.camel.spi.Registry;
import org.junit.Test;

public class BeanWithXPathInjectionUsingResultTypeTest extends ContextTestSupport {

    protected MyBean myBean = new MyBean();

    @Test
    public void testSendMessage() throws Exception {
        template.sendBody("bean:myBean", "12");
        assertEquals("bean ab: " + myBean, "12", myBean.ab);
        assertEquals("bean abText: " + myBean, "a12", myBean.abText);
    }

    @Override
    protected Registry createRegistry() throws Exception {
        Registry answer = super.createRegistry();

        answer.bind("myBean", myBean);
        return answer;
    }

    public static class MyBean {
        public String ab;
        public String abText;

        public void read(@XPath("//a/b/text()") String ab, @XPath(value = "concat('a',//a/b)", resultType = String.class) String abText) {
            this.ab = ab;
            this.abText = abText;
        }
    }
}


text:
title: "Tutorials"
linkTitle: "Tutorials"
weight: 8
date: 2017-01-04
description: >
  Show your user how to work through some end to end examples.
---

{{% pageinfo %}}
This is a placeholder page that shows you how to use this template site.
{{% /pageinfo %}}

Tutorials are **complete worked examples** made up of **multiple tasks** that guide the user through a relatively simple but realistic scenario: building an application that uses some of your project's features, for example. If you have already created some Examples for your project you can base Tutorials on them. This section is **optional**. However, remember that although you may not need this section at first, having tutorials can be useful to help your users engage with your example code, especially if there are aspects that need more explanation than you can easily provide in code comments.


text:
<?php

/**
 * Log action helper
 */
class Action_Helper_Log extends Zend_Controller_Action_Helper_Abstract
{
    /** @var Zend_Log */
    private $logger = NULL;

    /**
     * Init Logger
     *
     * @return Zend_Log
     */
    public function init()
    {
        return $this->getLogger();
    }

    /**
     * Set Logger
     *
     * @param Zend_Log
     * @return Action_Helper_Log
     */
    public function setLogger(Zend_Log $logger)
    {
        $this->logger = $logger;
        return $this;
    }

    /**
     * Get Logger
     *
     * @return Zend_Log
     */
    public function getLogger()
    {
        if ($this->logger === NULL) {
//            $controller = $this->getActionController();
            $this->setLogger(Zend_Registry::get('log'));
            /*
            $bootstrap = $controller->getInvokeArg('bootstrap');
            $this->setLogger($bootstrap->getResource('Log'));
            */
        }

        return $this->logger;
    }

    /**
     * Direct strategy
     *
     * @params string $message
     * @params int $severity
     * @return void
     */
    public function direct($message, $severity = Zend_Log::INFO, $extra = NULL)
    {
        $this->getLogger()->log((string) $message, (int) $severity, $extra);
    }
}


text:
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Description;
using System.Web.Http.ModelBinding;
using TestBusinessLogic;
using Vulcan.Core.DataAccess.Models;
using Vulcan.Core.DataAccess.Validations;

namespace TestWebAPI.Controllers
{
    public class EmployeesController : ApiController
    {

        // TODO: Move inside methods
        private readonly EmployeeLogic _logic = new EmployeeLogic("");

        #region Employee logic
        [HttpGet]
        [ResponseType(typeof(List<Employee>))]
        public async Task<IHttpActionResult> GetEmployees(int skip = 0, int take = 10)
        {
            var employees = await _logic.GetAllAsync(skip, take);
            return Ok(employees);
        }

        [HttpGet]
        [ResponseType(typeof(Employee))]
        public async Task<IHttpActionResult> GetEmployee(int id)
        {
            var employee = await _logic.GetAsync(id);
            return Ok(employee);
        }

        [HttpPost]
        [ResponseType(typeof(Employee))]
        public async Task<IHttpActionResult> PostEmployee(Employee entity)
        {
            if (!_logic.Validate(entity))
            {
                return BadRequest(entity.ModelState);
            }
            var id = await _logic.AddAsync(entity);
            ((dynamic)entity).Id = id;
            return CreatedAtRoute("DefaultApi", new { id = id }, entity);
        }

        [HttpPut]
        [ResponseType(typeof(void))]
        public async Task<IHttpActionResult> PutEmployee(int id, Employee entity)
        {
            if (!_logic.Validate(entity))
            {
                return BadRequest(entity.ModelState);
            }
            if (id != entity.Id)
            {
                return BadRequest();
            }

            await _logic.UpdateAsync(id, entity);
            return StatusCode(HttpStatusCode.NoContent);
        }

        [HttpDelete]
        [ResponseType(typeof(void))]
        public async Task<IHttpActionResult> DeleteEmployee(int id)
        {
            await _logic.DeleteAsync(id);
            return StatusCode(HttpStatusCode.NoContent);
        }
        #endregion

        #region Employee fields
        [HttpGet]
        [Route("api/Employee/fields")]
        [ResponseType(typeof(List<Field>))]
        public IHttpActionResult GetFields(bool force = false)
        {
            var fields = _logic.GetFields(force);
            return Ok(fields);
        }

        [HttpPost]
        [Route("api/Employee/fields")]
        [ResponseType(typeof(Field))]
        public async Task<IHttpActionResult> PostField(Field entity)
        {
            var id = await _logic.AddFieldAsync(entity);
            entity.Id = id;
            return Ok(entity);
        }

        [HttpPut]
        [Route("api/Employee/fields/{id}")]
        [ResponseType(typeof(Field))]
        public async Task<IHttpActionResult> PutField(int id, Field entity)
        {
            await _logic.UpdateFieldAsync(id, entity);
            var updated = await _logic.GetFieldAsync(id);
            return Ok(updated);
        }

        [HttpDelete]
        [Route("api/Employee/fields/{id}")]
        [ResponseType(typeof(void))]
        public async Task<IHttpActionResult> DeleteField(int id)
        {
            await _logic.DeleteFieldAsync(id);

            return Ok();
        }
        #endregion

        #region Employee field validations

        [HttpGet]
        [Route("api/Employee/fields/{fieldId}/validations")]
        [ResponseType(typeof(List<IValidator>))]
        public async Task<IHttpActionResult> GetFieldvalidations(int fieldId, bool force = false)
        {
            var validators = (await _logic.GetFieldValidationsAsync(fieldId, force)).Select(v => v.Validator);
            return Ok(validators);
        }

        [HttpPost]
        [Route("api/Employee/fields/{fieldId}/validations")]
        [ResponseType(typeof(IValidator))]
        public async Task<IHttpActionResult> PostFieldvalidation(int fieldId, IValidator validation)
        {
            var id = await _logic.AddFieldValidationAsync(fieldId, new FieldValidation(validation));
            validation.ValidationId = id;
            return Ok(validation);
        }

        [HttpPut]
        [Route("api/Employee/fields/{fieldId}/validations/{validationId}")]
        [ResponseType(typeof(IValidator))]
        public async Task<IHttpActionResult> PutFieldvalidation(int fieldId, int validationId, IValidator validation)
        {
            var id = await _logic.UpdateFieldValidationAsync(fieldId, validationId, new FieldValidation(validation));
            validation.ValidationId = id;
            return Ok(validation);
        }

        [HttpDelete]
        [Route("api/Employee/fields/{fieldId}/validations/{validationId}")]
        [ResponseType(typeof(void))]
        public async Task<IHttpActionResult> DeleteFieldvalidation(int fieldId, int validationId, IValidator validation)
        {
            await _logic.DeleteFieldValidationAsync(validationId);
            return Ok();
        }

        #endregion

        protected override void Dispose(bool disposing)
        {
            _logic.Dispose();
            base.Dispose(disposing);
        }
    }
}


text:
<Record>
<Term>Cholecystolithiasis</Term>
<SemanticType>Disease or Syndrome</SemanticType>
<ParentTerm>Cholelithiasis</ParentTerm>
<ParentTerm>Gallbladder Diseases</ParentTerm>
<ClassificationPath>Digestive System Diseases/Biliary Tract Diseases/Cholelithiasis/Cholecystolithiasis</ClassificationPath>
<ClassificationPath>Digestive System Diseases/Biliary Tract Diseases/Gallbladder Diseases/Cholecystolithiasis</ClassificationPath>
<BroaderTerm>Cholelithiasis</BroaderTerm>
<BroaderTerm>Digestive System Diseases</BroaderTerm>
<BroaderTerm>Biliary Tract Diseases</BroaderTerm>
<BroaderTerm>Cholecystolithiasis</BroaderTerm>
<BroaderTerm>Gallbladder Diseases</BroaderTerm>
<ChildTerm>Gallstones</ChildTerm>
<Synonym>Cholecystolithiasis</Synonym>
<Description>Presence or formation of GALLSTONES in the GALLBLADDER.</Description>
<Source>MeSH</Source>
</Record>


text:
<?php $TRANSLATIONS = array(
"Can't create document" => "Ne povas kreiĝi dokumento",
"You don't have permission to rename this document" => "Vi ne havas permeson alinomigi ĉi tiun dokumenton",
"An error occurred while changing directory." => "Eraro okazis dum ŝanĝo de dosierujo.",
"Directory saved successfully." => "La dosierujo konserviĝis sukcese.",
"Documents" => "Dokumentoj",
"Failed to load documents." => "Malsukcesis ŝargo de dokumentoj.",
"No documents are found. Please upload or create a document!" => "Neniu dokumento troviĝis. Bonvolu alŝuti aŭ krei dokumenton!",
"Share" => "Kunhavigi",
"Close" => "Fermi",
"No connection to server. Trying to reconnect." => "Ne estas konekto al servilo. Provu rekonekti.",
"Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead." => "Laso de ĉi tiu paĝo en reĝimo Redaktilo povas kaŭzi nekonservotaj datumoj. Rekomendatas uzo de la butono "Fermi" anstataŭe.",
"Failed to load this document. Please check if it can be opened with an external odt editor. This might also mean it has been unshared or deleted recently." => "Malsukcesis ŝargo de ĉi tiu dokumento. Bonvolu kontroli ĉu ĝi malfermeblas per malena odt-redaktilo. Ĉi tio povas ankaŭ signifi, ke ĝi malkunhaviĝis aŭ foriĝis lastatempe.",
"Save" => "Konservi",
"Loading documents..." => "Ŝargante dokumentojn...",
"'.' is an invalid file name." => "'.' ne estas valida dosiernomo.",
"File name cannot be empty." => "Dosiernomo devas ne malpleni.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nevalida nomo: "\\", "/", "<", ">", ":", "\"", "|", "?" kaj "*" ne permesatas.",
"Align Left" => "Ĝisrandigi maldekstren",
"Alignment" => "Ĝisrandigo",
"Align Right" => "Ĝisrandigi dekstren",
"Annotate" => "Prinoti",
"Background" => "Fono",
"Bold" => "Grasa",
"Bottom" => "Malsupro",
"Cancel" => "Nuligi",
"Center" => "Centrigi",
"Clone" => "Kloni",
"Clone this Style" => "Kloni ĉi tiun stilon",
"Color" => "Koloro",
"Create" => "Krei",
"Decrease Indent" => "Malgrindigi krommarĝenon",
"Default Style" => "Defaŭlta stilo",
"Delete" => "Forigi",
"Family" => "Familio",
"Font" => "Tiparo",
"Font Effects" => "Tiparaj efektoj",
"Format" => "Aranĝo",
"Increase Indent" => "Grandigi krommarĝenon",
"Insert Image" => "Enigi bildon",
"Invite Members" => "Inviti membrojn",
"Italic" => "Kursiva",
"Justified" => "Ĝis ambaŭ randoj",
"Justify" => "Ĝisambaŭrandigi",
"Left" => "Maldekstren",
"Loading" => "Ŝargante",
"Members" => "Membroj",
"New Name:" => "Nova nomo:",
"OK" => "Akcepti",
"Open" => "Malfermi",
"Options" => "Malneproj",
"Paragraph..." => "Alineo...",
"Paragraph Styles" => "Alineaj stiloj",
"Redo" => "Refari",
"Right" => "Dekstren",
"Size" => "Grando",
"Spacing" => "Interspaco",
"Strikethrough" => "Trastreko",
"Style" => "Stilo",
"Text" => "Teksto",
"Top" => "Supro",
"Underline" => "Substreko",
"Undo" => "Malfari",
"Unknown Author" => "Nekonata verkinto",
"Edit" => "Redakti",
"guest" => "gasto",
"MS Word support (requires openOffice/libreOffice)" => "Kongruo kun MS Word (postuliĝas openOffice/libreOffice)",
"Local" => "Loka",
"External" => "Malena",
"Server URL" => "Servila URL",
"Apply" => "Apliki",
"New document" => "Nova dokumento",
"Upload (max. %s)" => "Alŝuti (maks. %s)",
"Upload" => "Alŝuti",
"Save new documents to" => "Konservi novajn dokumentojn en",
"Wrong password. Please retry." => "La pasvorto malĝustas. Bonvolu reprovi.",
"Password" => "Pasvorto",
"Guest %s" => "Gasto %s",
"This link has been expired or is never existed. Please contact the person who shared it with you for details." => "Ĉi tiu ligilo eksvalidiĝis aŭ neniam ekzistis. Bonvolu kontakti la personon, kiu kunhavigis ĝin kun vi, por detaloj.",
"Advanced feature-set" => "Altanivela funkciaro",
"(Unstable)" => "(nestabila)"
);


text:
package net.videmantay.shared;

public enum GoalType {
JOB,ACCOMPLISHMENT,ACADEMIC
}


text:
import requests
requests.packages.urllib3.disable_warnings()
import ssl
import json
import os

# This isn't really used right now.
class RouterStatus():
    OK = 0
    TESTING = 1
    FIREWALLED = 2
    HIDDEN = 3
    WARN_FIREWALLED_AND_FAST = 4
    WARN_FIREWALLED_AND_FLOODFILL = 5
    WARN_FIREWALLED_WITH_INBOUND_TCP = 6
    WARN_FIREWALLED_WITH_UDP_DISABLED = 7
    ERROR_I2CP = 8
    ERROR_CLOCK_SKEW = 9
    ERROR_PRIVATE_TCP_ADDRESS = 10
    ERROR_SYMMETRIC_NAT = 11
    ERROR_UDP_PORT_IN_USE = 12
    ERROR_NO_ACTIVE_PEERS_CHECK_CONNECTION_AND_FIREWALL = 13
    ERROR_UDP_DISABLED_AND_TCP_UNSET = 14

# This isn't really used right now.
class I2PControlErrors():
    JSON_PARSE_ERRO = -32700
    INVALID_REQUEST = -32600
    METHOD_NOT_FOUND = -32601
    INVALID_PARAMETERS = -32602
    INTERNAL_ERROR = -32603
    # i2pcontrol specific
    INVALID_PASSWORD_PROVIDED = -32001
    NO_AUTH_TOKEN_PRESENTED = -32002
    AUTH_TOKEN_DOES_NOT_EXIST = -32003
    TOKEN_EXPIRED = -32004
    API_VERSION_NOT_SUPPLIED = -32005
    API_INCOMPATIBLE = -32006

class _I2PControlAdaptor(requests.adapters.HTTPAdapter):
    """
    requests http adapter that rewrites asserted hostname
    """
    def cert_verify(self, conn, url, verify, cert):
        conn.assert_hostname = 'i2pd.i2pcontrol'
        return super().cert_verify(conn, url, verify, cert)

# Documentation: http://i2p-projekt.i2p/en/docs/api/i2pcontrol
class I2PController:
    API_VERSION = 1
    DEFAULT_HOST = '127.0.0.1'
    DEFAULT_PORT = 7650
    DEFAULT_PASSWORD = 'itoopie'

    def __init__(self, address=(DEFAULT_HOST, DEFAULT_PORT), password=DEFAULT_PASSWORD, ssl_cert=False):
        # I2PControl mandated SSL, even tho we will be localhost.
        # Since we don't know the cert, and it's local, let's ignore it.
        proto = 'http'
        self._requests = requests.Session()
        if ssl_cert is not None:
            if ssl_cert:
                self._requests.verify = ssl_cert
            proto += 's'
            self._requests.mount('{}://'.format(proto), _I2PControlAdaptor())

        self._password = password
        self._token = None
        self._url = ''.join(['{}://'.format(proto),address[0],':',str(address[1]),'/'])
        result = self._call('Authenticate',{
            'API': I2PController.API_VERSION,
            'Password': self._password
        })

        # TODO: Deal with errors better.
        self._token = result['Token']

        if result['API'] != I2PController.API_VERSION:
            raise Exception('looks like the api\'s do not match')
        # expose this member
        self.call = self._call

    def _call(self, method, args):
        """call jsonrpc method
        """
        req = {
             "method": method,
             "jsonrpc": "2.0",
             "id" : None, # TODO: generate random id
             "params": args
        }
        body = json.dumps(req)
        return self._request(body)

    def _request(self, body):
        params = {
            "headers": {"Content-Type": "application/json; charset=utf-8"},
            "url": self._url,
            "data": body,
        }
        resp = self._requests.post(**params)
        j = None
        if resp.status_code == 200:
            j = json.loads(resp.text)
            if "error" in j:
                 err = j["error"]
                 raise Exception(err["message"])
        if "result" in j:
            return j["result"]

    # Echo
    def echo(self, string='echo'):
        return self._call('Echo',{
                'Token': self._token,
                'Echo': string
                }
            )

    # GetRate
    # 300000 is 5 minutes, measured in ms.
    # http://i2p-projekt.i2p/en/misc/ratestats
    def getRate(self, stat='', period=5*60*1000):
        return self._call('GetRate', {
                'Token': self._token,
                'Period': period,
                'Stat': stat
                }
            )['result']

    # I2PControl
    def getI2PControlSettings(self, address=DEFAULT_HOST, password=DEFAULT_PASSWORD, port=DEFAULT_PORT):
        return self._call('I2PControl', {
                'Token': self._token,
                'SettingsSaved': '',
                'RestartNeeded': ''
                })

    def setI2PControlSettings(self, address=DEFAULT_HOST, password=DEFAULT_PASSWORD, port=DEFAULT_PORT):
        result = self._call('I2PControl', {
                'Token': self._token,
                'i2pcontrol.address': address,
                'i2pcontrol.port': port,
                'i2pcontrol.password': password,
                })
        # TODO: Update class variables
        return result

    # RouterInfo
    def getRouterInfo(self):
        return self._call('RouterInfo', {
                'Token': self._token,
                'i2p.router.status':'',
                'i2p.router.uptime':'',
                'i2p.router.version':'',
                'i2p.router.net.bw.inbound.1s':'',
                'i2p.router.net.bw.inbound.15s':'',
                'i2p.router.net.bw.outbound.1s':'',
                'i2p.router.net.bw.outbound.15s':'',
                'i2p.router.net.status':'',
                'i2p.router.net.tunnels.participating':'',
                'i2p.router.netdb.activepeers':'',
                'i2p.router.netdb.fastpeers':'',
                'i2p.router.netdb.highcapacitypeers':'',
                'i2p.router.netdb.isreseeding':'',
                'i2p.router.netdb.knownpeers':''
                })

    # RouterManager
    def reseed(self):
        return self._call('RouterManager', {
                'Token': self._token,
                'Reseed': ''
                })

    def restart(self):
        return self._call('RouterManager', {
                'Token': self._token,
                'Restart': ''
                })

    def restart_graceful(self):
        return self._call('RouterManager', {
                'Token': self._token,
                'RestartGraceful': ''
                })

    def shutdown(self):
        return self._call('RouterManager', {
                'Token': self._token,
                'Shutdown': ''
                })

    def shutdown_graceful(self):
        return self._call('RouterManager', {
                'Token': self._token,
                'ShutdownGraceful': ''
                })

    # NetworkSettings
    def setNetworkSetting(self, setting='', value=''):
        return self._call('NetworkSetting', {
                'Token': self._token,
                setting: value
                })

    def getNetworkSetting(self):
        return self._call('NetworkSetting', {
                'Token': self._token,
                'i2p.router.net.ntcp.port': None,
                'i2p.router.net.ntcp.hostname': None,
                'i2p.router.net.ntcp.autoip': None,
                'i2p.router.net.ssu.port': None,
                'i2p.router.net.ssu.hostname': None,
                'i2p.router.net.ssu.autoip': None,
                'i2p.router.net.ssu.detectedip': None,
                'i2p.router.net.upnp': None,
                'i2p.router.net.bw.share': None,
                'i2p.router.net.bw.in': None,
                'i2p.router.net.bw.out': None,
                'i2p.router.net.laptopmode': None
                })


text:
module Comodule::Deployment::Helper::Aws::Rds

  def self.included(receiver)
    receiver.send :include, InstanceMethods
  end

  module InstanceMethods
    def rds
      @rds ||= ::Comodule::Deployment::Helper::Aws::Rds::Service.new(self)
    end
  end

  class Service
    include ::Comodule::Deployment::Helper::Aws::Base

    def db(db_instance_identifier)
      ::Comodule::Deployment::Helper::Aws::Rds::Db.new(owner, db_instance_identifier)
    end

    def latest_automated_snapshot
      if config.db && config.db.master && !config.db.snapshot_identifier
        config.db.snapshot_identifier = db(config.db.master).latest_automated_snapshot
      end
    end
  end

  class Db
    include ::Comodule::Deployment::Helper::Aws::Base

    attr_accessor :db

    def initialize(platform, db_instance_identifier)
      self.owner = platform
      self.db = aws.rds.db_instances[db_instance_identifier]
    end

    def latest_automated_snapshot
      snapshot =
        db.snapshots.with_type('automated').sort do |a, b|
          b.created_at <=> a.created_at
        end

      snapshot.first.db_snapshot_identifier
    end
  end
end


text:
Contents
========
This directory contains tools for developers working on this repository.

copyright\_header.py
====================

Provides utilities for managing copyright headers of `The Bitcoin developers`
in repository source files. It has three subcommands:

```
$ ./copyright_header.py report <base_directory> [verbose]
$ ./copyright_header.py update <base_directory>
$ ./copyright_header.py insert <file>
```
Running these subcommands without arguments displays a usage string.

copyright\_header.py report \<base\_directory\> [verbose]
---------------------------------------------------------

Produces a report of all copyright header notices found inside the source files
of a repository. Useful to quickly visualize the state of the headers.
Specifying `verbose` will list the full filenames of files of each category.

copyright\_header.py update \<base\_directory\> [verbose]
---------------------------------------------------------
Updates all the copyright headers of `The Bitcoin developers` which were changed
in a year more recent than is listed. For example:
```
// Copyright (c) <firstYear>-<lastYear> The Bitcoin developers
```
will be updated to:
```
// Copyright (c) <firstYear>-<lastModifiedYear> The Bitcoin developers
```
where `<lastModifiedYear>` is obtained from the `git log` history.

This subcommand also handles copyright headers that have only a single year. In
those cases:
```
// Copyright (c) <year> The Bitcoin developers
```
will be updated to:
```
// Copyright (c) <year>-<lastModifiedYear> The Bitcoin developers
```
where the update is appropriate.

copyright\_header.py insert \<file\>
------------------------------------
Inserts a copyright header for `The Bitcoin developers` at the top of the file
in either Python or C++ style as determined by the file extension. If the file
is a Python file and it has  `#!` starting the first line, the header is
inserted in the line below it.

The copyright dates will be set to be `<year_introduced>-<current_year>` where
`<year_introduced>` is according to the `git log` history. If
`<year_introduced>` is equal to `<current_year>`, it will be set as a single
year rather than two hyphenated years.

If the file already has a copyright for `The Bitcoin developers`, the script
will exit.

gen-manpages.sh
===============

A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
This requires help2man which can be found at: https://www.gnu.org/software/help2man/

With in-tree builds this tool can be run from any directory within the
repostitory. To use this tool with out-of-tree builds set `BUILDDIR`. For
example:

```bash
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
```

optimize-pngs.py
================

A script to optimize png files in the bitcoin
repository (requires pngcrush).

security-check.py and test-security-check.py
============================================

Perform basic ELF security checks on a series of executables.

symbol-check.py
===============

A script to check that the (Linux) executables produced by gitian only contain
allowed gcc, glibc and libstdc++ version symbols. This makes sure they are
still compatible with the minimum supported Linux distribution versions.

Example usage after a gitian build:

    find ../gitian-builder/build -type f -executable | xargs python3 contrib/devtools/symbol-check.py

If only supported symbols are used the return value will be 0 and the output will be empty.

If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed:

    .../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14
    .../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15
    .../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15
    .../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15

update-translations.py
======================

Run this script from the root of the repository to update all translations from transifex.
It will do the following automatically:

- Fetch all translations
- Post-process them into valid and committable format
- Add missing translations to the build system (TODO)

See doc/translation-process.md for more information.

circular-dependencies.py
========================

Run this script from the root of the source tree (`src/`) to find circular dependencies in the source code.
This looks only at which files include other files, treating the `.cpp` and `.h` file as one unit.

Example usage:

    cd <project root>/src
    ../contrib/devtools/circular-dependencies.py {*,*/*,*/*/*}.{h,cpp}