text:
import numpy as np

from becca.input_filter import InputFilter
import becca.model_numba as nb

class Model(object):
    """
    Build a predictive model based on sequences of features, goals, reward.

    This version of Becca is model-based, meaning that it builds a
    predictive model of its world in the form of a set of sequences.
    It builds prefixes of the form feature-goal and associates a reward
    and curiosity with each. This is similar to the state-action
    value functions of Q-learning.

    The model also builds feature-goal-feature sequences. These are
    similar to state-action-reward-state-action (SARSA) tuples, as in
    Online Q-Learning using Connectionist Systems" Rummery & Niranjan (1994))
    This formulation allows for prediction, action selection and planning.

    Prediction.
    Knowing the current active features
    and recent goals, both the reward and the resulting features can be
    anticipated.

    Action selection. (performed by the Actor)
    Knowing the
    current active features, goals can be chosen in order to reach
    a desired feature or to maximize reward.

    Planning. (yet to be implemented)
    Feature-goal-feature tuples can
    be chained together to formulate multi-step plans while maximizing
    reward and probability of successfully reaching the goal.
    """
    def __init__(
        self,
        brain=None,
        debug=False,
        n_features=0,
    ):
        """
        Parameters
        ----------
        brain : Brain
            The Brain to which this model belongs. Some of the brain's
            parameters are useful in initializing the model.
        n_features : int
            The total number of features allowed in this model.
        """
        self.debug = debug

        # n_features : int
        #     The maximum number of features that the model can expect
        #     to incorporate. Knowing this allows the model to
        #     pre-allocate all the data structures it will need.
        #     Add 2 features/goals that are internal to the model,
        #     An "always on" and a "nothing else is on".
        self.n_features = n_features + 2

        # previous_feature_activities,
        # feature_activities : array of floats
        #     Features are characterized by their
        #     activity, that is, their level of activation at each time step.
        #     Activity can vary between zero and one.
        self.previous_feature_activities = np.zeros(self.n_features)
        self.feature_activities = np.zeros(self.n_features)
        # feature_fitness : array of floats
        #     The predictive fitness of each feature is regularly updated.
        #     This helps determine which features to keep and which to
        #     swap out for new candidates.
        self.feature_fitness = np.zeros(self.n_features)

        # filter: InputFilter
        #     Reduce the possibly large number of inputs to the number
        #     of cables that the Ziptie can handle. Each Ziptie will
        #     have its own InputFilter.
        self.filter = InputFilter(
            n_inputs=self.n_features - 2,
            name='model',
            debug=self.debug,
        )

        # goal_activities: array of floats
        #     Goals can be set for features.
        #     They are temporary incentives, used for planning and
        #     goal selection. These can vary between zero and one.
        #     Votes are used to help choose a new goal each time step.
        self.goal_activities = np.zeros(self.n_features)

        # prefix_curiosities,
        # prefix_occurrences,
        # prefix_activities,
        # prefix_rewards : 2D array of floats
        # sequence_occurrences : 3D array of floats
        #     The properties associated with each sequence and prefix.
        #     If N is the number of features,
        #     the size of 2D arrays is N**2 and the shape of
        #     3D arrays is N**3. As a heads up, this can eat up
        #     memory as M gets large. They are indexed as follows:
        #         index 0 : feature_1 (past or pre-feature)
        #         index 1 : feature_goal
        #         index 2 : feature_2 (future or post-feature)
        #     The prefix arrays can be 2D because they lack
        #     information about the resulting feature.
        _2D_size = (self.n_features, self.n_features)
        _3D_size = (self.n_features, self.n_features, self.n_features)
        # Making believe that everything has occurred once in the past
        # makes it easy to believe that it might happen again in the future.
        self.conditional_rewards = np.zeros(self.n_features)
        self.conditional_curiosities = np.zeros(self.n_features)
        self.conditional_predictions = np.zeros(_2D_size)
        self.prefix_activities = np.zeros(_2D_size)
        self.prefix_credit = np.zeros(_2D_size)
        self.prefix_occurrences = np.zeros(_2D_size)
        self.prefix_curiosities = np.zeros(_2D_size)
        self.prefix_rewards = np.zeros(_2D_size)
        self.prefix_uncertainties = np.zeros(_2D_size)
        self.sequence_occurrences = np.zeros(_3D_size)
        self.sequence_likelihoods = np.zeros(_3D_size)

        # prefix_decay_rate : float
        #     The rate at which prefix activity decays between time steps
        #     for the purpose of calculating reward and finding the outcome.
        self.prefix_decay_rate = .5
        # credit_decay_rate : float
        #     The rate at which the trace, a prefix's credit for the
        #     future reward, decays with each time step.
        self.credit_decay_rate = .35

        # reward_update_rate : float
        #     The rate at which a prefix modifies its reward estimate
        #     based on new observations.
        self.reward_update_rate = 3e-2
        # curiosity_update_rate : float
        #     One of the factors that determines he rate at which
        #     a prefix increases its curiosity.
        self.curiosity_update_rate = 1e-2

    def step(self, candidate_activities, reward):
        """
        Update the model and choose a new goal.

        Parameters
        ----------
        candidate_activities : array of floats
            The current activity levels of each of the feature candidates.
        reward : float
            The reward reported by the world during
            the most recent time step.
        """
        # Update feature_activities and previous_feature_activities
        self.update_activities(candidate_activities)

        # Update sequences before prefixes.
        nb.update_prefixes(
            self.prefix_decay_rate,
            self.previous_feature_activities,
            self.goal_activities,
            self.prefix_activities,
            self.prefix_occurrences,
            self.prefix_uncertainties,
        )

        nb.update_sequences(
            self.feature_activities,
            self.prefix_activities,
            self.prefix_occurrences,
            self.sequence_occurrences,
            self.sequence_likelihoods,
        )

        nb.update_rewards(
            self.reward_update_rate,
            reward,
            self.prefix_credit,
            self.prefix_rewards,
        )

        nb.update_curiosities(
            self.curiosity_update_rate,
            self.prefix_occurrences,
            self.prefix_curiosities,
            self.previous_feature_activities,
            self.feature_activities,
            self.goal_activities,
            self.prefix_uncertainties,
        )

        self.conditional_predictions = nb.predict_features(
            self.feature_activities,
            self.sequence_likelihoods,
        )

        self.conditional_rewards = nb.predict_rewards(
            self.feature_activities,
            self.prefix_rewards,
        )

        self.conditional_curiosities = nb.predict_curiosities(
            self.feature_activities,
            self.prefix_curiosities,
        )

        return (
            self.feature_activities,
            self.conditional_predictions,
            self.conditional_rewards,
            self.conditional_curiosities)

    def update_activities(self, candidate_activities):
        """
        Apply new activities,

        Parameters
        ----------
        candidate_activities: array of floats

        Returns
        -------
        None, but updates class members
        feature_activities: array of floats
        previous_feature_activities: array of floats
        """
        feature_activities = self.filter.update_activities(
            candidate_activities)

        # Augment the feature_activities with the two internal features,
        # the "always on" (index of 0) and
        # the "null" or "nothing else is on" (index of 1).
        self.previous_feature_activities = self.feature_activities
        self.feature_activities = np.concatenate((
            np.zeros(2), feature_activities))
        self.feature_activities[0] = 1
        total_activity = np.sum(self.feature_activities[2:])
        inactivity = max(1 - total_activity, 0)
        self.feature_activities[1] = inactivity
        return

    def calculate_fitness(self):
        """
        Calculate the predictive fitness of all the feature candidates.

        Returns
        -------
        feature_fitness: array of floats
            The fitness of each of the feature candidate inputs to
            the model.
        """
        nb.update_fitness(
            self.feature_fitness,
            self.prefix_occurrences,
            self.prefix_rewards,
            self.prefix_uncertainties,
            self.sequence_occurrences)

        candidate_fitness = self.filter.update_fitness(
            self.feature_fitness[2:])

        return candidate_fitness

    def update_inputs(self, upstream_resets):
        """
        Add and reset feature inputs as appropriate.

        Parameters
        ----------
        upstream_resets: array of ints
            Indices of the feature candidates to reset.

        Returns
        -------
        resets: array of ints
            Indices of the features that were reset.
        """
        resets = self.filter.update_inputs(upstream_resets=upstream_resets)
        # Account for the model's 2 internal features.
        model_resets = [i_reset + 2 for i_reset in resets]
        # Reset features throughout the model.
        # It's like they never existed.
        for i in model_resets:
            self.previous_feature_activities[i] = 0
            self.feature_activities[i] = 0
            self.feature_fitness[i] = 0
            self.goal_activities[i] = 0
            self.prefix_activities[i, :] = 0
            self.prefix_activities[:, i] = 0
            self.prefix_credit[i, :] = 0
            self.prefix_credit[:, i] = 0
            self.prefix_occurrences[i, :] = 0
            self.prefix_occurrences[:, i] = 0
            self.prefix_curiosities[i, :] = 0
            self.prefix_curiosities[:, i] = 0
            self.prefix_rewards[i, :] = 0
            self.prefix_rewards[:, i] = 0
            self.prefix_uncertainties[i, :] = 0
            self.prefix_uncertainties[:, i] = 0
            self.sequence_occurrences[i, :, :] = 0
            self.sequence_occurrences[:, i, :] = 0
            self.sequence_occurrences[:, :, i] = 0
            self.sequence_likelihoods[i, :, :] = 0
            self.sequence_likelihoods[:, i, :] = 0
            self.sequence_likelihoods[:, :, i] = 0

        return resets

    def update_goals(self, goals, i_new_goal):
        """
        Given a set of goals, record and execute them.

        Parameters
        ----------
        goals: array of floats
            The current set of goal activities.
        i_new_goal: int
            The index of the most recent feature goal.

        Returns
        -------
        feature_pool_goals: array of floats
        """
        self.goal_activities = goals
        nb.update_reward_credit(
            i_new_goal,
            self.feature_activities,
            self.credit_decay_rate,
            self.prefix_credit)

        # Trim off the first two elements.
        # The are internal to the model only.
        feature_pool_goals = self.filter.project_activities(
            self.goal_activities[2:])
        return feature_pool_goals


