text:
require "google/cloud/datastore/entity"
require "google/cloud/datastore/key"

module Google
  module Cloud
    module Datastore
      ##
      # # Query
      #
      # Represents the search criteria against a Datastore.
      #
      # @see https://cloud.google.com/datastore/docs/concepts/queries Datastore
      #   Queries
      # @see https://cloud.google.com/datastore/docs/concepts/metadataqueries
      #   Datastore Metadata
      #
      # @example
      #   require "google/cloud/datastore"
      #
      #   datastore = Google::Cloud::Datastore.new
      #
      #   query = Google::Cloud::Datastore::Query.new
      #   query.kind("Task").
      #     where("done", "=", false).
      #     where("priority", ">=", 4).
      #     order("priority", :desc)
      #
      #   tasks = datastore.run query
      #
      # @example Run the query within a namespace with the `namespace` option:
      #   require "google/cloud/datastore"
      #
      #   datastore = Google::Cloud::Datastore.new
      #
      #   query = datastore.query("Task").
      #     where("done", "=", false)
      #   tasks = datastore.run query, namespace: "example-ns"
      #
      class Query
        ##
        # Returns a new query object.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   query = Google::Cloud::Datastore::Query.new
        #
        def initialize
          @grpc = Google::Datastore::V1::Query.new
        end

        ##
        # Add the kind of entities to query.
        #
        # Special entity kinds such as `__namespace__`, `__kind__`, and
        # `__property__` can be used for [metadata
        # queries](https://cloud.google.com/datastore/docs/concepts/metadataqueries).
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind "Task"
        #
        #   tasks = datastore.run query
        #
        def kind *kinds
          kinds.each do |kind|
            grpc_kind = Google::Datastore::V1::KindExpression.new(
              name: kind
            )
            @grpc.kind << grpc_kind
          end

          self
        end

        ##
        # Add a property filter to the query.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     where("done", "=", false)
        #
        #   tasks = datastore.run query
        #
        # @example Add a composite property filter:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     where("done", "=", false).
        #     where("priority", ">=", 4)
        #
        #   tasks = datastore.run query
        #
        # @example Add an inequality filter on a **single** property only:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     where("created", ">=", Time.utc(1990, 1, 1)).
        #     where("created", "<", Time.utc(2000, 1, 1))
        #
        #   tasks = datastore.run query
        #
        # @example Add a composite filter on an array property:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     where("tag", "=", "fun").
        #     where("tag", "=", "programming")
        #
        #   tasks = datastore.run query
        #
        # @example Add an inequality filter on an array property :
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     where("tag", ">", "learn").
        #     where("tag", "<", "math")
        #
        #   tasks = datastore.run query
        #
        # @example Add a key filter using the special property `__key__`:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     where("__key__", ">", datastore.key("Task", "someTask"))
        #
        #   tasks = datastore.run query
        #
        # @example Add a key filter to a *kindless* query:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   last_seen_key = datastore.key "Task", "a"
        #   query = Google::Cloud::Datastore::Query.new
        #   query.where("__key__", ">", last_seen_key)
        #
        #   tasks = datastore.run query
        #
        def where name, operator, value
          @grpc.filter ||= Google::Datastore::V1::Filter.new(
            composite_filter: Google::Datastore::V1::CompositeFilter.new(
              op: :AND
            )
          )
          @grpc.filter.composite_filter.filters << \
            Google::Datastore::V1::Filter.new(
              property_filter: Google::Datastore::V1::PropertyFilter.new(
                property: Google::Datastore::V1::PropertyReference.new(
                  name: name
                ),
                op: Convert.to_prop_filter_op(operator),
                value: Convert.to_value(value)
              )
            )

          self
        end
        alias filter where

        ##
        # Add a filter for entities that inherit from a key.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   task_list_key = datastore.key "TaskList", "default"
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     ancestor(task_list_key)
        #
        #   tasks = datastore.run query
        #
        def ancestor parent
          # Use key if given an entity
          parent = parent.key if parent.respond_to? :key
          where "__key__", "~", parent
        end

        ##
        # Sort the results by a property name.
        # By default, an ascending sort order will be used.
        # To sort in descending order, provide a second argument
        # of a string or symbol that starts with "d".
        #
        # @example With ascending sort order:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     order("created")
        #
        #   tasks = datastore.run query
        #
        # @example With descending sort order:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     order("created", :desc)
        #
        #   tasks = datastore.run query
        #
        # @example With multiple sort orders:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     order("priority", :desc).
        #     order("created")
        #
        #   tasks = datastore.run query
        #
        # @example A property used in inequality filter must be ordered first:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     where("priority", ">", 3).
        #     order("priority").
        #     order("created")
        #
        #   tasks = datastore.run query
        #
        def order name, direction = :asc
          @grpc.order << Google::Datastore::V1::PropertyOrder.new(
            property: Google::Datastore::V1::PropertyReference.new(
              name: name
            ),
            direction: prop_order_direction(direction)
          )

          self
        end

        ##
        # Set a limit on the number of results to be returned.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     limit(5)
        #
        #   tasks = datastore.run query
        #
        def limit num
          @grpc.limit = Google::Protobuf::Int32Value.new(value: num)

          self
        end

        ##
        # Set an offset for the results to be returned.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     limit(5).
        #     offset(10)
        #
        #   tasks = datastore.run query
        #
        def offset num
          @grpc.offset = num

          self
        end

        ##
        # Set the cursor to start the results at.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     limit(page_size).
        #     start(page_cursor)
        #
        #   tasks = datastore.run query
        #
        def start cursor
          if cursor.is_a? Cursor
            @grpc.start_cursor = cursor.to_grpc
          elsif cursor.is_a? String
            @grpc.start_cursor = Convert.decode_bytes cursor
          else
            raise ArgumentError, "Can't set a cursor using a #{cursor.class}."
          end

          self
        end
        alias cursor start

        ##
        # Retrieve only select properties from the matched entities.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     select("priority", "percent_complete")
        #
        #   priorities = []
        #   percent_completes = []
        #   datastore.run(query).each do |t|
        #     priorities << t["priority"]
        #     percent_completes << t["percent_complete"]
        #   end
        #
        # @example A keys-only query using the special property `__key__`:
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     select("__key__")
        #
        #   keys = datastore.run(query).map(&:key)
        #
        def select *names
          names.each do |name|
            grpc_projection = Google::Datastore::V1::Projection.new(
              property: Google::Datastore::V1::PropertyReference.new(
                name: name
              )
            )
            @grpc.projection << grpc_projection
          end

          self
        end
        alias projection select

        ##
        # Group results by a list of properties.
        #
        # @example
        #   require "google/cloud/datastore"
        #
        #   datastore = Google::Cloud::Datastore.new
        #
        #   query = Google::Cloud::Datastore::Query.new
        #   query.kind("Task").
        #     distinct_on("type", "priority").
        #     order("type").
        #     order("priority")
        #
        #   tasks = datastore.run query
        #
        def group_by *names
          names.each do |name|
            grpc_property = Google::Datastore::V1::PropertyReference.new(
              name: name
            )
            @grpc.distinct_on << grpc_property
          end

          self
        end
        alias distinct_on group_by

        # @private
        def to_grpc
          @grpc
        end

        protected

        ##
        # @private Get the property order direction for a string.
        def prop_order_direction direction
          if direction.to_s.downcase.start_with? "a"
            :ASCENDING
          elsif direction.to_s.downcase.start_with? "d"
            :DESCENDING
          else
            :DIRECTION_UNSPECIFIED
          end
        end
      end
    end
  end
end


text:
package org.apache.sqoop.connector.kite;

import org.apache.sqoop.job.Constants;

public final class KiteConnectorConstants extends Constants {

  // Resource bundle name
  public static final String RESOURCE_BUNDLE_NAME = "kite-connector-config";

  private KiteConnectorConstants() {
    // Disable explicit object creation
  }

}

redpajama_set_name: RedPajamaGithub


text:
using Abp.Application.Services.Dto;
using Abp.Dependency;
using Abp.Domain.Entities;
using Abp.Domain.Services;
using Kinare.FormSystem.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;

namespace Kinare.FormSystem.Domain.Forms
{
    public interface IApplicationFormManager : IDomainService, ITransientDependency
    {
        Task<ApplicationForm> Get(Guid input);

        Task<IList<ApplicationForm>> GetAll();

        Task<ApplicationForm> Create(ApplicationForm input);

