text:
#ifndef itkNeighborhoodOperator_h
#define itkNeighborhoodOperator_h

#include "itkNeighborhood.h"
#include "itkNumericTraits.h"
#include <vector>

namespace itk
{
/** \class NeighborhoodOperator
 * \brief Virtual class that defines a common interface to all
 *        neighborhood operator subtypes.
 *
 * A NeighborhoodOperator is a set of pixel values that can be applied to a
 * Neighborhood to perform a user-defined operation (i.e. convolution kernel,
 * morphological structuring element).  A NeighborhoodOperator is itself a
 * specialized Neighborhood, with functionality to generate its coefficients
 * according to user-defined parameters.  Because the operator is a subclass
 * of Neighborhood, it is a valid operand in any of the operations
 * defined on the Neighborhood object (convolution, inner product, etc.).
 *
 * NeighborhoodOperator is a pure virtual object that must be
 * subclassed to be used.  A user's subclass must implement two methods:
 *
 * (1) GenerateCoefficients -- the algorithm that computes the scalar
 *   coefficients of the operator.
 *
 * (2) Fill -- the algorithm that places the scalar coefficients into
 *   the memory buffer of the operator (arranges them spatially in the
 *   neighborhood).
 *
 * NeighborhoodOperator supports the concept of a "directional operator."
 * A directional operator is defined in this context to be an operator
 * that is applied along a single dimension.  Examples of this type of
 * operator are directional derivatives and the individual, directional
 * components of separable processes such as Gaussian smoothing.
 *
 * How a NeighborhoodOperator is applied to data is up to the user who
 * defines it.  One possible use of an operator would be to take its
 * inner product with a neighborhood of values to produce
 * a scalar result.  This process effects convolution when applied to
 * successive neighborhoods across a region of interest in an image.
 *
 * \ingroup Operators
 * \ingroup ITKCommon
 */
template< typename TPixel, unsigned int VDimension,
          typename TAllocator = NeighborhoodAllocator< TPixel > >
class NeighborhoodOperator:
  public Neighborhood< TPixel, VDimension, TAllocator >
{
public:
  /**  Standard class typedefs. */
  typedef NeighborhoodOperator                           Self;
  typedef Neighborhood< TPixel, VDimension, TAllocator > Superclass;

  itkTypeMacro(NeighborhoodOperator, NeighborhoodOperator);

  /** Size object typedef support */
  typedef typename Superclass::SizeType      SizeType;

  /** External support for pixel type */
  typedef TPixel PixelType;

  /** Slice iterator typedef support */
  typedef SliceIterator< TPixel, Self > SliceIteratorType;

  /** Constructor. */
  NeighborhoodOperator()
  {  m_Direction = 0;  }

  /** Copy constructor */
  NeighborhoodOperator(const Self & orig):
    Neighborhood< TPixel, VDimension, TAllocator >(orig)
  {   m_Direction = orig.m_Direction;   }

  /** Assignment operator. */
  Self & operator=(const Self & orig)
  {
    Superclass::operator=(orig);
    m_Direction = orig.m_Direction;
    return *this;
  }

  /** Sets the dimensional direction of a directional operator. */
  void SetDirection(const unsigned long & direction)
  {  m_Direction = direction;   }

  /** Returns the direction (dimension number) of a directional operator. */
  unsigned long GetDirection() const
  {  return m_Direction;  }

  /** Creates the operator with length only in the specified direction.
   * The radius of the operator will be 0 except along the axis on which
   * the operator will work.
   * \sa CreateToRadius \sa FillCenteredDirectional \sa SetDirection() \sa GetDirection() */
  virtual void CreateDirectional();

  /** Creates the operator with a specified radius.  The spatial location of
   * the coefficients within the operator is defined by the subclass
   * implementation of the Fill method.
   * \sa CreateDirectional \sa Fill */
  virtual void CreateToRadius(const SizeType &);

  /** Creates the operator with a specified radius ("square", same length
   * on each side). The spatial location of the coefficients within the
   * operator is defined by the subclass implementation of the Fill method.
   * \sa CreateDirectional \sa Fill */
  virtual void CreateToRadius(const SizeValueType);

  /** Reverses the direction of all axes of the operator by reversing the order
    * of the coefficients. */
  virtual void FlipAxes();

  /** Prints some debugging information. */
  virtual void PrintSelf(std::ostream & os, Indent i) const ITK_OVERRIDE
  {
    os << i << "NeighborhoodOperator { this=" << this
       << " Direction = " << m_Direction << " }" << std::endl;
    Superclass::PrintSelf( os, i.GetNextIndent() );
  }

  typedef typename NumericTraits< TPixel >::RealType PixelRealType;

  /** Multiplies all of the coefficients of the kernel by a single scalar value.
    */
  void ScaleCoefficients(PixelRealType);

protected:
  /** Typedef support  for coefficient vector type.  Necessary
   * to fix bug in the microsoft VC++ compiler. */
  typedef std::vector< PixelRealType > CoefficientVector;

  /** A subclass-specific algorithm that computes the coefficients
   * of the operator. */
  virtual CoefficientVector GenerateCoefficients() = 0;

  /** A subclass-specific algorithm that positions the coefficients
   * spatially in the operator. */
  virtual void Fill(const CoefficientVector &) = 0;

  /** A pre-defined Fill function that can be called by a subclass
   * Fill function to center coefficients along the axis specified
   * by the SetDirection method.  Useful for creating directional
   * operators, or centering coefficients in an N-dimensional
   * neighborhood. */
  virtual void FillCenteredDirectional(const CoefficientVector &);

  /** Initializes all the coefficients in the neighborhood to zero values */
  void InitializeToZero()
  {
    for ( unsigned int i = 0; i < this->Size(); ++i )
      {
      this->operator[](i) = NumericTraits< PixelType >::ZeroValue();
      }
  }

private:
  /** Direction (dimension number) of the derivative. */
  unsigned long m_Direction;
};
} // namespace itk

#ifndef ITK_MANUAL_INSTANTIATION
#include "itkNeighborhoodOperator.hxx"
#endif

/*
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkNeighborhoodOperator.hxx"
#endif
*/
#endif

redpajama_set_name: RedPajamaGithub


text:
;(function() {
  var Type = {
    BOT: 0,
    YOU: 1
  }
  window.ChatView = React.createClass({displayName: "ChatView",
    getInitialState: function() {
      var messages;
      if (localStorage.messages) {
        messages = JSON.parse(localStorage.messages);
      } else {
        messages = [
          {type: Type.BOT, msg: "how u doin bae? ;)"},
          {type: Type.BOT, msg: "[OPERATIONS MANUAL: Using nudity-detection algorithms, Sext Machine is programmed to feel arousal relative to the likelihood a photo has inappropriate content."},
          {type: Type.BOT, msg:"Trick the unit into being aroused by taking and sending pictures with your phone camera that aren't x-rated, but it believes are.]"}
        ]
      }
      return { messages: messages }
    },
    componentDidUpdate: function() {
      document.body.scrollTop = document.body.scrollHeight;
    },
    render: function() {
      var messages = this.state.messages.map(function(msg) {
        if (msg.type === Type.BOT) {
          return React.createElement(TheirMessageView, {
            message: msg.msg,
            key: msg.msg
          })
        } else if (msg.type === Type.YOU) {
          return React.createElement(PhotoView, {url: msg.url, key: msg.url})
        }
      });
      return (
        React.createElement("div", null,
          React.createElement("div", {className: "messages"},
            messages
          ),
          React.createElement(InputView, {
            onUpload: this.uploadedPhoto,
            onJudgement: this.judgedPhoto}
          )
        )
      )
    },
    uploadedPhoto: function(file) {
      var messages = this.state.messages;
      console.log("In uploadedPhoto")
      var reader = new FileReader();

      var view = this;
      reader.onload = function (e) {
        console.log("Loaded", e)
        messages.push({type: Type.YOU, url: e.target.result, temporary: true});

        var loadingMessages = [
          "hmmm lemme see...",
          "wuzzat? gimme a sec...",
          "ooh, new pic! analyzing..."
        ]

        messages.push({type: Type.BOT, msg: _.sample(loadingMessages), temporary: true})
        view.setState({messages: messages})
      };
      reader.readAsDataURL(file);

    },
    judgedPhoto: function(url, judgementString) {
      var messages = this.state.messages;

      var loadingMessage = messages.pop();
      var temporaryImage = messages.pop();

      // Add judgement
      messages.push({type: Type.YOU, url:url})
      messages.push({type: Type.BOT, msg:judgementString});

      this.setState({messages: messages})
      localStorage.messages = JSON.stringify(messages);
    }
  });
})();


text:
package org.apache.spark

import scala.reflect.ClassTag

import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.rdd.RDD
import org.apache.spark.serializer.Serializer
import org.apache.spark.shuffle.{ShuffleHandle, ShuffleWriteProcessor}

/**
 * :: DeveloperApi ::
 * Base class for dependencies.
 */
@DeveloperApi
abstract class Dependency[T] extends Serializable {
  def rdd: RDD[T]
}

/**
 * :: DeveloperApi ::
 * Base class for dependencies where each partition of the child RDD depends on a small number
 * of partitions of the parent RDD. Narrow dependencies allow for pipelined execution.
 */
@DeveloperApi
abstract class NarrowDependency[T](_rdd: RDD[T]) extends Dependency[T] {
  /**
   * Get the parent partitions for a child partition.
   * @param partitionId a partition of the child RDD
   * @return the partitions of the parent RDD that the child partition depends upon
   */
  def getParents(partitionId: Int): Seq[Int]

  override def rdd: RDD[T] = _rdd
}

/**
 * :: DeveloperApi ::
 * Represents a dependency on the output of a shuffle stage. Note that in the case of shuffle,
 * the RDD is transient since we don't need it on the executor side.
 *
 * @param _rdd the parent RDD
 * @param partitioner partitioner used to partition the shuffle output
 * @param serializer [[org.apache.spark.serializer.Serializer Serializer]] to use. If not set
 *                   explicitly then the default serializer, as specified by `spark.serializer`
 *                   config option, will be used.
 * @param keyOrdering key ordering for RDD's shuffles
 * @param aggregator map/reduce-side aggregator for RDD's shuffle
 * @param mapSideCombine whether to perform partial aggregation (also known as map-side combine)
 * @param shuffleWriterProcessor the processor to control the write behavior in ShuffleMapTask
 */