text:
module kd_tree
  !! Provides routines for a k-dimensional tree, a space-partitioning data structure used for organizing points in k-dimensional space. Note that nearest neightbor searches within k-d trees are not suitable for high dimensional space and will likely perform no better than an exhaustive search. As a general rule of thumb, \(N \gg 2^k\). Input data set need not be sorted. For an introduction to k-d trees, see "An introductory tutorial on kd-trees" (Andrew Moore, 1991).

  implicit none

  type kdbox
     !! Represents a hypercube
     real :: min, max
  end type kdbox

  type kdnode
     !! Represents a node in the kdtree
     private
     integer :: splitDim
     !! The split dimension for this node
     real :: splitVal
     !! The value of the split dimension for this node
     integer :: l, u
     !! The lower and upper indices of the array slice of the original data set used for this node
     type(kdnode), pointer :: left, right
     !! The left and right child nodes
     type(kdbox), pointer :: orthotope => null()
     !! The bounding hypercube of this node
  end type kdnode

  type kdtree
     !! Represents the kdtree itself
     real, pointer :: set(:,:) => null()
     !! The input (sorted, row-major) data set associated with this kd tree
     type(kdnode), pointer :: root => null()
     !! The root node of the kd tree
     integer :: dim = 0
     !! The rank of the data set's domain
     integer :: num = 0
     !! The rank of the data set's range
  end type kdtree

  public :: build_kd_tree, destroy_kd_tree

contains

  function build_kd_tree(S) result(kdt)
    !! UX to build a balanced k-d tree from a set of sorted data points, /(S/).
    !! @warning Note that /(S/) must be input as a *row-major* array, /(\texttt{S(1:dim, 1:num)}/),
    !! in conjunction with Fortran's usual notation.

    use assert, only: assert_x_is_ge_y

    real, target :: S(:,:)
    type(kdtree), pointer :: kdt
    integer :: rootDepth, l, u

    if (size(S,2) .gt. 0) then
       ! Store data set and properties in kdtree structure
       allocate(kdt)
       kdt%set => S
       kdt%dim = size(S,1)
       kdt%num = size(S,2)

       ! The number of data points must be greater than the number of its dimensions.
       call assert_x_is_ge_y(kdt%num, kdt%dim)

       ! Recursively build the kd tree
       l = lbound(S,2)
       u = ubound(S,2)
       rootDepth = 1
       kdt%root => build(kdt, l, u, rootDepth)
    end if

  end function build_kd_tree

  recursive function build(tree, l, u, depth) result (node)

    use statistics, only: median

    integer, intent(in) :: depth, l, u
    type(kdtree), pointer :: tree
    type(kdnode), pointer :: node

    integer :: k, axis, m

    if (u >= l) then
       ! Allocate the node resulting from this build
       allocate(node)

       ! Create a balanced kdtree
       ! Select axis based on modular depth, allowing axis to cycle through all valid values
       k = size(tree%set,2)
       axis = mod(depth, k)

       ! Set the split dimension as the median
       m = median(tree%set(axis,l:u))
       node%splitDim = m
       node%splitVal = tree%set(axis, m)

       ! Recursively build tree
       node%left => build(tree, l, m-1, depth + 1)
       node%right => build(tree, m, u, depth + 1)
    end if

  end function build

  subroutine destroy_kd_tree(kdt)

    type(kdtree), pointer :: kdt

    call destroy_node(kdt%root)

    deallocate(kdt)

  contains

    recursive subroutine destroy_node(node)
      !! Recursively destroy each node in the kdtree

      type(kdnode), pointer :: node

      if (associated(node%left)) then
         call destroy_node(node%left)
         nullify(node%left)
      end if

      if (associated(node%right)) then
         call destroy_node(node%right)
         nullify(node%right)
      end if

      deallocate(node)
    end subroutine destroy_node

  end subroutine destroy_kd_tree

