text:
#ifndef LIBGM_SOFTMAX_PARAM_HPP
#define LIBGM_SOFTMAX_PARAM_HPP

#include <libgm/functional/arithmetic.hpp>
#include <libgm/math/eigen/hybrid.hpp>
#include <libgm/math/eigen/dense.hpp>
#include <libgm/serialization/eigen.hpp>

#include <cmath>
#include <iostream>
#include <random>
#include <stdexcept>

namespace libgm {

  /**
   * A softmax function over one discrete variable y and a vector of
   * real-valued features x. This function is equal to a normalized
   * exponential, f(y=i, x) = exp(b_i + w_i^T x) / sum_j exp(b_j + w_j^T x).
   * Here, b is a bias vector and w is a weight matrix with rows w_i^T.
   * The parameter matrices are dense, but the function can be evaluated
   * on sparse feature vectors.
   *
   * This class models the OptimizationVector concept and can be directly
   * used in optimization classes.
   *
   * \tparam T a real type for representing each parameter.
   * \ingroup math_functions
   */
  template <typename T = double>
  class softmax_param {
  public:
    // Public types
    //======================================================================
    // OptimizationVector types
    typedef T value_type;

    // Underlying representation
    typedef dense_matrix<T> mat_type;
    typedef dense_vector<T> vec_type;

    // Constructors
    //======================================================================

    /**
     * Creates an empty softmax. This does not represent a valid function.
     */
    softmax_param() { }

    /**
     * Creates a softmax function with the given number of labels and
     * features. Allocates the parameters, but does not initialize them
     * to any specific value.
     */
    softmax_param(std::size_t labels, std::size_t features)
      : weight_(labels, features), bias_(labels) { }

    /**
     * Creates a softmax function with the given number of labels and
     * features, and initializes the parameters to the given value.
     */
    softmax_param(std::size_t labels, std::size_t features, T init)
      : weight_(labels, features), bias_(labels) {
      bias_.fill(init);
      weight_.fill(init);
    }

    /**
     * Creates a softmax function with the given parameters.
     */
    softmax_param(const mat_type& weight, const vec_type& bias)
      : weight_(weight), bias_(bias) {
      assert(weight_.rows() == bias_.rows());
    }

    /**
     * Creates a softmax function with the given parameters.
     */
    softmax_param(mat_type&& weight, vec_type&& bias) {
      weight_.swap(weight);
      bias_.swap(bias);
      assert(weight_.rows() == bias_.rows());
    }

    //! Swaps the content of two softmax functions.
    friend void swap(softmax_param& f, softmax_param& g) {
      f.weight_.swap(g.weight_);
      f.bias_.swap(g.bias_);
    }

    //! Serializes the parameters to an archive.
    void save(oarchive& ar) const {
      ar << weight_ << bias_;
    }

    //! Deserializes the parameters from an archive.
    void load(iarchive& ar) {
      ar >> weight_ >> bias_;
      assert(weight_.rows() == bias_.rows());
    }

    /**
     * Resets the function to the given number of labels and features.
     * May invalidate the parameters.
     */
    void resize(std::size_t labels, std::size_t features) {
      weight_.resize(labels, features);
      bias_.resize(labels);
    }

    /**
     * Sets the function to the given number of labels and features,
     * filling the contents with 0.
     */
    void zero(std::size_t labels, std::size_t features) {
      weight_.setZero(labels, features);
      bias_.setZero(labels);
    }

    /**
     * Fills the parameters with the given constant.
     */
    void fill(T value) {
      weight_.fill(value);
      bias_.fill(value);
    }

    // Accessors and comparison operators
    //==========================================================================

    //! Returns true if the softmax function is empty.
    bool empty() const {
      return !weight_.data();
    }

    //! Returns the number of labels.
    std::size_t labels() const {
      return weight_.rows();
    }

    //! Returns the number of features.
    std::size_t features() const {
      return weight_.cols();
    }

    //! Returns the weight matrix.
    mat_type& weight() {
      return weight_;
    }

    //! Returns the weight matrix.
    const mat_type& weight() const {
      return weight_;
    }

    //! Returns the bias vector.
    vec_type& bias() {
      return bias_;
    }

    //! Returns the bias vector.
    const vec_type& bias() const {
      return bias_;
    }

    //! Returns the weight with the given indices.
    T& weight(std::size_t i, std::size_t j) {
      return weight_(i, j);
    }

    //! Returns the weight with the given indices.
    const T& weight(std::size_t i, std::size_t j) const {
      return weight_(i, j);
    }

    //! Returns the bias with the given index.
    T& bias(std::size_t i) {
      return bias_[i];
    }

    //! Returns the bias with the given index.
    const T& bias(std::size_t i) const {
      return bias_[i];
    }

    //! Evaluates the function for an Eigen dense or sparse vector.
    template <typename Derived>
    vec_type operator()(const Eigen::EigenBase<Derived>& x) const {
      assert(x.rows() == weight_.cols());
      assert(x.cols() == 1);
      vec_type y(weight_ * x.derived() + bias_);
      y = (y.array() - y.maxCoeff()).exp();
      y /= y.sum();
      return y;
    }

    //! Evaluates the function for a sparse feature vector with unit values.
    vec_type operator()(const std::vector<std::size_t>& x) const {
      vec_type y = bias_;
      for (std::size_t i : x) {
        assert(i < std::size_t(weight_.cols()));
        y += weight_.col(i);
      }
      y = (y.array() - y.maxCoeff()).exp();
      y /= y.sum();
      return y;
    }

    //! Returns the log-value for a dense feature vector.
    template <typename Derived>
    vec_type log(const Eigen::EigenBase<Derived>& x) const {
      vec_type y = operator()(x);
      y = y.array().log();
      return y;
    }

    //! Returns the log-value for a sparse feature vector.
    vec_type log(const std::vector<std::size_t>& x) const {
      vec_type y = operator()(x);
      y = y.array().log();
      return y;
    }

    //! Returns true if all the parameters are finite and not NaN.
    bool is_finite() const {
      return weight_.allFinite() && bias_.allFinite();
    }

    //! Returns true if two softmax parameter vectors are equal.
    friend bool operator==(const softmax_param& f, const softmax_param& g) {
      return f.weight_ == g.weight_ && f.bias_ == g.bias_;
    }

    //! Returns true if two softmax parameter vecors are not equal.
    friend bool operator!=(const softmax_param& f, const softmax_param& g) {
      return !(f == g);
    }

    // Sampling
    //==========================================================================
    template <typename Generator, typename Derived>
    std::size_t sample(Generator& rng,
                       const Eigen::EigenBase<Derived>& x) const {
      vec_type p = operator()(x);
      T val = std::uniform_real_distribution<T>()(rng);
      for (std::size_t i = 0; i < labels(); ++i) {
        if (val <= p[i]) {
          return i;
        } else {
          val -= p[i];
        }
      }
      throw std::logic_error("The probabilities do not sum to 1");
    }

    // OptimizationVector functions
    //=========================================================================
    softmax_param operator-() const {
      return softmax_param(-weight_, -bias_);
    }

    softmax_param& operator+=(const softmax_param& f) {
      weight_ += f.weight_;
      bias_ += f.bias_;
      return *this;
    }

    softmax_param& operator-=(const softmax_param& f) {
      weight_ -= f.weight_;
      bias_ -= f.bias_;
      return *this;
    }

    softmax_param& operator/=(const softmax_param& f) {
      weight_.array() /= f.weight_.array();
      bias_.array() /= f.bias_.array();
      return *this;
    }

    softmax_param& operator+=(T a) {
      weight_.array() += a;
      bias_.array() += a;
      return *this;
    }

    softmax_param& operator-=(T a) {
      weight_.array() -= a;
      bias_.array() -= a;
      return *this;
    }

    softmax_param& operator*=(T a) {
      weight_ *= a;
      bias_ *= a;
      return *this;
    }

    softmax_param& operator/=(T a) {
      weight_ /= a;
      bias_ /= a;
      return *this;
    }

    friend void copy_shape(const softmax_param& src, softmax_param& dst) {
      dst.resize(src.labels(), src.features());
    }

    friend void update(softmax_param& f, const softmax_param& g, T a) {
      f.weight_ += a * g.weight_;
      f.bias_ += a * g.bias_;
    }

    friend T dot(const softmax_param& f, const softmax_param& g) {
      return f.weight_.cwiseProduct(g.weight_).sum() + f.bias_.dot(g.bias_);
    }

    friend T norm1(const softmax_param& f) {
      return f.weight_.cwiseAbs().sum() + f.bias_.cwiseAbs().sum();
    }

    friend softmax_param sign(const softmax_param& f) {
      softmax_param result(f.labels(), f.features());
      result.weight() = f.weight().unaryExpr(real_sign<T>());
      result.bias() = f.bias().unaryExpr(real_sign<T>());
      return result;
    }

  private:
    // Private members
    //=========================================================================

    //! The weight matrix.
    mat_type weight_;

    //! The bias vector.
    vec_type bias_;

  }; // class softmax_param

  /**
   * Prints the softmax function parameters to a stream.
   * \relates softmax_param
   */
  template <typename T>
  std::ostream& operator<<(std::ostream& out, const softmax_param<T>& f) {
    typename softmax_param<T>::mat_type a(f.labels(), f.features() + 1);
    a << f.weight(), f.bias();
    out << a << std::endl;
    return out;
  }

} // namespace libgm

#endif


text:
package zipfs

/*

This provides a practical example of mounting Go-fuse path filesystems
on top of each other.

It is a file system that configures a Zip filesystem at /zipmount when
symlinking path/to/zipfile to /config/zipmount

*/

import (
	"github.com/gp7485451/go-fuse/fuse"
	"log"
	"path/filepath"
	"sync"
)

var _ = log.Printf

const (
	CONFIG_PREFIX = "config/"
)

////////////////////////////////////////////////////////////////

// MultiZipFs is a path filesystem that mounts zipfiles.
type MultiZipFs struct {
	lock          sync.RWMutex
	zips          map[string]*MemTreeFs
	dirZipFileMap map[string]string

	nodeFs *fuse.PathNodeFs
	fuse.DefaultFileSystem
}

func NewMultiZipFs() *MultiZipFs {
	m := new(MultiZipFs)
	m.zips = make(map[string]*MemTreeFs)
	m.dirZipFileMap = make(map[string]string)
	return m
}

func (me *MultiZipFs) String() string {
	return "MultiZipFs"
}

func (me *MultiZipFs) OnMount(nodeFs *fuse.PathNodeFs) {
	me.nodeFs = nodeFs
}

func (me *MultiZipFs) OpenDir(name string, context *fuse.Context) (stream chan fuse.DirEntry, code fuse.Status) {
	me.lock.RLock()
	defer me.lock.RUnlock()

	stream = make(chan fuse.DirEntry, len(me.zips)+2)
	if name == "" {
		var d fuse.DirEntry
		d.Name = "config"
		d.Mode = fuse.S_IFDIR | 0700
		stream <- fuse.DirEntry(d)
	}

	if name == "config" {
		for k := range me.zips {
			var d fuse.DirEntry
			d.Name = k
			d.Mode = fuse.S_IFLNK
			stream <- fuse.DirEntry(d)
		}
	}

	close(stream)
	return stream, fuse.OK
}

