text:
enyo.kind({
    name: "LyricsView",
    kind: "VFlexBox",
    published: {
        "songArtist" : "",
        "songTitle" : "",
        "songLyrics": "",
    },
    components: [
        { kind: "Scrim", layoutKind: "VFlexLayout", align: "center", pack: "center", components: [ { kind: "SpinnerLarge" } ], },
        { kind: "FadeScroller", accelerated: true, flex:1, components:
            [
                { kind: "RowGroup", layoutKind: "HFlexLayout", components:
                    [
                        { name: "TitleLabel", flex: 1, content: "Title" },
                        { name: "ArtistLabel", content: "Artist" },
                    ]
                },
                { kind: "Group", components:
                    [
                        { name: "Lyrics", content: "Lyrics here" },
                    ]
                },
            ]
        },
        { kind: "Toolbar", components:
            [
                { kind: "GrabButton" },
            ]
        },
    ],
    songArtistChanged: function()
    {
        this.$.ArtistLabel.setContent(this.songArtist);
    },
    songTitleChanged: function()
    {
        this.$.TitleLabel.setContent(this.songTitle);
    },
    songLyricsChanged: function()
    {
        this.$.Lyrics.setContent(this.songLyrics);
    },
})


text:
<tool id="vsnp_build_tables" name="vSNP: build tables" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description></description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <expand macro="biopython_requirement"/>
        <requirement type="package" version="0.25.3">pandas</requirement>
        <expand macro="xlsxwriter_requirement"/>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
#import re
#set output_excel_dir = 'output_excel_dir'
#set input_type = $input_type_cond.input_type
mkdir $output_excel_dir &&
#if $input_type == "collection":
    #set input_newick_dir = 'input_newick_dir'
    mkdir $input_newick_dir &&
    #set input_json_avg_mq_dir = 'input_json_avg_mq_dir'
    mkdir $input_json_avg_mq_dir &&
    #set input_json_dir = 'input_json_dir'
    mkdir $input_json_dir &&
    #for $i in $input_type_cond.input_avg_mq_json_collection:
        #set file_name = $i.file_name
        #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
        ln -s '$file_name' '$input_json_avg_mq_dir/$identifier' &&
    #end for
    #for $i in $input_type_cond.input_snps_json_collection:
        #set file_name = $i.file_name
        #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
        ln -s '$file_name' '$input_json_dir/$identifier' &&
    #end for
    #for $i in $input_type_cond.input_newick_collection:
        #set file_name = $i.file_name
        #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
        ln -s '$file_name' '$input_newick_dir/$identifier' &&
    #end for
#end if
python '$__tool_directory__/vsnp_build_tables.py'
#if $input_type == "single":
    --input_avg_mq_json '$input_avg_mq_json'
    --input_snps_json '$input_snps_json'
    --input_newick '$input_newick'
#end if:
#if str($gbk_cond.gbk_param) == "yes":
    #set gbk_source_cond = $gbk_cond.gbk_source_cond
    #set gbk_source = $gbk_source_cond.gbk_source
    #if str($gbk_source) == "cached":
        --gbk_file '$gbk_source_cond.gbk_file.fields.path'
    #else:
        --gbk_file '$gbk_source_cond.gbk_file'
    #end if
#end if
--processes \${GALAXY_SLOTS:-8}
]]></command>
    <inputs>
        <conditional name="input_type_cond">
            <param name="input_type" type="select" label="Choose the category for the files to be analyzed">
                <option value="single" selected="true">Single files</option>
                <option value="collection">Collection of files</option>
            </param>
            <when value="single">
                <param name="input_snps_json" type="data" format="json" label="SNPs json file"/>
                <param name="input_avg_mq_json" type="data" format="json" label="Average MQ json file"/>
                <param name="input_newick" type="data" format="newick" label="Best-scoring ML tree file"/>
            </when>
            <when value="collection">
                <param name="input_snps_json_collection" format="json" type="data_collection" collection_type="list" label="Collection of SNPs json files"/>
                <param name="input_avg_mq_json_collection" format="json" type="data_collection" collection_type="list" label="Collection of average MQ json files"/>
                <param name="input_newick_collection" format="newick" type="data_collection" collection_type="list" label="Collection of best-scoring ML tree files"/>
            </when>
        </conditional>
        <conditional name="gbk_cond">
            <param name="gbk_param" type="select" label="Use Genbank file?">
                <option value="yes" selected="true">yes</option>
                <option value="no">No</option>
            </param>
            <when value="yes">
                <conditional name="gbk_source_cond">
                    <param name="gbk_source" type="select" label="Choose the source for the Genbank file">
                        <option value="cached" selected="true">locally cached</option>
                        <option value="history">from history</option>
                    </param>
                    <when value="cached">
                        <param name="gbk_file" type="select" label="Genbank file">
                            <options from_data_table="vsnp_genbank">
                                <validator type="no_options" message="A cached Genbank file is not available for the build associated with the selected average MQ json file"/>
                            </options>
                        </param>
                    </when>
                    <when value="history">
                        <param name="gbk_file" type="data" format="genbank" label="Genbank file"/>
                    </when>
                </conditional>
            </when>
            <when value="no"/>
        </conditional>
    </inputs>
    <outputs>
        <collection name="excel" type="list" format="xlsx" label="${tool.name} on ${on_string}">
            <discover_datasets pattern="(?P<designation>.+)\.(?P<ext>xlsx)" directory="output_excel_dir"/>
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="input_snps_json" value="input_snps_json.json" ftype="json" dbkey="89"/>
            <param name="input_newick" value="input_newick.newick" ftype="newick" dbkey="89"/>
            <param name="input_avg_mq_json" value="input_avg_mq_json.json" ftype="json" dbkey="89"/>
            <param name="gbk_param" value="no"/>
            <output_collection name="excel" type="list" count="2">
                <element name="cascade_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6853" delta="100"/>
                    </assert_contents>
                </element>
                <element name="sort_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6847" delta="100"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <test>
            <param name="input_type" value="collection"/>
            <param name="input_snps_json_collection">
                <collection type="list">
                    <element name="Mbovis-01_snps.json" value="Mbovis-01_snps.json" dbkey="89"/>
                    <element name="Mbovis-01D_snps.json" value="Mbovis-01D_snps.json" dbkey="89"/>
                    <element name="Mbovis-01D6_snps.json" value="Mbovis-01D6_snps.json" dbkey="89"/>
                </collection>
            </param>
            <param name="input_newick_collection">
                <collection type="list">
                    <element name="Mbovis-01_snps.newick" value="Mbovis-01_snps.newick" dbkey="89"/>
                    <element name="Mbovis-01D_snps.newick" value="Mbovis-01D_snps.newick" dbkey="89"/>
                    <element name="Mbovis-01D6_snps.newick" value="Mbovis-01D6_snps.newick" dbkey="89"/>
                </collection>
            </param>
            <param name="input_avg_mq_json_collection">
                <collection type="list">
                    <element name="Mbovis-01_snps.json" value="Mbovis-01_avg_mq.json" dbkey="89"/>
                    <element name="Mbovis-01D_snps.json" value="Mbovis-01D_avg_mq.json" dbkey="89"/>
                    <element name="Mbovis-01D6_snps.json" value="Mbovis-01D6_avg_mq.json" dbkey="89"/>
                </collection>
            </param>
            <param name="gbk_param" value="no"/>
            <output_collection name="excel" type="list" count="6">
                <element name="Mbovis-01D6_snps_cascade_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6854" delta="100"/>
                    </assert_contents>
                </element>
                <element name="Mbovis-01D6_snps_sort_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6847" delta="100"/>
                    </assert_contents>
                </element>
                <element name="Mbovis-01D_snps_cascade_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6854" delta="100"/>
                    </assert_contents>
                </element>
                <element name="Mbovis-01D_snps_sort_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6847" delta="100"/>
                    </assert_contents>
                </element>
                <element name="Mbovis-01_snps_cascade_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6853" delta="100"/>
                    </assert_contents>
                </element>
                <element name="Mbovis-01_snps_sort_table" ftype="xlsx">
                    <assert_contents>
                        <has_size value="6847" delta="100"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>
    <help>
**What it does**

Accepts a combination of single SNPs json, average MQ json and newick files (or associated collections of
each) to produce annotated SNPs tables in the form of Excel spreadsheets.  The SNPs json and average MQ json
files are typically produced by the **vSNP: get SNPs** tool and the newick files are typically produced by
the **Phyogenetic reconstruction with RaXML** tool.

The SNPs tables display closely related isolates and enables identification of mixed SNPs when multiple
bacterial strains are infecting an organism.  The table structure is shown below.  The columns identify the
genome location of the SNP calls and the isolates are contained within the rows.  The reference (or ancestral
strain if the reference is an outgroup) is listed across the top, identified as the "reference call".  SNPs
that are not highlighted will match the reference.  The map-quality row values are the average of the map
quality scores of each isolate  in that position.  These scores measure the confidence that the read has been
mapped to the correct location on the genome.  The maximum score possible is 60, and lower scores lessen the
confidence that the SNP was correctly identified.  The annotation of the position is provided at the bottom
of the table.

.. image:: table_description.png

SNPs are sorted according to their evolutionary age within the table.  The oldest SNPs (encompassing the most
isolates) are furthest to the left.  This sorting is somewhat crude - the intent is to improve readibility or
more easily match a related tree.