end module kd_tree

redpajama_set_name: RedPajamaGithub


text:
#include "ifmap/ifmap_whitelist.h"

#include <boost/bind.hpp>
#include "ifmap/ifmap_util.h"

IFMapGTFVisitor::IFMapGTFVisitor(IFMapTypenameWhiteList *white_list)
    : white_list_(white_list) {
}

IFMapGTFVisitor::~IFMapGTFVisitor() {
    visited_node_map_.clear();
    unfinished_list_.clear();
    finished_list_.clear();
}

void IFMapGTFVisitor::PreBfsSetup(IFMapGTFNode *node) {
    // The beginning node is already visited
    current_node_ = node;
    visited_node_map_.insert(make_pair(node->name(), node));
}

void IFMapGTFVisitor::VertexVisitor(DBGraphVertex *v) {
}

// Called 'once' for each node AFTER all its edges have been visited
void IFMapGTFVisitor::VertexFinish(DBGraphVertex *v) {
    IFMapGTFNode *node = static_cast<IFMapGTFNode *>(v);
    // Add the node to the white list and mark it finished
    white_list_->include_vertex.push_back(node->name());
    finished_list_.push_back(node);
    // Pop the next node from the unfinished list so that we can use it as the
    // 'left' in the filter string
    if (!unfinished_list_.empty()) {
        current_node_ = unfinished_list_.front();
        unfinished_list_.pop_front();
    }
}

void IFMapGTFVisitor::InsertIntoUnfinished(IFMapGTFNode *node) {
    // Ignore nodes that have been completely processed
    for (NodeList::iterator iter = finished_list_.begin();
         iter != finished_list_.end(); ++iter) {
        IFMapGTFNode *curr = *iter;
        if (curr == node) {
            return;
        }
    }
    // Ignore nodes that have already been seen as neighbors and are waiting to
    // be processed
    for (NodeList::iterator iter = unfinished_list_.begin();
         iter != unfinished_list_.end(); ++iter) {
        IFMapGTFNode *curr = *iter;
        if (curr == node) {
            return;
        }
    }
    unfinished_list_.push_back(node);
}

void IFMapGTFVisitor::EdgeVisitor(DBGraphEdge *e) {
    IFMapGTFLink *link = static_cast<IFMapGTFLink *>(e);

    // Setup 'left' and 'right' correctly so that we create the correct filter
    // string below. One of 'left' or 'right' must be the current_node_
    IFMapGTFNode *left, *right;
    if (link->left()->name().compare(current_node_->name()) == 0) {
        left = link->left();
        right = link->right();
    } else {
        left = link->right();
        right = link->left();
    }

    // If the neighbor has not been visited yet...
    if (visited_node_map_.find(right->name()) == visited_node_map_.end()) {
        // Include the link in the white list if the right node was not
        // visited yet
        // EG: "source=virtual-network,target=virtual-machine-interface");
        std::string edge =
            "source=" + left->name() + ",target=" + right->name();
        white_list_->include_edge.push_back(edge);
        // Color the neighbor to indicate it was visited
        visited_node_map_.insert(make_pair(right->name(), right));
        InsertIntoUnfinished(right);
    }
}

IFMapGraphTraversalFilterCalculator::IFMapGraphTraversalFilterCalculator(
    vnc_cfg_FilterInfo &filter_info, IFMapTypenameWhiteList *white_list)
        : filter_info_(filter_info), white_list_(white_list),
          visitor_(white_list) {
    graph_.reset(new DBGraph());
    CreateNodeBlackList();
    CreateGraph();
    RunBFS();
}

// Hardcoded
void IFMapGraphTraversalFilterCalculator::CreateNodeBlackList() {
    node_blacklist_map_.insert(std::make_pair("config-root", "config-root"));
    node_blacklist_map_.insert(std::make_pair("project", "project"));
    node_blacklist_map_.insert(std::make_pair("network-policy",
                                              "network-policy"));
}

bool IFMapGraphTraversalFilterCalculator::NodeInBlacklist(std::string name) {
    if (node_blacklist_map_.find(name) == node_blacklist_map_.end()) {
        return false;
    } else {
        return true;
    }
}

void IFMapGraphTraversalFilterCalculator::CreateGraph() {
    for (vnc_cfg_FilterInfo::iterator iter = filter_info_.begin();
         iter != filter_info_.end(); ++iter) {
        vnc_cfg_GraphFilterInfo *filter = iter.operator->();

        if (NodeInBlacklist(filter->left_) || NodeInBlacklist(filter->right_)
            || NodeInBlacklist(filter->metadata_)) {
            continue;
        }

        AddNode(filter->left_);
        AddNode(filter->right_);
        if (filter->linkattr_) {
            AddNode(filter->metadata_);
            AddLink(filter->left_, filter->metadata_, filter->metadata_);
            AddLink(filter->metadata_, filter->right_, filter->metadata_);
        } else {
            AddLink(filter->left_, filter->right_, filter->metadata_);
        }
    }
}

void IFMapGraphTraversalFilterCalculator::RunBFS() {
    DBGraph *graph = graph_.get();
    // Start the walk from the 'virtual-router' node
    IFMapGTFNode *vr_node = FindNode("virtual-router");
    PreBfsSetup(vr_node);
    graph->Visit(vr_node,
                 boost::bind(&IFMapGTFVisitor::VertexVisitor, &visitor_, _1),
                 boost::bind(&IFMapGTFVisitor::EdgeVisitor, &visitor_, _1),
                 boost::bind(&IFMapGTFVisitor::VertexFinish, &visitor_, _1));
}

void IFMapGraphTraversalFilterCalculator::PreBfsSetup(IFMapGTFNode *node) {
    visitor_.PreBfsSetup(node);
}

IFMapGTFNode *IFMapGraphTraversalFilterCalculator::FindNode(std::string name) {
    NodePtrMap::iterator iter = node_map_.find(name);
    if (iter == node_map_.end()) {
        return NULL;
    }
    return iter->second;
}

