text:
#ifndef DSLICE_SLICER_DYNAMIC_SLICER_H_
#define DSLICE_SLICER_DYNAMIC_SLICER_H_

#include <cmath>
#include <algorithm>
#include "slicing_report.h"

#define EPSILON 1e-6

namespace dslice {

class DynamicSlicer {
/*
 * For dynamic slicing
 * Parameter lambda in all slicing methods is the penalty for introducing an
   additional slice, i.e., it is used to avoid making too many slices.
   lambda corresponds to the type I error under the scenario that the two
   variables are independent.
   lambda should be greater than 0.
 * Parameter granularity is used in the scenario of large sample size.
   granularity specifies the minimum number of sample in each slice.
   granularity should be a positive integer.
 * Parameter alpha in OneSampleSlicing penalizes both the width and the number
   of slices to avoid too many slices and degenerate slice (interval).
   alpha should be greater than 1.
 * For Bayesian slicing
 * Parameter lambda corresponds to the probability that makes slice in each
   possible position.
   lambda should be greater than 0.
 * Parameter alpha is hyper-parameter of the prior distribution of frequency in
   each slice. alpha should be greater than 0 and less equal than the factor
   level of current investigated variable.
 */

public:
	/*
	 * \brief: dynamic slicing
	 * \param: factor, with value and level
	 * \param: penalty of introducing an additional slice
	 * \param: graunlarity of slicing
	 * \return: details of dynamic slicing
	 */
	dslice::SlicingReport Slicing(const dslice::Factor& variable,
	                              ds_double lambda,
	                              ds_uint granularity = 1);
	/*
	 * \brief: dynamic slicing
	 * \param: factor, with value and level
	 * \param: penalty of introducing an additional slice
	 * \param: rank of response
	 * \return: details of dynamic slicing
	 */
	dslice::SlicingReport Slicing(const dslice::Factor& variable,
	                              ds_double lambda,
	                              const std::vector<ds_uint>& rank);
	/*
	 * \brief: dynamic slicing for one-sample testing, equal bin version
	 * \param: quantile mapped to a given cdf
	 * \param: penalty of introducing an additional slice
	 * \param: rank of response, used if there are ties in ranking
	 * \return: statictics of dynamic slicing
	 */
	ds_double OneSampleSlicing(const std::vector<ds_double>& quantile,
	                           ds_double lambda);
	/*
	 * \brief: dynamic slicing for one-sample testing
	 * \param: quantile mapped to a given cdf
	 * \param: penalty of introducing an additional slice
	 * \param: penalizes both the width and the number of slices
	 * \return: statictics of dynamic slicing
	 */
	ds_double OneSampleSlicing(const std::vector<ds_double>& quantile,
	                           ds_double lambda,
	                           ds_double alpha);
	/*
	 * \brief: Bayesian slicing
	 * \param: factor, with value and level
	 * \param: corresponds the probability that makes slice in each possible position
	 * \param: hyper-parameter of the prior distribution of frequency in each slice
	 * \param: graunlarity of slicing
	 * \return: statictics of Bayesian slicing
	 */
	ds_double BayesianSlicing(const dslice::Factor& variable,
	                          ds_double lambda,
	                          ds_double alpha,
	                          ds_uint granularity = 1);
	/*
	 * \brief: Bayesian slicing
	 * \param: factor, with value and level
	 * \param: preselected factor, with value and level
	 * \param: corresponds the probability that makes slice in each possible position
	 * \param: hyper-parameter of the prior distribution of frequency in each slice
	 * \param: graunlarity of slicing
	 * \return: statictics of Bayesian slicing
	 */
	ds_double BayesianSlicing(const dslice::Factor& variable,
	                          const dslice::Factor& selected,
	                          ds_double lambda,
	                          ds_double alpha,
	                          ds_uint granularity = 1);

private:
	/*
	 * \brief: clustering adjacent samples with the sample value
	 * \param: factor, with value and level
	 * \return: cumsum count table of each value with level of variable
	 */
	dslice::Darray<ds_double> Clump(const dslice::Factor& variable);
	/*
	 * \brief: clustering adjacent samples with the sample value
	 * \param: factor, with value and level
	 * \param: graunlarity of clumping
	 * \return: cumsum count table of each value with level of variable
	 */
	dslice::Darray<ds_double> Clump(const dslice::Factor& variable,
	                                ds_uint granularity);
	/*
	 * \brief: clustering adjacent samples with the sample value
	 * \param: factor, with value and level
	 * \param: rank information of continuous variable
	 * \return: cumsum count table of each value with level of variable
	 */
	dslice::Darray<ds_double> Clump(const dslice::Factor& variable,
	                                const std::vector<ds_uint>& rank);
	/*
	 * \brief: wrapper of DynamicSlicing, return details of slicing
	 * \param: cumsum count table of each value
	 * \param: penalty of introducing an additional slice
	 * \return: details of dynamic slicing
	 */
	dslice::SlicingReport SlicingImplement(const dslice::Darray<ds_double>& count_table,
	                                       ds_double penalty);
	/*
	 * \brief: return slicing strategy generate the max score
	 * \param: cumsum count table of each value
	 * \param: penalty of introducing an additional slice
	 * \return: dynamic programming strategy table and log likelihood of slicing
	 */
	dslice::DPTable DynamicSlicing(const dslice::Darray<ds_double>& count_table,
	                               ds_double penalty);
	/*
	 * \brief: generate all possible slicing strategy via dynamic programming
	 * \param: dynamic programming strategy table
	 * \return: optimal slicing strategy
	 */
	std::vector<ds_uint> Backtracking(const std::vector<ds_uint>& global_incision);
	/*
	 * \brief: generate counts in each slice.
	 * \param: optimal slicing strategy
	 * \param: cumsum count table of each value
	 * \return: counts of each value in slice
	 */
	dslice::Darray<ds_uint> Summary(const std::vector<ds_uint>& optimal_incision,
	                                const dslice::Darray<ds_double>& count_table);
	/*
	 * \brief: genreate cumsum count table of each value
	 * \param: factor, with value and level
	 * \return: cumsum count table of each value
	 */
	dslice::Darray<ds_uint> GenerateCountTable(const dslice::Factor& variable);
	/*
	 * \brief: genreate cumsum count table of each value
	 * \param: factor, with value and level
	 * \param: graunlarity of clumping
	 * \return: cumsum count table of each value
	 */
	dslice::Darray<ds_uint> GenerateCountTable(const dslice::Factor& variable,
	                                           ds_uint granularity);
	/*
	 * \brief: genreate cumsum count table of each value
	 * \param: factor, with value and level
	 * \param: preselected factor, with value and level
	 * \return: cumsum count table of each value
	 */
	dslice::Darray<ds_uint> GenerateCountTable(const dslice::Factor& variable,
	                                           const dslice::Factor& selected);
	/*
	 * \brief: genreate cumsum count table of each value
	 * \param: factor, with value and level
	 * \param: preselected factor, with value and level
	 * \param: graunlarity of clumping
	 * \return: cumsum count table of each value
	 */
	dslice::Darray<ds_uint> GenerateCountTable(const dslice::Factor& variable,
	                                           const dslice::Factor& selected,
	                                           ds_uint granularity);
	/*
	 * \brief: calculate Bayes factor for unconditional independent
	 * \param: cumsum count table of each value with level of current investigated variable
	 * \param: penalty of slicing
	 * \param: parameter of prior probability of slicing
	 * \return: Bayes factor
	 */
	ds_double CalculateBayesFactor(const dslice::Darray<ds_uint>& count_table,
	                               ds_double lambda,
	                               ds_double alpha);
	/*
	 * \brief: calculate Bayes factor for conditional independent
	 * \param: cumsum count table of each value with level = levlel_1 * levlel_2
	 * \param: penalty of slicing
	 * \param: parameter of prior probability of slicing
	 * \param: factor level of current investigated variable
	 * \return: Bayes factor
	 */
	ds_double CalculateBayesFactor(const dslice::Darray<ds_uint>& count_table,
	                               ds_double lambda,
	                               ds_double alpha,
	                               ds_uint variable_level);

};

} // namespace dslice

#endif // DSLICE_SLICER_DYNAMIC_SLICER_H_


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

<resources>
	<string name="define_tourguide">year;owner</string>
	<!-- Author section -->
	<string name="library_tourguide_author">Tan Jun Rong</string>
	<string name="library_tourguide_authorWebsite">http://jrcorner.wordpress.com</string>
	<!-- Library section -->
	<string name="library_tourguide_libraryName">TourGuide</string>
	<string name="library_tourguide_libraryDescription">TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the example below(this is a trivial example for demo purpose):</string>
	<string name="library_tourguide_libraryWebsite">https://github.com/worker8/</string>
	<string name="library_tourguide_libraryVersion">1.0.17</string>
	<!-- OpenSource section -->
	<string name="library_tourguide_isOpenSource">true</string>
	<string name="library_tourguide_repositoryLink">https://github.com/worker8/TourGuide</string>
	<!-- ClassPath for autoDetect section -->
	<string name="library_tourguide_classPath">tourguide.tourguide.ToolTip</string>
	<!-- License section -->
	<string name="library_tourguide_licenseId">mit</string>
	<!-- Custom variables section -->
	<string name="library_tourguide_owner">Tan Jun Rong</string>
	<string name="library_tourguide_year">2016</string>