For a more detailed discussion, see the **Validating and correcting SNP calls** section of
the `vSNP documentation`_.

.. _vSNP documentation: https://github.com/USDA-VS/vSNP/blob/master/docs/detailed_usage.md

**Required Options**

 * **Choose the category for the files to be analyzed** -  select "Single files" or "Collections of files", then select the appropriate history items (single SNPs json, average MQ json and newick files, or collections of each) based on the selected option.
 * **Use Genbank file** - Select "yes" to annotate the tables using the information in the Genbank file.  Locally cached files, if available, provide the most widely used annotations, but more custom Genbank files can be chosen from the current history.
    </help>
    <expand macro="citations"/>
</tool>

redpajama_set_name: RedPajamaGithub


text:
using Microsoft.AspNet.Identity;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;

namespace AspNet.Identity.MongoDB {

	public class IdentityUserLogin {
		[BsonElement(FieldNames.LoginProvider)]
		public String LoginProvider { get; set; }
		[BsonElement(FieldNames.ProviderKey)]
		public String ProviderKey { get; set; }

		public static class FieldNames {
			public const String LoginProvider = "p";
			public const String ProviderKey = "k";
		}
	}
}


text:
package tools.xor.util;

import java.util.Collection;
import java.util.LinkedList;

public class UniqueIdentityArrayList<T> extends IdentityArrayList<T>
{
	/**
	 *
	 */
	private static final long serialVersionUID = -7633241118173209011L;

	@Override
	public boolean add(T e) {
		if (this.contains(e)) {
			return false;
		}
		else {
			return super.add(e);
		}
	}

	@Override
	public boolean addAll(Collection<? extends T> collection) {
		Collection<T> copy = new LinkedList<T>(collection);
		copy.removeAll(this);
		return super.addAll(copy);
	}

	@Override
	public boolean addAll(int index, Collection<? extends T> collection) {
		Collection<T> copy = new LinkedList<T>(collection);
		copy.removeAll(this);
		return super.addAll(index, copy);
	}

	@Override
	public void add(int index, T element) {
		if (this.contains(element)) {
			return;
		}
		else {
			super.add(index, element);
		}
	}
}


text:
class RuleTrailingWhitespace(object):
    NAME = "Trailing Whitespace"

    @staticmethod
    def get_description(line_numbers):
        result = "Trailing whitespace on line"
        if len(line_numbers)>1: result+="s"
        return result

    @staticmethod
    def rule(path,lines):
        result = []

        line_number = 1
        for line in lines:
            if len(line)>=2 and line[-2] in [" ","\t"]: #Note line[-1] is the newline
                result.append(line_number)
            line_number += 1

        return result


text:
using namespace mesos;
using namespace process;

using std::map;
using std::string;
using std::tuple;

using google::protobuf::Map;

using mesos::resource_provider::DiskProfileMapping;

namespace mesos {
namespace internal {
namespace storage {

bool operator==(
    const Map<string, string>& left,
    const Map<string, string>& right) {
  if (left.size() != right.size()) {
    return false;
  }

  typename Map<string, string>::const_iterator iterator = left.begin();
  while (iterator != left.end()) {
    if (right.count(iterator->first) != 1) {
      return false;
    }

    if (iterator->second != right.at(iterator->first)) {
      return false;
    }
  }

  return true;
}

UriDiskProfileAdaptor::UriDiskProfileAdaptor(const Flags& _flags)
  : flags(_flags),
    process(new UriDiskProfileAdaptorProcess(flags))
{
  spawn(process.get());
}

UriDiskProfileAdaptor::~UriDiskProfileAdaptor()
{
  terminate(process.get());
  wait(process.get());
}

Future<DiskProfileAdaptor::ProfileInfo> UriDiskProfileAdaptor::translate(
    const string& profile,
    const ResourceProviderInfo& resourceProviderInfo)
{
  return dispatch(
      process.get(),
      &UriDiskProfileAdaptorProcess::translate,
      profile,
      resourceProviderInfo);
}

Future<hashset<string>> UriDiskProfileAdaptor::watch(
    const hashset<string>& knownProfiles,
    const ResourceProviderInfo& resourceProviderInfo)
{
  return dispatch(
      process.get(),
      &UriDiskProfileAdaptorProcess::watch,
      knownProfiles,
      resourceProviderInfo);
}

UriDiskProfileAdaptorProcess::UriDiskProfileAdaptorProcess(
    const UriDiskProfileAdaptor::Flags& _flags)
  : ProcessBase(ID::generate("uri-disk-profile-adaptor")),
    flags(_flags),
    watchPromise(new Promise<Nothing>()) {}

void UriDiskProfileAdaptorProcess::initialize()
{
  poll();
}

Future<DiskProfileAdaptor::ProfileInfo>
  UriDiskProfileAdaptorProcess::translate(
      const string& profile,
      const ResourceProviderInfo& resourceProviderInfo)
{
  if (profileMatrix.count(profile) != 1) {
    return Failure("Profile '" + profile + "' not found");
  }

  const DiskProfileMapping::CSIManifest& manifest = profileMatrix.at(profile);

  // TODO(chhsiao): A storage resource provider may need to translate
  // a profile that no longer applies to it to replay a `CREATE_VOLUME`
  // or `CREATE_BLOCK` operation during recovery, so resource provider
  // selection is only done in `watch()` but not here. We should do the
  // selection once profiles are checkpointed in the resource provider.
  return DiskProfileAdaptor::ProfileInfo{
    manifest.volume_capabilities(),
    manifest.create_parameters()
  };
}

Future<hashset<string>> UriDiskProfileAdaptorProcess::watch(
    const hashset<string>& knownProfiles,
    const ResourceProviderInfo& resourceProviderInfo)
{
  // Calculate the new set of profiles for the resource provider.
  // TODO(chhsiao): A storage resource provider assumes that the new set
  // should be a superset of `knownProfiles`, so we bypass resource
  // provider selection if a profile is already known. We should do the
  // selection once profiles are checkpointed in the resource provider.
  hashset<string> newProfiles = knownProfiles;
  foreachpair (const string& profile,
               const DiskProfileMapping::CSIManifest& manifest,
               profileMatrix) {
    if (knownProfiles.contains(profile)) {
      continue;
    }

    if (isSelectedResourceProvider(manifest, resourceProviderInfo)) {
      newProfiles.insert(profile);
    }
  }

  if (newProfiles != knownProfiles) {
    return newProfiles;
  }

  // Wait for the next update if there is no change.
  return watchPromise->future()
    .then(defer(self(), &Self::watch, knownProfiles, resourceProviderInfo));
}

void UriDiskProfileAdaptorProcess::poll()
{
  // NOTE: The flags do not allow relative paths, so this is guaranteed to
  // be either 'http://' or 'https://'.
  if (strings::startsWith(flags.uri, "http")) {
    // NOTE: We already validated that this URI is parsable in the flags.
    Try<http::URL> url = http::URL::parse(flags.uri.string());
    CHECK_SOME(url);

    http::get(url.get())
      .onAny(defer(self(), [=](const Future<http::Response>& future) {
        if (future.isReady()) {
          // NOTE: We don't check the HTTP status code because we don't know
          // what potential codes are considered successful.
          _poll(future->body);
        } else if (future.isFailed()) {
          _poll(Error(future.failure()));
        } else {
          _poll(Error("Future discarded or abandoned"));
        }
      }));
  } else {
    _poll(os::read(flags.uri.string()));
  }
}

void UriDiskProfileAdaptorProcess::_poll(const Try<string>& fetched)
{
  if (fetched.isSome()) {
    Try<DiskProfileMapping> parsed = parseDiskProfileMapping(fetched.get());

    if (parsed.isSome()) {
      notify(parsed.get());
    } else {
      LOG(ERROR) << "Failed to parse result: " << parsed.error();
    }
  } else {
    LOG(WARNING) << "Failed to poll URI: " << fetched.error();
  }

  // TODO(josephw): Do we want to retry if polling fails and no polling
  // interval is set? Or perhaps we should exit in that case?
  if (flags.poll_interval.isSome()) {
    delay(flags.poll_interval.get(), self(), &Self::poll);
  }
}

void UriDiskProfileAdaptorProcess::notify(
    const DiskProfileMapping& parsed)
{
  bool hasErrors = false;

  foreachpair (const string& profile,
               const DiskProfileMapping::CSIManifest& manifest,
               profileMatrix) {
    if (parsed.profile_matrix().count(profile) != 1) {
      hasErrors = true;

      LOG(WARNING)
        << "Fetched profile mapping does not contain profile '" << profile
        << "'. The fetched mapping will be ignored entirely";
      continue;
    }

    bool matchingCapability =
      manifest.volume_capabilities() ==
        parsed.profile_matrix().at(profile).volume_capabilities();

    bool matchingParameters =
      manifest.create_parameters() ==
        parsed.profile_matrix().at(profile).create_parameters();

    if (!matchingCapability || !matchingParameters) {
      hasErrors = true;

      LOG(WARNING)
        << "Fetched profile mapping for profile '" << profile << "'"
        << " does not match earlier data."
        << " The fetched mapping will be ignored entirely";
    }
  }

  // When encountering a data conflict, this module assumes there is a
  // problem upstream (i.e. in the `--uri`). It is up to the operator
  // to notice and resolve this.
  if (hasErrors) {
    return;
  }

  // Profiles can only be added, so if the parsed data is the same size,
  // nothing has changed and no notifications need to be sent.
  if (parsed.profile_matrix().size() <= profileMatrix.size()) {
    return;
  }

  // The fetched mapping satisfies our invariants.

  // Save the protobuf as a map.
  profileMatrix = map<string, DiskProfileMapping::CSIManifest>(
      parsed.profile_matrix().begin(),
      parsed.profile_matrix().end());

  // Notify any watchers and then prepare a new promise for the next
  // iteration of polling.
  //
  // TODO(josephw): Delay this based on the `--max_random_wait` option.
  watchPromise->set(Nothing());
  watchPromise.reset(new Promise<Nothing>());

  LOG(INFO)
    << "Updated disk profile mapping to " << profileMatrix.size()
    << " total profiles";
}

} // namespace storage {
} // namespace internal {
} // namespace mesos {

