text:
<?php

declare(strict_types=1);

namespace Sylius\Behat\Page\Admin\Promotion;

use Behat\Mink\Element\NodeElement;
use Behat\Mink\Exception\ElementNotFoundException;
use Sylius\Behat\Behaviour\NamesIt;
use Sylius\Behat\Behaviour\SpecifiesItsCode;
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
use Sylius\Behat\Service\AutocompleteHelper;
use Sylius\Behat\Service\TabsHelper;
use Webmozart\Assert\Assert;

class CreatePage extends BaseCreatePage implements CreatePageInterface
{
    use NamesIt;
    use SpecifiesItsCode;

    public function specifyLabel(string $label, string $localeCode): void
    {
        $this->getDocument()->find('css', 'div[data-locale="' . $localeCode . '"]')->click();

        $this->getDocument()->fillField(sprintf('sylius_promotion_translations_%s_label', $localeCode), $label);
    }

    public function addRule(?string $ruleName): void
    {
        $count = count($this->getCollectionItems('rules'));

        $this->getDocument()->clickLink('Add rule');

        $this->getDocument()->waitFor(5, fn () => $count + 1 === count($this->getCollectionItems('rules')));

        if (null !== $ruleName) {
            $this->selectRuleOption('Type', $ruleName);
        }
    }

    public function selectRuleOption(string $option, string $value, bool $multiple = false): void
    {
        $this->getLastCollectionItem('rules')->find('named', ['select', $option])->selectOption($value, $multiple);
    }

    public function selectAutocompleteRuleOption(string $option, $value, bool $multiple = false): void
    {
        $option = strtolower(str_replace(' ', '_', $option));

        $ruleAutocomplete = $this
            ->getLastCollectionItem('rules')
            ->find('css', sprintf('input[type="hidden"][name*="[%s]"]', $option))
            ->getParent()
        ;

        if ($multiple && is_array($value)) {
            AutocompleteHelper::chooseValues($this->getSession(), $ruleAutocomplete, $value);

            return;
        }

        AutocompleteHelper::chooseValue($this->getSession(), $ruleAutocomplete, $value);
    }

    public function fillRuleOption(string $option, string $value): void
    {
        $this->getLastCollectionItem('rules')->fillField($option, $value);
    }

    public function fillRuleOptionForChannel(string $channelCode, string $option, string $value): void
    {
        $lastAction = $this->getChannelConfigurationOfLastRule($channelCode);
        $lastAction->fillField($option, $value);
    }

    public function addAction(?string $actionName): void
    {
        $count = count($this->getCollectionItems('actions'));

        $this->getDocument()->clickLink('Add action');

        $this->getDocument()->waitFor(5, fn () => $count + 1 === count($this->getCollectionItems('actions')));

        if (null !== $actionName) {
            $this->selectActionOption('Type', $actionName);
        }
    }

    public function selectActionOption(string $option, string $value, bool $multiple = false): void
    {
        $this->getLastCollectionItem('actions')->find('named', ['select', $option])->selectOption($value, $multiple);
    }

    public function fillActionOption(string $option, string $value): void
    {
        $this->getLastCollectionItem('actions')->fillField($option, $value);
    }

    public function fillActionOptionForChannel(string $channelCode, string $option, string $value): void
    {
        $lastAction = $this->getChannelConfigurationOfLastAction($channelCode);
        $lastAction->fillField($option, $value);
    }

    public function fillUsageLimit(string $limit): void
    {
        $this->getDocument()->fillField('Usage limit', $limit);
    }

    public function makeExclusive(): void
    {
        $this->getDocument()->checkField('Exclusive');
    }

    public function makeNotAppliesToDiscountedItem(): void
    {
        $this->getDocument()->unCheckField('Applies to already discounted order items');
    }

    public function checkCouponBased(): void
    {
        $this->getDocument()->checkField('Coupon based');
    }

    public function checkChannel(string $name): void
    {
        $this->getDocument()->checkField($name);
    }

    public function setStartsAt(\DateTimeInterface $dateTime): void
    {
        $timestamp = $dateTime->getTimestamp();

        $this->getDocument()->fillField('sylius_promotion_startsAt_date', date('Y-m-d', $timestamp));
        $this->getDocument()->fillField('sylius_promotion_startsAt_time', date('H:i', $timestamp));
    }

    public function setEndsAt(\DateTimeInterface $dateTime): void
    {
        $timestamp = $dateTime->getTimestamp();

        $this->getDocument()->fillField('sylius_promotion_endsAt_date', date('Y-m-d', $timestamp));
        $this->getDocument()->fillField('sylius_promotion_endsAt_time', date('H:i', $timestamp));
    }

    public function getValidationMessageForAction(): string
    {
        $actionForm = $this->getLastCollectionItem('actions');

        $foundElement = $actionForm->find('css', '.sylius-validation-error');
        if (null === $foundElement) {
            throw new ElementNotFoundException($this->getSession(), 'Tag', 'css', '.sylius-validation-error');
        }

        return $foundElement->getText();
    }

    public function selectAutoCompleteFilterOption(string $option, $value, bool $multiple = false): void
    {
        $option = strtolower(str_replace(' ', '_', $option));

        $filterAutocomplete = $this
            ->getLastCollectionItem('actions')
            ->find('css', sprintf('input[type="hidden"][name*="[%s_filter]"]', $option))
            ->getParent()
        ;

        if ($multiple && is_array($value)) {
            AutocompleteHelper::chooseValues($this->getSession(), $filterAutocomplete, $value);

            return;
        }

        AutocompleteHelper::chooseValue($this->getSession(), $filterAutocomplete, $value);
    }

    public function checkIfRuleConfigurationFormIsVisible(): bool
    {
        return $this->hasElement('count');
    }

    public function checkIfActionConfigurationFormIsVisible(): bool
    {
        return $this->hasElement('amount');
    }

    public function hasLabel(string $label, string $localeCode): bool
    {
        $this->getDocument()->find('css', 'div[data-locale="' . $localeCode . '"]')->click();

        $labelElement = $this->getDocument()->find('css', sprintf('label:contains("%s")', $label));
        if (null === $labelElement) {
            return false;
        }

        return $labelElement->hasClass(sprintf('sylius-locale-%s', $localeCode));
    }

    protected function getDefinedElements(): array
    {
        return [
            'actions' => '#sylius_promotion_actions',
            'code' => '#sylius_promotion_code',
            'ends_at' => '#sylius_promotion_endsAt',
            'minimum' => '#sylius_promotion_actions_0_configuration_WEB-US_filters_price_range_filter_min',
            'maximum' => '#sylius_promotion_actions_0_configuration_WEB-US_filters_price_range_filter_max',
            'name' => '#sylius_promotion_name',
            'rules' => '#sylius_promotion_rules',
            'starts_at' => '#sylius_promotion_startsAt',
            'count' => '#sylius_promotion_rules_0_configuration_count',
            'amount' => '#sylius_promotion_actions_0_configuration_WEB-US_amount',
        ];
    }

    private function getChannelConfigurationOfLastAction(string $channelCode): NodeElement
    {
        $lastAction = $this->getLastCollectionItem('actions');

        TabsHelper::switchTab($this->getSession(), $lastAction, $channelCode);

        return $lastAction
            ->find('css', sprintf('[id^="sylius_promotion_actions_"][id$="_configuration_%s"]', $channelCode))
        ;
    }

    private function getChannelConfigurationOfLastRule(string $channelCode): NodeElement
    {
        $lastRule = $this->getLastCollectionItem('rules');

        TabsHelper::switchTab($this->getSession(), $lastRule, $channelCode);

        return $lastRule
            ->find('css', sprintf('[id^="sylius_promotion_rules_"][id$="_configuration_%s"]', $channelCode))
        ;
    }

    private function getLastCollectionItem(string $collection): NodeElement
    {
        $items = $this->getCollectionItems($collection);

        Assert::notEmpty($items);

        return end($items);
    }

    /**
     * @return NodeElement[]
     */
    private function getCollectionItems(string $collection): array
    {
        $items = $this->getElement($collection)->findAll('css', 'div[data-form-collection="item"]');

        Assert::isArray($items);

        return $items;
    }
}


text:
.. _api-visualize-index:

:mod:`menpo.visualize`
======================

.. toctree::
  :maxdepth: 1

Abstract Classes
----------------

.. toctree::
  :maxdepth: 1

  Renderer
  Viewable
  LandmarkableViewable
  MatplotlibRenderer

Widgets
-------

.. toctree::
  :maxdepth: 1

  visualize_images
  visualize_landmarks
  visualize_landmarkgroups
  visualize_pointclouds
  features_selection
  save_matplotlib_figure
  plot_graph

Print Utilities
---------------

.. toctree::
  :maxdepth: 1

  print_progress
  print_dynamic
  progress_bar_str
  bytes_str

Create Custom Widgets
---------------------

Collection of widgets that can be used as the main ingredients for creating
other custom widgets.

.. toctree::
  :maxdepth: 1

  AnimationOptionsWidget
  ChannelOptionsWidget
  LandmarkOptionsWidget
  RendererOptionsWidget
  GraphOptionsWidget
  SaveFigureOptionsWidget
  TextPrintWidget

redpajama_set_name: RedPajamaGithub


text: package expvarplus


text:
// # Copyright © 2011-2012, Novus Craft
// # All rights reserved.

using System.Configuration;

