text:
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
 *  Main authors:
 *     Christian Schulte <schulte@gecode.org>
 *     Guido Tack <tack@gecode.org>
 *
 *  Copyright:
 *     Christian Schulte, 2004
 *     Guido Tack, 2004
 *
 *  Last modified:
 *     $Date: 2010-05-03 18:31:57 +0200 (må, 03 maj 2010) $ by $Author: schulte $
 *     $Revision: 10846 $
 *
 *  This file is part of Gecode, the generic constraint
 *  development environment:
 *     http://www.gecode.org
 *
 *  Permission is hereby granted, free of charge, to any person obtaining
 *  a copy of this software and associated documentation files (the
 *  "Software"), to deal in the Software without restriction, including
 *  without limitation the rights to use, copy, modify, merge, publish,
 *  distribute, sublicense, and/or sell copies of the Software, and to
 *  permit persons to whom the Software is furnished to do so, subject to
 *  the following conditions:
 *
 *  The above copyright notice and this permission notice shall be
 *  included in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */

#ifndef __GECODE_INT_ELEMENT_HH__
#define __GECODE_INT_ELEMENT_HH__

#include <gecode/int.hh>
#include <gecode/int/rel.hh>

/**
 * \namespace Gecode::Int::Element
 * \brief %Element propagators
 */

namespace Gecode { namespace Int { namespace Element {

  /**
   * \brief %Element propagator for array of integers
   *
   * Requires \code #include <gecode/int/element.hh> \endcode
   * \ingroup FuncIntProp
   */
  template<class V0, class V1, class Idx, class Val>
  class Int : public Propagator {
  protected:
    /**
     * \brief Linked index-value pairs
     *
     * Data structure linking pairs of index and value (index,value)
     * where pairs are linked in order of both index and
     * value (to allow for easy removal while keeping both index and
     * value sorted).
     */
    class IdxVal  {
    public:
      Idx idx_next; ///< The position of the next pair in index order
      Idx val_next; ///< The position of the next pair in value order
      Idx idx; ///< The index
      Val val; ///< The value
      /// Mark that this pair should be removed
      void mark(void);
      /// Return whether this pair is marked for removal
      bool marked(void) const;
    };
    /**
     * \brief Value iterator for indices in index-value map
     *
     * The iterator also removes marked index-value pairs.
     *
     */
    class IterIdxUnmark {
    private:
      IdxVal* iv; ///< The index value data structure
      Idx i; ///< Current index value pair
    public:
      /// Initialize with start
      IterIdxUnmark(IdxVal* iv);
      /// Test whether more pairs to be iterated
      bool operator ()(void) const;
      /// Move to next index value pair (next index)
      void operator ++(void);
      /// Return index of current index value pair
      Idx val(void) const;
    };
    /**
     * \brief Value iterator for values in index-value map
     *
     * Note that the iterated value sequence is not strictly
     * increasing (might contain duplicates).
     */
    class IterVal {
    private:
      IdxVal* iv; ///< The index value data structure
      Idx i; ///< Current index value pair
    public:
      /// Initialize with start
      IterVal(IdxVal* iv);
      /// Test whether more pairs to be iterated
      bool operator ()(void) const;
      /// Move to next index value pair (next value)
      void operator ++(void);
      /// Return value of current index value pair
      Val val(void) const;
    };
    /**
     * \brief Value iterator for values in index-value map
     *
     * Note that the iterated value sequence is not strictly
     * increasing (might contain duplicates).
     *
     * The iterator also removes marked index-value pairs.
     */
    class IterValUnmark {
    private:
      IdxVal* iv; ///< The index value data structure
      Idx i; ///< Current index value pair
    public:
      /// Initialize with start
      IterValUnmark(IdxVal* iv);
      /// Test whether more pairs to be iterated
      bool operator ()(void) const;
      /// Move to next index value pair (next value)
      void operator ++(void);
      /// Return value of current index value pair
      Val val(void) const;
    };
    /// Sorting pointers to (index,value) pairs in value order
    class ByVal {
    protected:
      const IdxVal* iv; ///< Index-value pairs
    public:
      /// Initialize with index value pairs
      ByVal(const IdxVal* iv);
      /// Compare pairs at positions \a i and \a j
      bool operator ()(Idx& i, Idx& j);
    };

    /// View for index
    V0 x0;
    /// Type for index size
    typedef typename Gecode::Support::IntTypeTraits<Idx>::utype IdxSize;
    /// Size of \a x0 at last execution
    IdxSize s0;
    /// View for result
    V1 x1;
    /// Type for value size
    typedef typename Gecode::Support::IntTypeTraits<Val>::utype ValSize;
    /// Size of \a x1 at last execution
    ValSize s1;
    /// Shared array of integer values
    IntSharedArray c;
    /// The index-value data structure
    IdxVal* iv;
    /// Prune index according to \a x0
    void prune_idx(void);
    /// Prune values according to \a x1
    void prune_val(void);
    /// Prune when \a x1 is assigned
    static ExecStatus assigned_val(Space& home, IntSharedArray& c,
                                   V0 x0, V1 x1);
    /// Constructor for cloning \a p
    Int(Space& home, bool shared, Int& p);
    /// Constructor for creation
    Int(Home home, IntSharedArray& i, V0 x0, V1 x1);
  public:
    /// Perform copying during cloning
    virtual Actor* copy(Space& home, bool share);
    /// Const function (defined as high binary)
    virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
    /// Perform propagation
    virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
    /// Post propagator for \f$i_{x_0}=x_1\f$
    static  ExecStatus post(Home home, IntSharedArray& i, V0 x0, V1 x1);
    /// Delete propagator and return its size
    virtual size_t dispose(Space& home);
  };

  /// Post propagator with apropriate index and value types
  template<class V0, class V1>
  ExecStatus post_int(Home home, IntSharedArray& c, V0 x0, V1 x1);

  /**
   * \brief Class for index-view map
   *
   */
  template<class ViewB> class IdxView;

  /// Class to get VarArg type for view
  template<class View>
  class ViewToVarArg {};

  /**
   * \brief An array of IndexView pairs
   *
   */
  template<class View>
  class IdxViewArray {
  private:
    /// The actual array
    IdxView<View>* xs;
    /// The size of the array
    int n;
  public:
    /// Default constructor
    IdxViewArray(void);
    /// Copy constructor
    IdxViewArray(const IdxViewArray<View>&);
    /// Construct an IdxViewArray from \a x
    IdxViewArray(Space& home, const typename ViewToVarArg<View>::argtype& x);
    /// Construct an IdxViewArray of size \a n
    IdxViewArray(Space& home, int n);

    /// Return the current size
    int size(void) const;
    /// Set the size to \a n
    void size(int n);

    /// Access element \a n
    IdxView<View>& operator [](int n);
    /// Access element \a n
    const IdxView<View>& operator [](int) const;

    /**
     * Subscribe propagator \a p with propagation condition \a pc
     * to all elements of the array.
     */
    void subscribe(Space& home, Propagator& p, PropCond pc, bool process=true);
    /**
     * Cancel subscription of propagator \a p with propagation condition \a pc
     * for all elements of the array.
     */
    void cancel(Space& home, Propagator& p, PropCond pc);

    /// Cloning
    void update(Space& home, bool share, IdxViewArray<View>& x);
  };

  /**
   * \brief Base-class for element propagator for array of views
   *
   */
  template<class VA, class VB, class VC, PropCond pc_ac>
  class View : public Propagator {
  protected:
    /// Current index-view map
    IdxViewArray<VA> iv;
    /// View for index
    VB x0;
    /// View for result
    VC x1;
    /// Constructor for cloning \a p
    View(Space& home, bool share, View& p);
    /// Constructor for creation
    View(Home home, IdxViewArray<VA>& iv, VB x0, VC x1);
  public:
    // Cost function (defined as low linear)
    virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
    /// Delete propagator and return its size
    virtual size_t dispose(Space& home);
  };

  /**
   * \brief Bounds consistent element propagator for array of views
   *
   * Requires \code #include <gecode/int/element.hh> \endcode
   * \ingroup FuncIntProp
   */
  template<class VA, class VB, class VC>
  class ViewBnd : public View<VA,VB,VC,PC_INT_BND> {
  protected:
    using View<VA,VB,VC,PC_INT_BND>::iv;
    using View<VA,VB,VC,PC_INT_BND>::x0;
    using View<VA,VB,VC,PC_INT_BND>::x1;

    /// Constructor for cloning \a p
    ViewBnd(Space& home, bool share, ViewBnd& p);
    /// Constructor for creation
    ViewBnd(Home home, IdxViewArray<VA>& iv, VB x0, VC x1);
  public:
    /// Perform copying during cloning
    virtual Actor* copy(Space& home, bool share);
    /// Perform propagation
    virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
    /// Post propagator for \f$iv_{x_0}=x_1\f$
    static  ExecStatus post(Home home, IdxViewArray<VA>& iv, VB x0, VC x1);
  };

  /**
   * \brief Domain consistent element propagator for array of views
   *
   * The propagator uses staging: first it uses
   * bounds-propagation on the array of views and the uses
   * domain-propagation on the array of views.
   *
   * Requires \code #include <gecode/int/element.hh> \endcode
   * \ingroup FuncIntProp
   */
  template<class VA, class VB, class VC>
  class ViewDom : public View<VA,VB,VC,PC_INT_DOM> {
  protected:
    using View<VA,VB,VC,PC_INT_DOM>::iv;
    using View<VA,VB,VC,PC_INT_DOM>::x0;
    using View<VA,VB,VC,PC_INT_DOM>::x1;

    /// Constructor for cloning \a p
    ViewDom(Space& home, bool share, ViewDom& p);
    /// Constructor for creation
    ViewDom(Home home, IdxViewArray<VA>& iv, VB x0, VC x1);
  public:
    /// Perform copying during cloning
    virtual Actor* copy(Space& home, bool share);
    /**
     * \brief Cost function
     *
     * If in stage for bounds-propagation defined as low linear,
     * otherwise as high linear.
     *
     */
    virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
    /// Perform propagation
    virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
    /// Post propagator for \f$iv_{x_0}=x_1\f$
    static  ExecStatus post(Home home, IdxViewArray<VA>& iv,
                            VB x0, VC x1);
  };

  /**
   * \brief Domain consistent pair propagator
   *
   * Requires \code #include <gecode/int/element.hh> \endcode
   *
   * \ingroup FuncIntProp
   */
  class GECODE_VTABLE_EXPORT Pair
    : public TernaryPropagator<IntView,PC_INT_DOM> {
  protected:
    using TernaryPropagator<IntView,PC_INT_DOM>::x0;
    using TernaryPropagator<IntView,PC_INT_DOM>::x1;
    using TernaryPropagator<IntView,PC_INT_DOM>::x2;
    /// Width
    int w;
    /// Constructor for cloning \a p
    Pair(Space& home, bool share, Pair& p);
  public:
    /// Constructor for posting
    Pair(Home home, IntView x0, IntView x1, IntView x2, int w);
    /// Post propagator \f$x_0+x_1\cdot w=x_2\f$
    static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2,
                           int w, int h);
    /// Copy propagator during cloning
    GECODE_INT_EXPORT virtual Actor* copy(Space& home, bool share);
    /// Perform propagation
    GECODE_INT_EXPORT virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
  };

}}}