mesos::modules::Module<DiskProfileAdaptor>
org_apache_mesos_UriDiskProfileAdaptor(
    MESOS_MODULE_API_VERSION,
    MESOS_VERSION,
    "Apache Mesos",
    "modules@mesos.apache.org",
    "URI Disk Profile Adaptor module.",
    nullptr,
    [](const Parameters& parameters) -> DiskProfileAdaptor* {
      // Convert `parameters` into a map.
      map<string, string> values;
      foreach (const Parameter& parameter, parameters.parameter()) {
        values[parameter.key()] = parameter.value();
      }

      // Load and validate flags from the map.
      mesos::internal::storage::UriDiskProfileAdaptor::Flags flags;
      Try<flags::Warnings> load = flags.load(values);

      if (load.isError()) {
        LOG(ERROR) << "Failed to parse parameters: " << load.error();
        return nullptr;
      }

      // Log any flag warnings.
      foreach (const flags::Warning& warning, load->warnings) {
        LOG(WARNING) << warning.message;
      }

      return new mesos::internal::storage::UriDiskProfileAdaptor(flags);
    });


text:
// PathVisio,
// a tool for data visualization and analysis using Biological Pathways
// Copyright 2006-2015 BiGCaT Bioinformatics
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package org.pathvisio.biopax3;

import java.awt.geom.Point2D;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;

import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.Namespace;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
import org.xml.sax.InputSource;

/**
 * A simple class for reading / writing BioPAX style sheets.
 * <p>
 * BioPAX style sheets store coordinates for entities in a BioPAX document.
 * In principle, you can assign coordinates to any biopax entity, but in practice they are
 * most useful on Protein and SmallMolecule instances.
 */
public class BpStyleSheet
{
	private Map<String, Point2D> map = new HashMap<String, Point2D>();

	/**
	 * Store a coordinate for a given entity.
	 * The coordinate should be the center of the entity representation.
	 * @param id entity identifier, this should correspond to the identifier of the BioPAX entity.
	 * @param x x coordinate.
	 * @param y y coordinate
	 */
	public void add (String id, double x, double y)
	{
		Point2D point = new Point2D.Double(x, y);
		add (id, point);
	}

	/**
	 * Store a coordinate for a given entity.
	 * The coordinate should be the center of the entity representation.
	 * @param id entity identifier, this should correspond to the identifier of the BioPAX entity.
	 * @param point 2D coordinate.
	 */
	public void add (String id, Point2D point)
	{
		map.put (id, point);
	}

	/**
	 * Retrieve a coordinate from a read document.
	 * @param id entity identifier
	 * @returns null if id is not found.
	 */
	public Point2D get (String id)
	{
		return map.get(id);
	}

	private static final Namespace NAMESPACE = Namespace.getNamespace("http://biopax.org/bpss/2009");
	private static final String ROOT_TAG = "bpss";
	private static final String COORD_TAG = "coordinate";
	private static final String ATTR_X = "x";
	private static final String ATTR_ID = "id";
	private static final String ATTR_Y = "y";

	/**
	 * Write stylesheet to file in bpss file format.
	 * @param out OutputStream to write to.
	 */
	public void write(OutputStream out) throws IOException
	{
		Document doc = new Document();
		Element root = new Element (ROOT_TAG, NAMESPACE);
		doc.setRootElement(root);

		for (String key : map.keySet())
		{
			Point2D point = map.get(key);
			Element coord = new Element(COORD_TAG, NAMESPACE);
			coord.setAttribute(ATTR_X, "" + point.getX());
			coord.setAttribute(ATTR_Y, "" + point.getY());
			coord.setAttribute(ATTR_ID, key);
			root.addContent(coord);
		}

		XMLOutputter xmlcode = new XMLOutputter(Format.getPrettyFormat());
		Format f = xmlcode.getFormat();
		f.setEncoding("UTF-8");
		f.setTextMode(Format.TextMode.PRESERVE);
		xmlcode.setFormat(f);

		//Send XML code to the outputstream
		xmlcode.output(doc, out);
	}

	/**
	 * Read stylesheet from file in bpss file format.
	 * @param in InputSource (InputStream, Reader or File).
	 */
	public static void read(InputSource in) throws JDOMException, IOException
	{
		SAXBuilder builder  = new SAXBuilder(false); // no validation when reading the xml file
		Document doc = builder.build(in);
		Element root = doc.getRootElement();
		Namespace ns = root.getNamespace();
		if (!(root.getName().equals(ROOT_TAG) && ns.equals(NAMESPACE)))
		{
			throw new IOException ("Wrong file format");
		}

//		for (Object o : root.getChildren(COORD_TAG))
//		{
//			Element coord = (Element)o;
//			String key = coord.getAttributeValue(ATTR_ID);
//			double x = Double.parseDouble(coord.getAttributeValue(ATTR_X));
//			double y = Double.parseDouble(coord.getAttributeValue(ATTR_Y));
//		}
	}
}


text:
#include "rawfile/RawFile.h"
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <string>
#include <numeric>

using namespace std;
using namespace pwiz;
using namespace pwiz::raw;

template <typename id_type>
void printValue(RawFilePtr& rawFile, id_type id)
{
    try
    {
        cout << "  " << rawFile->name(id) << ": " << rawFile->value(id) << endl;
    }
    catch (RawEgg& egg)
    {
        cout << egg.error() << endl;
    }
}

void testValues(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "VALUES\n";
    cout << "*************************************************************\n";

    cout << ValueID_Long_Count << " long values:\n";
    for (int i=0; i<ValueID_Long_Count; i++)
        printValue(rawFile, ValueID_Long(i));

    cout << ValueID_Double_Count << " double values:\n";
    for (int i=0; i<ValueID_Double_Count; i++)
        printValue(rawFile, ValueID_Double(i));

    cout << ValueID_String_Count << " string values:\n";
    for (int i=0; i<ValueID_String_Count; i++)
        printValue(rawFile, ValueID_String(i));
}

void testFilters(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "FILTERS\n";
    cout << "*************************************************************\n";

    auto_ptr<StringArray> sa = rawFile->getFilters();
    for (int i=0; i<sa->size(); i++)
        cout << i << ": " << sa->item(i) << endl;
}

void testMassList(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "MASS LISTS\n";
    cout << "*************************************************************\n";

    auto_ptr<MassList> massList = rawFile->getMassList(2,
                                                       "",
                                                       Cutoff_None,
                                                       0,
                                                       0,
                                                       false);
    cout << "scanNumber: " << massList->scanNumber() << endl;
    cout << "size: " << massList->size() << endl;
    cout << "centroidPeakWidth: " << massList->centroidPeakWidth() << endl;
    MassIntensityPair* mip = massList->data();
    for (int i=0; i<20; i++)
        cout << mip[i].mass << " " << mip[i].intensity << endl;
    for (int i=0; i<3; i++)
        cout << ".\n";
    for (int i=massList->size()-20; i<massList->size(); i++)
        cout << mip[i].mass << " " << mip[i].intensity << endl;
}

void testRTConversions(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "RT CONVERSION TEST\n";
    cout << "*************************************************************\n";

    cout << "Start time: " << rawFile->value(StartTime) << endl;
    cout << "End time: " << rawFile->value(EndTime) << endl;
    cout << endl;

    cout << "scanNumber -> RT:\n";
    for (int i=1; i<=15; i++)
        cout << i << " -> " << rawFile->rt(i) << endl;

    cout << "\nRT -> scanNumber\n";
    double d = rawFile->rt(1);
    for (int i=0; i<=10; i++, d+=.01)
        cout << d << " -> " << rawFile->scanNumber(d) << endl;
}