</resources>

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Lembosia tikusensis Hansf.

### Remarks
null


text:
ActsPresentably is a gem that makes it easy to emit different JSON representations for your models.
Say you're building an API and you need different JSON structures of the same model for different API calls.
The presenter pattern can really help you here.  Presenters are the equivalent of views, but for your JSON representations.
So, you can keep your models separate from the different ways you want to emit them.

## Installation

Add this line to your application's Gemfile:

    gem 'acts_presentably'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install acts_presentably

## Usage
To create a presenter for your User class, first create a presenter in app/presenters.
The easiest way to setup your presenter is to define its "fields" and any "associations".

    class PostPresenter < ActsPresentably::Presenters::DefaultPresenter
      fields :title, :text
      associations :author
    end

For maximum flexibility simply override ```as_json```.
@object is the object you're creating the json for, and is available in all methods.

You can even specify a different presentation name for your attribute:

    class AlternativePostPresenter < ActsPresentably::Presenters::DefaultPresenter
      def as_json(options = {})
        {
          :name => @object.title
        }
      end

    end

Now in your ActiveRecord model add the acts\_presentably line.

    class Post
      acts_presentably
    end

Now you can run...

    @post = Post.new(:title => 'First Post', :text => 'Annoying first post')
    @post.to_json
    @post.to_json(:post_presenter => PostAlternativePresenter )

Finally, if you're not sure whether a model will act presentably, simply ask it:
    @post.presentable?
    => true
    @hipster.presentable?
    => false

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
package com.monsterlin.blives.bean;

import cn.bmob.v3.BmobObject;
import cn.bmob.v3.datatype.BmobFile;

/**
 * 校园风光
 * Created by monsterLin on 2016/4/7.
 */
public class Scenery extends BmobObject {
    private String sceneryintro;  //描述
    private BmobFile sceneryimg;   //图片

    public String getSceneryintro() {
        return sceneryintro;
    }

    public void setSceneryintro(String sceneryintro) {
        this.sceneryintro = sceneryintro;
    }

    public BmobFile getSceneryimg() {
        return sceneryimg;
    }

    public void setSceneryimg(BmobFile sceneryimg) {
        this.sceneryimg = sceneryimg;
    }
}


text:
<!DOCTYPE html>

  <title>OOP</title>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="../stylesheets/blog-stylesheets.css">
  <link rel="stylesheet" type="text/css" href="http://pastie.org/stylesheets/themes/slate.css">

Idle Musings

Classes vs Modules

OOP with Classes and Modules

Sunday, 1 February 2015

          Back to Blog Home

          Object Oriented Programming (OOP) is like building your own matrix. Just like 'The Architect' in the Matrix, who created this virtual world called 'The Matrix' with code. It was a replica of the real world but was not the real world. It did behave like the real world as well. But it had its own little tricks.

          Lets try to understand OOP by understanding the Architects way of programming The Matrix. The way he build it, all of the people in the matrix were instances of the person class. The animals and vehicles in the matrix were instances of their own parent classes. I hope I still got your attention so far. Lets move on. So this is the concept of object-oriented programming. We define objects/classes, depicting real world objects. Now we can define a specific thing which is an instance of the object/class we created.

          Lets take an example and look at some code to see how this works. Say we want to create our own matrix. But this one is just a little animal shed. In this Matrix shed we have 3 different types of animals; dogs, sheep and bunnies. We start with creating an animal object from which these animals with inherit or be instances of. Here is our animal class.

class Animal

  attr_accessor :legs, :type, :color, :diet

  def initialize(color)
    @legs = 4
    @color = color
  end

end

          Lets create a dog, a bunny and a sheep inheriting from Animal.

class Dog < Animal

  def initialize(color)
    super
    @type = 'dog'
    @diet = 'omnivore'
  end

end

class Bunny < Animal

  def initialize(color)
    super
    @type = 'bunny'
    @diet = 'herbivore'
  end

end

class Sheep < Animal

  def initialize(color)
    super
    @type = 'sheep'
    @diet = 'herbivore'
  end

end

          When we create instances of these animals this is what we get.

dog = Dog.new('grey')
p dog.legs #=> 4
p dog.diet #=> "omnivore"
p dog.color #=> "grey"
p dog.type #=> "dog"

bunny = Bunny.new('white')
p bunny.legs #=> 4
p bunny.diet #=> "herbivore"
p bunny.color #=> "white"
p bunny.type #=> "bunny"

sheep = Sheep.new('black')
p sheep.diet #=> "herbivore"
p sheep.color #=> "black"
p sheep.type #=> "sheep"

          This is what classes are in OOP. Lets get into Modules now. Modules are more like libraries, or better described as a snippet of code that can be reused across multiple classes. A module is does not really fall into the OOP concept, but its a nice thing to have in ruby that lets you choose your design pattern. Think like a configuration item that we want a class to have if needed. Also, having it as a module, it lets us change the configuration at one place without affecting the class itself.

          Say our Matrix animal shed is in springfield, right next to Mr. Burns nuclear plant. So because of the location and how the bunnies and sheep run around the yard and drink from the plant waste; they turn radioactive vampires. Here we can create a module for exactly that and let sheep and bunny use it.

module RadioActive

  def mutation
    puts 'Im radio active vampire ...Grrrr'
  end

end

          This module will be included for Sheep and Bunny classes as follow:

class Bunny < Animal

  include RadioActive

  def initialize(color)
    super
    @type = 'bunny'
    @diet = 'herbivore'
  end

end

class Sheep < Animal

  include RadioActive

  def initialize(color)
    super
    @type = 'sheep'
    @diet = 'herbivore'
  end

end

        Lets see what we get when we create the instance of these two possible radioactive animals.

bunny = Bunny.new('white')
p bunny.mutation #=> Im radio active vampire ...Grrrr
p bunny.type #=> "bunny"

sheep = Sheep.new('black')
p sheep.mutation #=> Im radio active vampire ...Grrrr
p sheep.type #=> "sheep"

My Github

 © theidlemonk


text:
package com.bernardomg.tabletop.dice.visitor;

import static com.google.common.base.Preconditions.checkNotNull;

import java.util.Stack;
import java.util.function.BiFunction;
import java.util.function.Function;

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

import com.bernardomg.tabletop.dice.Dice;
import com.bernardomg.tabletop.dice.history.DefaultRollHistory;
import com.bernardomg.tabletop.dice.history.DefaultRollResult;
import com.bernardomg.tabletop.dice.history.RollHistory;
import com.bernardomg.tabletop.dice.history.RollResult;
import com.bernardomg.tabletop.dice.notation.DiceNotationExpression;
import com.bernardomg.tabletop.dice.notation.operand.ConstantOperand;
import com.bernardomg.tabletop.dice.notation.operand.DiceOperand;
import com.bernardomg.tabletop.dice.notation.operation.AdditionOperation;
import com.bernardomg.tabletop.dice.notation.operation.BinaryOperation;
import com.bernardomg.tabletop.dice.notation.operation.DivisionOperation;
import com.bernardomg.tabletop.dice.notation.operation.MultiplicationOperation;
import com.bernardomg.tabletop.dice.notation.operation.SubtractionOperation;
import com.google.common.collect.Iterables;

/**
 * Stores all the rolls generated from the expressions.
 *

 * Integer values are handled as a roll, just with a constant value.
 *
 * @author Bernardo Martínez Garrido
 *
 */