void IFMapGraphTraversalFilterCalculator::AddNode(std::string name) {
    DBGraph *graph = graph_.get();
    NodePtrMap::iterator iter = node_map_.find(name);
    if (iter == node_map_.end()) {
        IFMapGTFNode *node = new IFMapGTFNode(name);
        graph->AddNode(node);
        node_map_.insert(name, node); // node will be automatically disposed
    }
}

// Precondition: nodes for left and right must exist
void IFMapGraphTraversalFilterCalculator::AddLink(std::string from,
                                                  std::string to,
                                                  std::string metadata) {
    DBGraph *graph = graph_.get();
    IFMapGTFNode *left = FindNode(from);
    assert(left);
    IFMapGTFNode *right = FindNode(to);
    assert(right);
    IFMapGTFLink *link =
        static_cast<IFMapGTFLink *>(graph->GetEdge(left, right));
    if (link == NULL) {
        DBGraph::Edge edge = graph->Link(left, right);
        IFMapGTFLink *link = new IFMapGTFLink(edge, left, right, metadata);
        graph->SetEdgeProperty(link);
        link_store_.push_back(link); // 'link' will be automatically disposed
    }
}


text:
bool flip();

bool flip(uint64_t a, uint64_t b);

bool bad_flip();

bool good_flip();

#endif // PROBABILITY_H


text:
function Invoke-TVApiRequest
{
    <#
.PARAMETER Token
The API token generated on the TeamViewer console
.PARAMETER Resource
The resource to process. can be account, users, devices, groups, contacts, sessions, ping or teamviewerpolicies
.PARAMETER Method
The http method to use, defaults to GET
.PARAMETER RequestBody
Additional parameters in json format to pass to the request
.PARAMETER PrincipalID
The specific UserID, DeviceID, GroupID, ContactID or SessionID to process
#>
    [CmdletBinding(
        SupportsShouldProcess = $True
    )]
    param(

        [Parameter(
            Mandatory = $true
        )]
        [string] $Token,

        [Parameter(
            Mandatory = $true
        )]
        [ValidateSet('account', 'users', 'devices', 'groups', 'contacts', 'sessions', 'ping', 'teamviewerpolicies')]
        [string] $Resource,

        [Parameter(
            Mandatory = $false
        )]
        [ValidateSet('GET', 'PUT', 'POST', 'DELETE')]
        [string] $Method = 'GET',

        [Parameter()]
        [hashtable] $RequestBody = @{ },

        [Parameter()]
        [string] $PrincipalID = [string]::Empty

    )

    begin
    {
        [string] $BaseUrl = 'https://webapi.teamviewer.com'
        [string] $ApiVersion = 'v1'

        [hashtable] $Header = @{
            Authorization = ("Bearer {0}" -f $Token)
        }

        [string] $RequestUrl = ('{0}/api/{1}/{2}' -f $BaseUrl, $ApiVersion, $Resource)

        if ( -not ( [string]::IsNullOrEmpty($PrincipalID)))
        {
            $RequestUrl += ('/{0}' -f $PrincipalID)
        }
    }

    process
    {

        [hashtable] $Parameters = @{
            Uri     = $RequestUrl
            Headers = $Header
            Body    = $RequestBody
            Method  = $Method
        }

        if ( $Method -ne 'GET' )
        {
            $Parameters.ContentType = 'application/json; charset=utf-8'
            $Parameters.Body = ($RequestBody | ConvertTo-Json)
        }

        Write-Verbose -Message ('Request URL: "{0}".' -f $RequestUrl)
        try
        {

            if ( $PSCmdlet.ShouldProcess($Resource, $Method))
            {
                $response = Invoke-RestMethod @Parameters
                Write-Verbose -Message 'Returning TVObject...'
                Write-Verbose -Message $response
                Write-Output -InputObject $response
            }
        }
        catch
        {
            $ErrJson = $_ | convertFrom-json
            throw New-Object -TypeName TVException -ArgumentList $ErrJson.error, $ErrJson.error_description, $ErrJson.error_code
        }
    }

}


text:
<bill session="110" type="h" number="4098" updated="2009-01-09T01:24:27-05:00">
	<status><introduced date="1194325200" datetime="2007-11-06"/></status>

	<introduced date="1194325200" datetime="2007-11-06"/>
	<titles>
		<title type="short" as="introduced">Smithsonian Modernization Act of 2007</title>
		<title type="official" as="introduced">To revise the composition of the Board of Regents of the Smithsonian Institution so that all members are individuals appointed by the President from a list of nominees submitted by the leadership of the Congress, and for other purposes.</title>
	</titles>
	<sponsor id="400295"/>
	<cosponsors>

	</cosponsors>
	<actions>
		<action date="1194325200" datetime="2007-11-06"><text>Sponsor introductory remarks on measure. (CR E2331-2332)</text></action>
		<action date="1194325200" datetime="2007-11-06"><text>Referred to the House Committee on House Administration.</text></action>
	</actions>
	<committees>

	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>

	</subjects>
	<amendments>

	</amendments>
	<summary>
	11/6/2007--Introduced.<br/>Smithsonian Modernization Act of 2007 - Revises provisions regarding the composition of the Board of Regents of the Smithsonian Institution by providing for the membership of the Regents to be composed of 21 members who shall be appointed by the President from among a list of nominees submitted by the Speaker of the House and the Majority Leader of the Senate. Revises the number of Regents who shall constitute a quorum to do business. Revises requirements for the terms of office for Regents. Permits Regents to be reappointed.
	</summary>
</bill>


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
Philipp. J. Sci. , C 13:41. 1918

#### Original name
null

### Remarks
null


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

<title>Installing GCC</title>

<meta name="description" content="Installing GCC">
<meta name="keywords" content="Installing GCC">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Installing GCC

Before you install GCC, we encourage you to run the testsuites and to
compare your results with results from a similar configuration that have
been submitted to the
gcc-testresults mailing list.
Some of these archived results are linked from the build status lists
at http://gcc.gnu.org/buildstat.html, although not everyone who
reports a successful build runs the testsuites and submits the results.
This step is optional and may require you to download additional software,
but it can give you confidence in your new GCC installation or point out
problems before you install and start using your new GCC.

First, you must have downloaded the testsuites.
These are part of the full distribution, but if you downloaded the
“core” compiler plus any front ends, you must download the testsuites
separately.

Second, you must have the testing tools installed.  This includes
DejaGnu, Tcl, and Expect;
the DejaGnu site has links to these.

If the directories where runtest and expect were
installed are not in the PATH, you may need to set the following
environment variables appropriately, as in the following example (which
assumes that DejaGnu has been installed under <samp>/usr/local</samp>):