#include <gecode/int/element/int.hpp>
#include <gecode/int/element/view.hpp>
#include <gecode/int/element/pair.hpp>

#endif

// STATISTICS: int-prop


text:
package uk.gov.hmrc.ct.accounts.frs102.boxes

import uk.gov.hmrc.ct.box._

case class AC7900(value: Option[Boolean]) extends CtBoxIdentifier(name = "Enter Post balance sheet events note?")
  with CtOptionalBoolean
  with Input

redpajama_set_name: RedPajamaGithub


text:
namespace VEngine
{
    namespace Renderer
    {
        namespace Internal
        {
            class VulkanDevice;
            class VulkanCommandBuffer;
            class VulkanGraphicsPipeline;
        }
        class SemaphoreInterface;
        class SemaphoreFactoryInterface;
        class ShaderModuleInterface;
        class DescriptorSetLayoutInterface;

        class VulkanComputeStage : public ComputeStageInterface
        {
        public:
            VulkanComputeStage(Internal::VulkanDevice * device,
                SemaphoreFactoryInterface* semaphoreFactory,
                ShaderModuleInterface* shader,
                std::vector<DescriptorSetLayoutInterface*> layouts);
            ~VulkanComputeStage();

            virtual void beginRecording() override;
            virtual void endRecording() override;
            virtual void dispatch(std::vector<DescriptorSetInterface*> sets, uint32_t groupX, uint32_t groupY, uint32_t groupZ) override;

            virtual void submit(std::vector<SemaphoreInterface*> waitSemaphores) override;
            virtual void submitNoSemaphores(std::vector<SemaphoreInterface*> waitSemaphores) override;
            virtual SemaphoreInterface* getSignalSemaphore() override;
        private:

            Internal::VulkanDevice * device;
            SemaphoreInterface* signalSemaphore;
            SemaphoreFactoryInterface* semaphoreFactory;
            Internal::VulkanCommandBuffer* commandBuffer;
            Internal::VulkanGraphicsPipeline* pipeline;

            std::vector<DescriptorSetLayoutInterface*> setLayouts;
            ShaderModuleInterface* shader;
            bool compiled = false;
            void compile();
        };

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="50dp">

    <TextView
        android:id="@+id/tvContent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:background="@drawable/rounded_corner"
        android:ellipsize="end"
        android:singleLine="true"
        android:text=""
        android:textColor="@android:color/white"
        android:textSize="22sp" />

</RelativeLayout>


text:
package com.mossle.bpm.cmd;

import com.mossle.spi.process.FirstTaskForm;

import org.activiti.engine.delegate.Expression;
import org.activiti.engine.impl.bpmn.parser.BpmnParse;
import org.activiti.engine.impl.context.Context;
import org.activiti.engine.impl.form.DefaultFormHandler;
import org.activiti.engine.impl.interceptor.Command;
import org.activiti.engine.impl.interceptor.CommandContext;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.activiti.engine.impl.pvm.PvmActivity;
import org.activiti.engine.impl.pvm.PvmTransition;
import org.activiti.engine.impl.pvm.process.ActivityImpl;
import org.activiti.engine.impl.task.TaskDefinition;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class FindFirstTaskFormCmd implements Command<FirstTaskForm> {
    private static Logger logger = LoggerFactory
            .getLogger(FindFirstTaskFormCmd.class);
    private String processDefinitionId;

    public FindFirstTaskFormCmd(String processDefinitionId) {
        this.processDefinitionId = processDefinitionId;
    }

    public FirstTaskForm execute(CommandContext commandContext) {
        ProcessDefinitionEntity processDefinitionEntity = Context
                .getProcessEngineConfiguration().getDeploymentManager()
                .findDeployedProcessDefinitionById(processDefinitionId);

        if (processDefinitionEntity == null) {
            throw new IllegalArgumentException(
                    "cannot find processDefinition : " + processDefinitionId);
        }

        if (processDefinitionEntity.hasStartFormKey()) {
            return this.findStartEventForm(processDefinitionEntity);
        }

        ActivityImpl startActivity = processDefinitionEntity.getInitial();

        if (startActivity.getOutgoingTransitions().size() != 1) {
            throw new IllegalStateException(
                    "start activity outgoing transitions cannot more than 1, now is : "
                            + startActivity.getOutgoingTransitions().size());
        }

        PvmTransition pvmTransition = startActivity.getOutgoingTransitions()
                .get(0);
        PvmActivity targetActivity = pvmTransition.getDestination();

        if (!"userTask".equals(targetActivity.getProperty("type"))) {
            logger.info("first activity is not userTask, just skip");

            return new FirstTaskForm();
        }

        FirstTaskForm firstTaskForm = new FirstTaskForm();
        firstTaskForm.setProcessDefinitionId(processDefinitionId);
        firstTaskForm.setExists(true);
        firstTaskForm.setTaskForm(true);

        String taskDefinitionKey = targetActivity.getId();
        logger.debug("activityId : {}", targetActivity.getId());
        firstTaskForm.setActivityId(taskDefinitionKey);

        TaskDefinition taskDefinition = processDefinitionEntity
                .getTaskDefinitions().get(taskDefinitionKey);

        Expression expression = taskDefinition.getAssigneeExpression();

        if (expression != null) {
            String expressionText = expression.getExpressionText();
            logger.debug("{}", expressionText);
            logger.debug("{}", startActivity.getProperties());
            logger.debug("{}", processDefinitionEntity.getProperties());
            firstTaskForm.setAssignee(expressionText);
        } else {
            logger.info("cannot find expression : {}, {}", processDefinitionId,
                    taskDefinitionKey);
        }

        String initiatorVariableName = (String) processDefinitionEntity
                .getProperty(BpmnParse.PROPERTYNAME_INITIATOR_VARIABLE_NAME);
        firstTaskForm.setInitiatorName(initiatorVariableName);

        DefaultFormHandler formHandler = (DefaultFormHandler) taskDefinition
                .getTaskFormHandler();

        if (formHandler.getFormKey() != null) {
            String formKey = formHandler.getFormKey().getExpressionText();
            firstTaskForm.setFormKey(formKey);
        } else {
            logger.info("cannot formKey : {}, {}", processDefinitionId,
                    taskDefinitionKey);
        }

        return firstTaskForm;
    }

    public FirstTaskForm findStartEventForm(
            ProcessDefinitionEntity processDefinitionEntity) {
        FirstTaskForm firstTaskForm = new FirstTaskForm();
        firstTaskForm.setExists(true);
        firstTaskForm.setProcessDefinitionId(processDefinitionId);
        firstTaskForm.setTaskForm(false);

        DefaultFormHandler formHandler = (DefaultFormHandler) processDefinitionEntity
                .getStartFormHandler();

        if (formHandler.getFormKey() != null) {
            String formKey = formHandler.getFormKey().getExpressionText();
            firstTaskForm.setFormKey(formKey);
            firstTaskForm.setActivityId(processDefinitionEntity.getInitial()
                    .getId());
        }

        return firstTaskForm;
    }
}


text:
namespace falcon {

template <typename T>
class dimension
{
	template<bool, typename U = T>
	struct dimension_child
	{ static const std::size_t value = 0; };

	template<typename U>
	struct dimension_child<true, U>
	{
		static const std::size_t value = 1
      + dimension<typename range_access_subtype<T>::type>::value;
	};

public:
	static const std::size_t value
    = dimension_child<is_iterable<T>::value>::value;
};

}

#endif


text:
#include <aws/discovery/model/ImportStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>

using namespace Aws::Utils;

namespace Aws
{
  namespace ApplicationDiscoveryService
  {
    namespace Model
    {
      namespace ImportStatusMapper
      {

        static const int IMPORT_IN_PROGRESS_HASH = HashingUtils::HashString("IMPORT_IN_PROGRESS");
        static const int IMPORT_COMPLETE_HASH = HashingUtils::HashString("IMPORT_COMPLETE");
        static const int IMPORT_COMPLETE_WITH_ERRORS_HASH = HashingUtils::HashString("IMPORT_COMPLETE_WITH_ERRORS");
        static const int IMPORT_FAILED_HASH = HashingUtils::HashString("IMPORT_FAILED");
        static const int IMPORT_FAILED_SERVER_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("IMPORT_FAILED_SERVER_LIMIT_EXCEEDED");
        static const int IMPORT_FAILED_RECORD_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("IMPORT_FAILED_RECORD_LIMIT_EXCEEDED");
        static const int DELETE_IN_PROGRESS_HASH = HashingUtils::HashString("DELETE_IN_PROGRESS");
        static const int DELETE_COMPLETE_HASH = HashingUtils::HashString("DELETE_COMPLETE");
        static const int DELETE_FAILED_HASH = HashingUtils::HashString("DELETE_FAILED");
        static const int DELETE_FAILED_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("DELETE_FAILED_LIMIT_EXCEEDED");
        static const int INTERNAL_ERROR_HASH = HashingUtils::HashString("INTERNAL_ERROR");

        ImportStatus GetImportStatusForName(const Aws::String& name)
        {
          int hashCode = HashingUtils::HashString(name.c_str());
          if (hashCode == IMPORT_IN_PROGRESS_HASH)
          {
            return ImportStatus::IMPORT_IN_PROGRESS;
          }
          else if (hashCode == IMPORT_COMPLETE_HASH)
          {
            return ImportStatus::IMPORT_COMPLETE;
          }
          else if (hashCode == IMPORT_COMPLETE_WITH_ERRORS_HASH)
          {
            return ImportStatus::IMPORT_COMPLETE_WITH_ERRORS;
          }
          else if (hashCode == IMPORT_FAILED_HASH)
          {
            return ImportStatus::IMPORT_FAILED;
          }
          else if (hashCode == IMPORT_FAILED_SERVER_LIMIT_EXCEEDED_HASH)
          {
            return ImportStatus::IMPORT_FAILED_SERVER_LIMIT_EXCEEDED;
          }
          else if (hashCode == IMPORT_FAILED_RECORD_LIMIT_EXCEEDED_HASH)
          {
            return ImportStatus::IMPORT_FAILED_RECORD_LIMIT_EXCEEDED;
          }
          else if (hashCode == DELETE_IN_PROGRESS_HASH)
          {
            return ImportStatus::DELETE_IN_PROGRESS;
          }
          else if (hashCode == DELETE_COMPLETE_HASH)
          {
            return ImportStatus::DELETE_COMPLETE;
          }
          else if (hashCode == DELETE_FAILED_HASH)
          {
            return ImportStatus::DELETE_FAILED;
          }
          else if (hashCode == DELETE_FAILED_LIMIT_EXCEEDED_HASH)
          {
            return ImportStatus::DELETE_FAILED_LIMIT_EXCEEDED;
          }
          else if (hashCode == INTERNAL_ERROR_HASH)
          {
            return ImportStatus::INTERNAL_ERROR;
          }
          EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
          if(overflowContainer)
          {
            overflowContainer->StoreOverflow(hashCode, name);
            return static_cast<ImportStatus>(hashCode);
          }

          return ImportStatus::NOT_SET;
        }

