text:
import warnings
import weakref

import six

from chainer import backend
from chainer.backends import cuda
from chainer import configuration
# for backward compatibility
from chainer.function_hook import FunctionHook  # NOQA
from chainer import function_node
from chainer import variable
import chainerx

def no_backprop_mode():
    """Make a context manager which disables back-propagation.

    In this context, Chainer does not make a computational graph. It has the
    benefit of reducing memory consumption. However, a
    :class:`~chainer.Variable` created in this context does not hold a
    reference to the :class:`~chainer.FunctionNode` that created itself so no
    gradients are accumulated by :func:`~chainer.Variable.backward`.

    In the following example, ``y`` is created in this context, which means
    that calling :func:`~chainer.Variable.backward` on ``y`` has no effect on
    the gradients of ``x``.

    >>> x = chainer.Variable(np.array([1,], np.float32))
    >>> with chainer.no_backprop_mode():
    ...     y = x + 1
    >>> y.backward()
    >>> x.grad is None
    True

    .. seealso::

       See :func:`force_backprop_mode` for details on how to override this
       context.

    """
    return configuration.using_config('enable_backprop', False)

def force_backprop_mode():
    """Make a context manager which enables back-propagation.

    When you want to enable back-propagation in :func:`no_backprop_mode`, call
    this method. A :class:`~chainer.Variable` created in this context always
    has a computational graph unless overridden by deeper contexts. If you call
    this method outside of :func:`no_backprop_mode` context, it changes
    nothing.

    In the following example, ``y`` has a computational graph and calling
    :func:`~chainer.Variable.backward` on ``y`` will compute and accumulate the
    gradients of the variables in the graph, in this case only ``x``.

    >>> x = chainer.Variable(np.array([1,], np.float32))
    >>> with chainer.no_backprop_mode():
    ...     with chainer.force_backprop_mode():
    ...         y = x + 1
    >>> y.backward()
    >>> x.grad
    array([1.], dtype=float32)

    .. seealso::

       See :func:`no_backprop_mode` for details on disabled back-propagation
       mode.

    """
    return configuration.using_config('enable_backprop', True)

class FunctionAdapter(function_node.FunctionNode):

    """Adapter class to wrap Function with FunctionNode.

    While :class:`~chainer.FunctionNode` provides the interface
    of new-style differentiable functions, the old-style
    :class:`~chainer.Function` can still be used for the backward
    compatibility.
    This class provides an adapter of there interface; it adds
    :class:`~chainer.FunctionNode` interface to any
    :class:`~chainer.Function` object by delegation.

    .. note::

       The ownership of :class:`FunctionAdapter` and :class:`~chainer.Function`
       is a bit tricky.
       At the initialization, :class:`FunctionAdapter` is owned by the
       :class:`~chainer.Function` object.
       Once the function is applied to variables, the ownership is reversed;
       the adapter becomes the owner of the
       :class:`~chainer.Function` object and the :class:`~chainer.Function`
       object changes the reference to a weak one.

    Args:
        function (~chainer.Function): The function object to wrap.

    .. versionadded:: 3.0.0

    """

    _function = None
    _weak_function = None

    def __init__(self, function):
        super(FunctionAdapter, self).__init__()
        self._weak_function = weakref.ref(function)
        function._owned_node = self

    @property
    def function(self):
        """The :class:`Function` object that this adapter is wrapping."""
        func = self._function
        if func is not None:
            return func

        weak_func = self._weak_function
        return weak_func and weak_func()

    @property
    def label(self):
        return self._function.label

    @property
    def _impl_name(self):
        return self._function.__class__.__name__

    def check_type_forward(self, in_types):
        self._function.check_type_forward(in_types)

    def forward(self, inputs):
        # Retain all inputs by default in old-style functions.
        self.retain_inputs(six.moves.range(len(inputs)))
        if self._is_chainex_fallback_mode:
            with function_node._chainerx_attribute_fallback(
                    self._function, self.chainerx_device):
                return self._function.forward(inputs)
        else:
            return self._function.forward(inputs)

    def backward(self, target_input_indexes, grad_outputs):
        retained_inputs = self.get_retained_inputs()
        inputs = [None] * len(self.inputs)
        in_data = [None] * len(self.inputs)
        for retained, i_in in six.moves.zip(
                retained_inputs, self._input_indexes_to_retain):
            inputs[i_in] = retained
            in_data[i_in] = retained.array
        in_data = tuple(in_data)

        grad_out_data = tuple([None if grad is None else grad.data
                               for grad in grad_outputs])

        is_chainex_fallback_mode = self._is_chainex_fallback_mode
        if is_chainex_fallback_mode:
            # Convert input and output gradients to numpy/cupy
            in_data = backend.from_chainerx(in_data)
            grad_out_data = backend.from_chainerx(grad_out_data)

        # Call Function.backward
        with cuda.get_device_from_array(*(in_data + grad_out_data)):
            if is_chainex_fallback_mode:
                # Enable attribute fallback
                with function_node._chainerx_attribute_fallback(
                        self._function, self.chainerx_device):
                    gxs = self._function.backward(in_data, grad_out_data)
            else:
                gxs = self._function.backward(in_data, grad_out_data)

        for x, gx in six.moves.zip(self.inputs, gxs):
            variable._check_grad_type(self, x, True, gx, False)

        # Convert input gradients back to ChainerX
        if is_chainex_fallback_mode:
            gxs = backend.to_chainerx(gxs)

        ret = []
        for i in target_input_indexes:
            if gxs[i] is None:
                g = None
            else:
                # Intentionally not passing requires_grad=False so that
                # backprop routines can raise an error when a further backprop
                # is attempted against this gradient variable.
                g = variable.Variable(gxs[i])
                if g.xp is not chainerx:
                    g.node._old_style_grad_generator = self._function.label
            ret.append(g)

        return tuple(ret)