TCL_LIBRARY = /usr/local/share/tcl8.0
DEJAGNULIBS = /usr/local/share/dejagnu

(On systems such as Cygwin, these paths are required to be actual
paths, not mounts or links; presumably this is due to some lack of
portability in the DejaGnu code.)

Finally, you can run the testsuite (which may take a long time):

cd <var>objdir</var>; make -k check

This will test various components of GCC, such as compiler
front ends and runtime libraries.  While running the testsuite, DejaGnu
might emit some harmless messages resembling
‘<samp>WARNING: Couldn't find the global config file.</samp>’ or
‘<samp>WARNING: Couldn't find tool init file</samp>’ that can be ignored.

If you are testing a cross-compiler, you may want to run the testsuite
on a simulator as described at http://gcc.gnu.org/simtest-howto.html.

How can you run the testsuite on selected tests?

In order to run sets of tests selectively, there are targets
‘<samp>make check-gcc</samp>’ and language specific ‘<samp>make check-c</samp>’,
‘<samp>make check-c++</samp>’, ‘<samp>make check-fortran</samp>’, ‘<samp>make check-java</samp>’,
‘<samp>make check-ada</samp>’, ‘<samp>make check-objc</samp>’, ‘<samp>make check-obj-c++</samp>’,
‘<samp>make check-lto</samp>’
in the <samp>gcc</samp> subdirectory of the object directory.  You can also
just run ‘<samp>make check</samp>’ in a subdirectory of the object directory.

A more selective way to just run all gcc execute tests in the
testsuite is to use

make check-gcc RUNTESTFLAGS="execute.exp <var>other-options</var>"

Likewise, in order to run only the g++ “old-deja” tests in
the testsuite with filenames matching ‘<samp>9805*</samp>’, you would use

make check-g++ RUNTESTFLAGS="old-deja.exp=9805* <var>other-options</var>"

The <samp>*.exp</samp> files are located in the testsuite directories of the GCC
source, the most important ones being <samp>compile.exp</samp>,
<samp>execute.exp</samp>, <samp>dg.exp</samp> and <samp>old-deja.exp</samp>.
To get a list of the possible <samp>*.exp</samp> files, pipe the
output of ‘<samp>make check</samp>’ into a file and look at the
‘<samp>Running …  .exp</samp>’ lines.

Passing options and running multiple testsuites

You can pass multiple options to the testsuite using the
‘<samp>--target_board</samp>’ option of DejaGNU, either passed as part of
‘<samp>RUNTESTFLAGS</samp>’, or directly to runtest if you prefer to
work outside the makefiles.  For example,

make check-g++ RUNTESTFLAGS="--target_board=unix/-O3/-fmerge-constants"

will run the standard g++ testsuites (“unix” is the target name
for a standard native testsuite situation), passing
‘<samp>-O3 -fmerge-constants</samp>’ to the compiler on every test, i.e.,
slashes separate options.

You can run the testsuites multiple times using combinations of options
with a syntax similar to the brace expansion of popular shells:

…"--target_board=arm-sim\{-mhard-float,-msoft-float\}\{-O1,-O2,-O3,\}"

(Note the empty option caused by the trailing comma in the final group.)
The following will run each testsuite eight times using the ‘<samp>arm-sim</samp>’
target, as if you had specified all possible combinations yourself:

--target_board='arm-sim/-mhard-float/-O1 \
                arm-sim/-mhard-float/-O2 \
                arm-sim/-mhard-float/-O3 \
                arm-sim/-mhard-float \
                arm-sim/-msoft-float/-O1 \
                arm-sim/-msoft-float/-O2 \
                arm-sim/-msoft-float/-O3 \
                arm-sim/-msoft-float'

They can be combined as many times as you wish, in arbitrary ways.  This
list:

…"--target_board=unix/-Wextra\{-O3,-fno-strength\}\{-fomit-frame,\}"

will generate four combinations, all involving ‘<samp>-Wextra</samp>’.

The disadvantage to this method is that the testsuites are run in serial,
which is a waste on multiprocessor systems.  For users with GNU Make and
a shell which performs brace expansion, you can run the testsuites in
parallel by having the shell perform the combinations and make
do the parallel runs.  Instead of using ‘<samp>--target_board</samp>’, use a
special makefile target:

make -j<var>N</var> check-<var>testsuite</var>//<var>test-target</var>/<var>option1</var>/<var>option2</var>/…

For example,

make -j3 check-gcc//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu}

will run three concurrent “make-gcc” testsuites, eventually testing all
ten combinations as described above.  Note that this is currently only
supported in the <samp>gcc</samp> subdirectory.  (To see how this works, try
typing echo before the example given here.)

Additional testing for Java Class Libraries

The Java runtime tests can be executed via ‘<samp>make check</samp>’
in the <samp><var>target</var>/libjava/testsuite</samp> directory in
the build tree.

The Mauve Project provides
a suite of tests for the Java Class Libraries.  This suite can be run
as part of libgcj testing by placing the Mauve tree within the libjava
testsuite at <samp>libjava/testsuite/libjava.mauve/mauve</samp>, or by
specifying the location of that tree when invoking ‘<samp>make</samp>’, as in
‘<samp>make MAUVEDIR=~/mauve check</samp>’.

How to interpret test results

The result of running the testsuite are various <samp>*.sum</samp> and <samp>*.log</samp>
files in the testsuite subdirectories.  The <samp>*.log</samp> files contain a
detailed log of the compiler invocations and the corresponding
results, the <samp>*.sum</samp> files summarize the results.  These summaries
contain status codes for all tests:

 PASS: the test passed as expected

 XPASS: the test unexpectedly passed

 FAIL: the test unexpectedly failed

 XFAIL: the test failed as expected

 UNSUPPORTED: the test is not supported on this platform

 ERROR: the testsuite detected an error

 WARNING: the testsuite detected a possible problem

It is normal for some tests to report unexpected failures.  At the
current time the testing harness does not allow fine grained control
over whether or not a test is expected to fail.  This problem should
be fixed in future releases.

Submitting test results

If you want to report the results to the GCC project, use the
<samp>contrib/test_summary</samp> shell script.  Start it in the <var>objdir</var> with

<var>srcdir</var>/contrib/test_summary -p your_commentary.txt \
    -m gcc-testresults@gcc.gnu.org |sh

This script uses the Mail program to send the results, so
make sure it is in your PATH.  The file <samp>your_commentary.txt</samp> is
prepended to the testsuite summary and should contain any special
remarks you have on your results or your build environment.  Please
do not edit the testsuite result block or the subject line, as these
messages may be automatically processed.

Return to the GCC Installation page