void printScanInfo(RawFilePtr& rawFile, int scanNumber, bool outputLogs = false)
{
    auto_ptr<ScanInfo> scanInfo = rawFile->getScanInfo(scanNumber);
    cout << boolalpha;
    cout << "scanNumber: " << scanInfo->scanNumber() << endl;
    cout << "filter: " << scanInfo->filter() << endl;
    cout << "isProfileScan: " << scanInfo->isProfileScan() << endl;
    cout << "isCentroidScan: " << scanInfo->isCentroidScan() << endl;
    cout << "packetCount: " << scanInfo->packetCount() << endl;
    cout << "startTime: " << scanInfo->startTime() << endl;
    cout << "lowMass: " << scanInfo->lowMass() << endl;
    cout << "highMass: " << scanInfo->highMass() << endl;
    cout << "totalIonCurrent: " << scanInfo->totalIonCurrent() << endl;
    cout << "basePeakMass: " << scanInfo->basePeakMass() << endl;
    cout << "basePeakIntensity: " << scanInfo->basePeakIntensity() << endl;
    cout << "channelCount: " << scanInfo->channelCount() << endl;
    cout << "isUniformTime: " << scanInfo->isUniformTime() << endl;
    cout << "frequency: " << scanInfo->frequency() << endl;

    cout << "parentCount: " << scanInfo->parentCount() << endl;
    for (int i=0; i<scanInfo->parentCount(); i++)
        cout << "  <" << scanInfo->parentMass(i) << ", " << scanInfo->parentEnergy(i) << ">\n";

    if (outputLogs)
    {
        cout << "\nStatus Log (" << scanInfo->statusLogSize() << " entries, RT: " << scanInfo->statusLogRT() << "):\n";
        for (int i=0; i<scanInfo->statusLogSize(); i++)
            cout << i << ": " << scanInfo->statusLogLabel(i) << " " << scanInfo->statusLogValue(i) << endl;

        cout << "\nTrailer Extra (" << scanInfo->trailerExtraSize() << " entries):\n";
        for (int i=0; i<scanInfo->trailerExtraSize(); i++)
            cout << i << ": " << scanInfo->trailerExtraLabel(i) << " " << scanInfo->trailerExtraValue(i) << endl;
    }

    cout << endl;
}

void testScanInfo(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "SCAN INFO\n";
    cout << "*************************************************************\n";

	long scanCount = rawFile->value(raw::NumSpectra);
	cout << "Scan count: " << scanCount << endl;

	for (int i=1; i<=scanCount; i++)
		printScanInfo(rawFile, i, true);
}

void testSeqRow(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "SEQUENCE ROW\n";
    cout << "*************************************************************\n";

    auto_ptr<LabelValueArray> info = rawFile->getSequenceRowUserInfo();
    for (int i=0; i<info->size(); i++)
        cout << info->label(i) << ": " << info->value(i) << endl;
}

const char* controllerTypeText(ControllerType type)
{
    switch(type)
    {
        case Controller_None:
            return "Controller_None";
        case Controller_MS:
            return "Controller_MS";
        case Controller_Analog:
            return "Controller_Analog";
        case Controller_ADCard:
            return "Controller_ADCard";
        case Controller_PDA:
            return "Controller_PDA";
        case Controller_UV:
            return "Controller_UV";
        default:
            return "booger";
    }
}

void testControllers(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "CONTROLLERS\n";
    cout << "*************************************************************\n";

    cout << "Controllers:\n";
    long count = rawFile->value(raw::NumberOfControllers);
    for (int i=0; i<count; i++)
        cout << i << ": " << controllerTypeText(rawFile->getControllerType(i)) << endl;

    ControllerInfo info = rawFile->getCurrentController();
    cout << "Current Controller: ";
        cout << controllerTypeText(info.type) << " " << info.controllerNumber << endl;
}

void testErrorLog(RawFilePtr& rawFile)
{
    // TODO: test with a RAW file with Error Log Items!!

    cout << "*************************************************************\n";
    cout << "ERROR LOG\n";
    cout << "*************************************************************\n";

    long count = rawFile->value(raw::NumErrorLog);
    cout << "Error Log (" << count << " items):\n";
    for (int i=0; i<count; i++)
    {
        ErrorLogItem item = rawFile->getErrorLogItem(i);
        cout << item.rt << ": " << item.errorMessage << endl;
    }
}

void testTuneData(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "TUNE DATA\n";
    cout << "*************************************************************\n";

    long count = rawFile->value(raw::NumTuneData);
    cout << "Tune Data (" << count << " entries):" << endl;

    // segmentNumber seems to be a 0-based index;
    // but the docs say 1-based...

    auto_ptr<LabelValueArray> a(rawFile->getTuneData(0));
    for (int i=0; i<a->size(); i++)
        cout << a->label(i) << " " << a->value(i) << endl;
}

void testInstrumentMethods(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "INSTRUMENT METHODS\n";
    cout << "*************************************************************\n";

    auto_ptr<LabelValueArray> a(rawFile->getInstrumentMethods());
    for (int i=0; i<a->size(); i++)
    {
        cout << "METHOD " << i << ": " << a->label(i) << endl;
        cout << a->value(i) << endl;
    }

    auto_ptr<StringArray> b(rawFile->getInstrumentChannelLabels());
    cout << "Instrument Channel Labels (" << b->size() << " entries):\n";
    for (int i=0; i<b->size(); i++)
        cout << b->item(i) << endl;
}

void testChromatogramData(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "CHROMATOGRAM DATA\n";
    cout << "*************************************************************\n";

    auto_ptr<ChromatogramData> a(rawFile->getChromatogramData(1, Operator_None, 0,
                                                              "", "", "",
                                                              0, 0, 0,
                                                              Smoothing_None, 0));
    cout << "Chromatogram Data:\n";
    cout << "size: " << a->size() << endl;

    TimeIntensityPair* p = a->data();
    for (int i=0; i<20; i++, p++)
        cout << p->time << "\t" << p->intensity << endl;
}

void testAverageMassList(RawFilePtr& rawFile)
{
    cout << "*************************************************************\n";
    cout << "AVERAGE MASS LISTS\n";
    cout << "*************************************************************\n";

    cout << "Average Mass List:\n";
    auto_ptr<MassList> massList(rawFile->getAverageMassList(1, 10,
                                                     0, 0,
                                                     0, 0,
                                                     "",
                                                     Cutoff_None,
                                                     0,
                                                     0,
                                                     false));
    cout << "scanNumber: " << massList->scanNumber() << endl;
    cout << "size: " << massList->size() << endl;
    cout << "centroidPeakWidth: " << massList->centroidPeakWidth() << endl;
    MassIntensityPair* mip = massList->data();
    for (int i=0; i<20; i++)
        cout << mip[i].mass << " " << mip[i].intensity << endl;
    for (int i=0; i<3; i++)
        cout << ".\n";
    for (int i=massList->size()-20; i<massList->size(); i++)
        cout << mip[i].mass << " " << mip[i].intensity << endl;
}

void runTest(void (*f)(RawFilePtr&), RawFilePtr& rawFile)
{
    try
    {
        f(rawFile);
    }
    catch (RawEgg& egg)
    {
        cout << "Test aborted: " << egg.error() << endl;
    }
}

int test(RawFilePtr& rawfile, const vector<string>& args)
{
    try
    {
        cout << "File: " << rawfile->value(raw::FileName) << endl;
        cout << "Creation Date: " << rawfile->getCreationDate() << endl;

        runTest(testValues, rawfile);
        runTest(testFilters, rawfile);
        runTest(testMassList, rawfile);
        runTest(testRTConversions, rawfile);
        runTest(testScanInfo, rawfile);
        runTest(testSeqRow, rawfile);
        runTest(testControllers, rawfile);
        runTest(testErrorLog, rawfile);
        runTest(testTuneData, rawfile);
        runTest(testInstrumentMethods, rawfile);
        runTest(testChromatogramData, rawfile);
        runTest(testAverageMassList, rawfile);
    }
    catch (RawEgg& egg)
    {
        cout << egg.error() << endl;
    }

    cout << endl;
    return 0;
}

typedef int (*Command)(RawFilePtr& rawfile, const vector<string>& args);
map<string, Command> commands_;
string usage_;

int scaninfo(RawFilePtr& rawfile, const vector<string>& args)
{
    if (args.size() != 1)
        throw runtime_error(usage_);

    int scanNumber = atoi(args[0].c_str());

    try
    {
        cout << "File: " << rawfile->value(raw::FileName) << endl;
        cout << "Creation Date: " << rawfile->getCreationDate() << endl;

        cout << endl;

        printScanInfo(rawfile, scanNumber, true);
        return 0;
    }
    catch (RawEgg& egg)
    {
        cout << egg.error() << endl;
        return 1;
    }
}

int scandata(RawFilePtr& rawfile, const vector<string>& args)
{
    if (args.size()<1 || args.size()>2)
        throw runtime_error(usage_);

    int scanNumber = atoi(args[0].c_str());
	bool centroid = args.size()==2 && args[1]=="centroid" ? true : false;

	cout << "# " << rawfile->value(raw::FileName) << endl;
	cout << "# Scan " << scanNumber << endl;

	auto_ptr<MassList> massList = rawfile->getMassList(scanNumber,"", raw::Cutoff_None, 0, 0, centroid);

	int massCount = massList->size();
	cout << "# mass count: " << massCount << endl;
	if (centroid) cout << "# centroid\n";
	cout << "#\n";

	cout.precision(10);

	MassIntensityPair* p = massList->data();
	for (int i=0; i<massCount; i++, p++)
		cout << p->mass << " " << p->intensity << endl;

    return 0;
}

int trailer(RawFilePtr& rawfile, const vector<string>& args)
{
    if (args.size() != 2)
        throw runtime_error(usage_);

    int scanNumber = atoi(args[0].c_str());
    const string& name = args[1];

    auto_ptr<ScanInfo> scanInfo = rawfile->getScanInfo(scanNumber);
    string value = scanInfo->trailerExtraValue(name);

    if (!value.empty())
        cout << value << endl;
    else
        cout << "<no value>\n";

    // if we know it's a double and need the precison, use:
    //   scanInfo->trailerExtraValueDouble(name)

    return 0;
}