class Function(object):

    """Old-style interface of a differentiable function.

    This class provides an interface to implement an old-style differentiable
    function (i.e., the function application is recorded to the computational
    graph). The subclass of :class:`Function` that implement :meth:`forward`
    and :meth:`backward` can be used to run the forward computation and
    automatically induce the backpropagation procedure.

    There is another way to implement such a function: subclassing
    :class:`~chainer.FunctionNode`. There are mainly two
    differences between them.

    1. The *differentiable backprop* is available for
       :class:`~chainer.FunctionNode`,
       while it is not for :class:`Function` because the :meth:`backward`
       of the latter directly operates on the arrays instead of
       :class:`Variable` objects so that it cannot record the history of
       the computation.
    2. The information passed to :meth:`backward` is different. In
       :class:`~chainer.FunctionNode`,
       which inputs the function node has to compute
       the gradients w.r.t. is passed so that it can omit unnecessary
       computations, while :class:`Function` always has to compute gradients
       w.r.t. all the input nodes.
       The :class:`~chainer.FunctionNode` also accepts the
       current gradient values of the input nodes so that the accumulation
       work can be merged with the gradient computation if an efficient kernel
       is available.

    This class uses :class:`~chainer.FunctionAdapter` to convert
    the interface to that of :class:`~chainer.FunctionNode` and
    adds the :class:`~chainer.FunctionNode` object to the
    computational graph.

    See :class:`~chainer.FunctionNode` for the details of
    building the computational graph in Chainer.

    """

    _node = None
    _owned_node = None

    def __call__(self, *inputs):
        """Applies forward propagation with chaining backward references.

        This method creates a new :class:`~chainer.FunctionAdapter`
        object and runs the forward propagation using it.

        See :class:`~chainer.FunctionNode` for the detailed
        behavior of building the computational graph.

        Args:
            inputs: Tuple of input :class:`Variable`, :class:`numpy.ndarray` or
                :class:`cupy.ndarray` objects.
                If the input is an :class:`numpy.ndarray` or a
                :class:`cupy.ndarray`, it is automatically wrapped with
                :class:`Variable`.

        Returns:
            One :class:`Variable` object or a tuple of multiple
            :class:`Variable` objects.

        """
        node = self.node

        # Swap the ownership
        node._function = self
        node._weak_function = None
        self._node = weakref.ref(node)
        self._owned_node = None

        ret = node.apply(inputs)

        if len(ret) == 1:
            return ret[0]
        else:
            return tuple(ret)

    @property
    def inputs(self):
        """The input nodes of the function."""
        return self.node.inputs

    @property
    def outputs(self):
        """Weak references to the output nodes of the function."""
        return self.node.outputs

    @property
    def node(self):
        """The :class:`FunctionAdapter` object that wraps this Function.

        If the Function does not have a node object, this property
        automatically creates a new one.

        """
        noderef = self._node
        nd = (noderef and noderef()) or self._owned_node
        if nd is not None:
            return nd

        nd = FunctionAdapter(self)
        self._owned_node = nd
        return nd

    @property
    def local_function_hooks(self):
        """Ordered Dictionary of registered function hooks.

        See :attr:`FunctionNode.local_function_hooks` for the detail.

        """
        return self.node.local_function_hooks

    @property
    def label(self):
        """Short text that represents the function.

        The default implementation returns its type name.
        Each function should override it to give more information.

        """
        return self.__class__.__name__

    @property
    def output_data(self):
        """A tuple of the retained output arrays.

        It has the same length as the :attr:`outputs`. Elements that are not
        retained are set to ``None``.

        """
        if self.node._is_chainex_fallback_mode:
            return backend.from_chainerx(self.node.output_data)
        return self.node.output_data

    @property
    def rank(self):
        """The topological ordinal of the corresponding function node."""
        return self.node.rank

    @property
    def stack(self):
        return self.node.stack

    def check_type_forward(self, in_types):
        """Checks types of input data before forward propagation.

        Before :meth:`forward` is called, this function is called.
        You need to validate types of input data in this function
        using :ref:`the type checking utilities <type-check-utils>`.

        Args:
            in_types (~chainer.utils.type_check.TypeInfoTuple): The type
                information of input data for :meth:`forward`.
        """
        pass

    def forward(self, inputs):
        """Applies forward propagation to input arrays.

        It delegates the procedure to :meth:`forward_cpu` or
        :meth:`forward_gpu` by default. Which it selects is determined by the
        type of input arrays.
        Implementations of :class:`Function` must implement either CPU/GPU
        methods or this method.

        Args:
            inputs: Tuple of input array(s).

        Returns:
            Tuple of output array(s).

        .. warning::

            Implementations of :class:`Function` must take care that the
            return value must be a tuple even if it returns only one array.

        """
        if any(isinstance(x, cuda.ndarray) for x in inputs):
            return self.forward_gpu(inputs)
        else:
            return self.forward_cpu(inputs)

    def forward_cpu(self, inputs):
        """Applies forward propagation to input arrays on CPU.

        Args:
            inputs: Tuple of :class:`numpy.ndarray` object(s).

        Returns:
            tuple: Tuple of :class:`numpy.ndarray` object(s).

        .. warning::

            Implementations of :class:`Function` must take care that the
            return value must be a tuple even if it returns only one array.

        """
        raise NotImplementedError()

    def forward_gpu(self, inputs):
        """Applies forward propagation to input arrays on GPU.

        Args:
            inputs: Tuple of :class:`cupy.ndarray` object(s).

        Returns:
            tuple: Tuple of :class:`cupy.ndarray` object(s).

        .. warning::

            Implementations of :class:`Function` must take care that the
            return value must be a tuple even if it returns only one array.

        """
        raise NotImplementedError()

    def backward(self, inputs, grad_outputs):
        """Applies backprop to output gradient arrays.

        It delegates the procedure to :meth:`backward_cpu` or
        :meth:`backward_gpu` by default. Which it selects is determined by the
        type of input arrays and output gradient arrays. Implementations of
        :class:`Function` must implement either CPU/GPU methods or this method,
        if the function is intended to be backprop-ed.

        Args:
            inputs: Tuple of input arrays.
            grad_outputs: Tuple of output gradient arrays.

        Returns:
            tuple: Tuple of input gradient arrays. Some or all of them can be
            ``None``, if the function is not differentiable on
            inputs.

        .. warning::

            Implementations of :class:`Function` must take care that the
            return value must be a tuple even if it returns only one array.

        """
        if any(isinstance(x, cuda.ndarray) for x in inputs + grad_outputs):
            return self.backward_gpu(inputs, grad_outputs)
        else:
            return self.backward_cpu(inputs, grad_outputs)

    def backward_cpu(self, inputs, grad_outputs):
        """Applies backprop to output gradient arrays on CPU.

        Args:
            inputs: Tuple of input :class:`numpy.ndarray` object(s).
            grad_outputs: Tuple of output gradient :class:`numpy.ndarray`
                object(s).

        Returns:
            tuple: Tuple of input gradient :class:`numpy.ndarray` object(s).
            Some or all of them can be ``None``, if the function is not
            differentiable on corresponding inputs.

        .. warning::

            Implementations of :class:`Function` must take care that the
            return value must be a tuple even if it returns only one array.

        """
        return tuple(None for _ in inputs)

    def backward_gpu(self, inputs, grad_outputs):
        """Applies backprop to output gradient arrays on GPU.

        Args:
            inputs: Tuple of input :class:`cupy.ndarray`
                object(s).
            grad_outputs: Tuple of output gradient
                :class:`cupy.ndarray` object(s).

        Returns:
            tuple: Tuple of input gradient :class:`cupy.ndarray`
            object(s). Some or all of them can be ``None``, if the function is
            not differentiable on corresponding inputs.

        .. warning::

            Implementations of :class:`Function` must take care that the
            return value must be a tuple even if it returns only one array.

        """
        return tuple(None for _ in inputs)

    def unchain(self):
        """Purges in/out nodes and this function itself from the graph.

        See :meth:`FunctionNode.unchain() <chainer.FunctionNode.unchain>`
        for the detail.

        """
        self.node.unchain()

    def add_hook(self, hook, name=None):
        """Registers a function hook.

        See :meth:`FunctionNode.add_hook` for the detail.

        Args:
            hook(~chainer.FunctionHook):
                Function hook to be registered.
            name(str): Name of the function hook.
                name must be unique among function hooks
                registered to the function. If ``None``,
                default name of the function hook is used.

        """
        self.node.add_hook(hook, name)

    def delete_hook(self, name):
        """Unregisters the specified function hook.

        Args:
            name(str): the name of the function hook
                to be unregistered.

        """
        self.node.delete_hook(name)

    def retain_inputs(self, indexes):
        """Lets specified input variable nodes keep data arrays.

        By calling this method from :meth:`forward`, the function can specify
        which inputs are required for backprop.

        If this method is not called, the function keeps all input arrays. If
        you want to release all input arrays, call this method by passing an
        empty sequence. *Note that this behavior is different from that of*
        :meth:`FunctionNode.retain_inputs() \
        <chainer.FunctionNode.retain_inputs>`.

        Note that **this method must not be called from the outside of**
        :meth:`forward`.

        Args:
            indexes (iterable of int): Indexes of input variables that the
                function will require for backprop.

        """
        self.node.retain_inputs(indexes)

    def retain_outputs(self, indexes, retain_after_backward=False):
        """Lets specified output variable nodes keep data arrays.

        By calling this method from :meth:`forward`, the function can specify
        which outputs are required for backprop. If this method is not called,
        any output variables are not marked to keep the data array at the point
        of returning from :meth:`__call__`. The retained arrays are stored to
        :attr:`output_data`.

        .. note::
           It is STRONGLY RECOMMENDED to use this method if the function
           requires some or all output arrays in backprop. The function can
           also use output arrays just by keeping references to them directly,
           whereas it might influence on the performance of later function
           applications to the output variables.

        Note that **this method must not be called from the outside of**
        :meth:`forward`.

        Args:
            indexes (iterable of int): Indexes of input variables that the
                function will require for backprop.

            retain_after_backward (bool): This option has no effect. It is
                left only for the backward compatibility.

        """
        if retain_after_backward:
            warnings.warn('retain_after_backward option has no effect',
                          DeprecationWarning)
        self.node.retain_outputs(indexes)


text:
<?php

/**
 * Abstract cass that all deserializer must implement.
 *
 * Logic for deserialization of the AMF envelop is based on resources supplied
 * by Adobe Blaze DS. For and example of deserialization please review the BlazeDS
 * source tree.
 *
 * @see        http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/core/src/java/flex/messaging/io/amf/
 * @package    Zend_Amf
 * @subpackage Parse
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
abstract class Zend_Amf_Parse_Deserializer
{
    /**
     * The raw string that represents the AMF request.
     *
     * @var Zend_Amf_Parse_InputStream
     */
    protected $_stream;

    /**
     * Constructor
     *
     * @param  Zend_Amf_Parse_InputStream $stream
     * @return void
     */
    public function __construct(Zend_Amf_Parse_InputStream $stream)
    {
        $this->_stream = $stream;
    }

    /**
     * Checks for AMF marker types and calls the appropriate methods
     * for deserializing those marker types. Markers are the data type of
     * the following value.
     *
     * @param  int $typeMarker
     * @return mixed Whatever the data type is of the marker in php
     */
    public abstract function readTypeMarker($markerType = null);
}

redpajama_set_name: RedPajamaGithub


text:
import json
import urllib2

#Client_id = "1W2BDERGL3GNHLJI0EIWJU55DT54E1YFWBRN0HW0B3AIKFNW"
#Client_secret = "F3OEH5CV2KDQZSCKZ2WCYMKHJ1L0BZ0NPFNP52ANNIJYA2RO"