public final class DiceRollAccumulator
        implements NotationAccumulator<RollHistory> {

    /**
     * Logger.
     */
    private static final Logger              LOGGER  = LoggerFactory
            .getLogger(DiceRollAccumulator.class);

    /**
     * The last expression received.
     */
    private DiceNotationExpression           previous;

    /**
     * All the results generated so far.
     */
    private final Stack<RollResult>          results = new Stack<>();

    /**
     * Generator for the rolls.
     */
    private final Function<Dice, RollResult> rollGenerator;

    /**
     * The text values generated so far.
     *

     * It always contain the text representation of all the nodes parsed so far,
     * along temporal texts to keep building the final result.
     */
    private final Stack<String>              texts   = new Stack<>();

    /**
     * The expression values generated so far.
     *

     * It always contain the sum of all the nodes parsed so far, along temporal
     * values to keep building the final result.
     */
    private final Stack<Integer>             values  = new Stack<>();

    /**
     * Constructs an accumulator with the specified arguments.
     *
     * @param generator
     *            roll generator to use
     */
    public DiceRollAccumulator(final Function<Dice, RollResult> generator) {
        super();

        rollGenerator = checkNotNull(generator,
                "Received a null pointer as roll generator");
    }

    @Override
    public final void binaryOperation(final BinaryOperation exp) {
        final Integer operandA;
        final Integer operandB;
        final BiFunction<Integer, Integer, Integer> operation;
        final String textA;
        final String textB;
        final String op;
        Integer value;
        RollResult rollResult;

        // Operation
        // Takes back the two latest values and applies
        operandB = values.pop();
        operandA = values.pop();
        operation = exp.getOperation();
        value = operation.apply(operandA, operandB);
        values.push(value);

        op = getOperationText(exp);
        textA = texts.pop();
        textB = texts.pop();
        texts.push(textB + op + textA);

        if ((exp instanceof SubtractionOperation)
                && (previous instanceof ConstantOperand)) {
            // This is a subtraction
            // The previous value was a constant
            // The sign is changed
            rollResult = results.pop();
            value = 0 - rollResult.getTotalRoll();
            rollResult = new DefaultRollResult(value);
            results.push(rollResult);
        }

        previous = exp;
    }

    @Override
    public final void constantOperand(final ConstantOperand exp) {
        final Integer value;
        final RollResult rollResult;

        // Constant
        // Stores the value
        value = exp.getValue();
        rollResult = new DefaultRollResult(value);
        results.add(rollResult);

        values.push(rollResult.getTotalRoll());

        texts.push(rollResult.getTotalRoll().toString());

        previous = exp;
    }

    @Override
    public final void diceOperand(final DiceOperand exp) {
        final RollResult rollResult;

        // Dice
        // Generates a random value

        // This would be chained with the grammar functions
        // roller = rollGenerator.andThen(transformer);
        rollResult = rollGenerator.apply(exp.getDice());
        results.add(rollResult);

        values.push(rollResult.getTotalRoll());

        if (Iterables.size(rollResult.getAllRolls()) > 1) {
            texts.push(rollResult.getAllRolls().toString());
        } else {
            texts.push(rollResult.getTotalRoll().toString());
        }

        previous = exp;
    }

    @Override
    public final RollHistory getValue() {
        final String text;
        final Integer result;

        if (values.isEmpty()) {
            // By default the returned value is 0
            result = 0;
        } else {
            // The value which is left is returned
            result = values.pop();
        }

        if (texts.isEmpty()) {
            text = "";
        } else {
            text = texts.pop();
        }

        return new DefaultRollHistory(results, text, result);
    }

    @Override
    public final void reset() {
        previous = null;
        results.clear();
        texts.clear();
        values.clear();
    }

    /**
     * Returns the text value of the received operation.
     *
     * @param exp
     *            expression containing the operation
     * @return text value of the operation
     */
    private final String getOperationText(final BinaryOperation exp) {
        final String text;

        if (exp instanceof AdditionOperation) {
            text = " + ";
        } else if (exp instanceof SubtractionOperation) {
            text = " - ";
        } else if (exp instanceof MultiplicationOperation) {
            text = " * ";
        } else if (exp instanceof DivisionOperation) {
            text = " / ";
        } else {
            LOGGER.warn("Unsupported expression of type {}", exp.getClass());
            text = "";
        }

        return text;
    }

}


text:
using System.Windows.Input;
using System.Windows.Media;

namespace SuperShell.Infrastructure.Commands
{
	/// <summary>
	/// Represents the command which can be executed within the Shell
	/// It is just a wrapper around ordinary <see cref="ICommand">ICommand</see>
	/// </summary>
	public interface IShellCommand
	{
		string Header { get; }
		string HeaderForMenu { get; }

		ImageSource Icon { get; }

		KeyGesture HotKey { get; }

		ICommand Command { get; }
	}
}


text:
package org.apache.batik.test.svg;

import org.apache.batik.transcoder.image.ImageTranscoder;
import org.apache.batik.transcoder.image.PNGTranscoder;

/**
 * Checks for regressions in rendering of a document with a given
 * alternate stylesheet.
 *
 * @author Stephane Hillion
 * @version $Id$
 */
public class SVGAlternateStyleSheetRenderingAccuracyTest
    extends ParametrizedRenderingAccuracyTest {
    /**
     * Returns the ImageTranscoder the Test should
     * use
     */
    public ImageTranscoder getTestImageTranscoder(){
        ImageTranscoder t = super.getTestImageTranscoder();
        t.addTranscodingHint(PNGTranscoder.KEY_ALTERNATE_STYLESHEET,
                             parameter);
        return t;
    }

}


text:
// Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
#include "MedusaPreCompiled.h"
#include "ShaderFactory.h"
#include "Resource/Effect/Shader/Vertex/BaseVertexShader.h"
#include "Resource/Effect/Shader/Pixel/BasePixelShader.h"
#include "Resource/Effect/Shader/ShaderCreater.h"

#include "Core/IO/FileSystem.h"
#include "Core/IO/FileInfo.h"
MEDUSA_BEGIN;

ShaderFactory::ShaderFactory()
{

}

ShaderFactory::~ShaderFactory()
{

}
bool ShaderFactory::Initialize()
{
	return true;
}

bool ShaderFactory::Uninitialize()
{
	Clear();
	return true;
}

Share<IShader> ShaderFactory::CreateShader( const FileIdRef& fileId,const List<HeapString>* defines/*=nullptr*/,ResourceShareType shareType /*= ResourceShareType::Share*/)
{
	Share<IShader> result = nullptr;
	if (shareType != ResourceShareType::None)
	{
		result = Find(fileId);
		RETURN_SELF_IF_NOT_NULL(result);
	}

	result=ShaderCreater::Instance().Create(fileId.Name,fileId);
	if (result==nullptr)
	{
		switch(FileInfo::ExtractType(fileId.Name))
		{
		case FileType::fsh:
			result=new BasePixelShader(fileId);
			break;
		case FileType::vsh:
			result=new BaseVertexShader(fileId);
			break;
		default:
			MEDUSA_ASSERT_FAILED("Unsupported shader file type");
            return nullptr;
		}
	}

	MemoryData data= FileSystem::Instance().ReadAllData(fileId);
	if (data.IsNull())
	{
		Log::FormatError("Cannot find:{}-{}", fileId.Name, fileId.Order);
		return nullptr;
	}

	StringRef str(data.Cast<char>());
	if(result->Initialize(str,defines))
	{
		Add(result, shareType);

		return result;
	}
	else
	{
		result = nullptr;
	}

	return nullptr;

}

MEDUSA_END;


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=constant.ECHO.html">

Redirecting to constant.ECHO.html...