func (me *MultiZipFs) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status) {
	a := &fuse.Attr{}
	if name == "" {
		// Should not write in top dir.
		a.Mode = fuse.S_IFDIR | 0500
		return a, fuse.OK
	}

	if name == "config" {
		a.Mode = fuse.S_IFDIR | 0700
		return a, fuse.OK
	}

	dir, base := filepath.Split(name)
	if dir != "" && dir != CONFIG_PREFIX {
		return nil, fuse.ENOENT
	}
	submode := uint32(fuse.S_IFDIR | 0700)
	if dir == CONFIG_PREFIX {
		submode = fuse.S_IFLNK | 0600
	}

	me.lock.RLock()
	defer me.lock.RUnlock()

	a.Mode = submode
	_, hasDir := me.zips[base]
	if hasDir {
		return a, fuse.OK
	}

	return nil, fuse.ENOENT
}

func (me *MultiZipFs) Unlink(name string, context *fuse.Context) (code fuse.Status) {
	dir, basename := filepath.Split(name)
	if dir == CONFIG_PREFIX {
		me.lock.Lock()
		defer me.lock.Unlock()

		zfs, ok := me.zips[basename]
		if ok {
			code = me.nodeFs.UnmountNode(zfs.Root().Inode())
			if !code.Ok() {
				return code
			}
			delete(me.zips, basename)
			delete(me.dirZipFileMap, basename)
			return fuse.OK
		} else {
			return fuse.ENOENT
		}
	}
	return fuse.EPERM
}

func (me *MultiZipFs) Readlink(path string, context *fuse.Context) (val string, code fuse.Status) {
	dir, base := filepath.Split(path)
	if dir != CONFIG_PREFIX {
		return "", fuse.ENOENT
	}

	me.lock.Lock()
	defer me.lock.Unlock()

	zipfile, ok := me.dirZipFileMap[base]
	if !ok {
		return "", fuse.ENOENT
	}
	return zipfile, fuse.OK

}
func (me *MultiZipFs) Symlink(value string, linkName string, context *fuse.Context) (code fuse.Status) {
	dir, base := filepath.Split(linkName)
	if dir != CONFIG_PREFIX {
		return fuse.EPERM
	}

	me.lock.Lock()
	defer me.lock.Unlock()

	_, ok := me.dirZipFileMap[base]
	if ok {
		return fuse.EBUSY
	}

	fs, err := NewArchiveFileSystem(value)
	if err != nil {
		log.Println("NewZipArchiveFileSystem failed.", err)
		return fuse.EINVAL
	}

	code = me.nodeFs.Mount(base, fs, nil)
	if !code.Ok() {
		return code
	}

	me.dirZipFileMap[base] = value
	me.zips[base] = fs
	return fuse.OK
}

redpajama_set_name: RedPajamaGithub


text:
package tokenizer

import "github.com/go-enry/go-enry/v2/internal/tokenizer/flex"

// Tokenize returns lexical tokens from content. The tokens returned match what
// the Linguist library returns. At most the first ByteLimit bytes of content are tokenized.
func Tokenize(content []byte) []string {
	if len(content) > ByteLimit {
		content = content[:ByteLimit]
	}

	return flex.TokenizeFlex(content)
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="primary">#222222</color>
    <color name="primary_dark">#222222</color>
    <color name="primary_text">#222222</color>
    <color name="white">#FFFFFF</color>
    <color name="accent">#222222</color>
    <color name="vinho">#993333</color>
    <color name="gray">#f5f5f0</color>
    <color name="orange">#ffcc00</color>
</resources>


text:
title: Fabricator - Build your UI toolkit
---

{{> header-bar}}

{{> hero}}

Design System

Organize your design system the way you want. Components, Structures, Elements, Atoms, Molecules, whatever - the taxonomy is up to you!

Style Guide + Documentation

Generate a style guide from your toolkit code. Write documentation in markdown to make your toolkit easy for other developers to use.

Optimized Builds

Uses gulp.js as a super-fast, highly-optimized build system to compress images, CSS, and JavaScript.

Rapid Prototyping

Highly-portable local development environment with Handlebars and BrowserSync built-in for a fast, efficient workflow.

Featured In

Quick Start

$ curl -L https://github.com/fbrctr/fabricator/archive/master.tar.gz | tar zx --strip 1
$ npm start

		Read the docs

{{> footer}}


text:
<?php

/**
 * CVarDumper is intended to replace the buggy PHP function var_dump and print_r.
 * It can correctly identify the recursively referenced objects in a complex
 * object structure. It also has a recursive depth control to avoid indefinite
 * recursive display of some peculiar variables.
 *
 * CVarDumper can be used as follows,
 * <pre>
 * CVarDumper::dump($var);
 * </pre>
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @package system.utils
 * @since 1.0
 */
class CVarDumper
{
	private static $_objects;
	private static $_output;
	private static $_depth;

	/**
	 * Displays a variable.
	 * This method achieves the similar functionality as var_dump and print_r
	 * but is more robust when handling complex objects such as Yii controllers.
	 * @param mixed $var variable to be dumped
	 * @param integer $depth maximum depth that the dumper should go into the variable. Defaults to 10.
	 * @param boolean $highlight whether the result should be syntax-highlighted
	 */
	public static function dump($var,$depth=10,$highlight=false)
	{
		echo self::dumpAsString($var,$depth,$highlight);
	}

	/**
	 * Dumps a variable in terms of a string.
	 * This method achieves the similar functionality as var_dump and print_r
	 * but is more robust when handling complex objects such as Yii controllers.
	 * @param mixed $var variable to be dumped
	 * @param integer $depth maximum depth that the dumper should go into the variable. Defaults to 10.
	 * @param boolean $highlight whether the result should be syntax-highlighted
	 * @return string the string representation of the variable
	 */
	public static function dumpAsString($var,$depth=10,$highlight=false)
	{
		self::$_output='';
		self::$_objects=array();
		self::$_depth=$depth;
		self::dumpInternal($var,0);
		if($highlight)
		{
			$result=highlight_string("<?php\n".self::$_output,true);
			self::$_output=preg_replace('/<\\?php<br \\/>/','',$result,1);
		}
		return self::$_output;
	}

	/*
	 * @param mixed $var variable to be dumped
	 * @param integer $level depth level
	 */
	private static function dumpInternal($var,$level)
	{
		switch(gettype($var))
		{
			case 'boolean':
				self::$_output.=$var?'true':'false';
				break;
			case 'integer':
				self::$_output.="$var";
				break;
			case 'double':
				self::$_output.="$var";
				break;
			case 'string':
				self::$_output.="'".addslashes($var)."'";
				break;
			case 'resource':
				self::$_output.='{resource}';
				break;
			case 'NULL':
				self::$_output.="null";
				break;
			case 'unknown type':
				self::$_output.='{unknown}';
				break;
			case 'array':
				if(self::$_depth<=$level)
					self::$_output.='array(...)';
				elseif(empty($var))
					self::$_output.='array()';
				else
				{
					$keys=array_keys($var);
					$spaces=str_repeat(' ',$level*4);
					self::$_output.="array\n".$spaces.'(';
					foreach($keys as $key)
					{
						self::$_output.="\n".$spaces.'    ';
						self::dumpInternal($key,0);
						self::$_output.=' => ';
						self::dumpInternal($var[$key],$level+1);
					}
					self::$_output.="\n".$spaces.')';
				}
				break;
			case 'object':
				if(($id=array_search($var,self::$_objects,true))!==false)
					self::$_output.=get_class($var).'#'.($id+1).'(...)';
				elseif(self::$_depth<=$level)
					self::$_output.=get_class($var).'(...)';
				else
				{
					$id=array_push(self::$_objects,$var);
					$className=get_class($var);
					$members=(array)$var;
					$spaces=str_repeat(' ',$level*4);
					self::$_output.="$className#$id\n".$spaces.'(';
					foreach($members as $key=>$value)
					{
						$keyDisplay=strtr(trim($key),array("\0"=>':'));
						self::$_output.="\n".$spaces."    [$keyDisplay] => ";
						self::$_output.=self::dumpInternal($value,$level+1);
					}
					self::$_output.="\n".$spaces.')';
				}
				break;
		}
	}
}


text:
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';

@Component({
  selector: 'help',
  styles: [`
  `],
  templateUrl: './help.component.html'
})
export class HelpComponent implements OnInit {
  private localState;
  constructor(public route: ActivatedRoute) {
    // do nothing
  }

  public ngOnInit() {
    // do nothing
  }

  private asyncDataWithWebpack() {
    // do nothing
  }

}


text:
package com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui;

import com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion;
import kg.apc.jmeter.JMeterPluginsUtils;
import org.apache.jmeter.assertions.gui.AbstractAssertionGui;
import org.apache.jmeter.gui.util.VerticalPanel;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jorphan.gui.JLabeledTextArea;
import org.apache.jorphan.gui.JLabeledTextField;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;

/**
 * Java class representing GUI for the JSON Path Assertion component in JMeter
 */
public class JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener {

    //private static final Logger log = LoggingManager.getLoggerForClass();
    private static final long serialVersionUID = 1L;
    private JLabeledTextField jsonPath = null;
    private JLabeledTextArea jsonValue = null;
    private JCheckBox jsonValidation = null;
    private JCheckBox expectNull = null;
    private JCheckBox invert = null;
    private static final String WIKIPAGE = "JSONPathAssertion";
    private JCheckBox isRegex;

    public JSONPathAssertionGui() {
        init();
    }

    public void init() {
        setLayout(new BorderLayout());
        setBorder(makeBorder());
        add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(), WIKIPAGE), BorderLayout.NORTH);

        VerticalPanel panel = new VerticalPanel();
        panel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));

        jsonPath = new JLabeledTextField("Assert JSON Path exists: ");
        jsonValidation = new JCheckBox("Additionally assert value");
        isRegex = new JCheckBox("Match as regular expression");
        jsonValue = new JLabeledTextArea("Expected Value: ");
        expectNull = new JCheckBox("Expect null");
        invert = new JCheckBox("Invert assertion (will fail if above conditions met)");

        jsonValidation.addChangeListener(this);
        expectNull.addChangeListener(this);

        panel.add(jsonPath);
        panel.add(jsonValidation);
        panel.add(isRegex);
        panel.add(jsonValue);
        panel.add(expectNull);
        panel.add(invert);

        add(panel, BorderLayout.CENTER);
    }

    @Override
    public void clearGui() {
        super.clearGui();
        jsonPath.setText("$.");
        jsonValue.setText("");
        jsonValidation.setSelected(false);
        expectNull.setSelected(false);
        invert.setSelected(false);
        isRegex.setSelected(true);
    }

    @Override
    public TestElement createTestElement() {
        JSONPathAssertion jpAssertion = new JSONPathAssertion();
        modifyTestElement(jpAssertion);
        jpAssertion.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE));
        return jpAssertion;
    }

    @Override
    public String getLabelResource() {
        return this.getClass().getSimpleName();
    }

    @Override
    public String getStaticLabel() {
        return JMeterPluginsUtils.prefixLabel("JSON Path Assertion");
    }

    @Override
    public void modifyTestElement(TestElement element) {
        super.configureTestElement(element);
        if (element instanceof JSONPathAssertion) {
            JSONPathAssertion jpAssertion = (JSONPathAssertion) element;
            jpAssertion.setJsonPath(jsonPath.getText());
            jpAssertion.setExpectedValue(jsonValue.getText());
            jpAssertion.setJsonValidationBool(jsonValidation.isSelected());
            jpAssertion.setExpectNull(expectNull.isSelected());
            jpAssertion.setInvert(invert.isSelected());
            jpAssertion.setIsRegex(isRegex.isSelected());
        }
    }

    @Override
    public void configure(TestElement element) {
        super.configure(element);
        JSONPathAssertion jpAssertion = (JSONPathAssertion) element;
        jsonPath.setText(jpAssertion.getJsonPath());
        jsonValue.setText(jpAssertion.getExpectedValue());
        jsonValidation.setSelected(jpAssertion.isJsonValidationBool());
        expectNull.setSelected(jpAssertion.isExpectNull());
        invert.setSelected(jpAssertion.isInvert());
        isRegex.setSelected(jpAssertion.isUseRegex());
    }

    @Override
    public void stateChanged(ChangeEvent e) {
        jsonValue.setEnabled(jsonValidation.isSelected() && !expectNull.isSelected());
        isRegex.setEnabled(jsonValidation.isSelected() && !expectNull.isSelected());
    }
}