double highMassNearTargetInPreviousScan(RawFilePtr& rawfile,
                                        int scanNumber,
                                        double massTarget,
                                        string filterPrefix)
{
    auto_ptr<MassList> massList = rawfile->getMassList(scanNumber,
                                                       filterPrefix + " !d",
                                                       Cutoff_None, 0, 0, false,
                                                       MassList_Previous);
    double maxIntensity = 0;
    double maxMass = 0;
    MassIntensityPair* p = massList->data();

    for (int i=0; i<massList->size(); i++, p++)
    {
        if (p->mass < massTarget-.05)
            continue;

        if (p->mass > massTarget+.05)
            break;

        if (maxIntensity < p->intensity)
        {
            maxIntensity = p->intensity;
            maxMass = p->mass;
        }
    }

    return maxMass;
}

double calculateMean(const vector<double>& values)
{
    if (values.empty()) return 0;
    return accumulate(values.begin(), values.end(), 0.)/values.size();
}

double calculateRange(const vector<double>& values)
{
    if (values.empty()) return 0;

    double min = 100000.;
    double max = 0;

    for (vector<double>::const_iterator it=values.begin(); it!=values.end(); ++it)
    {
        if (min > *it) min = *it;
        if (max < *it) max = *it;
    }

    return max-min;
}

int precursors(RawFilePtr& rawfile, const vector<string>& args)
{
    cout << "#scan type ms  z  filter   trailer      itMax       ftMax       mean     range\n";

    double maxRange = 0;

	int scanCount = rawfile->value(raw::NumSpectra);
    for (int scanNumber=1; scanNumber<=scanCount; scanNumber++)
    {
        auto_ptr<ScanInfo> scanInfo = rawfile->getScanInfo(scanNumber);

        MassAnalyzerType massAnalyzerType = scanInfo->massAnalyzerType();
        int msLevel = scanInfo->msLevel();
        if (msLevel == 1) continue;

        double filterParentMass = scanInfo->parentCount() ? scanInfo->parentMass(0) : 0;
        double trailerParentMass = scanInfo->trailerExtraValueDouble("Monoisotopic M/Z:");
        int chargeState = atoi(scanInfo->trailerExtraValue("Charge State:").c_str());

        double itParentMass = filterParentMass ?
            highMassNearTargetInPreviousScan(rawfile, scanNumber, filterParentMass, "ITMS") : 0;

        double ftParentMass = filterParentMass ?
            highMassNearTargetInPreviousScan(rawfile, scanNumber, filterParentMass, "FTMS") : 0;

        vector<double> values;
        if (filterParentMass) values.push_back(filterParentMass);
        if (trailerParentMass) values.push_back(trailerParentMass);
        if (itParentMass) values.push_back(itParentMass);
        if (ftParentMass) values.push_back(ftParentMass);

        double mean = calculateMean(values);
        double range = calculateRange(values);
        if (maxRange < range) maxRange = range;

        cout << setw(5) << scanNumber << " "
             << toString(massAnalyzerType) << " "
             << "ms" << msLevel << " "
             << chargeState << " "
             << fixed << setprecision(2) << setw(7) << filterParentMass << " "
             << fixed << setprecision(6) << setw(11) << trailerParentMass << " "
             << fixed << setprecision(6) << setw(11) << itParentMass << " "
             << fixed << setprecision(6) << setw(11) << ftParentMass << " "
             << fixed << setprecision(6) << setw(11) << mean << " "
             << fixed << setprecision(3) << setw(5) << range << " "
             << endl;
    }

    cout << "max range: " << maxRange << endl;

    return 0;
}

int readbacks(RawFilePtr& rawfile, const vector<string>& args)
{
    const string delim = !args.empty()&&args[0]=="usv" ? "_" : "\t";

    cout << "scanNumber" << delim
         << "scanEvent" << delim
         << "massAnalyzer" << delim
         << "msLevel" << delim
         << "retentionTime" << delim;

	int scanCount = rawfile->value(raw::NumSpectra);
    for (int scanNumber=1; scanNumber<=scanCount; scanNumber++)
    {
        auto_ptr<ScanInfo> scanInfo = rawfile->getScanInfo(scanNumber);

        if (scanNumber == 1)
        {
            // finish header line

            for (int i=0; i<scanInfo->statusLogSize(); i++)
                cout << scanInfo->statusLogLabel(i) << delim;

            for (int i=0; i<scanInfo->trailerExtraSize(); i++)
                cout << scanInfo->trailerExtraLabel(i) << delim;

            cout << endl;

            // second header line

            for (int i=0; i<5; i++)
                cout << delim;

            for (int i=0; i<scanInfo->statusLogSize(); i++)
                cout << "status " << i << delim;

            for (int i=0; i<scanInfo->trailerExtraSize(); i++)
                cout << "trailer " << i << delim;

            cout << endl;
        }

        int scanEvent = atoi(scanInfo->trailerExtraValue("Scan Event:").c_str());
        double rt = scanInfo->startTime();
        string anal = toString(scanInfo->massAnalyzerType());
        int msLevel = scanInfo->msLevel();

        cout << setprecision(4) << fixed
             << scanNumber << delim
             << scanEvent << delim
             << anal << delim
             << "ms" << msLevel << delim
             << rt << delim;

        for (int i=0; i<scanInfo->statusLogSize(); i++)
            cout << scanInfo->statusLogValue(i) << delim;

        for (int i=0; i<scanInfo->trailerExtraSize(); i++)
            cout << scanInfo->trailerExtraValue(i) << delim;

        cout << endl;
     }

    return 0;
}

void initialize()
{
    usage_ += "Usage: rawdump filename command [args]\n";
    usage_ += "Commands:\n";

    commands_["scaninfo"] = scaninfo;
    usage_ += "    scaninfo N (output info for scan N)\n";

    commands_["scandata"] = scandata;
    usage_ += "    scandata N [centroid] (output data for scan N)\n";

    commands_["trailer"] = trailer;
    usage_ += "    trailer N name (output trailer extra value for specified name in scan N)\n";

    commands_["precursors"] = precursors;
    usage_ += "    precursors (outputs table with precursor info)\n";

    commands_["readbacks"] = readbacks;
    usage_ += "    readbacks (outputs readbacks table)\n";

    commands_["test"] = test;
    usage_ += "    test (dumps a bunch of info, for testing RawFile.dll)";
}

int main(int argc, char* argv[])
{
    try
    {
        initialize();

        if (argc < 3)
            throw runtime_error(usage_);

        const string& filename = argv[1];
        const string& commandName = argv[2];

        Command command = commands_[commandName];
        if (!command)
            throw runtime_error(usage_);

        vector<string> args;
        copy(argv+3, argv+argc, back_inserter(args));

        RawFileLibrary library;

        RawFilePtr rawfile(filename);
        rawfile->setCurrentController(Controller_MS, 1);

        return command(rawfile, args);
    }
    catch (RawEgg& egg)
    {
        cout << egg.error() << endl;
        return 1;
    }
    catch (exception& e)
    {
        cout << e.what() << endl;
        return 1;
    }
    catch (...)
    {
        cout << "Unknown error.\n";
        return 1;
    }
}


text:
from __future__ import absolute_import

import os
import unittest

import redisext.backend.redis

REDIS_HOST = os.getenv('REDIS_HOST', 'localhost')
REDIS_PORT = os.getenv('REDIS_PORT', 6379)
REDIS_DB = os.getenv('REDIS_DB', 0)

class Connection(redisext.backend.redis.Connection):
    MASTER = {'host': REDIS_HOST, 'port': REDIS_PORT, 'db': REDIS_DB}

class TestCase(unittest.TestCase):
    def tearDown(self):
        Connection.connect_to_master().flushdb()

class KeyTestCase(TestCase):
    STORAGE = None

    def test_keys(self):
        key, data = 'key', [{'key': 'value'}, 1, 'string', (1, 2, 3)]
        self.STORAGE(key).push(data)
        self.assertEqual(self.STORAGE(key).pop(), data)


text:
var Backbone = require('backbone');
var TwitterCategoryModel = require('./twitter_category_model');

// Twitter categories collection

module.exports = Backbone.Collection.extend({
  model: TwitterCategoryModel
});


text:
import { combineReducers } from 'redux'
import jumbles from './jumbles/reducer'

export default combineReducers({
  jumbles,
})


text:
using System;
using System.Collections.Generic;

namespace Dnn.PersonaBar.Pages.Services.Dto
{
    public class DnnModulesRequest
    {
        public Guid UniqueId { get; set; }
        public List<DnnModuleDto> Modules { get; set; }
    }
}


text:
/** \file comstl/error/exceptions.hpp
 *
 * \brief [C++ only] Definition of the comstl::com_exception and
 *   comstl::variant_type_exception exception classes, and the
 *   comstl::exception_policy_base exception policy class (and the
 *   typedefs comstl::com_exception_policy and
 *   comstl::variant_type_exception_policy)
 *   (\ref group__library__error "Error" Library).
 */