        Aws::String GetNameForImportStatus(ImportStatus enumValue)
        {
          switch(enumValue)
          {
          case ImportStatus::IMPORT_IN_PROGRESS:
            return "IMPORT_IN_PROGRESS";
          case ImportStatus::IMPORT_COMPLETE:
            return "IMPORT_COMPLETE";
          case ImportStatus::IMPORT_COMPLETE_WITH_ERRORS:
            return "IMPORT_COMPLETE_WITH_ERRORS";
          case ImportStatus::IMPORT_FAILED:
            return "IMPORT_FAILED";
          case ImportStatus::IMPORT_FAILED_SERVER_LIMIT_EXCEEDED:
            return "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED";
          case ImportStatus::IMPORT_FAILED_RECORD_LIMIT_EXCEEDED:
            return "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED";
          case ImportStatus::DELETE_IN_PROGRESS:
            return "DELETE_IN_PROGRESS";
          case ImportStatus::DELETE_COMPLETE:
            return "DELETE_COMPLETE";
          case ImportStatus::DELETE_FAILED:
            return "DELETE_FAILED";
          case ImportStatus::DELETE_FAILED_LIMIT_EXCEEDED:
            return "DELETE_FAILED_LIMIT_EXCEEDED";
          case ImportStatus::INTERNAL_ERROR:
            return "INTERNAL_ERROR";
          default:
            EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
            if(overflowContainer)
            {
              return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
            }

            return {};
          }
        }

      } // namespace ImportStatusMapper
    } // namespace Model
  } // namespace ApplicationDiscoveryService
} // namespace Aws


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <dimen name="smallest">4dp</dimen>
    <dimen name="small">8dp</dimen>
    <dimen name="normal">16dp</dimen>
    <dimen name="large">24dp</dimen>
    <dimen name="larger">32dp</dimen>

    <dimen name="card_type_icon_size">40dp</dimen>
    <dimen name="holder_height">72dp</dimen>
    <dimen name="debt_height">72dp</dimen>
    <dimen name="circle_size">40dp</dimen>
    <dimen name="normal_elevation">8dp</dimen>
    <dimen name="small_elevation">4dp</dimen>
    <dimen name="dialog_corners">2dp</dimen>
    <dimen name="card_corners">4dp</dimen>

    <dimen name="title_offset">72dp</dimen>
    <dimen name="zero_offset">0dp</dimen>
    <dimen name="list_divider_size">1dp</dimen>

</resources>


text:
<!DOCTYPE html>
<html>
	<head>
		<title>SC - Custom</title>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="dist/soundcloud-widget.css">
        <style>
            body {
                margin: 0
            }
        </style>
	</head>
	<body>
        <div class="player">
        </div>
        <script src='bower_components/fastclick/lib/fastclick.js'></script>
		<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
        <script src="dist/soundcloud-widget.js"></script>
        <script>
            $( document ).ready(function() {

                FastClick.attach(document.body);

                $('.player').soundcloud({
                    key: 'htuiRd1JP11Ww0X72T1C3g',
                    playlists: [
                        'https://soundcloud.com/tobiasvanschneider/sets/fade',
                        'https://soundcloud.com/mattb0t/sets/chillhouse',
                        'https://soundcloud.com/mattb0t/sets/futrmsic',
                        'https://soundcloud.com/alexboogie/sets/comme-de-fuk-down-v1-nov12',
                        'https://soundcloud.com/alexboogie/sets/m-xt-pe5',
                        'https://soundcloud.com/alexboogie/sets/perpetual'
                    ],
                    autoplay: true,
                    serverSideScript: 'https://mtag.io/curl'
                });

            });
        </script>
	</body>
</html>


text:
--  -------------------------------------------
--  Generated by Enterprise Architect Ver. 4.01
--  Created On : Monday, 18 September, 2006
--  DBMS       : Oracle
--  -------------------------------------------

DROP TABLE ACTIVITY_SUMMARY CASCADE CONSTRAINTS;

CREATE TABLE ACTIVITY_SUMMARY (
	ID NUMBER(8) NOT NULL,
	LOCAL_DATE DATE,
	SUMMARY_DATE DATE,
	LOCAL_CHARACTERIZATION VARCHAR2(100),
	SUMMARY_CHARACTERIZATION VARCHAR2(100)
)
;

ALTER TABLE ACTIVITY_SUMMARY ADD CONSTRAINT PK_ACTIVITY_SUMMARY
PRIMARY KEY (ID)
;

-- ALTER TABLE ACTIVITY_SUMMARY ADD CONSTRAINT FK_ACTIVITY_SUMMARY_DIAGNOSIS
-- FOREIGN KEY (ID) REFERENCES DIAGNOSIS (ID);


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

  <link rel="stylesheet" href="../../node_modules/qunit/qunit/qunit.css" type="text/css" media="screen" />

QUnit example


text:
(function () {
    let fetchTechs = function () {
        "use strict";

        const typeMap = {
            "building":"building",
            "research":"science"
        };

        let captions = document.querySelectorAll('.BldClsRow'),
            params = new URLSearchParams(document.location.search.substring(1)),
            levels = {},
            output = {
                "type":typeMap[params.get('cmd')],
                "levels":{}
            };

        for (let i = 0, j = captions.length; i < j; i++) {
            let matches = captions[i].innerHTML.match(/\((\w+) - (?:Forschungsstufe|Ausbaustufe) (\d+)\)/);
            if (matches) {
                levels[matches[1]] = parseInt(matches[2]);
            }
        }

        let levelKeys = Object.keys(levels);

        levelKeys.sort();

        for (let k = 0, l = levelKeys.length; k < l; k++) {
            output.levels[levelKeys[k]] = levels[levelKeys[k]];
        }

        return output;
    },
    fetchSelectedPlanetName = function () {
        "use strict";
        let planetBox = document.querySelector('.PlanetSelectBox'),
            options = planetBox.querySelectorAll('option');

        return options[planetBox.selectedIndex].firstChild.nodeValue;
    };

    chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
        let result;

        if ('get-techs' === message.command) {
            result = fetchTechs();
        }

        if ('get-selected-planet' === message.command) {
            result = fetchSelectedPlanetName();
        }

        sendResponse(result);
    });
})();


text:
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.9.1">
  <compounddef id="class_sensor_actuator_module" kind="class" language="C++" prot="public" abstract="yes">
    <compoundname>SensorActuatorModule</compoundname>
    <derivedcompoundref refid="class_actuator_relay" prot="private" virt="non-virtual">ActuatorRelay</derivedcompoundref>
    <derivedcompoundref refid="class_sensor_contact_switch" prot="private" virt="non-virtual">SensorContactSwitch</derivedcompoundref>
    <derivedcompoundref refid="class_sensor_dfr01610300" prot="private" virt="non-virtual">SensorDfr01610300</derivedcompoundref>
    <derivedcompoundref refid="class_sensor_dht22" prot="private" virt="non-virtual">SensorDht22</derivedcompoundref>
    <derivedcompoundref refid="class_sensor_gc0011" prot="private" virt="non-virtual">SensorGc0011</derivedcompoundref>
    <derivedcompoundref refid="class_sensor_tsl2561" prot="private" virt="non-virtual">SensorTsl2561</derivedcompoundref>
    <includes refid="module__handler_8h" local="no">module_handler.h</includes>
      <sectiondef kind="public-func">
      <memberdef kind="function" id="class_sensor_actuator_module_1a453094bcf7c7a2fdb2a14f65bf18bff9" prot="public" static="no" const="no" explicit="no" inline="no" virt="pure-virtual">
        <type>void</type>
        <definition>virtual void SensorActuatorModule::begin</definition>
        <argsstring>(void)=0</argsstring>
        <name>begin</name>
        <reimplementedby refid="class_sensor_contact_switch_1a037d866b1e40776cc6fa00a46169b150">begin</reimplementedby>
        <reimplementedby refid="class_sensor_gc0011_1a661743d47448c6b9c965fd8e1f123fbc">begin</reimplementedby>
        <reimplementedby refid="class_sensor_dht22_1ae4de2976d82d060c9dc12bf84195a347">begin</reimplementedby>
        <reimplementedby refid="class_actuator_relay_1abd921e88bb8fcecfbd5e1213e1faad56">begin</reimplementedby>
        <reimplementedby refid="class_sensor_dfr01610300_1a456221ff4728d8985c8e980d4f22b692">begin</reimplementedby>
        <reimplementedby refid="class_sensor_tsl2561_1ace17c892222366185df021bda708cc10">begin</reimplementedby>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
<para>Called once at beginning of program to initialize modules. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/jakerye/projects/gro-microcontroller/src/module_handler.h" line="40" column="1"/>
      </memberdef>
      <memberdef kind="function" id="class_sensor_actuator_module_1a55ce31fe50fc64f90602f3f70c5dc1af" prot="public" static="no" const="no" explicit="no" inline="no" virt="pure-virtual">
        <type>String</type>
        <definition>virtual String SensorActuatorModule::get</definition>
        <argsstring>(void)=0</argsstring>
        <name>get</name>
        <reimplementedby refid="class_sensor_contact_switch_1a99a5906b45ed441eea56fb2960d35191">get</reimplementedby>
        <reimplementedby refid="class_sensor_gc0011_1a2920401f54e121bba1398d52e9b2c90a">get</reimplementedby>
        <reimplementedby refid="class_sensor_dht22_1ad939eefeb967eea7029d9505cc6aad6f">get</reimplementedby>
        <reimplementedby refid="class_actuator_relay_1affbcfa491c42a0aae3d69450cf7295b1">get</reimplementedby>
        <reimplementedby refid="class_sensor_dfr01610300_1a21bbd0f8ee7e6576eabd9acf0e1e4d89">get</reimplementedby>
        <reimplementedby refid="class_sensor_tsl2561_1a1d9dff52af755218abca50f9025f0f5c">get</reimplementedby>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
<para>Called once per loop iteration to update and report module data to controller. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/jakerye/projects/gro-microcontroller/src/module_handler.h" line="45" column="1"/>
      </memberdef>
      <memberdef kind="function" id="class_sensor_actuator_module_1adf93ff40fbdfeecbb8711ea0626fe6fc" prot="public" static="no" const="no" explicit="no" inline="no" virt="pure-virtual">
        <type>String</type>
        <definition>virtual String SensorActuatorModule::set</definition>
        <argsstring>(String instruction_code, int instruction_id, String instruction_parameter)=0</argsstring>
        <name>set</name>
        <reimplementedby refid="class_sensor_contact_switch_1ab49acd5d6132eed50d7342717649abc2">set</reimplementedby>
        <reimplementedby refid="class_sensor_gc0011_1a658b7856221577342b54e4dc7fe06d2a">set</reimplementedby>
        <reimplementedby refid="class_sensor_dht22_1a177a42edbc33d5cf4fa0c4c38dc0047c">set</reimplementedby>
        <reimplementedby refid="class_actuator_relay_1a29995263e5a05a3fdff0761cb4730306">set</reimplementedby>
        <reimplementedby refid="class_sensor_dfr01610300_1ab675c2708ff9d5d0d9bbe10bab3d97e8">set</reimplementedby>
        <reimplementedby refid="class_sensor_tsl2561_1ab4eb3d8197c96867f43857876df46b33">set</reimplementedby>
        <param>
          <type>String</type>
          <declname>instruction_code</declname>
        </param>
        <param>
          <type>int</type>
          <declname>instruction_id</declname>
        </param>
        <param>
          <type>String</type>
          <declname>instruction_parameter</declname>
        </param>
        <briefdescription>