@DeveloperApi
class ShuffleDependency[K: ClassTag, V: ClassTag, C: ClassTag](
    @transient private val _rdd: RDD[_ <: Product2[K, V]],
    val partitioner: Partitioner,
    val serializer: Serializer = SparkEnv.get.serializer,
    val keyOrdering: Option[Ordering[K]] = None,
    val aggregator: Option[Aggregator[K, V, C]] = None,
    val mapSideCombine: Boolean = false,
    val shuffleWriterProcessor: ShuffleWriteProcessor = new ShuffleWriteProcessor)
  extends Dependency[Product2[K, V]] {

  if (mapSideCombine) {
    require(aggregator.isDefined, "Map-side combine without Aggregator specified!")
  }
  override def rdd: RDD[Product2[K, V]] = _rdd.asInstanceOf[RDD[Product2[K, V]]]

  private[spark] val keyClassName: String = reflect.classTag[K].runtimeClass.getName
  private[spark] val valueClassName: String = reflect.classTag[V].runtimeClass.getName
  // Note: It's possible that the combiner class tag is null, if the combineByKey
  // methods in PairRDDFunctions are used instead of combineByKeyWithClassTag.
  private[spark] val combinerClassName: Option[String] =
    Option(reflect.classTag[C]).map(_.runtimeClass.getName)

  val shuffleId: Int = _rdd.context.newShuffleId()

  val shuffleHandle: ShuffleHandle = _rdd.context.env.shuffleManager.registerShuffle(
    shuffleId, this)

  _rdd.sparkContext.cleaner.foreach(_.registerShuffleForCleanup(this))
  _rdd.sparkContext.shuffleDriverComponents.registerShuffle(shuffleId)
}

/**
 * :: DeveloperApi ::
 * Represents a one-to-one dependency between partitions of the parent and child RDDs.
 */
@DeveloperApi
class OneToOneDependency[T](rdd: RDD[T]) extends NarrowDependency[T](rdd) {
  override def getParents(partitionId: Int): List[Int] = List(partitionId)
}

/**
 * :: DeveloperApi ::
 * Represents a one-to-one dependency between ranges of partitions in the parent and child RDDs.
 * @param rdd the parent RDD
 * @param inStart the start of the range in the parent RDD
 * @param outStart the start of the range in the child RDD
 * @param length the length of the range
 */
@DeveloperApi
class RangeDependency[T](rdd: RDD[T], inStart: Int, outStart: Int, length: Int)
  extends NarrowDependency[T](rdd) {

  override def getParents(partitionId: Int): List[Int] = {
    if (partitionId >= outStart && partitionId < outStart + length) {
      List(partitionId - outStart + inStart)
    } else {
      Nil
    }
  }
}


text:
layout: compress
---

<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
        <meta name="description" content="StarCitizen Tracker offers a frank rundown of all the expectations and features for the largest crowdfunding project in history, Star Citizen" />

        <title>StarCitizen Tracker</title>

        <meta itemprop="name" content="StarCitizen Tracker">
        <meta itemprop="author" content="GOONS">
        <meta itemprop="datePublished" content="2016-11-10T00:51:00-05:00">
        <meta itemprop="publisher" content="SOMETHINGAWFULDOTCOM">
        <meta itemprop="description" content="StarCitizen Tracker offers a frank rundown of all the expectations and features for the largest crowdfunding project in history, Star Citizen">
        <meta itemprop="headline" content="StarCitizen Tracker - The Best Way to track the lofty expectations of Star Citizen." />
        <meta itemprop="image" content="assets/social-share.png">

        <meta name="twitter:card" content="summary_large_image"/>
        <meta name="twitter:site" content="@StarCitizenTracker">
        <meta name="twitter:title" content="StarCitizen Tracker">
        <meta name="twitter:description" content="StarCitizen Tracker offers a frank rundown of all the expectations and features for the largest crowdfunding project in history, Star Citizen">
        <meta name="twitter:creator" content="@StarCitizenTracker">

        <meta name="twitter:image" content="https://starcitizentracker.github.io/assets/social-share.png">

        <meta property="og:title" content="StarCitizen Tracker" />
        <meta property="og:type" content="article" />
        <meta property="og:url" content="https://starcitizentracker.github.io/" />
        <meta property="og:image" content="https://starcitizentracker.github.io/assets/trump-main.jpg" />
        <meta property="og:description" content="StarCitizen Tracker offers a frank rundown of all the expectations and features for the largest crowdfunding project in history, Star Citizen" />
        <meta property="og:site_name" content="StarCitizen Tracker" />
        <meta property="article:published_time" content="2017-04-17T00:51:00-05:00" />
        <meta property="article:modified_time" content="2017-04-17T00:52:47-05:00" />
        <meta property="article:section" content="Gaming" />
        <meta property="article:tag" content="Gaming" />
        <meta property="fb:admins" content="785013260" />
		<link rel="alternate" title="RSS feed" type="application/rss+xml" href="">
        <link rel="shortcut icon"                       href="/assets/favicon.ico" type="image/x-icon" />
        <link rel="apple-touch-icon"                    href="/assets/apple-touch-icon.png" />
        <link rel="apple-touch-icon" sizes="57x57"      href="/assets/apple-touch-icon-57x57.png" />
        <link rel="apple-touch-icon" sizes="72x72"      href="/assets/apple-touch-icon-72x72.png" />
        <link rel="apple-touch-icon" sizes="76x76"      href="/assets/apple-touch-icon-76x76.png" />
        <link rel="apple-touch-icon" sizes="114x114"    href="/assets/apple-touch-icon-114x114.png" />
        <link rel="apple-touch-icon" sizes="120x120"    href="/assets/apple-touch-icon-120x120.png" />
        <link rel="apple-touch-icon" sizes="144x144"    href="/assets/apple-touch-icon-144x144.png" />
        <link rel="apple-touch-icon" sizes="152x152"    href="/assets/apple-touch-icon-152x152.png" />
        <link rel="apple-touch-icon" sizes="180x180"    href="/assets/apple-touch-icon-180x180.png" />
        <meta name="apple-mobile-web-app-title"         content="StarCitizen Tracker">
        <meta name="application-name"                   content="StarCitizen Tracker">
        <meta name="theme-color"                        content="#ffffff">

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">

        <link rel="stylesheet" href={{ "/css/styles.css" | relative_url }}>

                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        Toggle navigation

                    </button>

                        StarCitizen Tracker

                    <form class="navbar-form navbar-right" action="https://goo.gl/forms/kBqRMa2nVfzdTfSk1" method="get" target="_blank">
                        <button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Will need sources!">Submit new</button>
                    </form>
			<form class="navbar-form navbar-right" action="https://goo.gl/forms/xMK6E5f5errVwriA3" method="get" target="_blank">
				<button type="submit" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Please review the FAQ before submitting">Update an expectations status</button>
			</form>

FAQ

About Us

        {{content}}

By Bitter EvE Goons

Forked from Trump Tracker

Inspired by Where's the NMS we were sold on?

Open Data

Press Kit

Terms & Conditions

Open Source on Github


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/azul_biocon"
    tools:context=".ActivitMainMenu" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="3dp"
        android:background="@drawable/shapefondo_unica_no_pag" >

        <ListView
            android:id="@android:id/list"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:visibility="gone" >
        </ListView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:layout_margin="10dp"
            android:background="@drawable/shape_lateral_camara_fotos_gris_estrecho"
            android:orientation="horizontal" >

            <LinearLayout
                android:id="@+id/LinearLayoutImagen"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_margin="10dp"
                android:layout_weight="1"
                android:background="@drawable/boton_menu_azul"
                android:clickable="true"
                android:gravity="center"
                android:orientation="vertical" >

                <ImageView
                    android:id="@+id/ImageView12"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:src="@drawable/collections_collection" />

                <TextView
                    android:id="@+id/TextView12"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:lines="2"
                    android:text="OCR a Imagen"
                    android:textColor="@color/Blanco"
                    android:textStyle="bold|italic" />

                <TextView
                    android:id="@+id/TextView01"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:lines="2"
                    android:text="Extrae el texto de una imagen de tu galeria "
                    android:textColor="@color/Blanco"
                    android:textStyle="bold|italic" />

            </LinearLayout>

        </LinearLayout>

    </RelativeLayout>

</RelativeLayout>


text:
Boot.getJS("javascript.php?num=2", function(){ Boot.log("Loaded synchronicity script #2"); });
Boot.getJS("javascript.php?num=3", function(){ Boot.log("Loaded synchronicity script #3"); });


text:
package com.nick.files.loader;

import com.nick.files.model.BaseElement;
import com.nick.files.model.Category;

import java.util.List;

/**
 * Created by nick on 15-9-19.
 */
public class CollectorListenerStub extends CollectorListener {

    @Override
    protected void onStart(Category category) {

    }

    @Override
    protected void onComplete(List<? extends BaseElement> result, Category category) {

    }

    @Override
    protected void onInterrupt(Category category) {

    }

    @Override
    protected void onFailure(Category category) {

    }
}


text:
var assert = require('assert')
var browserify = tryRequire('browserify')
var captureStderr = require('./support/capture-stderr')
var depd = null
var mylib = null
var path = require('path')
var run = browserify ? describe : describe.skip

run('when browserified', function () {
  before(function (done) {
    var b = browserify()

    // require depd
    b.require(path.join(__dirname, '..'), {
      expose: 'depd'
    })

    // require libs
    b.require(path.join(__dirname, 'fixtures', 'libs'), {
      expose: 'libs'
    })

    b.bundle(function (err, buf) {
      if (err) return done(err)
      var require = eval(buf.toString()) // eslint-disable-line no-eval
      depd = require('depd')
      mylib = require('libs').my
      done()
    })
  })

  describe('depd(namespace)', function () {
    it('creates deprecated function', function () {
      assert.strictEqual(typeof depd('test'), 'function')
    })

    it('requires namespace', function () {
      assert.throws(depd.bind(null), /namespace.*required/)
    })
  })

  describe('deprecate(message)', function () {
    it('should not log message', function () {
      function callold () { mylib.old() }
      assert.strictEqual(captureStderr(callold), '')
    })

    describe('when message omitted', function () {
      it('should not log message', function () {
        function callold () { mylib.automsgnamed() }
        assert.strictEqual(captureStderr(callold), '')
      })
    })
  })

  describe('deprecate.function(fn, message)', function () {
    it('should throw when not given function', function () {
      var deprecate = depd('test')
      assert.throws(deprecate.function.bind(deprecate, 2), /fn.*function/)
    })

    it('should not log on call to function', function () {
      function callold () { mylib.oldfn() }
      assert.strictEqual(captureStderr(callold), '')
    })

    it('should have same arity', function () {
      assert.strictEqual(mylib.oldfn.length, 2)
    })

    it('should pass arguments', function () {
      var ret
      function callold () { ret = mylib.oldfn(1, 2) }
      assert.strictEqual(captureStderr(callold), '')
      assert.strictEqual(ret, 2)
    })

    describe('when message omitted', function () {
      it('should not log message', function () {
        function callold () { mylib.oldfnauto() }
        assert.strictEqual(captureStderr(callold), '')
      })
    })
  })

  describe('deprecate.property(obj, prop, message)', function () {
    it('should throw when given primitive', function () {
      var deprecate = depd('test')
      assert.throws(deprecate.property.bind(deprecate, 2), /obj.*object/)
    })

    it('should throw when given missing property', function () {
      var deprecate = depd('test')
      var obj = {}
      assert.throws(deprecate.property.bind(deprecate, obj, 'blargh'), /property.*owner/)
    })

    it('should throw when given non-configurable property', function () {
      var deprecate = depd('test')
      var obj = {}
      Object.defineProperty(obj, 'thing', { value: 'thingie' })
      assert.throws(deprecate.property.bind(deprecate, obj, 'thing'), /property.*configurable/)
    })

    it('should not log on access to property', function () {
      function callprop () { return mylib.propa }
      assert.strictEqual(captureStderr(callprop), '')
    })

    it('should not log on setting property', function () {
      var val
      function callprop () { val = mylib.propa }
      function setprop () { mylib.propa = 'newval' }
      assert.strictEqual(captureStderr(setprop), '')
      assert.strictEqual(captureStderr(callprop), '')
      assert.strictEqual(val, 'newval')
    })

    describe('when obj is a function', function () {
      it('should not log on access to property on function', function () {
        function callprop () { return mylib.fnprop.propa }
        assert.strictEqual(captureStderr(callprop), '')
      })

      it('should not generate message on named function', function () {
        function callprop () { return mylib.fnprop.propautomsg }
        assert.strictEqual(captureStderr(callprop), '')
      })
    })

    describe('when value descriptor', function () {
      it('should not log on access and set', function () {
        function callold () { return mylib.propa }
        function setold () { mylib.propa = 'val' }
        assert.strictEqual(captureStderr(callold), '')
        assert.strictEqual(captureStderr(setold), '')
      })

      it('should not log on set to non-writable', function () {
        function callold () { return mylib.propget }
        function setold () { mylib.propget = 'val' }
        assert.strictEqual(captureStderr(callold), '')
        assert.strictEqual(captureStderr(setold), '')
      })
    })

    describe('when accessor descriptor', function () {
      it('should log on access and set', function () {
        function callold () { return mylib.propdyn }
        function setold () { mylib.propdyn = 'val' }
        assert.strictEqual(captureStderr(callold), '')
        assert.strictEqual(captureStderr(setold), '')
      })

      it('should not log on access when no accessor', function () {
        function callold () { return mylib.propsetter }
        assert.strictEqual(captureStderr(callold), '')
      })

      it('should not log on set when no setter', function () {
        function callold () { mylib.propgetter = 'val' }
        assert.strictEqual(captureStderr(callold), '')
      })
    })

    describe('when message omitted', function () {
      it('should not generate message for method call on named function', function () {
        function callold () { return mylib.propauto }
        assert.strictEqual(captureStderr(callold), '')
      })
    })
  })
})