text:
Example code for figuring out why `.bin/next` was missing: [bazelbuild/rules_nodejs#3117](https://github.com/bazelbuild/rules_nodejs/issues/3117).

## Example

Run `./test.sh`. Example output

```
$ ./test.sh
################################################################################
# node_modules/.bin/next is in the managed node_modules directory
################################################################################

$ find -L node_modules -path '*/.bin/next'
node_modules/next-router-mock/node_modules/.bin/next
node_modules/.bin/next
node_modules/eslint-config-next/node_modules/.bin/next

################################################################################
# node_modules/.bin/next is in the Bazel sandbox
################################################################################

$ ls -la bazel-sandbox/external/npm/node_modules/.bin/next
bazel-sandbox/external/npm/node_modules/next-router-mock/node_modules/.bin/next
bazel-sandbox/external/npm/node_modules/.bin/next
bazel-sandbox/external/npm/node_modules/eslint-config-next/node_modules/.bin/next

################################################################################
# node_modules/.bin/next IS NOT in the pkg_tar archive
################################################################################

$ tar -tvf bazel-bin/node-modules.tar | grep '\.bin/next'
-r-xr-xr-x 0/0            4629 1999-12-31 19:00 ./node_modules/eslint-config-next/node_modules/.bin/next
-r-xr-xr-x 0/0            4629 1999-12-31 19:00 ./node_modules/next-router-mock/node_modules/.bin/next

################################################################################
# Confirming not in :node_modules ...
################################################################################

$ grep '\.bin/next' bazel-bin/app-npm_files.txt
external/npm/node_modules/eslint-config-next/node_modules/.bin/next
external/npm/node_modules/next-router-mock/node_modules/.bin/next
```


text:
package org.hudsonci.utils.plugin.ui;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Marker annotation for members which are exposed for Jelly access.
 *
 * @author Jason Dillon
 * @since 2.1.0
 */
@Retention(RUNTIME)
@Target({METHOD,FIELD})
@Documented
public @interface JellyAccessible
{
}


text:
/*--------------------------------------------------------------------------
*
* Napeso.DPsdk
*
* Created and Maintained by Summer Ding (zqding@hotmail.com)
*
--------------------------------------------------------------------------*/

using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Napeso.DPsdk;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace Napeso.DPsdk.Interface
{
    public class BusinessInterface : DPInterface
    {
        public BusinessInterface(Client client)
			: base(client, "business")
		{
		}

        //*******************************************************************************************************************************************

        /// <summary>
        /// 搜索商户 business/find_businesses
        /// 按照地理位置、商区、分类、关键词等多种条件获取商户信息列表
        /// </summary>
        /// <param name="latitude">纬度坐标,须与经度坐标同时传入,与城市名称二者必选其一传入</param>
        /// <param name="longitude">经度坐标,须与纬度坐标同时传入,与城市名称二者必选其一传入</param>
        /// <param name="offset_type">偏移类型,0:未偏移,1:高德坐标系偏移,2:图吧坐标系偏移,如不传入,默认值为0</param>
        /// <param name="radius">搜索半径,单位为米,最小值1,最大值5000,如不传入默认为1000</param>
        /// <param name="city">城市名称,可选范围见相关API返回结果,与经纬度坐标二者必选其一传入</param>
        /// <param name="region">城市区域名,可选范围见相关API返回结果(不含返回结果中包括的城市名称信息),如传入城市区域名,则城市名称必须传入</param>
        /// <param name="category">分类名,可选范围见相关API返回结果;支持同时输入多个分类,以逗号分隔,最大不超过5个。</param>
        /// <param name="keyword">关键词,搜索范围包括商户名、地址、标签等</param>
        /// <param name="out_offset_type">传出经纬度偏移类型,1:高德坐标系偏移,2:图吧坐标系偏移,如不传入,默认值为1</param>
        /// <param name="platform">传出链接类型,1:web站链接(适用于网页应用),2:HTML5站链接(适用于移动应用和联网车载应用),如不传入,默认值为1</param>
        /// <param name="has_coupon">根据是否有优惠券来筛选返回的商户,1:有,0:没有</param>
        /// <param name="has_deal">根据是否有团购来筛选返回的商户,1:有,0:没有</param>
        /// <param name="has_online_reservation">根据是否支持在线预订来筛选返回的商户,1:有,0:没有</param>
        /// <param name="sort">结果排序,1:默认,2:星级高优先,3:产品评价高优先,4:环境评价高优先,5:服务评价高优先,6:点评数量多优先,7:离传入经纬度坐标距离近优先,8:人均价格低优先,9:人均价格高优先</param>
        /// <param name="limit">每页返回的商户结果条目数上限,最小值1,最大值40,如不传入默认为20</param>
        /// <param name="page">页码,如不传入默认为1,即第一页</param>
        /// <returns>商户集合</returns>
        public Napeso.DPsdk.Entity.Business.BusinessCollection FindBusinesses(
            		float? latitude = null,
	                float? longitude = null,
		            int? offset_type = null,
		            int? radius = null,
		            string city = null,
		            string region = null,
		            string category = null,
		            string keyword = null,
		            int? out_offset_type = null,
		            int? platform = null,
		            int? has_coupon = null,
		            int? has_deal = null,
		            int? has_online_reservation = null,
		            int? sort = null,
		            int? limit = null,
		            int? page = null)
        {
            List<Parameter> parameters = new List<Parameter>();
            {
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => latitude), latitude);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => longitude), longitude);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => offset_type), offset_type);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => radius), radius);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => city), city);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => region), region);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => category), category);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => keyword), keyword);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => out_offset_type), out_offset_type);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => platform), platform);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => has_coupon), has_coupon);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => has_deal), has_deal);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => has_online_reservation), has_online_reservation);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => sort), sort);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => limit), limit);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => page), page);
            }

            return JsonConvert.DeserializeObject<Napeso.DPsdk.Entity.Business.BusinessCollection>(Client.GetCommand(GetCommandName("find_businesses"),
                                                                                parameters));
        }

        /// <summary>
        /// 获取指定商户信息 business/get_single_business
        /// 根据商户ID获取指定商户的详细信息
        /// </summary>
        /// <param name="business_id">商户ID</param>
        /// <param name="out_offset_type">传出经纬度偏移类型,1:高德坐标系偏移,2:图吧坐标系偏移,如不传入,默认值为1</param>
        /// <param name="platform">传出链接类型,1:web站链接(适用于网页应用),2:HTML5站链接(适用于移动应用和联网车载应用),如不传入,默认值为1</param>
        /// <returns>商户</returns>
        public Napeso.DPsdk.Entity.Business.Business GetSingleBusiness(int business_id,
            		int? out_offset_type = null,
		            int? platform = null)
        {
            List<Parameter> parameters = new List<Parameter>();
            {
                Utility.ADD_REQUEST_PARAMETER(parameters, Utility.GetMemberName(() => business_id), business_id);

                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => out_offset_type), out_offset_type);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => platform), out_offset_type);
            }

            string json = Client.GetCommand(GetCommandName("get_single_business"), parameters);
            JObject jobj = JObject.Parse(json);

            return (jobj["count"].Value<int>() == 1)
                ? JsonConvert.DeserializeObject<Napeso.DPsdk.Entity.Business.Business>(jobj["businesses"].Children().First().ToString())
                : null;
        }

        /// <summary>
        /// 获取指定结果列表页面链接 business/get_search_result_url
        /// 获取指定搜索条件对应的大众点评结果列表页面链接
        /// </summary>
        /// <param name="city">城市名称,可选范围见相关API返回结果</param>
        /// <param name="region">城市区域名,可选范围见相关API返回结果(不含返回结果中包括的城市名称信息)</param>
        /// <param name="category">分类名,可选范围见相关API返回结果;支持多个category搜索,最多5个</param>
        /// <param name="keyword">关键词,搜索范围包括商户名、地址、标签等</param>
        /// <param name="sort">结果排序,1:默认,2:星级高优先,3:产品评价高优先,4:环境评价高优先,5:服务评价高优先,6:点评数量多优先</param>
        /// <param name="platform">传出链接类型,1:web站链接(适用于网页应用),2:HTML5站链接(适用于移动应用和联网车载应用),如不传入,默认值为1</param>
        /// <returns>Url字符串</returns>
        public string GetSearchResultUrl(string city,
            		string region = null,
            		string category = null,
		            string keyword = null,
		            int? sort = null,
		            int? platform = null)
        {
            List<Parameter> parameters = new List<Parameter>();
            {
                Utility.ADD_REQUEST_PARAMETER(parameters, Utility.GetMemberName(() => city), city);

                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => region), region);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => category), category);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => keyword), keyword);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => sort), sort);
                Utility.ADD_REQUEST_OPTIONAL_PARAMETER(parameters, Utility.GetMemberName(() => platform), platform);
            }

            string json = Client.GetCommand(GetCommandName("get_search_result_url"), parameters);
            JObject jobj = JObject.Parse(json);

            return jobj["search_result_url"].Value<string>();
        }
    }
}


text:
package net.sourceforge.jaad.aac.syntax;

import net.sourceforge.jaad.aac.AACException;
import net.sourceforge.jaad.aac.Profile;
import net.sourceforge.jaad.aac.SampleFrequency;

/**
 * This class is part of JAAD ( jaadec.sourceforge.net ) that is distributed
 * under the Public Domain license. Code changes provided by the JCodec project
 * are distributed under FreeBSD license.
 *
 * @author in-somnia
 */
public class PCE extends Element {

	private static final int MAX_FRONT_CHANNEL_ELEMENTS = 16;
	private static final int MAX_SIDE_CHANNEL_ELEMENTS = 16;
	private static final int MAX_BACK_CHANNEL_ELEMENTS = 16;
	private static final int MAX_LFE_CHANNEL_ELEMENTS = 4;
	private static final int MAX_ASSOC_DATA_ELEMENTS = 8;
	private static final int MAX_VALID_CC_ELEMENTS = 16;

	public static class TaggedElement {

		private final boolean isCPE;
		private final int tag;

		public TaggedElement(boolean isCPE, int tag) {
			this.isCPE = isCPE;
			this.tag = tag;
		}

		public boolean isIsCPE() {
			return isCPE;
		}

		public int getTag() {
			return tag;
		}
	}

	public static class CCE {

		private final boolean isIndSW;
		private final int tag;

		public CCE(boolean isIndSW, int tag) {
			this.isIndSW = isIndSW;
			this.tag = tag;
		}

		public boolean isIsIndSW() {
			return isIndSW;
		}

		public int getTag() {
			return tag;
		}
	}
	private Profile profile;
	private SampleFrequency sampleFrequency;
	private int frontChannelElementsCount, sideChannelElementsCount, backChannelElementsCount;
	private int lfeChannelElementsCount, assocDataElementsCount;
	private int validCCElementsCount;
	private boolean monoMixdown, stereoMixdown, matrixMixdownIDXPresent;
	private int monoMixdownElementNumber, stereoMixdownElementNumber, matrixMixdownIDX;
	private boolean pseudoSurround;
	private final TaggedElement[] frontElements, sideElements, backElements;
	private final int[] lfeElementTags;
	private final int[] assocDataElementTags;
	private final CCE[] ccElements;
	private byte[] commentFieldData;

	public PCE() {
		super();
		frontElements = new TaggedElement[MAX_FRONT_CHANNEL_ELEMENTS];
		sideElements = new TaggedElement[MAX_SIDE_CHANNEL_ELEMENTS];
		backElements = new TaggedElement[MAX_BACK_CHANNEL_ELEMENTS];
		lfeElementTags = new int[MAX_LFE_CHANNEL_ELEMENTS];
		assocDataElementTags = new int[MAX_ASSOC_DATA_ELEMENTS];
		ccElements = new CCE[MAX_VALID_CC_ELEMENTS];
		sampleFrequency = SampleFrequency.SAMPLE_FREQUENCY_NONE;
	}