text:
package org.soluvas.benchmarkemail;

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

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Sample usage of {@link BMEApi}. Only for testing.
 */
public class BMEApiMain {
    private static final Logger log = LoggerFactory.getLogger(BMEApiMain.class);

    private final String username = "Your Benchmark Email Login"; // Put in your account username
    private final String password = "Your Benchmark Email Password"; // Put in your account password
    private String token = "";
    private String listId = "BenchmarkEmail List ID - see listGet() method"; // put in ID of any list that you wish to use below
    private InterfaceBMEApi bmServices = null;

    public static void main(String[] args) {
        BMEApiMain obj = new BMEApiMain();
        obj.run();
    }

    private void run() {
        initialize(); // This gets the initial token thats used in all the examples below
        if (token.length() > 0) {
            // clientGetContactInfo();
            // tokenAdd();
            // tokenGet();
            // tokenDelete();
            listCreate();
            // listGet();
            // listDelete();
            // listAddContacts();
            // listGetContacts();
            // listGetContactDetails();
            // listUpdateContactDetails();
            // listDeleteContacts();
            // listUnsubscribeContacts();
            // emailCreate();
            // confirmEmailAdd();
            // confirmEmailList();
            // emailGet();
            // emailGetDetail();
            // emailSchedule();
            // emailSendNow();
            // emailUnSchedule();
            // emailSendTest();
            // emailUpdate();
            // emailAssignList();
            // emailDelete();
        } else {
            System.out.println("Failed to authenticate with BME");
        }

    }

    public void clientGetContactInfo() {

        final Map<String, String> map = bmServices.clientGetContactInfo(token);

        for (final String key : map.keySet()) {
            final String value = map.get(key);
            System.out.print(key + " = " + value + "\t");
        }

    }

    public void tokenAdd() {
        String mytoken = "adios123999";
        boolean flag = bmServices.tokenAdd(username, password, mytoken);
        System.out.print("flag = " + flag + "\t");
    }

    public void tokenDelete() {
        String mytoken = "adios123999";
        boolean flag = bmServices.tokenDelete(username, password, mytoken);
        System.out.print("flag = " + flag + "\t");
    }

    public void tokenGet() {
        Object[] mytokens = bmServices.tokenGet(username, password);
        int TokenSize = mytokens.length;
        int Counter = 0;

        for (final Object mytoken : mytokens) {
            Counter++;
            System.out.println(" Token ( " + Counter + " ) " + mytoken);
        }
        ;

    }

    public void listCreate() {
        String Mylistname = "My List Created from Java Now  !!";
        try {
            String Output = bmServices.listCreate(token, Mylistname);
            System.out.println("ListID = " + Output);
        } catch (Exception e) {
            throw new BenchmarkEmailException(e, "List by name '%s' exists", Mylistname);
        }
    }

    public void listAddContacts() {
        List<Map<String, Object>> contacts = new ArrayList<>();
        contacts.add(new HashMap());
        contacts.add(new HashMap());

        contacts.get(0).put("email", "sankey21@spideydomain.com");
        contacts.get(0).put("firstname", "Peter");
        contacts.get(0).put("lastname", "Parker");

        contacts.get(1).put("email", "sankey22@battydomain.com");
        contacts.get(1).put("firstname", "Bruce");
        contacts.get(1).put("lastname", "Wayne");

        int result = bmServices.listAddContacts(token, listId, contacts, null);

        System.out.println("Result  = " + result);

    }

    public void listDelete() {
        boolean flag = bmServices.listDelete(token, listId);
        System.out.println("Flag  = " + flag);
    }

    public void listGetContactDetails() {
        String email = "user1@battydomain.com";
        Map<Object, Object> ContactDetail = bmServices.listGetContactDetails(token, listId, email);

        for (final Object key : ContactDetail.keySet()) {
            final Object value = ContactDetail.get(key);
            System.out.println(key + " = " + value + "(" + value.getClass().getSimpleName() + ")");
        }
        ;

    }

    public void listUpdateContactDetails() {
        String email = "user1@battydomain.com";
        Map<Object, Object> ContactDetail = bmServices.listGetContactDetails(token, listId, email);
        String contactID = (String) ContactDetail.get("id");
        System.out.println("Contact ID = " + contactID);
        HashMap ContactDetailFinal = new HashMap();

        for (final Object key : ContactDetail.keySet()) {
            final Object value = ContactDetail.get(key);
            ContactDetailFinal.put(key, value);
        }
        ;

        ContactDetailFinal.put("Company Name", "Justice League United");
        ContactDetailFinal.put("FirstName", "Clark");
        ContactDetailFinal.put("LastName", "Kent");

        Map<Object, Object> output = bmServices.listUpdateContactDetails(token, listId, contactID, ContactDetailFinal);

        for (final Object key : output.keySet()) {
            final Object value = output.get(key);
            System.out.println(key + " = " + value + "(" + value.getClass().getSimpleName() + ")");
        }
        ;

    }

    public void listDeleteContacts() {
        String email = "Jean.grey@xmen.com";
        Map<Object, Object> ContactDetail = bmServices.listGetContactDetails(token, listId, email);
        StringBuffer str = new StringBuffer();
        String contactID = (String) ContactDetail.get("id");
        str.append(contactID).append(",");
        ContactDetail = bmServices.listGetContactDetails(token, listId, "tarzan@tarzan.com");
        contactID = (String) ContactDetail.get("id");
        str.append(contactID);
        contactID = str.toString();
        boolean flag = bmServices.listDeleteContacts(token, listId, contactID);
        System.out.println("Flag  = " + flag);
    }

    public void listUnsubscribeContacts() {
        String[] ContactAddress = new String[2];
        ContactAddress[0] = "Edgar.burroughs@wildfiresanket.com";
        ContactAddress[1] = "Bruce.banner@hulksanket.com";
        int result = bmServices.listUnsubscribeContacts(token, listId, ContactAddress);
        System.out.println("Result  = " + result);
    }

    public void emailCreate() {
        HashMap emailDetail = new HashMap();
        emailDetail.put("fromEmail", "ash1@bmesrv.com");
        emailDetail.put("fromName", "Steve");
        emailDetail.put("emailName", "Sales Promo May 23 2012");
        emailDetail.put("replyEmail", "feedback@____.com");
        emailDetail.put("subject", "New Products launch at our store 1");
        emailDetail.put("templateContent", " Hello World ");
        emailDetail.put("toListID", Integer.parseInt(listId.trim()));
        emailDetail.put("scheduleDate", "1 May 2010 5:00"); /* In UTC */
        emailDetail.put("webpageVersion", true);
        emailDetail.put("permissionReminderMessage", "You are receiving this email because of your relationship with our company. Unsubscribe is available at the bottom of this email.");
        String output = bmServices.emailCreate(token, emailDetail);
        System.out.println("output  = " + output);
    }

    public void confirmEmailAdd() {
        String TargetEmailID = "user1@battydomain.com,user1@spideydomain.com";
        String Output = bmServices.confirmEmailAdd(token, TargetEmailID);

        if (Output.length() == 0) {
            System.out.println("Done  " + Output);
        } else {
            System.out.println("Could not be added " + Output);
        }
        ;

    }

    public void confirmEmailList() {
        Object[] EmailIds = bmServices.confirmEmailList(token);
        int Counter = 0;

        for (final Object Email : EmailIds) {
            final Map<String, Object> map = (Map<String, Object>) Email;

            for (final Object key : map.keySet()) {
                final Object value = map.get(key);
                System.out.print(key + " = " + value + "(" + value.getClass().getSimpleName() + ")\t");
            }
            ;

            System.out.println();
        }
        ;

    }

    public void emailGet() {
        int pageNumber = 1;
        int pageSize = 10;
        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");
        int Counter = 0;

        for (final Object Campaign : Campaigns) {
            final Map<String, Object> map = (Map<String, Object>) Campaign;

            for (final Object key : map.keySet()) {
                final Object value = map.get(key);
                System.out.print(key + " = " + value + ")\t");
            }
            ;

            System.out.println();
        }
        ;
    }

    public void emailGetDetail() {

        int pageNumber = 1;
        int pageSize = 1;
        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");
        int Counter = 0;
        String EmailID = "";

        if (Campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) Campaigns[0];
            EmailID = (String) map.get("id");
            System.out.println("EmailID = " + EmailID);
        }
        ;