<para>Called once per loop iteration to update module state. If response is generated from updating, reports response to controller. </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/jakerye/projects/gro-microcontroller/src/module_handler.h" line="51" column="1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
<para>Abstract class used as the interface for all Sensor Actuator Modules. </para>    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <inheritancegraph>
      <node id="13">
        ActuatorRelay
        <link refid="class_actuator_relay"/>
        <childnode refid="12" relation="private-inheritance">
        </childnode>
      </node>
      <node id="18">
        SensorTsl2561
        <link refid="class_sensor_tsl2561"/>
        <childnode refid="12" relation="private-inheritance">
        </childnode>
      </node>
      <node id="12">
        SensorActuatorModule
        <link refid="class_sensor_actuator_module"/>
      </node>
      <node id="14">
        SensorContactSwitch
        <link refid="class_sensor_contact_switch"/>
        <childnode refid="12" relation="private-inheritance">
        </childnode>
      </node>
      <node id="17">
        SensorGc0011
        <link refid="class_sensor_gc0011"/>
        <childnode refid="12" relation="private-inheritance">
        </childnode>
      </node>
      <node id="15">
        SensorDfr01610300
        <link refid="class_sensor_dfr01610300"/>
        <childnode refid="12" relation="private-inheritance">
        </childnode>
      </node>
      <node id="16">
        SensorDht22
        <link refid="class_sensor_dht22"/>
        <childnode refid="12" relation="private-inheritance">
        </childnode>
      </node>
    </inheritancegraph>
    <location file="/Users/jakerye/projects/gro-microcontroller/src/module_handler.h" line="35" column="1" bodyfile="/Users/jakerye/projects/gro-microcontroller/src/module_handler.h" bodystart="35" bodyend="52"/>
    <listofallmembers>
      <member refid="class_sensor_actuator_module_1a453094bcf7c7a2fdb2a14f65bf18bff9" prot="public" virt="pure-virtual"><scope>SensorActuatorModule</scope><name>begin</name></member>
      <member refid="class_sensor_actuator_module_1a55ce31fe50fc64f90602f3f70c5dc1af" prot="public" virt="pure-virtual"><scope>SensorActuatorModule</scope><name>get</name></member>
      <member refid="class_sensor_actuator_module_1adf93ff40fbdfeecbb8711ea0626fe6fc" prot="public" virt="pure-virtual"><scope>SensorActuatorModule</scope><name>set</name></member>
    </listofallmembers>
  </compounddef>
</doxygen>


text:
<?php

namespace Symfogames\GameBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class SymfogamesGameBundle extends Bundle
{
}


text:
package com.sissi.pipeline.out;

import java.util.HashSet;
import java.util.Set;

import com.sissi.context.JID;
import com.sissi.context.JIDBuilder;
import com.sissi.context.JIDContext;
import com.sissi.pipeline.Output;
import com.sissi.pipeline.OutputBuilder;
import com.sissi.protocol.Element;
import com.sissi.protocol.iq.IQ;
import com.sissi.protocol.message.Message;
import com.sissi.protocol.presence.Presence;
import com.sissi.ucenter.block.BlockContext;

/**
 * 黑名单策略
 *
 * @author kim 2013年12月9日
 */
abstract class BlockOutputBuilder implements OutputBuilder {

	private final Set<Class<? extends Element>> blockSupports = new HashSet<Class<? extends Element>>();

	private final BlockContext context;

	protected final JIDBuilder jidBuilder;

	public BlockOutputBuilder(BlockContext context, JIDBuilder jidBuilder) {
		super();
		this.context = context;
		this.jidBuilder = jidBuilder;
		this.blockSupports.add(Presence.class);
		this.blockSupports.add(Message.class);
		this.blockSupports.add(IQ.class);
	}

	abstract protected class BlockOutput implements Output {

		@Override
		public boolean output(JIDContext context, Element node) {
			JID applicant = this.applicant(context.jid(), node);
			if (this.isEmpty(context.jid(), applicant) || !BlockOutputBuilder.this.blockSupports.contains(node.getClass())) {
				return true;
			}
			return !BlockOutputBuilder.this.context.isBlock(this.verifier(context.jid(), node), applicant);
		}

		/**
		 * 请求者
		 *
		 * @param current
		 * @param node
		 * @return
		 */
		abstract protected JID applicant(JID current, Element node);

		/**
		 * 校验者
		 *
		 * @param current
		 * @param node
		 * @return
		 */
		abstract protected JID verifier(JID current, Element node);

		private boolean isEmpty(JID jid) {
			return (jid == null || jid.user() == null);
		}

		private boolean isEmpty(JID user, JID contact) {
			return this.isEmpty(user) || this.isEmpty(contact);
		}

		@Override
		public Output close() {
			return this;
		}
	}
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports["default"] = undefined;

var _defineProperty2 = require('babel-runtime/helpers/defineProperty');

var _defineProperty3 = _interopRequireDefault(_defineProperty2);

var _extends2 = require('babel-runtime/helpers/extends');

var _extends3 = _interopRequireDefault(_extends2);

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _PureRenderMixin = require('rc-util/lib/PureRenderMixin');

var _PureRenderMixin2 = _interopRequireDefault(_PureRenderMixin);

var _row = require('../row');

var _row2 = _interopRequireDefault(_row);

var _col = require('../col');

var _col2 = _interopRequireDefault(_col);

var _constants = require('./constants');

var _warning = require('../_util/warning');

var _warning2 = _interopRequireDefault(_warning);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var FormItem = function (_React$Component) {
    (0, _inherits3["default"])(FormItem, _React$Component);

    function FormItem() {
        (0, _classCallCheck3["default"])(this, FormItem);
        return (0, _possibleConstructorReturn3["default"])(this, _React$Component.apply(this, arguments));
    }

    FormItem.prototype.componentDidMount = function componentDidMount() {
        (0, _warning2["default"])(this.getControls(this.props.children, true).length <= 1, '`Form.Item` cannot generate `validateStatus` and `help` automatically, ' + 'while there are more than one `getFieldDecorator` in it.');
    };

    FormItem.prototype.shouldComponentUpdate = function shouldComponentUpdate() {
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
        }

        return _PureRenderMixin2["default"].shouldComponentUpdate.apply(this, args);
    };

    FormItem.prototype.getHelpMsg = function getHelpMsg() {
        var context = this.context;
        var props = this.props;
        if (props.help === undefined && context.form) {
            return this.getId() ? (context.form.getFieldError(this.getId()) || []).join(', ') : '';
        }
        return props.help;
    };

    FormItem.prototype.getControls = function getControls(children, recursively) {
        var controls = [];
        var childrenArray = _react2["default"].Children.toArray(children);
        for (var i = 0; i < childrenArray.length; i++) {
            if (!recursively && controls.length > 0) {
                break;
            }
            var child = childrenArray[i];
            if (child.type === FormItem) {
                continue;
            }
            if (!child.props) {
                continue;
            }
            if (_constants.FIELD_META_PROP in child.props) {
                controls.push(child);
            } else if (child.props.children) {
                controls = controls.concat(this.getControls(child.props.children, recursively));
            }
        }
        return controls;
    };

    FormItem.prototype.getOnlyControl = function getOnlyControl() {
        var child = this.getControls(this.props.children, false)[0];
        return child !== undefined ? child : null;
    };

    FormItem.prototype.getChildProp = function getChildProp(prop) {
        var child = this.getOnlyControl();
        return child && child.props && child.props[prop];
    };

    FormItem.prototype.getId = function getId() {
        return this.getChildProp('id');
    };

    FormItem.prototype.getMeta = function getMeta() {
        return this.getChildProp(_constants.FIELD_META_PROP);
    };

    FormItem.prototype.renderHelp = function renderHelp() {
        var prefixCls = this.props.prefixCls;
        var help = this.getHelpMsg();
        return help ? _react2["default"].createElement(
            'div',
            { className: prefixCls + '-explain', key: 'help' },
            help
        ) : null;
    };

    FormItem.prototype.renderExtra = function renderExtra() {
        var _props = this.props,
            prefixCls = _props.prefixCls,
            extra = _props.extra;

        return extra ? _react2["default"].createElement(
            'div',
            { className: prefixCls + '-extra' },
            extra
        ) : null;
    };

    FormItem.prototype.getValidateStatus = function getValidateStatus() {
        var _context$form = this.context.form,
            isFieldValidating = _context$form.isFieldValidating,
            getFieldError = _context$form.getFieldError,
            getFieldValue = _context$form.getFieldValue;

        var fieldId = this.getId();
        if (!fieldId) {
            return '';
        }
        if (isFieldValidating(fieldId)) {
            return 'validating';
        }
        if (!!getFieldError(fieldId)) {
            return 'error';
        }
        var fieldValue = getFieldValue(fieldId);
        if (fieldValue !== undefined && fieldValue !== null && fieldValue !== '') {
            return 'success';
        }
        return '';
    };

    FormItem.prototype.renderValidateWrapper = function renderValidateWrapper(c1, c2, c3) {
        var classes = '';
        var form = this.context.form;
        var props = this.props;
        var validateStatus = props.validateStatus === undefined && form ? this.getValidateStatus() : props.validateStatus;
        if (validateStatus) {
            classes = (0, _classnames2["default"])({
                'has-feedback': props.hasFeedback,
                'has-success': validateStatus === 'success',
                'has-warning': validateStatus === 'warning',
                'has-error': validateStatus === 'error',
                'is-validating': validateStatus === 'validating'
            });
        }
        return _react2["default"].createElement(
            'div',
            { className: this.props.prefixCls + '-item-control ' + classes },
            c1,
            c2,
            c3
        );
    };

    FormItem.prototype.renderWrapper = function renderWrapper(children) {
        var wrapperCol = this.props.wrapperCol;
        return _react2["default"].createElement(
            _col2["default"],
            (0, _extends3["default"])({}, wrapperCol, { key: 'wrapper' }),
            children
        );
    };

    FormItem.prototype.isRequired = function isRequired() {
        if (this.context.form) {
            var meta = this.getMeta() || {};
            var validate = meta.validate || [];
            return validate.filter(function (item) {
                return !!item.rules;
            }).some(function (item) {
                return item.rules.some(function (rule) {
                    return rule.required;
                });
            });
        }
        return false;
    };

    FormItem.prototype.renderLabel = function renderLabel() {
        var props = this.props;
        var labelCol = props.labelCol;
        var required = props.required === undefined ? this.isRequired() : props.required;
        var className = (0, _classnames2["default"])((0, _defineProperty3["default"])({}, props.prefixCls + '-item-required', required));
        // remove user input colon
        var label = props.label;
        if (typeof label === 'string' && label.trim() !== '') {
            label = props.label.replace(/[:|:]\s*$/, '');
        }
        return props.label ? _react2["default"].createElement(
            _col2["default"],
            (0, _extends3["default"])({}, labelCol, { key: 'label', className: props.prefixCls + '-item-label' }),
            _react2["default"].createElement(
                'label',
                { htmlFor: props.id || this.getId(), className: className },
                label
            )
        ) : null;
    };