        Task<ApplicationForm> Update(ApplicationForm input);

        Task Delete(ApplicationForm input);
    }
}


text:
Looks up Google Instant for the most common words (e.g. Oxford 3000) and then
provides data both in real-time and in a historical perspective.

## What it can do

* Search for trending keywords
* Get full list of keywords
* View number of searches for each keyword
* Show a diagram of how keywords position over time

## License

This software is released under the [MIT License](http://opensource.org/licenses/MIT).

Copyright (c) 2012 vst42


text:
#include <Python.h>
#include <stdlib.h>
#include <sys/stat.h>

#if (PY_VERSION_HEX < 0x02050000)
typedef int Py_ssize_t;
#endif

#if defined(__MINGW32_VERSION) || defined(__APPLE__)
size_t rep_strnlen(char *text, size_t maxlen);
size_t rep_strnlen(char *text, size_t maxlen)
{
	const char *last = memchr(text, '\0', maxlen);
	return last ? (size_t) (last - text) : maxlen;
}
#define strnlen rep_strnlen
#endif

#define bytehex(x) (((x)<0xa)?('0'+(x)):('a'-0xa+(x)))

static PyObject *tree_entry_cls;
static PyObject *object_format_exception_cls;

static PyObject *sha_to_pyhex(const unsigned char *sha)
{
	char hexsha[41];
	int i;
	for (i = 0; i < 20; i++) {
		hexsha[i*2] = bytehex((sha[i] & 0xF0) >> 4);
		hexsha[i*2+1] = bytehex(sha[i] & 0x0F);
	}

	return PyString_FromStringAndSize(hexsha, 40);
}

static PyObject *py_parse_tree(PyObject *self, PyObject *args, PyObject *kw)
{
	char *text, *start, *end;
	int len, namelen, strict;
	PyObject *ret, *item, *name, *sha, *py_strict = NULL;
	static char *kwlist[] = {"text", "strict", NULL};

	if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|O", kwlist,
	                                 &text, &len, &py_strict))
		return NULL;
	strict = py_strict ?  PyObject_IsTrue(py_strict) : 0;
	/* TODO: currently this returns a list; if memory usage is a concern,
	 * consider rewriting as a custom iterator object */
	ret = PyList_New(0);
	if (ret == NULL) {
		return NULL;
	}
	start = text;
	end = text + len;
	while (text < end) {
		long mode;
		if (strict && text[0] == '0') {
			PyErr_SetString(object_format_exception_cls,
			                "Illegal leading zero on mode");
			Py_DECREF(ret);
			return NULL;
		}
		mode = strtol(text, &text, 8);
		if (*text != ' ') {
			PyErr_SetString(PyExc_ValueError, "Expected space");
			Py_DECREF(ret);
			return NULL;
		}
		text++;
		namelen = strnlen(text, len - (text - start));
		name = PyString_FromStringAndSize(text, namelen);
		if (name == NULL) {
			Py_DECREF(ret);
			return NULL;
		}
		if (text + namelen + 20 >= end) {
			PyErr_SetString(PyExc_ValueError, "SHA truncated");
			Py_DECREF(ret);
			Py_DECREF(name);
			return NULL;
		}
		sha = sha_to_pyhex((unsigned char *)text+namelen+1);
		if (sha == NULL) {
			Py_DECREF(ret);
			Py_DECREF(name);
			return NULL;
		}
		item = Py_BuildValue("(NlN)", name, mode, sha);
		if (item == NULL) {
			Py_DECREF(ret);
			Py_DECREF(sha);
			Py_DECREF(name);
			return NULL;
		}
		if (PyList_Append(ret, item) == -1) {
			Py_DECREF(ret);
			Py_DECREF(item);
			return NULL;
		}
		Py_DECREF(item);
		text += namelen+21;
	}
	return ret;
}

struct tree_item {
	const char *name;
	int mode;
	PyObject *tuple;
};

int cmp_tree_item(const void *_a, const void *_b)
{
	const struct tree_item *a = _a, *b = _b;
	const char *remain_a, *remain_b;
	int ret, common;
	if (strlen(a->name) > strlen(b->name)) {
		common = strlen(b->name);
		remain_a = a->name + common;
		remain_b = (S_ISDIR(b->mode)?"/":"");
	} else if (strlen(b->name) > strlen(a->name)) {
		common = strlen(a->name);
		remain_a = (S_ISDIR(a->mode)?"/":"");
		remain_b = b->name + common;
	} else { /* strlen(a->name) == strlen(b->name) */
		common = 0;
		remain_a = a->name;
		remain_b = b->name;
	}
	ret = strncmp(a->name, b->name, common);
	if (ret != 0)
		return ret;
	return strcmp(remain_a, remain_b);
}

int cmp_tree_item_name_order(const void *_a, const void *_b) {
	const struct tree_item *a = _a, *b = _b;
	return strcmp(a->name, b->name);
}

static PyObject *py_sorted_tree_items(PyObject *self, PyObject *args)
{
	struct tree_item *qsort_entries = NULL;
	int name_order, num_entries, n = 0, i;
	PyObject *entries, *py_name_order, *ret, *key, *value, *py_mode, *py_sha;
	Py_ssize_t pos = 0;
	int (*cmp)(const void *, const void *);

	if (!PyArg_ParseTuple(args, "OO", &entries, &py_name_order))
		goto error;

	if (!PyDict_Check(entries)) {
		PyErr_SetString(PyExc_TypeError, "Argument not a dictionary");
		goto error;
	}

	name_order = PyObject_IsTrue(py_name_order);
	if (name_order == -1)
		goto error;
	cmp = name_order ? cmp_tree_item_name_order : cmp_tree_item;

	num_entries = PyDict_Size(entries);
	if (PyErr_Occurred())
		goto error;
	qsort_entries = PyMem_New(struct tree_item, num_entries);
	if (!qsort_entries) {
		PyErr_NoMemory();
		goto error;
	}

	while (PyDict_Next(entries, &pos, &key, &value)) {
		if (!PyString_Check(key)) {
			PyErr_SetString(PyExc_TypeError, "Name is not a string");
			goto error;
		}

		if (PyTuple_Size(value) != 2) {
			PyErr_SetString(PyExc_ValueError, "Tuple has invalid size");
			goto error;
		}

		py_mode = PyTuple_GET_ITEM(value, 0);
		if (!PyInt_Check(py_mode)) {
			PyErr_SetString(PyExc_TypeError, "Mode is not an integral type");
			goto error;
		}

		py_sha = PyTuple_GET_ITEM(value, 1);
		if (!PyString_Check(py_sha)) {
			PyErr_SetString(PyExc_TypeError, "SHA is not a string");
			goto error;
		}
		qsort_entries[n].name = PyString_AS_STRING(key);
		qsort_entries[n].mode = PyInt_AS_LONG(py_mode);

		qsort_entries[n].tuple = PyObject_CallFunctionObjArgs(
		                tree_entry_cls, key, py_mode, py_sha, NULL);
		if (qsort_entries[n].tuple == NULL)
			goto error;
		n++;
	}

	qsort(qsort_entries, num_entries, sizeof(struct tree_item), cmp);

	ret = PyList_New(num_entries);
	if (ret == NULL) {
		PyErr_NoMemory();
		goto error;
	}

	for (i = 0; i < num_entries; i++) {
		PyList_SET_ITEM(ret, i, qsort_entries[i].tuple);
	}
	PyMem_Free(qsort_entries);
	return ret;

error:
	for (i = 0; i < n; i++) {
		Py_XDECREF(qsort_entries[i].tuple);
	}
	PyMem_Free(qsort_entries);
	return NULL;
}

static PyMethodDef py_objects_methods[] = {
	{ "parse_tree", (PyCFunction)py_parse_tree, METH_VARARGS | METH_KEYWORDS,
	  NULL },
	{ "sorted_tree_items", py_sorted_tree_items, METH_VARARGS, NULL },
	{ NULL, NULL, 0, NULL }
};

PyMODINIT_FUNC
init_objects(void)
{
	PyObject *m, *objects_mod, *errors_mod;

	m = Py_InitModule3("_objects", py_objects_methods, NULL);
	if (m == NULL)
		return;

	errors_mod = PyImport_ImportModule("dulwich.errors");
	if (errors_mod == NULL)
		return;

	object_format_exception_cls = PyObject_GetAttrString(
		errors_mod, "ObjectFormatException");
	Py_DECREF(errors_mod);
	if (object_format_exception_cls == NULL)
		return;

	/* This is a circular import but should be safe since this module is
	 * imported at at the very bottom of objects.py. */
	objects_mod = PyImport_ImportModule("dulwich.objects");
	if (objects_mod == NULL)
		return;

	tree_entry_cls = PyObject_GetAttrString(objects_mod, "TreeEntry");
	Py_DECREF(objects_mod);
	if (tree_entry_cls == NULL)
		return;
}