	public void decode(IBitStream in) throws AACException {
		readElementInstanceTag(in);

		profile = Profile.forInt(in.readBits(2));

		sampleFrequency = SampleFrequency.forInt(in.readBits(4));

		frontChannelElementsCount = in.readBits(4);
		sideChannelElementsCount = in.readBits(4);
		backChannelElementsCount = in.readBits(4);
		lfeChannelElementsCount = in.readBits(2);
		assocDataElementsCount = in.readBits(3);
		validCCElementsCount = in.readBits(4);

		if(monoMixdown = in.readBool()) {
			SyntaxConstants.LOGGER.warning("mono mixdown present, but not yet supported");
			monoMixdownElementNumber = in.readBits(4);
		}
		if(stereoMixdown = in.readBool()) {
			SyntaxConstants.LOGGER.warning("stereo mixdown present, but not yet supported");
			stereoMixdownElementNumber = in.readBits(4);
		}
		if(matrixMixdownIDXPresent = in.readBool()) {
			SyntaxConstants.LOGGER.warning("matrix mixdown present, but not yet supported");
			matrixMixdownIDX = in.readBits(2);
			pseudoSurround = in.readBool();
		}

		readTaggedElementArray(frontElements, in, frontChannelElementsCount);

		readTaggedElementArray(sideElements, in, sideChannelElementsCount);

		readTaggedElementArray(backElements, in, backChannelElementsCount);

		int i;
		for(i = 0; i<lfeChannelElementsCount; ++i) {
			lfeElementTags[i] = in.readBits(4);
		}

		for(i = 0; i<assocDataElementsCount; ++i) {
			assocDataElementTags[i] = in.readBits(4);
		}

		for(i = 0; i<validCCElementsCount; ++i) {
			ccElements[i] = new CCE(in.readBool(), in.readBits(4));
		}

		in.byteAlign();

		final int commentFieldBytes = in.readBits(8);
		commentFieldData = new byte[commentFieldBytes];
		for(i = 0; i<commentFieldBytes; i++) {
			commentFieldData[i] = (byte) in.readBits(8);
		}
	}

	private void readTaggedElementArray(TaggedElement[] te, IBitStream in, int len) throws AACException {
		for(int i = 0; i<len; ++i) {
			te[i] = new TaggedElement(in.readBool(), in.readBits(4));
		}
	}

	public Profile getProfile() {
		return profile;
	}

	public SampleFrequency getSampleFrequency() {
		return sampleFrequency;
	}

	public int getChannelCount() {
		return frontChannelElementsCount+sideChannelElementsCount+backChannelElementsCount
				+lfeChannelElementsCount+assocDataElementsCount;
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" targetNamespace="Examples">

  <process id="TestFixture70.concurrentEmbeddedSubprocess">
    <startEvent id="theStart" />

    <sequenceFlow  sourceRef="theStart" targetRef="fork" />

    <parallelGateway id="fork" />

    <sequenceFlow  sourceRef="fork" targetRef="scope1" />
    <sequenceFlow  sourceRef="fork" targetRef="scope2" />

    <subProcess id="scope1">

        <startEvent id="startInside1" />
        <sequenceFlow sourceRef="startInside1" targetRef="waitInside1" />

        <userTask id="waitInside1" />

        <sequenceFlow sourceRef="waitInside1" targetRef="endInside1" />
        <endEvent id="endInside1" />

    </subProcess>

    <sequenceFlow sourceRef="scope1" targetRef="theEnd1" />
    <endEvent id="theEnd1" />

    <subProcess id="scope2">

        <startEvent id="startInside2" />
        <sequenceFlow sourceRef="startInside2" targetRef="waitInside2" />

        <userTask id="waitInside2" />

        <sequenceFlow sourceRef="waitInside2" targetRef="endInside2" />
        <endEvent id="endInside2" />

    </subProcess>

    <sequenceFlow sourceRef="scope2" targetRef="theEnd2" />
    <endEvent id="theEnd2" />
  </process>

</definitions>


text:
package net.karlmartens.platform.io;

import net.karlmartens.platform.io.FileOutputStream.WriteBuffer;

/**
 * @author kmartens
 *
 */
public final class ByteSerializer implements Serializer<Byte> {

  private static final ByteSerializer _INSTANCE = new ByteSerializer();

  private ByteSerializer() {
    // Reduced visibility
  }

  @Override
  public void write(WriteBuffer buffer, Byte value) {
    buffer.putByte(value);
  }

  public static ByteSerializer instance() {
    return _INSTANCE;
  }

}


text:
"""Calculate internal distance matrix from a trajectory"""

import argparse
import sys
sys.path.insert(0, '../../src/lattice_origami_domains')
from lattice_dna_origami.origami_io import *

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('system_file', type=str, help='System file')
    parser.add_argument('traj_file', type=str, help='Trajectory file')
    parser.add_argument('out_filebase', type=str, help='Output file')
    parser.add_argument('skip', type=int, help='Saved interval')
    parser.add_argument('skipo', type=int, help='Read interval')

    args = parser.parse_args()
    system_filename = args.system_file
    traj_filename = args.traj_file
    out_filebase = args.out_filebase
    skip = args.skip
    skipo = args.skipo

    system_file = JSONInputFile(system_filename)
    traj_file = PlainTextTrajFile(traj_filename, system_file)

    dist_matrices = calc_dist_matrices(traj_file, skip, skipo)

    dist_sums = np.sum(dist_matrices, axis=1)
    steps = [(i + 1) * skip * skipo for i in range(len(dist_sums))]
    write_pgf_file(steps, dist_sums, out_filebase + '_dist_sums.dat')

    ref_config = np.array(system_file.chains(0)[0]['positions'])
    ref_dists = calc_dist_matrix(ref_config)
    dist_rmsds = calc_rmsds(ref_dists, dist_matrices)
    write_pgf_file(steps, dist_rmsds, out_filebase + '_dist_rmsds.dat')

if __name__ == '__main__':
    main()


text:
/*
 *  This file is part of the WSF Staff project.
 *  Please, visit http://code.google.com/p/staff for more information.
 */

#include <axiom_attribute.h>
#include <staff/utils/fromcstring.h>
#include "Exception.h"
#include "Runtime.h"
#include "DataObject.h"
#include "QName.h"
#include "Value.h"
#include "Attribute.h"

namespace staff
{
  Attribute::Attribute():
    m_bOwner(false),
    m_pDataObject(NULL),
    m_pAxiomAttribute(NULL)
  {
  }

  Attribute::Attribute(const Attribute& rAttribute):
    m_bOwner(rAttribute.m_bOwner),
    m_pDataObject(rAttribute.m_pDataObject),
    m_pAxiomAttribute(rAttribute.m_pAxiomAttribute)
  {
    rAttribute.m_bOwner = false;
  }

  Attribute::Attribute(DataObject* pDataObject, axiom_attribute_t* pAxiomAttribute):
    m_bOwner(false),
    m_pDataObject(pDataObject),
    m_pAxiomAttribute(pAxiomAttribute)
  {
  }

  bool Attribute::IsNull() const
  {
    return !m_pAxiomAttribute;
  }

  bool Attribute::IsOwner() const
  {
    return m_bOwner;
  }

  void Attribute::SetOwner(bool bOwner)
  {
    m_bOwner = bOwner;
  }

  Attribute::Attribute(const std::string& sLocalName, const char* szValue):
    m_bOwner(true),
    m_pDataObject(NULL)
  {
    m_pAxiomAttribute = axiom_attribute_create(m_pEnv, sLocalName.c_str(), szValue, NULL);
  }

  Attribute::Attribute(const std::string& sLocalName, const std::string& sValue):
    m_bOwner(true),
    m_pDataObject(NULL)
  {
    m_pAxiomAttribute = axiom_attribute_create(m_pEnv, sLocalName.c_str(), sValue.c_str(), NULL);
  }

  Attribute::Attribute(const std::string& sLocalName, const Value& tValue):
    m_bOwner(true),
    m_pDataObject(NULL)
  {
    m_pAxiomAttribute = axiom_attribute_create(m_pEnv, sLocalName.c_str(), tValue.AsString().c_str(), NULL);
  }

  Attribute::~Attribute()
  {
    if (m_bOwner && m_pAxiomAttribute != NULL)
    {
      axiom_attribute_free(m_pAxiomAttribute, m_pEnv);
    }
  }

  std::string Attribute::GetLocalName() const
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axis2_char_t* szLocalName = axiom_attribute_get_localname(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT(szLocalName, "Can\'t get attribute name");

    return szLocalName;
  }

  void Attribute::SetLocalName(const std::string& sLocalName)
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axiom_attribute_set_localname(m_pAxiomAttribute, m_pEnv,
                                  reinterpret_cast<const axis2_char_t*>(sLocalName.c_str()));
  }

  std::string Attribute::GetText() const
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axis2_char_t* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText != NULL, "Can\'t get attribute text");