        if (EmailID.length() > 0) {
            Map<Object, Object> map = bmServices.emailGetDetail(token, EmailID);

            for (final Object key : map.keySet()) {
                final Object value = map.get(key);
                System.out.println(key + " = " + value);
            }
            ;

        }
        ;

    }

    public void emailSchedule() {
        int pageNumber = 1;
        int pageSize = 1;
        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");
        String EmailID = "";

        if (Campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) Campaigns[0];
            EmailID = (String) map.get("id");
            System.out.println("EmailID = " + EmailID);
        }
        ;

        try {
            boolean allok = bmServices.emailSchedule(token, EmailID, "14 Jul 2020 12:00");
            System.out.println(allok);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
        ;

    }

    public void emailSendNow() {
        int pageNumber = 1;
        int pageSize = 1;
        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");
        String EmailID = "";

        if (Campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) Campaigns[0];
            EmailID = (String) map.get("id");
            System.out.println("EmailID = " + EmailID);
        }
        ;

        try {
            boolean allok = bmServices.emailSendNow(token, EmailID);
            System.out.println(allok);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
        ;

    }

    public void emailUnSchedule() {
        int pageNumber = 1;
        int pageSize = 1;
        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");
        String EmailID = "";

        if (Campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) Campaigns[0];
            EmailID = (String) map.get("id");
            System.out.println("EmailID = " + EmailID);
        }
        ;

        try {
            boolean allok = bmServices.emailUnSchedule(token, EmailID);
            System.out.println(allok);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
        ;

    }

    public void emailSendTest() {
        int pageNumber = 1;
        int pageSize = 1;
        String testEmail = "yourname@sitedomain.com";
        String EmailID = "";

        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");

        if (Campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) Campaigns[0];
            EmailID = (String) map.get("id");
            System.out.println("EmailID = " + EmailID);
        }
        ;

        try {
            boolean allok = bmServices.emailSendTest(token, EmailID, testEmail);
            System.out.println(allok);
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
        }
        ;

    }

    public void emailUpdate() {
        String EmailID = "";
        int pageNumber = 1;
        int pageSize = 1;

        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");

        if (Campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) Campaigns[0];
            EmailID = (String) map.get("id");
        }
        ;

        HashMap emailUpdate = new HashMap();
        emailUpdate.put("id", EmailID);
        emailUpdate.put("fromEmail", "user1@sitedomain.com");
        emailUpdate.put("fromName", "Steve");
        emailUpdate.put("emailName", "Sales Promo May 10");
        emailUpdate.put("replyEmail", "feedback@sitedomain.com");
        emailUpdate.put("subject", "New Products launch at our store");
        emailUpdate.put("templateContent", " Hello World ");
        emailUpdate.put("toListID", Integer.parseInt(listId.trim()));
        emailUpdate.put("permissionReminderMessage", "You are receiving this email because of your relationship with our company. Unsubscribe is available at the bottom of this email.");

        boolean output = bmServices.emailUpdate(token, emailUpdate);
        System.out.println("output  = " + output);

    }

    public void listGet() {
        final int pageNumber = 1;
        final int pageSize = 100;
//        final List<Map<String, Object>> lists = bmServices.listGet(token, "", pageNumber, pageSize, "", "");
//        int counter = 0;
//        for (final Map<String, Object> list : lists) {
//            final Map<String, Object> map = list;
//            counter++;
//            System.out.print(counter + ". ");
//            for (final Object key : map.keySet()) {
//                final Object value = map.get(key);
//                System.out.print(key + " = " + value + " (" + value.getClass().getSimpleName() + ")\t");
//            }
//            System.out.println();
//        }
    }

    public void listGetContacts() {

        int pageNumber = 1;
        int pageSize = 2;

        List<Map<String, Object>> Contacts = bmServices.listGetContacts(token, listId, "", pageNumber, pageSize, "", "");
        int Counter = 0;

        for (final Map<String, Object> contact : Contacts) {
            final Map<String, Object> map = contact;

            for (final Object key : map.keySet()) {
                final Object value = map.get(key);
                System.out.print(key + " = " + value + "(" + value.getClass().getSimpleName() + ")\t");
            }
            ;

            System.out.println();
        }
        ;

    }

    public void emailAssignList() {
        HashMap emailLists[] = new HashMap[1];
        emailLists[0] = new HashMap();

        String EmailID = "";
        int pageNumber = 1;
        int pageSize = 2;
        String ListID = "";

        Object[] campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");

        if (campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) campaigns[0];
            EmailID = (String) map.get("id");
        }

        List<Map<String, Object>> lists = bmServices.listGet(token, "", pageNumber, pageSize, "", "");
        if (lists.size() > 0) {
            HashMap Mylist = (HashMap) lists.get(0);
            ListID = (String) Mylist.get("id");
        }
        emailLists[0].put("emailID", EmailID);
        emailLists[0].put("toListID", ListID);

        boolean flag = bmServices.emailAssignList(token, EmailID, emailLists);

        System.out.println("output  = " + flag);
    }

    public void emailDelete() {
        int pageNumber = 1;
        int pageSize = 1;
        Object[] Campaigns = bmServices.emailGet(token, "", "", pageNumber, pageSize, "", "");
        String EmailID = "";

        if (Campaigns.length > 0) {
            Map<String, Object> map = (Map<String, Object>) Campaigns[0];
            EmailID = (String) map.get("id");
            System.out.println("EmailID = " + EmailID);
        }

        try {
            boolean allok = bmServices.emailDelete(token, EmailID);
            log.info("delete {}: {}", EmailID, allok);
        } catch (Exception ex) {
            throw new BenchmarkEmailException(ex.getMessage(), ex);
        }

    }

    public void initialize() {
        bmServices = BMEApi.getBMEServices();
        token = bmServices.login(username, password);
        if (token.length() > 0) {
            log.info("Logged in successfully with Token -> {}", token);
        } else {
            log.info("Failed to authenticate with BME");
        }
    }

}


text:
package sc.fiji.filamentdetector.kymograph;

import org.apache.commons.lang3.ArrayUtils;

import ij.gui.Line;
import sc.fiji.filamentdetector.kymograph.linedrawer.LineDrawer;
import sc.fiji.filamentdetector.model.TrackedFilament;

public class LineGenerator {

	private TrackedFilament trackedFilament;
	private double lineTickness;
	private double startOffsetLength;
	private double endOffsetLength;

	public LineGenerator(double lineTickness, double startOffsetLength, double endOffsetLength) {
		this.lineTickness = lineTickness;
		this.startOffsetLength = startOffsetLength;
		this.endOffsetLength = endOffsetLength;
	}

	public TrackedFilament getTrackedFilament() {
		return trackedFilament;
	}

	public void setTrackedFilament(TrackedFilament trackedFilament) {
		this.trackedFilament = trackedFilament;
	}

	public Line build(LineDrawer lineDrawer) throws Exception {

		// Get the line from the line drawer
		double[] lineCoords = lineDrawer.draw(trackedFilament);

		// Extends tips
		lineCoords = extendTips(lineCoords, startOffsetLength, endOffsetLength);

		// Construct the line
		Line line = new Line(lineCoords[0], lineCoords[1], lineCoords[2], lineCoords[3]);
		line.setStrokeWidth(lineTickness);
		line.setPosition(-1);

		return line;
	}

	protected double[] extendTips(double[] lineCoords, double startOffsetLength, double endOffsetLength)
			throws Exception {

		double[] newStart = new double[2];
		double[] newEnd = new double[2];

		// Extend the line by an offset at the start tip
		newStart = extendTip(lineCoords, startOffsetLength);

		// Extend the line by an offset at the end tip
		double tmp = lineCoords[0];
		lineCoords[0] = lineCoords[2];
		lineCoords[2] = tmp;
		tmp = lineCoords[1];
		lineCoords[1] = lineCoords[3];
		lineCoords[3] = tmp;
		newEnd = extendTip(lineCoords, endOffsetLength);

		return ArrayUtils.addAll(newStart, newEnd);
	}

	protected double[] extendTip(double[] lineCoords, double offsetLength) throws Exception {
		double x0 = lineCoords[0];
		double y0 = lineCoords[1];
		double x1 = lineCoords[2];
		double y1 = lineCoords[3];

		double distanceRatio = getDistanceRatio(x0, y0, x1, y1, offsetLength);
		distanceRatio *= -1;

		double newX;
		double newY;

		newX = ((1 - distanceRatio) * x0) + (distanceRatio * x1);
		newY = ((1 - distanceRatio) * y0) + (distanceRatio * y1);

		return new double[] { newX, newY };

	}

	protected double getDistanceRatio(double x0, double y0, double x1, double y1, double offsetLength) {
		double lineLength = Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));
		double newLength = offsetLength;
		return newLength / lineLength;
	}

}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Web;
using System.Xml;

namespace WindowsFormsApplication_Acme_Soap
{
    public partial class Invoice : Form
    {
        public Invoice(String InvoiceSelection)
        {
            InitializeComponent();

            StartPosition = FormStartPosition.CenterScreen; //center form

            this.FormClosing += Invoice_FormClosing; // set close event

            // Create the web request
            string uri = "http://den-vm-dg02:8181/Invoices_Soap/getInvoice?INVOICE_NO="; // substitute with your host path. You may want to read this in from a config file (not hardcoded)
            uri = uri + InvoiceSelection;

            //declare variables
            var ElementCount = 0;
            var LN_Count = 0;

            System.Xml.XmlDocument xmlDocument = new System.Xml.XmlDocument();
            xmlDocument.Load(uri);

            XmlNodeList Acctno = xmlDocument.GetElementsByTagName("custAccount");
            AccountNo.Text = Acctno[0].InnerText;

            XmlNodeList BillCo = xmlDocument.GetElementsByTagName("billtoCompanyName");
            BillTo.Text = BillCo[0].InnerText;

            XmlNodeList BillAddress = xmlDocument.GetElementsByTagName("billtoAddress");
            BillAddr.Text = BillAddress[0].InnerText;

            XmlNodeList BillCity = xmlDocument.GetElementsByTagName("billtoCity");
            XmlNodeList BillState = xmlDocument.GetElementsByTagName("billtoSate");
            XmlNodeList BillZip = xmlDocument.GetElementsByTagName("billtoZip");
            Bill_CityStateZip.Text = BillCity[0].InnerText + ", " + BillState[0].InnerText + " " + BillZip[0].InnerText;

            XmlNodeList CustContact = xmlDocument.GetElementsByTagName("billtoContactName");
            Contact.Text = CustContact[0].InnerText;

            XmlNodeList Invoice_No = xmlDocument.GetElementsByTagName("invoiceNo");
            InvoiceNo.Text = Invoice_No[0].InnerText;

            XmlNodeList ShipToName = xmlDocument.GetElementsByTagName("shiptoName");
            ShipTo.Text = ShipToName[0].InnerText;

            XmlNodeList ShipAddress = xmlDocument.GetElementsByTagName("shiptoAddress");
            ShipAddr.Text = ShipAddress[0].InnerText;

            XmlNodeList ShipCity = xmlDocument.GetElementsByTagName("shiptoCity");
            XmlNodeList ShipState = xmlDocument.GetElementsByTagName("shiptoState");
            XmlNodeList ShipZip = xmlDocument.GetElementsByTagName("shiptoZip");
            Ship_CityStateZip.Text = ShipCity[0].InnerText + ", " + ShipState[0].InnerText + " " + ShipZip[0].InnerText;

            XmlNodeList SalesRepName = xmlDocument.GetElementsByTagName("salesRepName");
            SalesRep.Text = SalesRepName[0].InnerText;

            XmlNodeList SalesRepPhone = xmlDocument.GetElementsByTagName("salesRepPhone");
            RepPhone.Text = SalesRepPhone[0].InnerText;

            XmlNodeList Order_date = xmlDocument.GetElementsByTagName("orderDate");
            Ordered.Text = Order_date[0].InnerText;

            XmlNodeList Invoice_date = xmlDocument.GetElementsByTagName("invoiceDate");
            Invoiced.Text = Invoice_date[0].InnerText;

            XmlNodeList terms = xmlDocument.GetElementsByTagName("terms");
            Terms.Text = terms[0].InnerText;

            XmlNodeList Comments = xmlDocument.GetElementsByTagName("comment");
            Note.Text = Comments[0].InnerText;

            XmlNodeList InvoiceGross = xmlDocument.GetElementsByTagName("invoiceGross");
            Gross.Text = InvoiceGross[0].InnerText;

            XmlNodeList InvoiceDiscount = xmlDocument.GetElementsByTagName("invoiceDiscount");
            Discount.Text = InvoiceDiscount[0].InnerText;

            XmlNodeList InvoiceNet = xmlDocument.GetElementsByTagName("invoiceNet");
            Net.Text = InvoiceNet[0].InnerText;

            //Loop to get lines

            XmlNodeList elemList = xmlDocument.GetElementsByTagName("line");

            // Multidimensional array
            string[,] Lines = new string[elemList.Count, 8]; //must know how many child membersto declare array

            for (int i = 0; i < elemList.Count; i++)
            {
                ElementCount = 0;
                LN_Count++;

                foreach (XmlNode chldNode in elemList[i].ChildNodes)
                {
                    if (ElementCount == 0)
                    {
                        ElementCount++;
                        Lines[i, 0] = LN_Count.ToString();
                    }
                    Lines[i, ElementCount] = chldNode.InnerText;
                    ElementCount++;

                }

            }

            int ArrayCols = 8;
            for (int i = 0; i != elemList.Count; i++)
            {
                for (int j = 0; j != ArrayCols; j++)
                {
                    dataGridView1.Rows.Add();
                    dataGridView1.Rows[i].Cells[j].Value = Lines[i, j];

                }
            }

        }