text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#pragma once
#include "GameFramework/Volume.h"
#include "PhysicsVolume.generated.h"

/**
 * PhysicsVolume: A bounding volume which affects actor physics.
 * Each AActor is affected at any time by one PhysicsVolume.
 */

UCLASS()
class ENGINE_API APhysicsVolume : public AVolume
{
	GENERATED_UCLASS_BODY()

	// Begin UObject interface.
#if WITH_EDITOR
	virtual void LoadedFromAnotherClass(const FName& OldClassName) override;
#endif // WITH_EDITOR
	// End UObject interface.

	virtual void PostInitializeComponents() override;
	virtual void Destroyed() override;
	virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;

	//======================================================================================
	// Character Movement related properties

	/** Terminal velocity of pawns using CharacterMovement when falling. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CharacterMovement)
	float TerminalVelocity;

	/** Determines which PhysicsVolume takes precedence if they overlap (higher number = higher priority). */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CharacterMovement)
	int32 Priority;

	/** This property controls the amount of friction applied by the volume as pawns using CharacterMovement move through it. The higher this value, the harder it will feel to move through */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CharacterMovement)
	float FluidFriction;

	/** True if this volume contains a fluid like water */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=CharacterMovement)
	uint32 bWaterVolume:1;

	//======================================================================================
	// Physics related properties

	/**	By default, the origin of an AActor must be inside a PhysicsVolume for it to affect the actor. However if this flag is true, the other actor only has to touch the volume to be affected by it. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Volume)
	uint32 bPhysicsOnContact:1;

public:
	/** @Returns the Z component of the current world gravity. */
	virtual float GetGravityZ() const;

	// Called when actor enters a volume
	virtual void ActorEnteredVolume(class AActor* Other);

	// Called when actor leaves a volume, Other can be NULL
	virtual void ActorLeavingVolume(class AActor* Other);

	/** Given a known overlap with the given component, validate that it meets the rules imposed by bPhysicsOnContact. */
	virtual bool IsOverlapInVolume(const class USceneComponent& TestComponent) const;
};


text:
package com.javadeobfuscator.deobfuscator.asm.source;

import org.objectweb.asm.*;
import org.objectweb.asm.tree.*;
import org.objectweb.asm.tree.analysis.*;

import java.util.*;

public class SourceFinder implements Opcodes {

    public static SourceResult findSource(MethodNode methodNode, Frame<SourceValue>[] frames, List<AbstractInsnNode> instructions, SourceFinderConsumer sfc, AbstractInsnNode now, SourceValue want) {
        // Remember, Frame stores the stack/locals *before* the instruction is executed

        List<Object> foundResults = new ArrayList<>();
        List<ExceptionHolder> foundExceptions = new ArrayList<>();

        for (AbstractInsnNode sourceInsn : want.insns) {
        	instructions.add(sourceInsn);
//            System.out.println(TransformerHelper.insnToString(now) + " -> " + TransformerHelper.insnToString(sourceInsn));
            switch (sourceInsn.getOpcode()) {
                // Explicit push
                case ACONST_NULL: {
                    foundResults.add(null);
                    break;
                }
                case ICONST_M1:
                case ICONST_0:
                case ICONST_1:
                case ICONST_2:
                case ICONST_3:
                case ICONST_4:
                case ICONST_5: {
                    foundResults.add(sourceInsn.getOpcode() - ICONST_0);
                    break;
                }
                case LCONST_0:
                case LCONST_1: {
                    foundResults.add((long) (sourceInsn.getOpcode() - LCONST_0));
                    break;
                }
                case FCONST_0:
                case FCONST_1:
                case FCONST_2: {
                    foundResults.add((float) (sourceInsn.getOpcode() - FCONST_0));
                    break;
                }
                case DCONST_0:
                case DCONST_1: {
                    foundResults.add((double) (sourceInsn.getOpcode() - DCONST_0));
                    break;
                }
                case BIPUSH:
                case SIPUSH: {
                    foundResults.add(((IntInsnNode) sourceInsn).operand);
                    break;
                }
                case LDC: {
                    foundResults.add(((LdcInsnNode) sourceInsn).cst);
                    break;
                }
                default: {
                    if (sfc == null) {
                        return SourceResult.unknown();
                    }
                    SourceResult found = sfc.findSource(methodNode, frames, instructions, now, want, sourceInsn);
                    if (found.isUnknown()) {
                        return SourceResult.unknown();
                    }
                    foundResults.addAll(found.getValues());
                    foundExceptions.addAll(found.getExceptions());
                    break;
                }
            }
        }

        return new SourceResult(foundResults, foundExceptions);
    }
}


text:
/**
 * Typescript definition tests for d3/d3-hierarchy module
 *
 * Note: These tests are intended to test the definitions only
 * in the sense of typing and call signature consistency. They
 * are not intended as functional tests.
 */

import * as d3Hierarchy from 'd3-hierarchy';

// -----------------------------------------------------------------------
// Preparatory Steps
// -----------------------------------------------------------------------

let num: number;
let size: [number, number];
let idString: string;

// -----------------------------------------------------------------------
// Hierarchy
// -----------------------------------------------------------------------

interface HierarchyDatum {
    name: string;
    val: number;
    children?: Array<HierarchyDatum>;
}

let hierarchyRootDatum: HierarchyDatum = {
    name: 'n0',
    val: 10,
    children: [
        {
            name: 'n11',
            val: 5
        },
        {
            name: 'n12',
            val: 4,
            children: [
                {
                    name: 'n121',
                    val: 30
                }
            ]
        }
    ]
};

let hierarchyNodeArray: Array<d3Hierarchy.HierarchyNode<HierarchyDatum>>;
let hierarchyNode: d3Hierarchy.HierarchyNode<HierarchyDatum>;

let hierarchyPointNodeArray: Array<d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>>;
let hierarchyPointNode: d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>;

let hierarchyRectangularNodeArray: Array<d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>>;
let hierarchyRectangularNode: d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>;

let hierarchyCircularNodeArray: Array<d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>>;
let hierarchyCircularNode: d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>;

// Create Hierarchy Layout Root Node =====================================

let hierarchyRootNode: d3Hierarchy.HierarchyNode<HierarchyDatum>;

hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum);

hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum, function (d) {
    return d.children || null;
});

// Use Hierarchy Node ====================================================

// data, depth, height ---------------------------------------------------

hierarchyRootDatum = hierarchyRootNode.data;
num = hierarchyRootNode.depth;
num = hierarchyRootNode.height;

// children, parent ------------------------------------------------------

hierarchyNodeArray = hierarchyRootNode.children;

let parentNode: d3Hierarchy.HierarchyNode<HierarchyDatum>;
parentNode = hierarchyNodeArray.length ? hierarchyNodeArray[0].parent : null;

// id --------------------------------------------------------------------

idString = hierarchyRootNode.id;

// ancestors(), descendants() --------------------------------------------

let ancestors: Array<d3Hierarchy.HierarchyNode<HierarchyDatum>> = hierarchyRootNode.ancestors();
let descendants: Array<d3Hierarchy.HierarchyNode<HierarchyDatum>> = hierarchyRootNode.descendants();

// leaves() ---------------------------------------------------------------

hierarchyNodeArray = hierarchyRootNode.leaves();

// path() -------------------------------------------------------------------

hierarchyNode = descendants[descendants.length - 1];

let path: Array<d3Hierarchy.HierarchyNode<HierarchyDatum>> = hierarchyRootNode.path(hierarchyNode);

// links() and HierarchyLink<...> ------------------------------------------

let links: Array<d3Hierarchy.HierarchyLink<HierarchyDatum>>;

links = hierarchyRootNode.links();

let link: d3Hierarchy.HierarchyLink<HierarchyDatum>;
link = links[0];

hierarchyNode = link.source;
hierarchyNode = link.target;

// sum() and value ----------------------------------------------------------

hierarchyRootNode = hierarchyRootNode.sum(function (d) { return d.val; });

num = hierarchyRootNode.value;

// count() and value ----------------------------------------------------------