    return szText;
  }

  void Attribute::SetText(const std::string& sText)
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axiom_attribute_set_value(m_pAxiomAttribute, m_pEnv,
                              reinterpret_cast<const axis2_char_t*>(sText.c_str()));
  }

  Value Attribute::GetValue() const
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axis2_char_t* szValue = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szValue != NULL, "Can\'t get attribute text");

    return szValue;
  }

  void Attribute::SetValue(const Value& rValue)
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axiom_attribute_set_value(m_pAxiomAttribute, m_pEnv,
                              reinterpret_cast<const axis2_char_t*>(rValue.AsString().c_str()));
  }

  // optimized get value functions
  bool Attribute::GetValue(bool& rbValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rbValue);
  }

  bool Attribute::GetValue(byte& rbtValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rbtValue);
  }

  bool Attribute::GetValue(int& rnValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rnValue);
  }

  bool Attribute::GetValue(short& rshValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rshValue);
  }

  bool Attribute::GetValue(long& rlValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rlValue);
  }

  bool Attribute::GetValue(long long& rllValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rllValue);
  }

  bool Attribute::GetValue(unsignedByte& rubtValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rubtValue);
  }

  bool Attribute::GetValue(unsigned int& runValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, runValue);
  }

  bool Attribute::GetValue(unsigned short& rushValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rushValue);
  }

  bool Attribute::GetValue(unsigned long& rulValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rulValue);
  }

  bool Attribute::GetValue(unsigned long long& rullValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rullValue);
  }

  bool Attribute::GetValue(float& rfValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rfValue);
  }

  bool Attribute::GetValue(double& rdValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rdValue);
  }

  bool Attribute::GetValue(long double& rldValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(szText, "value of attribute [" + GetLocalName() + "] is NULL");
    return FromCString(szText, rldValue);
  }

  bool Attribute::GetValue(std::string& sValue) const
  {
    STAFF_ASSERT(m_pAxiomAttribute, "Not Initialized");
    char* szText = axiom_attribute_get_value(m_pAxiomAttribute, m_pEnv);
    sValue = szText ? szText : "";
    return true;
  }

  const QName Attribute::GetQName() const
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axutil_qname_t* pqName = axiom_attribute_get_qname(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(pqName != NULL, "Can\'t get attribute\'s QName");

    QName tqName(pqName);
    return tqName;

//    return pqName; // old stdcpp
  }

  QName Attribute::GetQName()
  {
    STAFF_ASSERT(m_pDataObject != NULL && m_pAxiomAttribute != NULL, "Not Initialized");

    axutil_qname_t* pqName = axiom_attribute_get_qname(m_pAxiomAttribute, m_pEnv);
    STAFF_ASSERT_DOM(pqName != NULL, "Can\'t get attribute\'s QName");

    QName tqName(pqName);
    return tqName;
  }

  Attribute& Attribute::operator=(const Attribute& rAttribute)
  {
    m_bOwner = rAttribute.m_bOwner;
    m_pDataObject = rAttribute.m_pDataObject;
    m_pAxiomAttribute = rAttribute.m_pAxiomAttribute;
    rAttribute.m_bOwner = false;
    return *this;
  }

  bool Attribute::operator==(const Attribute& rAttribute) const
  {
    STAFF_ASSERT(m_pDataObject != NULL && rAttribute.m_pDataObject != NULL
      && m_pAxiomAttribute != NULL && rAttribute.m_pAxiomAttribute != NULL,
      "Not Initialized");

    //! TODO: compare using AxiOM functions
    return GetLocalName() == rAttribute.GetLocalName() &&
      GetValue() == rAttribute.GetValue();
  }

  bool Attribute::operator!=(const Attribute& rAttribute) const
  {
    return !(operator==(rAttribute));
  }

  Attribute::operator axiom_attribute_t*()
  {
    return m_pAxiomAttribute;
  }

  Attribute* Attribute::operator->()
  {
    return this;
  }

  const Attribute* Attribute::operator->() const
  {
    return this;
  }

  axutil_env_t* Attribute::m_pEnv = Runtime::Inst().GetAxis2Env();

} // namespace staff


text:
package org.insightech.er.editor.controller.editpolicy.element.connection;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ConnectionEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
import org.insightech.er.editor.controller.command.diagram_contents.element.connection.relation.DeleteRelationCommand;
import org.insightech.er.editor.model.diagram_contents.element.connection.Relation;

public class RelationEditPolicy extends ConnectionEditPolicy {

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected Command getDeleteCommand(GroupRequest grouprequest) {
		Relation relation = (Relation) this.getHost().getModel();
		return new DeleteRelationCommand(relation, null);
	}

}


text:
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>LowerCaseTokenizer.Normalize Method</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />

            Apache Lucene.Net 2.4.0 Class Library API

LowerCaseTokenizer.Normalize Method