namespace NovusCraft.Infrastructure
{
	public static class Config
	{
		public static string Get(string key)
		{
			return ConfigurationManager.AppSettings[key];
		}
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>executioner</artifactId>
        <groupId>com.slickqa</groupId>
        <version>2.0.0-19</version>
    </parent>
    <name>Executioner Slick v4 Connector</name>
    <description>The connector to get work from the python version of slick.</description>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>executioner-slickv4-connector</artifactId>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>executioner-base-verticle</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-core</artifactId>
            <version>${vertx.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>${guice.version}</version>
        </dependency>
    </dependencies>

</project>


text:
package owltools.graph;

import gnu.trove.set.hash.THashSet;

import java.util.HashSet;
import java.util.Set;

import org.apache.log4j.Logger;
import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.AddAxiom;
import org.semanticweb.owlapi.model.AddImport;
import org.semanticweb.owlapi.model.AddOntologyAnnotation;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLAnnotation;
import org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom;
import org.semanticweb.owlapi.model.OWLAnnotationProperty;
import org.semanticweb.owlapi.model.OWLAnnotationSubject;
import org.semanticweb.owlapi.model.OWLAxiom;
import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.OWLDataFactory;
import org.semanticweb.owlapi.model.OWLImportsDeclaration;
import org.semanticweb.owlapi.model.OWLLiteral;
import org.semanticweb.owlapi.model.OWLObject;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.model.OWLSubClassOfAxiom;
import org.semanticweb.owlapi.model.RemoveImport;
import org.semanticweb.owlapi.vocab.OWLRDFVocabulary;

import com.google.common.base.Optional;

import owltools.io.ParserWrapper;

/**
 * Basic methods for handling multiple {@link OWLOntology} objects as one graph.
 * Provide methods to add, remove, or merge support ontologies.
 *
 * @see OWLGraphWrapper
 */
public class OWLGraphWrapperBasic {

	private static final Logger LOG = Logger.getLogger(OWLGraphWrapperBasic.class);

	protected OWLOntology sourceOntology; // graph is seeded from this ontology.

	protected Set<OWLOntology> supportOntologySet = new HashSet<OWLOntology>();

	protected OWLGraphWrapperBasic(OWLOntology ontology) {
		super();
		sourceOntology = ontology;
	}

	protected OWLGraphWrapperBasic(String iri) throws OWLOntologyCreationException {
		super();
		ParserWrapper pw = new ParserWrapper();
		OWLOntologyManager manager = pw.getManager();
		sourceOntology = manager.createOntology(IRI.create(iri));
	}

	private void addCommentToOntology(OWLOntology ont, String cmt) {
		OWLDataFactory df = getDataFactory();
		OWLAnnotationProperty p =
				df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_COMMENT.getIRI());
		OWLLiteral v = df.getOWLLiteral(cmt);
		OWLAnnotation ann = df.getOWLAnnotation(p, v);
		AddOntologyAnnotation addAnn =
				new AddOntologyAnnotation(ont, ann);
		getManager().applyChange(addAnn);
	}
	/**
	 * adds an imports declaration between the source ontology and extOnt
	 *
	 * @param extOnt
	 */
	public void addImport(OWLOntology extOnt) {
		Optional<IRI> ontologyIRI = extOnt.getOntologyID().getOntologyIRI();
		if (ontologyIRI.isPresent()) {
			AddImport ai = new AddImport(getSourceOntology(), getDataFactory().getOWLImportsDeclaration(ontologyIRI.get()));
			getManager().applyChange(ai);
		}
		else {
			throw new RuntimeException("Could not add ontology as import, missing ontology ID: "+extOnt);
		}
	}

	public enum LabelPolicy {
		ALLOW_DUPLICATES,
		PRESERVE_SOURCE,
		PRESERVE_EXT
	}
	/**
	 * Adds all axioms from extOnt into source ontology
	 *
	 * @param extOnt
	 * @throws OWLOntologyCreationException
	 */
	public void mergeOntology(OWLOntology extOnt) throws OWLOntologyCreationException {
		mergeOntology(extOnt, LabelPolicy.ALLOW_DUPLICATES);
	}
	public void mergeOntology(OWLOntology extOnt, LabelPolicy labelPolicy) throws OWLOntologyCreationException {
		OWLOntologyManager manager = getManager();
		LOG.info("Merging "+extOnt+" policy: "+labelPolicy);
		for (OWLAxiom axiom : extOnt.getAxioms()) {
			if (labelPolicy != LabelPolicy.ALLOW_DUPLICATES) {
				if (axiom instanceof OWLAnnotationAssertionAxiom) {
					OWLAnnotationAssertionAxiom aa = (OWLAnnotationAssertionAxiom)axiom;
					if (aa.getProperty().isLabel()) {
						OWLAnnotationSubject subj = aa.getSubject();
						if (subj instanceof IRI) {
							Optional<OWLLiteral> label = null;
							for (OWLAnnotationAssertionAxiom a1 : sourceOntology.getAnnotationAssertionAxioms(subj)) {
								if (a1.getProperty().isLabel()) {
									label = a1.getValue().asLiteral();
								}
							}
							if (label != null && label.isPresent()) {
								if (labelPolicy == LabelPolicy.PRESERVE_SOURCE) {
									LOG.info("Preserving existing label:" +subj+" "+label+" // ditching: "+axiom);
									continue;
								}
								if (labelPolicy == LabelPolicy.PRESERVE_EXT) {
									LOG.info("Replacing:" +subj+" "+label+" with: "+axiom);
									LOG.error("NOT IMPLEMENTED");
								}
							}
						}
					}
				}
			}
			manager.applyChange(new AddAxiom(sourceOntology, axiom));
		}
		for (OWLImportsDeclaration oid: extOnt.getImportsDeclarations()) {
			manager.applyChange(new AddImport(sourceOntology, oid));
		}
		addCommentToOntology(sourceOntology, "Includes "+summarizeOntology(extOnt));
	}

	public void mergeOntology(OWLOntology extOnt, boolean isRemoveFromSupportList) throws OWLOntologyCreationException {
		mergeOntology(extOnt);
		if (isRemoveFromSupportList) {
			this.supportOntologySet.remove(extOnt);
		}
	}

	static CharSequence summarizeOntology(OWLOntology ontology) {
		StringBuilder sb = new StringBuilder();
		sb.append("Ontology(");
		sb.append(ontology.getOntologyID());
		sb.append(") [Axioms: ");
		int axiomCount = ontology.getAxiomCount();
		sb.append(axiomCount);
		sb.append(" Logical Axioms: ");
		sb.append(ontology.getLogicalAxiomCount());
		sb.append("]");
		return sb;
	}

	/**
	 * @deprecated use {@link #mergeSupportOntology(IRI, boolean)} instead
	 *
	 * @param ontologyIRI
	 * @param isRemoveFromSupportList
	 * @throws OWLOntologyCreationException
	 */
	@Deprecated
	public void mergeSupportOntology(String ontologyIRI, boolean isRemoveFromSupportList) throws OWLOntologyCreationException {
		if (ontologyIRI != null) {
			mergeSupportOntology(IRI.create(ontologyIRI), isRemoveFromSupportList);
		}
	}

	public void mergeSupportOntology(IRI ontologyIRI, boolean isRemoveFromSupportList) throws OWLOntologyCreationException {
		OWLOntology extOnt = null;
		for (OWLOntology ont : this.supportOntologySet) {
			Optional<IRI> supportIRI = ont.getOntologyID().getOntologyIRI();
			if (supportIRI.isPresent() && supportIRI.get().equals(ontologyIRI)) {
				extOnt = ont;
				break;
			}
		}

		mergeOntology(extOnt);
		if (isRemoveFromSupportList) {
			this.supportOntologySet.remove(extOnt);
		}
	}

	/**
	 * @deprecated Use {@link #mergeSupportOntology(IRI)} instead
	 *
	 * @param ontologyIRI
	 * @throws OWLOntologyCreationException
	 */
	@Deprecated
	public void mergeSupportOntology(String ontologyIRI) throws OWLOntologyCreationException {
		mergeSupportOntology(ontologyIRI, true);
	}

	public void mergeSupportOntology(IRI ontologyIRI) throws OWLOntologyCreationException {
		mergeSupportOntology(ontologyIRI, true);
	}

	/**
	 * Every OWLGraphWrapper objects wraps zero or one source ontologies.
	 *
	 * @return ontology
	 */
	public OWLOntology getSourceOntology() {
		return sourceOntology;
	}

	public void setSourceOntology(OWLOntology sourceOntology) {
		this.sourceOntology = sourceOntology;
	}

	/**
	 * all operations are over a set of ontologies - the source ontology plus
	 * any number of supporting ontologies. The supporting ontologies may be drawn
	 * from the imports closure of the source ontology, although this need not be the case.
	 *
	 * @return set of support ontologies
	 */
	public Set<OWLOntology> getSupportOntologySet() {
		return supportOntologySet;
	}

	public void setSupportOntologySet(Set<OWLOntology> supportOntologySet) {
		this.supportOntologySet = supportOntologySet;
	}

	public void addSupportOntology(OWLOntology o) {
		this.supportOntologySet.add(o);
	}
	public void removeSupportOntology(OWLOntology o) {
		this.supportOntologySet.remove(o);
	}

	/**
	 * Each ontology in the import closure of the source ontology is added to
	 * the list of support ontologies
	 *
	 */
	public void addSupportOntologiesFromImportsClosure() {
		addSupportOntologiesFromImportsClosure(false);

	}
	/**
	 * Each ontology in the import closure of the source ontology
	 * (and the import closure of each existing support ontology, if
	 * doForAllSupportOntologies is true) is added to
	 * the list of support ontologies
	 *
	 * @param doForAllSupportOntologies
	 */
	public void addSupportOntologiesFromImportsClosure(boolean doForAllSupportOntologies) {
		Set<OWLOntology> ios = new HashSet<OWLOntology>();
		ios.add(sourceOntology);

		if (doForAllSupportOntologies) {
			ios.addAll(getSupportOntologySet());
		}
		for (OWLOntology so : ios) {
			for (OWLOntology o : so.getImportsClosure()) {
				if (o.equals(sourceOntology))
					continue;
				addSupportOntology(o);
			}
		}
	}

	public void addImportsFromSupportOntologies() {
		OWLOntology sourceOntology = getSourceOntology();
		OWLDataFactory factory = getDataFactory();
		for (OWLOntology  o : getSupportOntologySet()) {
			Optional<IRI> ontologyIRI = o.getOntologyID().getOntologyIRI();
			if (ontologyIRI.isPresent()) {
				OWLImportsDeclaration importsDeclaration = factory.getOWLImportsDeclaration(ontologyIRI.get());
				AddImport ai = new AddImport(sourceOntology, importsDeclaration);
				LOG.info("Applying: "+ai);
				getManager().applyChange(ai);
			}
			else {
				String msg = "Could not add import due to missing ontology id: "+o;
				LOG.error(msg);
				throw new RuntimeException(msg);
			}
		}
		this.setSupportOntologySet(new HashSet<OWLOntology>());
	}

	public void remakeOntologiesFromImportsClosure() throws OWLOntologyCreationException {
		remakeOntologiesFromImportsClosure(IRI.generateDocumentIRI());
	}

	public void remakeOntologiesFromImportsClosure(IRI ontologyIRI) throws OWLOntologyCreationException {
		addSupportOntologiesFromImportsClosure();
		OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
		sourceOntology = manager.createOntology(sourceOntology.getAxioms(), ontologyIRI);
	}

	/**
	 * note: may move to mooncat
	 * @throws OWLOntologyCreationException
	 */
	public void mergeImportClosure() throws OWLOntologyCreationException {
		mergeImportClosure(false);
	}
	public void mergeImportClosure(boolean isRemovedImportsDeclarations) throws OWLOntologyCreationException {
		OWLOntologyManager manager = getManager();
		Set<OWLOntology> imports = sourceOntology.getImportsClosure();
		for (OWLOntology o : imports) {
			if (o.equals(sourceOntology))
				continue;

			String comment = "Includes "+summarizeOntology(o);
			LOG.info(comment);
			addCommentToOntology(sourceOntology, comment);

			manager.addAxioms(sourceOntology, o.getAxioms());
		}
		Set<OWLImportsDeclaration> oids = sourceOntology.getImportsDeclarations();
		for (OWLImportsDeclaration oid : oids) {
			RemoveImport ri = new RemoveImport(sourceOntology, oid);
			getManager().applyChange(ri);
		}
	}

	/**
	 * Merge a specific ontology from the import closure into the main ontology.
	 * Removes the import statement.
	 *
	 * @param ontologyIRI id of the ontology to merge
	 * @throws OWLOntologyCreationException
	 */
	public void mergeSpecificImport(IRI ontologyIRI) throws OWLOntologyCreationException {
		OWLOntologyManager manager = getManager();
		Set<OWLOntology> imports = sourceOntology.getImportsClosure();
		for (OWLOntology o : imports) {
			if (o.equals(sourceOntology))
				continue;
			Optional<IRI> currentIRI = o.getOntologyID().getOntologyIRI();
			if (currentIRI.isPresent() && currentIRI.get().equals(ontologyIRI)) {
				String comment = "Includes "+summarizeOntology(o);
				LOG.info(comment);
				addCommentToOntology(sourceOntology, comment);
				manager.addAxioms(sourceOntology, o.getAxioms());
			}
		}
		Set<OWLImportsDeclaration> oids = sourceOntology.getImportsDeclarations();
		for (OWLImportsDeclaration oid : oids) {
			if (ontologyIRI.equals(oid.getIRI())) {
				RemoveImport ri = new RemoveImport(sourceOntology, oid);
				getManager().applyChange(ri);
			}
		}
	}

	/**
	 * in general application code need not call this - it is mostly used internally
	 *
	 * @return union of source ontology plus all supporting ontologies plus their import closures
	 */
	public Set<OWLOntology> getAllOntologies() {
		Set<OWLOntology> all = new HashSet<OWLOntology>(getSupportOntologySet());
		for (OWLOntology o : getSupportOntologySet()) {
			all.addAll(o.getImportsClosure());
		}
		all.add(getSourceOntology());
		all.addAll(getSourceOntology().getImportsClosure());
		return all;
	}

	public OWLDataFactory getDataFactory() {
		return getManager().getOWLDataFactory();
	}

	public OWLOntologyManager getManager() {
		return sourceOntology.getOWLOntologyManager();
	}

	/**
	 * fetches all classes, individuals and object properties in all ontologies.
	 * This set is a copy. Changes are not reflected in the ontologies.
	 *
	 * @return all named objects
	 */
	public Set<OWLObject> getAllOWLObjects() {
		Set<OWLObject> obs = new THashSet<OWLObject>();
		for (OWLOntology o : getAllOntologies()) {
			obs.addAll(o.getClassesInSignature());
			obs.addAll(o.getIndividualsInSignature());
			obs.addAll(o.getObjectPropertiesInSignature());
		}
		obs.remove(getDataFactory().getOWLThing());
		obs.remove(getDataFactory().getOWLNothing());
		return obs;
	}

	/**
	 * Fetch all {@link OWLClass} objects from all ontologies.
	 * This set is a copy. Changes are not reflected in the ontologies.
	 *
	 * @return set of all {@link OWLClass}
	 */
	public Set<OWLClass> getAllOWLClasses() {
		Set<OWLClass> owlClasses = new THashSet<OWLClass>();
		for (OWLOntology o : getAllOntologies()) {
			owlClasses.addAll(o.getClassesInSignature());
		}
		return owlClasses;
	}

	/**
	 * Fetch all {@link OWLSubClassOfAxiom} axioms for a given subClass
	 * ({@link OWLClass}) from all ontologies. This set is a copy. Changes are
	 * not reflected in the ontologies.
	 *
	 * @param owlClass
	 * @return set of all {@link OWLSubClassOfAxiom}
	 */
	public Set<OWLSubClassOfAxiom> getAllOWLSubClassOfAxiomsForSubClass(OWLClass owlClass) {
		Set<OWLSubClassOfAxiom> axioms = new THashSet<OWLSubClassOfAxiom>();
		for (OWLOntology o : getAllOntologies()) {
			axioms.addAll(o.getSubClassAxiomsForSubClass(owlClass));
		}
		return axioms;
	}

	/**
	 * Fetch all {@link OWLSubClassOfAxiom} axioms for a given superClass
	 * ({@link OWLClass}) from all ontologies. This set is a copy. Changes are
	 * not reflected in the ontologies.
	 *
	 * @param owlClass
	 * @return set of all {@link OWLSubClassOfAxiom}
	 */
	public Set<OWLSubClassOfAxiom> getAllOWLSubClassOfAxiomsForSuperClass(OWLClass owlClass) {
		Set<OWLSubClassOfAxiom> axioms = new THashSet<OWLSubClassOfAxiom>();
		for (OWLOntology o : getAllOntologies()) {
			axioms.addAll(o.getSubClassAxiomsForSuperClass(owlClass));
		}
		return axioms;
	}
}


text:
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    // Init mmseg
    NSArray<NSString*> *arr = [MMSegObjC getTokenStringsFromString:@"我们都喜欢用 Ruby"];