        private void Invoice_Load(object sender, EventArgs e)
        {

        }

        private void NewSearch_Click(object sender, System.EventArgs e)
        {
            CustSearchFormProvider.custsearch.Show();

            List<Form> openForms = new List<Form>();

            foreach (Form f in Application.OpenForms)
                openForms.Add(f);

            foreach (Form f in openForms)
            {
                if (f.Name != "CustomerSearch")
                    f.Close();
            }
        }

        private void Invoice_FormClosing(Object sender, FormClosingEventArgs e)
        {

            this.Dispose();
        }
    }
}


text:
package Bio::KBase::ProteinInfoService::Browser::Defaults;
require Exporter;

#use GD;
use strict;

# almost any use of CGI breaks motifscan (?!?)
#use CGI qw/url/;
#my $cgi = CGI->new;

our @ISA = qw(Exporter);
our $defaults = {};
our $jobStatus = {};
our $jobStatusName = [];
our $motifTools = [];
our $motifToScan = {};
our $msaTrimTypes = [];
our $treeTools = [];
our $treeToolsId = {};

# Job Status Values
$jobStatus->{SUBMITTED}			= 0;
$jobStatus->{QUEUED}			= 1;
$jobStatus->{RUNNING}			= 2;
$jobStatus->{DONE}			= 3;
$jobStatus->{FAIL}			= 4;
$jobStatus->{DELETE}			= 5;
$jobStatus->{KILLED}			= 6;
$jobStatusName->[0]			= "SUBMITTED";
$jobStatusName->[1]			= "QUEUED";
$jobStatusName->[2]			= "RUNNING";
$jobStatusName->[3]			= "DONE";
$jobStatusName->[4]			= "FAIL";
$jobStatusName->[5]			= "DELETE";
$jobStatusName->[6]			= "KILLED";

# Motif Tools
$motifTools->[0]			= "AlignACE";
$motifTools->[1]			= "MEME";
$motifTools->[2]			= "Weeder";
$motifToScan->{ALIGNACE}		= "ScanACE";
$motifToScan->{MEME}			= "Patser";
$motifToScan->{WEEDER}			= "Patser";
$motifToScan->{upload}			= "Patser";

# Tree Tools
$treeTools->[0]                         = "Tree-Puzzle";
$treeTools->[1]                         = "PhyML";
$treeTools->[2]                         = "Neighbor";
$treeTools->[3]                         = "FastTree";
$treeTools->[4]                         = "RAxML";
$treeTools->[255]			= "Uploaded";
$treeToolsId->{'TREE-PUZZLE'}           = 0;
$treeToolsId->{'PHYML'}                 = 1;
$treeToolsId->{'NEIGHBOR'}              = 2;
$treeToolsId->{'FASTTREE'}              = 3;
$treeToolsId->{'RAXML'}                 = 4;
$treeToolsId->{'UPLOAD'}		= 255;

# MSA Trim Types
$msaTrimTypes->[0]			= "Raw";
$msaTrimTypes->[1]			= "Trimmed";
$msaTrimTypes->[2]			= "Gblocks";

#
# Default Values
#
# Could also set showMeta manually
#$defaults->{showMeta} = 0;
#$defaults->{showMeta} = ($cgi->url() =~ /^http:\/\/dylan/) ? 1 : undef;
$defaults->{showMeta} = (defined $ENV{SERVER_NAME} && $ENV{SERVER_NAME} =~ /^meta/) ? 1 : 0;

$defaults->{mode}			= 0;
$defaults->{range}			= 20000;

# uncomment this to put a MOTD on every page with the genome selector template
$defaults->{motd}		        = ($defaults->{showMeta})
    ? 'metaMicrobesOnline is brand new, and offers somewhat different functionality from isolate-only MicrobesOnline.  Please alert us to any issues at help@microbesonline.org.'
    : undef;

$defaults->{sendmail}			= "/usr/sbin/sendmail -bm -t";

$defaults->{adminEmail}			= "help\@microbesonline.org";

$defaults->{webHost}			= $ENV{SERVER_NAME};
$defaults->{webHost}			.= ":$ENV{SERVER_PORT}"
	if ( exists($ENV{SERVER_PORT}) &&
		(length($ENV{SERVER_PORT}) > 0) &&
		($ENV{SERVER_PORT} ne '80') );
#$defaults->{dbHost}			= "localhost";
$defaults->{dbHost}			= undef;
#$defaults->{dbDatabase}			= ($defaults->{showMeta}) ? "meta2010jul" : "genomics_test";
$defaults->{dbDatabase}			= undef;
$defaults->{dbUser}			= undef;
$defaults->{dbPassword}			= undef;
$defaults->{dbType}			= "mysql";

$defaults->{cookieExpire}		= "+12h";
$defaults->{userTrackingCookieExpire}	= "+365d";
$defaults->{cookieDomain}               = $ENV{SERVER_NAME};
$defaults->{cookieDomain}               = ".microbesonline.org"
	if ( exists($ENV{SERVER_NAME}) &&
		( $ENV{SERVER_NAME} =~ /microbesonline\.org/ ) );

$defaults->{baseDir}			= "$ENV{SANDBOX_DIR}/Genomics/browser/";
$defaults->{htmlTemplateBase}		= $defaults->{baseDir} . "templates/";
$defaults->{htmlFooter}			= "footer.tmpl";
$defaults->{htmlHeader}			= ($defaults->{showMeta}) ? "header_meta.tmpl" : "header.tmpl";

$defaults->{htmlTmpDir}			= "$ENV{SANDBOX_DIR}/Genomics/html/" . "tmp/";
$defaults->{htmlTmpUri}			= "/tmp/";
$defaults->{jsUri}			= "/js/";
$defaults->{cgiUri}			= "/cgi-bin/";
$defaults->{uaParseFile}		= "$ENV{SANDBOX_DIR}/Genomics/browser/config/uaparse.txt";

# KEGG::Map API
$defaults->{keggMapDir}			= "$ENV{SANDBOX_DIR}/Genomics/html/kegg";
$defaults->{keggMapHighlightColor}	= [250, 160, 160];
$defaults->{keggMapLegend}		= {};
$defaults->{keggMapLegend}->{font} 	= "gdSmallFont";
$defaults->{keggMapLegend}->{buffer} = "5";
$defaults->{keggMapLegend}->{numColumns} = "3";
$defaults->{keggMapLegend}->{labelPad}	= "15";
$defaults->{keggMapLegend}->{textColor}	= [0, 0, 0];
$defaults->{keggMapLegend}->{enzyme}	= {};
$defaults->{keggMapLegend}->{enzyme}->{shape}	= "rect";
$defaults->{keggMapLegend}->{enzyme}->{width}	= "10";
$defaults->{keggMapLegend}->{enzyme}->{height}	= "10";
$defaults->{keggMapLegend}->{compound}->{shape}	= "circ";
$defaults->{keggMapLegend}->{compound}->{radius} = "5";

# Memcached params
$defaults->{memcachedServers}		= [
						'127.0.0.1:11211',
					  ];
$defaults->{memcachedCompressThreshold}	= 65536;	# 64K
$defaults->{memcachedDebug}		= 0;		# set to 1 for debugging data; slows performance

#
# If you have a web cluster, the following directory must be the same
# physical disk for all machines.  You can accomplish this with NFS.
#
$defaults->{sharedJobDir}		= "$ENV{SANDBOX_DIR}/Genomics/html/" . "jobdata/";
$defaults->{sharedJobUri}		= "/jobdata/";
$defaults->{jobTmpDir}			= "/tmp/";
$defaults->{microArrayDir}		= "$ENV{SANDBOX_DIR}/Genomics/html/" . "microarray/";
$defaults->{webLogoBaseDir}		= $defaults->{baseDir} . "lib/";

$defaults->{sessionDir}			= $defaults->{baseDir} . "sessions/";
$defaults->{sessionMaxSeqs}		= 500;
$defaults->{sessionMaxCarts}		= 50;
$defaults->{sessionTmpDir}		= "/tmp/";
$defaults->{sessionDbHost}		= "localhost";
$defaults->{sessionDbDatabase}		= ($defaults->{showMeta}) ? "meta2010jul" : "genomics_test";
$defaults->{sessionDbUser}		= "cart";
$defaults->{sessionDbPassword}		= "cart";
$defaults->{sessionDbType}		= "mysql";

$defaults->{maxJobRunTime}		= 60;	# minutes
$defaults->{maxConcurrentJobsPerUser}	= 1;
$defaults->{treeAAModel}		= "JTT";
$defaults->{treeNAModel}		= "HKY";
$defaults->{fasttreeAAModel}		= "JTT+CAT";
$defaults->{fasttreeNAModel}		= "GTR+CAT";