hierarchyRootNode = hierarchyRootNode.count();

num = hierarchyRootNode.value;

// sort ---------------------------------------------------------------------

hierarchyRootNode = hierarchyRootNode.sort(function (a, b) {
    console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyNode<HierarchyDatum>
    return b.height - a.height || b.value - a.value;
});

// each(), eachAfter(), eachBefore() ----------------------------------------

hierarchyRootNode = hierarchyRootNode.each(function (node) {
    console.log(' Raw value of node:', node.data.val); // node type is HierarchyNode<HierarchyDatum>
    console.log(' Aggregated value of node:', node.value); // node type is HierarchyNode<HierarchyDatum>
});

hierarchyRootNode = hierarchyRootNode.eachAfter(function (node) {
    console.log(' Raw value of node:', node.data.val); // node type is HierarchyNode<HierarchyDatum>
    console.log(' Aggregated value of node:', node.value); // node type is HierarchyNode<HierarchyDatum>
});

hierarchyRootNode = hierarchyRootNode.eachBefore(function (node) {
    console.log(' Raw value of node:', node.data.val); // node type is HierarchyNode<HierarchyDatum>
    console.log(' Aggregated value of node:', node.value); // node type is HierarchyNode<HierarchyDatum>
});

// copy() --------------------------------------------------------------------

let copiedHierarchyNode: d3Hierarchy.HierarchyNode<HierarchyDatum>;
copiedHierarchyNode = hierarchyRootNode.copy();

// -----------------------------------------------------------------------
// Stratify
// -----------------------------------------------------------------------

interface HierarchyDatumWithParentId extends HierarchyDatum {
    parentId: string;
}

interface TabularHierarchyDatum {
    name: string;
    parentId: string;
    val: number;
}

let tabularData: Array<TabularHierarchyDatum>;
tabularData = [
    { name: 'n0', parentId: null, val: 10 },
    { name: 'n11', parentId: 'n0', val: 5 },
    { name: 'n12', parentId: 'n0', val: 4 },
    { name: 'n121', parentId: 'n12', val: 30 }
];

let idStringAccessor: (d: TabularHierarchyDatum, i?: number, data?: Array<TabularHierarchyDatum>) => (string | null | '' | undefined);

// Create Stratify Operator  ---------------------------------------------

let stratificatorizer: d3Hierarchy.StratifyOperator<TabularHierarchyDatum>;
stratificatorizer = d3Hierarchy.stratify<TabularHierarchyDatum>();

// Configure Stratify Operator  ------------------------------------------

// id(...)

stratificatorizer = stratificatorizer.id(function (d, i, data) {
    console.log('Length of tabular array: ', data.length);
    console.log('Name of first entry in tabular array: ', data[0].name); // data of type Array<TabularHierarchyDatum>
    return d.name; // d is of type TabularHierarchyDatum
});

idStringAccessor = stratificatorizer.id();

// parentId(...)

stratificatorizer = stratificatorizer.parentId(function (d, i, data) {
    console.log('Length of tabular array: ', data.length);
    console.log('Name of first entry in tabular array: ', data[0].name); // data of type Array<TabularHierarchyDatum>
    return d.parentId; // d is of type TabularHierarchyDatum
});

idStringAccessor = stratificatorizer.parentId();

// Use Stratify Operator  ------------------------------------------------

let stratifiedRootNode: d3Hierarchy.HierarchyNode<HierarchyDatumWithParentId> = stratificatorizer(tabularData);

// -----------------------------------------------------------------------
// Cluster
// -----------------------------------------------------------------------

// Create cluster layout generator =======================================

let clusterLayout: d3Hierarchy.ClusterLayout<HierarchyDatumWithParentId>;

clusterLayout = d3Hierarchy.cluster<HierarchyDatumWithParentId>();

// Configure cluster layout generator ====================================

// size() ----------------------------------------------------------------

clusterLayout = clusterLayout.size(null);
clusterLayout = clusterLayout.size([200, 200]);

size = clusterLayout.size();

// nodeSize() ------------------------------------------------------------

clusterLayout = clusterLayout.nodeSize(null);
clusterLayout = clusterLayout.nodeSize([10, 10]);
size = clusterLayout.nodeSize();

// separation() ----------------------------------------------------------

clusterLayout = clusterLayout.separation(function separation(a, b) {
    return a.data.parentId === b.data.parentId ? 1 : 2; // a and b are nodes of type HierarchyPointNode<HierarchyDatumWithParentId>
});

let separationAccessor: (a: d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>, b: d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>) => number;
separationAccessor = clusterLayout.separation();

// Use cluster layout generator ==========================================

let clusterRootNode: d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>;

clusterRootNode = clusterLayout(stratifiedRootNode);

// Use HierarchyPointNode ================================================

// x and y coordinates ---------------------------------------------------

num = clusterRootNode.x;
num = clusterRootNode.y;

// data, depth, height ---------------------------------------------------

let clusterDatum: HierarchyDatumWithParentId = clusterRootNode.data;
num = clusterRootNode.depth;
num = clusterRootNode.height;

// children, parent ------------------------------------------------------

hierarchyPointNodeArray = clusterRootNode.children;

let parentPointNode: d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>;
parentPointNode = hierarchyPointNodeArray.length ? hierarchyPointNodeArray[0].parent : null;

// id --------------------------------------------------------------------

idString = clusterRootNode.id;

// ancestors(), descendants() --------------------------------------------

let pointNodeAncestors: Array<d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>> = clusterRootNode.ancestors();
let pointNodeDescendants: Array<d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>> = clusterRootNode.descendants();

// leaves() ---------------------------------------------------------------

hierarchyPointNodeArray = clusterRootNode.leaves();

// path() -------------------------------------------------------------------

hierarchyPointNode = pointNodeDescendants[pointNodeDescendants.length - 1];

let clusterPath: Array<d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>> = clusterRootNode.path(hierarchyPointNode);

// links() and HierarchyPointLink<...> ------------------------------------------

let pointLinks: Array<d3Hierarchy.HierarchyPointLink<HierarchyDatumWithParentId>>;

pointLinks = clusterRootNode.links();

let pointLink: d3Hierarchy.HierarchyPointLink<HierarchyDatumWithParentId>;
pointLink = pointLinks[0];

hierarchyPointNode = pointLink.source;
hierarchyPointNode = pointLink.target;

// sum() and value ----------------------------------------------------------

clusterRootNode = clusterRootNode.sum(function (d) { return d.val; });

num = clusterRootNode.value;

// count() and value ----------------------------------------------------------

clusterRootNode = clusterRootNode.count();

num = clusterRootNode.value;

// sort ---------------------------------------------------------------------

clusterRootNode = clusterRootNode.sort(function (a, b) {
    console.log(' x-coordinates of a:', a.x, ' and b:', b.x); // a and b are of type HierarchyPointNode<HierarchyDatumWithParentId>
    console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyPointNode<HierarchyDatumWithParentId>
    return b.height - a.height || b.value - a.value;
});

// each(), eachAfter(), eachBefore() ----------------------------------------

clusterRootNode = clusterRootNode.each(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyPointNode<HierarchyDatumWithParentId>
    console.log('X-coordinate of node:', node.x); // node type is HierarchyPointNode<HierarchyDatumWithParentId>
});

clusterRootNode = clusterRootNode.eachAfter(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyPointNode<HierarchyDatumWithParentId>
    console.log('X-coordinate of node:', node.x); // node type is HierarchyPointNode<HierarchyDatumWithParentId>
});

clusterRootNode = clusterRootNode.eachBefore(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyPointNode<HierarchyDatumWithParentId>
    console.log('X-coordinate of node:', node.x); // node type is HierarchyPointNode<HierarchyDatumWithParentId>
});

// copy() --------------------------------------------------------------------

let copiedClusterNode: d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>;
copiedClusterNode = clusterRootNode.copy();

// -----------------------------------------------------------------------
// Tree
// -----------------------------------------------------------------------

// Create tree layout generator =======================================

let treeLayout: d3Hierarchy.TreeLayout<HierarchyDatumWithParentId>;

treeLayout = d3Hierarchy.tree<HierarchyDatumWithParentId>();

// Configure tree layout generator ====================================

// size() ----------------------------------------------------------------

treeLayout = treeLayout.size(null);
treeLayout = treeLayout.size([200, 200]);

size = treeLayout.size();

// nodeSize() ------------------------------------------------------------