    for (NSString *str in arr) {
        NSLog(@"%@", str);
    }
}

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

@end


text:
import thunk from "redux-thunk";
import { applyMiddleware, compose, Middleware } from "redux";
import { EnvName } from "./interfaces";

interface MiddlewareConfig {
  fn: Middleware;
  env: EnvName;
}

/** To make it easier to manage all things watching the state tree,
 * we keep subscriber functions in this array. */
export let mwConfig: MiddlewareConfig[] = [
  {
    env: "*",
    fn: thunk
  }
  , {
    env: "development",
    fn: require("redux-immutable-state-invariant").default()
  }
];

export function getMiddleware(env: EnvName) {
  let middlewareFns = mwConfig
    .filter(function (mwc) { return (mwc.env === env) || (mwc.env === "*"); })
    .map((mwc) => mwc.fn);
  let dtCompose = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
  const composeEnhancers = dtCompose || compose;
  let middlewares = applyMiddleware(...middlewareFns);

  return composeEnhancers(middlewares);
}


text:
package org.umlg.sqlg.structure;

import org.apache.tinkerpop.gremlin.structure.io.graphson.TinkerPopJacksonModule;

import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Date: 2016/08/28
 * Time: 12:40 PM
 */
class SqlgSimpleModuleV2 extends TinkerPopJacksonModule {

    private static final Map<Class, String> TYPE_DEFINITIONS = Collections.unmodifiableMap(
            new LinkedHashMap<Class, String>() {{
                put(RecordId.class, "id");
                put(SchemaTable.class, "schemaTable");
            }});

    SqlgSimpleModuleV2() {
        super("custom");
        addSerializer(RecordId.class, new RecordId.RecordIdJacksonSerializerV2d0());
        addDeserializer(RecordId.class, new RecordId.RecordIdJacksonDeserializerV2d0());
        addSerializer(SchemaTable.class, new SchemaTable.SchemaTableIdJacksonSerializerV2d0());
        addDeserializer(SchemaTable.class, new SchemaTable.SchemaTableIdJacksonDeserializerV2d0());
    }

    @Override
    public Map<Class, String> getTypeDefinitions() {
        return TYPE_DEFINITIONS;
    }

    @Override
    public String getTypeNamespace() {
        return "simple";
    }
}


text:
package org.apache.usergrid.rest.test.resource.app.queue;

import org.apache.usergrid.rest.test.resource.NamedResource;
import org.apache.usergrid.rest.test.resource.ValueResource;
import org.apache.usergrid.rest.test.resource.app.Device;

/** @author tnine */
public class DevicesCollection extends ValueResource {

    public DevicesCollection( NamedResource parent ) {
        super( "devices", parent );
    }

    public Device device( String deviceName ) {
        return new Device( deviceName, this );
    }
}


text:
<?php
namespace PSFS\base\types\traits;
use PSFS\base\config\Config;
use PSFS\base\dto\Dto;
use PSFS\base\dto\JsonResponse;
use PSFS\base\dto\ProfilingJsonResponse;
use PSFS\base\Logger;
use PSFS\base\types\helpers\I18nHelper;
use PSFS\base\types\helpers\Inspector;
use PSFS\base\types\helpers\ResponseHelper;

/**
 * Class JsonTrait
 * @package PSFS\base\types\traits
 */
Trait JsonTrait {
    use OutputTrait;

    /**
     * Método que devuelve una salida en formato JSON
     * @param mixed $response
     * @param int $statusCode
     *
     * @return mixed JSON
     */
    public function json($response, $statusCode = 200)
    {
        if(Config::getParam('profiling.enable')) {
            if(is_array($response)) {
                $response['profiling'] = Inspector::getStats();
            } elseif($response instanceof JsonResponse) {
                $response = ProfilingJsonResponse::createFromPrevious($response, Inspector::getStats());
            }
        }

        $this->decodeJsonResponse($response);

        $mask = JSON_UNESCAPED_LINE_TERMINATORS | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_BIGINT_AS_STRING;
        if(Config::getParam('output.json.strict_numbers')) {
            $mask = JSON_UNESCAPED_LINE_TERMINATORS | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_BIGINT_AS_STRING | JSON_NUMERIC_CHECK;
        }

        $data = json_encode($response, $mask);
        if(json_last_error() !== JSON_ERROR_NONE) {
            Logger::log(json_last_error_msg(), LOG_CRIT);
        }

        if(Config::getParam('angular.protection', false)) {
            $data = ")]}',\n" . $data;
        }
        $this->setStatus($statusCode);
        ResponseHelper::setDebugHeaders([]);
        return $this->output($data, "application/json");
    }

    /**
     * Método que devuelve una salida en formato JSON
     * @param mixed $response
     */
    public function jsonp($response)
    {
        $data = json_encode($response, JSON_UNESCAPED_UNICODE);
        $this->output($data, "application/javascript");
    }

    /**
     * @param $response
     * @return array|string
     */
    private function decodeJsonResponse(&$response)
    {
        if (Config::getParam('json.encodeUTF8', false)) {
            $response = I18nHelper::utf8Encode($response);
        }

        if ($response instanceof JsonResponse) {
            $response = $response->toArray();
        }
    }
}


text:
{% extends "rosetta/base.html" %}
{% load i18n %}

{% block title %}{{block.super}} - {% trans "Language selection" %}{% endblock %}

{% block content_subtitle %}: {% trans "Language selection" %}{% endblock %}

{% block breadcumbs %}{% trans "Home" %} › {% trans "Language selection" %}{% endblock %}

{% block bodyclass %}filebrowser{% endblock %}
{% block content-class %}change-list content-flexible{% endblock %}

{% block main %}

{% blocktrans count counter=languages|length %}{{ counter }} language{% plural %}{{ counter }} languages{% endblocktrans %}

            {% trans "Filter" %}

                    {% trans "status" %}
                    <select class="filter_choice">
                        <option value="?filter=project" {% ifequal rosetta_i18n_catalog_filter 'project' %}selected="selected"{% endifequal %}>{% trans "Project" %}</option>
                        <option value="?filter=third-party" {% ifequal rosetta_i18n_catalog_filter 'third-party' %}selected="selected"{% endifequal %}>{% trans "Third party" %}</option>
                        <option value="?filter=django" {% ifequal rosetta_i18n_catalog_filter 'django' %}selected="selected"{% endifequal %}>Django</option>
                        <option value="?filter=all" {% ifequal rosetta_i18n_catalog_filter 'all' %}selected="selected"{% endifequal %}>{% trans "All" %}</option>
                    </select>

<form>
    {% if has_pos %}

    {% for lid,language,pos in languages %}
    {% if pos %}

{{language}}

                        {% trans "Application" %}
                        {% trans "Progress"%}
                        {% trans "Messages" %}
                        {% trans "Translated" %}
                        {% trans "Fuzzy"%}
                        {% trans "Obsolete"%}
                        {% trans "File" %}

                    {% for app,path,po in pos %}

                        {{ app|title }}
                        {{po.percent_translated|floatformat:2}}%
                        {% with po.untranslated_entries|length as len_untranslated_entries %}
                        {{po.translated_entries|length|add:len_untranslated_entries}}
                        {% endwith %}
                        {{po.translated_entries|length}}
                        {{po.fuzzy_entries|length}}
                        {{po.obsolete_entries|length}}
                        {{ path }}

                    {% endfor %}

    {% endif %}
    {% endfor %}
    {% else %}

{% trans "Nothing to translate!" %}

{% trans "You haven't specified any languages in your settings file, or haven't yet generated a batch of translation catalogs." %}

{% blocktrans with "http://docs.djangoproject.com/en/dev/topics/i18n/#topics-i18n" as i18n_doc_link  %}Please refer to Django's I18N documentation for a guide on how to set up internationalization for your project.{% endblocktrans %}

    {% endif %}
</form>
{% endblock %}


text:
DECLARE_HANDLE32(HSTREAM);
typedef HSTREAM FAR *LPHSTREAM;

enum {
//  OF_READ                 =0x0000,
//  OF_WRITE                =0x0001,
//  OF_READWRITE            =0x0002,
    OF_APPENDFLAG           =0x0004,
    OF_READAPPEND           =0x0006,
    OF_APPEND               =0x0005,

//  OF_SHARE_COMPAT         =0x0000,
//  OF_SHARE_EXCLUSIVE	    =0x0010,
//  OF_SHARE_DENY_WRITE	    =0x0020,
//  OF_SHARE_DENY_READ	    =0x0030,
//  OF_SHARE_DENY_NONE	    =0x0040,

    OF_NOCONVERT            =0x0000,
    OF_LFCONVERT            =0x0100,
    OF_CRCONVERT            =0x0200,
    OF_CRLFCONVERT	    =0x0300,

    OF_CPM_EOF              =0x0400,