text:
package com.orionplatform.math.function.tasks.checks;

import com.orionplatform.core.abstraction.Orion;
import com.orionplatform.core.exception.InvalidArgumentException;
import com.orionplatform.math.function.Function;
import com.orionplatform.math.function.FunctionRules;
import com.orionplatform.math.function.domain.FunctionDomain1x1;
import com.orionplatform.math.number.interval.Interval;
import com.orionplatform.math.number.interval.IntervalRules;

public class CanFunctionRunWithGivenIntervalTask extends Orion
{
    public static synchronized boolean run(Function f, Interval intervalToCheck)
    {
        FunctionRules.isValid(f);
        IntervalRules.isValid(intervalToCheck);

        if(f.getDomain() == null)
        {
            return true;
        }
        else if(f.getDomain() != null)
        {
            if(((FunctionDomain1x1)f.getDomain()).getIntervalOfVariable1().isIntervalInside(intervalToCheck))
            {
                return true;
            }
        }

        throw new InvalidArgumentException("The given intervalToCheck = " + intervalToCheck + " is not inside the function's domain.");
    }
}


text:
/* eslint-disable */

const authorize = require('./authorize');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const urlencodedParser = bodyParser.urlencoded({extended: false});
const access = require('./access');
access.readKey().then((keyJson) => {
  key = keyJson;
});

module.exports = (authorizeURL = '/login') => {
  return [cookieParser(), urlencodedParser, function(req, res, next) {
    if (req.url.startsWith(authorizeURL) && req.method === 'POST') {
      authorize(req, res, key);
    }
    if (key[req.url] && key[req.url].password) {
      if(key[req.url].password === req.cookies[req.url]) {
        next();
      } else {
        res.redirect(`${authorizeURL}?site=${req.url.slice(1)}`);
      }
    } else {
      next();
    }
  }];
};


text:
""" SWT utilities """
from org.eclipse import swt
from java.text import SimpleDateFormat
import storytext.guishared
from java.lang import NoSuchMethodException, NoSuchFieldException

def getRealUrl(browser):
    url = browser.getUrl()
    return url if url != "about:blank" else ""

class TextLabelFinder(storytext.guishared.TextLabelFinder):
    def getLabelClass(self):
        return swt.widgets.Label, swt.custom.CLabel

    def getContextParentClasses(self):
        # Don't look for labels outside these if they are parent classes
        return swt.widgets.Tree, swt.widgets.Table

    def getChildren(self, widget):
        return widget.getChildren() if hasattr(widget, "getChildren") else []

    def getEarliestRelevantIndex(self, widgetPos, children, parent):
        layout = parent.getLayout()
        if isinstance(layout, swt.custom.StackLayout):
            return widgetPos # No text is relevant: stack layout will hide it

        if not isinstance(layout, swt.layout.GridLayout):
            return 0

        numColumns = layout.numColumns
        if numColumns == 1: # If there's only one column, don't worry about it...
            return 0

        currIndex = 0
        rows = {}
        for ix, child in enumerate(children):
            span = min(child.getLayoutData().horizontalSpan, numColumns)
            row = currIndex / numColumns
            rows.setdefault(row, []).append(ix)
            if ix == widgetPos:
                return rows[row][0]
            else:
                currIndex += span

    def numRows(self, children, parent):
        layout = parent.getLayout()
        if not isinstance(layout, swt.layout.GridLayout):
            return 0
        numColumns = layout.numColumns
        currIndex = 0
        rows = -1
        for child in children:
            span = min(child.getLayoutData().horizontalSpan, numColumns)
            rows = int(currIndex / numColumns)
            currIndex += span
        return rows + 1

cellParentData = [ (swt.widgets.Table, "TableCell"),
                   (swt.widgets.Tree,  "TreeCell") ]

ignoreLabels = []
def getTextLabel(widget, **kw):
    return TextLabelFinder(widget, ignoreLabels).find(**kw)

def getInt(intOrMethod):
    return intOrMethod if isinstance(intOrMethod, int) else intOrMethod()

class CanvasDescriber(storytext.guishared.Describer):
    def __init__(self, canvas, *args, **kw):
        storytext.guishared.Describer.__init__(self, *args, **kw)
        self.canvas = canvas

    def describeCanvasStructure(self, indent):
        pass

    @classmethod
    def canDescribe(cls, widget):
        return False

    def getCanvasDescription(self, *args):
        pass

    def getUpdatePrefix(self, *args):
        return "\nUpdated "

def getDateFormat(dateType):
    if dateType == swt.SWT.TIME:
        # Default format is locale-dependent, no reason to make tests fail in different locales
        return SimpleDateFormat("kk:mm:ss")
    else:
        # Seems to be default format for swt.SWT.DATE, should be locale-independent
        return SimpleDateFormat("M/d/yyyy")

# For some reason StackLayout does not affect visible properties, so things that are hidden get marked as visible
# Workaround these things
def getTopControl(widget):
    if hasattr(widget, "getLayout"):
        layout = widget.getLayout()
        if hasattr(layout, "topControl"):
            return layout.topControl

def isVisible(widget):
    if not hasattr(widget, "getVisible"):
        return True
    if not widget.getVisible():
        return False

    parent = widget.getParent()
    if not parent:
        return True
    topControl = getTopControl(parent)
    if topControl and topControl is not widget:
        return False
    else:
        return isVisible(parent)

def getRootMenu(menuItem):
    menu = menuItem.getParent()
    while menu.getParentMenu() is not None:
        menu = menu.getParentMenu()
    return menu

def getItemText(text):
    return text.replace("&", "").split("\t")[0]

def getPrivateField(obj, fieldName):
    cls = obj.getClass()
    while cls is not None:
        try:
            declaredField = cls.getDeclaredField(fieldName)
            declaredField.setAccessible(True)
            return declaredField.get(obj)
        except NoSuchFieldException:
            cls = cls.getSuperclass()

def callPrivateMethod(obj, methodName, argList=[], argTypeList=[]):
    cls = obj.getClass()
    argTypeList = argTypeList if argTypeList or not argList else [ arg.getClass() for arg in argList ]
    while True:
        try:
            declaredMethod = cls.getDeclaredMethod(methodName, argTypeList)
            declaredMethod.setAccessible(True)
            return declaredMethod.invoke(obj, argList)
        except NoSuchMethodException:
            cls = cls.getSuperclass()
            if cls is None:
                raise

def isinstance_any_classloader(obj, cls):
    # Obviously this should check base classes too somehow, but we don't need that right now
    return obj.__class__.__name__ == cls.__name__

classLoaderFail = set()
def isinstance_check_classloader(obj, cls):
    return isinstance_any_classloader(obj, cls) if cls in classLoaderFail else isinstance(obj, cls)