treeLayout = treeLayout.nodeSize(null);
treeLayout = treeLayout.nodeSize([10, 10]);
size = treeLayout.nodeSize();

// separation() ----------------------------------------------------------

treeLayout = treeLayout.separation(function separation(a, b) {
    return a.data.parentId === b.data.parentId ? 1 : 2; // a and b are nodes of type HierarchyPointNode<HierarchyDatumWithParentId>
});

separationAccessor = treeLayout.separation();

// Use cluster layout generator ==========================================

let treeRootNode: d3Hierarchy.HierarchyPointNode<HierarchyDatumWithParentId>;

treeRootNode = treeLayout(stratifiedRootNode);

// -----------------------------------------------------------------------
// Treemap
// -----------------------------------------------------------------------

let numberRectangularNodeAccessor: (node: d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>) => number;

// Create treemap layout generator =======================================

let treemapLayout: d3Hierarchy.TreemapLayout<HierarchyDatumWithParentId>;

treemapLayout = d3Hierarchy.treemap<HierarchyDatumWithParentId>();

// Configure treemap layout generator ====================================

// tile() ----------------------------------------------------------------

treemapLayout = treemapLayout.tile(function (node, x0, y0, x1, y1) {
    let n: number;
    console.log('x0 coordinate of node: ', node.x0);
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    num = x0; // number
    num = y0; // number
    num = x1; // number
    num = y1; // number
    // tile away
});

treemapLayout = treemapLayout.tile(d3Hierarchy.treemapDice);

let tilingFn: (node: d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>, x0: number, y0: number, x1: number, y1: number) => void;
tilingFn = treemapLayout.tile();

// size() ----------------------------------------------------------------

treemapLayout = treemapLayout.size(null);
treemapLayout = treemapLayout.size([400, 200]);

size = treemapLayout.size();

// round() ------------------------------------------------------------

treemapLayout = treemapLayout.round(true);

let roundFlag: boolean = treemapLayout.round();

// padding() ----------------------------------------------------------------

treemapLayout = treemapLayout.padding(1);
treemapLayout = treemapLayout.padding(function (node) {
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    return node.x0 > 10 ? 2 : 1;
});

numberRectangularNodeAccessor = treemapLayout.padding();

// paddingInner() ----------------------------------------------------------------

treemapLayout = treemapLayout.paddingInner(1);
treemapLayout = treemapLayout.paddingInner(function (node) {
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    return node.x0 > 10 ? 2 : 1;
});

numberRectangularNodeAccessor = treemapLayout.paddingInner();

// paddingOuter() ----------------------------------------------------------------

treemapLayout = treemapLayout.paddingOuter(1);
treemapLayout = treemapLayout.paddingOuter(function (node) {
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    return node.x0 > 10 ? 2 : 1;
});

numberRectangularNodeAccessor = treemapLayout.paddingOuter();

// paddingTop() ----------------------------------------------------------------

treemapLayout = treemapLayout.paddingTop(1);
treemapLayout = treemapLayout.paddingTop(function (node) {
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    return node.x0 > 10 ? 2 : 1;
});

numberRectangularNodeAccessor = treemapLayout.paddingTop();

// paddingRight() ----------------------------------------------------------------

treemapLayout = treemapLayout.paddingRight(1);
treemapLayout = treemapLayout.paddingRight(function (node) {
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    return node.x0 > 10 ? 2 : 1;
});

numberRectangularNodeAccessor = treemapLayout.paddingRight();

// paddingBottom() ----------------------------------------------------------------

treemapLayout = treemapLayout.paddingBottom(1);
treemapLayout = treemapLayout.paddingBottom(function (node) {
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    return node.x0 > 10 ? 2 : 1;
});

numberRectangularNodeAccessor = treemapLayout.paddingBottom();

// paddingLeft() ----------------------------------------------------------------

treemapLayout = treemapLayout.paddingLeft(1);
treemapLayout = treemapLayout.paddingLeft(function (node) {
    console.log('Node parent id: ', node.data.parentId); // type of node is HierarchyRectangularNode<HierarchyDatumWithParentId>
    return node.x0 > 10 ? 2 : 1;
});

numberRectangularNodeAccessor = treemapLayout.paddingLeft();

// Use treemap layout generator ==========================================

let treemapRootNode: d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>;

treemapRootNode = treemapLayout(stratifiedRootNode);

// Tiling functions ======================================================

tilingFn = d3Hierarchy.treemapBinary;

tilingFn = d3Hierarchy.treemapDice;

tilingFn = d3Hierarchy.treemapSlice;

tilingFn = d3Hierarchy.treemapSliceDice;

// Tiling Factory functions treemapSquarify() and treemapResquarify() ====

let tilingFactoryFn: d3Hierarchy.RatioSquarifyTilingFactory;

tilingFactoryFn = d3Hierarchy.treemapSquarify;
tilingFactoryFn = d3Hierarchy.treemapSquarify.ratio(2);

treemapLayout.tile(d3Hierarchy.treemapSquarify.ratio(2));

tilingFactoryFn = d3Hierarchy.treemapResquarify;
tilingFactoryFn = d3Hierarchy.treemapResquarify.ratio(2);

treemapLayout.tile(d3Hierarchy.treemapResquarify.ratio(2));

// Use HierarchyRectangularNode ================================================

// x and y coordinates ---------------------------------------------------

num = treemapRootNode.x0;
num = treemapRootNode.y0;
num = treemapRootNode.x1;
num = treemapRootNode.y1;

// data, depth, height ---------------------------------------------------

let treemapDatum: HierarchyDatumWithParentId = treemapRootNode.data;
num = treemapRootNode.depth;
num = treemapRootNode.height;

// children, parent ------------------------------------------------------

hierarchyRectangularNodeArray = treemapRootNode.children;

let parentRectangularNode: d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>;
parentRectangularNode = hierarchyRectangularNodeArray.length ? hierarchyRectangularNodeArray[0].parent : null;

// id --------------------------------------------------------------------

idString = treemapRootNode.id;

// ancestors(), descendants() --------------------------------------------

let rectangularNodeAncestors: Array<d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>> = treemapRootNode.ancestors();
let rectangularNodeDescendants: Array<d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>> = treemapRootNode.descendants();

// leaves() ---------------------------------------------------------------

hierarchyRectangularNodeArray = treemapRootNode.leaves();

// path() -------------------------------------------------------------------

hierarchyRectangularNode = rectangularNodeDescendants[rectangularNodeDescendants.length - 1];

let treemapPath: Array<d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>> = treemapRootNode.path(hierarchyRectangularNode);

// links() and HierarchyRectangulerLink<...> ------------------------------------------

let rectangularLinks: Array<d3Hierarchy.HierarchyRectangularLink<HierarchyDatumWithParentId>>;

rectangularLinks = treemapRootNode.links();

let rectangularLink: d3Hierarchy.HierarchyRectangularLink<HierarchyDatumWithParentId>;
rectangularLink = rectangularLinks[0];

hierarchyRectangularNode = rectangularLink.source;
hierarchyRectangularNode = rectangularLink.target;

// sum() and value ----------------------------------------------------------

treemapRootNode = treemapRootNode.sum(function (d) { return d.val; });

num = treemapRootNode.value;

// count() and value ----------------------------------------------------------

treemapRootNode = treemapRootNode.count();

num = treemapRootNode.value;
// sort ---------------------------------------------------------------------

treemapRootNode = treemapRootNode.sort(function (a, b) {
    console.log(' x0-coordinates of a:', a.x0, ' and b:', b.x0); // a and b are of type HierarchyRectangularNode<HierarchyDatumWithParentId>
    console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyRectangularNode<HierarchyDatumWithParentId>
    return b.height - a.height || b.value - a.value;
});

// each(), eachAfter(), eachBefore() ----------------------------------------

treemapRootNode = treemapRootNode.each(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyRectangularNode<HierarchyDatumWithParentId>
    console.log('X0-coordinate of node:', node.x0); // node type is HierarchyRectangularNode<HierarchyDatumWithParentId>
});

treemapRootNode = treemapRootNode.eachAfter(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyRectangularNode<HierarchyDatumWithParentId>
    console.log('X0-coordinate of node:', node.x0); // node type is HierarchyRectangularNode<HierarchyDatumWithParentId>
});

treemapRootNode = treemapRootNode.eachBefore(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyRectangularNode<HierarchyDatumWithParentId>
    console.log('X0-coordinate of node:', node.x0); // node type is HierarchyRectangularNode<HierarchyDatumWithParentId>
});