    OF_OPENMASK             =0x00f3,    //  mask off private bits for _lopen()
    OF_MODEMASK             =0x0003,    //  basic open mode bits
    OF_CONVERTMASK          =0x0300     //  output conversion mode bits
};

enum {
    STREAM_EOF              = -1,
    STREAM_OPENMODE         = -2,
    STREAM_OPEN             = -3,
    STREAM_REOPEN           = -4,
    STREAM_XSEEK             = -5,
    STREAM_WRITE            = -6,
    STREAM_READ             = -7,
    STREAM_TRUNCATE         = -8,
    STREAM_MEMORY           = -9,
    STREAM_CLOSED           = -10,
    STREAM_NOFILE           = -11,
    STREAM_OVERFLOW         = -12,
    STREAM_OPENCOUNT        = -13,
    STREAM_ARGERROR         = -14
};

#if defined(__cplusplus)
extern "C" {
#endif

UINT FAR PASCAL _EXPORT defaultBuffsize(UINT wNewBuffsize);
UINT FAR PASCAL _EXPORT defaultFormatBuffsize(UINT wNewBuffsize);
UINT FAR PASCAL _EXPORT maxOpenFiles(UINT wNewLimit);
#define openFile _OPENFILE
HSTREAM FAR PASCAL _EXPORT openFile(LPCSTR lpcFilename, WORD wFlags);
int FAR PASCAL _EXPORT lastStreamError(HSTREAM hStream);
LPSTR FAR PASCAL _EXPORT openFileName(HSTREAM hStream);
HFILE FAR PASCAL _EXPORT fileHandle(HSTREAM hStream);
int FAR PASCAL _EXPORT reopenFile(HSTREAM hStream);
int FAR PASCAL _EXPORT flushFile(HSTREAM hStream);
int FAR PASCAL _EXPORT suspendFile(HSTREAM hStream);
int FAR PASCAL _EXPORT closeFile(HSTREAM hStream);
int FAR PASCAL _EXPORT readRawChar(HSTREAM hStream);
int FAR PASCAL _EXPORT readChar(HSTREAM hStream);
int FAR PASCAL _EXPORT readLine(HSTREAM hStream, LPSTR lpLineBuff, UINT wMaxLength);
int FAR PASCAL _EXPORT readBlock(HSTREAM hStream, LPSTR lpBuffer, UINT wLength);
int FAR PASCAL _EXPORT writeRawChar(HSTREAM hStream, char ch);
int FAR PASCAL _EXPORT writeChar(HSTREAM hStream, char ch);
#define writeLine WRITELINE
int FAR _EXPORT writeLine(HSTREAM hStream, LPCSTR lpcLineFormat,...);
int FAR PASCAL _EXPORT writeBlock(HSTREAM hStream, LPCSTR lpBuffer, UINT wLength);
LPCSTR FAR PASCAL _EXPORT readTranslate(HSTREAM hStream, LPCSTR lpcNewTranslate);
LPCSTR FAR PASCAL _EXPORT writeTranslate(HSTREAM hStream, LPCSTR lpcNewTranslate);
int FAR PASCAL _EXPORT readBuffsize(HSTREAM hStream, UINT wNewBuffsize);
int FAR PASCAL _EXPORT writeBuffsize(HSTREAM hStream, UINT wNewBuffsize);
int FAR PASCAL _EXPORT formatBuffsize(HSTREAM hStream, UINT wNewBuffsize);
LONG FAR PASCAL _EXPORT readTell(HSTREAM hStream);
LONG FAR PASCAL _EXPORT writeTell(HSTREAM hStream);
LONG FAR PASCAL _EXPORT readSeek(HSTREAM hStream, LONG lNewPosition);
LONG FAR PASCAL _EXPORT writeSeek(HSTREAM hStream, LONG lNewPosition);
LONG FAR PASCAL _EXPORT truncateFile(HSTREAM hStream);
LONG FAR PASCAL _EXPORT fileSize(HSTREAM hStream);

#if defined(__cplusplus)
}
#endif

#endif


text:
// original copyright below

/*=========================================================================

  Copyright 2004 Sandia Corporation.
  Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
  license for use of this work by or on behalf of the
  U.S. Government. Redistribution and use in source and binary forms, with
  or without modification, are permitted provided that this Notice and any
  statement of authorship are reproduced on all copies.

=========================================================================*/

/*========================================================================
 For general information about using VTK and Qt, see:
 http://www.trolltech.com/products/3rdparty/vtksupport.html
=========================================================================*/

/*========================================================================
 !!! WARNING for those who want to contribute code to this file.
 !!! If you use a commercial edition of Qt, you can modify this code.
 !!! If you use an open source version of Qt, you are free to modify
 !!! and use this code within the guidelines of the GPL license.
 !!! Unfortunately, you cannot contribute the changes back into this
 !!! file.  Doing so creates a conflict between the GPL and BSD-like VTK
 !!! license.
=========================================================================*/

// .SECTION Description
// vtkQtConnection is an internal class.

#ifndef VTK_QT_CONNECTION
#define VTK_QT_CONNECTION

#include "vtkObject.h"
#include "vtkCommand.h"  // for event defines
#include "qobject.h"

#include <MitkOpenViewCoreExports.h>

class QObject;
class vtkCallbackCommand;
class vtkEventQtSlotConnect;

// class for managing a single VTK/Qt connection
// not to be included in other projects
// only here for moc to process for vtkEventQtSlotConnect
class MITKOPENVIEWCORE_EXPORT vtkQtConnection : public QObject
{
  Q_OBJECT

  public:

    // constructor
    vtkQtConnection(vtkEventQtSlotConnect* owner);

    // destructor, disconnect if necessary
    ~vtkQtConnection();

    // print function
    void PrintSelf(ostream& os, vtkIndent indent);

    // callback from VTK to emit signal
    void Execute(vtkObject* caller, unsigned long event, void* client_data);

    // set the connection
    void SetConnection(vtkObject* vtk_obj, unsigned long event,
                       const QObject* qt_obj, const char* slot,
                       void* client_data, float priority=0.0
                         ,Qt::ConnectionType type = Qt::AutoConnection);

    // check if a connection matches input parameters
    bool IsConnection(vtkObject* vtk_obj, unsigned long event,
                      const QObject* qt_obj, const char* slot,
                      void* client_data);

    static void DoCallback(vtkObject* vtk_obj, unsigned long event,
                           void* client_data, void* call_data);

  signals:
    // the qt signal for moc to take care of
    void EmitExecute(vtkObject*, unsigned long, void* client_data, void* call_data, vtkCommand*);

  protected slots:
    void deleteConnection();

  protected:

    // the connection information
    vtkObject* VTKObject;
    vtkCallbackCommand* Callback;
    const QObject* QtObject;
    void* ClientData;
    unsigned long VTKEvent;
    QString QtSlot;
    vtkEventQtSlotConnect* Owner;

  private:
    vtkQtConnection(const vtkQtConnection&);
    void operator=(const vtkQtConnection&);

};

#endif


text:
xpcc has seen some significant changes in the past time and the level of
maturity of xpcc varies between `uncompilable` and `very reliable`.

There are different explicit and implicit test strategies in place for
testing xpcc:

1.	Manual Tests
1.	Manual Integration Tests
1.	Continous Integration
1.	Release Tests
1.	Unit Tests on hosted
1.	Unit Tests on targets

## Manual Tests

When some new drivers were developed the developer often (not always!) tests the new driver with some real hardware (eval board) and a real peripheral at least on one platform with one compiler. The results on different platforms (AVR instead of ARM) and different hardware (eval board) may vary, although by design should not.

Mostly, these tests are only conducted when the development takes place.

## Manual Integration Tests

xpcc is the major platform for all programming efforts of the Robot Association Aachen (Roboterclub Aachen, RCA) at RWTH Aachen University. Some parts of xpcc run on real robots in real competitions. The maturity of these parts at least for RCA's hardware can be expected to be very high. This includes

* the xpcc communication protocol
* the target platforms used in the specific season, e.g.
  * STM32F407 in seasons 2014ff, but only under very specific test conditions, e.g.
    * external 8 MHz oscillator
    * core running at exactly 168 MHz
    * only using UART0, not UART1,
    * et cetera
* the hardware drivers build in the robots (e.g. CAN, VL6180, ...)

The test coverage is unknown but the system has proved to be reliable under conditions of the competition. Nevertheless, some unforseen problems may still occur at any time. Always fasten your seatbelt.

## Continous Integration

xpcc on Github uses TravisCI for CI. A set of test jobs is run with every commit. These include release tests and unit tests.

## Release Test

xpcc covers many different platforms and a huge number of chips. To make sure that at the code at least compiles for all platforms a TravisCI test job is in place as part of the Continous Integration. This only tests compiling on the TravisCI Linux virtual machine. Compiling may fail with different compilers and on different hosts.

To check if simple programs compile for a large set of microcontrollers call

	$ scons check=devices

The test programs that are compiled are located in `xpcc/release/tests` and differ for each platform.

To compile all examples from `xpcc/examples`, run

	$ scons check=examples

This does **not** include actually running the examples.

To compile device checks and examples simply run

	$ scons check

## Unit Tests on Hosted

Some parts of xpcc which do not access hardware directly (like communication protocols, mathematical and logical functions) are tested with a xpcc specific unit test framework.

Tests can be found in the `test` direcotry of each component, e.g. `xpcc/src/xpcc/math/filter/test`. These test check for logic errors in the components. They are compiled for the targed `hosted` (your computer) and run to check the expected result against a predifined and expected result. The test coverage of these tests vary.

Every new software component is expected to have these checks in place when contributed to xpcc.

Unit tests for hosted can be run with

	$ scons unittest

## Unit Tests on Target Platform

A very unique feature of the xpcc unit test framework is that the unit tests can be run on the target platform. This matters because in most cases xpcc is used for cross compiling and the target platform differs at least in one of the following features

 * compiler
   * gcc for x86 vs. arm-none-eabi-gcc vs. avr-gcc
 * word size
   * 64 bits vs. 8 or 32 bits
 * endianness
 * presence of a FPU
   * i7 vs. AVR vs. ARM Cortex-M4f

To cross-compile the set of unittests for STM32 run

	$ scons unittest target=stm32

This will create a binary `xpcc/build/unittest_stm32/executable.elf` that can be manually programmed to STM32 F4 Discovery board. After reset, the unit tests are run and the result of the test is echoed to the serial console (USART2 in case of the STM32 F4 Discovery Board, see runner.cpp for details). The test runner is created from `xpcc/templates/unittest/runner_stm32.cpp.in` and located in `xpcc/build/unittest_stm32/runner.cpp`

Theses tests have not been run for a long time at the time of writing this document. These test must be run and interpreted manually.

All platform and hardware drivers still lack these kind of tests, including external stimuli and waveform verification.