text:
package org.jsimpledb;

/**
 * Visitor pattern interface for {@link JField}s.
 *
 * @param <R> switch method return type
 * @see JField#visit
 */
public interface JFieldSwitch<R> {

    /**
     * Handle a {@link JSetField}.
     *
     * @param field the visiting field
     * @return visitor return value
     */
    R caseJSetField(JSetField field);

    /**
     * Handle a {@link JListField}.
     *
     * @param field the visiting field
     * @return visitor return value
     */
    R caseJListField(JListField field);

    /**
     * Handle a {@link JMapField}.
     *
     * @param field the visiting field
     * @return visitor return value
     */
    R caseJMapField(JMapField field);

    /**
     * Handle a {@link JSimpleField}.
     *
     * @param field the visiting field
     * @return visitor return value
     */
    R caseJSimpleField(JSimpleField field);

    /**
     * Handle a {@link JReferenceField}.
     *
     * @param field the visiting field
     * @return visitor return value
     */
    R caseJReferenceField(JReferenceField field);

    /**
     * Handle a {@link JEnumField}.
     *
     * @param field the visiting field
     * @return visitor return value
     */
    R caseJEnumField(JEnumField field);

    /**
     * Handle a {@link JCounterField}.
     *
     * @param field the visiting field
     * @return visitor return value
     */
    R caseJCounterField(JCounterField field);
}


text:
package at.ac.tuwien.kr.alpha.core.grounder;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import at.ac.tuwien.kr.alpha.api.programs.atoms.Atom;
import at.ac.tuwien.kr.alpha.api.terms.ConstantTerm;
import at.ac.tuwien.kr.alpha.api.terms.FunctionTerm;
import at.ac.tuwien.kr.alpha.api.terms.IntervalTerm;
import at.ac.tuwien.kr.alpha.api.terms.Term;
import at.ac.tuwien.kr.alpha.commons.substitutions.Instance;
import at.ac.tuwien.kr.alpha.commons.terms.Terms;

public class FactIntervalEvaluator {

	/**
	 * Helper to construct Instances from a fact that may contain intervals.
	 *
	 * @param fact the fact potentially containing intervals.
	 * @return all instances stemming from unfolding the intervals.
	 */
	public static List<Instance> constructFactInstances(Atom fact) {
		// Construct instance(s) from the fact.
		int arity = fact.getPredicate().getArity();
		Term[] currentTerms = new Term[arity];
		boolean containsIntervals = false;
		// Check if instance contains intervals at all.
		for (int i = 0; i < arity; i++) {
			Term term = fact.getTerms().get(i);
			currentTerms[i] = term;
			if (term instanceof IntervalTerm) {
				containsIntervals = true;
			} else if (term instanceof FunctionTerm && Terms.functionTermContainsIntervals((FunctionTerm) term)) {
				containsIntervals = true;
				throw new UnsupportedOperationException("Intervals inside function terms in facts are not supported yet. Try turning the fact into a rule.");
			}
		}
		// If fact contains no intervals, simply return the single instance.
		if (!containsIntervals) {
			return Collections.singletonList(new Instance(currentTerms));
		}
		// Fact contains intervals, unroll them all.
		return unrollInstances(currentTerms, 0);
	}

	@SuppressWarnings("unchecked")
	private static List<Instance> unrollInstances(Term[] currentTerms, int currentPosition) {
		if (currentPosition == currentTerms.length) {
			return Collections.singletonList(new Instance(currentTerms));
		}
		Term currentTerm = currentTerms[currentPosition];
		if (!(currentTerm instanceof IntervalTerm)) {
			return unrollInstances(currentTerms, currentPosition + 1);
		}

		List<Instance> instances = new ArrayList<>();

		Term lowerBoundTerm = ((IntervalTerm) currentTerm).getLowerBound();
		Term upperBoundTerm = ((IntervalTerm) currentTerm).getUpperBound();
		if (!(lowerBoundTerm instanceof ConstantTerm)) {
			throw new IllegalArgumentException("Cannot unroll interval term with non-integer bound: " + lowerBoundTerm);
		}
		if (!(upperBoundTerm instanceof ConstantTerm)) {
			throw new IllegalArgumentException("Cannot unroll interval term with non-integer bound: " + upperBoundTerm);
		}

		int lower = ((ConstantTerm<Integer>) lowerBoundTerm).getObject();
		int upper = ((ConstantTerm<Integer>) upperBoundTerm).getObject();

		for (int i = lower; i <= upper; i++) {
			Term[] clonedTerms = currentTerms.clone();
			clonedTerms[currentPosition] = Terms.newConstant(i);
			instances.addAll(unrollInstances(clonedTerms, currentPosition + 1));
		}
		return instances;
	}
}


text:
package org.apache.taverna.lang.ui;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.SystemColor;
import java.awt.RenderingHints.Key;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Map;

/**
 * A BufferedImage of one of four types of arrow (up, down, left or right) drawn
 * to the size specified on the constructor.
 */
public class CArrowImage extends BufferedImage {
	// Constants...
	public static final int ARROW_UP = 0;

	public static final int ARROW_DOWN = 1;

	public static final int ARROW_LEFT = 2;

	public static final int ARROW_RIGHT = 3;

	// Member variables...
	private GeneralPath _pathArrow = new GeneralPath();

	// Constructor...
	public CArrowImage(int nArrowDirection) {
		this(15, 9, nArrowDirection);
	}