// copy() --------------------------------------------------------------------

let copiedTreemapNode: d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>;
copiedTreemapNode = treemapRootNode.copy();

// -----------------------------------------------------------------------
// Partition
// -----------------------------------------------------------------------

// Create partition layout generator =======================================

let partitionLayout: d3Hierarchy.PartitionLayout<HierarchyDatumWithParentId>;

partitionLayout = d3Hierarchy.partition<HierarchyDatumWithParentId>();

// Configure partition layout generator ====================================

// size() ----------------------------------------------------------------

partitionLayout = partitionLayout.size(null);
partitionLayout = partitionLayout.size([400, 200]);

size = partitionLayout.size();

// round() ------------------------------------------------------------

partitionLayout = partitionLayout.round(true);

roundFlag = partitionLayout.round();

// padding() ----------------------------------------------------------------

partitionLayout = partitionLayout.padding(1);

num = partitionLayout.padding();

// Use partition layout generator ==========================================

let partitionRootNode: d3Hierarchy.HierarchyRectangularNode<HierarchyDatumWithParentId>;

partitionRootNode = partitionLayout(stratifiedRootNode);

// -----------------------------------------------------------------------
// Pack
// -----------------------------------------------------------------------

let numberCircularNodeAccessor: (node: d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>) => number;

// Create pack layout generator =======================================

let packLayout: d3Hierarchy.PackLayout<HierarchyDatumWithParentId>;

packLayout = d3Hierarchy.pack<HierarchyDatumWithParentId>();

// Configure pack layout generator ====================================

// size() ----------------------------------------------------------------

packLayout = packLayout.size(null);
packLayout = packLayout.size([400, 400]);

size = packLayout.size();

// radius() ------------------------------------------------------------

packLayout = packLayout.radius(function (node) {
    console.log('Radius property of node before completing accessor: ', node.r); // node is of type HierarchyCircularNode<HierarchyDatumWithParentId>
    console.log('Parent id of node: ', node.data.parentId); // node is of type HierarchyCircularNode<HierarchyDatumWithParentId>
    return node.value;
});

numberCircularNodeAccessor = packLayout.radius();

// padding() ----------------------------------------------------------------

packLayout = packLayout.padding(1);

packLayout = packLayout.padding(function (node) {
    console.log('Radius property of node: ', node.r); // node is of type HierarchyCircularNode<HierarchyDatumWithParentId>
    console.log('Parent id of node: ', node.data.parentId); // node is of type HierarchyCircularNode<HierarchyDatumWithParentId>
    return node.value > 10 ? 2 : 1;
});

numberCircularNodeAccessor = packLayout.padding();

// Use partition layout generator ==========================================

let packRootNode: d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>;

packRootNode = packLayout(stratifiedRootNode);

// Use HierarchyCircularNode ================================================

// x and y coordinates and radius r ------------------------------------------

num = packRootNode.x;
num = packRootNode.y;
num = packRootNode.r;

// data, depth, height ---------------------------------------------------

let packDatum: HierarchyDatumWithParentId = packRootNode.data;
num = packRootNode.depth;
num = packRootNode.height;

// children, parent ------------------------------------------------------

hierarchyCircularNodeArray = packRootNode.children;

let parentCircularNode: d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>;
parentCircularNode = hierarchyCircularNodeArray.length ? hierarchyCircularNodeArray[0].parent : null;

// id --------------------------------------------------------------------

idString = packRootNode.id;

// ancestors(), descendants() --------------------------------------------

let circularNodeAncestors: Array<d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>> = packRootNode.ancestors();
let circularNodeDescendants: Array<d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>> = packRootNode.descendants();

// leaves() ---------------------------------------------------------------

hierarchyCircularNodeArray = packRootNode.leaves();

// path() -------------------------------------------------------------------

hierarchyCircularNode = circularNodeDescendants[circularNodeDescendants.length - 1];

let packPath: Array<d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>> = packRootNode.path(hierarchyCircularNode);

// links() and HierarchyRectangulerLink<...> ------------------------------------------

let circularLinks: Array<d3Hierarchy.HierarchyCircularLink<HierarchyDatumWithParentId>>;

circularLinks = packRootNode.links();

let circularLink: d3Hierarchy.HierarchyCircularLink<HierarchyDatumWithParentId>;
circularLink = circularLinks[0];

hierarchyCircularNode = circularLink.source;
hierarchyCircularNode = circularLink.target;

// sum() and value ----------------------------------------------------------

packRootNode = packRootNode.sum(function (d) { return d.val; });

num = packRootNode.value;

// count() and value ----------------------------------------------------------

packRootNode = packRootNode.count();

num = packRootNode.value;
// sort ---------------------------------------------------------------------

packRootNode = packRootNode.sort(function (a, b) {
    console.log('radius of a:', a.r, ' and b:', b.r); // a and b are of type HierarchyCircularNode<HierarchyDatumWithParentId>
    console.log(' Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyCircularNode<HierarchyDatumWithParentId>
    return b.height - a.height || b.value - a.value;
});

// each(), eachAfter(), eachBefore() ----------------------------------------

packRootNode = packRootNode.each(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyCircularNode<HierarchyDatumWithParentId>
    console.log('Radius of node:', node.r); // node type is HierarchyCircularNode<HierarchyDatumWithParentId>
});

packRootNode = packRootNode.eachAfter(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyCircularNode<HierarchyDatumWithParentId>
    console.log('Radius of node:', node.r); // node type is HierarchyCircularNode<HierarchyDatumWithParentId>
});

packRootNode = packRootNode.eachBefore(function (node) {
    console.log('ParentId:', node.data.parentId); // node type is HierarchyCircularNode<HierarchyDatumWithParentId>
    console.log('Radius of node:', node.r); // node type is HierarchyCircularNode<HierarchyDatumWithParentId>
});

// copy() --------------------------------------------------------------------

let copiedPackNode: d3Hierarchy.HierarchyCircularNode<HierarchyDatumWithParentId>;
copiedPackNode = packRootNode.copy();

// -----------------------------------------------------------------------
// Pack Siblings and Enclosure
// -----------------------------------------------------------------------

interface CircleData extends d3Hierarchy.PackCircle {
    v: string;
}

let circles: Array<CircleData> = [
    { r: 10, v: 'a' },
    { r: 1, v: 'b' },
    { r: 20, v: 'c' }
];

// packSiblings

circles = d3Hierarchy.packSiblings(circles);

// packEnclose

let enclosure: { r: number, x: number, y: number };

enclosure = d3Hierarchy.packEnclose(circles);


text:
module AmazonSellerCentral
  class Inventory
    module ClassMethods
      def load_first_page
        mech = AmazonSellerCentral.mechanizer
        mech.login_to_seller_central
        manage_inventory = mech.follow_link_with(:text => "Manage Inventory")
        InventoryPage.new( :page => manage_inventory, :page_no => 1, :uri_base => manage_inventory.uri.to_s, :agent => mech )
      end

      def load_all_pages
        pages = [load_first_page]
        while pages.last.has_next?
          pages << pages.last.next_page
          yield pages.last if block_given?
        end
        pages
      end
      alias each_page load_all_pages
    end

    extend ClassMethods
  end
end


text:
package com.myjavadoc.hibernate4.configuration;

import org.hibernate.cfg.Configuration;
//import org.hibernate.ejb.Ejb3Configuration;
import org.hibernate.ejb.HibernatePersistence;
import org.hibernate.HibernateException;

import java.util.HashMap;
import java.util.Map;

public class JPAComponentConfiguration
    extends AbstractComponentConfiguration
{
// --------------------- Interface ComponentConfiguration ---------------------

    public String getName()
    {
        return "jpaconfiguration";
    }

    protected Configuration createConfiguration()
    {
        String persistenceUnit = getExporterMojo().getComponentProperty( "persistenceunit" );

        try
        {
            //Ejb3Configuration ejb3cfg = new Ejb3Configuration();
//            if ( ejb3cfg.configure( persistenceUnit, getMappedProperties() ) == null )
//            {
//                getExporterMojo().getLog().error( "Persistence unit not found: '" + persistenceUnit + "'." );
//                return null;
//            }
//            return ejb3cfg.getHibernateConfiguration();
        	return null;
        }
        catch ( HibernateException he )
        {
            getExporterMojo().getLog().error( he.getMessage() );
            return null;
        }
    }

    private Map<String,String> getMappedProperties()
    {
        Map<String,String> map = new HashMap<String,String>();

        String namingStrategy = getExporterMojo().getComponentProperty( "namingstrategy" );
        if ( namingStrategy != null )
        {
            map.put( HibernatePersistence.NAMING_STRATEGY, namingStrategy );
        }

        return map;
    }
}