#ifndef COMSTL_INCL_COMSTL_ERROR_HPP_EXCEPTIONS
#define COMSTL_INCL_COMSTL_ERROR_HPP_EXCEPTIONS

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define COMSTL_VER_COMSTL_ERROR_HPP_EXCEPTIONS_MAJOR       2
# define COMSTL_VER_COMSTL_ERROR_HPP_EXCEPTIONS_MINOR       2
# define COMSTL_VER_COMSTL_ERROR_HPP_EXCEPTIONS_REVISION    1
# define COMSTL_VER_COMSTL_ERROR_HPP_EXCEPTIONS_EDIT        44
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
 * Compatibility
 */

/*
[DocumentationStatus:Ready]
 */

/* /////////////////////////////////////////////////////////////////////////
 * Includes
 */

#ifndef COMSTL_INCL_COMSTL_H_COMSTL
# include <comstl/comstl.h>
#endif /* !COMSTL_INCL_COMSTL_H_COMSTL */
#ifndef STLSOFT_INCL_STLSOFT_ERROR_HPP_PROJECT_EXCEPTION
# include <stlsoft/error/project_exception.hpp>
#endif /* !STLSOFT_INCL_STLSOFT_ERROR_HPP_PROJECT_EXCEPTION */
#ifndef STLSOFT_INCL_STLSOFT_UTIL_HPP_EXCEPTION_STRING
# include <stlsoft/util/exception_string.hpp>
#endif /* !STLSOFT_INCL_STLSOFT_UTIL_HPP_EXCEPTION_STRING */

/* /////////////////////////////////////////////////////////////////////////
 * Namespace
 */

#ifndef _COMSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
     defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
/* There is no stlsoft namespace, so must define ::comstl */
namespace comstl
{
# else
/* Define stlsoft::comstl_project */

namespace stlsoft
{

namespace comstl_project
{

# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_COMSTL_NO_NAMESPACE */

/* /////////////////////////////////////////////////////////////////////////
 * Classes
 */

/** \brief General exception class for COM-related failures.
 *
 * \ingroup group__library__error
 *
 */
class com_exception
    : public stlsoft_ns_qual(project_exception)
{
/// \name Types
/// @{
private:
    typedef stlsoft_ns_qual(exception_string)   string_type;
public:
    typedef com_exception                       class_type;
    typedef stlsoft_ns_qual(project_exception)  parent_class_type;
/// @}

/// \name Construction
/// @{
public:
    /// \brief Constructs an instance from the given result code
    ///
    /// \param hr The result code associated with the exception
    ss_explicit_k com_exception(HRESULT hr)
        : m_reason()
        , m_hr(hr)
    {}
    /// \brief Constructs an instance from the given message string and result code
    ///
    /// \param reason The message code associated with the exception
    /// \param hr The result code associated with the exception
    com_exception(char const* reason, HRESULT hr)
        : m_reason((NULL == reason) ? "" : reason)
        , m_hr(hr)
    {}
    /// \brief Destructor
    ///
    /// \note This does not do have any implementation, but is required to placate
    /// the Comeau and GCC compilers, which otherwise complain about mismatched
    /// exception specifications between this class and its parent
    virtual ~com_exception() stlsoft_throw_0()
    {}
/// @}

/// \name Accessors
/// @{
public:
    virtual char const* what() const stlsoft_throw_0()
    {
        return m_reason.empty() ? this->real_what_(): m_reason.c_str();
    }

    /// \brief The error code associated with the exception
    HRESULT get_hr() const
    {
        return m_hr;
    }

    /// [DEPRECATED]
    ///
    /// \deprecated Use get_hr() instead
    HRESULT hr() const
    {
        return m_hr;
    }
/// @}

/// \name Implementation
/// @{
private:
    virtual char const* real_what_() const throw()
    {
        return "COM exception";
    }
/// @}

/// \name Members
/// @{
private:
    string_type m_reason;
    HRESULT     m_hr;
/// @}

/// \name Not to be implemented
/// @{
private:
    class_type& operator =(class_type const&);
/// @}
};

/** \brief Indicates variant type mismatches.
 *
 * \ingroup group__library__error
 *
 * \remarks This is thrown by comstl::safearray_sequence on variant type
 *   mismatches.
 */
class variant_type_exception
    : public com_exception
{
public:
    typedef com_exception           parent_class_type;
    typedef variant_type_exception  class_type;

/// \name Construction
/// @{
public:
    ss_explicit_k variant_type_exception(HRESULT hr)
        : parent_class_type(hr)
    {}
    variant_type_exception(char const* reason, HRESULT hr)
        : parent_class_type(reason, hr)
    {}
    /// \brief Destructor
    ///
    /// \note This does not do have any implementation, but is required to placate
    /// the Comeau and GCC compilers, which otherwise complain about mismatched
    /// exception specifications between this class and its parent
    virtual ~variant_type_exception() stlsoft_throw_0()
    {}
/// @}

/// \name Implementation
/// @{
private:
    virtual char const* real_what_() const throw()
    {
        return "VARIANT type exception";
    }
/// @}
};

/* /////////////////////////////////////////////////////////////////////////
 * Policies
 */

/** \brief Policy adaptor template for exception throwing
 *
 * \ingroup group__library__error
 *
 */
template <ss_typename_param_k X>
// [[synesis:class:exception-policy: exception_policy_base]]
struct exception_policy_base
{
/// \name Member Types
/// @{
public:
    /// The thrown type
    typedef X       thrown_type;
/// @}

/// \name Operators
/// @{
public:
    /// Function call operator, taking no parameters
    void operator ()() const
    {
        STLSOFT_THROW_X(thrown_type(::GetLastError()));
    }
    /// Function call operator, taking one parameter
    void operator ()(HRESULT hr) const
    {
        STLSOFT_THROW_X(thrown_type(hr));
    }
    /// Function call operator, taking two parameters
    void operator ()(char const* reason, HRESULT hr) const
    {
        STLSOFT_THROW_X(thrown_type(reason, hr));
    }
/// @}
};

/** \brief The policy class, which throws a com_exception class.
 *
 * \ingroup group__library__error
 *
 */
typedef exception_policy_base<com_exception>            com_exception_policy;

/** \brief The policy class, which throws a com_exception class.
 *
 * \ingroup group__library__error
 *
 */
typedef exception_policy_base<variant_type_exception>   variant_type_exception_policy;

////////////////////////////////////////////////////////////////////////////
// Unit-testing

#ifdef STLSOFT_UNITTEST
# include "./unittest/exceptions_unittest_.h"
#endif /* STLSOFT_UNITTEST */

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

#ifndef _COMSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
     defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} // namespace comstl
# else
} // namespace comstl_project
} // namespace stlsoft
# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_COMSTL_NO_NAMESPACE */

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

#endif /* !COMSTL_INCL_COMSTL_ERROR_HPP_EXCEPTIONS */

/* ///////////////////////////// end of file //////////////////////////// */


text:
grafics::grafics()
{

}

//grafics::grafics(simFunction func)
//{

//}

//grafics::grafics(graphicProperties prop)
//{

//}

grafics::grafics(graphicProperties prop, simFunction func)
{
    this->prop.setGridStatus          (prop.getGridStatus());
    this->prop.setGraphicDataSize     (prop.getGraphicDataSize());
    this->prop.setGraphicXposition    (prop.getGraphicXposition());
    this->prop.setGraphicYposition    (prop.getGraphicYposition());
    this->prop.setNumberOfClicks      (prop.getNumberOfClicks());
    this->prop.setLastMotionPosition  (prop.getLastXMotionPosition(),
                                       prop.getLastYMotionPosition());
    this->prop.setLimits              (prop.getXLimitLeft(), prop.getXLimitRight(),
                                       prop.getYLimitDown(), prop.getYLimitUp());
    this->prop.setMotionOcurrency     (prop.getMotionOcurrency());

    this->func.SetInputData           (func.GetInputData());
    this->func.SetOutputData          (func.GetOutputData());
    this->func.SetDataLimits          (func.GetDataMinLimit(),
                                       func.GetDataMaxLimit());
    this->func.SetDataStep            (func.GetDataStep());

    this->func.SetFunctionCall        (func.GetFunctionCall());

}

//grafics::grafics(double (*FunctionToCall)(double), double lMin, double lMax, double step)
//{
//    this->FunctionToCall = FunctionToCall;
//    this->lMax = lMax;
//    this->lMin = lMin;
//    this->step = step;
//    this->GraphicDataSize = 1;
//    this->GraphicXposition = 0;
//    this->GraphicYposition = 0;
//    this->NumberOfClicks = 0;
//    this->LastMotionXPosition = 0;
//    this->LastMotionYPosition = 0;
//    this->GraphicXLimit_Left = 0;
//    this->GraphicXLimit_Rigth = 40;
//    this->GraphicYLimit_Down = 0;
//    this->GraphicYLimit_Up = 40;
//    this->MotionOcurrency = false;
//}

void grafics::clearDraw()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);  //clears the colour and depth buffers
    glClearColor (1.0, 1.0, 1.0, 0.0);
    glPushMatrix();     	//saves the current matrix on the top of the matrix stack
    glTranslatef(0,0,-100); //translates the current matrix 0 in x, 0 in y and -100 in z

    glColor3f(0.0,0.0,0.0);
}

void grafics::DrawTitle()
{
    glRasterPos2f(prop.getXLimitRight()- 35, prop.getYLimitUp()+2);
    glColor4f(0.0f, 0.0f, 1.0f, 1.0f);
    glutBitmapString(GLUT_BITMAP_HELVETICA_18,(const unsigned char*)prop.getTitle().c_str());
}