	public CArrowImage(int nWidth, int nHeight, int nArrowDirection) {
		super(nWidth, nHeight, TYPE_INT_ARGB_PRE); // Set the width, height and
		// image type

		Map<Key, Object> map = new HashMap<Key, Object>();
		map.put(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);
		map.put(RenderingHints.KEY_RENDERING,
				RenderingHints.VALUE_RENDER_QUALITY);
		RenderingHints hints = new RenderingHints(map);

		Graphics2D g2 = this.createGraphics(); // Create a graphics context for
		// this buffered image
		g2.setRenderingHints(hints);

		float h = getHeight();
		float w = getWidth();
		float w13 = w / 3;
		float w12 = w / 2;
		float w23 = w * 2 / 3;
		float h13 = h / 3;
		float h12 = h / 2;
		float h23 = h * 2 / 3;

		switch (nArrowDirection) {
		case ARROW_UP:
			_pathArrow.moveTo(w12, h12);
			_pathArrow.lineTo(w12, 0);
			_pathArrow.lineTo(w, h - 1);
			_pathArrow.lineTo(0, h - 1);
			_pathArrow.closePath();
			g2.setPaint(new GradientPaint(w13, h13,
					SystemColor.controlLtHighlight, w, h - 1,
					SystemColor.controlShadow));

			g2.fill(_pathArrow);

			g2.setColor(SystemColor.controlDkShadow);
			g2.draw(new Line2D.Float(0, h - 1, w, h - 1));
			g2.setColor(SystemColor.controlShadow);
			g2.draw(new Line2D.Float(w12, 0, w, h - 1));
			g2.setColor(SystemColor.controlLtHighlight);
			g2.draw(new Line2D.Float(0, h - 1, w12, 0));
			break;

		case ARROW_DOWN:
			_pathArrow.moveTo(w12, h12);
			_pathArrow.lineTo(w, 0);
			_pathArrow.lineTo(w12, h - 1);
			_pathArrow.closePath();
			g2.setPaint(new GradientPaint(0, 0, SystemColor.controlLtHighlight,
					w23, h23, SystemColor.controlShadow));
			g2.fill(_pathArrow);

			g2.setColor(SystemColor.controlDkShadow);
			g2.draw(new Line2D.Float(w, 0, w12, h - 1));
			g2.setColor(SystemColor.controlShadow);
			g2.draw(new Line2D.Float(w12, h - 1, 0, 0));
			g2.setColor(SystemColor.controlLtHighlight);
			g2.draw(new Line2D.Float(0, 0, w, 0));
			break;

		case ARROW_LEFT:
			_pathArrow.moveTo(w - 1, h13);
			_pathArrow.lineTo(w13, h13);
			_pathArrow.lineTo(w13, 0);
			_pathArrow.lineTo(0, h12);
			_pathArrow.lineTo(w13, h - 1);
			_pathArrow.lineTo(w13, h23);
			_pathArrow.lineTo(w - 1, h23);
			_pathArrow.closePath();
			g2.setPaint(new GradientPaint(0, 0, Color.white, // SystemColor.
																// controlLtHighlight
																// ,
					0, h, SystemColor.controlShadow));
			g2.fill(_pathArrow);

			_pathArrow.reset();
			_pathArrow.moveTo(w13, 0);
			_pathArrow.lineTo(w13, h13);
			_pathArrow.moveTo(w - 1, h13);
			_pathArrow.lineTo(w - 1, h23);
			_pathArrow.lineTo(w13, h23);
			_pathArrow.lineTo(w13, h - 1);
			g2.setColor(SystemColor.controlDkShadow);
			g2.draw(_pathArrow);

			g2.setColor(SystemColor.controlShadow);
			g2.draw(new Line2D.Float(0, h12, w13, h - 1));

			_pathArrow.reset();
			_pathArrow.moveTo(0, h12);
			_pathArrow.lineTo(w13, 0);
			_pathArrow.moveTo(w13, h13);
			_pathArrow.lineTo(w - 1, h13);
			g2.setColor(SystemColor.controlLtHighlight);
			g2.draw(_pathArrow);
			break;

		case ARROW_RIGHT:
		default: {
			_pathArrow.moveTo(0, h13);
			_pathArrow.lineTo(w23, h13);
			_pathArrow.lineTo(w23, 0);
			_pathArrow.lineTo(w - 1, h12);
			_pathArrow.lineTo(w23, h - 1);
			_pathArrow.lineTo(w23, h23);
			_pathArrow.lineTo(0, h23);
			_pathArrow.closePath();
			g2.setPaint(new GradientPaint(0, 0, Color.white, // SystemColor.
																// controlLtHighlight
																// ,
					0, h, SystemColor.controlShadow));
			g2.fill(_pathArrow);

			_pathArrow.reset();
			_pathArrow.moveTo(0, h23);
			_pathArrow.lineTo(w23, h23);
			_pathArrow.moveTo(w23, h - 1);
			_pathArrow.lineTo(w - 1, h12);
			g2.setColor(SystemColor.controlDkShadow);
			g2.draw(_pathArrow);

			g2.setColor(SystemColor.controlShadow);
			g2.draw(new Line2D.Float(w - 1, h12, w23, 0));

			_pathArrow.reset();
			_pathArrow.moveTo(w23, 0);
			_pathArrow.lineTo(w23, h13);
			_pathArrow.lineTo(0, h13);
			_pathArrow.lineTo(0, h23);
			_pathArrow.moveTo(w23, h23);
			_pathArrow.lineTo(w23, h - 1);
			g2.setColor(SystemColor.controlLtHighlight);
			g2.draw(_pathArrow);
			break;
		}
		}

	}

}


text:
package org.kuali.kfs.module.purap.document.service;

import org.kuali.kfs.module.purap.document.PurchasingAccountsPayableDocument;
import org.kuali.rice.kim.api.identity.Person;
import org.kuali.rice.krad.document.Document;

public interface PurApWorkflowIntegrationService {

    /**
     * Take all actions on the given document based on the given criteria
     *
     * @param document
     * @param potentialAnnotation
     * @param nodeName
     * @param user
     * @param networkIdToImpersonate
     * @return
     */
    public boolean takeAllActionsForGivenCriteria(Document document, String potentialAnnotation, String nodeName, Person user, String superUserNetworkId);

    /**
     * Determine if the document will stop at the given node in the future routing process
     *
     * @param document
     * @param givenNodeName
     * @return boolean indicating if document is going to stop at the given node
     */
    public boolean willDocumentStopAtGivenFutureRouteNode(PurchasingAccountsPayableDocument document, String givenNodeName);
}


text:
import { connect } from 'react-redux';
import { push } from 'react-router-redux';

import FamilySideBar from '../components/FamilySideBar';
import { requestFetchWorld } from '../actions/worldActions';
import { getWorld } from '../reducers/selectors';

const mapStateToProps = (state) => ({
  world: getWorld(state)
});

const mapDispatchToProps = {
  requestFetchWorld,
  push
};

export default connect(mapStateToProps, mapDispatchToProps)(FamilySideBar);


text:
<?php

namespace Cake\Model\Error;

use Cake\Error\Exception;

/**
 * Used when a model cannot be found.
 *
 */
class MissingModelException extends Exception {

	protected $_messageTemplate = 'Model class "%s" of type "%s" could not be found.';

}


text:
title: Telerik.Web.UI.AutoCompleteTextEventArgs
page_title: Telerik.Web.UI.AutoCompleteTextEventArgs
description: Telerik.Web.UI.AutoCompleteTextEventArgs
---

# Telerik.Web.UI.AutoCompleteTextEventArgs

Provides data for the AutoCompleteText
            	event of the RadAutoCompleteBoxcontrol.

## Inheritance Hierarchy

* System.Object
* System.EventArgs
* Telerik.Web.UI.AutoCompleteTextEventArgs

## Properties

###  Text `String`

Gets or sets the text.