text:
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>

    <copyright>
      <year>2000</year><year>2009</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.

      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.

    </legalnotice>

    <title>CosNotifyChannelAdmin_EventChannelFactory</title>
    <shorttitle>..._EventChannelFactory</shorttitle>
    <prepared></prepared>
    <docno></docno>
    <checked></checked>
    <date>2000-02-01</date>
    <rev>1.0</rev>

  <module>CosNotifyChannelAdmin_EventChannelFactory</module>
  <modulesummary>This module implements the OMG  CosNotifyChannelAdmin::EventChannelFactory interface.</modulesummary>
  <description>

To get access to the record definitions for the structures use:

<c>-include_lib("cosNotification/include/*.hrl").</c>

  </description>
  <funcs>
    <func>
      <name>create_channel(ChannelFactory, InitialQoS, InitialAdmin) -> Return</name>
      <fsummary>Create a new channel</fsummary>
      <type>
        <v>ChannelFactory = #objref</v>
        <v>InitialQoS = CosNotification::QoSProperties</v>
        <v>InitialAdmin = CosNotification::AdminProperties</v>
        <v>Return = {EventChannel, ChannelID}</v>
        <v>EventChannel = #objref</v>
        <v>ChannelID = long()</v>
      </type>
      <desc>

This operation creates a new event channel. Along with the channel
          reference an id is returned which can be used when invoking other
          operations exported by this module. The Quality of Service argument
          supplied will be inherited by objects created by the channel. For more
          information about QoS settings see the <c>User's Guide</c>.

If no QoS- and/or Admin-properties are supplied (i.e. empty list),
          the default settings will be used. For more information, see the
          User's Guide.

      </desc>
    </func>
    <func>
      <name>get_all_channels(ChannelFactory) -> ChannelIDSeq</name>
      <fsummary>Return all Id:s for channels, currently alive, created by the target object</fsummary>
      <type>
        <v>ChannelFactory = #objref</v>
        <v>ChannelIDSeq = [long()]</v>
      </type>
      <desc>

This operation returns a id sequence of all channel's created by this ChannelFactory.

      </desc>
    </func>
    <func>
      <name>get_event_channel(ChannelFactory, ChannelID) -> Return</name>
      <fsummary>Return the channel object associated with the given Id</fsummary>
      <type>
        <v>ChannelFactory = #objref</v>
        <v>ChannelID = long()</v>
        <v>Retrurn = EventChannel | {'EXCEPTION', #'CosNotifyChannelAdmin_ChannelNotFound'{}}</v>
        <v>EventChannel = #objref</v>
      </type>
      <desc>

This operation returns the EventChannel associated with the given id. If no channel is
          associated with the id, i.e., never existed or have been terminated, an exception is raised.

      </desc>
    </func>
  </funcs>

</erlref>


text:
/** Defines serializers / deserializers for AWS. */
@Experimental(Kind.SOURCE_SINK)
package org.apache.beam.sdk.io.kinesis.serde;

import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.annotations.Experimental.Kind;


text:
package net.jpountz.example;

import java.io.UnsupportedEncodingException;

import net.jpountz.lz4.LZ4Compressor;
import net.jpountz.lz4.LZ4Factory;
import net.jpountz.lz4.LZ4FastDecompressor;
import net.jpountz.lz4.LZ4SafeDecompressor;

public class LZ4Example {

  public static void main(String[] args) throws Exception {
    example();
  }

  private static void example() throws UnsupportedEncodingException {
    LZ4Factory factory = LZ4Factory.fastestInstance();

    byte[] data = "12345345234572".getBytes("UTF-8");
    final int decompressedLength = data.length;

    // compress data
    LZ4Compressor compressor = factory.fastCompressor();
    int maxCompressedLength = compressor.maxCompressedLength(decompressedLength);
    byte[] compressed = new byte[maxCompressedLength];
    int compressedLength = compressor.compress(data, 0, decompressedLength, compressed, 0, maxCompressedLength);

    // decompress data
    // - method 1: when the decompressed length is known
    LZ4FastDecompressor decompressor = factory.fastDecompressor();
    byte[] restored = new byte[decompressedLength];
    int compressedLength2 = decompressor.decompress(compressed, 0, restored, 0, decompressedLength);
    // compressedLength == compressedLength2

    // - method 2: when the compressed length is known (a little slower)
    // the destination buffer needs to be over-sized
    LZ4SafeDecompressor decompressor2 = factory.safeDecompressor();
    int decompressedLength2 = decompressor2.decompress(compressed, 0, compressedLength, restored, 0);
    // decompressedLength == decompressedLength2
  }

}


text:
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Search extends Front_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('site_model');

    }

    public function index() {
        $key = $this->input->post('recherche');

        $this->data['articles'] = $this->articles_model->search($key);
        $this->data['recherche'] = $key;
        $this->data['site'] = $this->site_model->get_site_configurations();
        $this->data['view'] = 'front/search';
        $this->load->view('front/template/layout', $this->data);
    }

}


text:
package sirs.framework.config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigUtil {

    /**
     * Create new properties object from resource file.
     *
     * @param resourcePath resource file path (e.g. /file.properties)
     * @return properties object with loaded properties or null if resource not found
     */
    public static Properties getResourceAsProperties(String resourcePath) {
        Properties newProps = null;
        InputStream is = null;
        try {
            is = Config.class.getResourceAsStream(resourcePath);
            if(is == null) {
                return null;
            }
            newProps = new Properties();
            newProps.load(is);
        } catch (IOException e) {
            return null;
        } finally {
            try {
                if(is != null)
                    is.close();
            } catch (IOException e) {
            }
        }
        return newProps;
    }

    /**
     * Copy all source properties to destination properties, one by one.
     */
    public static void copyProperties(Properties sourceProps, Properties destinationProps) {
        copyProperties(sourceProps, destinationProps, "", "");
    }

    /**
     * Copy all source properties to destination properties, one by one,
     * adding the specified prefix and suffix to the key name
     */
    public static void copyProperties(Properties sourceProps, Properties destinationProps,
                                      String propNamePrefix, String propNameSuffix) {
        // check arguments
        if(sourceProps == null)
            throw new IllegalArgumentException("Can't copy properties from null source!");
        if(destinationProps == null)
            throw new IllegalArgumentException("Can't copy properties to null destination!");
        if(propNamePrefix == null)
            propNamePrefix = "";
        if(propNameSuffix == null)
            propNameSuffix = "";

        // copy keys using prefix and suffix
        for(Object keyObject : sourceProps.keySet()) {
            String keyString = (String) keyObject;
            int size = propNamePrefix.length() + keyString.length() + propNameSuffix.length();
            if(size > keyString.length()) {
                // new key is different, build it
                StringBuilder sb = new StringBuilder(size);
                sb.append(propNamePrefix);
                sb.append(keyString);
                sb.append(propNameSuffix);
                keyString = sb.toString();
            }
            destinationProps.setProperty(keyString,(String)sourceProps.get((String)keyObject));
        }
    }

    /**
     * Copy all source properties to destination properties, one by one,
     * adding the specified prefix and suffix to the key name
     */
    public static void removePropertiesWithPrefix(Properties props, String prefix) {
        // check arguments
        if(props == null)
            throw new IllegalArgumentException("Can't remove properties with prefix from null properties!");
        if(prefix == null)
            throw new IllegalArgumentException("Can't remove properties with null prefix!");

        // typesafe for-each loop
        for (String key : props.stringPropertyNames()) {
        	if (key.startsWith(prefix)) {
                props.remove(key);
            }
        }
    }

    /**
     *  Recognize if string contains "true" or one of its synonyms: "yes" and "on".
     *  Everything else is considered false (including null).
     *
     *  Surrounding whitespace is trimmed.
     *  Character case (Tt) is ignored.
     */
    public static boolean recognizeAsTrue(String propertyValue) {
        if(propertyValue == null)
            return false;
        propertyValue = propertyValue.trim();
        if(propertyValue.equalsIgnoreCase("true") ||
           propertyValue.equalsIgnoreCase("yes") ||
           propertyValue.equalsIgnoreCase("on"))
            return true;
        else
            return false;
    }

}