void grafics::DrawAxis(double ZeroXPosition, double ZeroYPosition)
{
    if(prop.isInXLimit(ZeroXPosition))
    {
        glBegin(GL_LINES);
            glVertex2f(ZeroXPosition, prop.getYLimitDown());
            glVertex2f(ZeroXPosition, prop.getYLimitUp());
        glEnd();
    }
    if(prop.isInYLimit(ZeroYPosition))
    {
        glBegin(GL_LINES);
            glVertex2f(prop.getXLimitLeft(),  ZeroYPosition);
            glVertex2f(prop.getXLimitRight(), ZeroYPosition);
        glEnd();
    }

}

void grafics::DrawGraphic()
{
    double ZeroXFunction = prop.getXLimitLeft(),
           ZeroYFunction = ((prop.getYLimitUp() + prop.getYLimitDown())/2);
    Matrix<double> NormInput, NormOutput;

    NormInput  = prop.getGraphicDataSize()*func.GetInputData().normalize(prop.getXLimitRight(), prop.getXLimitLeft()) - prop.getGraphicXposition();
    NormOutput = prop.getGraphicDataSize()*func.GetOutputData().normalize(prop.getYLimitUp(),   prop.getYLimitDown()) + prop.getGraphicYposition();

        for (int i = 1; i <= NormInput.getRows(); i++)
        {
            glColor3f(double(i-1),double(i-1)/4,double(i-1)/2);
            glBegin(GL_LINE_STRIP);
            for(int j = 1; j <= NormInput.getCols(); j++)
            {
                if(j < NormInput.getCols())
                {
                    if((func.GetInputData()(i,j)  > 0.0 && func.GetInputData()(i,j+1)  < 0.0) || (func.GetInputData()(i,j)  < 0.0 && func.GetInputData()(i,j+1)  > 0.0))
                        ZeroYFunction = (NormInput(i,j) + NormInput(i,j+1))/2;
                    else if(func.GetInputData()(i,j)  == 0.0)
                        ZeroYFunction = NormInput(i,j);
                    if((func.GetOutputData()(i,j)  > 0.0 && func.GetOutputData()(i,j+1)  < 0.0) || (func.GetOutputData()(i,j)  < 0.0 && func.GetOutputData()(i,j+1)  > 0.0))
                        ZeroXFunction = (NormOutput(i,j)+NormOutput(i,j+1))/2;
                    else if(func.GetOutputData()(i,j)  == 0.0)
                        ZeroXFunction = NormOutput(i,j);
                }

                if(prop.isInGraphicRegion(NormInput(i,j), NormOutput(i,j)))
                    glVertex2f(NormInput(i,j), NormOutput(i,j));
            }
            glEnd();
        }

    glColor3f(0.0,0.0,0.0);
    this->DrawAxis(ZeroXFunction, ZeroYFunction);
}

void grafics::DrawFunction()
{
    if(func.GetFunctionCall() != NULL)
        func.GenerateDataFunction();
    DrawGraphic();
}

void grafics::DrawGrid()
{
    double GridXDistance = (abs(prop.getXLimitRight() - prop.getXLimitLeft())/abs(prop.getXLimitRight()));
    double GridYDistance = (abs(prop.getYLimitUp() - prop.getYLimitDown())/abs(prop.getYLimitUp()));

    glPointSize(1.0);
    glBegin(GL_POINTS);
        for (double i = prop.getXLimitLeft(); i <= prop.getXLimitRight(); i += GridXDistance)
            for (double j = prop.getYLimitDown(); j <= prop.getYLimitUp() ; j += GridYDistance)
                glVertex2f(i, j);
    glEnd();
    glPointSize(3.0);
}

void grafics::display()
{
    this->clearDraw();
    this->DrawTitle();
    this->DrawFunction();
    if(prop.getGridStatus() == true)
        this->DrawGrid();

    glPopMatrix();          //retrieves our saved matrix from the top of the matrix stack
    glutSwapBuffers();      //swaps the front and back buffers
}

void grafics::MouseClickProcess(int button, int state, int x, int y)
{
    double XDistance = (prop.getXLimitRight() - prop.getXLimitLeft())/2;
    double YDistance = (prop.getYLimitUp() - prop.getYLimitDown())/2;
    double a = (double(x)/(glutGet(GLUT_WINDOW_WIDTH)/2) -1)*XDistance;
    double b = (double(y)/(glutGet(GLUT_WINDOW_HEIGHT)/2) -1)*YDistance;

    if(prop.getMotionOcurrency() == false)
    {
        if (button == GLUT_LEFT_BUTTON && state == GLUT_UP)
        {
            prop.setXClicks(1, prop.getNumberOfClicks() + 1, a);
            prop.setYClicks(1, prop.getNumberOfClicks() + 1, b);

            prop.setGraphicDataSize ( prop.getGraphicDataSize()  + 0.2);
            prop.setGraphicXposition( prop.getGraphicXposition() + prop.getXClicks()(1, prop.getNumberOfClicks() + 1));
            prop.setGraphicYposition( prop.getGraphicYposition() + prop.getYClicks()(1, prop.getNumberOfClicks() + 1));
            prop.setNumberOfClicks  (prop.getNumberOfClicks()    + 1);
        }
        else if (button == GLUT_RIGHT_BUTTON && prop.getNumberOfClicks() > 0 && state == GLUT_UP)
        {
            prop.setGraphicDataSize ( prop.getGraphicDataSize()  - 0.2);
            prop.setNumberOfClicks  ( prop.getNumberOfClicks()   - 1);
            prop.setGraphicXposition( prop.getGraphicXposition() - prop.getXClicks()(1, prop.getNumberOfClicks() + 1));
            prop.setGraphicYposition( prop.getGraphicYposition() - prop.getYClicks()(1, prop.getNumberOfClicks() + 1));
        }
        else if(button == GLUT_RIGHT_BUTTON && prop.getNumberOfClicks() == 0)
        {
            prop.setGraphicXposition(0);
            prop.setGraphicYposition(0);
        }
    }

    else
        prop.setMotionOcurrency(false);
}

void grafics::MotionFunc(int x, int y)
{
    double XDistance = double(prop.getXLimitRight() - prop.getXLimitLeft())/2;
    double YDistance = double(prop.getYLimitUp()    - prop.getYLimitDown())/2;
    double a = (double(x)/(glutGet(GLUT_WINDOW_WIDTH)/2)  -1)*XDistance;
    double b = (double(y)/(glutGet(GLUT_WINDOW_HEIGHT)/2) -1)*YDistance;

    prop.setGraphicXposition( prop.getGraphicXposition() + (prop.getLastXMotionPosition() - a)/XDistance);
    prop.setGraphicYposition( prop.getGraphicYposition() + (prop.getLastYMotionPosition() - b)/YDistance);
    prop.setMotionOcurrency(true);
}

void grafics::PassiveMotionFunc(int x, int y)
{
    double XDistance = double(prop.getXLimitRight() - prop.getXLimitLeft())/2;
    double YDistance = double(prop.getYLimitUp()    - prop.getYLimitDown())/2;
    double a = (double(x)/(glutGet(GLUT_WINDOW_WIDTH)/2)  -1) *XDistance;
    double b = (double(y)/(glutGet(GLUT_WINDOW_HEIGHT)/2) -1)*YDistance;

    prop.setLastMotionPosition(a, b);
}


text:
@interface CVSPadBrushPickerViewController ()

@property (nonatomic, weak) UIView *backgroundView;

@end

@implementation CVSPadBrushPickerViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor clearColor];

    UIView *backgroundView = [[UIView alloc] initWithFrame:CGRectZero];
    backgroundView.backgroundColor = [UIColor dq_editorToolbarBackgroundColor];
    [self.view addSubview:backgroundView];
    self.backgroundView = backgroundView;
    [self.view sendSubviewToBack:backgroundView];
}

- (void)viewDidLayoutSubviews
{
    [super viewDidLayoutSubviews];
    self.backgroundView.frame = CGRectMake(0.0f, 15.0f, CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds) - 15.0f);
}

- (void)didSelectBrushAtIndexPath:(NSIndexPath *)indexPath
{
    CVSBrushesViewCell *cell = (CVSBrushesViewCell *)[self.collectionView cellForItemAtIndexPath:indexPath];
    if (cell != self.activeBrushCell && ! cell.isLocked)
    {
        if (self.activeBrushCell)
        {
            self.activeBrushCell.popped = NO;
        }
        self.activeBrushCell = cell;
        cell.popped = YES;
    }
}

- (void)deselectAll
{
    if (self.activeBrushCell)
    {
        self.activeBrushCell.popped = NO;
        self.activeBrushCell = nil;
    }
}

- (void)setStowed:(BOOL)stowed
{
    if (self.activeBrushCell)
    {
        self.activeBrushCell.popped = ! stowed;
    }
}

#pragma mark - UICollectionViewDataSource Methods

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    CVSBrushesViewCell *cell = (CVSBrushesViewCell *)[super collectionView:collectionView cellForItemAtIndexPath:indexPath];
    CVSBrushType brushType = [super brushTypeForIndexPath:indexPath];

    if (brushType == self.selectedBrush)
    {
        self.activeBrushCell = cell;
        [cell setPoppedUnanimated:YES];
    }

    // Align tops
    cell.frameY = 20.0f;

    return cell;
}

@end