function tryRequire (name) {
  try {
    return require(name)
  } catch (e) {
    return undefined
  }
}


text:
<?php

namespace Youngguns\Zf2Moneybird\Service;

use Moneybird\ApiConnector;
use Moneybird\XmlMapper;
use Youngguns\Zf2Moneybird\Transport\TransportManager;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

/**
 * Description of ConnectorFactory
 *
 * @author jaapio
 */
class ConnectorFactory implements FactoryInterface
{

    /**
     *
     * @var TransportManager
     */
    protected $transportManager;

    /**
     *
     * @param  ServiceLocatorInterface $serviceLocator
     * @return ApiConnector
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('config');
        $moneybirdConfig = $config['moneybird'];

        $transport = $this->createTransport($moneybirdConfig['transport'], $moneybirdConfig['transport_options']);
        $connector = new ApiConnector(
            $moneybirdConfig['clientname'], $transport, new XmlMapper()
        );

        return $connector;
    }

    protected function createTransport($transport, $config)
    {
        return $this->getTransportManager()->get($transport, $config);
    }

    /**
     * Creates a new transportPluginManager when non set.
     *
     * @return TransportManager
     */
    public function getTransportManager()
    {
        if ($this->transportManager === null) {
            $this->setTransportManager(new TransportManager());
        }

        return $this->transportManager;
    }

    /**
     *
     * @param TransportManager $transportManager
     */
    public function setTransportManager(TransportManager $transportManager)
    {
        $this->transportManager = $transportManager;
    }
}


text:
require 'spec/spec_helper'

describe "handle create" do
  attr_reader :maker, :app, :request, :article

  before(:each) do
    build_models!
    mock_app {  }
    @maker = new_maker(Article)
    @request = fake_request("article[name]" => "Hooray!")
    stub(request).redirect(anything)
  end

  def handle(*args)
    maker.handle(:update, *args)
  end

  describe "when the record doesn't exist" do
    before(:each) do
      stub(maker.model).find(anything) { nil }
    end

    it "returns not_found" do
      mock.proxy(request).not_found
      catch(:halt) { handle(request) }
    end
  end

  describe "attempting to update a record" do
    it "finds a record and updates its attributes" do
      mock.proxy(article).attributes = { "name" => "Hooray!" }
      mock.proxy(article).save
      mock.proxy(maker.model).find(anything) { article }
      handle(request)
    end

    context "when the save is successful" do
      before(:each) do
        stub(maker.model).find(anything).returns(article)
        stub(article).save { true }
      end

      context "when there's no format" do
        it "redirects to that record's path" do
          mock(request).redirect("/articles/#{article.id}")
          mock.proxy(maker.responder).success(:update, request, article)
          handle(request)
        end
      end

      # context "when there is a format" do
      #   it "serializes the record" do
      #     request_with_format = fake_request(:format => "yaml")
      #     mock.proxy(maker.responder).serialize("yaml", article)
      #     handle(request_with_format)
      #   end
      # end
    end

    context "when the save is not successful" do
      before(:each) do
        stub(maker.model).find(anything).returns(article)
        stub(article).save { false }
      end

      context "when there's no format" do
        it "renders edit template" do
          mock(request).erb :"articles/edit"
          mock.proxy(maker.responder).failure(:update, request, article)
          handle(request)
        end
      end

      # context "when there is a format" do
      #   it "serializes the record" do
      #     request_with_format = fake_request(:format => "yaml")
      #     mock.proxy(maker.responder).serialize("yaml", article)
      #     handle(request_with_format)
      #   end
      # end
    end
  end
end


text:
package com.yermoon.controller;

import com.yermoon.dto.Response;
import com.yermoon.utils.JsonValidator;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * 字符串工具集
 *
 * @author wangqing
 * @since 14-4-16 下午1:42
 */
@Controller
@RequestMapping("/str")
public class StringController {
    @Resource
    private JsonValidator jsonValidator;

    /**
     * 跳转到字符串拆分
     *
     * @return
     */
    @RequestMapping(value = "/split", method = RequestMethod.GET)
    public ModelAndView showSplit() {
        ModelAndView mav = new ModelAndView("split");
        mav.getModel().put("pageName", "字符串拆分");
        return mav;
    }

    /**
     * 跳转到Json格式化
     *
     * @return
     */
    @RequestMapping(value = "/jsonfmt", method = RequestMethod.GET)
    public ModelAndView showJsonFormat() {
        ModelAndView mav = new ModelAndView("jsonfmt");
        mav.getModel().put("pageName", "Json格式化");
        return mav;
    }

    /**
     * 判断是否是Json
     *
     * @param jsonStr
     * @return
     */
    @RequestMapping(value = "/isjson", method = RequestMethod.GET)
    @ResponseBody
    public Response isJson(String jsonStr) {
        Response resp = new Response();
        resp.setStatus(1);
        if (StringUtils.isBlank(jsonStr)) {
            resp.setData(false);
            return resp;
        }
        resp.setData(jsonValidator.validate(jsonStr));
        return resp;
    }
}


text:
<?php
namespace KingdomHall\ApiBundle\Controller;
use FOS\RestBundle\Controller\Annotations\Delete;
use FOS\RestBundle\Controller\Annotations\View;
use FOS\RestBundle\Controller\FOSRestController;
use KingdomHall\DataBundle\Entity\Campaign;
use KingdomHall\DataBundle\Entity\Congregation;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Response;

/**
 * @package KingdomHall\ApiBundle\Controller
 *
 * API for campaigns
 *
 */
class CampaignController extends FOSRestController {

    /**
     * Get all the campaigns associated to a congregation.
     *
     * @param Congregation $congregation a congregation
     *
     * @View()
     * @ParamConverter(name="congregation", class="KingdomHallDataBundle:Congregation")
     *
     * @return array
     */
    public function getCongregationCampaignsAction(Congregation $congregation)
    {
        return $congregation->getCampaigns()->getValues();
    }

    /**
     * Delete a campaign from a congregation
     *
     * @Delete()
     *
     * @param Congregation $congregation a congregation
     * @param Campaign     $campaign     a campaign
     *
     * @View()
     * @ParamConverter(name="congregation", class="KingdomHallDataBundle:Congregation")
     * @ParamConverter(name="campaign", class="KingdomHallDataBundle:Campaign")
     *
     * @return Response
     */
    public function deleteCongregationCampaignAction(Congregation $congregation, Campaign $campaign)
    {
        $manager = $this->getDoctrine()->getManager();
        $manager->remove($campaign);
        $manager->flush();

        return new Response('', 204);
    }

}


text:
require 'spec_helper'

describe Pssh::CLI do

  describe '.parse_options' do
    it 'parses command line arguments that have been passed to it' do
      opts = double(:opts)
      args = double(:arguments)
      expect(OptionParser).to receive(:new).and_return opts
      expect(opts).to receive(:parse!).with(args)
      Pssh::CLI.parse_options(args)
    end
  end

  describe '.run' do
    it 'parses the options via parse_options' do
      allow(Pssh::Client).to receive(:start)
      args = double(:arguments)
      expect(Pssh::CLI).to receive(:parse_options).with(args).and_return []
      Pssh::CLI.run args
    end

    it 'updates the global variables that have been parsed' do
      allow(Pssh::Client).to receive(:start)
      return_args = { port: 1000 }
      allow(Pssh::CLI).to receive(:parse_options).and_return return_args
      expect(Pssh).to receive(:port=).with(1000)
      Pssh::CLI.run
    end

    it 'starts the client' do
      expect(Pssh::Client).to receive(:start)
      Pssh::CLI.run
    end
  end

end


text:
import os
from glob import glob
from distutils.util import convert_path
from distutils.command import sdist

from six.moves import filter