def request_4sq(lat, lon, Client_id, Client_secret):
    foursq = "https://api.foursquare.com/v2/venues/search?&ll="
    url = foursq + str(lat) + "," + str(lon) + "&client_id=" + Client_id + "&client_secret=" + Client_secret + "&v=20140208&locale=ja"

    placeDict = {}
    try:
        f = urllib2.urlopen(url)

        data = json.load(f)
        for place in range(len(data["response"]["venues"])):
            distance = data["response"]["venues"][place][u'location'][u'distance']
            placeLat = data["response"]["venues"][place][u'location'][u'lat']
            placeLon = data["response"]["venues"][place][u'location'][u'lng']
            checkinsCount = data["response"]["venues"][place][u'stats'][u'checkinsCount']
            usersCount = data["response"]["venues"][place][u'stats'][u'usersCount']
            placeName = data["response"]["venues"][place]['name']
            placeName = placeName.replace(',', '')
            if len(data["response"]["venues"][place]["categories"]) > 0:
                placeCategory = data["response"]["venues"][place]["categories"][0]["pluralName"]
                placeCategory = placeCategory.replace(',', '')
            else:
                placeCategory = "no-category"

            placeDict.update({distance:{"name":placeName, "category":placeCategory, "lat":placeLat, "lon":placeLon, "distance":distance, "checkinsCount":checkinsCount, "usersCount":usersCount}})

    except urllib2.HTTPError:
        pass
        #print u"HTTP Error"

    return placeDict


text:
<?xml version="1.0" ?>
<srcfile name="CrosshairInfo.java" file_path="/Users/valerio/Research/Code/Source Code Comments Classification/comments_classification/media/jfreechart/0.7.1/jfreechart-071zip/extracted/jfreechart-0.7.1/source/com/jrefinery/chart/CrosshairInfo.java" >
 <node name="COMPILATION_UNIT" line="0" instruction_class="COMPILATION_UNIT" instruction="COMPILATION_UNIT">
   <node name="PACKAGE_DECLARATION" line="0" instruction_class="KEYWORD" instruction="PACKAGE_KEYWORD">
     <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
       <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
         <node name="com" line="38" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="jrefinery" line="38" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
       </node>
       <node name="chart" line="38" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
       </node>
     </node>
   </node>
   <class_statement_node name="CLASS_DECLARATION" line="0" instruction_class="CLASS_DECLARATION" instruction="CLASS_KEYWORD">
     <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
       <node name="public" line="40" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
       </node>
     </node>
     <node name="CrosshairInfo" line="40" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
     </node>
     <node name="CLASS_BODY" line="0" instruction_class="CLASS_BODY" instruction="CLASS_BODY">
       <statement_node name="FIELD_DECLARATION" line="0" instruction_class="FIELD_DECLARATION" instruction="FIELD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="protected" line="42" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="double" line="42" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
         </node>
         <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
           <node name="anchorX" line="42" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
           </node>
         </node>
       </statement_node>
       <statement_node name="FIELD_DECLARATION" line="0" instruction_class="FIELD_DECLARATION" instruction="FIELD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="protected" line="44" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="double" line="44" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
         </node>
         <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
           <node name="anchorY" line="44" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
           </node>
         </node>
       </statement_node>
       <statement_node name="FIELD_DECLARATION" line="0" instruction_class="FIELD_DECLARATION" instruction="FIELD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="protected" line="46" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="double" line="46" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
         </node>
         <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
           <node name="crosshairX" line="46" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
           </node>
         </node>
       </statement_node>
       <statement_node name="FIELD_DECLARATION" line="0" instruction_class="FIELD_DECLARATION" instruction="FIELD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="protected" line="48" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="double" line="48" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
         </node>
         <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
           <node name="crosshairY" line="48" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
           </node>
         </node>
       </statement_node>
       <statement_node name="FIELD_DECLARATION" line="0" instruction_class="FIELD_DECLARATION" instruction="FIELD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="protected" line="50" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="double" line="50" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
         </node>
         <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
           <node name="distance" line="50" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
           </node>
         </node>
       </statement_node>
       <method_statement_node name="CONSTRUCTOR_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="CONSTRUCTOR_METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="52" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="CrosshairInfo" line="52" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
         </node>
         <statement_node name="CONSTRUCTOR_BODY" line="0" instruction_class="CONSTRUCTOR_BODY" instruction="CONSTRUCTOR_BODY">
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="55" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="VOID" line="0" instruction_class="VOID" instruction="VOID">
         </node>
         <node name="setCrosshairDistance" line="55" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
           <node name="FORMAL_PARAMETER" line="0" instruction_class="FORMAL_PARAMETER" instruction="FORMAL_PARAMETER">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="55" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="distance" line="55" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
             </node>
           </node>
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
             <node name="=" line="56" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
               <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
                 <node name="THIS" line="0" instruction_class="THIS" instruction="THIS">
                 </node>
                 <node name="distance" line="56" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                 </node>
               </node>
               <node name="distance" line="56" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
           </statement_node>
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="59" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="VOID" line="0" instruction_class="VOID" instruction="VOID">
         </node>
         <node name="updateCrosshairPoint" line="59" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
           <node name="FORMAL_PARAMETER" line="0" instruction_class="FORMAL_PARAMETER" instruction="FORMAL_PARAMETER">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="59" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="candidateX" line="59" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
             </node>
           </node>
           <node name="FORMAL_PARAMETER" line="0" instruction_class="FORMAL_PARAMETER" instruction="FORMAL_PARAMETER">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="59" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="candidateY" line="59" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
             </node>
           </node>
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="LOCAL_VARIABLE_DECLARATION" line="0" instruction_class="LOCAL_VARIABLE_DECLARATION" instruction="LOCAL_VARIABLE_DECLARATION">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="61" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
               <node name="d" line="61" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
               <node name="+" line="61" instruction_class="OPERATOR" instruction="ADDITIVE_OPERATOR">
                 <node name="*" line="61" instruction_class="OPERATOR" instruction="MULTIPLICATIVE_OPERATOR">
                   <node name="-" line="61" instruction_class="OPERATOR" instruction="ADDITIVE_OPERATOR">
                     <node name="candidateX" line="61" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                     <node name="anchorX" line="61" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                   </node>
                   <node name="-" line="61" instruction_class="OPERATOR" instruction="ADDITIVE_OPERATOR">
                     <node name="candidateX" line="61" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                     <node name="anchorX" line="61" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                   </node>
                 </node>
                 <node name="*" line="62" instruction_class="OPERATOR" instruction="MULTIPLICATIVE_OPERATOR">
                   <node name="-" line="62" instruction_class="OPERATOR" instruction="ADDITIVE_OPERATOR">
                     <node name="candidateY" line="62" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                     <node name="anchorY" line="62" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                   </node>
                   <node name="-" line="62" instruction_class="OPERATOR" instruction="ADDITIVE_OPERATOR">
                     <node name="candidateY" line="62" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                     <node name="anchorY" line="62" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                     </node>
                   </node>
                 </node>
               </node>
             </node>
           </statement_node>
           <statement_node name="if" line="63" instruction_class="CONDITIONAL_STATEMENT" instruction="IF_STATEMENT">
             <node name="<" line="63" instruction_class="OPERATOR" instruction="RELATIONAL_OPERATOR">
               <node name="d" line="63" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
               <node name="distance" line="63" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
             <statement_node name="BLOCK" line="0" instruction_class="BLOCK" instruction="BLOCK">
               <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
                 <node name="=" line="64" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
                   <node name="crosshairX" line="64" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="candidateX" line="64" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
               </statement_node>
               <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
                 <node name="=" line="65" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
                   <node name="crosshairY" line="65" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="candidateY" line="65" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
               </statement_node>
               <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
                 <node name="=" line="66" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
                   <node name="distance" line="66" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="d" line="66" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
               </statement_node>
             </statement_node>
           </statement_node>
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="71" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="VOID" line="0" instruction_class="VOID" instruction="VOID">
         </node>
         <node name="updateCrosshairX" line="71" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
           <node name="FORMAL_PARAMETER" line="0" instruction_class="FORMAL_PARAMETER" instruction="FORMAL_PARAMETER">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="71" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="candidateX" line="71" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
             </node>
           </node>
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="LOCAL_VARIABLE_DECLARATION" line="0" instruction_class="LOCAL_VARIABLE_DECLARATION" instruction="LOCAL_VARIABLE_DECLARATION">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="73" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
               <node name="d" line="73" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
               <node name="CALL" line="0" instruction_class="CALL" instruction="CALL">
                 <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
                   <node name="Math" line="73" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="abs" line="73" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
                 <node name="ARGUMENTS" line="0" instruction_class="ARGUMENTS" instruction="ARGUMENTS">
                   <node name="EXPRESSION_LIST" line="0" instruction_class="EXPRESSION_LIST" instruction="EXPRESSION_LIST">
                     <node name="-" line="73" instruction_class="OPERATOR" instruction="ADDITIVE_OPERATOR">
                       <node name="candidateX" line="73" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                       </node>
                       <node name="anchorX" line="73" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                       </node>
                     </node>
                   </node>
                 </node>
               </node>
             </node>
           </statement_node>
           <statement_node name="if" line="74" instruction_class="CONDITIONAL_STATEMENT" instruction="IF_STATEMENT">
             <node name="<" line="74" instruction_class="OPERATOR" instruction="RELATIONAL_OPERATOR">
               <node name="d" line="74" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
               <node name="distance" line="74" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
             <statement_node name="BLOCK" line="0" instruction_class="BLOCK" instruction="BLOCK">
               <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
                 <node name="=" line="75" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
                   <node name="crosshairX" line="75" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="candidateX" line="75" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
               </statement_node>
               <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
                 <node name="=" line="76" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
                   <node name="distance" line="76" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="d" line="76" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
               </statement_node>
             </statement_node>
           </statement_node>
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="81" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="VOID" line="0" instruction_class="VOID" instruction="VOID">
         </node>
         <node name="updateCrosshairY" line="81" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
           <node name="FORMAL_PARAMETER" line="0" instruction_class="FORMAL_PARAMETER" instruction="FORMAL_PARAMETER">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="81" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="candidateY" line="81" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
             </node>
           </node>
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="LOCAL_VARIABLE_DECLARATION" line="0" instruction_class="LOCAL_VARIABLE_DECLARATION" instruction="LOCAL_VARIABLE_DECLARATION">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="83" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="VARIABLE_DECLARATOR" line="0" instruction_class="VARIABLE_DECLARATOR" instruction="VARIABLE_DECLARATOR">
               <node name="d" line="83" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
               <node name="CALL" line="0" instruction_class="CALL" instruction="CALL">
                 <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
                   <node name="Math" line="83" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="abs" line="83" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
                 <node name="ARGUMENTS" line="0" instruction_class="ARGUMENTS" instruction="ARGUMENTS">
                   <node name="EXPRESSION_LIST" line="0" instruction_class="EXPRESSION_LIST" instruction="EXPRESSION_LIST">
                     <node name="-" line="83" instruction_class="OPERATOR" instruction="ADDITIVE_OPERATOR">
                       <node name="candidateY" line="83" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                       </node>
                       <node name="anchorY" line="83" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                       </node>
                     </node>
                   </node>
                 </node>
               </node>
             </node>
           </statement_node>
           <statement_node name="if" line="84" instruction_class="CONDITIONAL_STATEMENT" instruction="IF_STATEMENT">
             <node name="<" line="84" instruction_class="OPERATOR" instruction="RELATIONAL_OPERATOR">
               <node name="d" line="84" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
               <node name="distance" line="84" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
             <statement_node name="BLOCK" line="0" instruction_class="BLOCK" instruction="BLOCK">
               <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
                 <node name="=" line="85" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
                   <node name="crosshairY" line="85" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="candidateY" line="85" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
               </statement_node>
               <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
                 <node name="=" line="86" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
                   <node name="distance" line="86" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                   <node name="d" line="86" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                   </node>
                 </node>
               </statement_node>
             </statement_node>
           </statement_node>
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="91" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="VOID" line="0" instruction_class="VOID" instruction="VOID">
         </node>
         <node name="setAnchorX" line="91" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
           <node name="FORMAL_PARAMETER" line="0" instruction_class="FORMAL_PARAMETER" instruction="FORMAL_PARAMETER">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="91" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="x" line="91" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
             </node>
           </node>
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
             <node name="=" line="92" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
               <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
                 <node name="THIS" line="0" instruction_class="THIS" instruction="THIS">
                 </node>
                 <node name="anchorX" line="92" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                 </node>
               </node>
               <node name="x" line="92" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
           </statement_node>
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="95" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="VOID" line="0" instruction_class="VOID" instruction="VOID">
         </node>
         <node name="setAnchorY" line="95" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
           <node name="FORMAL_PARAMETER" line="0" instruction_class="FORMAL_PARAMETER" instruction="FORMAL_PARAMETER">
             <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
             </node>
             <node name="double" line="95" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
             </node>
             <node name="y" line="95" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
             </node>
           </node>
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="EXPRESSION_STATEMENT" line="0" instruction_class="EXPRESSION_STATEMENT" instruction="EXPRESSION_STATEMENT">
             <node name="=" line="96" instruction_class="OPERATOR" instruction="ASSIGNEMENT_OPERATOR">
               <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
                 <node name="THIS" line="0" instruction_class="THIS" instruction="THIS">
                 </node>
                 <node name="anchorY" line="96" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
                 </node>
               </node>
               <node name="y" line="96" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
           </statement_node>
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="99" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="double" line="99" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
         </node>
         <node name="getCrosshairX" line="99" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="return" line="100" instruction_class="CONTROLFLOW_STATEMENT" instruction="RETURN_STATEMENT">
             <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
               <node name="THIS" line="0" instruction_class="THIS" instruction="THIS">
               </node>
               <node name="crosshairX" line="100" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
           </statement_node>
         </statement_node>
       </method_statement_node>
       <method_statement_node name="METHOD_DECLARATION" line="0" instruction_class="METHOD_DECLARATION" instruction="METHOD_DECLARATION">
         <node name="MODIFIERS" line="0" instruction_class="MODIFIERS" instruction="MODIFIERS">
           <node name="public" line="103" instruction_class="MODIFIER" instruction="ACCESS_LEVEL_MODIFIER">
           </node>
         </node>
         <node name="double" line="103" instruction_class="TYPE" instruction="PRIMITIVE_TYPE">
         </node>
         <node name="getCrosshairY" line="103" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
         </node>
         <node name="FORMAL_PARAMETERS" line="0" instruction_class="FORMAL_PARAMETERS" instruction="FORMAL_PARAMETERS">
         </node>
         <statement_node name="METHOD_BODY" line="0" instruction_class="METHOD_BODY" instruction="METHOD_BODY">
           <statement_node name="return" line="104" instruction_class="CONTROLFLOW_STATEMENT" instruction="RETURN_STATEMENT">
             <node name="SELECT" line="0" instruction_class="SELECT" instruction="SELECT">
               <node name="THIS" line="0" instruction_class="THIS" instruction="THIS">
               </node>
               <node name="crosshairY" line="104" instruction_class="IDENTIFIER" instruction="IDENTIFIER">
               </node>
             </node>
           </statement_node>
         </statement_node>
       </method_statement_node>
     </node>
   </class_statement_node>
 </node>