    FormItem.prototype.renderChildren = function renderChildren() {
        var props = this.props;
        var children = _react2["default"].Children.map(props.children, function (child) {
            if (child && typeof child.type === 'function' && !child.props.size) {
                return _react2["default"].cloneElement(child, { size: 'large' });
            }
            return child;
        });
        return [this.renderLabel(), this.renderWrapper(this.renderValidateWrapper(children, this.renderHelp(), this.renderExtra()))];
    };

    FormItem.prototype.renderFormItem = function renderFormItem(children) {
        var _itemClassName;

        var props = this.props;
        var prefixCls = props.prefixCls;
        var style = props.style;
        var itemClassName = (_itemClassName = {}, (0, _defineProperty3["default"])(_itemClassName, prefixCls + '-item', true), (0, _defineProperty3["default"])(_itemClassName, prefixCls + '-item-with-help', !!this.getHelpMsg()), (0, _defineProperty3["default"])(_itemClassName, prefixCls + '-item-no-colon', !props.colon), (0, _defineProperty3["default"])(_itemClassName, '' + props.className, !!props.className), _itemClassName);
        return _react2["default"].createElement(
            _row2["default"],
            { className: (0, _classnames2["default"])(itemClassName), style: style },
            children
        );
    };

    FormItem.prototype.render = function render() {
        var children = this.renderChildren();
        return this.renderFormItem(children);
    };

    return FormItem;
}(_react2["default"].Component);

exports["default"] = FormItem;

FormItem.defaultProps = {
    hasFeedback: false,
    prefixCls: 'ant-form',
    colon: true
};
FormItem.propTypes = {
    prefixCls: _react2["default"].PropTypes.string,
    label: _react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.string, _react2["default"].PropTypes.node]),
    labelCol: _react2["default"].PropTypes.object,
    help: _react2["default"].PropTypes.oneOfType([_react2["default"].PropTypes.node, _react2["default"].PropTypes.bool]),
    validateStatus: _react2["default"].PropTypes.oneOf(['', 'success', 'warning', 'error', 'validating']),
    hasFeedback: _react2["default"].PropTypes.bool,
    wrapperCol: _react2["default"].PropTypes.object,
    className: _react2["default"].PropTypes.string,
    id: _react2["default"].PropTypes.string,
    children: _react2["default"].PropTypes.node,
    colon: _react2["default"].PropTypes.bool
};
FormItem.contextTypes = {
    form: _react2["default"].PropTypes.object
};
module.exports = exports['default'];


text: <highchart config="ctrl.histogram"></highchart>


text:
#ifndef __LINUX_ARISC_NOTIFIER_H__
#define __LINUX_ARISC_NOTIFIER_H__

#include <linux/notifier.h>

#define ARISC_INIT_READY  0x0001 /* arisc module init ready */

int  arisc_register_notifier(struct notifier_block *nb);
int  arisc_notify(unsigned long val, void *v);
void arisc_unregister_notifier(struct notifier_block *nb);

#endif /* __LINUX_ARISC_NOTIFIER_H__ */


text:
package org.knowm.xchange.exceptions;

/**
 *

 * Exception to provide the following to API:
 *

 *

 *
Indication that the exchange does not support the requested function or data

 *

 */
public class NotAvailableFromExchangeException extends UnsupportedOperationException {

  /**
   * Constructor
   *
   * @param message Message
   */
  private NotAvailableFromExchangeException(String message) {

    super(message);
  }

  /**
   * Constructor
   */
  public NotAvailableFromExchangeException() {

    this("Requested Information from Exchange is not available.");
  }

}


text:
set -xe

# We need to run Xvfb in the same shell script in which we
# will run ctest and the packaging script (which both use
# directorPython. That's because if we run Xvfb from a
# separate docker RUN command, it will get killed before we
# run the tests.
Xvfb :99 -ac -screen 0 1280x1024x16 &

ctest -j 1 --dashboard Experimental --track travis --output-on-failure

if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
	cd /root/distro/package
	./make_linux_package.sh 2>&1 > log.txt || cat log.txt
	  /root/distro/travis/copy_files.sh /root/distro/package/*.tar.gz
fi


text:
from json import dumps
from requests import ConnectionError
import requests_mock
from unittest.mock import MagicMock, Mock

from mindbot.command.search.urban import UrbanDictionaryCommand
from mindbot.router import CommandRouter
from .fixtures import fake_empty_urban, fake_urban

urban = UrbanDictionaryCommand(CommandRouter, 'horse', {})

def test_get_definition():
    with requests_mock.mock() as m:
        m.get('http://api.urbandictionary.com/v0/define?term=horse', text=dumps(fake_urban()))
        assert urban.get_definition() == fake_urban()['list']

def test_get_definition_connection_error():
    with requests_mock.mock() as m:
        m.get('http://api.urbandictionary.com/v0/define?term=horse', exc=ConnectionError)
        assert not urban.get_definition()

def test_get_definition_status_code_not_ok():
    with requests_mock.mock() as m:
        m.get(requests_mock.ANY, text='Not found', status_code=404)
        assert not urban.get_definition()

def test_call_with_query():
    urban.send_telegram_message = MagicMock()
    urban.get_definition = MagicMock(return_value=fake_urban()['list'])
    urban()
    urban.send_telegram_message.assert_called_with(urban.URBAN_TEXT.format(
        definition=fake_urban()['list'][0]))

def test_call_without_query():
    urban_empty = UrbanDictionaryCommand(CommandRouter, '', {})
    with requests_mock.mock() as m:
        m.get(requests_mock.ANY, text=dumps(fake_urban()))
        urban_empty.send_telegram_message = MagicMock()
        urban_empty.get_json = Mock(return_value=fake_urban())
        urban_empty()
        urban_empty.send_telegram_message.assert_called_with('Please specify query')

def test_call_without_definitions():
    urban.send_telegram_message = MagicMock()
    urban.get_definition = MagicMock(return_value=fake_empty_urban()['list'])
    urban()
    urban.send_telegram_message.assert_called_with('No definitions were found')


text:
* What is Box2D?
* The Physics Page
* General Tab
* Heaviness Tab
* Material Tab
* Damping Tab
* Advanced Tab
* Lightweight Actors
* Gotchas

## What is Box2D?

Stencyl uses an industry-standard physics engine (**Box2D**) in all its games. What's the benefit? You get realistic and accurate collisions for free, and Actors generally **behave like real-world objects**.

How realistic? Try out the following demo.

![Ragdoll Demo](https://static.stencyl.com/pedia2/ch3/ragdoll.png)

> **Note:** The rest of this article is a reference guide for an actor's Physics page. If you're skimming or are a first timer, read through these sections and skip the others for now. They are the most important!
> * General Tab
> * Lightweight Actors
> * Gotchas

## General Tab

#### What kind of Actor Type?
Determines whether the Actor can move or not.

* **Cannot Move**: The actor cannot move or be moved, thus, becoming stationary.
* **Cannot Be Pushed:** The actor can move but cannot be moved by another actor.
* **Normal:** The Actor can move on its own and be moved by other Actors.

> **Gotcha:** A "Cannot Be Pushed" actor will not collide with tiles. In Box2D speak, it's known as a Kinematic body. A clever way to simulate "Cannot Be Pushed" without its sideeffects is to assign a very high mass to an Actor.

#### Can Rotate?
Determines whether or not your actor can rotate. Rotation happens either naturally through physics, setting the turning speed or twisting it with some force.

> **Note:** Setting the direction (angle) of an actor can still be done, regardless of this setting. Tweening also ignores this setting.

#### Affected by Gravity?
Gravity is a constant force that affects all bodies within a scene. Gravity can be set to *any* direction and magnitude (strength) via the Physics page of a Scene. **Gravity does not necessarily have to point downwards**.

You can set an Actor to obey or ignore gravity.

> **Note:** The apparent "strength" of gravity is affected by an Actor's mass. The higher the Actor's mass, the slower it will fall. This is **not** how gravity works in real life but is a simple approximation by Box2D to simulate it.

## Heaviness Tab

#### Mass
How much your actor "weighs." The "heavier" you make an actor, the harder it will be for other objects to move it.

> **Tip:** Setting a very high mass can roughly simulate infinite mass / cannot be pushed, without the side-effects of that mode.

#### Angular Mass
Angular mass determines an actor's resistance to rotational forces. As such, the higher the number, the slower an actor will rotate when subjected to rotational forces (twisting).

> **Note:** Angular mass is only relevant if the Actor is set to "Can Rotate"

## Material Tab

#### Preset Materials
Materials are preset values that use different combinations of Friction and Bounciness to simulate the material listed.

Material | Friction | Bounciness
--- | --- | ---
Wood | 0.5 | 0.17
Metal | 0.13 | 0.17
Stone | 0.75 | 0.05
Plastic | 0.38 | 0.09
Rubber | 0.75 | 0.95
Dead Weight | 1 | 0
Super Ball | 1 | 0.95

#### Friction
Friction determines the "roughness" of the Actor's surface. A high friction will cause an Actor to slow down quicker when sliding. A low, or zero, friction will cause the Actor to glide far or never slow down at all.

In real-life high friction surfaces would include dirt and sandpaper. Low-friction surfaces could include ice and glass.

![Friction Demo](https://static.stencyl.com/pedia2/ch3/physics/demo3.png)

> **Demo Note:** In this demo, press left/right and lift your key off. Observe that one actor stops moving quickly (high friction) and the other keeps moving, as if he were on ice.

#### Bounciness
Setting bounciness to a value of 1.0 means an actor will bounce back to the same height it fell from, whereas a value of 0.0 means it won't bounce at all.

![Bounce Demo](https://static.stencyl.com/pedia2/ch3/physics/demo2.png)

> **Demo Note:** Demo Note: In this demo, the balls bounce differently depending on their bounciness. The one with bounciness = 1 bounces back to the same height.

#### How Friction / Bounciness Work
Friction and Bounciness **multiply** the values of the two colliding Actors to come up with the effective Friction or Bounciness. For example, if two actors have a friction of 0.5, their effective friction becomes 0.25.

This works out well for actors that have a friction or bounciness of 0 - as you'd expect, that negates everything and causes an effective friction/bounciness value of 0, too.

Terrain/Tiles have friction and bounciness values of 1, so they have no net effect whichever way.

## Damping Tab

Damping is a difficult topic to visualize. It's a form of resistance against motion or rotation that varies depending on how quickly the Actor is moving or rotating.

#### Linear Damping
Linear Damping is like wind or **air resistance**. It grows stronger as your Actor moves more quickly to the point where the Damping is so strong that the Actor is unable to move any faster. This is known as Terminal Velocity.

![Damping Demo](https://static.stencyl.com/pedia2/ch3/physics/demo4.png)

#### Angular Damping
**Angular Damping is the same idea, except applied to rotation**. It puts an effective cap on how fast an Actor can rotate and smooths out things if you find your Actor to rotate too quickly when subjected to twisting (angular forces).

## Advanced Tab

#### Disable Physics
Let you opt this Actor out of physics. We talk about this further in the [next section](https://www.stencyl.com/help/view/working-with-physics/#lightweight).

> **Note:** Collisions for this Actor will also cease to function when you do this.

#### Auto-Scale Collision Bounds
Choosing "Yes" for this option will automatically re-size your Actor's collision bounds when you resize the Actor using the "scale to" Tweening block. Choosing "No" means the collision bounds will stay the same regardless of what happens to the Actor.

![](https://static.stencyl.com/pedia2/ch3/physics/image00.png)

![Scale Bounds Demo](https://static.stencyl.com/pedia2/ch3/physics/demo1.png)

> **Demo Note:** Notice that the actor on the right remains at the same collision size.

#### Enable Continuous Collisions
Enable this setting to prevent this Actor, if it moves quickly enough, from penetrating through thin surfaces, like shown below. This setting is useful for small and quick actors, such as bullets, arrows and other weapons.

![CCD](https://static.stencyl.com/help/images/ContCollisionDetect3.png)

[Learn more](https://www.stencyl.com/help/view/continuous-collision-detection/) about Continuous Collisions.

#### Can be paused?
Opts an Actor in/out of the [Pausing](https://www.stencyl.com/help/view/pausing/) system.

## Lightweight Actors

**Lightweight Actors are actors that opt out of the physics system.**

The Lightweight Actors feature works well for games that **involve many actors** or require more precise motion and collision detection than Box2D allows. For example...

* Shoot 'Em ups
* Puzzle Games
* Pixel Perfect Platformers (like N)
* Point and Click Adventures

The Lightweight physics feature lets you **selectively opt an actor out of physics**. Even in regular games, this can prove to be useful for...

* User Interface Elements
* Particles
* HUDs

Bear in mind that when you turn off physics, the actor **no longer collides with anything**, can no longer be pushed and is generally barred from any physics-related features. Setting position and velocity will still work.

Going with lightweight actors can be a game-saving choice if done right, but you need to understand its limitations.

> **Note:** [Images](https://www.stencyl.com/help/view/image-api) are arguably a more powerful form of lightweight actor. They are more difficult to setup and have a different set of limitations, but they work particularly well for creating special effects and eye-candy.

## Gotchas

#### Snagging
Sometimes, an actor will get caught in the corner of a box and be unable to move further. In a similar scenario, a jumping actor who jumps right next to a wall versus a little bit off the wall will find his jump to be shorter.

![Snagging](https://static.stencyl.com/pedia2/ch3/physics/image02.png)

The reasons behind this are quite technical, but the workarounds are less so. The easiest workaround is to redo the actor's collision shape as...

* A circle.
* A box with its corners chopped off slightly or some other means to avoid the sharp 90 degree corners. We did this for a Mario-like platformer and made an **octagon**.

![](https://static.stencyl.com/pedia2/ch3/physics/image01.png)

#### My actors don't collide!
Several legitimate reasons for this.

* The two actors are set to "Cannot Move", "Cannot Be Pushed" or a combination of the two. This is just the way Box2D works and can catch you off guard.

* Did you make sure the actors aren't set as [Sensors](https://www.stencyl.com/help/view/collisions-and-groups/#sensors)?

![Sensors](https://static.stencyl.com/pedia2/ch3/collisions/image13.png)

* Did you make sure that the actors are from a pair of [Groups](https://www.stencyl.com/help/view/collisions-and-groups/#groups) that are to collide with each other?

![Groups](https://static.stencyl.com/pedia2/ch3/collisions/image14.png)

## Summary

* Through Box2D, Stencyl brings realistic physics to all games.
* Opt an Actor out of physics to improve performance for games with many actors or no need for physics.
* Box2D is powerful, but it can sometimes present challenges when you want your game to not operate like the real world.

## Challenge: Platforms!

**Create a simple game with moving platforms** inside of it, like you would find in any Mario game. It's trickier than it sounds at first!

What are some of the considerations?

* How do you prevent the platform from shifting when something steps on it?
* How will the character stay on the platform after stepping on it?
* If the platform is moving up and down, what happens if it moves too quickly downwards?
* How will you move the platforms? Setting position? Velocities? Forces?
* How do you ensure that the platform starts and ends at the same positions?

Start with a platform that moves up and down. Then, try one that moves left and right.


text:
export default {
  DATABASES_SETPAGE: 'DATABASES_SETPAGE',
  DATABASES_SET_PROMPT_VISIBLE: 'DATABASES_SET_PROMPT_VISIBLE',
  DATABASES_STARTLOADING: 'DATABASES_STARTLOADING',
  DATABASES_LOADCOMPLETE: 'DATABASES_LOADCOMPLETE',

  DATABASES_UPDATE: 'DATABASES_UPDATE'
};


text:
import { tblPaymentRequest } from './tblPaymentRequest';

/// <code-import> Place custom imports between <code-import> tags

/// </code-import>

export class tblPaymentNotification {

   /// <code> Place custom code between <code> tags

   /// </code>

   // Generated code. Do not place code below this line.
   PaymentNotificationID: number;
   PaymentRequestID: number;
   NotificationType: string;
   ReferenceNumber: string;
   PaymentDate: Date;
   PaymentAmount: number;
   PaymentStatus: string;
   BatchID: string;
   BatchDescription: string;
   NotificationTimeStamp: Date;
   tblPaymentRequest: tblPaymentRequest;
}


text:
layout: post
title: Indian trying to fist
titleinfo: pornvd
desc: Watch Indian trying to fist. Pornhub is the ultimate xxx porn and sex site.
---

Indian trying to fist

Watch Indian trying to fist. Pornhub is the ultimate xxx porn and sex site.


text:
function subl(){
  "C:\Users\giaco_000\st3\sublime_text.exe" "$1" &
}

#Open sumatra pdf
function pdf(){
  "C:\Users\giaco_000\sumatra\SumatraPDF.exe" "$1" &
}

# Refresh the bash commands
function refreshbash(){
  source /etc/profile
  source ~/.bash_profile
  source ~/.bashrc
  source ~/.bash_login
  source ~/.profile
}

# Open file explorer in the specified folder
function expl(){
  if [ -z "$1" ]
    then path="."
    else path=$1
  fi
  path=${path//\//\\}
  explorer $path
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Persoonia 20: 28 (2008)

#### Original name
Pseudocercospora assamensis Arzanlou & Crous

### Remarks
null


text:
/**
 * Used internally by the KeyCombo class.
 * Return `true` if it reached the end of the combo, `false` if not.
 *
 * @function Phaser.Input.Keyboard.KeyCombo.AdvanceKeyCombo
 * @since 3.0.0
 *
 * @param {KeyboardEvent} event - [description]
 * @param {Phaser.Input.Keyboard.KeyCombo} combo - [description]
 *
 * @return {boolean} `true` if it reached the end of the combo, `false` if not.
 */