text:
class UserTasks < Volt::Task
  # Login a user, takes a login and password.  Login can be either a username
  # or an e-mail based on Volt.config.public.auth.use_username
  #
  # login_info is a key with login and password (login may be e-mail)
  def login(login_info)
    login = login_info['login']
    password = login_info['password']

    query = { User.login_field => login }

    # During login we need access to the user's info even though we aren't the user
    Volt.skip_permissions do
      store._users.where(query).first.then do |user|
        fail VoltUserError, 'User could not be found' unless user

        match_pass = BCrypt::Password.new(user._hashed_password)
        fail 'Password did not match' unless  match_pass == password

        next Volt.user_login_signature(user)
      end
    end
  end
end


text:
package it.pm.jspellout;

import java.util.Scanner;

import it.pm.jspellout.interpreter.NumbersInterpreter;
import it.pm.jspellout.model.SpellOutException;
import java.math.BigInteger;

/**
 * Main App class.
 *
 * @author Paolo Maresca <plo.maresca@gmail.com>
 *
 */
public class App
{

    public static void main( String[] args )
    {

        Scanner inputScanner = new Scanner(System.in);
        String userInput = "";
        String numberSpelled = "";
        long number = 0;

        System.out.println("Welcome to jspellout v1.0!");
        System.out.println("__________________________\n");

        System.out.println("Usage: type any number (up to billions) to request the spell out");
        System.out.println("=================================================================");
        System.out.println(" QUIT : Exit");

        System.out.println("\n\n\n");

        BigInteger numberInput = null;
        while(true) {
            System.out.println("\n+------------------------------------+");
            System.out.println("Please, insert the number to spell out \n>> ");
            userInput = inputScanner.nextLine();
            if(userInput.equalsIgnoreCase("quit"))
                break;
            try {
                numberInput = new BigInteger(userInput);
                number = numberInput.abs().longValue();
                numberSpelled = NumbersInterpreter.getInstance().englishSpellOut(number);
                System.out.println("+------------------------------------+");
                System.out.println("Spelling-->>["+numberSpelled.trim()+"]");
            }catch(SpellOutException soe) {
                System.out.println("\n________________________________________________________");
                System.err.println("Error: Occurred during the spell out process :: ["+soe+"]\n");
            }catch(Exception e) {
                System.out.println("\n_________________________________");
                System.err.println("Error: Only Integers are accepted\n");
            }

        }

    }

}


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=fn.enqueue_copy_buffer.html">

Redirecting to fn.enqueue_copy_buffer.html...


text:
"""
Description:
Requirements: pySerial, wxPython Phoenix

glossary and of other descriptions:

DMM - digital multimeter
PSU - power supply
SBC - single board computer

INS - general instrument commands

GEN - general sequence instructions

"""

import logging
import sys
import time
import wx
import theme
import base

class AddFunction(wx.Dialog):

    def __init__(self, parent):

        wx.Dialog.__init__(self,
                           parent,
                           title="Add New Function")

        panel = wx.Panel(self)
        sizer = wx.BoxSizer(wx.VERTICAL)

        hsizer = wx.BoxSizer(wx.HORIZONTAL)
        sbox = wx.StaticBox(panel, label="")
        sbox_sizer = wx.StaticBoxSizer(sbox, wx.HORIZONTAL)
        grid = wx.GridBagSizer(5,5)

        row = 0
        # row += 1 #let's start at 1, to give some space

        lbl_function = wx.StaticText(panel, label="Function Name:", style=wx.TE_PROCESS_ENTER)
        self.text_function = wx.TextCtrl(panel)
        self.text_function.Bind(wx.EVT_TEXT_ENTER, self.OnFunctionEnter)
        self.text_function.Bind(wx.EVT_TEXT, self.OnFunctionChange)

        grid.Add(lbl_function, pos=(row,0), flag=wx.ALL|wx.EXPAND, border=5)
        grid.Add(self.text_function, pos=(row,1), span=(0,2), flag=wx.ALL|wx.EXPAND, border=5)
        grid.AddGrowableCol(1)
        row += 1

        sbox_sizer.AddSpacer(10)
        sbox_sizer.Add(grid, 1, wx.ALL|wx.EXPAND, 2)
        #-----
        hsizer = wx.BoxSizer(wx.HORIZONTAL)
        hsizer.AddStretchSpacer()
        btn_cancel = wx.Button(panel, label="Cancel", id=wx.ID_CANCEL)
        btn_cancel.Bind(wx.EVT_BUTTON, self.OnButton)
        self.btn_add = wx.Button(panel, label="Add", id=wx.ID_OK)
        self.btn_add.Bind(wx.EVT_BUTTON, self.OnButton)
        self.btn_add.Disable()
        hsizer.Add(btn_cancel, 0, wx.ALL|wx.EXPAND, 5)
        hsizer.Add(self.btn_add, 0, wx.ALL|wx.EXPAND, 5)

        #add to main sizer
        sizer.Add(sbox_sizer, 0, wx.ALL|wx.EXPAND, 2)
        sizer.Add(hsizer, 0, wx.ALL|wx.EXPAND, 5)

        panel.SetSizer(sizer)

        w, h = sizer.Fit(self)

        try:
            self.SetIcon(theme.GetIcon("psu_png"))
        except:
            pass

    def OnFunctionChange(self, event):
        e = event.GetEventObject()
        value = e.GetValue()
        # e.SetValue(value.replace(" ", ""))

        if e.GetValue() == "":
            self.btn_add.Disable()
        elif e.GetValue().lower() in ["setup","main"]:
            self.btn_add.Disable()
        else:
            self.btn_add.Enable()

    def OnFunctionEnter(self, event):
        e = event.GetEventObject()
        value = e.GetValue()
        if value == "":
            return

        self.EndModal(id)

    def OnButton(self, event):
        e = event.GetEventObject()
        label = e.GetLabel()
        id = e.GetId()

        if label == "Cancel":
            self.EndModal(id)
        elif label == "Add":
            self.EndModal(id)

    def SetValue(self, name):
        self.text_function.SetValue(name)

    def GetValue(self):

        function = self.text_function.GetValue()
        if function != "":
            for char in function:
                if char.isdigit() or char.isalpha():
                    continue
                function = function.replace(char, "_")

        data = function

        return data


text:
'use strict';

/**
* Complex number constructors.
*
* @module @stdlib/complex/ctors
*
* @example
* var ctors = require( '@stdlib/complex/ctors' );
*
* var ctor = ctors( 'complex128' );
* // returns <Function>
*
* ctor = ctors( 'int' );
* // returns null
*/

// MODULES //

var main = require( './main.js' );

// EXPORTS //

module.exports = main;


text:
package org.eclipse.bpmn2;

import java.util.List;

/**
 *
 * A representation of the model object 'Sub Conversation'.
 *
 *
 *

 * The following features are supported:
 *

 *
{@link org.eclipse.bpmn2.SubConversation#getConversationNodes Conversation Nodes}

 *

 *

 *
 * @see org.eclipse.bpmn2.Bpmn2Package#getSubConversation()
 * @model extendedMetaData="name='tSubConversation' kind='elementOnly'"
 * @generated
 */
public interface SubConversation extends ConversationNode {
	/**
	 * Returns the value of the 'Conversation Nodes' containment reference list.
	 * The list contents are of type {@link org.eclipse.bpmn2.ConversationNode}.
	 *
	 *

	 * If the meaning of the 'Conversation Nodes' containment reference list isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Conversation Nodes' containment reference list.
	 * @see org.eclipse.bpmn2.Bpmn2Package#getSubConversation_ConversationNodes()
	 * @model containment="true" ordered="false"
	 *        extendedMetaData="kind='element' name='conversationNode' namespace='http://www.omg.org/spec/BPMN/20100524/MODEL' group='http://www.omg.org/spec/BPMN/20100524/MODEL#conversationNode'"
	 * @generated
	 */
	List<ConversationNode> getConversationNodes();

} // SubConversation


text:
This is metadata generated as part of Fuchsia's [go-tuf fork] transition from
TUF 0.9 to 1.0. It was copied from this [commit] with the following patches
applied that completes the transition to TUF 1.0:

* [322708]: add sha512 to keyid_hash_algorithms
* [287594]: Stop generating TUF 0.9 prefixed metadata and target files
* [271035]: G4: Remove Signature method, TUF-0.9 compatible keyid

[go-tuf fork]: https://fuchsia.googlesource.com/third_party/go-tuf
[commit]: https://fuchsia.googlesource.com/third_party/go-tuf/+/5527feb6040bc316ea6553f3c5fef0070d2e1be0/client/testdata/go-tuf-transition-M4/
[322708]: https://fuchsia-review.googlesource.com/c/third_party/go-tuf/+/322708/6
[287594]: https://fuchsia-review.googlesource.com/c/third_party/go-tuf/+/287594/13
[271035]: https://fuchsia-review.googlesource.com/c/third_party/go-tuf/+/271035/28


text:
using UnityEngine;
namespace AmplifyShaderEditor
{
	public class DrawInfo
	{
		public Rect TransformedCameraArea;
		public Rect CameraArea;
		public Vector2 MousePosition;
		public Vector2 CameraOffset;
		public float InvertedZoom;
		public bool LeftMouseButtonPressed;
		public EventType CurrentEventType;
		public Vector2 TransformedMousePos;
		public bool ZoomChanged;
	}
}