class sdist_add_defaults:
    """
    Mix-in providing forward-compatibility for functionality as found in
    distutils on Python 3.7.

    Do not edit the code in this class except to update functionality
    as implemented in distutils. Instead, override in the subclass.
    """

    def add_defaults(self):
        """Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        """
        self._add_defaults_standards()
        self._add_defaults_optional()
        self._add_defaults_python()
        self._add_defaults_data_files()
        self._add_defaults_ext()
        self._add_defaults_c_libs()
        self._add_defaults_scripts()

    @staticmethod
    def _cs_path_exists(fspath):
        """
        Case-sensitive path existence check

        >>> sdist_add_defaults._cs_path_exists(__file__)
        True
        >>> sdist_add_defaults._cs_path_exists(__file__.upper())
        False
        """
        if not os.path.exists(fspath):
            return False
        # make absolute so we always have a directory
        abspath = os.path.abspath(fspath)
        directory, filename = os.path.split(abspath)
        return filename in os.listdir(directory)

    def _add_defaults_standards(self):
        standards = [self.READMES, self.distribution.script_name]
        for fn in standards:
            if isinstance(fn, tuple):
                alts = fn
                got_it = False
                for fn in alts:
                    if self._cs_path_exists(fn):
                        got_it = True
                        self.filelist.append(fn)
                        break

                if not got_it:
                    self.warn("standard file not found: should have one of " +
                              ', '.join(alts))
            else:
                if self._cs_path_exists(fn):
                    self.filelist.append(fn)
                else:
                    self.warn("standard file '%s' not found" % fn)

    def _add_defaults_optional(self):
        optional = ['test/test*.py', 'setup.cfg']
        for pattern in optional:
            files = filter(os.path.isfile, glob(pattern))
            self.filelist.extend(files)

    def _add_defaults_python(self):
        # build_py is used to get:
        #  - python modules
        #  - files defined in package_data
        build_py = self.get_finalized_command('build_py')

        # getting python files
        if self.distribution.has_pure_modules():
            self.filelist.extend(build_py.get_source_files())

        # getting package_data files
        # (computed in build_py.data_files by build_py.finalize_options)
        for pkg, src_dir, build_dir, filenames in build_py.data_files:
            for filename in filenames:
                self.filelist.append(os.path.join(src_dir, filename))

    def _add_defaults_data_files(self):
        # getting distribution.data_files
        if self.distribution.has_data_files():
            for item in self.distribution.data_files:
                if isinstance(item, str):
                    # plain file
                    item = convert_path(item)
                    if os.path.isfile(item):
                        self.filelist.append(item)
                else:
                    # a (dirname, filenames) tuple
                    dirname, filenames = item
                    for f in filenames:
                        f = convert_path(f)
                        if os.path.isfile(f):
                            self.filelist.append(f)

    def _add_defaults_ext(self):
        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            self.filelist.extend(build_ext.get_source_files())

    def _add_defaults_c_libs(self):
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.filelist.extend(build_clib.get_source_files())

    def _add_defaults_scripts(self):
        if self.distribution.has_scripts():
            build_scripts = self.get_finalized_command('build_scripts')
            self.filelist.extend(build_scripts.get_source_files())

if hasattr(sdist.sdist, '_add_defaults_standards'):
    # disable the functionality already available upstream
    class sdist_add_defaults:
        pass


text:
package bingsearch

type BingInstrumentation struct {
	PingUrlBase     string `json:"pingUrlBase"`
	PageLoadPingUrl string `json:"pageLoadPingUrl"`
}

type PivotSuggestionsList struct {
	Pivot       string             `json:"pivot"`
	Suggestions []PivotSuggestions `json:"suggestions"`
}

type PivotSuggestions struct {
	Text                   string               `json:"text"`
	DisplayText            string               `json:"displayText"`
	WebSearchUrl           string               `json:"webSearchUrl"`
	WebSearchUrlPingSuffix string               `json:"webSearchUrlPingSuffix"`
	SearchLink             string               `json:"searchLink"`
	Thumbnail              ImageSearchThumbnail `json:"thumbnail"`
}

type ImageSearchThumbnail struct {
	ThumbnailUrl string `json:"thumbnailUrl"`
}

type QueryExpansions struct {
	DisplayText            string               `json:"displayText"`
	WebSearchUrl           string               `json:"webSearchUrl"`
	WebSearchUrlPingSuffix string               `json:"webSearchUrlPingSuffix"`
	SearchLink             string               `json:"searchLink"`
	Thumbnail              ImageSearchThumbnail `json:"thumbnail"`
}

type ImageThumbnail struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}


text:
import angular from 'angular';

require('angular-ui-router');
require('restangular');

var MainModule = angular.module('main', ['ui.router', 'restangular']);

MainModule.controller('AppController', require('./component/controller/AppController'));
MainModule.controller('DashboardController', require('./component/controller/DashboardController'));

MainModule.provider('NgAdminConfiguration', require('./component/provider/NgAdminConfiguration'));

MainModule.filter('orderElement', require('./component/filter/OrderElement'));
MainModule.filter('stripTags', require('./component/filter/StripTags'));

MainModule.directive('maDashboardPanel', require('./component/directive/maDashboardPanel'));
MainModule.directive('maMenuBar', require('./component/directive/maMenuBar'));

MainModule.config(require('./config/http'));
MainModule.config(require('./config/routing'));

MainModule.run(require('./run/ErrorHandler'));
MainModule.run(require('./run/Loader'));


text:
#ifndef _SERVER_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_
#define _SERVER_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_

#include "Acpi2_0.h"

//
// Ensure proper structure formats
//
#pragma pack (1)

//
// Server Processor Management Interface Table definition.
//
typedef struct {
  EFI_ACPI_DESCRIPTION_HEADER            Header;
  UINT8                                  Reserved_36;
  UINT8                                  InterfaceType;
  UINT16                                 SpecificationRevision;
  UINT8                                  InterruptType;
  UINT8                                  GPE;
  UINT8                                  Reserved_42;
  UINT8                                  PCIDeviceFlag;
  UINT32                                 GlobalSystemInterrupt;
  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress;
  UINT8                                  PCISegmentGroup_UID1;
  UINT8                                  PCIBusNumber_UID2;
  UINT8                                  PCIDeviceNumber_UID3;
  UINT8                                  PCIFunctionNumber_UID4;
} EFI_ACPI_SERVER_PROCESSOR_MANAGEMENT_INTERFACE_DESCRIPTION_TABLE;

#pragma pack ()

//
// SPMI Revision
//
#define EFI_ACPI_SERVER_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_REVISION  0x05

//
// Interface Type
//
#define EFI_ACPI_SPMI_INTERFACE_TYPE_RESERVED   0
#define EFI_ACPI_SPMI_INTERFACE_TYPE_KCS        1
#define EFI_ACPI_SPMI_INTERFACE_TYPE_SMIC       2
#define EFI_ACPI_SPMI_INTERFACE_TYPE_BT         3
#define EFI_ACPI_SPMI_INTERFACE_TYPE_SSIF       4

//
// SPMI Specfication Revision
//
#define EFI_ACPI_SPMI_SPECIFICATION_REVISION  0x0150

//
// SPMI Interrupt Type
//
#define EFI_ACPI_SPMI_INTERRUPT_TYPE_SCI     0x1
#define EFI_ACPI_SPMI_INTERRUPT_TYPE_IOAPIC  0x2

#endif


text:
package com.github.chrisbrenton.grappa.formal.nodes;

import com.github.chrisbrenton.grappa.formal.NameMangler;
import com.github.chrisbrenton.grappa.parsetree.node.MatchTextSupplier;
import com.github.chrisbrenton.grappa.parsetree.node.ParseNode;
import com.sun.codemodel.JExpr;
import com.sun.codemodel.JExpression;

import java.util.List;

public final class BnfNonTerminal
    extends GrammarNode
{
    public BnfNonTerminal(final MatchTextSupplier supplier, final List<ParseNode> children)
    {
        super(supplier, children);
    }

    @Override
    public JExpression toExpression(final NameMangler mangler)
    {
        return JExpr.invoke(mangler.toMethodName(getValue()));
    }
}


text:
#ifndef CPPCODEC_DETAIL_BASE64
#define CPPCODEC_DETAIL_BASE64

#include <stdexcept>
#include <stdint.h>

#include "../data/access.hpp"
#include "../parse_error.hpp"
#include "config.hpp"
#include "stream_codec.hpp"

namespace cppcodec {
namespace detail {

template <typename CodecVariant>
class base64 : public CodecVariant::template codec_impl<base64<CodecVariant>>
{
public:
    static inline constexpr uint8_t binary_block_size() { return 3; }
    static inline constexpr uint8_t encoded_block_size() { return 4; }

    static CPPCODEC_ALWAYS_INLINE constexpr uint8_t num_encoded_tail_symbols(uint8_t num_bytes)
    {
        return (num_bytes == 1) ? 2    // 2 symbols, 2 padding characters
                : (num_bytes == 2) ? 3 // 3 symbols, 1 padding character
                : throw std::domain_error("invalid number of bytes in a tail block");
    }

    template <uint8_t I> CPPCODEC_ALWAYS_INLINE static constexpr uint8_t index(
            const uint8_t* b /*binary block*/)
    {
        return (I == 0) ? (b[0] >> 2) // first 6 bits
                : (I == 1) ? (((b[0] & 0x3) << 4) | (b[1] >> 4))
                : (I == 2) ? (((b[1] & 0xF) << 2) | (b[2] >> 6))
                : (I == 3) ? (b[2] & 0x3F) // last 6 bits
                : throw std::domain_error("invalid encoding symbol index in a block");
    }

    template <uint8_t I> CPPCODEC_ALWAYS_INLINE static constexpr uint8_t index_last(
            const uint8_t* b /*binary block*/)
    {
        return (I == 1) ? ((b[0] & 0x3) << 4)    // abbreviated 2nd symbol
                : (I == 2) ? ((b[1] & 0xF) << 2) // abbreviated 3rd symbol
                : throw std::domain_error("invalid last encoding symbol index in a tail");
    }

    template <typename Result, typename ResultState>
    static void decode_block(Result& decoded, ResultState&, const uint8_t* idx);

    template <typename Result, typename ResultState>
    static void decode_tail(Result& decoded, ResultState&, const uint8_t* idx, size_t idx_len);
};

template <typename CodecVariant>
template <typename Result, typename ResultState>
inline void base64<CodecVariant>::decode_block(
        Result& decoded, ResultState& state, const uint8_t* idx)
{
    data::put(decoded, state, static_cast<uint8_t>((idx[0] << 2) + ((idx[1] & 0x30) >> 4)));
    data::put(decoded, state, static_cast<uint8_t>(((idx[1] & 0xF) << 4) + ((idx[2] & 0x3C) >> 2)));
    data::put(decoded, state, static_cast<uint8_t>(((idx[2] & 0x3) << 6) + idx[3]));
}

template <typename CodecVariant>
template <typename Result, typename ResultState>
inline void base64<CodecVariant>::decode_tail(
        Result& decoded, ResultState& state, const uint8_t* idx, size_t idx_len)
{
    if (idx_len == 1) {
        throw invalid_input_length(
                "invalid number of symbols in last base64 block: found 1, expected 2 or 3");
    }

    // idx_len == 2: decoded size 1
    data::put(decoded, state, static_cast<uint8_t>((idx[0] << 2) + ((idx[1] & 0x30) >> 4)));
    if (idx_len == 2) {
        return;
    }

    // idx_len == 3: decoded size 2
    data::put(decoded, state, static_cast<uint8_t>(((idx[1] & 0xF) << 4) + ((idx[2] & 0x3C) >> 2)));
}

} // namespace detail
} // namespace cppcodec

#endif // CPPCODEC_DETAIL_BASE64


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using ToolBelt;
using System.IO;
using TsonLibrary;