Collects only characters which satisfy {@link Character#isLetter(char)}.

protected internal override char Normalize(
   char c
);

See Also

        LowerCaseTokenizer Class | Lucene.Net.Analysis Namespace

      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="Normalize method">
        </param>
        <param name="Keyword" value="Normalize method, LowerCaseTokenizer class">
        </param>
        <param name="Keyword" value="LowerCaseTokenizer.Normalize method">
        </param>
      </object>

Generated from assembly Lucene.Net [2.4.0.2]


text:
package com.eatthepath.jvptree.util;

import java.util.List;
import java.util.Random;

import com.eatthepath.jvptree.DistanceFunction;
import com.eatthepath.jvptree.ThresholdSelectionStrategy;

/**
 * A threshold distance selection strategy that uses the median distance from the origin as the threshold.
 *
 * @author Jon Chambers
 */
public class MedianDistanceThresholdSelectionStrategy
 implements ThresholdSelectionStrategy
 {

    /**
     * Returns the median distance of the given points from the given origin. This method will partially sort the list
     * of points in the process.
     *
     * @param points the list of points from which a median distance will be chosen
     * @param origin the point from which distances to other points will be calculated
     * @param distanceFunction the function to be used to calculate the distance between the origin and other points
     *
     * @return the median distance from the origin to the given list of points
     *
     * @throws IllegalArgumentException if the given list of points is empty
     */
    public double selectThreshold(final List<E> points, final P origin, final DistanceFunction
 distanceFunction) {
        if (points.isEmpty()) {
            throw new IllegalArgumentException("Point list must not be empty.");
        }

        int left = 0;
        int right = points.size() - 1;

        final int medianIndex = points.size() / 2;
        final Random random = new Random();

        // The strategy here is to use quickselect (https://en.wikipedia.org/wiki/Quickselect) to recursively partition
        // the parts of a list on one side of a pivot, working our way toward the center of the list.
        while (left != right) {
            final int pivotIndex = left + (right - left == 0 ? 0 : random.nextInt(right - left));
            final double pivotDistance = distanceFunction.getDistance(origin, points.get(pivotIndex));

            // Temporarily move the pivot point all the way out to the end of this section of the list
            java.util.Collections.swap(points, pivotIndex, right);

            int storeIndex = left;

            for (int i = left; i < right; i++) {
                if (distanceFunction.getDistance(origin, points.get(i)) < pivotDistance) {
                    java.util.Collections.swap(points, storeIndex++, i);
                }
            }

            // ...and now bring that original pivot point back to its rightful place.
            java.util.Collections.swap(points, right, storeIndex);

            if (storeIndex == medianIndex) {
                // Mission accomplished; we've placed the point that should rightfully be at the median index
                break;
            } else if (storeIndex < medianIndex) {
                // We need to work on the section of the list to the right of the pivot
                left = storeIndex + 1;
            } else {
                // We need to work on the section of the list to the left of the pivot
                right = storeIndex - 1;
            }
        }

        return distanceFunction.getDistance(origin, points.get(medianIndex));
    }
}


text:
layout: model
title: Stop Words Cleaner for Zulu
author: John Snow Labs
name: stopwords_zu
date: 2020-07-14 19:03:00 +0800
task: Stop Words Removal
language: zu
edition: Spark NLP 2.5.4
spark_version: 2.4
tags: [stopwords, zu]
supported: true
annotator: StopWordsCleaner
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

{:.h2_title}
## Description
This model removes 'stop words' from text. Stop words are words so common that they can be removed without significantly altering the meaning of a text. Removing stop words is useful when one wants to deal with only the most semantically important words in a text, and ignore words that are rarely semantically relevant, such as articles and prepositions.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
[Open in Colab](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/b2eb08610dd49d5b15077cc499a94b4ec1e8b861/jupyter/annotation/english/stop-words/StopWordsCleaner.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/stopwords_zu_zu_2.5.4_2.4_1594742440504.zip){:.button.button-orange.button-orange-trans.arr.button-icon}

{:.h2_title}
## How to use

<div class="tabs-box" markdown="1">

{% include programmingLanguageSelectScalaPythonNLU.html %}

```python
...
stop_words = StopWordsCleaner.pretrained("stopwords_zu", "zu") \
.setInputCols(["token"]) \
.setOutputCol("cleanTokens")
nlp_pipeline = Pipeline(stages=[document_assembler, tokenizer, stop_words])
light_pipeline = LightPipeline(nlp_pipeline.fit(spark.createDataFrame([['']]).toDF("text")))
results = light_pipeline.fullAnnotate("Ngaphandle kokuba yinkosi yasenyakatho, uJohn Snow ungudokotela waseNgilandi futhi ungumholi ekwenziweni kwe-anesthesia kanye nenhlanzeko yezokwelapha.")
```

```scala
...
val stopWords = StopWordsCleaner.pretrained("stopwords_zu", "zu")
.setInputCols(Array("token"))
.setOutputCol("cleanTokens")
val pipeline = new Pipeline().setStages(Array(document_assembler, tokenizer, stopWords))
val data = Seq("Ngaphandle kokuba yinkosi yasenyakatho, uJohn Snow ungudokotela waseNgilandi futhi ungumholi ekwenziweni kwe-anesthesia kanye nenhlanzeko yezokwelapha.").toDF("text")
val result = pipeline.fit(data).transform(data)
```

{:.nlu-block}
```python
import nlu

text = ["""Ngaphandle kokuba yinkosi yasenyakatho, uJohn Snow ungudokotela waseNgilandi futhi ungumholi ekwenziweni kwe-anesthesia kanye nenhlanzeko yezokwelapha."""]
stopword_df = nlu.load('zu.stopwords').predict(text)
stopword_df[['cleanTokens']]
```

</div>

{:.h2_title}
## Results

```bash
[Row(annotatorType='token', begin=0, end=9, result='Ngaphandle', metadata={'sentence': '0'}),
Row(annotatorType='token', begin=11, end=16, result='kokuba', metadata={'sentence': '0'}),
Row(annotatorType='token', begin=18, end=24, result='yinkosi', metadata={'sentence': '0'}),
Row(annotatorType='token', begin=26, end=37, result='yasenyakatho', metadata={'sentence': '0'}),
Row(annotatorType='token', begin=38, end=38, result=',', metadata={'sentence': '0'}),
...]
```

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|stopwords_zu|
|Type:|stopwords|
|Compatibility:|Spark NLP 2.5.4+|
|Edition:|Official|
|Input Labels:|[token]|
|Output Labels:|[cleanTokens]|
|Language:|zu|
|Case sensitive:|false|
|License:|Open Source|

{:.h2_title}
## Data Source
The model is imported from [https://github.com/WorldBrain/remove-stopwords](https://github.com/WorldBrain/remove-stopwords)


text:
import React, { Component, PropTypes } from 'react';
import assign from 'deep-assign';

require('imports?define=>false,exports=>false!wavesurfer.js/dist/plugin/wavesurfer.timeline.js');

class Timeline extends Component {
  constructor(props) {
    super(props);
    this.timeline = null;
  }

  componentDidMount() {
    if (this.props.isReady) this.init();
    this.props.wavesurfer.on('ready', this._init.bind(this));
  }

  _init() {
    this.timeline = Object.create(WaveSurfer.Timeline);

    this.timeline.init(assign({}, this.props.options, {
      container: this.timelineEl,
      wavesurfer: this.props.wavesurfer
    }));
  }

  render() {
    return <div ref={(c) => { this.timelineEl = c; }} />;
  }
}

Timeline.propTypes = {
  isReady: PropTypes.bool.isRequired,
  options: PropTypes.object.isRequired,
  wavesurfer: PropTypes.object
};

Timeline.defaultProps = {
  isReady: false,
  options: {}
};

export default Timeline;


text:
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="95">
  <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
    <logicalFolder name="HeaderFiles"
                   displayName="Header Files"
                   projectFiles="true">
    </logicalFolder>
    <logicalFolder name="ResourceFiles"
                   displayName="Resource Files"
                   projectFiles="true">
    </logicalFolder>
    <logicalFolder name="SourceFiles"
                   displayName="Source Files"
                   projectFiles="true">
      <itemPath>main.cpp</itemPath>
    </logicalFolder>
    <logicalFolder name="www" displayName="www" projectFiles="true">
      <logicalFolder name="f1" displayName="css" projectFiles="true">
        <itemPath>www/css/bootstrap.min.css</itemPath>
      </logicalFolder>
      <logicalFolder name="f2" displayName="fonts" projectFiles="true">
        <itemPath>www/fonts/glyphicons-halflings-regular.eot</itemPath>
        <itemPath>www/fonts/glyphicons-halflings-regular.svg</itemPath>
        <itemPath>www/fonts/glyphicons-halflings-regular.ttf</itemPath>
        <itemPath>www/fonts/glyphicons-halflings-regular.woff</itemPath>
        <itemPath>www/fonts/glyphicons-halflings-regular.woff2</itemPath>
      </logicalFolder>
      <logicalFolder name="f3" displayName="scripts" projectFiles="true">
        <logicalFolder name="f1" displayName="jquery" projectFiles="true">
          <logicalFolder name="f1" displayName="1.11.1" projectFiles="true">
            <itemPath>www/scripts/jquery/1.11.1/jquery.min.js</itemPath>
          </logicalFolder>
        </logicalFolder>
        <itemPath>www/scripts/bootstrap.min.js</itemPath>
      </logicalFolder>
      <itemPath>www/Earth-Wallpaper-NASA-14.jpg</itemPath>
      <itemPath>www/bootstrap.html</itemPath>
      <itemPath>www/index.html</itemPath>
      <itemPath>www/rfc2616.txt</itemPath>
      <itemPath>www/sunset17.jpg</itemPath>
      <itemPath>www/test.html</itemPath>
    </logicalFolder>
    <logicalFolder name="TestFiles"
                   displayName="Test Files"
                   projectFiles="false"
                   kind="TEST_LOGICAL_FOLDER">
    </logicalFolder>
    <logicalFolder name="ExternalFiles"
                   displayName="Important Files"
                   projectFiles="false"
                   kind="IMPORTANT_FILES_FOLDER">
      <itemPath>Makefile</itemPath>
    </logicalFolder>
  </logicalFolder>
  <sourceRootList>
    <Elem>www</Elem>
  </sourceRootList>
  <projectmakefile>Makefile</projectmakefile>
  <confs>
    <conf name="Debug" type="1">
      <toolsSet>
        <compilerSet>default</compilerSet>
        <dependencyChecking>true</dependencyChecking>
        <rebuildPropChanged>false</rebuildPropChanged>
      </toolsSet>
      <compileType>
        <ccTool>
          <standard>8</standard>
          <commandLine>$(COVERAGE_FLAGS)</commandLine>
        </ccTool>
        <linkerTool>
          <linkerLibItems>
            <linkerLibProjectItem>
              <makeArtifact PL="../libhttpserver"
                            CT="3"
                            CN="Debug"
                            AC="true"
                            BL="true"
                            WD="../libhttpserver"
                            BC="${MAKE}  -f Makefile CONF=Debug"
                            CC="${MAKE}  -f Makefile CONF=Debug clean"
                            OP="${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libhttpserver.a">
              </makeArtifact>
            </linkerLibProjectItem>
            <linkerLibLibItem>boost_filesystem</linkerLibLibItem>
            <linkerLibLibItem>boost_date_time</linkerLibLibItem>
            <linkerLibLibItem>boost_chrono</linkerLibLibItem>
            <linkerLibLibItem>boost_regex</linkerLibLibItem>
            <linkerLibLibItem>boost_system</linkerLibLibItem>
            <linkerLibStdlibItem>PosixThreads</linkerLibStdlibItem>
            <linkerLibLibItem>z</linkerLibLibItem>
            <linkerOptionItem>$(LDLIBS)</linkerOptionItem>
          </linkerLibItems>
          <commandLine>$(COVERAGE_FLAGS)</commandLine>
        </linkerTool>
      </compileType>
      <item path="main.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="www/Earth-Wallpaper-NASA-14.jpg" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/bootstrap.html" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/css/bootstrap.min.css" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.eot"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.svg"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.ttf"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.woff"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.woff2"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/index.html" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/rfc2616.txt" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/scripts/bootstrap.min.js" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/scripts/jquery/1.11.1/jquery.min.js"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/sunset17.jpg" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/test.html" ex="false" tool="3" flavor2="0">
      </item>
    </conf>
    <conf name="Release" type="1">
      <toolsSet>
        <compilerSet>default</compilerSet>
        <dependencyChecking>true</dependencyChecking>
        <rebuildPropChanged>false</rebuildPropChanged>
      </toolsSet>
      <compileType>
        <cTool>
          <developmentMode>5</developmentMode>
        </cTool>
        <ccTool>
          <developmentMode>5</developmentMode>
          <standard>8</standard>
        </ccTool>
        <fortranCompilerTool>
          <developmentMode>5</developmentMode>
        </fortranCompilerTool>
        <asmTool>
          <developmentMode>5</developmentMode>
        </asmTool>
        <linkerTool>
          <linkerLibItems>
            <linkerLibProjectItem>
              <makeArtifact PL="../libhttpserver"
                            CT="3"
                            CN="Release"
                            AC="false"
                            BL="true"
                            WD="../libhttpserver"
                            BC="${MAKE}  -f Makefile CONF=Release"
                            CC="${MAKE}  -f Makefile CONF=Release clean"
                            OP="${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libhttpserver.a">
              </makeArtifact>
            </linkerLibProjectItem>
            <linkerLibLibItem>boost_filesystem</linkerLibLibItem>
            <linkerLibLibItem>boost_date_time</linkerLibLibItem>
            <linkerLibLibItem>boost_chrono</linkerLibLibItem>
            <linkerLibLibItem>boost_regex</linkerLibLibItem>
            <linkerLibLibItem>boost_system</linkerLibLibItem>
            <linkerLibStdlibItem>PosixThreads</linkerLibStdlibItem>
            <linkerLibLibItem>z</linkerLibLibItem>
            <linkerOptionItem>$(LDLIBS)</linkerOptionItem>
          </linkerLibItems>
        </linkerTool>
      </compileType>
      <item path="main.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="www/Earth-Wallpaper-NASA-14.jpg" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/bootstrap.html" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/css/bootstrap.min.css" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.eot"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.svg"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.ttf"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.woff"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/fonts/glyphicons-halflings-regular.woff2"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/index.html" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/rfc2616.txt" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/scripts/bootstrap.min.js" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/scripts/jquery/1.11.1/jquery.min.js"
            ex="false"
            tool="3"
            flavor2="0">
      </item>
      <item path="www/sunset17.jpg" ex="false" tool="3" flavor2="0">
      </item>
      <item path="www/test.html" ex="false" tool="3" flavor2="0">
      </item>
    </conf>
  </confs>
</configurationDescriptor>


text:
<?php namespace Authority\Repo;

use Illuminate\Support\ServiceProvider;
use Authority\Repo\Session\SentrySession;
use Authority\Repo\User\SentryUser;
use Authority\Repo\Group\SentryGroup;
use Cartalyst\Sentry\Sentry;

class RepoServiceProvider extends ServiceProvider {

	/**
	 * Register the binding
	 */
	public function register()
	{
		$app = $this->app;

		 // Bind the Session Repository
        $app->bind('Authority\Repo\Session\SessionInterface', function($app)
        {
            return new SentrySession(
            	$app['sentry']
            );
        });

        // Bind the User Repository
        $app->bind('Authority\Repo\User\UserInterface', function($app)
        {
            return new SentryUser(
            	$app['sentry']
            );
        });

        // Bind the Group Repository
        $app->bind('Authority\Repo\Group\GroupInterface', function($app)
        {
            return new SentryGroup(
                $app['sentry']
            );
        });
	}

}


text:
@interface DetailViewController ()

@end

@implementation DetailViewController

#pragma mark - Managing the detail item

- (void)settransitStop:(id)newtransitStop {
    if (_transitStop != newtransitStop) {
        _transitStop = newtransitStop;

        // Update the view.
        [self configureView];
    }
}

- (void)configureView {
    // Update the user interface for the detail item.
    if (self.transitStop) {

        [self.apiClient makeHttpPostRequestWithPath:@"/api/2.0/rti/resources/status"
                                         queryItems:nil
                                          postObject:@[ [self.transitStop valueForKey:kJSONKeyPlacePointPrimaryCode] ]
                                         completion:^(BOOL success, NSString *displayError, id responseObject) {
                                             if (success)
                                             {
                                                 if ([responseObject isKindOfClass:[NSArray class]])
                                                 {
                                                     NSDictionary * resourceStatus = [responseObject firstObject];
                                                     [self configureLabelFromResourceStatus:resourceStatus];
                                                 }
                                             }
                                             else
                                             {
                                                 [self handleErrorWithLocalizedDescription:displayError];
                                             }
                                         }];

    }
}

- (void) configureLabelFromResourceStatus:(NSDictionary *)dResourceStatus {
    self.detailDescriptionLabel.text =
    [NSString stringWithFormat:@"Live status for '%@':\r\n'%@'\r\n\r\nUpdated at %@",
    [self.transitStop valueForKey:kJSONKeyPlacePointName],
    [dResourceStatus valueForKey:kJSONKeyResourceStatusStatusText],
     [dResourceStatus valueForKey:kJSONKeyResourceStatusTimeStamp]
     ];
}

- (void) handleErrorWithLocalizedDescription:(NSString *)displayError {
    // TODO: Display this error in the UI
    NSLog(@"%@",displayError);
}

- (void)viewDidLoad {
    [super viewDidLoad];

    // Create the UrbanThingsAPIClient helper class that will make the HTTP Requests for us
    self.apiClient = [[UrbanThingsAPIClient alloc] initWithBaseURL:kAPIBaseURL apiKey:kAPIKey];

    // Do any additional setup after loading the view, typically from a nib.
    [self configureView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end


text:
<?php
use yii\helpers\Url;
use yii\helpers\Html;
use wechat\assets\AppAsset;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">

    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode(Yii::$app->cache->get('web')['webName'] . $this->title) ?></title>
    <meta name="keywords" content="<?= Yii::$app->cache->get('web')['webKey'] ?>" />
    <meta name="description" content="<?= Yii::$app->cache->get('web')['webDescription'] ?>" />
    <?php $this->head() ?>

<?php $this->beginBody() ?>
<?= $content ?>
<?php if(Yii::$app->controller->id !== 'checkout'): ?>

        <li role="presentation" class="<?= Yii::$app->controller->id === 'site' ? 'active': ''; ?>"><a href="<?= Url::to(['/']) ?>">

        <li role="presentation" class="<?= Yii::$app->controller->id === 'order' ? 'active': ''; ?>"><a href="<?= Url::to(['/order']) ?>">

        <li role="presentation" class="<?= Yii::$app->controller->id === 'cart' ? 'active': ''; ?>"><a href="<?= Url::to(['/cart']) ?>">

<?php endif; ?>

<?php $this->endBody() ?>

<?php $this->endPage() ?>


text:
namespace net {

// Implementation of ProxyResolverFactory that uses the Mac CFProxySupport to
// implement proxies.
class NET_EXPORT ProxyResolverFactoryMac : public ProxyResolverFactory {
 public:
  ProxyResolverFactoryMac();

  int CreateProxyResolver(
      const scoped_refptr<ProxyResolverScriptData>& pac_script,
      scoped_ptr<ProxyResolver>* resolver,
      const CompletionCallback& callback,
      scoped_ptr<Request>* request) override;

 private:
  DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactoryMac);
};

}  // namespace net

#endif  // NET_PROXY_PROXY_RESOLVER_MAC_H_


text:
const NumberToStringConverter = require('../app/js/number-to-string-converter.js');

describe('NumberToStringConverter', () => {
  const numberToStringConverter = new NumberToStringConverter();

  describe('#convert', () => {

    it('returns the number with the leading spaces filled with the paddingCharacter', () => {
      expect(numberToStringConverter.convert({ number:  0, paddingCharacter: "0", length: 0 })).toEqual(  "0");
      expect(numberToStringConverter.convert({ number:  2, paddingCharacter: "0", length: 0 })).toEqual(  "2");
      expect(numberToStringConverter.convert({ number: 95, paddingCharacter: "0", length: 0 })).toEqual( "95");
      expect(numberToStringConverter.convert({ number:  0, paddingCharacter: "0", length: 1 })).toEqual(  "0");
      expect(numberToStringConverter.convert({ number:  2, paddingCharacter: "0", length: 1 })).toEqual(  "2");
      expect(numberToStringConverter.convert({ number: 95, paddingCharacter: "0", length: 1 })).toEqual( "95");
      expect(numberToStringConverter.convert({ number:  0, paddingCharacter: "0", length: 2 })).toEqual( "00");
      expect(numberToStringConverter.convert({ number:  2, paddingCharacter: "0", length: 2 })).toEqual( "02");
      expect(numberToStringConverter.convert({ number: 95, paddingCharacter: "0", length: 2 })).toEqual( "95");
      expect(numberToStringConverter.convert({ number:  0, paddingCharacter: "0", length: 3 })).toEqual("000");
      expect(numberToStringConverter.convert({ number:  2, paddingCharacter: "0", length: 3 })).toEqual("002");
      expect(numberToStringConverter.convert({ number: 95, paddingCharacter: "0", length: 3 })).toEqual("095");
      expect(numberToStringConverter.convert({ number:  0, paddingCharacter: " ", length: 3 })).toEqual("  0");
      expect(numberToStringConverter.convert({ number:  2, paddingCharacter: " ", length: 3 })).toEqual("  2");
      expect(numberToStringConverter.convert({ number: 95, paddingCharacter: " ", length: 3 })).toEqual(" 95");
    });
  });
});