var AdvanceKeyCombo = function (event, combo)
{
    combo.timeLastMatched = event.timeStamp;
    combo.index++;

    if (combo.index === combo.size)
    {
        return true;
    }
    else
    {
        combo.current = combo.keyCodes[combo.index];
        return false;
    }
};

module.exports = AdvanceKeyCombo;


text:
package local

import (
	"strings"

	"restic/errors"
)

// Config holds all information needed to open a local repository.
type Config struct {
	Path string
}

// ParseConfig parses a local backend config.
func ParseConfig(cfg string) (interface{}, error) {
	if !strings.HasPrefix(cfg, "local:") {
		return nil, errors.New(`invalid format, prefix "local" not found`)
	}

	return Config{Path: cfg[6:]}, nil
}


text:
bool deps_entry_t::to_path(const pal::string_t& base, bool look_in_base, pal::string_t* str) const
{
    pal::string_t& candidate = *str;

    candidate.clear();

    // Base directory must be present to obtain full path
    if (base.empty())
    {
        return false;
    }

    // Entry relative path contains '/' separator, sanitize it to use
    // platform separator. Perf: avoid extra copy if it matters.
    pal::string_t pal_relative_path = relative_path;
    if (_X('/') != DIR_SEPARATOR)
    {
        replace_char(&pal_relative_path, _X('/'), DIR_SEPARATOR);
    }

    // Reserve space for the path below
    candidate.reserve(base.length() +
        pal_relative_path.length() + 3);

    candidate.assign(base);
    pal::string_t sub_path = look_in_base ? get_filename(pal_relative_path) : pal_relative_path;
    append_path(&candidate, sub_path.c_str());

    bool exists = pal::file_exists(candidate);
    const pal::char_t* query_type = look_in_base ? _X("Local") : _X("Relative");
    if (!exists)
    {
        trace::verbose(_X("    %s path query did not exist %s"), query_type, candidate.c_str());
        candidate.clear();
    }
    else
    {
        trace::verbose(_X("    %s path query exists %s"), query_type, candidate.c_str());
    }
    return exists;
}

// -----------------------------------------------------------------------------
// Given a "base" directory, yield the local path of this file
//
// Parameters:
//    base - The base directory to look for the relative path of this entry
//    str  - If the method returns true, contains the file path for this deps
//           entry relative to the "base" directory
//
// Returns:
//    If the file exists in the path relative to the "base" directory.
//
bool deps_entry_t::to_dir_path(const pal::string_t& base, pal::string_t* str) const
{
    if (asset_type == asset_types::resources)
    {
        pal::string_t pal_relative_path = relative_path;
        if (_X('/') != DIR_SEPARATOR)
        {
            replace_char(&pal_relative_path, _X('/'), DIR_SEPARATOR);
        }

        // Resources are represented as "<ietf-code>/<ResourceAssemblyName.dll>" in the deps.json.
        // The <ietf-code> is the "directory" in the pal_relative_path below, so extract it.
        pal::string_t ietf_dir = get_directory(pal_relative_path);
        pal::string_t ietf = ietf_dir;

        // get_directory returns with DIR_SEPERATOR appended that we need to remove.
        auto sep_pos = ietf.find_last_of(DIR_SEPARATOR);
        if (sep_pos != pal::string_t::npos)
        {
            ietf = ietf.erase(sep_pos, pal::string_t::npos);
        }

        pal::string_t base_ietf_dir = base;
        append_path(&base_ietf_dir, ietf.c_str());
        trace::verbose(_X("Detected a resource asset, will query dir/ietf-tag/resource base: %s asset: %s"), base_ietf_dir.c_str(), asset_name.c_str());
        return to_path(base_ietf_dir, true, str);
    }
    return to_path(base, true, str);
}
// -----------------------------------------------------------------------------
// Given a "base" directory, yield the relative path of this file in the package
// layout.
//
// Parameters:
//    base - The base directory to look for the relative path of this entry
//    str  - If the method returns true, contains the file path for this deps
//           entry relative to the "base" directory
//
// Returns:
//    If the file exists in the path relative to the "base" directory.
//
bool deps_entry_t::to_rel_path(const pal::string_t& base, pal::string_t* str) const
{
    return to_path(base, false, str);
}

// -----------------------------------------------------------------------------
// Given a "base" directory, yield the relative path of this file in the package
// layout.
//
// Parameters:
//    base - The base directory to look for the relative path of this entry
//    str  - If the method returns true, contains the file path for this deps
//           entry relative to the "base" directory
//
// Returns:
//    If the file exists in the path relative to the "base" directory.
//
bool deps_entry_t::to_full_path(const pal::string_t& base, pal::string_t* str) const
{
    str->clear();

    // Base directory must be present to obtain full path
    if (base.empty())
    {
        return false;
    }

    pal::string_t new_base = base;

    if (library_path.empty())
    {
        append_path(&new_base, library_name.c_str());
        append_path(&new_base, library_version.c_str());
    }
    else
    {
        append_path(&new_base, library_path.c_str());
    }

    return to_rel_path(new_base, str);
}