namespace Vacuum
{
    public sealed class VacuumTarget
    {
		public FilterClass FilterClass { get; private set; }
		public string Name { get; private set; }
		public IList<ParsedPath> InputPaths { get; private set; }
		public IList<ParsedPath> OutputPaths { get; private set; }
		public FilterExtension Extension { get; private set; }
		public string Hash { get; private set; }
		public PropertyCollection Properties { get; private set; }
		public ContentFileV4.Target TargetNode{ get; set; }

		public VacuumTarget(
			ContentFileV4.Target rawTarget,
			VacuumContext vacuumContext)
		{
            this.TargetNode = rawTarget;
            this.Name = TargetNode.Name.Value;

			if (TargetNode.Inputs.Count == 0)
				throw new ContentFileException(TargetNode.Name, "Target must have at least one input");

			this.Properties = new PropertyCollection();
			this.Properties.Set("TargetName", this.Name);

			List<ParsedPath> inputPaths = new List<ParsedPath>();

			foreach (var rawInputFile in TargetNode.Inputs)
			{
				ParsedPath pathSpec = null;
				string s;

				try
				{
					s = vacuumContext.Properties.ExpandVariables(rawInputFile.Value, false);
					s = this.Properties.ExpandVariables(s);
				}
				catch (Exception e)
				{
					throw new ContentFileException(rawInputFile, e);
				}

				try
				{
					pathSpec = new ParsedPath(s, PathType.File).MakeFullPath();
				}
				catch (Exception e)
				{
					throw new ContentFileException("Bad path '{0}'".CultureFormat(s), e);
				}

				if (pathSpec.HasWildcards)
				{
					if (!Directory.Exists(pathSpec.VolumeAndDirectory))
					{
						throw new ContentFileException("Directory '{0}' does not exist".CultureFormat(pathSpec.VolumeAndDirectory));
					}

					IList<ParsedPath> files = DirectoryUtility.GetFiles(pathSpec, SearchScope.DirectoryOnly);

					if (files.Count == 0)
					{
						throw new ContentFileException("Wildcard input refers to no files after expansion");
					}

					inputPaths = new List<ParsedPath>(inputPaths.Concat(files));
				}
				else
				{
					inputPaths.Add(pathSpec);
				}
			}

			inputPaths.Sort();
			this.InputPaths = inputPaths;

			List<ParsedPath> outputPaths = new List<ParsedPath>();

			if (TargetNode.Outputs.Count == 0)
				throw new ContentFileException(TargetNode.Name, "Target must have at least one output");

			foreach (var rawOutputFile in TargetNode.Outputs)
			{
				string s;

				try
				{
					s = vacuumContext.Properties.ExpandVariables(rawOutputFile.Value, false);
					s = this.Properties.ExpandVariables(s);
				}
				catch (Exception e)
				{
					throw new ContentFileException(rawOutputFile, e);
				}

				try
				{
					ParsedPath outputFile = new ParsedPath(s, PathType.File).MakeFullPath();

					outputPaths.Add(outputFile);
				}
				catch (Exception e)
				{
					throw new ContentFileException("Bad path '{0}'".CultureFormat(s), e);
				}
			}

			outputPaths.Sort();
			this.OutputPaths = outputPaths;

			this.Extension = new FilterExtension(this.InputPaths.AsEnumerable(), this.OutputPaths.AsEnumerable());

			if (TargetNode.Filter == null || TargetNode.Filter.Value.Length == 0)
			{
				IEnumerator<FilterClass> e = vacuumContext.FilterClasses.GetEnumerator();

				while (e.MoveNext())
				{
					foreach (FilterExtension extension in e.Current.Extensions)
					{
						if (extension.Equals(this.Extension))
						{
							this.FilterClass = e.Current;
							break;
						}
					}

					if (this.FilterClass != null)
						break;
				}

				if (this.FilterClass == null)
				{
					throw new ArgumentException(
						"No filter found for target '{0}' handling extensions '{1}'".CultureFormat(this.Name, this.Extension.ToString()));
				}
			}
			else
			{
				// Search for the filter based on the supplied name and validate it handles the extensions
				foreach (var filterClass in vacuumContext.FilterClasses)
				{
					if (filterClass.Name.EndsWith(TargetNode.Filter.Value, StringComparison.OrdinalIgnoreCase))
					{
						this.FilterClass = filterClass;
						break;
					}
				}

				if (this.FilterClass == null)
					throw new ArgumentException("Supplied filter '{0}' was not found".CultureFormat(TargetNode.Filter));
			}

			SHA1 sha1 = SHA1.Create();
			StringBuilder sb = new StringBuilder();

			sb.Append(TargetNode.Inputs);
			sb.Append(TargetNode.Outputs);

			if (TargetNode.Filter != null)
				sb.Append(TargetNode.Filter);

			if (TargetNode.Parameters != null)
			{
                foreach (var keyValue in TargetNode.Parameters)
				{
					sb.Append(keyValue.Key.Value);
                    sb.Append(keyValue.Value.ToString());
				}
			}

			sha1.ComputeHash(Encoding.UTF8.GetBytes(sb.ToString()));
			Hash = BitConverter.ToString(sha1.Hash).Replace("-", "");
		}

		public override int GetHashCode()
		{
			return Name.GetHashCode();
		}
    }
}


text:
namespace gpu {

ImageFactory::ImageFactory() = default;

ImageFactory::~ImageFactory() = default;

bool ImageFactory::SupportsCreateAnonymousImage() const {
  return false;
}

scoped_refptr<gl::GLImage> ImageFactory::CreateAnonymousImage(
    const gfx::Size& size,
    gfx::BufferFormat format,
    gfx::BufferUsage usage,
    SurfaceHandle surface_handle,
    bool* is_cleared) {
  NOTREACHED();
  return nullptr;
}

unsigned ImageFactory::RequiredTextureType() {
  NOTIMPLEMENTED();
  return 0;
}

bool ImageFactory::SupportsFormatRGB() {
  return true;
}

}  // namespace gpu


text:
package abdi.formulario.locator;

import abdi.formulario.excecao.LocalizarObjetoException;
import abdi.formulario.fachada.IAplicacaoMBean;
import abdi.formulario.rest.IRestServico;
import abdi.formulario.rest.LocalizaServicoRest;
import abdi.formulario.rmi.LocalizaServicoEjb;

/**
 * Classe responsável por localizar objetos e serviços.
 *
 * @author Rogerio.Rodrigues
 */
public class AplicacaoServiceLocator {

    public static final String EJB = "ejb:";
    public static final String REST = "rest:";

    /**
     * Localiza um servico rest.
     *
     * @param jndi Nome do servico.
     * @return Interface para consumo.
     * @throws LocalizarObjetoException Erro ao localizar o objeto.
     */
    public IRestServico localizarRest(String jndi)
        throws LocalizarObjetoException {
        String providerPath = jndi.replaceAll(AplicacaoServiceLocator.REST, "");
        String[] caminho = providerPath.split("::");
        IRestServico servico = new LocalizaServicoRest(caminho[0], caminho[1]);
        return servico;
    }

    /**
     * Localiza um serviço ejb.
     *
     * @param jndi Nome do serviço.
     * @return Interface.
     * @throws LocalizarObjetoException Erro ao localizar o serviço.
     */
    public IAplicacaoMBean localizarEjb(String jndi)
        throws LocalizarObjetoException {
        LocalizaServicoEjb locator = new LocalizaServicoEjb();
        return locator.localizar(jndi);
    }

}


text:
package com.amazonaws.services.elasticloadbalancing.model;

import java.io.Serializable;

/**
 *
 */
public class AttachLoadBalancerToSubnetsResult implements Serializable, Cloneable {

    /**
     * The IDs of the subnets attached to the load balancer.
     */
    private com.amazonaws.internal.ListWithAutoConstructFlag<String> subnets;

    /**
     * The IDs of the subnets attached to the load balancer.
     *
     * @return The IDs of the subnets attached to the load balancer.
     */
    public java.util.List<String> getSubnets() {
        if (subnets == null) {
              subnets = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              subnets.setAutoConstruct(true);
        }
        return subnets;
    }

    /**
     * The IDs of the subnets attached to the load balancer.
     *
     * @param subnets The IDs of the subnets attached to the load balancer.
     */
    public void setSubnets(java.util.Collection<String> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<String> subnetsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(subnets.size());
        subnetsCopy.addAll(subnets);
        this.subnets = subnetsCopy;
    }