	$ scons unittest target=atmega
	$ scons unittest target=atxmega

## Conclusions and Outlook

xpcc has a varity of testing strategies in place, is being used on a regular basis by Roboterclub Aachen, receives updates and bug fixes frequently and test coverage is constantly improved.


text:
<!--  TODO:   Update TestListName, AutoDetectionDllName -->
<Config>
  <ConfigFilePath>
    <PtfFileName>Bin\CommonTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\CommonTestSuite.ptfconfig</PtfFileName>
    <PtfFileName>Bin\ServerFailoverTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\ServerFailoverTestSuite.ptfconfig</PtfFileName>
    <PtfFileName>Bin\MS-DFSC_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\MS-FSA_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\MS-FSRVP_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\MS-RSVD_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\MS-SQOS_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\Auth_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\MS-SMB2_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Bin\MS-SMB2Model_ServerTestSuite.deployment.ptfconfig</PtfFileName>
  </ConfigFilePath>
  <Adapters>
    <Adapter  displayname="An SUT control adapter" name="ISutProtocolControlAdapter">
      <Adapter type="powershell" name="ISutProtocolControlAdapter" scriptdir=".\"/>
      <Adapter type="interactive" name="ISutProtocolControlAdapter"/>
    </Adapter>
  </Adapters>
  <PtfFileNames>
    <PtfFileName>CommonTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>CommonTestSuite.ptfconfig</PtfFileName>
    <PtfFileName>ServerFailoverTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>ServerFailoverTestSuite.ptfconfig</PtfFileName>
    <PtfFileName>MS-DFSC_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>MS-FSA_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>MS-FSRVP_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>MS-RSVD_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>MS-SQOS_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>Auth_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>MS-SMB2_ServerTestSuite.deployment.ptfconfig</PtfFileName>
    <PtfFileName>MS-SMB2Model_ServerTestSuite.deployment.ptfconfig</PtfFileName>
  </PtfFileNames>
  <DllFileNames>
    <DllFileName>Bin\CommonTestSuite.dll</DllFileName>
    <DllFileName>Bin\ServerFailoverTestSuite.dll</DllFileName>
    <DllFileName>Bin\MS-DFSC_ServerTestSuite.dll</DllFileName>
    <DllFileName>Bin\MS-FSA_ServerTestSuite.dll</DllFileName>
    <DllFileName>Bin\MS-FSRVP_ServerTestSuite.dll</DllFileName>
    <DllFileName>Bin\MS-RSVD_ServerTestSuite.dll</DllFileName>
    <DllFileName>Bin\MS-SQOS_ServerTestSuite.dll</DllFileName>
    <DllFileName>Bin\Auth_ServerTestSuite.dll</DllFileName>
    <DllFileName>Bin\MS-SMB2_ServerTestSuite.dll</DllFileName>
    <DllFileName>Bin\MS-SMB2Model_ServerTestSuite.dll</DllFileName>
  </DllFileNames>
  <AutoDetectionDllName>FileServerPlugin.dll</AutoDetectionDllName>
  <ConfigCaseRule>
    <Group name = "Priority">
      <Rule name = "BVT">
        <Category name = "BVT"/>
      </Rule>
      <Rule name = "Non-BVT">
        <Rule name = "Positive">
          <Category name = "Positive"/>
        </Rule>
        <Rule name = "Negative">
          <Rule name = "Compatibility">
            <Category name = "Compatibility"/>
          </Rule>
          <Rule name = "InvalidIdentifier">
            <Category name = "InvalidIdentifier"/>
          </Rule>
          <Rule name = "OutOfBoundary">
            <Category name = "OutOfBoundary"/>
          </Rule>
          <Rule name = "UnexpectedContext">
            <Category name = "UnexpectedContext"/>
          </Rule>
          <Rule name = "UnexpectedFields">
            <Category name = "UnexpectedFields"/>
          </Rule>
        </Rule>
        <Rule name = "Other Than Above">
          <Category name = "OtherThanAbove"/>
        </Rule>
      </Rule>
    </Group>
    <Group name ="Feature">
      <Rule name = "RSVD (Remote Shared Virtual Disk)">
          <Rule name = "RSVDVersion1">
            <Category name = "RSVDVersion1"/>
          </Rule>
          <Rule name = "RSVDVersion2">
            <Category name = "RSVDVersion2"/>
          </Rule>
      </Rule>
      <Rule name = "SQOS (Storage Quality of Service)">
        <Category name = "SQOS"/>
      </Rule>
      <Rule name = "Auth (Authentication and Authorization)">
        <Rule name = "Authentication">
          <Rule name = "KerberosAuthentication">
            <Category name = "KerberosAuthentication" />
          </Rule>
        </Rule>
        <Rule name = "Authorization">
          <Rule name = "File Access Check">
            <Category name = "FileAccessCheck" />
          </Rule>
          <Rule name = "Folder Access Check">
            <Category name = "FolderAccessCheck" />
          </Rule>
          <Rule name = "Share Access Check">
            <Category name = "ShareAccessCheck" />
          </Rule>
          <Rule name = "Cliam Based Access Control">
            <Category name = "CBAC" />
          </Rule>
        </Rule>
      </Rule>
      <Rule name = "SMB2&3">
        <Rule name = "Negotiate">
          <Category name = "Negotiate"/>
        </Rule>
        <Rule name = "Replay">
          <Category name = "Replay"/>
        </Rule>
        <Rule name = "Credit">
          <Category name = "Credit"/>
        </Rule>
        <Rule name = "Signing">
          <Category name = "Signing"/>
        </Rule>
        <Rule name = "Encryption">
          <Category name = "Encryption"/>
        </Rule>
        <Rule name = "MultipleChannel">
          <Category name = "MultipleChannel"/>
        </Rule>
        <Rule name = "Session">
          <Category name = "Session"/>
        </Rule>
        <Rule name = "Tree">
          <Category name = "Tree"/>
        </Rule>
        <Rule name = "CreateClose">
          <Category name = "CreateClose"/>
        </Rule>
        <Rule name = "Oplock">
          <Rule name = "OplockOnShareWithoutForceLevel2OrSOFS">
            <Category name = "OplockOnShareWithoutForceLevel2OrSOFS" />
          </Rule>
          <Rule name = "OplockOnShareWithoutForceLevel2WithSOFS">
            <Category name = "OplockOnShareWithoutForceLevel2WithSOFS" />
          </Rule>
          <Rule name = "OplockOnShareWithForceLevel2WithoutSOFS">
            <Category name = "OplockOnShareWithForceLevel2WithoutSOFS" />
          </Rule>
          <Rule name = "OplockOnShareWithForceLevel2AndSOFS">
            <Category name = "OplockOnShareWithForceLevel2AndSOFS" />
          </Rule>
        </Rule>
        <Rule name = "DirectoryLeasing">
          <Category name = "DirectoryLeasing"/>
        </Rule>
        <Rule name = "LeaseV1">
          <Category name = "LeaseV1"/>
        </Rule>
        <Rule name = "LeaseV2">
          <Category name = "LeaseV2"/>
        </Rule>
        <Rule name = "DurableHandle">
          <Rule name = "DurableHandleV1BatchOplock">
            <Category name = "DurableHandleV1BatchOplock"/>
          </Rule>
          <Rule name = "DurableHandleV1LeaseV1">
            <Category name = "DurableHandleV1LeaseV1"/>
          </Rule>
          <Rule name = "DurableHandleV2BatchOplock">
            <Category name = "DurableHandleV2BatchOplock"/>
          </Rule>
          <Rule name = "DurableHandleV2LeaseV1">
            <Category name = "DurableHandleV2LeaseV1"/>
          </Rule>
          <Rule name = "DurableHandleV2LeaseV2">
            <Category name = "DurableHandleV2LeaseV2"/>
          </Rule>
          <Rule name = "PersistentHandle">
            <Category name = "PersistentHandle"/>
          </Rule>
        </Rule>
        <Rule name = "Compound">
          <Category name = "Compound"/>
        </Rule>
        <Rule name = "AppInstanceId">
          <Category name = "AppInstanceId"/>
        </Rule>
        <Rule name = "AppInstanceVersion">
          <Category name = "AppInstanceVersion"/>
        </Rule>
        <Rule name = "FSCTL/IOCTL">
          <Rule name = "FsctlLmrRequestResiliency">
            <Category name = "FsctlLmrRequestResiliency"/>
          </Rule>
          <Rule name = "FsctlFileLevelTrim">
            <Category name = "FsctlFileLevelTrim"/>
          </Rule>
          <Rule name = "FsctlValidateNegotiateInfo">
            <Category name = "FsctlValidateNegotiateInfo"/>
          </Rule>
          <Rule name = "FsctlSetGetIntegrityInformation">
            <Category name = "FsctlSetGetIntegrityInformation"/>
          </Rule>
          <Rule name = "FsctlOffloadReadWrite">
            <Category name = "FsctlOffloadReadWrite"/>
          </Rule>
        </Rule>
        <Rule name = "CombinedFeature">
          <Category name = "CombinedFeature"/>
        </Rule>
        <Rule name = "OperateOneFileFromTwoNodes">
          <Category name = "OperateOneFileFromTwoNodes"/>
        </Rule>
        <Rule name = "MixedOplockLease">
          <Category name = "MixedOplockLease"/>
        </Rule>
        <Rule name = "ChangeNotify">
          <Category name = "ChangeNotify"/>
        </Rule>
        <Rule name = "LockUnlock">
          <Category name = "LockUnlock"/>
        </Rule>
        <Rule name = "QueryAndSetFileInfo">
          <Category name = "QueryAndSetFileInfo"/>
        </Rule>
      </Rule>
      <Rule name = "File Server Failover">
        <Category name = "Cluster"/>
      </Rule>
      <Rule name = "FSRVP (File Server Remote VSS)">
        <Category name = "FSRVP"/>
      </Rule>
      <Rule name = "SWN (Service Witness)">
        <Category name = "SWN"/>
      </Rule>
      <Rule name = "DFSC (Distributed File System Referral)">
        <Category name = "DFSC"/>
      </Rule>
      <Rule name = "FSA (File System Algorithms)">
        <Rule name = "OpenFile">
          <Category name = "OpenFile"/>
        </Rule>
        <Rule name = "CreateFile">
          <Category name = "CreateFile"/>
        </Rule>
        <Rule name = "ReadFile">
          <Category name = "ReadFile"/>
        </Rule>
        <Rule name = "WriteFile">
          <Category name = "WriteFile"/>
        </Rule>
        <Rule name = "CloseFile">
          <Category name = "CloseFile"/>
        </Rule>
        <Rule name = "FlushCachedData">
          <Category name = "FlushCachedData"/>
        </Rule>
        <Rule name = "LockAndUnlock">
          <Category name = "LockAndUnlock"/>
        </Rule>
        <Rule name = "ChangeNotification">
          <Category name = "ChangeNotification"/>
        </Rule>
        <Rule name = "IoCtlRequest">
          <Category name = "IoCtlRequest"/>
        </Rule>
        <Rule name = "QueryDirectory">
          <Category name = "QueryDirectory"/>
        </Rule>
        <Rule name = "QueryFileInformation">
          <Category name = "QueryFileInformation"/>
        </Rule>
        <Rule name = "QueryFileSystemInformation">
          <Category name = "QueryFileSystemInformation"/>
        </Rule>
        <Rule name = "QueryQuotaInformation">
          <Category name = "QueryQuotaInformation"/>
        </Rule>
        <Rule name = "QuerySecurityInformation">
          <Category name = "QuerySecurityInformation"/>
        </Rule>
        <Rule name = "SetFileInformation">
          <Category name = "SetFileInformation"/>
        </Rule>
        <Rule name = "SetFileSystemInformation">
          <Category name = "SetFileSystemInformation"/>
        </Rule>
        <Rule name = "SetQuotaInformation">
          <Category name = "SetQuotaInformation"/>
        </Rule>
        <Rule name = "SetSecurityInformation">
          <Category name = "SetSecurityInformation"/>
        </Rule>
      </Rule>
    </Group>
  </ConfigCaseRule>
  <TestCategories>TestCategories.xml</TestCategories>
  <TestSetting>Bin\ServerLocalTestRun.testrunconfig</TestSetting>
</Config>


text:
FROM httpd:2.4
MAINTAINER dev@hc.apache.org

ENV httpd_home /usr/local/apache2
ENV var_dir /var/httpd
ENV www_dir ${var_dir}/www
ENV private_dir ${www_dir}/private

RUN apt-get update
RUN apt-get install -y subversion

RUN mkdir -p ${var_dir}
RUN svn co --depth immediates http://svn.apache.org/repos/asf/httpcomponents/site ${www_dir}
RUN svn up --set-depth infinity ${www_dir}/images
RUN svn up --set-depth infinity ${www_dir}/css

RUN mkdir ${httpd_home}/ssl
COPY server-cert.pem ${httpd_home}/ssl/
COPY server-key.pem ${httpd_home}/ssl/
COPY httpd.conf ${httpd_home}/conf/
COPY httpd-ssl.conf ${httpd_home}/conf/extra/

RUN mkdir -p ${private_dir}
# user: testuser; pwd: nopassword
RUN echo "testuser:{SHA}0Ybo2sSKJNARW1aNCrLJ6Lguats=" > ${private_dir}/.htpasswd
RUN echo "testuser:Restricted Files:73deccd22e07066db8c405e5364335f5" > ${private_dir}/.htpasswd_digest
RUN echo "Big Secret" > ${private_dir}/big-secret.txt

EXPOSE 8080
EXPOSE 8443


text:
package fr.renoux.gaston.util

final case class Context(
    debugMode: Boolean = false,
    tools: Tools = Tools.NoOp
)

object Context {
  val Default: Context = Context()