// -----------------------------------------------------------------------------
// Given a "base" directory, yield the relative path of this file in the package
// layout if the entry hash matches the hash file in the "base" directory
//
// Parameters:
//    base - The base directory to look for the relative path of this entry and
//           the hash file.
//    str  - If the method returns true, contains the file path for this deps
//           entry relative to the "base" directory
//
// Description:
//    Looks for a file named "{PackageName}.{PackageVersion}.nupkg.{HashAlgorithm}"
//    If the deps entry's {HashAlgorithm}-{HashValue} matches the contents then
//    yields the relative path of this entry in the "base" dir.
//
// Returns:
//    If the file exists in the path relative to the "base" directory and there
//    was hash file match with this deps entry.
//
// See: to_full_path(base, str)
//
bool deps_entry_t::to_hash_matched_path(const pal::string_t& base, pal::string_t* str) const
{
    pal::string_t& candidate = *str;

    candidate.clear();

    // Base directory must be present to perform hash lookup.
    if (base.empty())
    {
        return false;
    }

    // First detect position of hyphen in [Algorithm]-[Hash] in the string.
    size_t pos = library_hash.find(_X("-"));
    if (pos == 0 || pos == pal::string_t::npos)
    {
        trace::verbose(_X("Invalid hash %s value for deps file entry: %s"), library_hash.c_str(), library_name.c_str());
        return false;
    }

    // Build the relative hash path (what is added to the package directory path).
    pal::string_t relative_hash_path;
    if (library_hash_path.empty())
    {
        // Reserve approx 8 char_t's for the algorithm name.
        relative_hash_path.reserve(library_name.length() + 1 + library_version.length() + 16);
        relative_hash_path.append(library_name);
        relative_hash_path.append(_X("."));
        relative_hash_path.append(library_version);
        relative_hash_path.append(_X(".nupkg."));
        relative_hash_path.append(library_hash.substr(0, pos));
    }
    else
    {
        relative_hash_path.assign(library_hash_path);
    }

    // Build the directory that contains the hash file.
    pal::string_t hash_file;
    if (library_path.empty())
    {
        hash_file.reserve(base.length() + 1 +
            library_name.length() + 1 + library_version.length() + 1 +
            relative_hash_path.length());
        hash_file.assign(base);

        append_path(&hash_file, library_name.c_str());
        append_path(&hash_file, library_version.c_str());
    }
    else
    {
        hash_file.reserve(base.length() + 1 +
            library_path.length() + 1 +
            relative_hash_path.length());
        hash_file.assign(base);

        append_path(&hash_file, library_path.c_str());
    }

    // Append the relative path to the hash file.
    append_path(&hash_file, relative_hash_path.c_str());

    // Read the contents of the hash file.
    pal::ifstream_t fstream(hash_file);
    if (!fstream.good())
    {
        trace::verbose(_X("The hash file is invalid [%s]"), hash_file.c_str());
        return false;
    }

    // Obtain the hash from the file.
    std::string hash;
    hash.assign(pal::istreambuf_iterator_t(fstream),
        pal::istreambuf_iterator_t());
    pal::string_t pal_hash;
    if (!pal::utf8_palstring(hash.c_str(), &pal_hash))
    {
        return false;
    }

    // Check if contents match deps entry.
    pal::string_t entry_hash = library_hash.substr(pos + 1);
    if (entry_hash != pal_hash)
    {
        trace::verbose(_X("The file hash [%s][%d] did not match entry hash [%s][%d]"),
            pal_hash.c_str(), pal_hash.length(), entry_hash.c_str(), entry_hash.length());
        return false;
    }

    // All good, just append the relative dir to base.
    return to_full_path(base, &candidate);
}


text:
package org.apache.airavata.registry.core.experiment.catalog.resources;

import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
import org.apache.airavata.registry.core.experiment.catalog.model.ProcessInput;
import org.apache.airavata.registry.core.experiment.catalog.model.ProcessInputPK;
import org.apache.airavata.registry.cpi.RegistryException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.persistence.EntityManager;
import java.util.List;

public class ProcessInputResource extends AbstractExpCatResource {
    private static final Logger logger = LoggerFactory.getLogger(ProcessInputResource.class);
    private String processId;
    private String inputName;
    private String inputValue;
    private String dataType;
    private String applicationArgument;
    private boolean standardInput = false;
    private String userFriendlyDescription;
    private String metadata;
    private Integer inputOrder;
    private boolean isRequired = false;
    private boolean requiredToAddedToCmd = false;
    private boolean dataStaged = false;

    public String getProcessId() {
        return processId;
    }

    public void setProcessId(String processId) {
        this.processId = processId;
    }

    public String getInputName() {
        return inputName;
    }

    public void setInputName(String inputName) {
        this.inputName = inputName;
    }

    public String getInputValue() {
        return inputValue;
    }