    /**
     * The IDs of the subnets attached to the load balancer.
     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setSubnets(java.util.Collection)} or {@link
     * #withSubnets(java.util.Collection)} if you want to override the
     * existing values.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param subnets The IDs of the subnets attached to the load balancer.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public AttachLoadBalancerToSubnetsResult withSubnets(String... subnets) {
        if (getSubnets() == null) setSubnets(new java.util.ArrayList<String>(subnets.length));
        for (String value : subnets) {
            getSubnets().add(value);
        }
        return this;
    }

    /**
     * The IDs of the subnets attached to the load balancer.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param subnets The IDs of the subnets attached to the load balancer.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public AttachLoadBalancerToSubnetsResult withSubnets(java.util.Collection<String> subnets) {
        if (subnets == null) {
            this.subnets = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<String> subnetsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(subnets.size());
            subnetsCopy.addAll(subnets);
            this.subnets = subnetsCopy;
        }

        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSubnets() != null) sb.append("Subnets: " + getSubnets() );
        sb.append("}");
        return sb.toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().hashCode());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;

        if (obj instanceof AttachLoadBalancerToSubnetsResult == false) return false;
        AttachLoadBalancerToSubnetsResult other = (AttachLoadBalancerToSubnetsResult)obj;

        if (other.getSubnets() == null ^ this.getSubnets() == null) return false;
        if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == false) return false;
        return true;
    }

    @Override
    public AttachLoadBalancerToSubnetsResult clone() {
        try {
            return (AttachLoadBalancerToSubnetsResult) super.clone();

        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }

    }

}


text:
SUITE(Core)
{
    TEST_FIXTURE(test_base, timeout)
    {
        azure::storage::cloud_blob_client client = test_config::instance().account().create_cloud_blob_client();
        azure::storage::cloud_blob_container container = client.get_container_reference(_XPLATSTR("this-container-does-not-exist"));

        utility::string_t timeout;

        azure::storage::operation_context context = m_context;
        context.set_sending_request([&timeout] (web::http::http_request& request, azure::storage::operation_context context) mutable
        {
            std::map<utility::string_t, utility::string_t> query_parameters = web::http::uri::split_query(request.request_uri().query());
            std::map<utility::string_t, utility::string_t>::iterator timeout_it = query_parameters.find(_XPLATSTR("timeout"));
            if (timeout_it != query_parameters.end())
            {
                timeout = timeout_it->second;
            }
            else
            {
                timeout.clear();
            }
        });

        {
            azure::storage::blob_request_options options;

            container.exists(options, context);

            CHECK(timeout.empty());
        }

        {
            azure::storage::blob_request_options options;
            options.set_server_timeout(std::chrono::seconds(20));

            container.exists(options, context);

            CHECK(!timeout.empty());
            CHECK_UTF8_EQUAL(_XPLATSTR("20"), timeout);
        }
    }

    TEST_FIXTURE(test_base, operation_context)
    {
        auto client = test_config::instance().account().create_cloud_blob_client();

        utility::string_t client_request_id;
        utility::string_t service_request_id;
        utility::string_t test_key;
        auto start_time = utility::datetime::utc_now();
        std::this_thread::sleep_for(std::chrono::milliseconds(10));

        azure::storage::operation_context context = m_context;
        context.set_client_request_id(_XPLATSTR("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"));
        context.user_headers().add(_XPLATSTR("x-ms-test-key"), _XPLATSTR("test-value"));
        context.set_sending_request([&client_request_id, &test_key] (web::http::http_request& request, azure::storage::operation_context context) mutable
        {
            client_request_id = request.headers().find(_XPLATSTR("x-ms-client-request-id"))->second;
            test_key = request.headers().find(_XPLATSTR("x-ms-test-key"))->second;
        });
        context.set_response_received([&service_request_id] (web::http::http_request&, const web::http::http_response& response, azure::storage::operation_context context) mutable
        {
            service_request_id = response.headers().find(_XPLATSTR("x-ms-request-id"))->second;
            std::this_thread::sleep_for(std::chrono::milliseconds(10));
        });

        auto container = client.get_container_reference(_XPLATSTR("this-container-does-not-exist"));
        container.exists(azure::storage::blob_request_options(), context);

        std::this_thread::sleep_for(std::chrono::milliseconds(10));
        auto end_time = utility::datetime::utc_now();

        CHECK_EQUAL(1U, context.request_results().size());
        auto result = context.request_results().front();

        CHECK(result.is_response_available());
        CHECK_UTF8_EQUAL(_XPLATSTR("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), client_request_id);
        CHECK_UTF8_EQUAL(service_request_id, result.service_request_id());
        CHECK_EQUAL(web::http::status_codes::NotFound, result.http_status_code());
        CHECK(start_time.to_interval() < result.start_time().to_interval());
        CHECK(end_time.to_interval() > result.end_time().to_interval());
        CHECK(result.end_time().to_interval() > result.start_time().to_interval());
    }

    TEST_FIXTURE(test_base, storage_uri)
    {
        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"));
        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://www.microsoft.com/test1"));
        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR(""));
        azure::storage::storage_uri(_XPLATSTR(""), _XPLATSTR("http://www.microsoft.com/test1"));
        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1/example1"), _XPLATSTR("http://www.microsoft.com/test1/example1"));

        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR(""), _XPLATSTR("")), std::invalid_argument);

        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://www.microsoft.com/test2")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://www.microsoft.com")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://www.microsoft.com/test1/")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://www.microsoft.com/test")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://www.microsoft.com/test11")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1/example1"), _XPLATSTR("http://www.microsoft.com/test1/example2")), std::invalid_argument);

        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1?parameter=value1"), _XPLATSTR("http://www.microsoft.com/test1?parameter=value1"));

        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1?parameter=value1"), _XPLATSTR("http://www.microsoft.com/test1")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1?parameter=value1"), _XPLATSTR("http://www.microsoft.com/test1?parameter=value2")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1?parameter=value1"), _XPLATSTR("http://www.microsoft.com/test1?parameter=value")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1?parameter=value1"), _XPLATSTR("http://www.microsoft.com/test1?parameter=value11")), std::invalid_argument);

        azure::storage::storage_uri(_XPLATSTR("http://127.0.0.1:10000/account/test1"), _XPLATSTR("http://127.0.0.1:10000/account-secondary/test1"));
        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://127.0.0.1:10000/account/test1"));
        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1/example1"), _XPLATSTR("http://127.0.0.1:10000/account/test1/example1"));
        azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1?parameter=value1"), _XPLATSTR("http://127.0.0.1:10000/account/test1?parameter=value1"));
        azure::storage::storage_uri(_XPLATSTR("http://127.0.0.1:10000/account"), _XPLATSTR("http://127.0.0.1:10000"));

        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://127.0.0.1:10000/account-secondary/test1"), _XPLATSTR("http://127.0.0.1:10000/account/test2")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1"), _XPLATSTR("http://127.0.0.1:10000/account/test2")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1/example1"), _XPLATSTR("http://127.0.0.1:10000/account/test2/example2")), std::invalid_argument);
        CHECK_THROW(azure::storage::storage_uri(_XPLATSTR("http://www.microsoft.com/test1?parameter=value1"), _XPLATSTR("http://127.0.0.1:10000/account/test1?parameter=value2")), std::invalid_argument);
    }

    TEST_FIXTURE(test_base, storage_exception)
    {
        azure::storage::cloud_blob blob(azure::storage::storage_uri(_XPLATSTR("http://www.nonexistenthost.com/test1")));

        bool caught_storage_exception = false;
        bool caught_http_exception = false;
        try
        {
            blob.exists();
        }
        catch (const azure::storage::storage_exception& ex1)
        {
            caught_storage_exception = true;

            try
            {
                std::rethrow_exception(ex1.inner_exception());
            }
            catch (web::http::http_exception&)
            {
                caught_http_exception = true;
            }
        }

        CHECK_EQUAL(true, caught_storage_exception);
        CHECK_EQUAL(true, caught_http_exception);
    }
}


text:
package com.myconnector.util;

public class BCryptDbPasswordEncoder implements DbPasswordEncoder {

	public String encodePassword(String plainTextPassword) {
		return BCrypt.hashpw(plainTextPassword, BCrypt.gensalt());
	}

	public boolean isPasswordValid(String plaintTextPassword, String saltedHashFromDb) {
		return BCrypt.checkpw(plaintTextPassword, saltedHashFromDb);
	}

}


text:
layout: relation
title: 'orphan'
redirect_from: "ga/dep/remnant.html"
shortdef: 'remnant in ellipsis'
---

The `orphan` label has not been applied to the Irish in this release. No examples have been observed yet, but should any be identified, they will be marked in subsequent versions of the treebank.


text:
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope
xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust">
    <s:Header>
        <wsa:Action s:mustUnderstand="1">
            http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
        </wsa:Action>
        <wsa:To s:mustUnderstand="1">
            [Live ID Auth Endpoint]
        </wsa:To>
        <ps:AuthInfo xmlns:ps="http://schemas.microsoft.com/LiveID/SoapServices/v1" Id="PPAuthInfo">
            <ps:HostingApp>[App GUID]</ps:HostingApp>
        </ps:AuthInfo>
        <wsse:Security>
            <wsse:UsernameToken wsu:Id="user">
                <wsse:Username>[user name]</wsse:Username>
                <wsse:Password>[password]</wsse:Password>
            </wsse:UsernameToken>
            <wsse:BinarySecurityToken
            ValueType="urn:liveid:device" id="DeviceDAToken">
                [device Token]
            </wsse:BinarySecurityToken>
            <wsu:Timestamp Id="Timestamp">
                <wsu:Created>[Created Time Value]</wsu:Created>
                <wsu:Expires>[Expires Time Value]</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </s:Header>
    <s:Body>
        <wst:RequestSecurityToken Id="RST0">
            <wst:RequestType>
                http://schemas.xmlsoap.org/ws/2005/02/trust/Issue
            </wst:RequestType>
            <wsp:AppliesTo>
                <wsa:EndpointReference>
                    <wsa:Address>[service target]</wsa:Address>
                </wsa:EndpointReference>
            </wsp:AppliesTo>
            <wsp:PolicyReference URI="[PolicyName]"></wsp:PolicyReference>
        </wst:RequestSecurityToken>
    </s:Body>
</s:Envelope>


text:
<button class="ms-Button ms-PanelAction-open">
  Open panel
</button>


text:
package org.vitrivr.cineast.core.features;

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

import org.vitrivr.cineast.core.config.ReadableQueryConfig;
import org.vitrivr.cineast.core.data.FloatVector;
import org.vitrivr.cineast.core.data.FloatVectorImpl;
import org.vitrivr.cineast.core.data.Pair;
import org.vitrivr.cineast.core.data.ReadableFloatVector;
import org.vitrivr.cineast.core.data.score.ScoreElement;
import org.vitrivr.cineast.core.data.segments.SegmentContainer;
import org.vitrivr.cineast.core.features.abstracts.SubDivMotionHistogram;
import org.vitrivr.cineast.core.util.MathHelper;

public class SubDivMotionHistogram5 extends SubDivMotionHistogram {

  public SubDivMotionHistogram5() {
    super("features_SubDivMotionHistogram5", "hists", MathHelper.SQRT2 * 25);
  }

  @Override
  public void processSegment(SegmentContainer shot) {
    if (!phandler.idExists(shot.getId())) {

      Pair<List<Double>, ArrayList<ArrayList<Float>>> pair = getSubDivHist(5, shot.getPaths());

      FloatVector sum = new FloatVectorImpl(pair.first);
      ArrayList<Float> tmp = new ArrayList<Float>(5 * 5 * 8);
      for (List<Float> l : pair.second) {
        for (float f : l) {
          tmp.add(f);
        }
      }
      FloatVectorImpl fv = new FloatVectorImpl(tmp);

      persist(shot.getId(), sum, fv);
    }
  }

  @Override
  public List<ScoreElement> getSimilar(SegmentContainer sc, ReadableQueryConfig qc) {
    Pair<List<Double>, ArrayList<ArrayList<Float>>> pair = getSubDivHist(5, sc.getPaths());

    ArrayList<Float> tmp = new ArrayList<Float>(5 * 5 * 8);
    for (List<Float> l : pair.second) {
      for (float f : l) {
        tmp.add(f);
      }
    }
    FloatVectorImpl fv = new FloatVectorImpl(tmp);
    return getSimilar(ReadableFloatVector.toArray(fv), qc);
  }

}


text:
@implementation INSTestChainOperation

+ (instancetype)operationWithAdditionalDataToPass:(INSTestChainOperationAdditionalParameterBlock)additionalDataToPass operationFinishBlock:(INSTestChainOperationFinishBlock)finishBlock {
    INSTestChainOperation *op = [[INSTestChainOperation alloc] init];
    op.additionalDataToPassBlock = additionalDataToPass;
    op.chainedOperationFinishedBlock = finishBlock;
    return op;
}

- (void)chainedOperation:(NSOperation *)operation didFinishWithErrors:(NSArray <NSError *>*)errors passingAdditionalData:(id)data {
    if (self.chainedOperationFinishedBlock) {
        self.chainedOperationFinishedBlock(operation,errors,data);
    }
}
- (id)additionalDataToPassForChainedOperation {
    if (self.additionalDataToPassBlock) {
        return self.additionalDataToPassBlock();
    }
    return nil;
}

@end


text:
import {browser, by, element, ElementFinder} from 'protractor';

describe('sidenav', () => {
  describe('opening and closing', () => {
    let sidenav: ElementFinder;

    beforeEach(() => {
      browser.get('/sidenav');
      sidenav = element(by.tagName('md-sidenav'));
    });

    it('should be closed', () => {
      expect(sidenav.isDisplayed()).toBeFalsy();
    });

    it('should open', () => {
      element(by.buttonText('Open sidenav')).click();
      expect(sidenav.isDisplayed()).toBeTruthy();
    });

    it('should close again', () => {
      element(by.buttonText('Open sidenav')).click();
      browser.sleep(50);
      element(by.buttonText('Open sidenav')).click();

      expect(sidenav.isDisplayed()).toBeFalsy();
    });
  });
});


text:
{-# LANGUAGE DeriveDataTypeable, NamedFieldPuns, RecordWildCards,
    ScopedTypeVariables, FlexibleContexts #-}

-- |
-- Module:      Network.Riak.Connection.Pool
-- Copyright:   (c) 2011 MailRank, Inc.
-- License:     Apache
-- Maintainer:  Mark Hibberd <mark@hibberd.id.au>, Nathan Hunter <nhunter@janrain.com>
-- Stability:   experimental
-- Portability: portable
--
-- A high-performance striped pooling abstraction for managing
-- connections to a Riak cluster. This is a thin wrapper around
-- 'Data.Pool'.
module Network.Riak.Connection.Pool
    (
      Pool
    , client
    , create
    , idleTime
    , maxConnections
    , numStripes
    , withConnection
    , withConnectionM
    ) where

import Control.Monad.Trans.Control (MonadBaseControl)
import Data.Time.Clock (NominalDiffTime)
import Data.Typeable (Typeable)
import Network.Riak (Client(clientID), Connection, connect, disconnect)
import Network.Riak.Connection (makeClientID)
import qualified Data.Pool as Pool

-- | A pool of connections to a Riak server.
--
-- This pool is \"striped\", i.e. it consists of several sub-pools
-- that are managed independently.
--
-- The total number of connections that can possibly be open at once
-- is 'maxConnections' * 'numStripes'.
data Pool = Pool {
      client :: Client
    -- ^ Client specification.  The client ID is ignored, and always
    -- regenerated automatically for each new connection.
    , pool :: Pool.Pool Connection
    } deriving (Typeable)

instance Show Pool where
    show p = "Pool { client = " ++ show (client p) ++ ", " ++
                    "numStripes = " ++ show (numStripes p) ++ ", " ++
                    "idleTime = " ++ show (idleTime p) ++ ", " ++
                    "maxConnections = " ++ show (maxConnections p) ++ "}"

instance Eq Pool where
    a == b = client a == client b && numStripes a == numStripes b &&
             idleTime a == idleTime b && maxConnections a == maxConnections b

-- | Create a new connection pool.
create :: Client
       -- ^ Client configuration.  The client ID is ignored, and
       -- always regenerated automatically for each new connection.
       -> Int
       -- ^ Stripe count.  The number of distinct sub-pools to
       -- maintain.  The smallest acceptable value is 1.
       -> NominalDiffTime
       -- ^ Amount of time for which an unused connection is kept
       -- open.  The smallest acceptable value is 0.5 seconds.
       --
       -- The elapsed time before closing may be a little longer than
       -- requested, as the reaper thread wakes at 2-second intervals.
       -> Int
       -- ^ Maximum number of connections to keep open per stripe.
       -- The smallest acceptable value is 1.
       --
       -- Requests for connections will block if this limit is reached
       -- on a single stripe, even if other stripes have idle
       -- connections available.
       -> IO Pool
create client ns it mc =
    Pool client `fmap` Pool.createPool c disconnect ns it mc
  where c = do
          cid <- makeClientID
          connect client { clientID = cid }

-- | Stripe count.  The number of distinct sub-pools to maintain.  The
-- smallest acceptable value is 1.
numStripes :: Pool -> Int
numStripes = Pool.numStripes . pool

-- | Amount of time for which an unused connection is kept open.  The
-- smallest acceptable value is 0.5 seconds.
--
-- The elapsed time before closing may be a little longer than
-- requested, as the reaper thread wakes at 1-second intervals.
idleTime :: Pool -> NominalDiffTime
idleTime = Pool.idleTime . pool

-- | Maximum number of connections to keep open per stripe.  The
-- smallest acceptable value is 1.
--
-- Requests for connections will block if this limit is reached on a
-- single stripe, even if other stripes have idle connections
-- available.
maxConnections :: Pool -> Int
maxConnections = Pool.maxResources . pool

-- | Temporarily take a connection from a 'Pool', perform an action
-- with it, and return it to the pool afterwards.
--
-- * If the pool has a connection available, it is used
--   immediately.
--
-- * Otherwise, if the maximum number of connections has not been
--   reached, a new connection is created and used.
--
-- * If the maximum number of connections has been reached, this
--   function blocks until a connection becomes available, then that
--   connection is used.
--
-- If the action throws an exception of any type, the 'Connection' is
-- destroyed, and not returned to the pool.
--
-- It probably goes without saying that you should never call
-- 'disconnect' on a connection, as doing so will cause a subsequent
-- user (who expects the connection to be valid) to throw an exception.
withConnection :: Pool -> (Connection -> IO a) -> IO a
withConnection = Pool.withResource . pool

-- | Temporarily take a connection from a 'Pool', perform an action
-- with it, and return it to the pool afterwards. This is a
-- generalization of 'withConnection', which remains specialized to
-- prevent breaking source compatibility with existing code.
--
-- * If the pool has a connection available, it is used
--   immediately.
--
-- * Otherwise, if the maximum number of connections has not been
--   reached, a new connection is created and used.
--
-- * If the maximum number of connections has been reached, this
--   function blocks until a connection becomes available, then that
--   connection is used.
--
-- If the action throws an exception of any type, the 'Connection' is
-- destroyed, and not returned to the pool.
--
-- It probably goes without saying that you should never call
-- 'disconnect' on a connection, as doing so will cause a subsequent
-- user (who expects the connection to be valid) to throw an exception.
withConnectionM :: MonadBaseControl IO m => Pool -> (Connection -> m a) -> m a
withConnectionM = Pool.withResource . pool


text:
package org.apache.flink.table.runtime.operators.window.assigners;

import org.apache.flink.api.common.ExecutionConfig;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.table.dataformat.BaseRow;
import org.apache.flink.table.runtime.operators.window.TimeWindow;

import java.time.Duration;
import java.util.Collection;
import java.util.Collections;

/**
 * A {@link WindowAssigner} that windows elements into fixed-size windows
 * based on the timestamp of the elements. Windows cannot overlap.
 */
public class TumblingWindowAssigner extends WindowAssigner<TimeWindow> implements InternalTimeWindowAssigner {