$defaults->{binDir}			= $defaults->{baseDir} . "bin/";
$defaults->{ALIGNACE}			= $defaults->{binDir} . "AlignACE";
$defaults->{BL2SEQ}			= $defaults->{binDir} . "bl2seq";
$defaults->{BLASTALL}			= $defaults->{binDir} . "blastall";
$defaults->{CLUSTALW}			= $defaults->{binDir} . "clustalw";
$defaults->{COMBINELENGTHBOOTSTRAP}	= $defaults->{binDir} . "combineLengthBootstrap.pl";
$defaults->{CONSENSE}			= $defaults->{binDir} . "consense";
$defaults->{CP}				= "/bin/cp";
$defaults->{SEQBOOT}			= $defaults->{binDir} . "seqboot";
$defaults->{PROTDIST}			= $defaults->{binDir} . "protdist";
$defaults->{DNADIST}			= $defaults->{binDir} . "dnadist";
$defaults->{DOMSEARCH}			= $defaults->{binDir} . "DomSearch";
$defaults->{FASTACMD}			= $defaults->{binDir} . "fastacmd";
$defaults->{FORMATDB}			= $defaults->{binDir} . "formatdb";
$defaults->{GBLOCKS}			= $defaults->{binDir} . "Gblocks";
$defaults->{GFCLIENT}			= $defaults->{binDir} . "gfClient";
$defaults->{HMMSEARCH}			= $defaults->{binDir} . "hmmsearch";
$defaults->{JAVA}			= "/usr/local/java/bin/java";
$defaults->{LS}				= "/bin/ls";
$defaults->{MEGABLAST}			= $defaults->{binDir} . "megablast";
$defaults->{MEME}			= $defaults->{binDir} . "meme.bin";
$defaults->{MOTIFSCAN}			= $defaults->{binDir} . "motifScan";
$defaults->{MUSCLE}			= $defaults->{binDir} . "muscle";
$defaults->{NEIGHBOR}			= $defaults->{binDir} . "neighbor";
$defaults->{PATSER}			= $defaults->{binDir} . "patser";
$defaults->{PATSER_BIN}			= $defaults->{binDir} . "patser-v3b";
$defaults->{PHYML}			= $defaults->{binDir} . "phyml";
$defaults->{PHYML_ALRT}			= $defaults->{binDir} . "phyml_alrt";
$defaults->{PROTDIST}			= $defaults->{binDir} . "protdist";
$defaults->{PUZZLE}			= $defaults->{binDir} . "puzzle";
$defaults->{RETREE}			= $defaults->{binDir} . "retree";
$defaults->{SCANACE}			= $defaults->{binDir} . "ScanACE";
$defaults->{SEQBOOT}			= $defaults->{binDir} . "seqboot";
$defaults->{TREENEIGHBOR}		= $defaults->{binDir} . "treeNeighbor";
$defaults->{TREEPHYML}			= $defaults->{binDir} . "treePhyml";
$defaults->{TREEPUZZLE}			= $defaults->{binDir} . "treePuzzle";
$defaults->{FASTTREE}                   = $defaults->{binDir} . "treeFastTree";
$defaults->{RAXML}                      = $defaults->{binDir} . "treeRAxML";
$defaults->{UNZIP}			= "/usr/bin/unzip";
$defaults->{WEEDER}			= $defaults->{binDir} . "weeder";
$defaults->{WEEDER_TFBS}		= $defaults->{binDir} . "weederTFBS.out";
$defaults->{WEEDER_ADVISER}		= $defaults->{binDir} . "adviser.out";

$defaults->{MEME_DATA_DIR}		= $defaults->{binDir} . "meme_3.5.0";
$defaults->{WEEDER_DATA_DIR}		= $defaults->{binDir};

$defaults->{motifTools}			= $motifTools;
$defaults->{motifToScan}		= $motifToScan;

#Motif-Finding Settings
$defaults->{scaffoldsFasta}		= $defaults->{baseDir} . "fasta/scaffolds_short.fna";

$defaults->{defaultTreeWidth}		= 944;

# BLAT settings
$defaults->{transBlatServer} = 'localhost';
$defaults->{transBlatPort} = [1271,1272,1273,1274,1275,1276];
$defaults->{transBlatPath} = "/";

# FastHMM/FastBLAST settings
# (assume input file is here)
$defaults->{FastBLASTDataDir}			=	"$ENV{SANDBOX_DIR}/Genomics/data/fastblast";
$defaults->{FastBLASTInputFile}			=	$defaults->{FastBLASTDataDir} . '/allProteomes.faa';

# KinoSearch settings
$defaults->{KinoSearchDir}			=	"$ENV{SANDBOX_DIR}/Genomics/data/kinosearch/";

#
# Browser Settings
#
$defaults->{minBrowserWidth}		= 600;		# Pixels
$defaults->{setSpacing}			= 50;		# Pixels
$defaults->{coordClipping}		= 1;		# Disable out of range coordinates?
$defaults->{strandLock}			= 0;		# Enable strand locking for anchored mode
$defaults->{neighborColor}		= 0;		# Use default per-track coloring scheme
$defaults->{neighborGreySingle}		= 1;		# Loci with no orthologs on the current display
							# should be grey instead of having a unique color
$defaults->{dynamicMaxIterations}	= 2;		# In dynamic mode, maximum number of iterations to find an ortholog
$defaults->{maxLocusBatching}		= 500;		# Group loci to speed iterative queries
$defaults->{cogColorThresh}		= 7000;	# Views > this will use the COG table for neighbor coloring
$defaults->{dynamicSetRange}		= 5000;		# Default range around dynamic set loci in bp
$defaults->{scaffoldLenThresh}		= 400000;	# Scaffolds less than this will not be listed in drop-down box
$defaults->{neighborGreyColor}		= "lightgrey";
$defaults->{gapLabelColor}		= "black";
$defaults->{clickAction}		= 0;		# The default action when clicking on feature
							#   0 - load protein page
							#   1 - recenter around feature
							#   2 - add feature to cart

$defaults->{width}			= 800;		# Pixels
$defaults->{bgColor}			= "#FFFFFF";	# Background color
$defaults->{grid}			= 1;		# Enable grid
$defaults->{gridColor}			= "#DCDCFF";	# Grid color
$defaults->{keys}			= 1;		# Enable keys
$defaults->{keyLocation}		= "between";	# Key location
$defaults->{keyAlign}			= "left";	# Key alignment for "between"
$defaults->{keyFont}			= "gdSmallFont";# Font size
$defaults->{keyBottomColor}		= "#EFEFEF";	# Bottom key color
$defaults->{padTop}			= 0;		# Top padding
$defaults->{padLeft}			= 10;		# Left padding
$defaults->{padRight}			= 10;		# Right padding
$defaults->{padBottom}			= 0;		# Bottom padding
$defaults->{scale}			= 1;		# Enable scale
$defaults->{scaleLabel}			= "Scale";	# Scale label
$defaults->{emptyTrack}			= "suppress";	# Suppress empty tracks (key, line, dashed)
$defaults->{svg}			= 0;		# Export to SVG?

# Feature-specific options
$defaults->{labels}			= 1;		# Enable feature labels
$defaults->{labelFont}			= "gdTinyFont";	# Font size
$defaults->{labelLocation}		= "top";	# Label location relative to feature
$defaults->{labelColWidth}		= 100;		# If labels are on the left/right, this is the column width for the labels
$defaults->{labelColor}			= "#000000";	# Feature label color
$defaults->{labelHighlightColor}	= "#00AA00";	# Highlight label color
$defaults->{height}			= 10;		# Feature height

# Microarray::Heatmap defaults
$defaults->{heatmap}			= {};
$defaults->{heatmap}->{cellWidth}	= 20;		# Width of heatmap cell
$defaults->{heatmap}->{cellHeight}	= 12;		# Height of heatmap cell
$defaults->{heatmap}->{scaleCellWidth}	= 20;		# Width of heatmap scale cell
$defaults->{heatmap}->{scaleCellHeight}	= 12;		# Height of heatmap scale cell
$defaults->{heatmap}->{zWidth}		= 2;		# width of z border on cells if enabled (in pixels)
$defaults->{heatmap}->{bgColor}		= [255,255,255];# background color
$defaults->{heatmap}->{zeroColor}	= [255,255,255];# color to use when there is no change
$defaults->{heatmap}->{dataUpColor}	= [0,153,0];	# up-regulated threshold color
$defaults->{heatmap}->{dataDnColor}	= [204,0,0];	# down-regulated threshold color
$defaults->{heatmap}->{zUpColor}	= [255,255,0];	# z value up threshold color
$defaults->{heatmap}->{zDnColor}	= [0,0,255];	# z value down threshold color
$defaults->{heatmap}->{dataScaleMethod}	= 0;		# method for determining scale:
							# 0 - fixed range + fixed threshold steps
							# 1 - fixed range + fixed # of bins
							# 2 - fixed range + continuous
							# 3 - dynamic range + fixed threshold steps
							# 4 - dynamic range + fixed # of bins
							# 5 - dynamic range + continuous (no bins)
$defaults->{heatmap}->{zScaleMethod}	= 3;		# method for determining z scale:
							# 0 - fixed range + fixed threshold steps
							# 1 - fixed range + fixed # of bins
							# 2 - fixed range + continuous
							# 3 - dynamic range + fixed threshold steps
							# 4 - dynamic range + fixed # of bins
							# 5 - dynamic range + continuous (no bins)
$defaults->{heatmap}->{continuousScaleHeight} = 170;	# height of scale if using continous scale
$defaults->{heatmap}->{continuousNumMarkers} = 9;	# number of markers to display if using a
							# continuous scale (should be odd as well)
$defaults->{heatmap}->{dataUpThresh}	= 2.0;		# maximum up-regulated threshold
$defaults->{heatmap}->{dataDnThresh}	= -2.0;		# minimum down-regularted threshold
$defaults->{heatmap}->{dataThreshStep}	= 0.25;		# use 0.25 steps - used in methods 0,2
$defaults->{heatmap}->{dataThreshBins}	= 17;		# use 17 bins - used in method 3 (should be odd)
							# if not odd, the value will be incremented
$defaults->{heatmap}->{zUpThresh}	= 16.0;		# max z score threshold
$defaults->{heatmap}->{zDnThresh}	= -16.0;	# min z score threshold
$defaults->{heatmap}->{zThreshStep}	= 2.0;		# use 2.0 steps - used in methods 0,2
$defaults->{heatmap}->{zThreshBins}	= 17;		# use 17 bins - used in method 3 (should be odd)
							# if not odd, the value will be incremented
$defaults->{heatmap}->{showGrid}	= 1;		# display a grid between and around cells?
$defaults->{heatmap}->{gridColor}	= [0,0,0];	# grid color
$defaults->{heatmap}->{naColor}		= [63,63,63];	# color to use when there's no data
$defaults->{heatmap}->{columnIdOrientation}	= 1;	# how should the header text be rendered?
							# 0 - left diagonally (not supported yet)
							# 1 - upright
							# 2 - right diagonally (not supported yet)
$defaults->{heatmap}->{showRowGroups}	= 1;		# should row groups be shown?
							# 0 - never show row groups
							# 1 - auto-detect (displayed if groups present)
							# 2 - always show row groups
$defaults->{heatmap}->{showRowGroupBrackets}	= 1;	# show row group brackets?
							# 0 - no
							# 1 - yes
$defaults->{heatmap}->{rowGroupIdOrientation}	= 0;	# how are row group labels rendered?
							# 0 - horizontally (default)
							# 1 - vertically
$defaults->{heatmap}->{rowGroupSpacing}	= 10;		# add spacing between adjacent groups?
							# 0 - no
							# >=1 = number of pixels
$defaults->{heatmap}->{showColGroups}	= 1;		# should column groups be shown?
							# 0 - never show column groups
							# 1 - auto-detect (displayed if groups present)
							# 2 - always show column groups
$defaults->{heatmap}->{showColGroupBrackets}	= 1;	# show column group brackets?
							# 0 - no
							# 1 - yes
$defaults->{heatmap}->{columnGroupIdOrientation} = 0;	# how are column group labels rendered?
							# 0 - horizontally (default)
							# 1 - vertically
$defaults->{heatmap}->{colGroupSpacing}	= 10;		# add spacing between adjacent groups?
							# 0 - no
							# >=1 - number of pixels
$defaults->{heatmap}->{showRowDescs}	= 3;		# how row descriptions should be shown
							# 0 - not shown, no mouseovers
							# 1 - mouseovers only
							# 2 - right description box
							# 3 - mouseover + right description box
$defaults->{heatmap}->{showColDescs}	= 1;		# how column descriptions should be shown
							# 0 - not shown, no mouseovers
							# 1 - mouseovers only