</srcfile>


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Gleditsia japonica var. velutina L.Chu Li

### Remarks
null


text:
require 'test/unit'
require File.join(File.dirname(__FILE__), 'compile_test_methods')

module Anagram
  module Pack
    module Anagrammar

      # Tests the current pack
      class CurrentPackTest < Test::Unit::TestCase
        include Anagrammar::SemanticTree
        include CompileTestMethods

        @@parser = nil

        def setup
          unless @@parser
            dir = File.dirname(__FILE__)
            grammar = File.join(dir, '..', 'anagrammar.anagram')
            @source = File.read(grammar)
            @ruby_code = Anagrammar.syntax_tree(@source)
            @ruby_code = Anagrammar.to_ruby_code(@ruby_code)
            File.open(File.join(File.dirname(__FILE__), 'anagrammar_parser.rb'), 'w') do |f|
              f << @ruby_code
            end
            Anagram::Pack::Anagrammar.module_eval do
              remove_const :ParserMethods
              remove_const :Parser
            end
            load File.join(File.dirname(__FILE__), 'anagrammar_parser.rb')
            @@parser = Anagram::Pack::Anagrammar::Parser
          end
          assert_not_nil @@parser
          @parser = @@parser
        end

      end # class CurrentPackTest

    end
  end
end


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css"/>

Coverage Report - ch.lambdaj.function.convert.DefaultStringConverter

  Classes in this File	  Line Coverage	  Branch Coverage	  Complexity

DefaultStringConverter

100%

2/2

50%

1/2

	2.0;2

   1

 // Modified or written by Lambdascale SRL for inclusion with lambdaj.

   2

 // Copyright (c) 2009-2010 Mario Fusco.

   3

 // Licensed under the Apache License, Version 2.0 (the "License")

   4

   5

 package ch.lambdaj.function.convert;

   6

   7

 /**

   8

  * Converts an object in its String representation or an empty String for a null object.

   9

  * @author Mario Fusco

   10

  */

   11	   3
 public class DefaultStringConverter implements StringConverter<Object> {

   12

   13

     /**

   14

      * {@inheritDoc}

   15

      */

   16

         public String convert(Object from) {

   17	   2
                 return from == null ? "" : from.toString();

   18

         }

   19

   20

 }

Report generated by Cobertura 1.9.4.1 on 14/02/12 20.29.