	private static final long serialVersionUID = -1671849072115929859L;
	/**
	 * Size of this window.
	 */
	private final long size;

	/**
	 * Offset of this window.  Windows start at time
	 * N * size + offset, where 0 is the epoch.
	 */
	private final long offset;

	private final boolean isEventTime;

	protected TumblingWindowAssigner(long size, long offset, boolean isEventTime) {
		if (size <= 0) {
			throw new IllegalArgumentException
				("TumblingWindowAssigner parameters must satisfy size > 0");
		}
		this.size = size;
		this.offset = offset;
		this.isEventTime = isEventTime;
	}

	@Override
	public Collection<TimeWindow> assignWindows(BaseRow element, long timestamp) {
		long start = TimeWindow.getWindowStartWithOffset(timestamp, offset, size);
		return Collections.singletonList(new TimeWindow(start, start + size));
	}

	@Override
	public TypeSerializer<TimeWindow> getWindowSerializer(ExecutionConfig executionConfig) {
		return new TimeWindow.Serializer();
	}

	@Override
	public boolean isEventTime() {
		return isEventTime;
	}

	@Override
	public String toString() {
		return "TumblingWindow(" + size + ")";
	}

	// ------------------------------------------------------------------------
	//  Utilities
	// ------------------------------------------------------------------------

	/**
	 * Creates a new {@code TumblingWindowAssigner} {@link WindowAssigner} that assigns
	 * elements to time windows based on the element timestamp.
	 *
	 * @param size The size of the generated windows.
	 * @return The time policy.
	 */
	public static TumblingWindowAssigner of(Duration size) {
		return new TumblingWindowAssigner(size.toMillis(), 0, true);
	}

	/**
	 * Creates a new {@code TumblingWindowAssigner} {@link WindowAssigner} that assigns
	 * elements to time windows based on the element timestamp and offset.
	 *
	 *
For example, if you want window a stream by hour,but window begins at the 15th minutes
	 * of each hour, you can use {@code of(Time.hours(1),Time.minutes(15))},then you will get
	 * time windows start at 0:15:00,1:15:00,2:15:00,etc.
	 *
	 *
Rather than that,if you are living in somewhere which is not using UTC±00:00 time,
	 * such as China which is using UTC+08:00,and you want a time window with size of one day,
	 * and window begins at every 00:00:00 of local time,you may use {@code of(Time.days(1),Time.hours(-8))}.
	 * The parameter of offset is {@code Time.hours(-8))} since UTC+08:00 is 8 hours earlier than UTC time.
	 *
	 * @param offset The offset which window start would be shifted by.
	 * @return The time policy.
	 */
	public TumblingWindowAssigner withOffset(Duration offset) {
		return new TumblingWindowAssigner(size, offset.toMillis(), isEventTime);
	}

	public TumblingWindowAssigner withEventTime() {
		return new TumblingWindowAssigner(size, offset, true);
	}

	public TumblingWindowAssigner withProcessingTime() {
		return new TumblingWindowAssigner(size, offset, false);
	}
}


text:
enum dummyFPenum
{
    #define REGDEF(name, rnum, mask, sname)  dummmy_##name = rnum,
    #include "registerfp.h"

    FP_VIRTUALREGISTERS,
};

// FlatFPStateX87 holds the state of the virtual register file. For each
// virtual register we keep track to which physical register we're
// mapping. We also keep track of the physical stack.

#define FP_PHYSICREGISTERS FP_VIRTUALREGISTERS
#define FP_VRNOTMAPPED     -1

struct FlatFPStateX87
{
public:
    void                    Init                    (FlatFPStateX87* pFrom = 0);
    bool                    Mapped                  (unsigned uEntry); // Is virtual register mapped
    void                    Unmap                   (unsigned uEntry); // Unmaps a virtual register
    void                    Associate               (unsigned uEntry, unsigned uStack);
    unsigned                StackToST               (unsigned uEntry); // Maps the stack to a ST(x) entry
    unsigned                VirtualToST             (unsigned uEntry);
    unsigned                STToVirtual             (unsigned uST);
    unsigned                TopIndex                ();
    unsigned                TopVirtual              ();
    void                    Rename                  (unsigned uVirtualTo, unsigned uVirtualFrom);
    unsigned                Pop                     ();
    void                    Push                    (unsigned uEntry);
    bool                    IsEmpty                 ();

    // Debug/test methods
    static bool             AreEqual                (FlatFPStateX87* pSrc, FlatFPStateX87* pDst);
    #ifdef DEBUG
    bool                    IsValidEntry            (unsigned uEntry);
    bool                    IsConsistent            ();
    void                    UpdateMappingFromStack  ();
    void                    Dump                    ();