  @inline def chrono[A](name: String)(a: => A)(implicit c: Context): A = {
    c.tools.chrono(name)(a)
  }
}


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

namespace UIWidgetsSamples {
	[System.Serializable]
	public class TreeViewSampleDataCountry {
		[SerializeField]
		public Sprite Flag;

		[SerializeField]
		public string Name;
	}

	public class TreeViewSampleData : MonoBehaviour {
		[SerializeField]
		TreeViewSample tree;

		[SerializeField]
		List<TreeViewSampleDataCountry> dataEurope = new List<TreeViewSampleDataCountry>();

		[SerializeField]
		List<TreeViewSampleDataCountry> dataAsia = new List<TreeViewSampleDataCountry>();

		void Start()
		{
			tree.Start();

			tree.Nodes = GetData();
		}

		ObservableList<TreeNode<ITreeViewSampleItem>> GetData()
		{
			var countries = new ObservableList<TreeNode<ITreeViewSampleItem>>();
			countries.Add(Node(new TreeViewSampleItemContinent("Africa", 54)));
			countries.Add(Node(new TreeViewSampleItemContinent("Antarctica", 12)));
			countries.Add(Node(new TreeViewSampleItemContinent("Asia", 48), Data2Country(dataAsia)));
			countries.Add(Node(new TreeViewSampleItemContinent("Australia", 4)));
			countries.Add(Node(new TreeViewSampleItemContinent("Europe", 50), Data2Country(dataEurope)));
			countries.Add(Node(new TreeViewSampleItemContinent("North America", 23)));
			countries.Add(Node(new TreeViewSampleItemContinent("South America", 12)));

			return countries;
		}

		ObservableList<TreeNode<ITreeViewSampleItem>> Data2Country(List<TreeViewSampleDataCountry> data)
		{
			var countries = new ObservableList<TreeNode<ITreeViewSampleItem>>();
			data.ForEach(x => countries.Add(Node(new TreeViewSampleItemCountry(x.Name, x.Flag))));

			return countries;
		}

		TreeNode<ITreeViewSampleItem> Node(ITreeViewSampleItem item, ObservableList<TreeNode<ITreeViewSampleItem>> nodes = null)
		{
			return new TreeNode<ITreeViewSampleItem>(item, nodes, false, true);
		}
	}
}


text:
using System.Collections.Generic;
using System.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

namespace Template10.Utils
{
    public static class XamlExtensions
    {
        public static void UpdateBindings(this Page page)
        {
            XamlUtils.UpdateBindings(page);
        }

        public static void InitializeBindings(this Page page)
        {
            XamlUtils.InitializeBindings(page);
        }

        public static void StopTrackingBindings(this Page page)
        {
            XamlUtils.StopTrackingBindings(page);
        }

        public static T FirstAncestor<T>(this DependencyObject control) where T : DependencyObject
        {
            var parent = VisualTreeHelper.GetParent(control) as DependencyObject;
            while (parent != null)
            {
                if (parent is T) return (T)parent;
                parent = VisualTreeHelper.GetParent(parent) as DependencyObject;
            }
            return null;
        }

        public static IList<DependencyObject> AllAncestors(this DependencyObject control)
        {
            var list = new List<DependencyObject>();
            var parent = VisualTreeHelper.GetParent(control);
            if (parent != null)
            {
                list.Add(parent);
                list.AddRange(AllAncestors(parent));
            }
            return list;
        }

        public static T FirstChild<T>(this DependencyObject parent) where T : DependencyObject => XamlUtils.AllChildren<T>(parent).FirstOrDefault();

        public static List<DependencyObject> AllChildren(this DependencyObject parent)
        {
            var list = new List<DependencyObject>();
            var count = VisualTreeHelper.GetChildrenCount(parent);
            for (int i = 0; i < count; i++)
            {
                var child = VisualTreeHelper.GetChild(parent, i);
                list.AddRange(AllChildren(list.AddAndReturn(child)));
            }
            return list;
        }

        public static ElementTheme ToElementTheme(this ApplicationTheme theme)
        {
            switch (theme)
            {
                case ApplicationTheme.Light:
                    return ElementTheme.Light;
                case ApplicationTheme.Dark:
                default:
                    return ElementTheme.Dark;
            }
        }

        public static ApplicationTheme ToApplicationTheme(this ElementTheme theme)
        {
            switch (theme)
            {
                case ElementTheme.Default:
                    return ApplicationTheme.Dark;
                case ElementTheme.Light:
                    return ApplicationTheme.Light;
                case ElementTheme.Dark:
                default:
                    return ApplicationTheme.Dark;
            }
        }

        public static void SetAsNotSet(this DependencyObject o, DependencyProperty dp)
        {
            o.SetValue(dp, DependencyProperty.UnsetValue);
        }

        public static void SetIfNotSet(this DependencyObject o, DependencyProperty dp, object value)
        {
            if (o.ReadLocalValue(dp) == DependencyProperty.UnsetValue)
                o.SetValue(dp, value);
        }
    }
}


text:
#include "Angel.h"

namespace Angel {

	// Create a NULL-terminated string by reading the provided file
	char* readShaderSource(const char* shaderFile)
	{
		FILE *filePointer;
		char *content = NULL;

		int count=0;

		if (shaderFile != NULL) {
			filePointer = fopen(shaderFile,"rt");

			if (filePointer != NULL) {

				fseek(filePointer, 0, SEEK_END);
				count = ftell(filePointer);
				rewind(filePointer);

				if (count > 0) {
					content = (char *)malloc(sizeof(char) * (count+1));
					count = fread(content,sizeof(char),count,filePointer);
					content[count] = '\0';
				}
				fclose(filePointer);
			}
		}
		return content;

	}

	// Create a GLSL program object from vertex and fragment shader files
	GLuint InitShader(const char* vShaderFile, const char* fShaderFile, const char* outputAttributeName)
	{
		struct Shader {
			const char*  filename;
			GLenum       type;
			GLchar*      source;
		}  shaders[2] = {
			{ vShaderFile, GL_VERTEX_SHADER, NULL },
			{ fShaderFile, GL_FRAGMENT_SHADER, NULL }
		};

		GLuint program = glCreateProgram();

		for ( int i = 0; i < 2; ++i ) {
			Shader& s = shaders[i];
			s.source = readShaderSource( s.filename );
			if ( shaders[i].source == NULL ) {
				std::cerr << "Failed to read " << s.filename << std::endl;
				exit( EXIT_FAILURE );
			}
			GLuint shader = glCreateShader( s.type );
			glShaderSource( shader, 1, (const GLchar**) &s.source, NULL );
			glCompileShader( shader );

			GLint  compiled;
			glGetShaderiv( shader, GL_COMPILE_STATUS, &compiled );
			if ( !compiled ) {
				std::cerr << s.filename << " failed to compile:" << std::endl;
				GLint  logSize;
				glGetShaderiv( shader, GL_INFO_LOG_LENGTH, &logSize );
				char* logMsg = new char[logSize];
				glGetShaderInfoLog( shader, logSize, NULL, logMsg );
				std::cerr << logMsg << std::endl;
				delete [] logMsg;

				exit( EXIT_FAILURE );
			}

			delete [] s.source;

			glAttachShader( program, shader );
		}

		/* Link output */
		glBindFragDataLocation(program, 0, outputAttributeName);

		/* link  and error check */
		glLinkProgram(program);

		GLint  linked;
		glGetProgramiv( program, GL_LINK_STATUS, &linked );
		if ( !linked ) {
			std::cerr << "Shader program failed to link" << std::endl;
			GLint  logSize;
			glGetProgramiv( program, GL_INFO_LOG_LENGTH, &logSize);
			char* logMsg = new char[logSize];
			glGetProgramInfoLog( program, logSize, NULL, logMsg );
			std::cerr << logMsg << std::endl;
			delete [] logMsg;

			exit( EXIT_FAILURE );
		}

		/* use program object */
		glUseProgram(program);

		return program;
	}

}  // Close namespace Angel block


text:
package org.eigenbase.applib.variable;

import net.sf.farrago.catalog.*;
import net.sf.farrago.cwm.core.*;
import net.sf.farrago.cwm.instance.*;

import org.eigenbase.applib.resource.*;

/**
 * SQL-invocable function to retrieve the current value of an application
 * variable.
 *
 * @author John V. Sichi
 * @version $Id$
 */
public abstract class GetAppVarUdf
{
    //~ Methods ----------------------------------------------------------------

    public static String execute(String contextId, String varId)
    {
        if (varId == null) {
            throw ApplibResource.instance().AppVarIdRequired.ex();
        }
        FarragoRepos repos = null;
        FarragoReposTxnContext txn = null;
        try {
            repos = AppVarUtil.getRepos();
            txn = repos.newTxnContext(true);
            txn.beginReadTxn();
            CwmExtent context = AppVarUtil.lookupContext(repos, contextId);
            CwmTaggedValue tag =
                AppVarUtil.lookupVariable(
                    repos,
                    context,
                    varId);
            return tag.getValue().equals(AppVarUtil.NULL_APPVAR_VALUE) ? null
                : tag.getValue();
        } catch (Throwable ex) {
            throw ApplibResource.instance().AppVarReadFailed.ex(
                contextId,
                varId,
                ex);
        } finally {
            if (txn != null) {
                txn.commit();
            }
        }
    }
}

// End GetAppVarUdf.java


text:
$(function(){

    refresh_weather = function(){
        $.ajax({
          url: "/weather",
          cache: false
        }).done(function( html ) {
            $( "#ul" ).html( html );
            setTimeout(refresh_weather, 1800000);
        });
    }

    refresh_quote = function(){
        $.ajax({
          url: "/quote",
          cache: false
        }).done(function( html ) {
            $( "#footer" ).fadeOut(7000, function(){
                $( "#footer" ).html(html);
                $( "#footer" ).fadeIn(7000);
                setTimeout(refresh_quote, 60000);
            });
        });
    }

    run_splash_screen = function( sentences ){
        if(sentences == null){
            sentences = [
                "Welcome to Essential Magic Mirror",
                "The place for the fairest of them all",
                "Setting up your experience",
                "And we hope its as beautiful as you!",
            ]
        }

        var update_center = function(sentences, index){
            var container = $("#center")
            //container.html(sentences[index]);
            container.shuffleLetters({"text": sentences[index], "fps":18, "step": 6 })
            index+=1
            if(index < sentences.length){
                setTimeout( function(){update_center(sentences, index)}, 3000 )
            }
            else{
                container.fadeOut(7000, function(){
                    container.html("")
                    container.show()
                })

            }
        }

        update_center(sentences, 0)
    }

    //clock stuff down here
    function showTime() {
        var a_p = "";
        var today = new Date();
        var curr_hour = today.getHours();
        var curr_minute = today.getMinutes();
        var curr_second = today.getSeconds();
        if (curr_hour < 12) {
            a_p = "AM";
        } else {
            a_p = "PM";
        }
        if (curr_hour == 0) {
            curr_hour = 12;
        }
        if (curr_hour > 12) {
            curr_hour = curr_hour - 12;
        }
        curr_hour = checkTime(curr_hour);
        curr_minute = checkTime(curr_minute);
        curr_second = checkTime(curr_second);
        document.getElementById('clock-large').innerHTML=curr_hour + " : " + curr_minute + " " + a_p;

        showDate()
    }

    function checkTime(i) {
        if (i < 10) {
            i = "0" + i;
        }
        return i;
    }

    function showDate(){
        var months = ['Jan', 'Feb', 'Mar', 'April', 'May', 'June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
        var myDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thurs', 'Fri', 'Sat'];
        var date = new Date();
        var day = date.getDate();
        var month = date.getMonth();
        var thisDay = date.getDay(),
            thisDay = myDays[thisDay];
        var yy = date.getYear();
        var year = (yy < 1000) ? yy + 1900 : yy;
        document.getElementById('date-large').innerHTML="" + thisDay + ", "  + " " + months[month] + " " + day + " " + year;
    }

setInterval(showTime, 15000);
setTimeout(refresh_weather, 15000)
setTimeout(refresh_quote, 15000)
run_splash_screen()
//setTimeout()

demo_sentences = [
"Merry Christmas!",
"This is a magic mirror",
"Made with an old tv",
"A two-way mirror",
"A raspberry pi",
"Some handcrafted software",
"All put together with love",
"We wanted you to have these",
"So you see beautiful things every day",
"So Merry Christmas Sweet Love!"
]
setInterval(function(){
run_splash_screen(demo_sentences)}, 60000)

});


text:
<title>
Events
</title>
<link href="css/bootstrap.css" rel="stylesheet">

TECHNICAL PAPER PRESENTATION

Topics

1)   GSM/CDMA Evolution

2)   Reconfigurable Computing

