text:
<?php

namespace Zend\Cache\Storage\Adapter;

use Zend\Cache\Exception;
use Zend\Cache\Storage\AvailableSpaceCapableInterface;
use Zend\Cache\Storage\ClearByNamespaceInterface;
use Zend\Cache\Storage\FlushableInterface;
use Zend\Cache\Storage\TotalSpaceCapableInterface;
use Zend\Stdlib\ErrorHandler;

class ZendServerDisk extends AbstractZendServer implements
    AvailableSpaceCapableInterface,
    ClearByNamespaceInterface,
    FlushableInterface,
    TotalSpaceCapableInterface
{

    /**
     * Buffered total space in bytes
     *
     * @var null|int|float
     */
    protected $totalSpace;

    /**
     * Constructor
     *
     * @param  null|array|\Traversable|AdapterOptions $options
     * @throws Exception\ExtensionNotLoadedException
     */
    public function __construct($options = array())
    {
        if (!function_exists('zend_disk_cache_store')) {
            throw new Exception\ExtensionNotLoadedException("Missing 'zend_disk_cache_*' functions");
        } elseif (PHP_SAPI == 'cli') {
            throw new Exception\ExtensionNotLoadedException("Zend server data cache isn't available on cli");
        }

        parent::__construct($options);
    }

    /* FlushableInterface */

    /**
     * Flush the whole storage
     *
     * @return bool
     */
    public function flush()
    {
        return zend_disk_cache_clear();
    }

    /* ClearByNamespaceInterface */

    /**
     * Remove items of given namespace
     *
     * @param string $namespace
     * @return bool
     */
    public function clearByNamespace($namespace)
    {
        $namespace = (string) $namespace;
        if ($namespace === '') {
            throw new Exception\InvalidArgumentException('No namespace given');
        }

        return zend_disk_cache_clear($namespace);
    }

    /* TotalSpaceCapableInterface */

    /**
     * Get total space in bytes
     *
     * @throws Exception\RuntimeException
     * @return int|float
     */
    public function getTotalSpace()
    {
        if ($this->totalSpace === null) {
            $path = ini_get('zend_datacache.disk.save_path');

            ErrorHandler::start();
            $total = disk_total_space($path);
            $error = ErrorHandler::stop();
            if ($total === false) {
                throw new Exception\RuntimeException("Can't detect total space of '{$path}'", 0, $error);
            }

            $this->totalSpace = $total;
        }
        return $this->totalSpace;
    }

    /* AvailableSpaceCapableInterface */

    /**
     * Get available space in bytes
     *
     * @throws Exception\RuntimeException
     * @return int|float
     */
    public function getAvailableSpace()
    {
        $path = ini_get('zend_datacache.disk.save_path');

        ErrorHandler::start();
        $avail = disk_free_space($path);
        $error = ErrorHandler::stop();
        if ($avail === false) {
            throw new Exception\RuntimeException("Can't detect free space of '{$path}'", 0, $error);
        }

        return $avail;
    }

    /* internal  */

    /**
     * Store data into Zend Data Disk Cache
     *
     * @param  string $internalKey
     * @param  mixed  $value
     * @param  int    $ttl
     * @return void
     * @throws Exception\RuntimeException
     */
    protected function zdcStore($internalKey, $value, $ttl)
    {
        if (!zend_disk_cache_store($internalKey, $value, $ttl)) {
            $valueType = gettype($value);
            throw new Exception\RuntimeException(
                "zend_disk_cache_store($internalKey, <{$valueType}>, {$ttl}) failed"
            );
        }
    }

    /**
     * Fetch a single item from Zend Data Disk Cache
     *
     * @param  string $internalKey
     * @return mixed The stored value or NULL if item wasn't found
     * @throws Exception\RuntimeException
     */
    protected function zdcFetch($internalKey)
    {
        return zend_disk_cache_fetch((string) $internalKey);
    }

    /**
     * Fetch multiple items from Zend Data Disk Cache
     *
     * @param  array $internalKeys
     * @return array All found items
     * @throws Exception\RuntimeException
     */
    protected function zdcFetchMulti(array $internalKeys)
    {
        $items = zend_disk_cache_fetch($internalKeys);
        if ($items === false) {
            throw new Exception\RuntimeException("zend_disk_cache_fetch(<array>) failed");
        }
        return $items;
    }

    /**
     * Delete data from Zend Data Disk Cache
     *
     * @param  string $internalKey
     * @return bool
     * @throws Exception\RuntimeException
     */
    protected function zdcDelete($internalKey)
    {
        return zend_disk_cache_delete($internalKey);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="hello" msgid="1740533743008967039">"Halo Dunia, TestActivity"</string>
    <string name="app_name" msgid="1203877025577761792">"Berbagi-Pakai Bluetooth"</string>
    <string name="insert_record" msgid="1450997173838378132">"Masukkan catatan"</string>
    <string name="update_record" msgid="2480425402384910635">"Konfirmasi catatan"</string>
    <string name="ack_record" msgid="6716152390978472184">"Akui catatan"</string>
    <string name="deleteAll_record" msgid="4383349788485210582">"Hapus semua catatan"</string>
    <string name="ok_button" msgid="6519033415223065454">"Oke"</string>
    <string name="delete_record" msgid="4645040331967533724">"Hapus catatan"</string>
    <string name="start_server" msgid="9034821924409165795">"Mulai server TCP"</string>
    <string name="notify_server" msgid="4369106744022969655">"Beri tahu server TCP"</string>
</resources>

redpajama_set_name: RedPajamaGithub


text:
(function (global, factory) {
	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
	typeof define === 'function' && define.amd ? define(factory) :
	(global.larajsValidator = factory());
}(this, (function () { 'use strict';

var Regex = {};

Regex.alpha = /^[a-zA-Z]*$/;

Regex.alpha_num = /^[a-zA-Z0-9]*$/;

Regex.alpha_dash = /^[a-zA-Z_-]*$/;

Regex.email = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/;

var helpers = {};

/**
 * Check the type of the value
 * @return {string} The type of the given value
 */
var checkType = function (value) {
  if (typeof value === 'object') {
    if (Array.isArray(value)) {
      return 'array';
    }
    else {
      return 'object';
    }
  }
  else if (typeof value === 'string') {
    if (isNaN(parseInt(value)) === false) {
      return 'stringNumber';
    }
    return 'string';
  }
  else if (typeof value === 'number') {
    if (isNaN(value)) {
      return 'NaN';
    }
    return 'number';
  }
  else if (typeof value === 'boolean') {
    return 'boolean';
  }
};

helpers.checkType = checkType;

/**
 * Check whether the value is empty or not.
 * @param  {mixed} value  a value to check.
 * @return {boolean}   true if yes, false if no.
 */
var checkIfHave = function (value) {
  var returned = false;
  if (checkType(value) === 'object') {
    if (value === null) {
      return false;
    }else if (Object.keys(value)
      .length) {
      returned = true;
    }
  }
  else if (checkType(value) === 'array') {
    if (value.length !== 0) {
      returned = true;
    }
  }
  else if (checkType(value) === 'number') {
    return true;
  }
  else {
    if (value) {
      returned = true;
    }
  }
  return returned;
};

helpers.checkIfHave = checkIfHave;

/**
 * Check if errors array is empty or not.
 * @param  {array} errorsArray  errors array.
 * @return {boolean}            true if has, false if not.
 */
var passed = function (errorsArray) {
  if (errorsArray.length === 0) {
    return true;
  }
  else {
    return false;
  }
};

helpers.passed = passed;

/**
 * Split the value by Colon
 * @param  {string} validateRule string to split.
 * @return {array}               an array that have 2 values, ruleName and ruleValue
 */
var splitByColon = function (validateRule) {
  var splitted = validateRule.split(':');
  return splitted;
};

helpers.splitByColon = splitByColon;

/**
 * [splitBySepartor description]
 * @param  {[type]} value [description]
 * @return {[type]}       [description]
 */
var splitBySepartor = function (value) {
  if (!value) {
    return '';
  }
  var splitted = value.split('|');
  return splitted;
};

helpers.splitBySepartor = splitBySepartor;

var builtInRules = {

  /**
   * Check if the value above the minimum
   * @param  {mixed} value  the value that will be checked.
   * @param  {number} rule  the rule.
   * @return {boolean}
   */
  min: function (value, rule) {
    if (!value) {
      return true;
    }

    switch (helpers.checkType(value)) {
      case 'string':
        if (value.length >= rule) {
          return true;
        }
        break;
      case 'stringNumber':
        if (value.length >= rule) {
          return true;
        }
        break;
      case 'number':
        if (value >= rule) {
          return true;
        }
        break;
      case 'array':
        if (value.length >= rule) {
          return true;
        }
        break;
      case 'object':
        if (Object.keys(value)
          .length >= rule) {
          return true;
        }
        break;
    }
    return false;
  },

  /**
   * Check if the value under the maximum
   * @param  {mixed} value  the value that will be checked.
   * @param  {number} rule  the rule.
   * @return {boolean}
   */
  max: function (value, rule) {
    if (!value) {
      return true;
    }

    switch (helpers.checkType(value)) {
      case 'string':
        if (value.length <= rule) {
          return true;
        }
        break;
      case 'stringNumber':
        if (value.length <= rule) {
          return true;
        }
        break;
      case 'number':
        if (value <= rule) {
          return true;
        }
        break;
      case 'array':
        if (value.length <= rule) {
          return true;
        }
        break;
      case 'object':
        if (Object.keys(value)
          .length <= rule) {
          return true;
        }
        break;
    }
    return false;
  },

  /**
   * Check if the value existed
   * @param  {mixed}    value   the value that will be checked.
   * @param  {boolean} rule  the rule.
   * @return {boolean}
   */
  required: function (value) {
    var status = helpers.checkIfHave(value);
    return status;
  },

  /**
   * Check if the value is the same as the rule.
   * @param  {mixed} value the value that will be checked.
   * @param  {mixed} rule  the rule.
   * @return {boolean}
   */
  same: function (value, rule) {
    if (!value) {
      return true;
    }

    if (value === rule) {
      return true;
    }

    return false;
  },

  /**
   * [checkType description]
   * @param  {[type]} value [description]
   * @param  {[type]} rule  [description]
   * @return {[type]}       [description]
   */
  type: function (value, rule) {
    if (!value) {
      return true;
    }

    var type = helpers.checkType(value);
    if (type === rule) {
      return true;
    }

    return false;
  },

  /**
   * [checkSameAttr description]
   * @param  {[type]} value        [description]
   * @param  {[type]} rule         [description]
   * @param  {[type]} valuesObject [description]
   * @return {[type]}              [description]
   */
  sameAttr: function (value, rule, valuesObject) {
    var valueToC = valuesObject[rule];

    // if is setter-getter
    if (typeof valueToC === 'function') {
      valueToC = valueToC();
    }

    if (value === valueToC) {
      return true;
    }

    return false;
  },

  /**
   * [checkAlpha description]
   * @param  {[type]} value [description]
   * @return {[type]}       [description]
   */
  alpha: function (value) {
    var st = Regex.alpha.test(value);
    return st;
  },

  /**
   * [checkAlphaNum description]
   * @param  {[type]} value [description]
   * @return {[type]}       [description]
   */
  alpha_num: function (value) {
    var st = Regex.alpha_num.test(value);
    return st;
  },

  /**
   * [checkAlphaDash description]
   * @param  {[type]} value [description]
   * @return {[type]}       [description]
   */
  alpha_dash: function (value) {
    var st = Regex.alpha_dash.test(value);
    return st;
  },

  /**
   * [checkEmail description]
   * @param  {[type]} value [description]
   * @return {[type]}       [description]
   */
  email: function (value) {
    if (value) {
      var st = Regex.email.test(value);
      return st;
    }
    return true;
  }
};

var RulesController = function () {
  this.rules = builtInRules;
};

var _rulesProto = RulesController.prototype;

/**
 * Add new rule to use in validation
 * @param {String} ruleName     Rule name, which will be used in
 * @param {Function} ruleFunction Rule function takes 3 arguments (value, ruleValue, valuesObject)
 */
_rulesProto.addRule = function (ruleName, ruleFunction) {
  if (!this.rules[ruleName]) {
    this.rules[ruleName] = ruleFunction;
  }
  else {
    throw Error('You\'re overriding a built-in rule, use overrideRule method.');
  }

};

/**
 * Ovrride Rule to use in validation
 * @param {String} ruleName     Rule name, which will be used in
 * @param {Function} ruleFunction Rule function takes 3 arguments (value, ruleValue, valuesObject)
 */
_rulesProto.overrideRule = function (ruleName, ruleFunction) {
  this.rules[ruleName] = ruleFunction;
};

var rulesController = new RulesController();

/**
 * function that return instance of larajsValidator.class
 */
var larajsValidator = function (values, rules, onEvery) {
  var validation = new larajsValidator.class(values, rules, onEvery)
    .init();
  return validation;
};

// Add rulesController to the main function
larajsValidator.rules = rulesController;

/**
 * the main function that contains all functionality
 * @constructor
 * @param  {object}   values    object have the values and their names.
 * @param  {object}   rules     rules to the values.
 * @param  {function} onEvery   function runs on every property validation.
 * @return {object}             Object contains errors and passed functions.
 */
larajsValidator.class = function (values, rules, onEvery) {
  this.userValues = values;
  this.userRules = rules || {};
  this.OnEvery = onEvery;
  this.errors = [];
};

larajsValidator.class.prototype = {
  init: function () {
    this.validate();

    return {
      passed: this.passed,
      errors: this.errors
    };
  },
  passed: function () {
    return helpers.passed(this.errors);
  },

  validate: function () {
    var values = this.userValues;
    var rules = this.userRules;

    for (var value in values) {
      var propName = value,
        prop = values[propName],
        rulesString = rules[propName],
        rule = helpers.splitBySepartor(rulesString),
        ruleErrors = [];

      // if the values are setter-getter
      if (typeof prop === "function") {
        prop = prop();
      }

      if (rule) {
        rule.forEach(function (value) {
          var oneRule = helpers.splitByColon(value),
            oneRuleName = oneRule[0],
            oneRuleValue = oneRule[1] || '',
            validator = rulesController.rules[oneRuleName] || undefined,
            validationStatus;

          if (validator === undefined) {
            throw Error(
              'There is no rule to "' + oneRuleName + '"');
          }

          if (oneRuleValue === '') {
            validationStatus = validator(prop, values);
          }
          else {
            validationStatus = validator(prop, oneRuleValue, values);
          }

          if (!validationStatus) {
            ruleErrors.push(propName + '.' + oneRuleName);
          }
        });

        if (this.OnEvery) {
          this.OnEvery(propName, helpers.passed(ruleErrors));
        }
        this.errors = this.errors.concat(ruleErrors);
      }
    }
  }
};

return larajsValidator;

})));


text:
package com.lizy.myglide;

import android.annotation.TargetApi;
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.widget.ImageView;

import com.lizy.myglide.load.engine.Engine;
import com.lizy.myglide.request.RequestOptions;
import com.lizy.myglide.request.target.ImageViewTargetFactory;
import com.lizy.myglide.request.target.Target;

/**
 * Created by lizy on 16-5-3.
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public class GlideContext extends ContextWrapper implements ComponentCallbacks2 {

    private final Registry registry;
    private final Handler mainHander;
    private final ComponentCallbacks2 componentCallbacks2;
    private final ImageViewTargetFactory imageViewTargetFactory;
    private final RequestOptions defaultRequestOptions;
    private final Engine engine;
    private final int logLevel;

    public GlideContext(Context base,
                        Registry registry,
                        ComponentCallbacks2 componentCallbacks2,
                        ImageViewTargetFactory imageViewTargetFactory,
                        RequestOptions defaultRequestOptions,
                        Engine engine,
                        int logLevel) {
        super(base);
        this.registry = registry;
        this.componentCallbacks2 = componentCallbacks2;
        this.imageViewTargetFactory = imageViewTargetFactory;
        this.defaultRequestOptions = defaultRequestOptions;
        this.engine = engine;
        this.logLevel = logLevel;

        this.mainHander = new Handler(Looper.getMainLooper());
    }

    public Registry getRegistry() {
        return registry;
    }

    public Handler getMainHander() {
        return mainHander;
    }

    public <X> Target<X> buildImageViewTarget(ImageView imageView, Class<X> clazz) {
        return imageViewTargetFactory.buildTarget(imageView, clazz);
    }

    public RequestOptions getDefaultRequestOptions() {
        return defaultRequestOptions;
    }

    public Engine getEngine() {
        return engine;
    }

    public int getLogLevel() {
        return logLevel;
    }

    @Override
    public void onTrimMemory(int level) {
        componentCallbacks2.onTrimMemory(level);
    }

    @Override
    public void onConfigurationChanged(Configuration configuration) {
        componentCallbacks2.onConfigurationChanged(configuration);
    }

    @Override
    public void onLowMemory() {
        componentCallbacks2.onLowMemory();
    }
}


text:
<resources xmlns:tools="http://schemas.android.com/tools">

    <!-- Base application theme. Theme.AppCompat.Light.DarkActionBar-->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->

        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>

        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>

        <!--<item name="android:screenOrientation">portrait</item>   不起作用-->
        <item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
    </style>

    <style name="AppTheme.NoTrans" parent="AppTheme">

    </style>

    <style name="AppTheme.Trans" parent="AppTheme">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowIsTranslucent">true</item>
    </style>

    <style name="PhotoActivityTheme" parent="AppTheme">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowIsTranslucent">true</item>
    </style>

    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

    <style name="WindowAnimationFadeInOut">
        <item name="@android:windowEnterAnimation">@anim/fade_in</item>
        <item name="@android:windowExitAnimation">@anim/fade_out</item>
    </style>

    <style name="TitleTextAppearance">
        <item name="android:textSize">@dimen/text_size_xxl</item>
        <item name="android:textColor">@color/title_color</item>
    </style>

</resources>


text:
package services_test

import (
	"os"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	slclientfakes "github.com/maximilien/softlayer-go/client/fakes"
	common "github.com/maximilien/softlayer-go/common"
	datatypes "github.com/maximilien/softlayer-go/data_types"
	softlayer "github.com/maximilien/softlayer-go/softlayer"
)

var _ = Describe("SoftLayer_Product_Order", func() {
	var (
		username, apiKey string

		fakeClient *slclientfakes.FakeSoftLayerClient

		productOrderService softlayer.SoftLayer_Product_Order_Service
		err                 error
	)

	BeforeEach(func() {
		username = os.Getenv("SL_USERNAME")
		Expect(username).ToNot(Equal(""))

		apiKey = os.Getenv("SL_API_KEY")
		Expect(apiKey).ToNot(Equal(""))

		fakeClient = slclientfakes.NewFakeSoftLayerClient(username, apiKey)
		Expect(fakeClient).ToNot(BeNil())

		productOrderService, err = fakeClient.GetSoftLayer_Product_Order_Service()
		Expect(err).ToNot(HaveOccurred())
		Expect(productOrderService).ToNot(BeNil())
	})

	Context("#GetName", func() {
		It("returns the name for the service", func() {
			name := productOrderService.GetName()
			Expect(name).To(Equal("SoftLayer_Product_Order"))
		})
	})

	Context("#PlaceOrder", func() {
		BeforeEach(func() {
			fakeClient.DoRawHttpRequestResponse, err = common.ReadJsonTestFixtures("services", "SoftLayer_Product_Order_placeOrder.json")
			Expect(err).ToNot(HaveOccurred())
		})

		It("returns an instance of datatypes.SoftLayer_Product_Order_Receipt", func() {
			receipt, err := productOrderService.PlaceOrder(datatypes.SoftLayer_Product_Order{})
			Expect(err).ToNot(HaveOccurred())
			Expect(receipt).ToNot(BeNil())
			Expect(receipt.OrderId).To(Equal(123))
		})
	})
})


text:
var searchData=
[
  ['finished_5floose_5fop_5fallocated_5fargs',['finished_loose_op_allocated_args',['../structfinished__loose__op__allocated__args.html',1,'']]],
  ['framer_5fstate',['framer_state',['../structframer__state.html',1,'']]]
];


text:
import { connect } from 'react-redux';
import { startTimer, stopTimer } from '../actions';
import TimerList from '../components/TimerList';

const mapStateToProps = (state) => ({
  timers: state.timers,
});

const mapDispatchToProps = (dispatch) => ({
  onClickStart: (id) => {
    dispatch(startTimer(id));
  },
  onClickStop: (id) => {
    dispatch(stopTimer(id));
  },
});

const TimerListContainer = connect(
  mapStateToProps,
  mapDispatchToProps
)(TimerList);

export default TimerListContainer;


text:
package com.ktl.moment.android.component;

import com.ktl.moment.R;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

public class LoadingDialog extends Dialog {

	private ImageView mediaImg;
	private Animation anim;

	public LoadingDialog(Context context) {
		super(context, R.style.dialog_style);
		// TODO Auto-generated constructor stub

		View view = View.inflate(getContext(), R.layout.loading_dialog, null);
		setContentView(view);

		mediaImg = (ImageView) findViewById(R.id.loading_media);
		anim = AnimationUtils.loadAnimation(context, R.anim.loading_media_anim);
		mediaImg.startAnimation(anim);
		setCanceledOnTouchOutside(true);
		setCancelable(true);
	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		super.show();
		anim.start();
	}

	@Override
	public void dismiss() {
		// TODO Auto-generated method stub
		super.dismiss();
	}
}


text:
package com.github.simy4.xpath;

import com.github.simy4.xpath.effects.PutEffect;
import com.github.simy4.xpath.effects.PutValueEffect;
import com.github.simy4.xpath.effects.RemoveEffect;
import com.github.simy4.xpath.expr.Expr;
import com.github.simy4.xpath.parser.XPathParser;
import com.github.simy4.xpath.spi.Effect;
import com.github.simy4.xpath.spi.NavigatorSpi;
import com.github.simy4.xpath.util.Function;
import com.github.simy4.xpath.util.LazyMemoizedServiceLoader;

import javax.xml.namespace.NamespaceContext;
import javax.xml.xpath.XPathExpressionException;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * XML model modifier that works via XPath expressions processing.
 *
 * @author Alex Simkin
 * @since 1.0
 */
public class XmlBuilder implements Serializable {

  private static final long serialVersionUID = 1L;
  private static final Function<? super Class<NavigatorSpi>, ? extends Iterable<NavigatorSpi>>
      serviceLoader = new LazyMemoizedServiceLoader<NavigatorSpi>();

  /**
   * Checks whether {@link XmlBuilder} supports given XML model.
   *
   * @param xml XML to check
   * @return {@code true} if it can handle given model or {@code false} otherwise
   */
  public static boolean canHandle(Object xml) {
    for (NavigatorSpi navigatorSpi : serviceLoader.apply(NavigatorSpi.class)) {
      if (navigatorSpi.canHandle(xml)) {
        return true;
      }
    }
    return false;
  }

  private final XPathParser parser;
  private final List<Effect> effects;

  public XmlBuilder() {
    this(null);
  }

  public XmlBuilder(NamespaceContext namespaceContext) {
    this(new XPathParser(namespaceContext), Collections.<Effect>emptyList());
  }

  private XmlBuilder(XPathParser parser, List<Effect> effects) {
    this.parser = parser;
    this.effects = effects;
  }

  /**
   * Greedily creates all missing nodes that could be evaluated by given XPath expression.
   *
   * @param xpath XPath to process
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #putAll(Iterable)
   */
  public XmlBuilder put(String xpath) throws XPathExpressionException {
    return putAll(Collections.singletonList(xpath));
  }

  /**
   * Greedily creates all missing nodes that could be evaluated by given XPath expression and then
   * sets given value as text content to all evaluated nodes.
   *
   * @param xpath XPath to process
   * @param value value to set
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #putAll(Map)
   */
  public XmlBuilder put(String xpath, Object value) throws XPathExpressionException {
    return putAll(Collections.singletonMap(xpath, value));
  }

  /**
   * Greedily creates all missing nodes that could be evaluated by given XPath expressions.
   *
   * @param xpaths XPaths to process
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #putAll(Iterable)
   */
  public XmlBuilder putAll(String... xpaths) throws XPathExpressionException {
    return putAll(Arrays.asList(xpaths));
  }

  /**
   * Greedily creates all missing nodes that could be evaluated by given XPath expressions.
   *
   * @param xpaths XPaths to process
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #put(String)
   * @see #putAll(String...)
   */
  public XmlBuilder putAll(Iterable<String> xpaths) throws XPathExpressionException {
    final List<Effect> effects = new ArrayList<Effect>(this.effects.size() + 1);
    effects.addAll(this.effects);
    for (String xpath : xpaths) {
      final Expr expr = parser.parse(xpath);
      effects.add(new PutEffect(expr));
    }
    return new XmlBuilder(parser, effects);
  }

  /**
   * Greedily creates all missing nodes that could be evaluated by given XPath expressions and then
   * sets the associated value as text content to all evaluated nodes.
   *
   * @param xpathToValueMap XPath to values associations
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #put(String, Object)
   */
  public XmlBuilder putAll(Map<String, Object> xpathToValueMap) throws XPathExpressionException {
    final List<Effect> effects =
        new ArrayList<Effect>(this.effects.size() + xpathToValueMap.size());
    effects.addAll(this.effects);
    for (Map.Entry<String, Object> xpathToValuePair : xpathToValueMap.entrySet()) {
      final Expr expr = parser.parse(xpathToValuePair.getKey());
      effects.add(new PutValueEffect(expr, xpathToValuePair.getValue()));
    }
    return new XmlBuilder(parser, effects);
  }

  /**
   * Evaluates given XPath expression and detaches all of the resulting nodes.
   *
   * @param xpath XPath to process
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #removeAll(Iterable)
   */
  public XmlBuilder remove(String xpath) throws XPathExpressionException {
    return removeAll(Collections.singletonList(xpath));
  }

  /**
   * Evaluates given XPath expressions and detaches all of the resulting nodes.
   *
   * @param xpaths XPaths to process
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #removeAll(Iterable)
   */
  public XmlBuilder removeAll(String... xpaths) throws XPathExpressionException {
    return removeAll(Arrays.asList(xpaths));
  }

  /**
   * Evaluates given XPath expressions and detaches all of the resulting nodes.
   *
   * @param xpaths XPaths to process
   * @return {@link XmlBuilder} instance
   * @throws XPathExpressionException if xpath cannot be parsed
   * @see #remove(String)
   * @see #removeAll(String...)
   */
  public XmlBuilder removeAll(Iterable<String> xpaths) throws XPathExpressionException {
    final List<Effect> effects = new ArrayList<Effect>(this.effects.size() + 1);
    effects.addAll(this.effects);
    for (String xpath : xpaths) {
      final Expr expr = parser.parse(xpath);
      effects.add(new RemoveEffect(expr));
    }
    return new XmlBuilder(parser, effects);
  }

  /**
   * Evaluates collected XPath effects on a given XML model object.
   *
   * @param xml XML to process
   * @param <T> XML model type
   * @return processing result
   * @throws XmlBuilderException if XML model modification failed
   */
  public <T> T build(T xml) throws XmlBuilderException {
    for (NavigatorSpi navigatorSpi : serviceLoader.apply(NavigatorSpi.class)) {
      if (navigatorSpi.canHandle(xml)) {
        return navigatorSpi.process(xml, effects);
      }
    }
    throw new XmlBuilderException("Unsupported xml model");
  }
}


text:
"""
sentry.models.groupcountbyminute
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from django.db import models

from sentry.db.models import (
    Model, BoundedPositiveIntegerField, BaseManager, sane_repr
)

class GroupCountByMinute(Model):
    """
    Stores the total number of messages seen by a group at N minute intervals.

    e.g. if it happened at 08:34:55 the time would be normalized to 08:30:00
    """

    project = models.ForeignKey('sentry.Project', null=True)
    group = models.ForeignKey('sentry.Group')
    date = models.DateTimeField(db_index=True)  # normalized to HH:MM:00
    times_seen = BoundedPositiveIntegerField(default=0)
    time_spent_total = BoundedPositiveIntegerField(default=0)
    time_spent_count = BoundedPositiveIntegerField(default=0)

    objects = BaseManager()

    class Meta:
        app_label = 'sentry'
        db_table = 'sentry_messagecountbyminute'
        unique_together = (('project', 'group', 'date'),)

    __repr__ = sane_repr('project_id', 'group_id', 'date')


text:
package org.apache.hadoop.hbase.regionserver;

import java.io.IOException;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.yetus.audience.InterfaceAudience;

/**
 * Special scanner, currently used for increment operations to allow additional server-side
 * arguments for Scan operations.
 *

 * Rather than adding new options/parameters to the public Scan API, this new class has been
 * created.
 *

 * Supports adding an option to only read from the MemStore with {@link #checkOnlyMemStore()} or to
 * only read from StoreFiles with {@link #checkOnlyStoreFiles()}.
 */
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC)
public class InternalScan extends Scan {
  private boolean memOnly = false;
  private boolean filesOnly = false;

  /**
   * @param get get to model scan after
   */
  public InternalScan(Get get) {
    super(get);
  }

  /**
   * @param scan - original scan object n
   */
  public InternalScan(Scan scan) throws IOException {
    super(scan);
  }

  /**
   * StoreFiles will not be scanned. Only MemStore will be scanned.
   */
  public void checkOnlyMemStore() {
    memOnly = true;
    filesOnly = false;
  }

  /**
   * MemStore will not be scanned. Only StoreFiles will be scanned.
   */
  public void checkOnlyStoreFiles() {
    memOnly = false;
    filesOnly = true;
  }

  /**
   * Returns true if only the MemStore should be checked. False if not.
   * @return true to only check MemStore
   */
  public boolean isCheckOnlyMemStore() {
    return (memOnly);
  }

  /**
   * Returns true if only StoreFiles should be checked. False if not.
   * @return true if only check StoreFiles
   */
  public boolean isCheckOnlyStoreFiles() {
    return (filesOnly);
  }
}


text:
from . import functions
# Hack to update methods
from . import factorials
from . import hypergeometric
from . import expintegrals
from . import bessel
from . import orthogonal
from . import theta
from . import elliptic
from . import zeta
from . import rszeta
from . import zetazeros
from . import qfunctions


text:
package com.macoscpoe.roombooker.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.macoscpoe.roombooker.R;

public class EventViewHolder extends RecyclerView.ViewHolder {
    public TextView summary;
    public TextView organizer;
    public TextView startDate;
    public TextView endDate;
    public TextView status;

    public EventViewHolder(View itemView) {
        super(itemView);
        summary = (TextView) itemView.findViewById(R.id.ve_summary);
        organizer = (TextView) itemView.findViewById(R.id.ve_organizer);
        startDate = (TextView) itemView.findViewById(R.id.ve_start_date);
        endDate = (TextView) itemView.findViewById(R.id.ve_end_date);
        status = (TextView) itemView.findViewById(R.id.ve_status);
    }
}


text:
title: http4k Client Modules
description: Feature overview of the http4k-client modules

### Installation (Gradle)

```groovy
// Java (for development only):
implementation group: "org.http4k", name: "http4k-core", version: "4.34.1.0"

// Apache v5 (Sync):
implementation group: "org.http4k", name: "http4k-client-apache", version: "4.34.1.0"

// Apache v4 (Sync):
implementation group: "org.http4k", name: "http4k-client-apache4", version: "4.34.1.0"

// Apache v5 (Async):
implementation group: "org.http4k", name: "http4k-client-apache-async", version: "4.34.1.0"

// Apache v4 (Async):
implementation group: "org.http4k", name: "http4k-client-apache4-async", version: "4.34.1.0"

// Fuel (Sync + Async):
implementation group: "org.http4k", name: "http4k-client-fuel", version: "4.34.1.0"

// Jetty (Sync + Async + WebSocket):
implementation group: "org.http4k", name: "http4k-client-jetty", version: "4.34.1.0"

// OkHttp (Sync + Async):
implementation group: "org.http4k", name: "http4k-client-okhttp", version: "4.34.1.0"

// Websocket:
implementation group: "org.http4k", name: "http4k-client-websocket", version: "4.34.1.0"
```

### HTTP
Supported HTTP client adapter APIs are wrapped to provide an `HttpHandler` interface in 1 LOC.

Activate streaming mode by passing a `BodyMode` (default is non-streaming).

These examples are for the Apache HTTP client, but the API is similar for the others:

#### Code [](https://github.com/http4k/http4k/blob/master/src/docs/guide/reference/clients/example_http.kt)

Additionally, all HTTP client adapter modules allow for custom configuration of the relevant underlying client. Async-supporting clients implement the `AsyncHttpClient` interface can be passed a callback.

### Websocket
http4k supplies both blocking and non-blocking Websocket clients. The former is perfect for integration testing purposes, and as it uses the same interface `WsClient` as the in-memory test client (`WsHandler.testWsClient()`) it is simple to write unit tests which can then be reused as system tests by virtue of swapping out the client.

#### Code [](https://github.com/http4k/http4k/blob/master/src/docs/guide/reference/clients/example_websocket.kt)

#### Testing Websockets with offline and online clients [](https://github.com/http4k/http4k/blob/master/src/docs/guide/reference/clients/TestingWebsockets.kt)


text:
/*
 * Do not modify this file. This file is generated from the ec2-2014-10-01.normal.json service model.
 */

using System;

namespace Amazon.EC2.Model
{
    /// <summary>
    /// Configuration for accessing Amazon DescribeExportTasks service
    /// </summary>
    public partial class DescribeExportTasksResponse : DescribeExportTasksResult
    {
        /// <summary>
        /// Gets and sets the DescribeExportTasksResult property.
        /// Represents the output of a DescribeExportTasks operation.
        /// </summary>
        [Obsolete(@"This property has been deprecated. All properties of the DescribeExportTasksResult class are now available on the DescribeExportTasksResponse class. You should use the properties on DescribeExportTasksResponse instead of accessing them through DescribeExportTasksResult.")]
        public DescribeExportTasksResult DescribeExportTasksResult
        {
            get
            {
                return this;
            }
        }
    }
}


text:
using System.Runtime.Serialization;

namespace EncompassRest.Loans.Enums
{
    /// <summary>
    /// HmdaEthnicityType
    /// </summary>
    public enum HmdaEthnicityType
    {
        /// <summary>
        /// Hispanic or Latino
        /// </summary>
        [EnumMember(Value = "Hispanic or Latino")]
        HispanicOrLatino = 0,
        /// <summary>
        /// Not Hispanic or Latino
        /// </summary>
        [EnumMember(Value = "Not Hispanic or Latino")]
        NotHispanicOrLatino = 1,
        /// <summary>
        /// Information not provided
        /// </summary>
        [EnumMember(Value = "Information not provided")]
        InformationNotProvided = 2,
        /// <summary>
        /// Not applicable
        /// </summary>
        [EnumMember(Value = "Not applicable")]
        NotApplicable = 3
    }
}


text:
require 'spec_helper'

describe PuppetForge::Metadata do
  let(:data) { {} }
  let(:metadata) { PuppetForge::Metadata.new }

  describe 'property lookups' do
    subject { metadata }

    %w[ name version author summary license source project_page issues_url
    dependencies dashed_name release_name description ].each do |prop|
      describe "##{prop}" do
        it "responds to the property" do
          subject.send(prop)
        end
      end
    end
  end

  describe "#update" do
    subject { metadata.update(data) }

    context "with a valid name" do
      let(:data) { { 'name' => 'billgates-mymodule' } }

      it "extracts the author name from the name field" do
        expect(subject.to_hash['author']).to eq('billgates')
      end

      it "extracts a module name from the name field" do
        expect(subject.module_name).to eq('mymodule')
      end

      context "and existing author" do
        before { metadata.update('author' => 'foo') }

        it "avoids overwriting the existing author" do
          expect(subject.to_hash['author']).to eq('foo')
        end
      end
    end

    context "with a valid name and author" do
      let(:data) { { 'name' => 'billgates-mymodule', 'author' => 'foo' } }

      it "use the author name from the author field" do
        expect(subject.to_hash['author']).to eq('foo')
      end

      context "and preexisting author" do
        before { metadata.update('author' => 'bar') }

        it "avoids overwriting the existing author" do
          expect(subject.to_hash['author']).to eq('foo')
        end
      end
    end

    context "with an invalid name" do
      context "(short module name)" do
        let(:data) { { 'name' => 'mymodule' } }

        it "raises an exception" do
          expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the field must be a namespaced module name")
        end
      end

      context "(missing namespace)" do
        let(:data) { { 'name' => '/mymodule' } }

        it "raises an exception" do
          expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the field must be a namespaced module name")
        end
      end

      context "(missing module name)" do
        let(:data) { { 'name' => 'namespace/' } }

        it "raises an exception" do
          expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the field must be a namespaced module name")
        end
      end

      context "(invalid namespace)" do
        let(:data) { { 'name' => "dolla'bill$-mymodule" } }

        it "raises an exception" do
          expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the namespace contains non-alphanumeric characters")
        end
      end

      context "(non-alphanumeric module name)" do
        let(:data) { { 'name' => "dollabils-fivedolla'" } }

        it "raises an exception" do
          expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the module name contains non-alphanumeric (or underscore) characters")
        end
      end

      context "(module name starts with a number)" do
        let(:data) { { 'name' => "dollabills-5dollars" } }

        it "raises an exception" do
          expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the module name must begin with a letter")
        end
      end
    end

    context "with an invalid version" do
      let(:data) { { 'version' => '3.0' } }

      it "raises an exception" do
        expect { subject }.to raise_error(ArgumentError, "Invalid 'version' field in metadata.json: version string cannot be parsed as a valid Semantic Version")
      end
    end

    context "with a valid source" do
      context "which is a GitHub URL" do
        context "with a scheme" do
          before { metadata.update('source' => 'https://github.com/billgates/amazingness') }

          it "predicts a default project_page" do
            expect(subject.to_hash['project_page']).to eq('https://github.com/billgates/amazingness')
          end

          it "predicts a default issues_url" do
            expect(subject.to_hash['issues_url']).to eq('https://github.com/billgates/amazingness/issues')
          end
        end

        context "without a scheme" do
          before { metadata.update('source' => 'github.com/billgates/amazingness') }

          it "predicts a default project_page" do
            expect(subject.to_hash['project_page']).to eq('https://github.com/billgates/amazingness')
          end

          it "predicts a default issues_url" do
            expect(subject.to_hash['issues_url']).to eq('https://github.com/billgates/amazingness/issues')
          end
        end
      end

      context "which is not a GitHub URL" do
        before { metadata.update('source' => 'https://notgithub.com/billgates/amazingness') }

        it "does not predict a default project_page" do
          expect(subject.to_hash['project_page']).to be nil
        end

        it "does not predict a default issues_url" do
          expect(subject.to_hash['issues_url']).to be nil
        end
      end

      context "which is not a URL" do
        before { metadata.update('source' => 'my brain') }

        it "does not predict a default project_page" do
          expect(subject.to_hash['project_page']).to be nil
        end

        it "does not predict a default issues_url" do
          expect(subject.to_hash['issues_url']).to be nil
        end
      end

    end

    context "with a valid dependency", :pending => "dependency resolution is not yet in scope" do
      let(:data) { {'dependencies' => [{'name' => 'puppetlabs-goodmodule'}] }}

      it "adds the dependency" do
        expect(subject.dependencies.size).to eq(1)
      end
    end

    context "with a invalid dependency name" do
      let(:data) { {'dependencies' => [{'name' => 'puppetlabsbadmodule'}] }}

      it "raises an exception" do
        expect { subject }.to raise_error(ArgumentError)
      end
    end

    context "with a valid dependency version range", :pending => "dependency resolution is not yet in scope" do
      let(:data) { {'dependencies' => [{'name' => 'puppetlabs-badmodule', 'version_requirement' => '>= 2.0.0'}] }}

      it "adds the dependency" do
        expect(subject.dependencies.size).to eq(1)
      end
    end

    context "with a invalid version range" do
      let(:data) { {'dependencies' => [{'name' => 'puppetlabsbadmodule', 'version_requirement' => '>= banana'}] }}

      it "raises an exception" do
        expect { subject }.to raise_error(ArgumentError)
      end
    end

    context "with duplicate dependencies", :pending => "dependency resolution is not yet in scope" do
      let(:data) { {'dependencies' => [{'name' => 'puppetlabs-dupmodule', 'version_requirement' => '1.0.0'},
        {'name' => 'puppetlabs-dupmodule', 'version_requirement' => '0.0.1'}] }
      }

      it "raises an exception" do
        expect { subject }.to raise_error(ArgumentError)
      end
    end

    context "adding a duplicate dependency", :pending => "dependency resolution is not yet in scope" do
      let(:data) { {'dependencies' => [{'name' => 'puppetlabs-origmodule', 'version_requirement' => '1.0.0'}] }}

      it "with a different version raises an exception" do
        metadata.add_dependency('puppetlabs-origmodule', '>= 0.0.1')
        expect { subject }.to raise_error(ArgumentError)
      end

      it "with the same version does not add another dependency" do
        metadata.add_dependency('puppetlabs-origmodule', '1.0.0')
        expect(subject.dependencies.size).to eq(1)
      end
    end
  end

  describe '#dashed_name' do
    it 'returns nil in the absence of a module name' do
      expect(metadata.update('version' => '1.0.0').release_name).to be_nil
    end

    it 'returns a hyphenated string containing namespace and module name' do
      data = metadata.update('name' => 'foo-bar')
      expect(data.dashed_name).to eq('foo-bar')
    end

    it 'properly handles slash-separated names' do
      data = metadata.update('name' => 'foo/bar')
      expect(data.dashed_name).to eq('foo-bar')
    end

    it 'is unaffected by author name' do
      data = metadata.update('name' => 'foo/bar', 'author' => 'me')
      expect(data.dashed_name).to eq('foo-bar')
    end
  end

  describe '#release_name' do
    it 'returns nil in the absence of a module name' do
      expect(metadata.update('version' => '1.0.0').release_name).to be_nil
    end

    it 'returns nil in the absence of a version' do
      expect(metadata.update('name' => 'foo/bar').release_name).to be_nil
    end

    it 'returns a hyphenated string containing module name and version' do
      data = metadata.update('name' => 'foo/bar', 'version' => '1.0.0')
      expect(data.release_name).to eq('foo-bar-1.0.0')
    end

    it 'is unaffected by author name' do
      data = metadata.update('name' => 'foo/bar', 'version' => '1.0.0', 'author' => 'me')
      expect(data.release_name).to eq('foo-bar-1.0.0')
    end
  end

  describe "#to_hash" do
    subject { metadata.to_hash }

    it "contains the default set of keys" do
      expect(subject.keys.sort).to eq(%w[ name version author summary license source issues_url project_page dependencies ].sort)
    end

    describe "['license']" do
      it "defaults to Apache 2" do
        expect(subject['license']).to eq("Apache-2.0")
      end
    end

    describe "['dependencies']" do
      it "defaults to an empty set" do
        expect(subject['dependencies']).to eq(Set.new)
      end
    end

    context "when updated with non-default data" do
      subject { metadata.update('license' => 'MIT', 'non-standard' => 'yup').to_hash }

      it "overrides the defaults" do
        expect(subject['license']).to eq('MIT')
      end

      it 'contains unanticipated values' do
        expect(subject['non-standard']).to eq('yup')
      end
    end
  end
end


text:
package httpbackend

import (
	"encoding/json"
	"net/http"

	"github.com/khades/servbot/models"
	"github.com/khades/servbot/repos"
)

func channelInfo(w http.ResponseWriter, r *http.Request, s *models.HTTPSession, channelID *string, channelName *string) {
	channelInfo, error := repos.GetChannelInfo(channelID)
	if error != nil {
		writeJSONError(w, error.Error(), http.StatusInternalServerError)
		return
	}
	json.NewEncoder(w).Encode(&channelInfo)
}


text:
package main;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.ArrayList;

import org.apache.log4j.PropertyConfigurator;
import print.color.Ansi.Attribute;
import print.color.Ansi.BColor;
import print.color.Ansi.FColor;
import print.color.ColoredPrinter;
import util.Option;
import util.Options;
import performance.PerformanceLogger;

import static util.Options.*;

public class TDS {

    private TDSOriginal tds1;
    private TDSImproved tds2;
    private TDSFaultTolerant tds3;
    private static ColoredPrinter cp;
    private static boolean[] done;

    private static TDS instance = new TDS();

    private TDS(){
    	cp = new ColoredPrinter.Builder(1, false).build();
    	done = new boolean[3];
    }

    public static synchronized TDS instance(){
    	return instance;
    }

    /**
     * Uncomment when working on eclipse or generally when output is not
     * printed in terminal.
     */
//    public static synchronized void writeString(int version, String s){
//    	System.out.println("[" + version + "] " + s);
//    }

    /**
     * Uncomment to create the jar
     */
    public static synchronized void writeString(int version,String s) {
    	if(Options.instance().get(Options.VERBOSE) == 0) return;
    	if(version==1)
    		cp.print("[ O-FSS ]", Attribute.BOLD, FColor.WHITE, BColor.BLUE);
    	else if(version == 2)
    	    cp.print("[ I-FSS ]", Attribute.BOLD, FColor.WHITE, BColor.YELLOW);
    	else if(version == 3)
    	    cp.print("[   FTS ]", Attribute.BOLD, FColor.WHITE, BColor.BLACK);
    	else if(version == 0){//warning
    		cp.print("[  INFO ]", Attribute.BOLD, FColor.YELLOW, BColor.GREEN);
    		cp.clear();
    		cp.println(s);
    		return;
    	}else if(version == -1) {
    	    cp.print("[TIMEOUT]", Attribute.BOLD, FColor.WHITE, BColor.RED);
    	    cp.clear();
    	    cp.println(s);
    	    return;
    	}else if(version == -2) {
    	    cp.print("[WARNING]", Attribute.BOLD, FColor.YELLOW, BColor.RED);
    	    cp.clear();
    	    cp.println(s);
    	    return;
    	}
    	if(s.contains("Termination")){
    		if(s.charAt(9) == '\t'){
    			cp.print(s.substring(0,10), Attribute.BOLD, FColor.RED, BColor.YELLOW);
    			cp.clear();
    			cp.print(s.substring(10));
    		}else{
    			cp.print(s.substring(0,11), Attribute.BOLD, FColor.RED, BColor.YELLOW);
    			cp.clear();
    			cp.print(s.substring(11));
    		}

    		cp.print("\n");
    	}else{
    		cp.clear();
        	cp.println(s);
    	}

    }

    public void announce(int version){
    	if(version == 1)
    		tds1.announce();
    	else if(version == 2)
    		tds2.announce();
    	else if(version == 3)
    		tds3.announce();
    }

    public void setDone(int version){
    	synchronized(this){
    		done[version - 1] = true;
        	notifyAll();
    	}

    }

    private void waitAllDone(){
    	synchronized(this){
    		while(!(done[0] && done[1] && done[2])){
    			try {
					wait();
				} catch (InterruptedException e) {
					break;
				}
    		}
    	}
    }

    private void printSimInfo() {
        for(Option opt: Options.instance().getAll()){
            if(opt.getName().equals("-ci") || opt.getName().equals("-anl") || opt.getName().equals("-cni"))
                System.out.print(opt.alias() + " ");
            else
                System.out.print(opt.alias() + " \t");
            if(opt.getName().equals("-dist")) {
                switch(Options.instance().get(PROB_DISTRIBUTION)) {
                    case PROB_DISTRIBUTION_UNIFORM:
                        System.out.println("-- uniform"); break;
                    case PROB_DISTRIBUTION_GAUSSIAN:
                        System.out.println("-- gaussian"); break;
                }
            } else if (opt.getName().equals("-strategy")) {
                switch(Options.instance().get(ACTIVITY_STRATEGY)) {
                    case ACTIVITY_STRATEGY_COMPUTE_SEND:
                        System.out.println("-- compute-send"); break;
                    case ACTIVITY_STRATEGY_N_ACTIVITIES:
                        System.out.println("-- n-activities"); break;
                }

            } else if (opt.getName().equals("-batype")) {
                switch(Options.instance().get(BASIC_ALGO_TYPE)) {
                    case BASIC_ALGO_CENTRALIZED:
                        System.out.println("-- centralized"); break;
                    case BASIC_ALGO_DECENTRALIZED_EVEN:
                        System.out.println("-- even-nodes-active"); break;
                    case BASIC_ALGO_DECENTRALIZED_RANDOM:
                        System.out.println("-- random-nodes-active"); break;
                }
            } else if(opt.getName().equals("-ci")){
                switch(Options.instance().get(CRASHING_NODES_INTERVAL)) {
                    case CRASHING_NODES_INTERVAL_GAUSSIAN:
                        System.out.println("-- gaussian"); break;
                    case CRASHING_NODES_INTERVAL_UNIFORM:
                        System.out.println("-- uniform"); break;
                    default:
                        System.out.println("-- " + Options.instance().get(CRASHING_NODES_INTERVAL)); break;
                }
            } else if (opt.getName().equals("-c")) {
                if(Options.instance().get(CRASHING_NODES) == Options.CRASHING_NODES_RANDOM) {
                    System.out.println("\t-- random");
                } else {
                    System.out.println("\t-- " + Options.instance().get(CRASHING_NODES));
                }
            } else if (opt.getName().equals("-anl")) {
                System.out.println("-- " + Options.instance().get(opt.getId()));
            } else {
                System.out.println(" \t-- " + Options.instance().get(opt.getId()));
            }
        }
    }

    public void start(){
        if(Options.instance().get(PRINT_INFO) == Options.PRINT_INFO_ACTIVE)
            printSimInfo();
    	if(Options.instance().get(Options.VERSION) == 0){
    		tds1 = new TDSOriginal(Options.instance().get(Options.NUM_OF_NODES), Options.instance().get(Options.MAX_WAIT));
    		tds2 = new TDSImproved(Options.instance().get(Options.NUM_OF_NODES), Options.instance().get(Options.MAX_WAIT));
    		tds3 = new TDSFaultTolerant(Options.instance().get(Options.NUM_OF_NODES), Options.instance().get(Options.MAX_WAIT));
    		new Thread(tds1).start();
        	new Thread(tds2).start();
        	new Thread(tds3).start();
    	}else{//ugly but ok for now
    	    done[0] = done[1] = done[2] = true;
    	    ArrayList<Runnable> tds = new ArrayList<Runnable>();
            int version = Options.instance().get(Options.VERSION);
            String versionString = String.valueOf(version);

            if(versionString.contains("1")){
                tds1 = new TDSOriginal(Options.instance().get(Options.NUM_OF_NODES), Options.instance().get(Options.MAX_WAIT));
                done[0] = false;
                new Thread(tds1).start();
            }

            if(versionString.contains("2")){
                tds2 = new TDSImproved(Options.instance().get(Options.NUM_OF_NODES), Options.instance().get(Options.MAX_WAIT));
                done[1] = false;
                new Thread(tds2).start();
            }

            if(versionString.contains("3") ){
                tds3 = new TDSFaultTolerant(Options.instance().get(Options.NUM_OF_NODES), Options.instance().get(Options.MAX_WAIT));
                done[2] = false;
                new Thread(tds3).start();
            }
    	}

    	waitAllDone();

    	if(Options.instance().get(Options.FLUSH_CSV) == 1){
    		try {
				PerformanceLogger.instance().clearCSV();
			} catch (IOException e) {
				System.out.println("Error flushing CSV:\n" + e.getMessage());
			}
    	}
    	if(Options.instance().get(Options.CSV) == 1){
        	try {
    			PerformanceLogger.instance().writeToCSV();
    		} catch (IOException e) {
    			System.out.println("Error writting CSV:\n" + e.getMessage());
    		}
    	}

    }

    public static void main(String[] args) {
    	Options.instance().parse(args);
    	TDS.instance.start();
    }

}


text:
var https = require('https');
var http = require('http'); // TODO: replace http(s) with request.
var utils = require('./utils');
var Error = require('./error');
var FormData = require('form-data');
var fs = require('fs');

function BaseResource(kloudless) {
    this._kloudless = kloudless;
}

BaseResource.prototype = {
    path: '',
    setMethods: function(methods) {
        for (var methodName in methods) {
            if (!this['_methods']) this['_methods'] = {};
            this['_methods'][methodName] = new methods[methodName](this);
            this[methodName] = (function(name, createdResource) {
                return function() {
                    var args = [];
                    for (var i in arguments) {
                        args.push(arguments[i]);
                    }
                    args.push(name);
                    createdResource['_methods'][name].call.apply(
                        createdResource['_methods'][name], args);
                };
            })(methodName, this);
        }
    },
    _responseHandler: function(req, parse, callback) {
        return function(res) {
            var statusCodeType = res.statusCode.toString()[0];

            if (!res['headers']['content-type']) res['headers']['content-type'] = '';
            var contentTypeParams = res['headers']['content-type'].split(';');
            var contentType = contentTypeParams[0];
            var charEncoding;
            if (contentTypeParams[1])
                charEncoding = contentTypeParams[1].split('=')[1];
            charEncoding = charEncoding || 'utf-8';

            if (!parse && statusCodeType == '2') {
                return callback(null, res, res);
            } else {
                res.setEncoding(charEncoding);
                var response = '';
                var parsedResponse;
                res.on('data', function(chunk) {
                    response += chunk;
                });
                res.on('end', function() {
                    try {
                         parsedResponse = JSON.parse(response || '{}');
                    } catch (e) {
                        return callback(new Error.KloudlessError({
                            errorData: response,
                            status: res.statusCode,
                            message: 'The Kloudless API returned invalid JSON: ' + response,
                            response: res,
                            exception: e
                        }));
                    }

                    if (statusCodeType != '2') {
                        if (statusCodeType == '5') {
                            return callback(new Error.KloudlessServerError({
                                errorData: response,
                                response: res,
                                statusCode: res.statusCode
                            }));
                        } else {
                            return callback(new Error.KloudlessAPIError({
                                errorData: response,
                                response: res,
                                statusCode: res.statusCode,
                                message: (parsedResponse['message'] || ''),
                                code: (parsedResponse['error_code'] || ''),
                            }));
                        }

                    } else {
                        return callback(null, parsedResponse, res);
                    }
                });
            }
        };
    },
    _timeoutHandler: function(timeout, req, callback) {
        return function() {
            req._isAborted = true;
            req.abort();

            callback.call(
                new Error.KloudlessError({
                    message:'Timeout reached in request to Kloudless API, request aborted (' + timeout + 'ms)'
                })
            );
        };
    },
    _errorHandler: function(req, callback) {
        return function(error) {
            if (req._isAborted) return;
            callback(
                new Error.KloudlessError({
                    message:'There was an error during the call to the Kloudless API: \n' + error
                })
            );
        };
    },
    _request: function(method, path, data, user_headers, parseResponse, callback) {
        var self = this;
        user_headers = user_headers || {};
        var headers;
        var requestData = JSON.stringify(data || {});
        var shouldPipeFile = false;

        if (data['file'] && (data['file'] instanceof Buffer || data['file'] instanceof fs.ReadStream)) {
            shouldPipeFile = true;

            headers = {
                'Authorization': this._kloudless.getApiField('auth'),
                'Accept': 'application/json',
                'Content-Type': "application/octet-stream",
                'X-Kloudless-Metadata': data['metadata']
                // X-Kloudless-Metadata is json like '{"name": "hello.png", "parent_id": "fL2hp"}'
            }
        } else {
            headers = {
                'Authorization': this._kloudless.getApiField('auth'),
                'Accept': 'application/json',
                'Content-Type': 'application/json',
                'Content-Length': requestData.length
            };
        }

        for (var h in user_headers) {
            headers[h] = user_headers[h];
        }

        makeRequest();

        function makeRequest() {
            var timeout = self._kloudless.getApiField('timeout');

            var options = {
                host: self._kloudless.getApiField('host'),
                port: self._kloudless.getApiField('port'),
                path: self._kloudless.getApiField('basePath').replace(/\/+$/, '') + '/' + path.replace(/^\/+/, ''),
                method: method,
                headers: headers
            };
            if (self._kloudless.getApiField('ca') != null)
                options['ca'] = self._kloudless.getApiField('ca');

            var mod = https;
            if (self._kloudless.getApiField('protocol') === 'http')
                mod = http;

            var req = mod.request(options);

            req.setTimeout(timeout, self._timeoutHandler(timeout, req, callback));
            req.on('response', self._responseHandler(req, parseResponse, callback));
            req.on('error', self._errorHandler(req, callback));

            if (shouldPipeFile) {
                req.write(data['file']);
            } else {
                req.write(requestData, 'utf8');
            }
            req.end();
        }
    }
};

BaseResource.extend = utils.protoExtend;

var Accounts = BaseResource.extend({
    path:'accounts'
});

var Applications = BaseResource.extend({
    path: 'meta/applications/'
})

var Developers = BaseResource.extend({
    path:'meta/developers/'
});

var Files = BaseResource.extend({
    path:'accounts'
});

var Folders = BaseResource.extend({
    path:'accounts'
});

var Links = BaseResource.extend({
    path:'accounts'
});

var Events = BaseResource.extend({
    path: 'accounts'
});

var Users = BaseResource.extend({
    path: 'accounts'
});

module.exports = {
    Accounts: Accounts,
    Applications: Applications,
    Developers: Developers,
    Files: Files,
    Folders: Folders,
    Links: Links,
    Events: Events,
    Users: Users
};


text:
MUJIN Frontend Programming Challenge
=============

Howdy there candidate! This programming challenge is to help us gauge your frontend software engineering skills during our hiring process. You'll be developing a simple [Backbone](http://backbonejs.org/) app from scratch.

For this challenge, you'll be using Backbone in conjunction with [threejs](http://threejs.org/) to make a simple 3d object viewer and editor. Users should be able to create / edit / update / delete 3d primitives (like boxes, spheres, etc.) in their browser. It'll be similar in function to the [threejs editor](http://threejs.org/editor/) but far less complicated and built with Backbone instead of vanilla javascript.

###Instructions:

- Create a new repository on github and copy this README file in. DO NOT fork this repo and don't put "MUJIN" in the name of the repo.
- Complete the challenge, making commits along the way. The components and other things we're looking for are outlined below. You can use any additional dependencies / development tools you want (within reason), but at minimum you have to use Backbone and threejs.
- Deploy your completed application somewhere public on the internet and send us the link when you're done. We recommend [github pages](https://pages.github.com/).

###Major components of the application:

- Renderer
  - Should be a view that wraps the threejs renderer
  - Able to navigate around the 3d environment with a mouse
  - Click on drawables in the renderer and trigger a custom event that the rest of the application responds to
- Drawable
  - Should be a model that represents objects in the scene
  - Store model attributes in browser local storage. Should be able to refresh the page and not lose any information about the drawables.
  - All changes to model attributes should be immediately reflected in the renderer when they happen
  - Able to change position and orientation of drawable by modifying model attributes. You can choose what attributes you want to use to represent this (could use a 4x4 `matrix` attribute, or separate `translation` / `quaternion` attributes for example).
  - Able to change the color of the drawable by modifying the `color` attribute
  - Able to change the name of the drawable by modifying the `name` attribute
  - Able to change various model attributes to change the properties of the dimensions of the geometry depending on the geometry type. So for example, if the drawable is a `box`, able to set the `length`, `width`, and `height`.
    - Geometry types and dimension attributes:
      - `box` (`length`, `width`, `height`)
      - `sphere` (`radius`)
- Drawable list
  - One or more views that list all the objects by name and type
- Drawable create / delete controls
  - One or more views that allows the creation and deletion of drawables
- Drawable edit controls
  - One or more views that allows the modification of drawable attributes
  - Should be able to edit attributes common to all drawables, as well as attributes that depend on the geometry type of the drawable
  - If a drawable is clicked in the renderer, focus of the controls should change to that drawable

###Bonus feature:
- Allow clicking and dragging of drawables to change their position and orientation

###Other things we're looking for:

Besides fulfilling the basic goal of implementing the components above and creating a working application, there are a few other things we're looking for:
- How clean is your code? Are things organized?
- Is your app filled with a ton of Backbone boilerplate that could have been abstracted elsewhere?
- How DRY are the components you built? Could I easily use them in another application if I wanted to treat them like a library?
- How did you use events to properly decouple things?
- How did you do dependency management? Even though you can get everything done with just Backbone / threejs, imagine if this app were to grow to use 100 dependencies and I wanted to start changing the versions of everything. Would that be easy or hard to do?
- How did you deploy the app? Again we strongly recommend [github pages](https://pages.github.com/) for this project.
- Are your commits easy to read / understand? Are your commit messages short and to the point?
- Did you use any sort of module loader? Did you protect things from polluting the global namespace?
- Are there any performance bottlenecks?

Best of luck and feel free to email me or Rosen with any questions!


text:
{% import "bootstrap/wtf.html" as wtf %}
<!DOCTYPE html>

	<meta name="viewport" content="width=device-width, initial-scale=1">
	<META HTTP-EQUIV="refresh" CONTENT="60">
    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
	<link rel="stylesheet" href="{{ url_for('static', filename='animate.css') }}">
	<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='custom.css') }}">

	<title>{% block title %}Monitor Dashboard{% endblock %}</title>

{% include "navbar.html" %}

                    <button type="button" class="close" data-dismiss="modal">×</button>

Add a host

                    {{ wtf.quick_form(form, button_map={'submit':'primary'}) }}

                    <button type="button" class="close" data-dismiss="modal">×</button>

Import Hosts

                    {{ wtf.quick_form(form2) }}

{% block content %}

    {% for category, message in get_flashed_messages(with_categories=true) %}

        <button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
        {{ message }}

    {% endfor %}

{% block page_content %}
{% endblock %}
{% endblock %}


text: Improve this doc


text:
package com.albedinsky.android.officium.examples.sync;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

/**
 * @author Martin Albedinsky
 */
public final class SyncService extends Service {

    @SuppressWarnings("unused")
    private static final String TAG = "SyncService";

    private static final Object LOCK = new Object();
    private static SyncAdapter syncAdapter;

    @Override
    public void onCreate() {
        super.onCreate();
        ensureSyncAdapter();
    }

    private void ensureSyncAdapter() {
        synchronized (LOCK) {
            if (syncAdapter == null) syncAdapter = new SyncAdapter(getApplicationContext());
        }
    }

    @Override
    public IBinder onBind(Intent intent) {
        return syncAdapter.getSyncAdapterBinder();
    }
}


text:
package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;

import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVoteHandler;
import org.apache.activemq.artemis.core.server.cluster.qourum.Vote;

public class QuorumVoteMessage extends PacketImpl {

   private SimpleString handler;

   private Vote vote;

   private ActiveMQBuffer voteBuffer;

   public QuorumVoteMessage() {
      super(QUORUM_VOTE);
   }

   public QuorumVoteMessage(SimpleString handler, Vote vote) {
      super(QUORUM_VOTE);
      this.handler = handler;
      this.vote = vote;
   }

   @Override
   public void encodeRest(ActiveMQBuffer buffer) {
      super.encodeRest(buffer);
      buffer.writeSimpleString(handler);
      vote.encode(buffer);
   }

   @Override
   public void decodeRest(ActiveMQBuffer buffer) {
      super.decodeRest(buffer);
      handler = buffer.readSimpleString();
      voteBuffer = ActiveMQBuffers.fixedBuffer(buffer.readableBytes());
      buffer.readBytes(voteBuffer);
   }

   public SimpleString getHandler() {
      return handler;
   }

   public Vote getVote() {
      return vote;
   }

   public void decode(QuorumVoteHandler voteHandler) {
      vote = voteHandler.decode(voteBuffer);
   }

   @Override
   public String toString() {
      StringBuffer buff = new StringBuffer(getParentString());
      buff.append("]");
      return buff.toString();
   }

   @Override
   public String getParentString() {
      StringBuffer buff = new StringBuffer(super.getParentString());
      buff.append(", vote=" + vote);
      buff.append(", handler=" + handler);
      return buff.toString();
   }
}


text:
/** @file Base class of all import post processing steps */
#ifndef INCLUDED_AI_BASEPROCESS_H
#define INCLUDED_AI_BASEPROCESS_H

#include <map>
#include <assimp/GenericProperty.h>

struct aiScene;

namespace Assimp    {

class Importer;

// ---------------------------------------------------------------------------
/** Helper class to allow post-processing steps to interact with each other.
 *
 *  The class maintains a simple property list that can be used by pp-steps
 *  to provide additional information to other steps. This is primarily
 *  intended for cross-step optimizations.
 */
class SharedPostProcessInfo
{
public:

    struct Base
    {
        virtual ~Base()
        {}
    };

    //! Represents data that is allocated on the heap, thus needs to be deleted
    template <typename T>
    struct THeapData : public Base
    {
        explicit THeapData(T* in)
            : data (in)
        {}

        ~THeapData()
        {
            delete data;
        }
        T* data;
    };

    //! Represents static, by-value data not allocated on the heap
    template <typename T>
    struct TStaticData : public Base
    {
        explicit TStaticData(T in)
            : data (in)
        {}

        ~TStaticData()
        {}

        T data;
    };

    // some typedefs for cleaner code
    typedef unsigned int KeyType;
    typedef std::map<KeyType, Base*>  PropertyMap;

public:

    //! Destructor
    ~SharedPostProcessInfo()
    {
        Clean();
    }

    //! Remove all stored properties from the table
    void Clean()
    {
        // invoke the virtual destructor for all stored properties
        for (PropertyMap::iterator it = pmap.begin(), end = pmap.end();
             it != end; ++it)
        {
            delete (*it).second;
        }
        pmap.clear();
    }

    //! Add a heap property to the list
    template <typename T>
    void AddProperty( const char* name, T* in ){
        AddProperty(name,(Base*)new THeapData<T>(in));
    }

    //! Add a static by-value property to the list
    template <typename T>
    void AddProperty( const char* name, T in ){
        AddProperty(name,(Base*)new TStaticData<T>(in));
    }

    //! Get a heap property
    template <typename T>
    bool GetProperty( const char* name, T*& out ) const
    {
        THeapData<T>* t = (THeapData<T>*)GetPropertyInternal(name);
        if(!t)
        {
            out = NULL;
            return false;
        }
        out = t->data;
        return true;
    }

    //! Get a static, by-value property
    template <typename T>
    bool GetProperty( const char* name, T& out ) const
    {
        TStaticData<T>* t = (TStaticData<T>*)GetPropertyInternal(name);
        if(!t)return false;
        out = t->data;
        return true;
    }

    //! Remove a property of a specific type
    void RemoveProperty( const char* name)  {
        SetGenericPropertyPtr<Base>(pmap,name,NULL);
    }

private:

    void AddProperty( const char* name, Base* data) {
        SetGenericPropertyPtr<Base>(pmap,name,data);
    }

    Base* GetPropertyInternal( const char* name) const  {
        return GetGenericProperty<Base*>(pmap,name,NULL);
    }

private:

    //! Map of all stored properties
    PropertyMap pmap;
};

#if 0

// ---------------------------------------------------------------------------
/** @brief Represents a dependency table for a postprocessing steps.
 *
 *  For future use.
 */
 struct PPDependencyTable
 {
     unsigned int execute_me_before_these;
     unsigned int execute_me_after_these;
     unsigned int only_if_these_are_not_specified;
     unsigned int mutually_exclusive_with;
 };

#endif

#define AI_SPP_SPATIAL_SORT "$Spat"

// ---------------------------------------------------------------------------
/** The BaseProcess defines a common interface for all post processing steps.
 * A post processing step is run after a successful import if the caller
 * specified the corresponding flag when calling ReadFile().
 * Enum #aiPostProcessSteps defines which flags are available.
 * After a successful import the Importer iterates over its internal array
 * of processes and calls IsActive() on each process to evaluate if the step
 * should be executed. If the function returns true, the class' Execute()
 * function is called subsequently.
 */
class ASSIMP_API_WINONLY BaseProcess {
    friend class Importer;

public:
    /** Constructor to be privately used by Importer */
    BaseProcess() AI_NO_EXCEPT;

    /** Destructor, private as well */
    virtual ~BaseProcess();

    // -------------------------------------------------------------------
    /** Returns whether the processing step is present in the given flag.
     * @param pFlags The processing flags the importer was called with. A
     *   bitwise combination of #aiPostProcessSteps.
     * @return true if the process is present in this flag fields,
     *   false if not.
    */
    virtual bool IsActive( unsigned int pFlags) const = 0;

    // -------------------------------------------------------------------
    /** Check whether this step expects its input vertex data to be
     *  in verbose format. */
    virtual bool RequireVerboseFormat() const;

    // -------------------------------------------------------------------
    /** Executes the post processing step on the given imported data.
    * The function deletes the scene if the postprocess step fails (
    * the object pointer will be set to NULL).
    * @param pImp Importer instance (pImp->mScene must be valid)
    */
    void ExecuteOnScene( Importer* pImp);

    // -------------------------------------------------------------------
    /** Called prior to ExecuteOnScene().
    * The function is a request to the process to update its configuration
    * basing on the Importer's configuration property list.
    */
    virtual void SetupProperties(const Importer* pImp);

    // -------------------------------------------------------------------
    /** Executes the post processing step on the given imported data.
    * A process should throw an ImportErrorException* if it fails.
    * This method must be implemented by deriving classes.
    * @param pScene The imported data to work at.
    */
    virtual void Execute( aiScene* pScene) = 0;

    // -------------------------------------------------------------------
    /** Assign a new SharedPostProcessInfo to the step. This object
     *  allows multiple postprocess steps to share data.
     * @param sh May be NULL
    */
    inline void SetSharedData(SharedPostProcessInfo* sh)    {
        shared = sh;
    }

    // -------------------------------------------------------------------
    /** Get the shared data that is assigned to the step.
    */
    inline SharedPostProcessInfo* GetSharedData()   {
        return shared;
    }

protected:

    /** See the doc of #SharedPostProcessInfo for more details */
    SharedPostProcessInfo* shared;

    /** Currently active progress handler */
    ProgressHandler* progress;
};

} // end of namespace Assimp

#endif // AI_BASEPROCESS_H_INC