    // In some optimizations the stack will be inconsistent in some transactions. We want to keep
    // the checks for everthing else, so if have the stack in an inconsistent state, you must
    // ignore it on purpose.
    bool                    m_bIgnoreConsistencyChecks;

    inline void IgnoreConsistencyChecks(bool bIgnore)
    {
        m_bIgnoreConsistencyChecks = bIgnore;
    }
    #else
    inline void IgnoreConsistencyChecks(bool bIgnore)
    {
    }
    #endif

    unsigned                m_uVirtualMap[FP_VIRTUALREGISTERS];
    unsigned                m_uStack[FP_PHYSICREGISTERS];
    unsigned                m_uStackSize;
};

#endif // FEATURE_STACK_FP_X87
#endif


text:
REGISTER_TEST_CASE(FlashDRM);

using pp::flash::DeviceID;
using pp::flash::DRM;
using pp::FileRef;
using pp::PassRef;
using pp::Var;

namespace {

const char kExepectedVoucherFilename[] = "plugin.vch";

// Check that the Hmonitor value is what it is expected to be for each platform.
bool CheckExpectedHmonitorValue(bool success, int64_t hmonitor) {
#if defined(PPAPI_OS_MACOSX)
  // TODO(raymes): Verify the expected |hmonitor| value on Mac.
  return success;
#elif defined(PPAPI_OS_WIN)
  MONITORINFO info = { sizeof(info) };
  return success &&
      ::GetMonitorInfo(reinterpret_cast<HMONITOR>(hmonitor), &info) == TRUE;
#else
  // Not implemented for other platforms, should return false.
  return !success;
#endif
}

}  // namespace

TestFlashDRM::TestFlashDRM(TestingInstance* instance)
    : TestCase(instance),
      callback_factory_(this) {
}

void TestFlashDRM::RunTests(const std::string& filter) {
  RUN_TEST(GetDeviceID, filter);
  RUN_TEST(GetHmonitor, filter);
  RUN_TEST(GetVoucherFile, filter);
}

std::string TestFlashDRM::TestGetDeviceID() {
  // Test the old C++ wrapper.
  // TODO(raymes): Remove this once Flash switches APIs.
  {
    DeviceID device_id(instance_);
    TestCompletionCallbackWithOutput<Var> output_callback(
        instance_->pp_instance());
    int32_t rv = device_id.GetDeviceID(output_callback.GetCallback());
    output_callback.WaitForResult(rv);
    ASSERT_TRUE(output_callback.result() == PP_OK);
    Var result = output_callback.output();
    ASSERT_TRUE(result.is_string());
    std::string id = result.AsString();
    ASSERT_FALSE(id.empty());
  }

  {
    DRM drm(instance_);
    TestCompletionCallbackWithOutput<Var> output_callback(
        instance_->pp_instance());
    int32_t rv = drm.GetDeviceID(output_callback.GetCallback());
    output_callback.WaitForResult(rv);
    ASSERT_TRUE(output_callback.result() == PP_OK);
    Var result = output_callback.output();
    ASSERT_TRUE(result.is_string());
    std::string id = result.AsString();
    ASSERT_FALSE(id.empty());
  }

  PASS();
}

std::string TestFlashDRM::TestGetHmonitor() {
  DRM drm(instance_);
  int64_t hmonitor;
  while (true) {
    bool success = drm.GetHmonitor(&hmonitor);
    if (CheckExpectedHmonitorValue(success, hmonitor))
      break;
    else
      PlatformSleep(30);
  }

  PASS();
}

std::string TestFlashDRM::TestGetVoucherFile() {
  DRM drm(instance_);
  TestCompletionCallbackWithOutput<FileRef> output_callback(
      instance_->pp_instance());
  int32_t rv = drm.GetVoucherFile(output_callback.GetCallback());
  output_callback.WaitForResult(rv);
  ASSERT_EQ(PP_OK, output_callback.result());
  FileRef result = output_callback.output();
  ASSERT_EQ(PP_FILESYSTEMTYPE_EXTERNAL, result.GetFileSystemType());

  // The PPB_FileRefPrivate interface doesn't have a C++ wrapper yet, so just
  // use the C interface.
  const PPB_FileRefPrivate* file_ref_private =
      static_cast<const PPB_FileRefPrivate*>(
          pp::Module::Get()->GetBrowserInterface(PPB_FILEREFPRIVATE_INTERFACE));
  ASSERT_TRUE(file_ref_private);
  Var path(PassRef(), file_ref_private->GetAbsolutePath(result.pp_resource()));
  ASSERT_TRUE(path.is_string());
  std::string path_string = path.AsString();
  std::string expected_filename = std::string(kExepectedVoucherFilename);
  ASSERT_EQ(expected_filename,
            path_string.substr(path_string.size() - expected_filename.size()));

  PASS();
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<parent>
		<artifactId>cucumber-howto</artifactId>
		<groupId>com.scottidiuccio.cucumber-howto</groupId>
		<version>1.0-SNAPSHOT</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>

	<artifactId>cucumber-helpless</artifactId>

	<description>
		This project provides a maven mojo for using cucumber-reporting to publish pretty html reports for Cucumber.
		It works by generating html from the cucumber json report formatter.
		So can be used anywhere a json report is generated. Current use is in the cucumber jenkins
		plugin and a maven mojo to generate the same report from mvn command line when running locally.
	</description>

	<licenses>
		<license>
			<name>LGPL 2.1</name>
			<url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>nicsco</id>
			<name>Nicola Scotti di Uccio</name>
			<email>nicola.scottidiuccio@gmail.com</email>
		</developer>
	</developers>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
	</dependencies>

</project>


text:
eclipse-from-idea-development
=============================

Plugin for IntelliJ IDEA for painless Eclipse plugins development


text:
<!DOCTYPE html>

    <meta content='text/html;charset=utf-8' http-equiv='Content-Type'>
    <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
    <title>Lab Grapher</title>
    <link href='../lab.grapher.css' rel='stylesheet' type='text/css'>
    <link href='examples.css' rel='stylesheet' type='text/css'>

Lab Grapher

        Select Graph Size:
        <select id='select-size'>
          <option value='large'>large</option>
          <option selected value='medium'>medium</option>
          <option value='small'>small</option>
          <option value='tiny'>tiny</option>
          <option value='icon'>icon</option>
        </select>
        Responsive Layout:
        <input id='responsive-layout' type='checkbox'>
        Select Data:
        <select id='select-data'>
          <option selected value='fake'>Fake Data</option>
          <option value='earth-surface-temperature'>Earth's Surface Temperature</option>
          <option value='world-population'>World Population</option>
          <option value='world-population-semi-log'>World Population (semi-log)</option>
          <option value='md2d-center-of-mass'>MD2D Center of Mass Analysis</option>
          <option value='stair-steps'>Stair Steps</option>
          <option value='streaming'>Streaming Data</option>
          <option value='earth-surface-temperature-samples'>Earth's Surface Temperature (using samples)</option>
          <option value='realtime-markers'>Realtime w/ Markers</option>
          <option value='multiline-realtime-markers'>Realtime Multiple Lines w/ Markers</option>
        </select>

About the Graph

Drag on the canvas to translate/pan the graph.

double-click on the canvas to zoom in

shift-double-click on the canvas to zoom out

Drag on one of the X or Y axis numeric labels to re-scale that axis

hold ALT/Option key down and drag in the graph to re-scale both X and Y axes

click on a data point to select it

drag a selected data point up or down to change it's value

enter the delete or backspace key to delete a selected data point

hold the ALT/Option and SHIFT keys down and click an empty area of the graph to add a data point


text:
<?php

namespace Google\Service\MyBusinessVerifications;

class ListVerificationsResponse extends \Google\Collection
{
  protected $collection_key = 'verifications';
  /**
   * @var string
   */
  public $nextPageToken;
  protected $verificationsType = Verification::class;
  protected $verificationsDataType = 'array';

  /**
   * @param string
   */
  public function setNextPageToken($nextPageToken)
  {
    $this->nextPageToken = $nextPageToken;
  }
  /**
   * @return string
   */
  public function getNextPageToken()
  {
    return $this->nextPageToken;
  }
  /**
   * @param Verification[]
   */
  public function setVerifications($verifications)
  {
    $this->verifications = $verifications;
  }
  /**
   * @return Verification[]
   */
  public function getVerifications()
  {
    return $this->verifications;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListVerificationsResponse::class, 'Google_Service_MyBusinessVerifications_ListVerificationsResponse');


text:
package es.tid.pce.pcep.objects.subobjects;

import java.util.Arrays;

public abstract class XROSubobject {

	protected int type;
	protected int erosolength;//ERO Subobject Length
	protected boolean loosehop=false;
	protected byte [] subobject_bytes;

	protected int attribute;

	public XROSubobject(){

	}

	public XROSubobject(byte[] bytes, int offset) {
		erosolength=(int)bytes[offset+1];
		this.subobject_bytes=new byte[erosolength];
		System.arraycopy(bytes, offset, subobject_bytes, 0, erosolength);
		decodeSoHeader();
	}
	public abstract void encode();

	public abstract void decode();

	public void encodeSoHeader(){
		if (loosehop){
			subobject_bytes[0]=(byte)(0x80 | (type & 0x7F));
		}
		else {
			subobject_bytes[0]=(byte)(type & 0x7F);
		}
			subobject_bytes[1]=(byte)erosolength;
	}

	public void decodeSoHeader() {
		int lhopbit= (int)((subobject_bytes[0]>>7)&0x01);
		if (lhopbit==1){
			loosehop=true;
		}
		else {
			loosehop=false;
		}
		type=subobject_bytes[0]&0x7F;
		erosolength=(int)subobject_bytes[1];
	}

	public static int getLength(byte []bytes, int offset) {
		int len=(int)bytes[offset+1];
		return len;
	}

	public static int getType(byte []bytes, int offset) {
		int typ=bytes[offset]& 0x7F;
		return typ;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getErosolength() {
		return erosolength;
	}

	public void setErosolength(int erosolength) {
		this.erosolength = erosolength;
	}

	public boolean isLoosehop() {
		return loosehop;
	}

	public void setLoosehop(boolean loosehop) {
		this.loosehop = loosehop;
	}

	public byte[] getSubobject_bytes() {
		return subobject_bytes;
	}

	public void setSubobject_bytes(byte[] subobject_bytes) {
		this.subobject_bytes = subobject_bytes;
	}

	public int getAttribute() {
		return attribute;
	}

	public void setAttribute(int attribute) {
		this.attribute = attribute;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + attribute;
		result = prime * result + erosolength;
		result = prime * result + (loosehop ? 1231 : 1237);
		result = prime * result + Arrays.hashCode(subobject_bytes);
		result = prime * result + type;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		XROSubobject other = (XROSubobject) obj;
		if (attribute != other.attribute)
			return false;
		if (erosolength != other.erosolength)
			return false;
		if (loosehop != other.loosehop)
			return false;
		if (!Arrays.equals(subobject_bytes, other.subobject_bytes))
			return false;
		if (type != other.type)
			return false;
		return true;
	}

}