    public void setInputValue(String inputValue) {
        this.inputValue = inputValue;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getApplicationArgument() {
        return applicationArgument;
    }

    public void setApplicationArgument(String applicationArgument) {
        this.applicationArgument = applicationArgument;
    }

    public boolean getStandardInput() {
        return standardInput;
    }

    public void setStandardInput(boolean standardInput) {
        this.standardInput = standardInput;
    }

    public String getUserFriendlyDescription() {
        return userFriendlyDescription;
    }

    public void setUserFriendlyDescription(String userFriendlyDescription) {
        this.userFriendlyDescription = userFriendlyDescription;
    }

    public String getMetadata() {
        return metadata;
    }

    public void setMetadata(String metadata) {
        this.metadata = metadata;
    }

    public Integer getInputOrder() {
        return inputOrder;
    }

    public void setInputOrder(Integer inputOrder) {
        this.inputOrder = inputOrder;
    }

    public boolean getIsRequired() {
        return isRequired;
    }

    public void setIsRequired(boolean isRequired) {
        this.isRequired = isRequired;
    }

    public boolean getRequiredToAddedToCmd() {
        return requiredToAddedToCmd;
    }

    public void setRequiredToAddedToCmd(boolean requiredToAddedToCmd) {
        this.requiredToAddedToCmd = requiredToAddedToCmd;
    }

    public boolean getDataStaged() {
        return dataStaged;
    }

    public void setDataStaged(boolean dataStaged) {
        this.dataStaged = dataStaged;
    }

    public ExperimentCatResource create(ResourceType type) throws RegistryException {
        logger.error("Unsupported resource type for process input data resource.", new UnsupportedOperationException());
        throw new UnsupportedOperationException();
    }

    public void remove(ResourceType type, Object name) throws RegistryException {
        logger.error("Unsupported resource type for process input data resource.", new UnsupportedOperationException());
        throw new UnsupportedOperationException();
    }

    public ExperimentCatResource get(ResourceType type, Object name) throws RegistryException{
        logger.error("Unsupported resource type for process input data resource.", new UnsupportedOperationException());
        throw new UnsupportedOperationException();
    }

    public List<ExperimentCatResource> get(ResourceType type) throws RegistryException{
        logger.error("Unsupported resource type for process input data resource.", new UnsupportedOperationException());
        throw new UnsupportedOperationException();
    }

    public void save() throws RegistryException{
        EntityManager em = null;
        try {
            em = ExpCatResourceUtils.getEntityManager();
            em.getTransaction().begin();
            if(processId == null){
                throw new RegistryException("Does not have the process id");
            }
            ProcessInput processInput;
            ProcessInputPK processInputPk = new ProcessInputPK();
            processInputPk.setProcessId(processId);
            processInputPk.setInputName(inputName);
            processInput = em.find(ProcessInput.class, processInputPk);
            if(processInput == null){
                processInput = new ProcessInput();
            }
            processInput.setProcessId(processId);
            processInput.setInputName(inputName);
            processInput.setInputValue(inputValue);
            processInput.setDataType(dataType);
            processInput.setApplicationArgument(applicationArgument);
            processInput.setStandardInput(standardInput);
            processInput.setUserFriendlyDescription(userFriendlyDescription);
            processInput.setMetadata(metadata);
            processInput.setInputOrder(inputOrder);
            processInput.setIsRequired(isRequired);
            processInput.setRequiredToAddedToCmd(requiredToAddedToCmd);
            processInput.setDataStaged(dataStaged);
            em.persist(processInput);
            em.getTransaction().commit();
            em.close();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new RegistryException(e);
        } finally {
            if (em != null && em.isOpen()) {
                if (em.getTransaction().isActive()){
                    em.getTransaction().rollback();
                }
                em.close();
            }
        }
    }
}


text:
[![Crowdin](https://badges.crowdin.net/e/63b3dc5d3961a714edea02f99c68e9be/localized.svg)](https://jenkins.crowdin.com/copy-project-link-plugin)

This plugin adds the "Copy project" link into left side panel in the main project page to facilitate copying of job configuration.

![](./docs/copy-project.png)


text:
'use strict';

var users = require('../controllers/users');

module.exports = function (app, passport) {

    app.get('/logout', users.signout);
    app.get('/users/me', users.me);
    app.post('/register', users.create);

    // 设置用户 id 参数
    app.param('userId', users.user);

    // 判断是否已经登录
    app.get('/loggedin', function (req, res) {
        res.send(req.isAuthenticated() ? req.user : '0');
    });

    // 本地登录路由策略
    app.post('/login', passport.authenticate('local', {
        failureFlash: true
    }), function (req, res) {
        res.send(req.user);
    });

    // 第三方账号登录
    app.get('/auth/facebook', passport.authenticate('facebook', {
        scope: ['email', 'user_about_me'],
        failureRedirect: '#!/login'
    }), users.signin);

    app.get('/auth/facebook/ca' +
        'llback', passport.authenticate('facebook', {
        failureRedirect: '#!/login'
    }), users.authCallback);

    app.get('/auth/github', passport.authenticate('github', {
        failureRedirect: '#!/login'
    }), users.signin);

    app.get('/auth/github/callback', passport.authenticate('github', {
        failureRedirect: '#!/login'
    }), users.authCallback);

    app.get('/auth/twitter', passport.authenticate('twitter', {
        failureRedirect: '#!/login'
    }), users.signin);

    app.get('/auth/twitter/callback', passport.authenticate('twitter', {
        failureRedirect: '#!/login'
    }), users.authCallback);

    app.get('/auth/linkedin', passport.authenticate('linkedin', {
        failureRedirect: '#!/login',
        scope: [ 'r_emailaddress' ]
    }), users.signin);

    app.get('/auth/linkedin/callback', passport.authenticate('linkedin', {
        failureRedirect: '#!/login'
    }), users.authCallback);

    app.get('/auth/google', passport.authenticate('google', {
        failureRedirect: '#!/login',
        scope: [
            'https://www.googleapis.com/auth/userinfo.profile',
            'https://www.googleapis.com/auth/userinfo.email'
        ]
    }), users.signin);

    app.get('/auth/google/callback', passport.authenticate('google', {
        failureRedirect: '#!/login'
    }), users.authCallback);

};


text:
<?php

require_once("../OAuthUtil.class.php");
require_once("../OAuthSignatureMethod.class.php");

/**
 * The PLAINTEXT method does not provide any security protection and SHOULD only be used
 * over a secure channel such as HTTPS. It does not use the Signature Base String.
 *   - Chapter 9.4 ("PLAINTEXT")
 */
class OAuthSignatureMethodPlainText extends OAuthSignatureMethod {

	public function getName() {
		return "PLAINTEXT";
	}

	/**
	 * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
	 * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
	 * empty. The result MUST be encoded again.
	 *   - Chapter 9.4.1 ("Generating Signatures")
	 *
	 * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
	 * OAuthRequest handles this!
	 */
	public function buildSignature($request, $consumer, $token) {
		$key = ($token) ? $consumer->secret.$token->secret : $consumer->secret;
		$request->baseString = $key;
		return $key;
	}
}

?>


text:
package org.spongepowered.common.text.serializer.xml;

import org.spongepowered.api.text.Text;
import org.spongepowered.api.text.serializer.TextParseException;
import org.spongepowered.api.text.serializer.TextSerializer;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;

import java.io.StringReader;
import java.io.StringWriter;
import java.util.Locale;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.UnmarshallerHandler;

/**
 * TextXML format serializer for Text instances.
 */
public class TextXmlTextSerializer implements TextSerializer {

    private static final JAXBContext CONTEXT;

    static {
        try {
            CONTEXT = JAXBContext.newInstance(Element.class);
        } catch (JAXBException e) {
            ExceptionInInitializerError err = new ExceptionInInitializerError("Error creating JAXB context: " + e);
            err.initCause(e);
            throw err;
        }
    }

    @Override
    public String serialize(Text text) {
        final StringWriter writer = new StringWriter();
        try {
            Marshaller marshaller = CONTEXT.createMarshaller();
            marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
            marshaller.marshal(Element.fromText(text), writer);
        } catch (JAXBException e) {
            throw new RuntimeException(e);
        }
        return writer.getBuffer().toString();
    }

    /**
     * Also courtesy of http://jazzjuice.blogspot.de/2009/06/jaxb-xmlmixed-and-white-space-anomalies.html
     */
    @SuppressWarnings("unchecked")
    private static <T> T unmarshal(JAXBContext ctx, String strData, boolean flgWhitespaceAware) throws Exception {
        UnmarshallerHandler uh = ctx.createUnmarshaller().getUnmarshallerHandler();
        XMLReader xr = XMLReaderFactory.createXMLReader();
        xr.setContentHandler(flgWhitespaceAware ? new WhitespaceAwareUnmarshallerHandler(uh) : uh);
        xr.setErrorHandler(new DefaultHandler());
        xr.parse(new InputSource(new StringReader(strData)));
        return (T) uh.getResult();
    }

    @Override
    public Text deserialize(String input) throws TextParseException {
        try {
            input = "<span>" + input + "</span>";
            final Element element = unmarshal(CONTEXT, input, true);
            return element.toText().build();
        } catch (Exception e) {
            throw new TextParseException("Error parsing TextXML message", e);
        }
    }

}


text:
#pragma once

#include <itkFiltersProcessBase.h>
#include <medAbstractData.h>

#include <itkFiltersPluginExport.h>

class itkFiltersShrinkProcessPrivate;
class medAbstractData;

class ITKFILTERSPLUGIN_EXPORT itkFiltersShrinkProcess : public itkFiltersProcessBase
{
    Q_OBJECT

public:
    itkFiltersShrinkProcess(itkFiltersShrinkProcess * parent = 0);
    itkFiltersShrinkProcess(const itkFiltersShrinkProcess& other);
    virtual ~itkFiltersShrinkProcess(void);

    static bool registered ( void );

public slots:

    void setParameter ( double  data, int channel );
    int update ( void );

private:
    DTK_DECLARE_PRIVATE(itkFiltersShrinkProcess)
};

dtkAbstractProcess * createitkFiltersShrinkProcess(void);


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using AutoRest.Core.Logging;
using OpenAPI.Validator.Properties;
using OpenAPI.Validator.Validation.Core;
using OpenAPI.Validator.Model;
using System.Collections.Generic;
using System.Linq;

namespace OpenAPI.Validator.Validation
{
    public class ParameterNotDefinedInGlobalParameters : TypedRule<Dictionary<string, SwaggerParameter>>
    {
        private const string SubscriptionId = "subscriptionid";
        private const string ApiVersion = "api-version";

        /// <summary>
        /// Id of the Rule.
        /// </summary>
        public override string Id => "R2015";

        /// <summary>
        /// Violation category of the Rule.
        /// </summary>
        public override ValidationCategory ValidationCategory => ValidationCategory.SDKViolation;

        /// <summary>
        /// The severity of this message (ie, debug/info/warning/error/fatal, etc)
        /// </summary>
        public override Category Severity => Category.Warning;

        /// <summary>
        /// The template message for this Rule.
        /// </summary>
        /// <remarks>
        /// This may contain placeholders '{0}' for parameterized messages.
        /// </remarks>
        public override string MessageTemplate => Resources.ServiceDefinitionParametersMissingMessage;

        /// <summary>
        /// What kind of change implementing this rule can cause.
        /// </summary>
        public override ValidationChangesImpact ValidationChangesImpact => ValidationChangesImpact.SDKImpactingChanges;

        /// <summary>
        /// What kind of open api document type this rule should be applied to
        /// </summary>
        public override ServiceDefinitionDocumentType ServiceDefinitionDocumentType => ServiceDefinitionDocumentType.ARM;

        /// <summary>
        /// Global parameters of each individual json need to be validated, hence individual state
        /// </summary>
        public override ServiceDefinitionDocumentState ValidationRuleMergeState => ServiceDefinitionDocumentState.Individual;

        /// <summary>
        /// This rule passes if the parameters section contains both subscriptionId and api-version parameters
        /// </summary>
        /// <param name="paths"></param>
        /// <returns></returns>
        public override IEnumerable<ValidationMessage> GetValidationMessages(Dictionary<string, SwaggerParameter> ParametersMap, RuleContext context)
        {
            var serviceDefinition = (ServiceDefinition)context.Root;
            // Check if subscriptionId is used but not defined in global parameters
            bool isSubscriptionIdReferenced = serviceDefinition.Paths.Keys.Any(key => key.ToLower().Contains("{" + SubscriptionId.ToLower() + "}"));
            if (isSubscriptionIdReferenced && (ParametersMap?.Values.Any(parameter => parameter.Name?.ToLower().Equals(SubscriptionId) == true)) == false)
            {
                yield return new ValidationMessage(new FileObjectPath(context.File, context.Path), this, SubscriptionId);
            }
            // For ARM specs, api version is almost always required, call it out if it isn't defined in the global params
            // We are not distinguishing between ARM and non-ARM specs currently, so let's apply this for all specs regardless
            // and make appropriate changes in the future so this gets applied only for ARM specs
            if (ParametersMap?.Values.Any(parameter => parameter.Name?.ToLower().Equals(ApiVersion) == true) == false)
            {
                yield return new ValidationMessage(new FileObjectPath(context.File, context.Path), this, ApiVersion);
            }
        }
    }
}


text:
package com.google.cloud.hadoop.fs.gcs.contract;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.contract.AbstractContractSeekTest;
import org.apache.hadoop.fs.contract.AbstractFSContract;

/** GCS contract tests covering file seek using in-memory fakes. */
public class TestInMemoryGoogleContractSeek extends AbstractContractSeekTest {

  @Override
  protected AbstractFSContract createContract(Configuration conf) {
    return new InMemoryGoogleContract(conf);
  }
}


text:
#ifndef SQLPP11_PREPARED_REMOVE_H
#define SQLPP11_PREPARED_REMOVE_H

#include <sqlpp11/parameter_list.h>
#include <sqlpp11/result.h>
#include <sqlpp11/data_types/no_value.h>

namespace sqlpp
{
  template <typename Db, typename Remove>
  struct prepared_remove_t
  {
    using _traits = make_traits<no_value_t, tag::is_prepared_statement>;
    using _nodes = detail::type_vector<>;

    using _parameter_list_t = make_parameter_list_t<Remove>;
    using _prepared_statement_t = typename Db::_prepared_statement_t;

    using _run_check = consistent_t;

    auto _run(Db& db) const -> size_t
    {
      return db.run_prepared_insert(*this);
    }

    void _bind_params() const
    {
      params._bind(_prepared_statement);
    }

    _parameter_list_t params;
    mutable _prepared_statement_t _prepared_statement;
  };
}  // namespace sqlpp

#endif


text:
// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using System;
using System.Runtime.InteropServices;
using SharpDX.Serialization;

namespace SharpDX
{
    /// <summary>
    /// A boolean value stored on 4 bytes (instead of 1 in .NET).
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Size = 4)]
    [DynamicSerializer("TKB1")]
    public struct Bool : IEquatable<Bool>, IDataSerializable
    {
        private int boolValue;

        /// <summary>
        /// Initializes a new instance of the <see cref="Bool" /> class.
        /// </summary>
        /// <param name="boolValue">if set to <c>true</c> [bool value].</param>
        public Bool(bool boolValue)
        {
            this.boolValue = boolValue ? 1 : 0;
        }

        /// <summary>
        /// Indicates whether this instance and a specified object are equal.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns>true if <paramref name="other" /> and this instance are the same type and represent the same value; otherwise, false.</returns>
        public bool Equals(Bool other)
        {
            return this.boolValue == other.boolValue;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
                return false;
            return obj is Bool && Equals((Bool)obj);
        }

        public override int GetHashCode()
        {
            return this.boolValue;
        }

        /// <summary>
        /// Implements the ==.
        /// </summary>
        /// <param name="left">The left.</param>
        /// <param name="right">The right.</param>
        /// <returns>The result of the operator.</returns>
        public static bool operator ==(Bool left, Bool right)
        {
            return left.Equals(right);
        }

        /// <summary>
        /// Implements the !=.
        /// </summary>
        /// <param name="left">The left.</param>
        /// <param name="right">The right.</param>
        /// <returns>The result of the operator.</returns>
        public static bool operator !=(Bool left, Bool right)
        {
            return !left.Equals(right);
        }

        /// <summary>
        /// Performs an explicit conversion from <see cref="SharpDX.Bool"/> to <see cref="bool"/>.
        /// </summary>
        /// <param name="booleanValue">The value.</param>
        /// <returns>The result of the conversion.</returns>
        public static implicit operator bool(Bool booleanValue)
        {
            return booleanValue.boolValue != 0;
        }

        /// <summary>
        /// Performs an explicit conversion from <see cref="bool"/> to <see cref="SharpDX.Bool"/>.
        /// </summary>
        /// <param name="boolValue">The value.</param>
        /// <returns>The result of the conversion.</returns>
        public static implicit operator Bool(bool boolValue)
        {
            return new Bool(boolValue);
        }

        public override string ToString()
        {
            return string.Format("{0}", boolValue != 0);
        }

        /// <inheritdoc/>
        void IDataSerializable.Serialize(BinarySerializer serializer)
        {
            // Write optimized version without using Serialize methods
            if (serializer.Mode == SerializerMode.Write)
            {
                serializer.Writer.Write(boolValue);
            }
            else
            {
                boolValue = serializer.Reader.ReadInt32();
            }
        }

    }
}