3)  IDE and S/W tools for Embedded Systems

4)  Wi-Fi and Wi-Max

5)  CMOS Sensors and MEMS

6)  Audio, Image and Video Processing

7)  VLSI and SOC

8)  Optoelectronics

9)  Microwave, RF and Wireless Devices

10) Any electronics related topics are welcomes

Guidelines

1)  Maximum of three authors per paper is allowed.

2)	All submission dates should be strictly adhered to.

3)	E-mail your abstracts to: papers@anubhava14.in

4)	In the subject line of your mail, mention the subject as "Category"_"Topic Name"

Example: ECE_Image Processing in Distributed Environment.

It is mandatory to mention the contact numbers of all the authors in the mail containing the abstract.

Note: Failure to mention the contact details will lead to rejection of the abstract.

5)	Full paper must be submitted on or before the final date and in the given specified format. Please be advised that there are marks allocated for the format and layout of the paper.

6)	Participants should bring three hard copies of the papers with them on the day of the event.

7)	Participants should bring a soft copy of their presentation in Powerpoint 2003 format only (.ppt or prezi and not .pptx). They may bring it in a pen drive or CD.

8)	Papers will be selected after a critical review. Panel's decision is final.

Deadlines

1)	Last date for Abstract Submission:

2)	Authors of selected abstracts will be intimated if the abstract is shortlisted

3)	Submission of full paper (.doc format and not .docx).

Contact

Raj : 9944345878

Meena : 8489527234


text:
'use strict';

/*
Feature: Iframe sandbox
*/
describe('Iframe sandbox', function() {

	/*
	Scenario: I can create an iframe
	 */
	context('I can create an iframe', function() {
		describe('When I create an instance with iframeId', function() {
			var mySandbox;
			before(function() {
				mySandbox = new IBox({iframeId: 'testIframe'});
			});
			after(function() {
				mySandbox.destroy();
			});
			it('it should create an iframe with the given id', function() {
				expect($('#testIframe').is('iframe')).to.be.true;
				expect(mySandbox.getIframe().is('iframe')).to.be.true;
			});
			it('it should create an iframe with the given id by calling the create method', function() {
				expect(mySandbox.create('testIframe2').getIframe().is('iframe')).to.be.true;
				expect($('#testIframe2').is('iframe')).to.be.true;
			});
		});

		describe('When I create an instance without an id', function() {
			var mySandbox;
			before(function() {
				mySandbox = new IBox();
			});
			after(function() {
				mySandbox.destroy();
			});
			it('it should create an iframe with a generated id', function() {
				expect(mySandbox.getIframe().is('iframe')).to.be.true;
				expect(mySandbox.getIframe().attr('id')).not.to.be.null;
			});
			it('it should create an iframe with a generated id by calling the create method without arguments', function(){
				expect(mySandbox.create().getIframe().is('iframe')).to.be.true;
				expect(mySandbox.create().getIframe().attr('id')).not.to.be.null;
			});
		});

		describe('When i create a new iframe', function() {
			var mySandbox;
			before(function() {
				mySandbox = new IBox({iframeId: 'testIframe'});
				mySandbox.create('newTestIframe');
			});
			after(function() {
				mySandbox.destroy();
			});
			it('it should remove the previous one', function() {
				expect($('#testIframe').get()).to.be.empty;
			});
		});
	});

	/*
	Scenario: I can visit a page
	 */
	context('I can visit a page', function() {
		describe('When I visit a page', function() {
			var mySandbox;
			before(function(done) {
				mySandbox = new IBox({iframeId: 'testIframe'});
				mySandbox.visitPage('test.html', done);
			});
			after(function() {
				mySandbox.destroy();
			});
			it('it is loaded', function() {
				var text = $('div#message', mySandbox.document()).text();
				expect(text).to.be.eql('Test page loaded');
			});
			it('i can use the $ method reaching the elements inside the iframe', function() {
				expect(mySandbox.$('div#message').get()).not.to.be.empty;
			});
			it('i can access the javascript objects', function() {
				expect(mySandbox.getVar('test')).to.be.eql('something');
			});
		});
	});
});


text:
package dcraft.db;

import dcraft.lang.BigDateTime;
import dcraft.lang.op.OperationResult;
import dcraft.struct.RecordStruct;
import dcraft.struct.builder.ICompositeBuilder;

public interface IComposer {
	void writeField(DatabaseInterface conn, DatabaseTask task, OperationResult log, ICompositeBuilder out,
			TablesAdapter db, String table, String id, BigDateTime when, RecordStruct field,
			boolean historical, boolean compact);
}


text:
def song(first, last=0):
    verses = ''
    for number in reversed(range(last, first + 1)):
        verses += verse(number) + '\n'

    return verses

def verse(number):
    return ''.join([
        "%s of beer on the wall, " % _bottles(number).capitalize(),
        "%s of beer.\n" % _bottles(number),
        _action(number),
        _next_bottle(number),
    ])

def _action(current_verse):
    if current_verse == 0:
        return "Go to the store and buy some more, "
    else:
        return "Take %s down and pass it around, " % (
            "one" if current_verse > 1 else "it"
        )

def _next_bottle(current_verse):
    return "%s of beer on the wall.\n" % _bottles(_next_verse(current_verse))

def _bottles(number):
    if number == 0:
        return 'no more bottles'
    if number == 1:
        return '1 bottle'
    else:
        return '%d bottles' % number

def _next_verse(current_verse):
    return current_verse - 1 if current_verse > 0 else 99


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Statistics of Abbr in UD_English-GUM</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

Treebank Statistics: UD_English-GUM: Features: Abbr

This feature is universal.
It occurs with 1 different values: Yes.

520 tokens (0%) have a non-empty value of Abbr.
178 types (1%) occur at least once with a non-empty value of Abbr.
179 lemmas (1%) occur at least once with a non-empty value of Abbr.
The feature is used with 8 part-of-speech tags: <tt>PROPN</tt> (413; 0% instances), <tt>NOUN</tt> (38; 0% instances), <tt>ADV</tt> (35; 0% instances), <tt>X</tt> (15; 0% instances), <tt>VERB</tt> (9; 0% instances), <tt>ADJ</tt> (6; 0% instances), <tt>ADP</tt> (2; 0% instances), <tt>INTJ</tt> (2; 0% instances).

PROPN

413 <tt>PROPN</tt> tokens (4% of all PROPN tokens) have a non-empty value of Abbr.

The most frequent other feature values with which PROPN and Abbr co-occurred: <tt>Number</tt><tt>=Sing</tt> (407; 99%).

PROPN tokens may have the following values of Abbr:

Yes (413; 100% of non-empty Abbr): US, U.S., NASA, NATO, USI, DH, Mr., St., DAB, UNESCO

EMPTY (9990): States, New, University, York, President, Scientology, north, America, figure, Warhol

Abbr seems to be lexical feature of PROPN. 100% lemmas (157) occur only with one value of Abbr.

NOUN

38 <tt>NOUN</tt> tokens (0% of all NOUN tokens) have a non-empty value of Abbr.

The most frequent other feature values with which NOUN and Abbr co-occurred: <tt>Number</tt><tt>=Sing</tt> (25; 66%).

NOUN tokens may have the following values of Abbr:

Yes (38; 100% of non-empty Abbr): etc., GIS, DNA, p.m., No., Ph.D., a.m., p., DAB, Ed.

EMPTY (28365): people, time, city, day, years, way, world, year, life, today

Abbr seems to be lexical feature of NOUN. 100% lemmas (15) occur only with one value of Abbr.

ADV

35 <tt>ADV</tt> tokens (0% of all ADV tokens) have a non-empty value of Abbr.

The most frequent other feature values with which ADV and Abbr co-occurred: <tt>PronType</tt><tt>=EMPTY</tt> (35; 100%), <tt>Degree</tt><tt>=EMPTY</tt> (34; 97%).

ADV tokens may have the following values of Abbr:

Yes (35; 100% of non-empty Abbr): e.g., i.e., c., ca., approx.

EMPTY (7473): so, when, just, also, then, now, more, very, here, there

X

15 <tt>X</tt> tokens (5% of all X tokens) have a non-empty value of Abbr.

The most frequent other feature values with which X and Abbr co-occurred: <tt>Foreign</tt><tt>=EMPTY</tt> (15; 100%).

X tokens may have the following values of Abbr:

Yes (15; 100% of non-empty Abbr): al., Mlle., e.g.

EMPTY (301): et, de, 1., 2., 1, in, situ, 2, 3, 4

VERB

9 <tt>VERB</tt> tokens (0% of all VERB tokens) have a non-empty value of Abbr.

The most frequent other feature values with which VERB and Abbr co-occurred: <tt>Mood</tt><tt>=EMPTY</tt> (9; 100%), <tt>Number</tt><tt>=EMPTY</tt> (9; 100%), <tt>Person</tt><tt>=EMPTY</tt> (9; 100%), <tt>Tense</tt><tt>=Past</tt> (9; 100%), <tt>VerbForm</tt><tt>=Part</tt> (9; 100%).

VERB tokens may have the following values of Abbr:

Yes (9; 100% of non-empty Abbr): b., d., div., m.

EMPTY (17481): have, know, get, make, said, do, see, go, are, think

ADJ

6 <tt>ADJ</tt> tokens (0% of all ADJ tokens) have a non-empty value of Abbr.

The most frequent other feature values with which ADJ and Abbr co-occurred: <tt>Degree</tt><tt>=Pos</tt> (6; 100%).

ADJ tokens may have the following values of Abbr:

Yes (6; 100% of non-empty Abbr): US, OK, Jr.

EMPTY (11010): other, first, many, new, good, little, different, last, more, such

ADP

2 <tt>ADP</tt> tokens (0% of all ADP tokens) have a non-empty value of Abbr.

ADP tokens may have the following values of Abbr:

Yes (2; 100% of non-empty Abbr): vs.

EMPTY (16128): of, in, to, for, on, with, at, from, by, as

INTJ

2 <tt>INTJ</tt> tokens (0% of all INTJ tokens) have a non-empty value of Abbr.

INTJ tokens may have the following values of Abbr:

Yes (2; 100% of non-empty Abbr): OK

EMPTY (1093): like, oh, yeah, well, so, um, no, yes, uh, okay

Relations with Agreement in Abbr

The 10 most frequent relations where parent and child node agree in Abbr:
<tt>VERB –[<tt>parataxis</tt>]–> VERB</tt> (2; 100%).

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
<?php include 'include_header.php'; ?>

Job Opportunities

			 <button type="button" data-toggle="modal" data-target="#addApplicant" class="mt-3 btn btn-accent w-25" >Apply Now</button>

			<?php foreach ($jobposts as $jobpost) {
			$id = $jobpost['job_id'];
			?>

Job Title

<?php echo $jobpost['job_title'] ?>

Job Description

<?php echo $jobpost['job_description'] ?>

Skills and Qualifications

<?php echo $jobpost['job_qualification'] ?>

			<?php } ?>

<form method="post" action="<?php echo base_url('preemployment/add_applicant')?>" enctype="multipart/form-data">