text:
title: Tuning endpoint message processing
summary: 'How to optimize message processing by limiting concurrency and/or throughput.'
tags: []
redirects:
- nservicebus/how-to-reduce-throughput-of-an-endpoint
- nservicebus/operations/reducing-throughput
- nservicebus/operations/throughput
related:
- nservicebus/licensing/licensing-limitations
---
NServiceBus will by default allow the transport to optimize for maximum performance when it comes to message processing. While this is usually the preferred mode of operation there are situations where tuning needs to be applied.

## Tuning concurrency

NOTE: NServiceBus Version 5 and below will by default limit concurrency to `1` if not configured by the user

You can define a maximum concurrency setting that will make sure that no more messages than the specified value is ever being processed at the same time. Set this value to `1` to process messages sequentially. If not specified the transport will choose an optimal value.

Examples where concurrency tuning is relevant are

 * Non thread safe code that needs to run sequentially
 * Databases that might deadlock when getting to many concurrent requests

## Tuning throughput

WARNING: Throughput throttling options have been removed in NServiceBus Version 6.

You can define a maximum value for the number of messages per second that the endpoint will process at any given time. This will help you to avoid the endpoint overloading sensitive resources that it's using like web-services, databases, other endpoints etc. A concrete example here could be an integration endpoint calling a web api, like api.github.com, that have restrictions on the number or requests per unit of time allowed.

NServiceBus will not enforce any throughput restrictions by default.

## Configuration

The default limits of an endpoint can be changed in both code and via app.config.

### Via Code

By [overriding app.config settings](/nservicebus/hosting/custom-configuration-providers.md).

snippet: TuningFromCode

### Via app.config

By using raw xml.

snippet: TuningFromAppConfig

## Run time settings

Version 5 and below allowed both concurrency and throughput throttling to be changed and read at run time using the code below.

## Optimizing at run time

snippet: ChangeTuning

## Reading current values at run time

snippet: ReadTuning


text:
#ifndef _STRINGBUF_H
#define _STRINGBUF_H

#define STRINGBUF_SIZE 0x1000

/* Write formatted text into a temporary string buffer.  The returned buffer must not be freed -- it is a thread local
 * variable.  The maximum length of a single output string is STRINGBUF_SIZE.  If a string does not fit, it is trimmed
 * and its last 3 chars are dots ("...").
 *
 * This function is meant to be used for creation of short strings for temporary use.  The strings do not need to be
 * freed, so it can be used to achieve clean code (in comparison to the usual sequence), i.e.:
 *
 *  the usual approach:
 *      char * tmp[20];
 *      sprintf(tmp, "foo = %i", foo);
 *      ...use tmp...
 *
 *  can be replaced by:
 *      char * tmp = stringbuf_printf("foo = %i", foo);
 *      ...use tmp...
 *
 * Pointers returned by this function point into an internal buffer.  Each call to stringbuf_printf allocates some space
 * in the buffer, writes the output text there and returns the pointer to the beginning of the text.  Allocation is
 * trivial -- the function remembers where the last returned string ended and starts writing the next one just after
 * that location.  If there is not enough space remaining in the buffer, it starts writing at the beginning of the
 * buffer (so in fact this is a special case of a circular buffer).  This means that every string returned by this
 * function will eventually be overwritten.  However, it is possible to generate many short strings and use them
 * simultaneously (as long as their total length is less than STRINGBUF_SIZE).
 */
__attribute__((format(printf, 1, 2)))
const char * stringbuf_printf(char * fmt, ...);

#endif


text:
<?php

namespace PragmaRX\Deeployer\Support;

use Symfony\Component\Process\Process as SymfonyProcess;

class Process extends SymfonyProcess {

}


text:
set -x
set -e
sudo service mysql stop || echo "mysql not stopped"
sudo stop mysql-5.6 || echo "mysql-5.6 not stopped"
sudo  mysqld_safe --skip-grant-tables &
sleep 4
sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
sudo kill -9 `sudo cat /var/lib/mysql/mysqld_safe.pid`
sudo kill -9 `sudo cat /var/run/mysqld/mysqld.pid`
sudo service mysql restart
sleep 4


text:
//Write a method that asks the user for his name and prints "Hello, <name>" (for example, "Hello, Peter!").
//Write a program to test this method.

using System;

class HelloName
{
    static void PrintName(string name)
    {
        Console.WriteLine("Hello "+name+" !");
    }

    static void Main()
    {
        Console.Write("Enter your name : ");
        string inputName = Console.ReadLine();
        PrintName(inputName);
    }
}


text:
namespace TestOutput
{
    using System;
    using System.Threading.Tasks;

    public class NoLinePragmas
    {
        #line hidden
        public NoLinePragmas()
        {
        }