$defaults->{heatmap}->{showZScores}	= 1;		# should z scores be shown if present?
							# 0 - not shown, even if present
							# 1 - shown if present
$defaults->{heatmap}->{showScales}	= 1;		# should scale bars be shown?
							# 0 - not shown
							# 1 - shown, z is shown if scores present && showZScores == 1
							# 2 - only data scale is shown (even if z present)
$defaults->{heatmap}->{scaleSpacing}	= 10;		# vertical spacing between scales (pixels)
$defaults->{heatmap}->{scaleLabelSpacing} = 4;		# vertical spacing between label and scale bar (pixels)
$defaults->{heatmap}->{font}		= "gdSmallFont";
$defaults->{heatmap}->{textColor}	= [0,0,0];	# text color
$defaults->{heatmap}->{url}		= {};
$defaults->{heatmap}->{url}->{experiments}	= "/cgi-bin/microarray/reportSet.cgi?id=%id";
$defaults->{heatmap}->{url}->{genes}		= "/cgi-bin/fetchLocus.cgi?locus=%id";
$defaults->{heatmap}->{url}->{experimentsGroup}	= "/cgi-bin/microarray/reportGenes.cgi?locusId=%groupIds&expId=%expId&z=2";
$defaults->{heatmap}->{url}->{genesGroup}	= "/cgi-bin/fetchLoci.cgi?locus=%groupIds";
$defaults->{heatmap}->{url}->{data}		= "#";
$defaults->{heatmap}->{popup}->{experiments}	= "%id %stress %updated %created %source %type group:[%groupId,%groupDesc]";
$defaults->{heatmap}->{popup}->{genes}		= "%id %name %genome group:[%groupId,%groupDesc]";
$defaults->{heatmap}->{popup}->{experimentsGroup} = "[%groupIds]";
$defaults->{heatmap}->{popup}->{genesGroup}	= "[%groupIds]";
$defaults->{heatmap}->{popup}->{data}		= "%stress %id_col %id_row %name %created %data %z ROW:[%groupDesc_row] COL:[%groupDesc_col]";
$defaults->{heatmap}->{rowDesc}->{experiments}	= "%stress %updated %created %source %type";
$defaults->{heatmap}->{rowDesc}->{genes}	= "%id %name %genome";
$defaults->{heatmap}->{label}->{genes}		= "%name";
$defaults->{heatmap}->{label}->{experiments}	= "e%id";
$defaults->{heatmap}->{label}->{scaleData}	= "Data";
$defaults->{heatmap}->{label}->{scaleZ}		= "Z-Score";
$defaults->{heatmap}->{label}->{scaleNoData}	= "No Data";
$defaults->{heatmap}->{label}->{markers}	= "%.2f";
$defaults->{heatmap}->{padding}		= {};
$defaults->{heatmap}->{padding}->{colIdsTop}	= 2;
$defaults->{heatmap}->{padding}->{restTop}	= 8;
$defaults->{heatmap}->{padding}->{rowIdsLeft}	= 2;
$defaults->{heatmap}->{padding}->{dataLeft}	= 8;
$defaults->{heatmap}->{padding}->{rowDescsLeft}	= 8;
$defaults->{heatmap}->{padding}->{scalesLeft}	= 20;

#
# Default Strings
#
$defaults->{htmlTitle}			= "Generic Default Title";
$defaults->{htmlErrorTitle}		= "An Error Has Occured";
$defaults->{htmlDefaultError}		= "Unknown Error";
$defaults->{resetPasswordEmailSubject}	= "VIMSS Account Password Reset";

#
#  Allow Custom Expression Operations
#

$defaults->{customExpressionOperations}	= 0;

#
# Track Colors
#
our $trackColors =	[
                                'darkcyan',
                                'midnightblue',
                                'sandybrown',
                                'mediumturquoise',
                                'chocolate',
                                'indigo',
                                'yellow',
                                'whitesmoke',
                                'aliceblue',
                                'purple',
                                'mediumslateblue',
                                'firebrick',
                                'plum',
                                'silver',
                                'lightblue',
                                'darkgoldenrod',
                                'deeppink',
                                'royalblue',
                                'lightseagreen',
                                'lightslategray',
                                'darkslateblue',
                                'powderblue',
                                'peachpuff',
                                'orchid',
                                'darkkhaki',
                                'darkgreen',
                                'cornsilk',
                                'seashell',
                                'darkblue',
                                'hotpink',
                                'blanchedalmond',
                                'darksalmon',
                                'blue',
                                'mediumvioletred',
                                'lemonchiffon',
                                'snow',
                                'fuchsia',
                                'lightskyblue',
                                'gainsboro',
                                'chartreuse',
                                'darkviolet',
                                'linen',
                                'lightcoral',
                                'moccasin',
                                'teal',
                                'tan',
                                'seagreen',
                                'ghostwhite',
                                'cornflowerblue',
                                'mintcream',
                                'palegreen',
                                'palevioletred',
                                'lightgreen',
                                'lightsalmon',
                                'coral',
                                'gray',
                                'olive',
                                'darkturquoise',
                                'mediumaquamarine',
                                'azure',
                                'cyan',
                                'lightpink',
                                'saddlebrown',
                                'red',
                                'indianred',
                                'peru',
                                'palegoldenrod',
                                'lightcyan',
                                'ivory',
                                'papayawhip',
                                'turquoise',
                                'paleturquoise',
                                'mediumblue',
                                'violet',
                                'lawngreen',
                                'darkorchid',
                                'beige',
                                'tomato',
                                'springgreen',
                                'oldlace',
                                'magenta',
                                'antiquewhite',
                                'floralwhite',
                                'mediumorchid',
                                'orange',
                                'lavender',
                                'darkslategray',
                                'steelblue',
                                'darkred',
                                'blueviolet',
                                'lightgrey',
                                'slateblue',
                                'olivedrab',
                                'sienna',
                                'brown',
                                'green',
                                'forestgreen',
                                'goldenrod',
                                'lightgoldenrodyellow',
                                'mediumspringgreen',
                                'cadetblue',
                                'orangered',
                                'crimson',
                                'lavenderblush',
                                'gold',
                                'darkmagenta',
                                'honeydew',
                                'wheat',
                                'deepskyblue',
                                'dimgray',
                                'slategray',
                                'khaki',
                                'aqua',
                                'aquamarine',
                                'lightsteelblue',
                                'darkolivegreen',
                                'dodgerblue',
                                'darkorange',
                                'darkgray',
                                'bisque',
                                'mediumseagreen',
                                'skyblue',
                                'darkseagreen',
                                'lime',
                                'rosybrown',
                                'greenyellow',
                                'navajowhite',
                                'burlywood',
                                'pink',
                                'maroon',
                                'navy',
                                'lightyellow',
                                'thistle',
                                'limegreen',
                                'mediumpurple',
                                'mistyrose',
                                'salmon',
                                'yellowgreen',
			];

#
# Non grey-scale colors
#
our $trackNoGreyColors =
			[
                                'darkcyan',
                                'midnightblue',
                                'sandybrown',
                                'mediumturquoise',
                                'chocolate',
                                'indigo',
                                'purple',
                                'mediumslateblue',
                                'firebrick',
                                'plum',
                                'lightblue',
                                'darkgoldenrod',
                                'deeppink',
                                'royalblue',
                                'lightseagreen',
                                'darkslateblue',
                                'powderblue',
                                'peachpuff',
                                'orchid',
                                'darkkhaki',
                                'darkgreen',
                                'cornsilk',
                                'seashell',
                                'darkblue',
                                'hotpink',
                                'blanchedalmond',
                                'darksalmon',
                                'blue',
                                'mediumvioletred',
                                'lemonchiffon',
                                'fuchsia',
                                'lightskyblue',
                                'gainsboro',
                                'chartreuse',
                                'darkviolet',
                                'linen',
                                'lightcoral',
                                'moccasin',
                                'teal',
                                'tan',
                                'seagreen',
                                'cornflowerblue',
                                'mintcream',
                                'palegreen',
                                'palevioletred',
                                'lightgreen',
                                'yellow',
                                'lightsalmon',
                                'coral',
                                'olive',
                                'darkturquoise',
                                'mediumaquamarine',
                                'azure',
                                'cyan',
                                'lightpink',
                                'saddlebrown',
                                'red',
                                'indianred',
                                'peru',
                                'palegoldenrod',
                                'lightcyan',
                                'papayawhip',
                                'turquoise',
                                'paleturquoise',
                                'mediumblue',
                                'violet',
                                'lawngreen',
                                'darkorchid',
                                'beige',
                                'tomato',
                                'springgreen',
                                'oldlace',
                                'magenta',
                                'mediumorchid',
                                'orange',
                                'lavender',
                                'steelblue',
                                'darkred',
                                'blueviolet',
                                'slateblue',
                                'olivedrab',
                                'sienna',
                                'brown',
                                'green',
                                'forestgreen',
                                'goldenrod',
                                'lightgoldenrodyellow',
                                'mediumspringgreen',
                                'cadetblue',
                                'orangered',
                                'crimson',
                                'lavenderblush',
                                'gold',
                                'darkmagenta',
                                'honeydew',
                                'wheat',
                                'deepskyblue',
                                'dimgray',
                                'khaki',
                                'aqua',
                                'aquamarine',
                                'lightsteelblue',
                                'darkolivegreen',
                                'dodgerblue',
                                'darkorange',
                                'bisque',
                                'mediumseagreen',
                                'skyblue',
                                'darkseagreen',
                                'lime',
                                'rosybrown',
                                'greenyellow',
                                'burlywood',
                                'pink',
                                'maroon',
                                'navy',
                                'lightyellow',
                                'thistle',
                                'limegreen',
                                'mediumpurple',
                                'mistyrose',
                                'salmon',
                                'yellowgreen',
			];

our $trackNoGreyJobTreeColors =
			[
                                'darkcyan',
                                'mediumturquoise',
                                'chocolate',
                                'indigo',
                                'purple',
                                'mediumslateblue',
                                'firebrick',
                                'plum',
                                'darkgoldenrod',
                                'deeppink',
                                'royalblue',
                                'lightseagreen',
                                'darkslateblue',
                                'orchid',
                                'darkkhaki',
                                'darkgreen',
                                'darkblue',
                                'hotpink',
                                'darksalmon',
                                'blue',
                                'mediumvioletred',
                                'fuchsia',
                                'lightskyblue',
                                'chartreuse',
                                'darkviolet',
                                'lightcoral',
                                'teal',
                                'seagreen',
                                'cornflowerblue',
                                'palevioletred',
                                'lightsalmon',
                                'coral',
                                'olive',
                                'darkturquoise',
                                'mediumaquamarine',
                                'cyan',
                                'saddlebrown',
                                'red',
                                'indianred',
                                'peru',
                                'turquoise',
                                'mediumblue',
                                'violet',
                                'lawngreen',
                                'darkorchid',
                                'beige',
                                'tomato',
                                'springgreen',
                                'oldlace',
                                'magenta',
                                'mediumorchid',
                                'orange',
                                'lavender',
                                'steelblue',
                                'darkred',
                                'blueviolet',
                                'slateblue',
                                'olivedrab',
                                'sienna',
                                'brown',
                                'green',
                                'forestgreen',
                                'goldenrod',
                                'lightgoldenrodyellow',
                                'mediumspringgreen',
                                'cadetblue',
                                'orangered',
                                'crimson',
                                'lavenderblush',
                                'gold',
                                'darkmagenta',
                                'honeydew',
                                'wheat',
                                'deepskyblue',
                                'dimgray',
                                'khaki',
                                'aqua',
                                'aquamarine',
                                'lightsteelblue',
                                'darkolivegreen',
                                'dodgerblue',
                                'darkorange',
                                'bisque',
                                'mediumseagreen',
                                'skyblue',
                                'darkseagreen',
                                'lime',
                                'rosybrown',
                                'greenyellow',
                                'burlywood',
                                'pink',
                                'maroon',
                                'navy',
                                'lightyellow',
                                'thistle',
                                'limegreen',
                                'mediumpurple',
                                'mistyrose',
                                'salmon',
                                'yellowgreen',
			];