text:
package org.mifos.framework.components.batchjobs.helpers;

import org.mifos.framework.components.batchjobs.exceptions.BatchJobException;

/**
 * This superclass of ProductStatusHelper is set to do the following:
 * Fail to run execute method (throw an exception) three times, then
 * run execute correctly two times, the fail once more and continue to
 * work correctly afterwards.
 *

 * It's used in catch-up mechanism testing.
 */
public class CatchUpErrorMockHelper extends ProductStatusHelper {

    private static int COUNTER = 0;

    @Override
    public void execute(long timeInMillis) throws BatchJobException {
        if(COUNTER < 3) {
            COUNTER++;
            throw new BatchJobException(null);
        }
        if(COUNTER == 5) {
            COUNTER++;
            throw new BatchJobException(null);
        }
        super.execute(timeInMillis);
        COUNTER++;
    }

}


text:
<!DOCTYPE HTML>

  <title>Web Storage</title>
  <meta name="timeout" content="long">

storage_session_setItem_QUOTA_EXCEEDED_ERR


text:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.notifications;

import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;

import android.app.Notification;
import android.os.Environment;

import org.chromium.base.ThreadUtils;
import org.chromium.chrome.browser.preferences.website.ContentSetting;
import org.chromium.chrome.browser.preferences.website.NotificationInfo;
import org.chromium.chrome.test.ChromeTabbedActivityTestBase;
import org.chromium.chrome.test.util.browser.notifications.MockNotificationManagerProxy;
import org.chromium.chrome.test.util.browser.notifications.MockNotificationManagerProxy.NotificationEntry;
import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
import org.chromium.net.test.EmbeddedTestServer;

import java.util.List;
import java.util.concurrent.TimeoutException;

/**
 * Base class for instrumentation tests using Web Notifications on Android.
 *
 * Web Notifications are only supported on Android JellyBean and beyond.
 */
public class NotificationTestBase extends ChromeTabbedActivityTestBase {
    /** The maximum time to wait for a criteria to become valid. */
    private static final long MAX_TIME_TO_POLL_MS = scaleTimeout(6000);

    /** The polling interval to wait between checking for a satisfied criteria. */
    private static final long POLLING_INTERVAL_MS = 50;

    private MockNotificationManagerProxy mMockNotificationManager;
    private EmbeddedTestServer mTestServer;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        mTestServer = EmbeddedTestServer.createAndStartFileServer(
                getInstrumentation().getContext(), Environment.getExternalStorageDirectory());
    }

    /** Returns the test server. */
    protected EmbeddedTestServer getTestServer() {
        return mTestServer;
    }

    /**
     * Returns the origin of the HTTP server the test is being ran on.
     */
    protected String getOrigin() {
        return mTestServer.getURL("/");
    }

    /**
     * Sets the permission to use Web Notifications for the test HTTP server's origin to |setting|.
     */
    protected void setNotificationContentSettingForCurrentOrigin(final ContentSetting setting)
            throws InterruptedException, TimeoutException {
        final String origin = getOrigin();

        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                // The notification content setting does not consider the embedder origin.
                NotificationInfo notificationInfo = new NotificationInfo(origin, "", false);
                notificationInfo.setContentSetting(setting);
            }
        });

        String permission = runJavaScriptCodeInCurrentTab("Notification.permission");
        if (setting == ContentSetting.ALLOW) {
            assertEquals("\"granted\"", permission);
        } else if (setting == ContentSetting.BLOCK) {
            assertEquals("\"denied\"", permission);
        } else {
            assertEquals("\"default\"", permission);
        }
    }

    /**
     * Shows a notification with |title| and |options|, waits until it has been displayed and then
     * returns the Notification object to the caller. Requires that only a single notification is
     * being displayed in the notification manager.
     *
     * @param title Title of the Web Notification to show.
     * @param options Optional map of options to include when showing the notification.
     * @return The Android Notification object, as shown in the framework.
     */
    protected Notification showAndGetNotification(String title, String options)
            throws InterruptedException, TimeoutException {
        runJavaScriptCodeInCurrentTab("showNotification(\"" + title + "\", " + options + ");");
        return waitForNotification().notification;
    }

    /**
     * Waits until a notification has been displayed and then returns a NotificationEntry object to
     * the caller. Requires that only a single notification is displayed.
     *
     * @return The NotificationEntry object tracked by the MockNotificationManagerProxy.
     */
    protected NotificationEntry waitForNotification() throws InterruptedException {
        waitForNotificationManagerMutation();
        List<NotificationEntry> notifications = getNotificationEntries();
        assertEquals(1, notifications.size());
        return notifications.get(0);
    }

    protected List<NotificationEntry> getNotificationEntries() {
        return mMockNotificationManager.getNotifications();
    }

    /**
     * Waits for a mutation to occur in the mocked notification manager. This indicates that Chrome
     * called into Android to notify or cancel a notification.
     */
    protected void waitForNotificationManagerMutation() throws InterruptedException {
        CriteriaHelper.pollUiThread(new Criteria() {
            @Override
            public boolean isSatisfied() {
                return mMockNotificationManager.getMutationCountAndDecrement() > 0;
            }
        }, MAX_TIME_TO_POLL_MS, POLLING_INTERVAL_MS);
    }

    @Override
    public void startMainActivity() throws InterruptedException {
        // The NotificationPlatformBridge must be overriden prior to the browser process starting.
        mMockNotificationManager = new MockNotificationManagerProxy();
        NotificationPlatformBridge.overrideNotificationManagerForTesting(mMockNotificationManager);

        startMainActivityFromLauncher();
    }

    @Override
    protected void tearDown() throws Exception {
        NotificationPlatformBridge.overrideNotificationManagerForTesting(null);
        mTestServer.stopAndDestroyServer();
        super.tearDown();
    }
}


text:
<!DOCTYPE html>

        <title>@yield("title")</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">

		<link href="{{URL::asset('css/bootstrap.min.css')}}" rel="stylesheet">
		<link href="{{URL::asset('css/bootstrap.css')}}" rel="stylesheet">
		<link href="{{URL::asset('css/style.css')}}" rel="stylesheet">

		{{----}}

		@yield("head")

            	@yield("content")

        @yield("end-body")

	@yield("feet")


text:
package aerospike

import (
	"time"
)

const defaultIdleTimeout = 14 * time.Second

// ClientPolicy encapsulates parameters for client policy command.
type ClientPolicy struct {
	// User authentication to cluster. Leave empty for clusters running without restricted access.
	User string

	// Password authentication to cluster. The password will be stored by the client and sent to server
	// in hashed format. Leave empty for clusters running without restricted access.
	Password string

	// Initial host connection timeout in milliseconds.  The timeout when opening a connection
	// to the server host for the first time.
	Timeout time.Duration //= 1 second

	// Connection idle timeout. Every time a connection is used, its idle
	// deadline will be extended by this duration. When this deadline is reached,
	// the connection will be closed and discarded from the connection pool.
	IdleTimeout time.Duration //= 14 seconds

	// Size of the Connection Queue cache.
	ConnectionQueueSize int //= 256

	// If set to true, will not create a new connection
	// to the node if there are already `ConnectionQueueSize` active connections.
	LimitConnectionsToQueueSize bool //= false

	// Throw exception if host connection fails during addHost().
	FailIfNotConnected bool //= true

	// TendInterval determines interval for checking for cluster state changes.
	// Minimum possible interval is 10 Miliseconds.
	TendInterval time.Duration //= 1 second
}

// NewClientPolicy generates a new ClientPolicy with default values.
func NewClientPolicy() *ClientPolicy {
	return &ClientPolicy{
		Timeout:                     time.Second,
		IdleTimeout:                 defaultIdleTimeout,
		ConnectionQueueSize:         256,
		FailIfNotConnected:          true,
		TendInterval:                time.Second,
		LimitConnectionsToQueueSize: false,
	}
}

// RequiresAuthentication returns true if a USer or Password is set for ClientPolicy.
func (cp *ClientPolicy) RequiresAuthentication() bool {
	return (cp.User != "") || (cp.Password != "")
}


text:
import skvideo.io

# a frame from the bigbuckbunny sequence
vid = skvideo.io.vread("vid_luma_frame1.png")
T, M, N, C = vid.shape

print("Number of frames: %d" % (T,))
print("Number of rows: %d" % (M,))
print("Number of cols: %d" % (N,))
print("Number of channels: %d" % (C,))