        #pragma warning disable 1998
        public override async Task ExecuteAsync()
        {
#line 1 ""

    int i = 1;

#line default
#line hidden

            WriteLiteral("\r\n\r\n");
#line 5 ""
 while(i <= 10) {

#line default
#line hidden

            WriteLiteral("
Hello from C#, #");
            Write(
#line 6 ""
                         i

#line default
#line hidden
            );

            WriteLiteral("
\r\n");
#line 7 ""
    i += 1;
}

#line default
#line hidden

            WriteLiteral("\r\n");
#line 10 ""
 if(i == 11) {

#line default
#line hidden

            WriteLiteral("
We wrote 10 lines!
\r\n");
#line 12 ""
}

#line default
#line hidden

            WriteLiteral("\r\n");
#line 14 ""
 switch(i) {
    case 11:

#line default
#line hidden

            WriteLiteral("
No really, we wrote 10 lines!
\r\n");
#line 17 ""
        break;
    default:

#line default
#line hidden

            WriteLiteral("
Actually, we didn\'t...
\r\n");
#line 20 ""
        break;
}

#line default
#line hidden

            WriteLiteral("\r\n");
#line 23 ""
 for(int j = 1; j <= 10; j += 2) {

#line default
#line hidden

            WriteLiteral("
Hello again from C#, #");
            Write(
#line 24 ""
                               j

#line default
#line hidden
            );

            WriteLiteral("
\r\n");
#line 25 ""
}

#line default
#line hidden

            WriteLiteral("\r\n");
#line 27 ""
 try {

#line default
#line hidden

            WriteLiteral("
That time, we wrote 5 lines!
\r\n");
#line 29 ""
} catch(Exception ex) {

#line default
#line hidden

            WriteLiteral("
Oh no! An error occurred: ");
            Write(
#line 30 ""
                                   ex.Message

#line default
#line hidden
            );

            WriteLiteral("
\r\n");
#line 31 ""
}

#line default
#line hidden

#line 33 ""

#line default
#line hidden

            WriteLiteral("
i is now ");
            Write(
#line 34 ""
             i

#line default
#line hidden
            );

            WriteLiteral("
\r\n\r\n");
#line 36 ""
 lock(new object()) {

#line default
#line hidden

            WriteLiteral("
This block is locked, for your security!
\r\n");
#line 38 ""
}

#line default
#line hidden

        }
        #pragma warning restore 1998
    }
}


text:
/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.linkedin.pinot.common.request;

import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;

/**
 * AUTO GENERATED: DO NOT EDIT
 * Filter Operator
 *
 */
public enum FilterOperator implements org.apache.thrift.TEnum {
  AND(0),
  OR(1),
  EQUALITY(2),
  NOT(3),
  RANGE(4),
  REGEX(5),
  NOT_IN(6),
  IN(7);

  private final int value;

  private FilterOperator(int value) {
    this.value = value;
  }

  /**
   * Get the integer value of this enum value, as defined in the Thrift IDL.
   */
  public int getValue() {
    return value;
  }

  /**
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
   * @return null if the value is not found.
   */
  public static FilterOperator findByValue(int value) {
    switch (value) {
      case 0:
        return AND;
      case 1:
        return OR;
      case 2:
        return EQUALITY;
      case 3:
        return NOT;
      case 4:
        return RANGE;
      case 5:
        return REGEX;
      case 6:
        return NOT_IN;
      case 7:
        return IN;
      default:
        return null;
    }
  }
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/container/v1/cluster_service.proto

namespace Google\Cloud\Container\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * ListNodePoolsResponse is the result of ListNodePoolsRequest.
 *
 * Generated from protobuf message google.container.v1.ListNodePoolsResponse
 */
class ListNodePoolsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of node pools for a cluster.
     *
     * Generated from protobuf field repeated .google.container.v1.NodePool node_pools = 1;
     */
    private $node_pools;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Container\V1\NodePool>|\Google\Protobuf\Internal\RepeatedField $node_pools
     *           A list of node pools for a cluster.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of node pools for a cluster.
     *
     * Generated from protobuf field repeated .google.container.v1.NodePool node_pools = 1;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNodePools()
    {
        return $this->node_pools;
    }

    /**
     * A list of node pools for a cluster.
     *
     * Generated from protobuf field repeated .google.container.v1.NodePool node_pools = 1;
     * @param array<\Google\Cloud\Container\V1\NodePool>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNodePools($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\NodePool::class);
        $this->node_pools = $arr;

        return $this;
    }

}


text:
.class public final Lo/CP;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Ljava/util/Map$Entry;

# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Map$Entry<TK;TV;>;"
    }
.end annotation

.annotation build Lo/Ah;
.end annotation

.annotation build Lo/Ai;
.end annotation

# static fields
.field private static final ˏ:J = 0x0L

# instance fields
.field private final ˊ:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TK;"
        }
    .end annotation

    .annotation runtime Ljavax/annotation/Nullable;
    .end annotation
.end field

.field private final ˋ:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TV;"
        }
    .end annotation

    .annotation runtime Ljavax/annotation/Nullable;
    .end annotation
.end field

.field private final ˎ:Lo/CF;

# direct methods
.method constructor <init>(Ljava/lang/Object;Ljava/lang/Object;Lo/CF;)V
    .locals 1
    .param p1    # Ljava/lang/Object;
        .annotation runtime Ljavax/annotation/Nullable;
        .end annotation
    .end param
    .param p2    # Ljava/lang/Object;
        .annotation runtime Ljavax/annotation/Nullable;
        .end annotation
    .end param
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TK;TV;Lo/CF;)V"
        }
    .end annotation

    .line 47
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 48
    iput-object p1, p0, Lo/CP;->ˊ:Ljava/lang/Object;

    .line 49
    iput-object p2, p0, Lo/CP;->ˋ:Ljava/lang/Object;

    .line 50
    invoke-static {p3}, Lo/Bk;->ˊ(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lo/CF;

    iput-object v0, p0, Lo/CP;->ˎ:Lo/CF;

    .line 51
    return-void
.end method

# virtual methods
.method public equals(Ljava/lang/Object;)Z
    .locals 3
    .param p1    # Ljava/lang/Object;
        .annotation runtime Ljavax/annotation/Nullable;
        .end annotation
    .end param

    .line 81
    instance-of v0, p1, Ljava/util/Map$Entry;

    if-eqz v0, :cond_1

    .line 82
    move-object v0, p1

    check-cast v0, Ljava/util/Map$Entry;

    move-object v2, v0

    .line 83
    invoke-virtual {p0}, Lo/CP;->getKey()Ljava/lang/Object;

    move-result-object v0

    invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v1

    invoke-static {v0, v1}, Lo/Be;->ˊ(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lo/CP;->getValue()Ljava/lang/Object;

    move-result-object v0

    invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v1

    invoke-static {v0, v1}, Lo/Be;->ˊ(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0

    .line 86
    :cond_1
    const/4 v0, 0x0

    return v0
.end method

.method public getKey()Ljava/lang/Object;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()TK;"
        }
    .end annotation

    .annotation runtime Ljavax/annotation/Nullable;
    .end annotation

    .line 69
    iget-object v0, p0, Lo/CP;->ˊ:Ljava/lang/Object;

    return-object v0
.end method

.method public getValue()Ljava/lang/Object;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()TV;"
        }
    .end annotation

    .annotation runtime Ljavax/annotation/Nullable;
    .end annotation

    .line 73
    iget-object v0, p0, Lo/CP;->ˋ:Ljava/lang/Object;

    return-object v0
.end method

.method public hashCode()I
    .locals 4

    .line 90
    invoke-virtual {p0}, Lo/CP;->getKey()Ljava/lang/Object;

    move-result-object v2

    .line 91
    invoke-virtual {p0}, Lo/CP;->getValue()Ljava/lang/Object;

    move-result-object v3

    .line 92
    if-nez v2, :cond_0

    const/4 v0, 0x0

    goto :goto_0

    :cond_0
    invoke-virtual {v2}, Ljava/lang/Object;->hashCode()I

    move-result v0

    :goto_0
    if-nez v3, :cond_1

    const/4 v1, 0x0

    goto :goto_1

    :cond_1
    invoke-virtual {v3}, Ljava/lang/Object;->hashCode()I

    move-result v1

    :goto_1
    xor-int/2addr v0, v1

    return v0
.end method

.method public final setValue(Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TV;)TV;"
        }
    .end annotation

    .line 77
    new-instance v0, Ljava/lang/UnsupportedOperationException;

    invoke-direct {v0}, Ljava/lang/UnsupportedOperationException;-><init>()V

    throw v0
.end method

.method public toString()Ljava/lang/String;
    .locals 5

    .line 99
    invoke-virtual {p0}, Lo/CP;->getKey()Ljava/lang/Object;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0}, Lo/CP;->getValue()Ljava/lang/Object;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v1

    add-int/lit8 v1, v1, 0x1

    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v2

    add-int/2addr v1, v2

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public ˊ()Lo/CF;
    .locals 1

    .line 57
    iget-object v0, p0, Lo/CP;->ˎ:Lo/CF;

    return-object v0
.end method

.method public ˋ()Z
    .locals 1

    .line 65
    iget-object v0, p0, Lo/CP;->ˎ:Lo/CF;

    invoke-virtual {v0}, Lo/CF;->ˊ()Z

    move-result v0

    return v0
.end method


text:
package shadow.tac.nodes;

import shadow.ShadowException;
import shadow.tac.TACBlock;
import shadow.tac.TACVisitor;

public class TACCleanupRet extends TACNode
{
	private TACCleanupPad cleanupPad;

	public TACCleanupRet(TACNode node, TACCleanupPad cleanupPad)
	{
		super(node);
		this.cleanupPad = cleanupPad;
	}

	public TACLabel getUnwind() {
		TACLabel unwindLabel = null;
		// Have to get parent block or else we'll unwind to the same place
		TACBlock parent = getBlock().getParent();
		if(parent != null)
			unwindLabel = parent.getUnwind();
		return unwindLabel;
	}

	@Override
	public int getNumOperands()
	{
		return 0;
	}

	public TACCleanupPad getCleanupPad() {
		return cleanupPad;
	}

	@Override
	public TACOperand getOperand(int num)
	{
		throw new IndexOutOfBoundsException("" + num);
	}

	@Override
	public void accept(TACVisitor visitor) throws ShadowException {
		visitor.visit(this);
	}
}


text:
<?php

namespace OpenOrchestra\UserBundle\Validator\Constraints;

use Symfony\Component\Validator\Constraint;

/**
 * Class ComplexUserPassword
 */
class ComplexUserPassword extends Constraint
{
    public $messageComplexUserPassword = 'open_orchestra_user.form.registration_user.complex_user_password';
    public $messageCurrentPasswordNeeded = 'open_orchestra_user.form.registration_user.current_password_needed';
    public $messageCurrentPasswordIncorrect = 'open_orchestra_user.form.registration_user.current_password_incorrect';

    /**
     * @return string
     */
    public function validatedBy()
    {
        return 'complex_user_password';
    }

    public function getTargets()
    {
        return self::CLASS_CONSTRAINT;
    }
}


text:
namespace utils { namespace intros_ptree { namespace details
{
	template<typename T>
	void intros_to_ptree_impl(boost::property_tree::ptree& tree, const T& in);

	template<typename... T>
	void intros_from_ptree_impl(std::tuple<T...>& out, const boost::property_tree::ptree& tree);
} } }
// forward declarations end

// item tag conditions
namespace utils { namespace intros_ptree { namespace details
{
	namespace tags
	{
		// item tags
		struct item_has_intros {};
		struct item_is_array {};
		struct item_can_stream_insert {};
		struct item_has_input_iterator {};
		struct item_can_stream_extract {};
		struct item_can_insert_at_end {};
		struct item_not_supported {};
	}

	namespace obj_tags
	{
		// object tags
		struct has_no_intros {};
		struct has_no_def_ctor {};
		struct proper_object {};
	}

	template<typename T>
	using has_input_iterator_check = std::enable_if_t<
		std::is_base_of<
		std::input_iterator_tag,
		typename std::iterator_traits<typename T::iterator>::iterator_category
		>::value>;

	IMPLEMENT_EXPR_TEST(has_intros, decltype(get_intros_type(std::declval<T&>())), T)
	IMPLEMENT_EXPR_TEST(can_stream_insert, decltype(std::declval<std::ostream&>() << std::declval<T&>()), T)
	IMPLEMENT_EXPR_TEST(can_stream_extract, decltype(std::declval<std::istream&>() >> std::declval<T&>()), T)
	IMPLEMENT_EXPR_TEST_INDIRECT(has_input_iterator, has_input_iterator_check, T)
	IMPLEMENT_EXPR_TEST(can_insert_at_end, decltype(std::inserter(std::declval<T&>(), std::end(std::declval<T&>()))), T)

	template<typename T>
	using item_category_read_intros = traits::get_tag<
		has_intros<T>,			tags::item_has_intros,
		std::is_array<T>,		tags::item_is_array,
		can_stream_insert<T>,	tags::item_can_stream_insert,
		has_input_iterator<T>,	tags::item_has_input_iterator,
		tags::item_not_supported
	>;

	template<typename T>
	using item_category_write_intros = traits::get_tag<
		has_intros<T>,			tags::item_has_intros,
		std::is_array<T>,		tags::item_is_array,
		can_stream_extract<T>,	tags::item_can_stream_extract,
		can_insert_at_end<T>,	tags::item_can_insert_at_end,
		tags::item_not_supported
	>;

	template<typename T>
	using object_write_category = traits::get_tag<
		utils::traits::negation<has_intros<T>>,						obj_tags::has_no_intros,
		utils::traits::negation<std::is_default_constructible<T>>,	obj_tags::has_no_def_ctor,
		obj_tags::proper_object
	>;

	namespace add_to_tree
	{
		template<typename T>
		void add_to_tree_impl(boost::property_tree::ptree& tree, const std::string& name, const T& val, tags::item_has_intros)
		{
			boost::property_tree::ptree subtree;
			intros_to_ptree_impl(subtree, get_intros_type(val));
			tree.add_child(name, subtree);
		}
		template<typename T>
		void add_to_tree_impl(boost::property_tree::ptree& tree, const std::string& name, const T& val, tags::item_is_array)
		{
			static_assert(!std::is_void<T>::value, "Array not supported for intros_type");
		}
		template<typename T>
		void add_to_tree_impl(boost::property_tree::ptree& tree, const std::string& name, const T& val, tags::item_can_stream_insert)
		{
			tree.add(name, val);
		}
		template<typename T>
		void add_to_tree_impl(boost::property_tree::ptree& tree, const std::string& name, const T& val, tags::item_has_input_iterator)
		{
			std::for_each(val.begin(), val.end(), [&val, &tree, &name](const auto& x) {
				add_to_tree_impl(tree, name, x, item_category_read_intros<typename T::value_type>());
			});
		}
		template<typename T>
		void add_to_tree_impl(boost::property_tree::ptree& tree, const std::string& name, const T& val, tags::item_not_supported)
		{
			static_assert(!std::is_void<T>::value, "Unsupported type for intros_type");
		}
		template<typename T>
		void add_to_tree(boost::property_tree::ptree& tree, const T& x)
		{
			using t = std::remove_reference_t<decltype(std::remove_reference_t<T>::val)>;
			add_to_tree_impl(tree, x.name, x.val, item_category_read_intros<t>());
		}
	}

	namespace add_to_intros
	{
		template<typename T>
		T get_path_last_but(T path, std::string& last_path)
		{
			boost::property_tree::path last_but;

			while (!path.single())
				last_but /= path.reduce();

			last_path = path.reduce();

			return last_but;
		}

		template<typename T>
		void add_to_intros_impl(T& val, const std::string& name, const boost::property_tree::ptree& tree, tags::item_has_intros)
		{
			auto& subtree = (name == "" ? tree : tree.get_child(name));
			auto intros_type = get_intros_type(val);
			intros_from_ptree_impl(intros_type.items, subtree);
		}
		template<typename T>
		void add_to_intros_impl(T& val, const std::string& name, const boost::property_tree::ptree& tree, tags::item_is_array)
		{
			static_assert(!std::is_void<T>::value, "Array not supported for intros_type");
		}
		template<typename T>
		void add_to_intros_impl(T& val, const std::string& name, const boost::property_tree::ptree& tree, tags::item_can_stream_extract)
		{
			val = tree.get(name, T());
		}
		template<typename T>
		void add_to_intros_impl(T& val, const std::string& name, const boost::property_tree::ptree& tree, tags::item_can_insert_at_end)
		{
			std::string last_path;
			boost::property_tree::ptree empty_tree;
			auto source = tree.get_child(
							get_path_last_but(boost::property_tree::path(name), last_path),
							empty_tree);

			for (auto source_it = source.begin(); source_it != source.end(); ++source_it)
			{
				if (source_it->first == last_path)
				{
					typename T::value_type item;
					add_to_intros_impl(item, "", source_it->second, item_category_write_intros<typename T::value_type>());
					std::inserter(val, val.end()) = item;
				}
			}
		}
		template<typename T>
		void add_to_intros_impl(T& val, const std::string& name, const boost::property_tree::ptree& tree, tags::item_not_supported)
		{
			static_assert(!std::is_void<T>::value, "Unsupported type for intros_type");
		}
		template<typename T>
		void add_to_intros(T& x, const boost::property_tree::ptree& tree)
		{
			using t = std::remove_reference_t<decltype(std::remove_reference_t<T>::val)>;
			add_to_intros_impl(x.val, x.name, tree, item_category_write_intros<t>());
		}
	}

	template<typename T>
	void intros_to_ptree_impl(boost::property_tree::ptree& tree, const T& in)
	{
		boost::fusion::for_each(in.items,
			[&tree](auto& x) {
			add_to_tree::add_to_tree(tree, x);
		});
	}

	template<typename... T>
	void intros_from_ptree_impl(std::tuple<T...>& out, const boost::property_tree::ptree& tree)
	{
		boost::fusion::for_each(out,
			[&tree](auto& x) {
			add_to_intros::add_to_intros(x, tree); });
	}

	template<typename T>
	T make_intros_object_impl(const boost::property_tree::ptree& tree, obj_tags::has_no_intros)
	{
		static_assert(!std::is_void<T>::value, "Object has no intros support");
	}

	template<typename T>
	T make_intros_object_impl(const boost::property_tree::ptree& tree, obj_tags::has_no_def_ctor)
	{
		static_assert(!std::is_void<T>::value, "Cannot make object with no default constructor");
	}

	template<typename T>
	T make_intros_object_impl(const boost::property_tree::ptree& tree, obj_tags::proper_object)
	{
		T ret;

		auto ret_intros = get_intros_type(ret);

		details::intros_from_ptree_impl(ret_intros.items, tree.get_child(ret_intros.name));

		return ret;
	}
	template<typename T, std::enable_if_t<!details::has_intros<T>::value, int> = 0>
	boost::property_tree::ptree make_ptree_impl(T)
	{
		static_assert(!std::is_void<T>::value, "Use intros_type for introspection support");
	}

	template<typename T, std::enable_if_t<details::has_intros<T>::value, int> = 0>
	boost::property_tree::ptree make_ptree_impl(const T& in)
	{
		auto intros_type = get_intros_type(in);
		boost::property_tree::ptree tree, subtree;

		details::intros_to_ptree_impl(subtree, intros_type);

		tree.add_child(intros_type.name, subtree);
		return tree;
	}
}}}


text:
using Lindi.Core;
using Lindi.Core.Bindings;
using Lindi.Core.Linq;
using Xunit;

namespace Lindi.Tests.Core.Linq
{
    /// <summary>
    /// Tests for <see cref="InjectExtensions.Where{TInterface,TInjectedInto}"/>.
    /// </summary>
    public class LinqWhereTests
    {
        [Fact]
        public void Test_Where_Without_Select_Returns_Incomplete_Injection()
        {
            Sample s = new Sample();

            IInjectValuesInto<INeedSample> binding = LindiMethods.Inject()
                                                        .Where(v => LindiMethods.InjectedInto(v) as INeedSample);
            NeedSample needSample = new NeedSample();

            Assert.Throws<BindingResolutionException>(() =>
            {
                binding.Inject(needSample);
            });
        }

        [Fact]
        public void Test_Where_Is_Able_To_Inject_Values_Into_Type()
        {
            Sample s = new Sample();
            IBinding<ISample> sampleBinding = from value in LindiMethods.Bind<ISample>()
                                              select s;

            IInjectValuesInto<INeedSample> binding = LindiMethods.Inject()
                                                        .Where(v => LindiMethods.InjectedInto(v) as INeedSample)
                                                        .Select(value =>
                                                        {
                                                            value.Sample = sampleBinding.Resolve();
                                                        });

            NeedSample needSample = new NeedSample();

            binding.Inject(needSample);

            Assert.Same(s, needSample.Sample);
        }

        [Fact]
        public void Test_Multiple_Values_Are_Able_To_Be_Injected()
        {
            Sample s = new Sample();
            const int i = 10;

            IBinding<ISample> sampleBinding = from value in LindiMethods.Bind<ISample>()
                                              select s;

            IBinding<int> intBinding = from value in LindiMethods.Bind<int>()
                                       select i;

            IInjectValuesInto<INeedSampleAndInt> injector = LindiMethods.Inject()
                                                            .Where(value => LindiMethods.InjectedInto(value) as INeedSampleAndInt)
                                                            .Select(value =>
                                                            {
                                                                value.Sample = sampleBinding.Resolve();
                                                                value.Int = intBinding.Resolve();
                                                            });

            NeedSample needsSample = new NeedSample();

            injector.Inject(needsSample);

            Assert.Same(s, needsSample.Sample);
            Assert.Equal(i, needsSample.Int);
        }

        [Fact]
        public void Test_IsInjectedInto_Creates_Same_Injection_As_InjectedInto()
        {
            Sample s = new Sample();
            const int i = 10;

            IBinding<ISample> sampleBinding = from value in LindiMethods.Bind<ISample>()
                                              select s;

            IBinding<int> intBinding = from value in LindiMethods.Bind<int>()
                                       select i;

            IInjectValuesInto<INeedSampleAndInt> injector = LindiMethods.Inject()
                                                            .Where(value => LindiMethods.InjectedInto(value) as INeedSampleAndInt)
                                                            .Select(value =>
                                                            {
                                                                value.Sample = sampleBinding.Resolve();
                                                                value.Int = intBinding.Resolve();
                                                            });

            IInjectValuesInto<INeedSampleAndInt> otherInjector = LindiMethods.Inject()
                        .Where(value => LindiMethods.IsInjectedInto<INeedSampleAndInt>())
                        .Select(value =>
                        {
                            value.Sample = sampleBinding.Resolve();
                            value.Int = intBinding.Resolve();
                        });

            Assert.Same(injector.GetType(), otherInjector.GetType());
        }
    }

    public interface INeedSample
    {
        ISample Sample { get; set; }
    }

    public interface INeedSampleAndInt : INeedSample
    {
        int Int { get; set; }
    }
    public class NeedSample : INeedSampleAndInt
    {
        public ISample Sample { get; set; }
        public int Int { get; set; }
    }
}


text:
<?php

require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php');
require_once(dirname(dirname(__FILE__)) . '/locallib.php');

//recibe the ajax data
$select = $_POST['select'];
$disperssion = $_POST['disperssion'];
$initialdate = $_POST['initialdate'];
$enddate = $_POST['enddate'];

//verify if there is a date selected
if($enddate == '' OR $initialdate == ''){
	$enddate = null;
	$initialdate = null;
}else{
	$initialdate = strtotime($initialdate);
	$enddate = strtotime($enddate);
}
// if select = 0 means that user want all the resources
if($select == '0'){
	global $DB, $CFG;

	$modules = explode(',',$CFG->dashboard_resourcetypes);
	list ( $sqlin, $parametros ) = $DB->get_in_or_equal ( $modules );

	$modulesdata = $DB->get_records_sql("SELECT * FROM {modules} WHERE name $sqlin",$parametros);
	echo "<script type='text/javascript'>
      google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawVisualization);

      function drawVisualization() {
        // Some raw data (not necessarily accurate)
        var data = new google.visualization.DataTable();
      					data.addColumn('string', 'Time of Day');
      					";
      					foreach($modulesdata as $module){
      					echo "data.addColumn('number', '$module->name');";
      					}

      					echo "data.addRows(".json_encode(dashboard_allresourcesdata($disperssion, $initialdate, $enddate)).")

    var options = {chartArea: {
			       			top: 28,
			       			height: '50%'
			    		},
      							hAxis: {
							title: '".get_string('date','local_dashboard')."',
						},
    };

    var chart = new google.visualization.AreaChart(document.getElementById('utimechart'));
    chart.draw(data, options);
  }
    </script>";
} elseif($select == 'paper'){
	//This is the info for paperattendance
	echo "
	<script>
	google.charts.load('current', {packages: ['corechart', 'bar']});
	google.charts.setOnLoadCallback(drawBasic);

	function drawBasic() {

	var data = new google.visualization.DataTable();
	data.addColumn('string', 'Time of Day');
	data.addColumn('number', 'paperattendance');

	data.addRows(".json_encode(dashboard_getpaperdata($disperssion, $initialdate, $enddate)).")

      					var options = {
        					chartArea: {
			       			top: 28,
			       			height: '50%'
			    		},
      							hAxis: {
							title: '".get_string('date','local_dashboard')."',
						},
									vAxis: {
							title: 'paperattendance'
						}
      					};

      					var chart = new google.visualization.AreaChart(
        				document.getElementById('utimechart'));

      					chart.draw(data, options);
			}
			</script>";
}else{
	//Get the specific selected resource data
	$dataname = $DB->get_record('modules', array('id'=>$select));
		echo "
				<script>
					google.charts.load('current', {packages: ['corechart', 'bar']});
					google.charts.setOnLoadCallback(drawBasic);

					function drawBasic() {

      					var data = new google.visualization.DataTable();
      					data.addColumn('string', 'Time of Day');
      					data.addColumn('number', '$dataname->name');

      					data.addRows(".json_encode(dashboard_resourcedata($select,$disperssion, $initialdate, $enddate)).")

      					var options = {
        					chartArea: {
			       			top: 28,
			       			height: '50%'
			    		},
      							hAxis: {
							title: '".get_string('date','local_dashboard')."',
						},
									vAxis: {
							title: '".$dataname->name."'
						}
      					};

      					var chart = new google.visualization.AreaChart(
        				document.getElementById('utimechart'));

      					chart.draw(data, options);
			}
			</script>";
	}


text:
import {config} from 'dotenv';
config();
import './rxjs';
import {Observable as $} from 'rxjs/Observable';
import {Subject} from 'rxjs/Subject';
import * as connect from 'connect';
import * as compression from 'compression';
import * as serveStatic from 'serve-static';
import {createServer} from 'http';
import * as socketIo from 'socket.io';
import * as path from 'path';
import * as game from './game';
import {getTime, saveTime, getPlace, getLeaderboard} from './db';
import {emitObservables, observablesFromEvents} from '../shared/socket-util';

const {assign} = Object;

const app = connect();
app.use(compression());
app.use(serveStatic('public', {maxAge: 3600}));

const server = createServer(app);

const io = socketIo(server, {serveClient: false});
io.on('connection', client => {
  const {id} = client;
  log('connected', {id});
  client.on('disconnect', () => log('disconnected', {id}));
  client.on('pingcheck', () => client.emit('pongcheck'));
  client.once('start', name => {
    log('start', {id, name});
    if (!name) { return client.disconnect(); }
    name = name.substr(0, 16);
    start(client, name);
  });
});

server.listen(3000);
log('server_up_and_listening', {port: 3000});

function start(client, name) {
  const _log = (event, payload = {}) =>
    log(event, assign({id: client.id, name}, payload));

  const {move$, stop$} = observablesFromEvents(client, ['move$', 'stop$']);

  const {
    bob$,
    projectile$,
    time$,
    bobHp$,
    bobDead$,
    level$
  } = game.start({
    move$,
    stop$,
    end$: $.fromEvent(client, 'disconnect')
  });

  const prevTopTime$ = getTime(name),
    finalTopTime$ = time$.last()
      .do(time => _log('session_time', {time}))
      .mergeMap(time => prevTopTime$
        .do(prevTopTime => _log('prev_top_time_updated', {time: prevTopTime}))
        .map(topTime => [topTime, time])
      )
      .mergeMap(([topTime, time]) =>
        topTime >= time ?
          $.of(topTime) :
          saveTime(name, time)
            .do(() => _log('new_top_time_saved', {time}))
            .mapTo(time)
      )
      .do(time => _log('final_top_time', {time}))
      .share(),
    result$ = finalTopTime$
      .mergeMap(topTime =>
        getPlace(topTime)
          .do(place => _log('place', {place}))
          .zip(getLeaderboard().do(leaderboard => _log('leaderboard', {leaderboard})))
          .map((result: any[]) => result.concat(topTime))
      )
      .map(([p, l, t]) => ({place: p, leaderboard: l, topTime: t}))
      .share(),
    topTime$ = result$.map(({topTime}) => topTime).merge(
      prevTopTime$.do(time => _log('prev_top_time', {time}))
    );

  finalTopTime$.subscribe(() => {});

  emitObservables(client, {
    bob$,
    projectile$,
    time$,
    bobHp$,
    bobDead$,
    result$,
    topTime$,
    level$
  });

  result$.combineLatest(bob$, projectile$)
    .finally(() => client.disconnect())
    .subscribe(() => {}, err => _log('error', err));
}

function log(event, payload = {}) {
  const entry = assign({event, timestamp: new Date()}, payload);
  console.log(JSON.stringify(entry));
}


text:
*function handleError(error, $event, widgetContext, entityId, entityName, additionalParams, entityLabel): void*

An optional JavaScript function to handle error occurred while mobile action execution.

**Parameters:**

error: string - error message.

  {% include widget/action/custom_action_args %}

##### Examples

* Display alert dialog with error message:

```javascript
showErrorDialog('Failed to perform action', error);

function showErrorDialog(title, error) {
  setTimeout(function() {
    widgetContext.dialogs.alert(title, error).subscribe();
  }, 100);
}
{:copy-code}
```