Register to Apply

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

					<input hidden type="file" name="user_photo" size="20">

  					  <input hidden class="form-control input-sm" id="inputsm" type="text" name="idnum">

					Upload Resume
					<input class="form-control input-sm" id="inputsm" type="file" name="resume">

				Position Applied for
 					<select class="e-dropdown form-control shadow-light text-center f-bold" name="job">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($jobtitles as $jobtitle) {?>
		 	 			<option value="<?php echo $jobtitle['job_id'] ?>">
		 	 				<?php echo $jobtitle['job_title'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

  					  Last Name
  					  <input class="form-control input-sm" id="inputsm" type="text" name="lname" placeholder="Last Name">

  					  First Name
  					  <input class="form-control input-sm" id="inputsm" type="text" name="fname" placeholder="First Name">

  					  Middle Name
  					  <input class="form-control input-sm" id="inputsm" type="text" name="mname" placeholder="Middle Name">

  					  Permanent Address
  					  <input class="form-control input-sm" id="inputsm" type="text" name="address" placeholder="Address">

  					  Email
  					  <input class="form-control input-sm" id="inputsm" type="text" name="email" placeholder="Email Address">

  					  Date of Birth
  					  <input class="form-control input-sm" id="inputsm" type="date" name="birthdate" placeholder="Birthdate">

  					  <input hidden class="form-control input-sm" id="inputsm" type="text" name="tin" placeholder="TIN">

  					  <input hidden class="form-control input-sm" id="inputsm" type="text" name="sss" placeholder="SSS">

				Gender
 					<select class="e-dropdown form-control shadow-light text-center f-bold" name="gender">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($genders as $gender) {?>
		 	 			<option value="<?php echo $gender['gender_id'] ?>">
		 	 				<?php echo $gender['gender_name'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

 					<select hidden class="e-dropdown form-control shadow-light text-center f-bold" name="civilstatus">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($cstatus as $civil) {?>
		 	 			<option value="<?php echo $civil['civilStatus_id'] ?>">
		 	 				<?php echo $civil['civilStatus_name'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

				Religion
 					<select class="e-dropdown form-control shadow-light text-center f-bold" name="religion">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($religion as $rel) {?>
		 	 			<option value="<?php echo $rel['religion_id'] ?>">
		 	 				<?php echo $rel['religion_name'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

 					<select hidden class="e-dropdown form-control shadow-light text-center f-bold" name="employment">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($employment as $emp) {?>
		 	 			<option value="<?php echo $emp['employment_id'] ?>">
		 	 				<?php echo $emp['employment_name'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

 					<select hidden class="e-dropdown form-control shadow-light text-center f-bold" name="department">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($department as $dept) {?>
		 	 			<option value="<?php echo $dept['department_id'] ?>">
		 	 				<?php echo $dept['department_name'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

 					<select hidden class="e-dropdown form-control shadow-light text-center f-bold" name="title">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($title1 as $titl) {?>
		 	 			<option value="<?php echo $titl['title_id'] ?>">
		 	 				<?php echo $titl['title_name'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

 					<select hidden class="e-dropdown form-control shadow-light text-center f-bold" name="location">
 						<option class="text-center" selected disabled>
		  				</option>
					  <?php foreach ($location as $loc) {?>
		 	 			<option value="<?php echo $loc['location_id'] ?>">
		 	 				<?php echo $loc['location_name'] ?>
		 	 			</option>
		 				<?php } ?>
					</select>

  					  <input hidden class="form-control input-sm" id="inputsm" type="text" name="homephone" placeholder="Home Phone">

  					  Contact Number
  					  <input class="form-control input-sm" id="inputsm" type="text" name="contact" placeholder="Contact">

  					  <input hidden class="form-control input-sm" id="inputsm" type="text" name="philhealth" placeholder="Phil Health #">

  					  <input hidden class="form-control input-sm" id="inputsm" type="text" name="pagibig" placeholder="Pagibig #">

  					  <input hidden class="form-control input-sm" id="inputsm" type="date" name="datestarted" placeholder="Date Started">

  					  Citizenship
  					  <input class="form-control input-sm" id="inputsm" type="text" name="citizenship" placeholder="Citizenship">

		        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
		        <button type="submit" class="btn btn-primary">Submit</button>

	</form>

		<a href="<?php echo base_url('/authentication') ?>">Back

<?php include 'include_footer.php'; ?>


text:
/**
 * Created by ggice on 14/12/23.
 */
var crypto = require('crypto');
var express = require('express');

//Build sha1 hash
exports.sha1 = function sha1(text) {
  return crypto.createHash('sha1').update(text).digest('hex');
};

//Build random number 1 to 1000000000000
exports.random = function random() {
  return  Math.random() * (1 - 1000000000000) + 1000000000000;
};

//Javascript clone obj;
exports.jsonClone = function jsonClone(obj) {
  return JSON.parse(JSON.stringify(obj));
};

exports.objClone = function cloneObject(src) {
  var dest = {};
  for (var key in src) {
    if (typeof src === "object") dest[key] = cloneObject(src[key]); else dest[key] = src[key];
  }
  return dest;
};

exports.makeDate = function makeDate(date) {
    try {
        var newDate = new Date(date);
        //在小于10的月份前补0
        var month = eval(newDate.getMonth() + 1) < 10 ? '0'+eval(newDate.getMonth() + 1) : eval(newDate.getMonth() + 1);
        //在小于10的日期前补0
        var day = newDate.getDate() < 10 ? '0' + newDate.getDate() : newDate.getDate();
        //在小于10的小时前补0
        var hours = newDate.getHours() < 10 ? '0' + newDate.getHours() : newDate.getHours();
        //在小于10的分钟前补0
        var minutes = newDate.getMinutes() < 10 ? '0' + newDate.getMinutes() : newDate.getMinutes();
        //在小于10的秒数前补0
        var seconds = newDate.getSeconds() < 10 ? '0' + newDate.getSeconds(): newDate.getSeconds();
        //拼接时间
        var stringDate = newDate.getFullYear() + '-' + month + '-' + day + " " + hours + ":" + minutes + ":" + seconds;
    }catch(e){
        var stringDate = "0000-00-00 00:00:00";
    }finally{
        return stringDate;
    }

};


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Tinymce Amazon S3 Upload Demo</title>
    <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.4/components/reset.min.css" rel="stylesheet" type="text/css"/>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.4/components/container.min.css" rel="stylesheet" type="text/css"/>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.4/components/grid.min.css" rel="stylesheet" type="text/css"/>


text:
const DEFAULT = {
  shown: false,
  config: {
    title: "",
    left: {
      path: "",
      text: ""
    },
    right: {
      path: "",
      text: ""
    }
  }
};

const transition = (state = DEFAULT, action) => {
  switch (action.type) {
    case "SHOW_TRANSITION":
      return {
        shown: true,
        config: action.config
      };
    case "HIDE_TRANSITION":
      return Object.assign({}, state, { shown: false });
    default:
      return state;
  }
};

export default transition;


text:
class LineDetector
{
public:
    LineDetector(ros::NodeHandle &handle);
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud;

private:
    void initLineDetection();

    void DetectLines(int lineThickness, int lineLength, int lineAnchor, int lineContinue);
    void WhitenessFilter(Mat& hsv_image, Mat& result);
    void MultiplyByComplements(Mat* images, Mat* complements, Mat* results);
    void initLineDetection();

    // line thickness in pixels
    int lineThickness;
    // line threshold to be a start
    int lineAnchor;
    // line threshold to continue
    int lineContinue;
    // line length minimum to consider
    int lineLength;

    const int linewidthpixels = 13;

    cv::Mat src_img;
    cv::Mat dst_img;
    cv::Mat kernels[KERNAL_COUNT];
    cv::Mat kernelComplements[KERNAL_COUNT];
    cv::Mat working;
    cv::Mat kernelResults[KERNAL_COUNT];
    cv::Mat complementResults[KERNAL_COUNT];

    void img_callback(const sensor_msgs::ImageConstPtr& msg);

    pcl::PointCloud<pcl::PointXYZ>::Ptr toPointCloud(cv::Mat src);

    void EnforceContinuity(std::vector<cv::Mat>& directions, cv::Mat& out);

    // ROS COMMUNICATION
    image_transport::ImageTransport _it;
    image_transport::Publisher _filt_img;
    image_transport::Subscriber _src_img;
    ros::Publisher _line_cloud;
    tf::TransformListener tf_listener;
};
#endif // LINEDETECTOR_H


text:
namespace School.Tests.Models
{
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Common;
    using Contracts;
    using System.Collections.Generic;
    using Telerik.JustMock;

    [TestClass]
    public class CourseTest
    {
        [TestMethod]
        public void CourseCreate_WithNullName_ShouldThrowAnException()
        {
            Assert.ThrowsException<NullReferenceException>(() => new Course(null));
        }

        [TestMethod]
        public void CourseCreate_WithStringEmptyName_ShouldThrowAnException()
        {
            Assert.ThrowsException<ArgumentException>(() => new Course(string.Empty));
        }

        [TestMethod]
        public void CourseCreate_ShouldProperlySaveTheName()
        {
            var expected = "courseName";

            var course = new Course(expected);

            Assert.AreEqual(expected, course.CourseName);
        }

        [TestMethod]
        public void CourseConstructor_ShouldInstanceCollectionOfStudents()
        {
            var course = new Course("name");

            Assert.IsInstanceOfType(course.StudentsList, typeof(ICollection<IStudent>));
        }

        [TestMethod]
        public void CourseAddStudent_ShouldAddTheStudentInStudentList()
        {
            var student = Mock.Create<IStudent>();

            var course = new Course("name");

            bool isFound = false;

            course.AddStudent(student);

            foreach (var st in course.StudentsList)
            {
                if (st.Equals(student))
                {
                    isFound = true;
                }
            }

            Assert.IsTrue(isFound);
        }

        [TestMethod]
        public void CourseAddStudent_WithNull_ShouldThrowAnException()
        {
            var course = new Course("string");

            Assert.ThrowsException<ArgumentNullException>(() => course.AddStudent(null));
        }

        [TestMethod]
        public void CourseAddStudent_ShouldThrowAnExcception_IfTryToAddSameStudentManyTimes()
        {
            var student = Mock.Create<IStudent>();

            var course = new Course("TheNameDoesntMetter");
            course.AddStudent(student);

            Assert.ThrowsException<InvalidOperationException>(() => course.AddStudent(student));
        }

        [TestMethod]
        public void CourseAddStudent_ShouldThrowAnException_IfTryToAddMoreStudentsThenMaxPosible()
        {
            var course = new Course("name");

            for (int i = 0; i < Constants.MaxStudentsInCourse; i++)
            {
                var student = Mock.Create<IStudent>();
                course.AddStudent(student);
            }

            var stud = Mock.Create<IStudent>();

            Assert.ThrowsException<InvalidOperationException>(() => course.AddStudent(stud));

        }

        [TestMethod]
        public void CourseRemoveStudent_ShouldThrowAnException_IfStudentIsNull()
        {
            var course = new Course("name");

            Assert.ThrowsException<ArgumentNullException>(() => course.RemoveStudent(null));
        }

        [TestMethod]
        public void CourseRemoveStudent_ShouldRemoveStudentFromStudentListProperly()
        {
            var student = Mock.Create<IStudent>();
            var isFound = false;

            var course = new Course("string");

            course.AddStudent(student);

            course.RemoveStudent(student);

            foreach (var st in course.StudentsList)
            {
                if (st.Equals(student))
                {
                    isFound = true;
                }
            }

            Assert.IsFalse(isFound);
        }

        [TestMethod]
        public void CourseRemoveStudent_ShouldThrowAnException_IfRemovedStudentIsNOTinStudentsList()
        {
            var student = Mock.Create<IStudent>();

            var course = new Course("theName");

            Assert.ThrowsException<InvalidOperationException>(() => course.RemoveStudent(student));
        }

        [TestMethod]
        public void CourseToString_ShouldReturnCourseName()
        {
            var name = "thatName";

            var course = new Course(name);

            Assert.AreEqual(name, course.ToString());
        }

    }
}