our @EXPORT = qw($defaults $trackColors $trackNoGreyColors $trackNoGreyJobTreeColors $jobStatus $jobStatusName $msaTrimTypes $treeTools $treeToolsId);

1;


text:
package com.haarman.listviewanimations;

import com.tcl.framework.log.NLog;

import android.database.DataSetObserver;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.SectionIndexer;

/**
 * A decorator class that enables decoration of an instance of the {@link BaseAdapter} class.
 * <p/>
 * Classes extending this class can override methods and provide extra functionality before or after calling the super method.
 */
public abstract class BaseAdapterDecorator extends BaseAdapter implements SectionIndexer, Swappable, Insertable, ListViewWrapperSetter {

    /**
     * The {@link android.widget.BaseAdapter} this {@code BaseAdapterDecorator} decorates.
     */

    private final BaseAdapter mDecoratedBaseAdapter;

    /**
     * The {@link com.nhaarman.listviewanimations.util.ListViewWrapper} containing the ListView this {@code BaseAdapterDecorator} will be bound to.
     */

    private ListViewWrapper mListViewWrapper;

    /**
     * Create a new {@code BaseAdapterDecorator}, decorating given {@link android.widget.BaseAdapter}.
     *
     * @param baseAdapter the {@code} BaseAdapter to decorate.
     */
    protected BaseAdapterDecorator( final BaseAdapter baseAdapter) {
        mDecoratedBaseAdapter = baseAdapter;
    }

    /**
     * Returns the {@link android.widget.BaseAdapter} that this {@code BaseAdapterDecorator} decorates.
     */

    public BaseAdapter getDecoratedBaseAdapter() {
        return mDecoratedBaseAdapter;
    }

    /**
     * Returns the root {@link android.widget.BaseAdapter} this {@code BaseAdapterDecorator} decorates.
     */

    protected BaseAdapter getRootAdapter() {
        BaseAdapter adapter = mDecoratedBaseAdapter;
        while (adapter instanceof BaseAdapterDecorator) {
            adapter = ((BaseAdapterDecorator) adapter).getDecoratedBaseAdapter();
        }
        return adapter;
    }

    public void setAbsListView( final AbsListView absListView) {
        setListViewWrapper(new AbsListViewWrapper(absListView));
    }

    /**
     * Returns the {@link com.nhaarman.listviewanimations.util.ListViewWrapper} containing the ListView this {@code BaseAdapterDecorator} is bound to.
     */

    public ListViewWrapper getListViewWrapper() {
        return mListViewWrapper;
    }

    /**
     * Alternative to {@link #setAbsListView(android.widget.AbsListView)}. Sets the {@link com.nhaarman.listviewanimations.util.ListViewWrapper} which contains the ListView
     * this adapter will be bound to. Call this method before setting this adapter to the ListView. Also propagates to the decorated {@code BaseAdapter} if applicable.
     */
    @Override
    public void setListViewWrapper( final ListViewWrapper listViewWrapper) {
        mListViewWrapper = listViewWrapper;

        if (mDecoratedBaseAdapter instanceof ListViewWrapperSetter) {
            ((ListViewWrapperSetter) mDecoratedBaseAdapter).setListViewWrapper(listViewWrapper);
        }
    }

    @Override
    public int getCount() {
        return mDecoratedBaseAdapter.getCount();
    }

    @Override
    public Object getItem(final int position) {
        return mDecoratedBaseAdapter.getItem(position);
    }

    @Override
    public long getItemId(final int position) {
        return mDecoratedBaseAdapter.getItemId(position);
    }

    @Override

    public View getView(final int position,  final View convertView,  final ViewGroup parent) {
        return mDecoratedBaseAdapter.getView(position, convertView, parent);
    }

    @Override
    public boolean areAllItemsEnabled() {
        return mDecoratedBaseAdapter.areAllItemsEnabled();
    }

    @Override

    public View getDropDownView(final int position,  final View convertView,  final ViewGroup parent) {
        return mDecoratedBaseAdapter.getDropDownView(position, convertView, parent);
    }

    @Override
    public int getItemViewType(final int position) {
        return mDecoratedBaseAdapter.getItemViewType(position);
    }

    @Override
    public int getViewTypeCount() {
        return mDecoratedBaseAdapter.getViewTypeCount();
    }

    @Override
    public boolean hasStableIds() {
        return mDecoratedBaseAdapter.hasStableIds();
    }

    @Override
    public boolean isEmpty() {
        return mDecoratedBaseAdapter.isEmpty();
    }

    @Override
    public boolean isEnabled(final int position) {
        return mDecoratedBaseAdapter.isEnabled(position);
    }

    @Override
    public void notifyDataSetChanged() {
        if (!(mDecoratedBaseAdapter instanceof ArrayAdapter<?>)) {
            // fix #35 dirty trick !
            // leads to an infinite loop when trying because ArrayAdapter triggers notifyDataSetChanged itself
            // TODO: investigate
            mDecoratedBaseAdapter.notifyDataSetChanged();
        }
    }

    /**
     * Helper function if you want to force notifyDataSetChanged()
     */
    @SuppressWarnings("UnusedDeclaration")
    public void notifyDataSetChanged(final boolean force) {
        if (force || !(mDecoratedBaseAdapter instanceof ArrayAdapter<?>)) {
            // leads to an infinite loop when trying because ArrayAdapter triggers notifyDataSetChanged itself
            // TODO: investigate
            mDecoratedBaseAdapter.notifyDataSetChanged();
        }
    }

    @Override
    public void notifyDataSetInvalidated() {
        mDecoratedBaseAdapter.notifyDataSetInvalidated();
    }

    @Override
    public void registerDataSetObserver( final DataSetObserver observer) {
        mDecoratedBaseAdapter.registerDataSetObserver(observer);
    }

    @Override
    public void unregisterDataSetObserver( final DataSetObserver observer) {
        mDecoratedBaseAdapter.unregisterDataSetObserver(observer);
    }

    @Override
    public int getPositionForSection(final int sectionIndex) {
        int result = 0;
        if (mDecoratedBaseAdapter instanceof SectionIndexer) {
            result = ((SectionIndexer) mDecoratedBaseAdapter).getPositionForSection(sectionIndex);
        }
        return result;
    }

    @Override
    public int getSectionForPosition(final int position) {
        int result = 0;
        if (mDecoratedBaseAdapter instanceof SectionIndexer) {
            result = ((SectionIndexer) mDecoratedBaseAdapter).getSectionForPosition(position);
        }
        return result;
    }

    @Override

    public Object[] getSections() {
        Object[] result = new Object[0];
        if (mDecoratedBaseAdapter instanceof SectionIndexer) {
            result = ((SectionIndexer) mDecoratedBaseAdapter).getSections();
        }
        return result;
    }

    @Override
    public void swapItems(final int positionOne, final int positionTwo) {
        if (mDecoratedBaseAdapter instanceof Swappable) {
            ((Swappable) mDecoratedBaseAdapter).swapItems(positionOne, positionTwo);
        } else {
            NLog.w("ListViewAnimations", "Warning: swapItems called on an adapter that does not implement Swappable!");
        }
    }

    @Override
    public void add(final int index,  final Object item) {
        if (mDecoratedBaseAdapter instanceof Insertable) {
            //noinspection rawtypes
            ((Insertable) mDecoratedBaseAdapter).add(index, item);
        } else {
        	NLog.w("ListViewAnimations", "Warning: add called on an adapter that does not implement Insertable!");
        }
    }
}


text:
import validateNote from 'validate-note';

import types from './data/types';
import getNote from './lib/getNote';

export default (chord, {
  maxOctave = 8,
  flatToSharp = false
} = {}) => {

  if (typeof chord !== `string`) {
    throw new Error(`'${chord}' is not a valid chord`);
  }

  const note = getNote(chord);

  const sNote = validateNote(note, {maxOctave, flatToSharp, octave: true});

  const type = types[chord.split(note)[1].toLowerCase()];

  if (!type) throw new Error(`'${chord.split(note)[1]}' is not a valid chord type`);

  Object.keys(sNote).forEach(key => (!sNote[key]) && delete sNote[key]);

  return {
    note: sNote,
    type
  };

};


text:
/*
 * Copyright (c) 1999, 2000
 * Lehrstuhl fuer Prozessleittechnik (PLT), RWTH Aachen
 * D-52064 Aachen, Germany.
 * All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Library General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this program (see the file COPYING.LIB for more
 * details); if not, write to the Free Software Foundation, Inc.,
 * 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package javaclient3.xdr;

import java.io.IOException;

/**
 * Instances of the class XdrVoid represent (de-)serializable
 * voids, which are especially useful in cases where no result is expected
 * from a remote function call or no parameters are supplied.
 *
 *
Please note that this class is somewhat modelled after Java's primitive
 * data type wrappers. As for these classes, the XDR data type wrapper classes
 * follow the concept of values with no identity, so you are not allowed to
 * change the value after you've created a value object.
 *
 * @version $Revision: 125 $ $Date: 2011-03-24 02:24:05 +0000 (Thu, 24 Mar 2011) $ $State$ $Locker$
 * @author Harald Albrecht
 */
public class XdrVoid implements XdrAble {

    /**
     * Encodes -- that is: serializes -- a void into a XDR stream in
     * compliance to RFC 1832.
     *
     * @throws OncRpcException if an ONC/RPC error occurs.
     * @throws IOException if an I/O error occurs.
     */
    public void xdrEncode(XdrEncodingStream xdr)
           throws OncRpcException, IOException
    {
    }

    /**
     * Decodes -- that is: deserializes -- a void from a XDR stream in
     * compliance to RFC 1832.
     *
     * @throws OncRpcException if an ONC/RPC error occurs.
     * @throws IOException if an I/O error occurs.
     */
    public void xdrDecode(XdrDecodingStream xdr)
           throws OncRpcException, IOException
    {
    }

    /**
     * Static XdrVoid instance, which can be used in cases
     * where no data is to be serialized or deserialized but some ONC/RPC
     * function expects a reference to a XDR-able object.
     */
    public final static XdrVoid XDR_VOID = new XdrVoid();

}

// End of XdrVoid.java


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Krombholzia floccopus E.-J. Gilbert

### Remarks
null


text:
<?php

class bikes_AclException extends bikes_CoreException{

}