text:
function createLinks(obj,study_obj)
%createLinks Creates links between different objects.
%
%   createLinks(obj)
%
%   epworks.study.createLinks
%
%   Internally each object is saved with a 128 bit integer which is
%   identified as its "ID" property. In addition, many objects have other
%   properties in their files which are 128 bit integers as well. For
%   example, trace objects, 'epworks.type.ep_trace', have a property called
%   parent. The value of parent is an ID which matches a test object
%   'epworks.type.ep_test' (or more specifically, the value in the 'ID'
%   property of some test object.
%
%   This method should be called after all of the objects are created. Once
%   this is done, each object is asked what it's ID is, as well what other
%   IDs it has (as properties).
%
%   As a simple example, consider the objects a,b, and c, with ID values of
%   1, 2, and 3.
%
%   a.ID = 1
%   a.my_child  = 2
%   a.my_parent = 3
%
%
%   b.ID = 2
%   b.my_parent = 1
%
%   c.ID = 3
%   c.my_child = 1
%
%   A would specify it has an ID of 1, and it wants to get the objects
%   whose ids are 2 & 3. Note, it also specifies that these should be
%   applied to its 'my_child' and 'my_parent' properties respectively.
%   After running 'a' looks like this:
%
%   a.ID = 1
%   a.my_child  = b
%   a.my_parent = c
%
%
%   IMPROVEMENT NOTES:
%   ---------------------------------------------------
%   1) Avoid repmat
%   2) Add another level of indirection to avoid replicating handles
%       => examine need for this after repmat
%   3) Instead of the magic numbers below, identify these properties
%
%
%   See Also:
%   epworks.type.getIDInfo

%Grab information about each object, their IDs, and the properties
%they have which have IDs that need to be matched
%--------------------------------------------------------------------------
n_test_objects = length(study_obj.tests);

MAIN_OBJECT_PROPERTIES = study_obj.TOP_LEVEL_OBJECTS;
N_MAIN_OBJECTS         = length(MAIN_OBJECT_PROPERTIES);

TEST_OBJECT_PROPERTIES = epworks.type.ep_test.OBJECT_PROPERTIES;
N_TEST_SUB_OBJECTS     = length(TEST_OBJECT_PROPERTIES);

all_id_structs    = cell(1,N_MAIN_OBJECTS + N_TEST_SUB_OBJECTS*n_test_objects);

%Method being used:
%   epworks.type.getIDInfo

for iIndex = 1:N_MAIN_OBJECTS
    cur_prop = MAIN_OBJECT_PROPERTIES{iIndex};
    all_id_structs{iIndex} = study_obj.(cur_prop).getIDInfo();
end

cur_index = N_MAIN_OBJECTS;
for iTest = 1:n_test_objects
    cur_test = study_obj.tests(iTest);

    for iTestObject = 1:N_TEST_SUB_OBJECTS
        cur_index       = cur_index + 1;
        cur_object_name = TEST_OBJECT_PROPERTIES{iTestObject};
        all_id_structs{cur_index} = cur_test.(cur_object_name).getIDInfo();
    end
end
%--------------------------------------------------------------------------

%A                 ids: [4x2 uint64]  %ids of these objects
%B             handles: {1x4 cell}    %matlab object references
%         ----------------------------------------------------------
%C          prop_names: {1x24 cell}   %propery names to match
%D     request_handles: {1x24 cell}   %matlab object references
%E         request_ids: [24x2 uint64] %id to match
%
%   NOTE: the 'request_ids' will not be in the set 'ids'

%Somewhere, we have something like:
%B.self_ID    = A
%B.C = E
%
%   When we find an E that matches an A, we grab the corresponding
%   D and replace E with D

%Algorithm, find request_ids that match ids
%for each match, assign to handles the

%Aggregate results ...
%--------------------------------------------------------------------------
self_ids_all = helper__getStructArrayProp(all_id_structs,'ids',1);
ids_to_get   = helper__getStructArrayProp(all_id_structs,'request_ids',1);

prop_names_all      = helper__getStructArrayProp(all_id_structs,'prop_names',2);
request_handles_all = helper__getStructArrayProp(all_id_structs,'request_handles',2);
handles_all         = helper__getStructArrayProp(all_id_structs,'handles',2);

obj.all_object_ids  = self_ids_all;
obj.all_object_refs = handles_all;

%Apply matches
%--------------------------------------------------------------------------
[ispresent,loc] = ismember(ids_to_get,self_ids_all,'rows');

I_match = find(ispresent)';

obj.unmatched_prop_names  = prop_names_all(~ispresent);
obj.unmatched_ids         = ids_to_get(~ispresent,:);
obj.unmatched_class_names = cellfun(@class,request_handles_all(~ispresent),'un',0);

%???? - what do we hold onto for reverse matches ????

%Assignment of the matched objects to the object that requested them
for iProp = I_match
    cur_obj   = request_handles_all{iProp};
    link_obj  = handles_all{loc(iProp)};
    prop_name = prop_names_all{iProp};
    cur_obj.(prop_name) = link_obj;
end
end

function output_value = helper__getStructArrayProp(sa,prop_name,cat_dim)
%
%   This concatenates a field from different structures, where each
%   structure is in a cell array element
%
%   output_value = helper__getStructArrayProp(sa,prop_name,cat_dim)
%
%   INPUTS
%   =======================================================================
%   sa : cell array with a structure inside each element.
%        I forget what I meant sa to stand for :/
%   prop_name : name to extract from each structure
%   cat_dim : dimension to concatenate along
%
temp_cell_values = cellfun(@(x) x.(prop_name),sa,'un',0);
output_value     = cat(cat_dim,temp_cell_values{:});
end


text:
<?php
namespace Procure\Application\Command\PO\Options;

use Application\Domain\Shared\Command\CommandOptions;
use Procure\Domain\Exception\PoUpdateException;

/**
 *
 * @author Nguyen Mau Tri - ngmautri@gmail.com
 *
 */
class PoUpdateHeaderAndPostOptions implements CommandOptions
{

    private $rootEntity;

    private $rootEntityId;

    private $rootEntityToken;

    private $userId;

    private $version;

    private $triggeredBy;

    private $triggeredOn;

    public function __construct($rootEntity, $rootEntityId, $rootEntityToken, $version, $userId, $triggeredBy)
    {
        if ($rootEntity == null) {
            throw new PoUpdateException(sprintf("Root Entity not given! %s", $rootEntity));
        }

        if ($userId == null) {
            throw new PoUpdateException(sprintf("User ID not given! %s", $userId));
        }

        if ($triggeredBy == null || $triggeredBy == "") {
            throw new PoUpdateException(sprintf("Trigger not given! %s", $userId));
        }

        $this->rootEntity = $rootEntity;
        $this->rootEntityId = $rootEntityId;
        $this->rootEntityToken = $rootEntityToken;
        $this->version = $version;
        $this->userId = $userId;
        $this->triggeredBy = $triggeredBy;
    }

    /**
     *
     * @return mixed
     */
    public function getRootEntity()
    {
        return $this->rootEntity;
    }

    /**
     *
     * @return mixed
     */
    public function getRootEntityId()
    {
        return $this->rootEntityId;
    }

    /**
     *
     * @return mixed
     */
    public function getRootEntityToken()
    {
        return $this->rootEntityToken;
    }

    /**
     *
     * @return mixed
     */
    public function getUserId()
    {
        return $this->userId;
    }

    /**
     *
     * @return mixed
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     *
     * @return mixed
     */
    public function getTriggeredBy()
    {
        return $this->triggeredBy;
    }
    /**
     * @return mixed
     */
    public function getTriggeredOn()
    {
        return $this->triggeredOn;
    }

}

redpajama_set_name: RedPajamaGithub


text:
'use strict';

require('babel-register');

import nodeTry from './lib/node-try';

let opts = {
  value: nodeTry,
  writable: true
};

Object.defineProperty(Object.prototype, 'nodeTry', opts);


text:
package org.apache.ignite.internal.binary;

import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URL;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteException;
import org.apache.ignite.Ignition;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.CacheWriteSynchronizationMode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.testframework.GridTestExternalClassLoader;
import org.apache.ignite.testframework.config.GridTestProperties;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.junit.Test;

/**
 * Test class covering feature that allows to unmarshal binary object with custom classloader.
 */
public class BinaryClassLoaderMultiJvmTest extends GridCommonAbstractTest {
    /** Person class name. */
    private static final String PERSON_CLASS_NAME = "org.apache.ignite.tests.p2p.cache.Person";

    /** Enum class name. */
    private static final String ENUM_CLASS_NAME = "org.apache.ignite.tests.p2p.cache.Color";

    /** Organization class name. */
    private static final String ORGANIZATION_CLASS_NAME = "org.apache.ignite.tests.p2p.cache.Organization";

    /** Address class name. */
    private static final String ADDRESS_CLASS_NAME = "org.apache.ignite.tests.p2p.cache.Address";

    /** Enum values. */
    private static final String[] enumVals = {"GREY", "RED", "GREEN", "PURPLE", "LIGHTBLUE"};

    /** Client id. */
    public static final int CLIENT_ID = 1;

    /** {@inheritDoc} */
    @Override protected boolean isMultiJvm() {
        return true;
    }

    /** {@inheritDoc} */
    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
        return super.getConfiguration(igniteInstanceName)
            .setNetworkTimeout(10000)
            .setClientMode(getTestIgniteInstanceName(CLIENT_ID).equals(igniteInstanceName))
            .setCacheConfiguration(
                new CacheConfiguration("SomeCache")
                    .setAtomicityMode(CacheAtomicityMode.ATOMIC)
                    .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC),
                new CacheConfiguration("SomeCacheEnum")
                    .setAtomicityMode(CacheAtomicityMode.ATOMIC)
                    .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC),
                new CacheConfiguration("OrganizationCache")
                    .setAtomicityMode(CacheAtomicityMode.ATOMIC)
                    .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC));
    }

    /**
     * Checks that binary object deserialization works with custom classloader.
     *
     * @throws Exception If failed.
     */
    @Test
    public void testLoadClassFromBinary() throws Exception {
        ClassLoader testClsLdr = new GridTestExternalClassLoader(new URL[] {
            new URL(GridTestProperties.getProperty("p2p.uri.cls"))});

        WeakReference<ClassLoader> clsLdrRef = new WeakReference<>(testClsLdr);

        try {
            Ignite ign = startGrids(2);

            ign.compute(ign.cluster().forRemotes()).broadcast(new IgniteRunnable() {
                @Override public void run() {

                    Ignite client = Ignition.ignite(getTestIgniteInstanceName(CLIENT_ID));

                    ClassLoader clientCestClsLdr;

                    try {
                        clientCestClsLdr = new GridTestExternalClassLoader(new URL[] {
                            new URL(GridTestProperties.getProperty("p2p.uri.cls"))});

                        info("Client name: " + client.name());

                        loadItems(clientCestClsLdr, client);
                        loadOrganization(clientCestClsLdr, client);
                        loadEnumItems(clientCestClsLdr, client);
                    }
                    catch (Exception e) {
                        e.printStackTrace();
                    }

                }
            });

            checkItems(testClsLdr, "SomeCache", PERSON_CLASS_NAME, ign);

            checkItems(testClsLdr, "SomeCacheEnum", ENUM_CLASS_NAME, ign);

            checkItems(testClsLdr, "OrganizationCache", ORGANIZATION_CLASS_NAME, ign);

            testClsLdr = null;

            checkClassCacheEmpty(clsLdrRef);
        }
        finally {
            stopAllGrids();
        }
    }

    /**
     * Checks that binary object deserialization works with custom classloader if called on client side.
     *
     * @throws Exception If failed.
     */
    @Test
    public void testClientLoadClassFromBinary() throws Exception {
        ClassLoader testClsLdr = new GridTestExternalClassLoader(new URL[] {
            new URL(GridTestProperties.getProperty("p2p.uri.cls"))});

        WeakReference<ClassLoader> clsLdrRef = new WeakReference<>(testClsLdr);

        try {
            Ignite ign = startGrids(2);

            ign.compute(ign.cluster().forClients()).broadcast(new IgniteRunnable() {
                @Override public void run() {

                    Ignite client = Ignition.ignite(getTestIgniteInstanceName(CLIENT_ID));

                    ClassLoader clientCestClsLdr;

                    try {
                        clientCestClsLdr = new GridTestExternalClassLoader(new URL[] {
                            new URL(GridTestProperties.getProperty("p2p.uri.cls"))});

                        info("Client name: " + client.name());

                        loadItems(clientCestClsLdr, client);
                        loadOrganization(clientCestClsLdr, client);
                        loadEnumItems(clientCestClsLdr, client);
                    }
                    catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            });

            checkItems(testClsLdr, "SomeCache", PERSON_CLASS_NAME, ign);

            checkItems(testClsLdr, "SomeCacheEnum", ENUM_CLASS_NAME, ign);

            checkItems(testClsLdr, "OrganizationCache", ORGANIZATION_CLASS_NAME, ign);

            testClsLdr = null;

            checkClassCacheEmpty(clsLdrRef);
        }
        finally {
            stopAllGrids();
        }
    }

    /**
     * @param clsLdrRef Weak reference to testclassLoader.
     */
    private void checkClassCacheEmpty(WeakReference<ClassLoader> clsLdrRef) throws IgniteInterruptedCheckedException {
        System.gc();
        System.runFinalization();

        IgniteUtils.sleep(1_000);

        assertNull(clsLdrRef.get());
    }

    /**
     * @param testClsLdr Test class loader.
     * @param ignite Ignite.
     */
    private void checkItems(ClassLoader testClsLdr, String cacheName, String valClsName, Ignite ignite) {
        IgniteCache<Integer, Object> cache = ignite.cache(cacheName);

        IgniteCache<Integer, BinaryObject> binaryCache = cache.withKeepBinary();

        for (int i = 0; i < 100; i++) {

            BinaryObject binaryVal = binaryCache.get(i);

            if (i % 50 == 0)
                try {
                    info("Val: " + binaryVal.toString());
                }
                catch (IgniteException e) {
                    info("Can not execute toString() on class " + binaryVal.type().typeName());
                }

            assertEquals(binaryVal.type().typeName(), valClsName);

            boolean catchEx = false;

            try {
                binaryVal.deserialize();
            }
            catch (BinaryObjectException e) {
                ClassNotFoundException cause = X.cause(e, ClassNotFoundException.class);

                if (cause != null && cause.getMessage().contains(valClsName))
                    catchEx = true;
                else
                    throw e;
            }

            assertTrue(catchEx);

            Object personVal = binaryVal.deserialize(testClsLdr);

            assertTrue(personVal != null && personVal.getClass().getName().equals(valClsName));
        }
    }

    /**
     * @param testClsLdr Test class loader.
     * @param ignite Ignite.
     */
    private void loadItems(ClassLoader testClsLdr, Ignite ignite) throws Exception {
        Constructor personConstructor = testClsLdr.loadClass(PERSON_CLASS_NAME).getConstructor(String.class);

        IgniteCache<Integer, Object> cache = ignite.cache("SomeCache");

        for (int i = 0; i < 100; i++)
            cache.put(i, personConstructor.newInstance("Persone name " + i));

        assertEquals(cache.size(CachePeekMode.PRIMARY), 100);
    }

    /**
     * @param testClsLdr Test class loader.
     * @param ignite Ignite.
     */
    private void loadOrganization(ClassLoader testClsLdr, Ignite ignite) throws Exception {
        Class personCls = testClsLdr.loadClass(PERSON_CLASS_NAME);
        Class addrCls = testClsLdr.loadClass(ADDRESS_CLASS_NAME);

        Constructor personConstructor = testClsLdr.loadClass(PERSON_CLASS_NAME).getConstructor(String.class);
        Constructor addrConstructor = testClsLdr.loadClass(ADDRESS_CLASS_NAME).getConstructor(String.class, Integer.TYPE);
        Constructor organizationConstructor = testClsLdr.loadClass(ORGANIZATION_CLASS_NAME).getConstructor(String.class, personCls, addrCls);

        IgniteCache<Integer, Object> cache = ignite.cache("OrganizationCache");

        for (int i = 0; i < 100; i++)
            cache.put(i, organizationConstructor.newInstance("Organization " + i,
                personConstructor.newInstance("Persone name " + i),
                addrConstructor.newInstance("Street " + i, i)));

        assertEquals(cache.size(CachePeekMode.PRIMARY), 100);
    }

    /**
     * @param testClsLdr Test class loader.
     * @param ignite Ignite.
     */
    private void loadEnumItems(ClassLoader testClsLdr, Ignite ignite) throws Exception {
        Method factoryMtd = testClsLdr.loadClass(ENUM_CLASS_NAME).getMethod("valueOf", String.class);

        IgniteCache<Integer, Object> cache = ignite.cache("SomeCacheEnum");

        for (int i = 0; i < 100; i++)
            cache.put(i, factoryMtd.invoke(null, enumVals[i % enumVals.length]));

        assertEquals(cache.size(CachePeekMode.PRIMARY), 100);
    }

}


text:
package services.support

import java.time.{Clock, Instant, ZoneId}

class SystemClock(val zone: ZoneId) extends Clock {
  override def instant = Instant.ofEpochMilli(millis);
  override def millis = System.currentTimeMillis;
  override def getZone = zone
  override def withZone(zoneId: ZoneId) = {
    if (zone == this.zone) {
      this
    }
    new SystemClock(zone)
  }
}


text:
package com.github.jearls.SPRaceTracker.data.importexport;

public class ImporterExporterException extends Exception {
    public static final long serialVersionUID = 1L;

    public ImporterExporterException() {
    }

    public ImporterExporterException(String message) {
        super(message);
    }

    public ImporterExporterException(Throwable cause) {
        super(cause);
    }

    public ImporterExporterException(String message, Throwable cause) {
        super(message, cause);
    }

    public ImporterExporterException(String message, Throwable cause,
            boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}


text:
"""This module contains code from
Think Python by Allen B. Downey
http://thinkpython.com

Copyright 2012 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html

"""

import math

try:
    # see if Swampy is installed as a package
    from swampy.TurtleWorld import *
except ImportError:
    # otherwise see if the modules are on the PYTHONPATH
    from TurtleWorld import *

def square(t, length):
    """Draws a square with sides of the given length.

    Returns the Turtle to the starting position and location.
    """
    for i in range(4):
        fd(t, length)
        lt(t)

def polyline(t, n, length, angle):
    """Draws n line segments.

    :param t: Turtle object
    :param n: number of line segments
    :param length: length of each segment
    :param angle: degrees between segments
    """
    for i in range(n):
        fd(t, length)
        lt(t, angle)

def polygon(t, n, length):
    """Draws a polygon with n sides.

    :param t: Turtle
    :param n: number of sides
    :param length: length of each side.
    """
    angle = 360.0/n
    polyline(t, n, length, angle)

def arc(t, r, angle):
    """Draws an arc with the given radius and angle.

    :param t: Turtle
    :param r: radius
    :param angle: angle subtended by the arc, in degrees
    """
    arc_length = 2 * math.pi * r * abs(angle) / 360
    n = int(arc_length / 4) + 1
    step_length = arc_length / n
    step_angle = float(angle) / n

    # making a slight left turn before starting reduces
    # the error caused by the linear approximation of the arc
    lt(t, step_angle/2)
    polyline(t, n, step_length, step_angle)
    rt(t, step_angle/2)

def circle(t, r):
    """Draws a circle with the given radius.

    :param t: Turtle
    :param r: radius
    """
    arc(t, r, 360)

def move(t, length):
    """Move Turtle (t) forward (length) units without leaving a trail.
    Leaves the pen down.
    :param t: Turtle
    :param length: Length of turtle movement
    """
    pu(t)
    fd(t, length)
    pd(t)

# the following condition checks whether we are
# running as a script, in which case run the test code,
# or being imported, in which case don't.

if __name__ == '__main__':
    world = TurtleWorld()

    bob = Turtle()
    bob.delay = 0.001

    # draw a circle centered on the origin
    radius = 100
    pu(bob)
    fd(bob, radius)
    lt(bob)
    pd(bob)
    circle(bob, radius)

    move(bob, -160)

    square(bob,60)

    wait_for_user()


text:
In order to improve write performance, QEMU provides the ability to preallocate image files, used
as backing for DataVolumes.

There are several methods for preallocation. CDI uses the best one available, depending on the
underlying file system and device type. It tries to use the OS's `fallocate` call if the filesystem
supports it and falls back to "full" preallocation for block devices. Preallocation does not depend
on the source of the DV, i.e. it can be used for import, upload or blank DVs.

See `qemu-img` [documentation](https://qemu.readthedocs.io/en/latest/system/images.html) to learn
more about preallocation. See also below for considerations regarding different datavolume types.

## Preallocation for a DataVolume

To preallocate space for a DataVolume, use `preallocation` field in DataVolume's spec:

```yaml
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: preallocated-datavolume
spec:
  source:
    ...
  pvc:
    ...
  preallocation: true
```

## Enabling preallocation globally

Preallocation can be also turned on for all DataVolumes with an entry in the `spec.config` of the `CDI` resource:

```bash
kubectl patch cdis.cdi.kubevirt.io cdi -p '{"spec": { "config": { "preallocation": true }}}' -o json --type merge
```

If not specified, the `preallocation` option defaults to false.

## Considerations

Preallocation can be used in the following cases:
- import (any source)
- upload
- cloning
- blank images
- blank block data images.

However, different DataVolume types use different preallocation methods:
- for blank block devices: the space is filled with zeros.
- for cloning volumes: handling sparse files is turned off, so the destination volume is filled in full, even if
  the source volume is not preallocated.
- blank images, upload and import volumes use qemu-img preallocation option, using `falloc` if available, and
  `full` otherwise.


text:
package acmi.l2.clientmod.crypt;

import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class FinishableOutputStream extends FilterOutputStream {
    /**
     * Creates an output stream filter built on top of the specified
     * underlying output stream.
     *
     * @param out the underlying output stream to be assigned to
     *            the field this.out for later use, or
     *            null if this instance is to be
     *            created without an underlying stream.
     */
    public FinishableOutputStream(OutputStream out) {
        super(out);
    }

    /**
     * Finishes writing and flushes data to the output stream without closing
     * the underlying stream.
     *
     * @throws IOException if an I/O error has occurred
     */
    public void finish() throws IOException {
    }

    /**
     * Closes this output stream and releases any system resources
     * associated with this stream. The general contract of close
     * is that it closes the output stream. A closed stream cannot perform
     * output operations and cannot be reopened.
     *

     * The close method of FinishableOutputStream call finish method.
     *
     * @throws IOException if an I/O error occurs.
     */
    @Override
    public void close() throws IOException {
        try {
            finish();
        } finally {
            out.close();
        }
    }
}


text:
<?php

namespace Thinktomorrow\Sling\Exceptions;

class MissingValuesException extends ValidationException{}


text:
exports.info = { FormatID: '1020',
  FormatName: 'LaTeX (Master document)',
  FormatVersion: '',
  FormatAliases: '',
  FormatFamilies: '',
  FormatTypes: 'Text (Mark-up)',
  FormatDisclosure: '',
  FormatDescription: 'This is an outline record only, and requires further details, research or authentication to provide information that will enable users to further understand the format and to assess digital preservation risks associated with it if appropriate. If you are able to help by supplying any additional information concerning this entry, please return to the main PRONOM page and select 'Add an Entry'.',
  BinaryFileFormat: '',
  ByteOrders: '',
  ReleaseDate: '',
  WithdrawnDate: '',
  ProvenanceSourceID: '1',
  ProvenanceName: 'Digital Preservation Department / The National Archives',
  ProvenanceSourceDate: '01 Nov 2010',
  ProvenanceDescription: 'Following up external submission. Signature submitted by representative of KeepIt project at Southampton University.',
  LastUpdatedDate: '01 Nov 2010',
  FormatNote: '',
  FormatRisk: '',
  TechnicalEnvironment: '',
  FileFormatIdentifier: { Identifier: 'fmt/280', IdentifierType: 'PUID' },
  InternalSignature:
   { SignatureID: '296',
     SignatureName: 'LaTeX (Master document)',
     SignatureNote: 'Looking for \\documentclass tag in LaTeX document. Could potentially improve this by including a variant looing for a master document with an include tag, \\include{file.tex}',
     ByteSequence:
      { ByteSequenceID: '395',
        PositionType: 'Absolute from BOF',
        Offset: '0',
        MaxOffset: '4096',
        IndirectOffsetLocation: '',
        IndirectOffsetLength: '',
        Endianness: '',
        ByteSequenceValue: '5C646F63756D656E74636C617373' } },
  RelatedFormat:
   { RelationshipType: 'Has priority over',
     RelatedFormatID: '1021',
     RelatedFormatName: 'LaTeX (Subdocument)',
     RelatedFormatVersion: '' } }


text:
export { AdapterError };
export { errorsHashToArray };
export { errorsArrayToHash };
import Ember from 'ember';
import { assert } from 'ember-data/-private/debug';
import isEnabled from "ember-data/-private/features";

var EmberError = Ember.Error;

var SOURCE_POINTER_REGEXP = /^\/?data\/(attributes|relationships)\/(.*)/;
var SOURCE_POINTER_PRIMARY_REGEXP = /^\/?data/;
var PRIMARY_ATTRIBUTE_KEY = 'base';

/**
  @class AdapterError
  @namespace DS
*/

function AdapterError(errors) {
  var message = arguments.length <= 1 || arguments[1] === undefined ? 'Adapter operation failed' : arguments[1];

  this.isAdapterError = true;
  EmberError.call(this, message);

  this.errors = errors || [{
    title: 'Adapter Error',
    detail: message
  }];
}

var extendedErrorsEnabled = false;
if (false) {
  extendedErrorsEnabled = true;
}

function extendFn(ErrorClass) {
  return function () {
    var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];

    var defaultMessage = _ref.message;

    return extend(ErrorClass, defaultMessage);
  };
}

function extend(ParentErrorClass, defaultMessage) {
  var ErrorClass = function ErrorClass(errors, message) {
    assert('`AdapterError` expects json-api formatted errors array.', Array.isArray(errors || []));
    ParentErrorClass.call(this, errors, message || defaultMessage);
  };
  ErrorClass.prototype = Object.create(ParentErrorClass.prototype);

  if (extendedErrorsEnabled) {
    ErrorClass.extend = extendFn(ErrorClass);
  }

  return ErrorClass;
}

AdapterError.prototype = Object.create(EmberError.prototype);

if (extendedErrorsEnabled) {
  AdapterError.extend = extendFn(AdapterError);
}

/**
  A `DS.InvalidError` is used by an adapter to signal the external API
  was unable to process a request because the content was not
  semantically correct or meaningful per the API. Usually this means a
  record failed some form of server side validation. When a promise
  from an adapter is rejected with a `DS.InvalidError` the record will
  transition to the `invalid` state and the errors will be set to the
  `errors` property on the record.

  For Ember Data to correctly map errors to their corresponding
  properties on the model, Ember Data expects each error to be
  a valid json-api error object with a `source/pointer` that matches
  the property name. For example if you had a Post model that
  looked like this.

  ```app/models/post.js
  import DS from 'ember-data';

  export default DS.Model.extend({
    title: DS.attr('string'),
    content: DS.attr('string')
  });
  ```

  To show an error from the server related to the `title` and
  `content` properties your adapter could return a promise that
  rejects with a `DS.InvalidError` object that looks like this:

  ```app/adapters/post.js
  import Ember from 'ember';
  import DS from 'ember-data';

  export default DS.RESTAdapter.extend({
    updateRecord: function() {
      // Fictional adapter that always rejects
      return Ember.RSVP.reject(new DS.InvalidError([
        {
          detail: 'Must be unique',
          source: { pointer: '/data/attributes/title' }
        },
        {
          detail: 'Must not be blank',
          source: { pointer: '/data/attributes/content'}
        }
      ]));
    }
  });
  ```

  Your backend may use different property names for your records the
  store will attempt extract and normalize the errors using the
  serializer's `extractErrors` method before the errors get added to
  the the model. As a result, it is safe for the `InvalidError` to
  wrap the error payload unaltered.

  @class InvalidError
  @namespace DS
*/
var InvalidError = extend(AdapterError, 'The adapter rejected the commit because it was invalid');

export { InvalidError };
/**
  @class TimeoutError
  @namespace DS
*/
var TimeoutError = extend(AdapterError, 'The adapter operation timed out');

export { TimeoutError };
/**
  @class AbortError
  @namespace DS
*/
var AbortError = extend(AdapterError, 'The adapter operation was aborted');

export { AbortError };
/**
  @class UnauthorizedError
  @namespace DS
*/
var UnauthorizedError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation is unauthorized') : null;

export { UnauthorizedError };
/**
  @class ForbiddenError
  @namespace DS
*/
var ForbiddenError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation is forbidden') : null;

export { ForbiddenError };
/**
  @class NotFoundError
  @namespace DS
*/
var NotFoundError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter could not find the resource') : null;

export { NotFoundError };
/**
  @class ConflictError
  @namespace DS
*/
var ConflictError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation failed due to a conflict') : null;

export { ConflictError };
/**
  @class ServerError
  @namespace DS
*/
var ServerError = extendedErrorsEnabled ? extend(AdapterError, 'The adapter operation failed due to a server error') : null;

export { ServerError };
/**
  @method errorsHashToArray
  @private
*/

function errorsHashToArray(errors) {
  var out = [];

  if (Ember.isPresent(errors)) {
    Object.keys(errors).forEach(function (key) {
      var messages = Ember.makeArray(errors[key]);
      for (var i = 0; i < messages.length; i++) {
        var title = 'Invalid Attribute';
        var pointer = '/data/attributes/' + key;
        if (key === PRIMARY_ATTRIBUTE_KEY) {
          title = 'Invalid Document';
          pointer = '/data';
        }
        out.push({
          title: title,
          detail: messages[i],
          source: {
            pointer: pointer
          }
        });
      }
    });
  }

  return out;
}

/**
  @method errorsArrayToHash
  @private
*/

function errorsArrayToHash(errors) {
  var out = {};

  if (Ember.isPresent(errors)) {
    errors.forEach(function (error) {
      if (error.source && error.source.pointer) {
        var key = error.source.pointer.match(SOURCE_POINTER_REGEXP);

        if (key) {
          key = key[2];
        } else if (error.source.pointer.search(SOURCE_POINTER_PRIMARY_REGEXP) !== -1) {
          key = PRIMARY_ATTRIBUTE_KEY;
        }

        if (key) {
          out[key] = out[key] || [];
          out[key].push(error.detail || error.title);
        }
      }
    });
  }

  return out;
}


text:
#pragma once
#include <aws/robomaker/RoboMaker_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{

namespace RoboMaker
{
namespace RoboMakerEndpoint
{
AWS_ROBOMAKER_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace RoboMakerEndpoint
} // namespace RoboMaker
} // namespace Aws


text:
//-----------------------------------------------------------------------
// <summary>Defines the TeamMailbox lifecycle state enumeration.</summary>
//-----------------------------------------------------------------------

namespace Microsoft.Exchange.WebServices.Data
{
    /// <summary>
    /// TeamMailbox lifecycle state
    /// </summary>
    public enum TeamMailboxLifecycleState
    {
        /// <summary>
        /// Active
        /// </summary>
        [EwsEnum("Active")]
        Active,

        /// <summary>
        /// Closed
        /// </summary>
        [EwsEnum("Closed")]
        Closed,

        /// <summary>
        /// Unlinked
        /// </summary>
        [EwsEnum("Unlinked")]
        Unlinked,

        /// <summary>
        /// PendingDelete
        /// </summary>
        [EwsEnum("PendingDelete")]
        PendingDelete,
    }
}


text:
"""
flask-mongo-sessions
====================

Server-side sessions for Flask with MongoDB.

Documentation: https://flask-mongo-sessions.readthedocs.org/en/latest/
"""
from setuptools import setup

setup(
    name='flask-mongo-sessions',
    version='0.2.1',
    url='https://github.com/ivanyu/flask-mongo-sessions',
    license='MIT',
    author='Ivan Yurchenko',
    author_email='ivan0yurchenko@gmail.com',
    maintainer='Ivan Yurchenko',
    maintainer_email='ivan0yurchenko@gmail.com',
    description='Server-side sessions for Flask with MongoDB',
    long_description=__doc__,
    py_modules=['flask_mongo_sessions', 'flask_mongo_sessions.tests'],
    zip_safe=False,
    include_package_data=True,
    platforms='any',
    install_requires=[
        'Flask>=0.8',
        'Flask-PyMongo',
    ],
    classifiers=[
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ],
    keywords="flask mongodb pymongo flask-pymongo "
             "mongoengine flask-mongoengine",
    test_suite='flask_mongo_sessions.tests.suite',
)


text:
class Greeting : public QObject
{
    Q_OBJECT

public:
    Greeting();

private slots:
    void handleRequest(QHttpRequest *req, QHttpResponse *resp);
};


text:
"""IPv4 Flowspec NLRI
"""

class IPv4FlowSpec(object):

    @classmethod
    def parse(cls, value):
        """
        parse IPv4 flowspec NLRI
        :param value:
        :return:
        """
        pass

    @classmethod
    def construct(cls, value):
        pass


text:
@import url(font-awesome.min.css);
@import url(fonts-myriad-set-pro-200.css);
@import url(reset.css);
.hide {
  display: none !important;
}

.unselectable {
  -moz-user-select: -moz-none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  /*
    Introduced in IE 10.
    See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/
  */
  -ms-user-select: none;
  user-select: none;
}

.clearfix:after {
  clear: both;
  content: ".";
  display: block;
  height: 0;
  visibility: hidden;
}

ul.inline-list li {
  display: inline-block;
}


text:
require 'test_helper'

module GuardDog
  class AccessControllerTest < ActionController::TestCase
    # test "the truth" do
    #   assert true
    # end
  end
end


text:
package com.oriongate.web.web_app.user_access.forgotpassword.pages;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import com.oriongate.web.web_app.core.pages.PageTitle;
import com.orionplatform.web.app.pages.OrionPageService;
import com.orionplatform.web.app.pages.OrionPageTitle;

@Controller
public class ForgotPasswordPageService extends OrionPageService
{
    public static final String RESET_PASSWORD_URL = "https://localhost/resetpassword/";
    public static final String COMPANY_NAME = "OrionGate";

    @GetMapping(value = "/forgotpassword")
    public String openForgotPasswordPage(HttpServletRequest request, HttpServletResponse response, Model model)
    {
        model.addAttribute("pageTitle", PageTitle.forgotPassword);
        return "useraccess/forgotpassword/forgotPassword";
    }

    /*@PostMapping(value = "/forgotpassword/ajax", produces = "application/json")
    public @ResponseBody ForgotPasswordResponseBean processAJAX(HttpServletRequest request, HttpServletResponse response, Model model)
    {
        ForgotPasswordResponseBean forgotPasswordResponseBean = null;
        ForgotPasswordService forgotPasswordService = new ForgotPasswordServiceImpl();
        Map<String, String[]> parameterMap = request.getParameterMap();
        final String action = parameterMap.get("ajax_action")[0];

        if(action != null && AJAXAction.DOES_USER_EXIST.equals(action))
        {
            String userName = parameterMap.get("input_username")[0].trim().toLowerCase();
            boolean userExists = OrionUsersDAO.doesUserExist(userName);
            forgotPasswordResponseBean = new ForgotPasswordResponseBean();
            forgotPasswordResponseBean.setUserExists(userExists);
        }
        else if(action != null && AJAXAction.REQUEST_PASSWORD_CHANGE.equals(action))
        {
            String userName = parameterMap.get("input_username")[0].trim().toLowerCase();
            EmailerConfigurationServiceImpl.registerConfiguration();
            forgotPasswordResponseBean = forgotPasswordService.requestPasswordChange(userName, RESET_PASSWORD_URL, COMPANY_NAME);
        }

        return forgotPasswordResponseBean;
    }*/
}


text:
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.mojo;

import java.nio.ByteBuffer;
import java.util.Random;

/**
 * Utilities methods for tests.
 */
public final class TestUtils {

    private static final Random RANDOM = new Random();

    /**
     * Returns a new direct ByteBuffer of the given size with random (but reproducible) data.
     */
    public static ByteBuffer newRandomBuffer(int size) {
        byte bytes[] = new byte[size];
        RANDOM.setSeed(size);
        RANDOM.nextBytes(bytes);
        ByteBuffer data = ByteBuffer.allocateDirect(size);
        data.put(bytes);
        data.flip();
        return data;
    }

}


text:
.doraemon {
    position: relative;
    text-align: center;
    margin: 0 auto;
    width: 210px;
}

.doraemon .doraemon-head {
    position: relative;
    width: 210px;
    height: 200px;
    border-radius: 50%;
    background-color: #019fe8;
    border: 1px solid #000;
    z-index: 100;
}

.doraemon .doraemon-head .doraemon-eye {
    position: relative;
    width: 50px;
    height: 55px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #000;
    z-index: 10;
}

.doraemon .doraemon-head .doraemon-eye-left {
    position: absolute;
    left: 53px;
    top: 10px;
}

.doraemon .doraemon-head .doraemon-eye-right {
    position: absolute;
    left: 105px;
    top: 10px;
}

.doraemon .doraemon-head .doraemon-eyeball {
    content: '';
    position: absolute;
    width: 15px;
    height: 16px;
    background-color: #000;
    border-radius: 50%;
}

.doraemon .doraemon-head .doraemon-eyeball:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 5px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
}

.doraemon .doraemon-head .doraemon-eyeball-left {
    bottom: 10px;
    right: 5px;
}

.doraemon:hover .doraemon-head .doraemon-eyeball-left {
    background-color: transparent;
    bottom: 3px;
    right: 13px;
}

.doraemon:hover .doraemon-head .doraemon-eyeball-left:before {
    content: '\005E';
    font-size: 1.5em;
    height: 1.5em;
    width: 1.5em;
    background-color: transparent;
}

.doraemon .doraemon-head .doraemon-eyeball-right {
    bottom: 10px;
    left: 5px;
}

.doraemon .doraemon-head .doraemon-mask {
    position: absolute;
    top: 40px;
    left: 15px;
    width: 180px;
    height: 160px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #000;
}

.doraemon .doraemon-head .doraemon-nose {
    position: absolute;
    top: 55px;
    left: 90px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f00;
    border: 1px solid #000;
    z-index: 20;
}

.doraemon .doraemon-head .doraemon-nose:before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
}

.doraemon .doraemon-head .doraemon-bridge {
    position: absolute;
    top: 86px;
    left: 105px;
    width: 0px;
    height: 75px;
    border: 1px solid #000;
    z-index: 20;
}

.doraemon .doraemon-head .doraemon-beard {
    position: absolute;
    width: 40px;
    border: 1px solid #000;
}

.doraemon .doraemon-head .doraemon-beard-left-1 {
    top: 86px;
    left: 40px;
    -ms-transform: rotate(10deg); /* IE 9 */
    -webkit-transform: rotate(10deg); /* Chrome, Safari, Opera */
    transform: rotate(10deg);
}

.doraemon .doraemon-head .doraemon-beard-left-2 {
    top: 106px;
    left: 40px;
    -ms-transform: rotate(5deg); /* IE 9 */
    -webkit-transform: rotate(5deg); /* Chrome, Safari, Opera */
    transform: rotate(5deg);
}

.doraemon .doraemon-head .doraemon-beard-left-3 {
    top: 126px;
    left: 40px;
    -ms-transform: rotate(-5deg); /* IE 9 */
    -webkit-transform: rotate(-5deg); /* Chrome, Safari, Opera */
    transform: rotate(-5deg);
}

.doraemon .doraemon-head .doraemon-beard-right-1 {
    top: 86px;
    left: 130px;
    -ms-transform: rotate(170deg); /* IE 9 */
    -webkit-transform: rotate(170deg); /* Chrome, Safari, Opera */
    transform: rotate(170deg);
}

.doraemon .doraemon-head .doraemon-beard-right-2 {
    top: 106px;
    left: 130px;
    -ms-transform: rotate(175deg); /* IE 9 */
    -webkit-transform: rotate(175deg); /* Chrome, Safari, Opera */
    transform: rotate(175deg);
}

.doraemon .doraemon-head .doraemon-beard-right-3 {
    top: 126px;
    left: 130px;
    -ms-transform: rotate(-175deg); /* IE 9 */
    -webkit-transform: rotate(-175deg); /* Chrome, Safari, Opera */
    transform: rotate(-175deg);
}

.doraemon .doraemon-head .doraemon-mouse {
    position: absolute;
    top: 141px;
    left: 0px;
    width: 100%;
    text-align: center;
    z-index: 20;
}

.doraemon .doraemon-head .doraemon-mouse .doraemon-mouse-left {
    display: inline-block;
    width: 70px;
    margin-right: -5px;
    background-color: #fff;
    border: 1px solid #000;
    -ms-transform: rotate(20deg); /* IE 9 */
    -webkit-transform: rotate(20deg); /* Chrome, Safari, Opera */
    transform: rotate(20deg);
}

.doraemon .doraemon-head .doraemon-mouse .doraemon-mouse-right {
    display: inline-block;
    width: 70px;
    margin-left: -5px;
    background-color: #fff;
    border: 1px solid #000;
    -ms-transform: rotate(-20deg); /* IE 9 */
    -webkit-transform: rotate(-20deg); /* Chrome, Safari, Opera */
    transform: rotate(-20deg);
}

.doraemon .doraemon-necklace {
    position: relative;
    width: 130px;
    height: 15px;
    margin-top: -15px;
    margin-left: 40px;
    background-color: #f00;
    border: 1px solid #000;
    border-top-left-radius: 30%;
    border-top-right-radius: 30%;
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    z-index: 300;
}

.doraemon .doraemon-bell {
    position: relative;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: 95px;
    background-color: #ffe200;
    border: 1px solid #000;
    border-radius: 50%;
    z-index: 300;
}

.doraemon .doraemon-bell .doraemon-bell-round {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 5px;
    height: 5px;
    background-color: #000;
    border-radius: 50%;
}

.doraemon .doraemon-bell .doraemon-bell-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 1px;
    height: 7.5px;
    background-color: #000;
}

.doraemon .doraemon-body {
    position: relative;
    width: 160px;
    height: 130px;
    margin-top: -5px;
    margin-left: 25px;
    background-color: #019fe8;
    border-bottom: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    border-bottom-left-radius: 15%;
    border-bottom-right-radius: 15%;
    z-index: 200;
}

.doraemon .doraemon-body .doraemon-body-scarf {
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    margin: auto;
    width: 130px;
    height: 110px;
    background-color: #fff;
    border-radius: 50%;
    border: 1px solid #000;
}

.doraemon .doraemon-body .doraemon-body-pocket {
    position: absolute;
    top: -50px;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 90px;
    height: 80px;
    background-color: #fff;
    border-radius: 50%;
    border: 1px solid #000;
}

.doraemon .doraemon-body .doraemon-body-pocket-mask {
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    margin: auto;
    width: 95px;
    height: 42.5px;
    background-color: #fff;
    border-bottom: 1px solid #000;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
}

.doraemon .doraemon-arm {
    position: absolute;
    width: 50px;
    height: 110px;
    background-color: #019fe8;
    border-bottom: 1px solid #000;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    border-radius: 25%;
}

.doraemon .doraemon-arm.doraemon-arm-left {
    top: 135px;
    left: -5px;
    -webkit-animation: wave-left 1s infinite; /* Chrome, Safari, Opera */
    animation: wave-left 1s infinite;
    -webkit-animation-direction: alternate; /* Chrome, Safari, Opera */
    animation-direction: alternate;
}

.doraemon .doraemon-arm.doraemon-arm-right {
    top: 135px;
    right: -5px;
    -webkit-animation: wave-right 1s infinite; /* Chrome, Safari, Opera */
    animation: wave-right 1s infinite;
    -webkit-animation-direction: alternate; /* Chrome, Safari, Opera */
    animation-direction: alternate;
}

.doraemon .doraemon-hand {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border: 1px solid #000;
    border-radius: 50%;
    z-index: 10;
}

.doraemon .doraemon-hand.doraemon-hand-left {
    top: 90px;
    left: -5px;
}

.doraemon .doraemon-hand.doraemon-hand-right {
    top: 90px;
    right: 0px;
}

.doraemon .doraemon-leg {
    position: relative;
    width: 80px;
    height: 20px;
    background-color: #fff;
    border: 1px solid #000;
    z-index: 300;
}

.doraemon .doraemon-leg.doraemon-leg-left {
    display: inline-block;
    margin-top: -10px;
    border-radius: 40%;
}

.doraemon .doraemon-leg.doraemon-leg-right {
    display: inline-block;
    margin-top: -10px;
    border-radius: 40%;
}

/* Chrome, Safari, Opera */
@-webkit-keyframes wave-left {
    from {
        -ms-transform: rotate(135deg); /* IE 9 */
        -webkit-transform: rotate(135deg); /* Chrome, Safari, Opera */
        transform: rotate(135deg);
    }
    to {
        -ms-transform: rotate(105deg); /* IE 9 */
        -webkit-transform: rotate(105deg); /* Chrome, Safari, Opera */
        transform: rotate(105deg);
    }
}

/* Standard syntax */
@keyframes wave-left {
    from {
        -ms-transform: rotate(135deg); /* IE 9 */
        -webkit-transform: rotate(135deg); /* Chrome, Safari, Opera */
        transform: rotate(135deg);
    }
    to {
        -ms-transform: rotate(105deg); /* IE 9 */
        -webkit-transform: rotate(105deg); /* Chrome, Safari, Opera */
        transform: rotate(105deg);
    }
}

/* Chrome, Safari, Opera */
@-webkit-keyframes wave-right {
    from {
        -ms-transform: rotate(-135deg); /* IE 9 */
        -webkit-transform: rotate(-135deg); /* Chrome, Safari, Opera */
        transform: rotate(-135deg);
    }
    to {
        -ms-transform: rotate(-120deg); /* IE 9 */
        -webkit-transform: rotate(-120deg); /* Chrome, Safari, Opera */
        transform: rotate(-120deg);
    }
}

/* Standard syntax */
@keyframes wave-right {
    from {
        -ms-transform: rotate(-135deg); /* IE 9 */
        -webkit-transform: rotate(-135deg); /* Chrome, Safari, Opera */
        transform: rotate(-135deg);
    }
    to {
        -ms-transform: rotate(-120deg); /* IE 9 */
        -webkit-transform: rotate(-120deg); /* Chrome, Safari, Opera */
        transform: rotate(-120deg);
    }
}


text:
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.xml.index;

import com.intellij.util.xml.NanoXmlBuilder;
import com.intellij.util.xml.NanoXmlUtil;
import com.intellij.xml.util.XmlUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Dmitry Avdeev
 */
public class XsdTagNameBuilder implements NanoXmlBuilder {
  @NotNull
  public static Collection<String> computeTagNames(final InputStream is) {
    return computeTagNames(new InputStreamReader(is));
  }

  @NotNull
  public static Collection<String> computeTagNames(@NotNull Reader reader) {
    try {
      final XsdTagNameBuilder builder = new XsdTagNameBuilder();
      NanoXmlUtil.parse(reader, builder);
      return builder.myTagNames;
    }
    finally {
      try {
        if (reader != null) {
          reader.close();
        }
      }
      catch (IOException e) {
        // can never happen
      }
    }
  }

  private final Collection<String> myTagNames = new ArrayList<>();
  private boolean myElementStarted;

  @Override
  public void startElement(@NonNls final String name, @NonNls final String nsPrefix, @NonNls final String nsURI, final String systemID, final int lineNr)
      throws Exception {

    myElementStarted = nsPrefix != null && nsURI.equals(XmlUtil.XML_SCHEMA_URI) && name.equals("element");
  }

  @Override
  public void addAttribute(@NonNls final String key, final String nsPrefix, final String nsURI, final String value, final String type)
      throws Exception {
    if (myElementStarted && key.equals("name")) {
      myTagNames.add(value);
      myElementStarted = false;
    }
  }
}


text:
#ifndef color_hsi_place_intensity
#define color_hsi_place_intensity

// ::color::place::intensity<category_name>()

#include "../../generic/place/intensity.hpp"
#include "../category.hpp"
#include "../trait/index.hpp"

 namespace color
  {
   namespace place
    {
     namespace _internal
      {

       template< typename tag_name >
        struct intensity< ::color::category::hsi< tag_name > >
         {
          public:
           typedef ::color::category::hsi< tag_name > category_type;
           typedef typename ::color::trait::index< category_type >::instance_type index_instance_type;

           enum { position_enum = 2 };
           enum { has_enum = true };

           static /*constexpr*/ index_instance_type position()
            {
             return position_enum;
            }
         };

      }
    }
  }

#endif


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Lejeunia, n. s. 119: 10 (1986)

#### Original name
Muellerella triseptata Diederich

### Remarks
null


text:
tinyrpc: A small and modular way of handling web-related RPC
============================================================

Motivation
----------

As of this writing (in Jan 2013) there are a few jsonrpc_ libraries already out
there on PyPI_, most of them handling one specific use case (e.g. json via
WSGI, using Twisted, or TCP-sockets).

None of the libraries, however, made it easy to reuse the jsonrpc_-parsing bits
and substitute a different transport (i.e. going from json_ via TCP_ to an
implementation using WebSockets_ or 0mq_).

In the end, all these libraries have their own dispatching interfaces and a
custom implementation of handling jsonrpc_.

``tinyrpc`` aims to do better by dividing the problem into cleanly
interchangeable parts that allow easy addition of new transport methods, RPC
protocols or dispatchers.

Documentation
-------------

You'll quickly find that ``tinyrpc`` has more documentation and tests than core
code, hence the name. See the documentation at
<https://tinyrpc.readthedocs.org> for more details, especially the
Structure-section to get a birds-eye view.

Installation
------------

.. code-block:: sh

   pip install tinyrpc

.. _jsonrpc: http://www.jsonrpc.org/
.. _PyPI: http://pypi.python.org
.. _json: http://www.json.org/
.. _TCP: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
.. _WebSockets: http://en.wikipedia.org/wiki/WebSocket
.. _0mq: http://www.zeromq.org/


text:
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans with title=page.title %}Copy {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
    {% trans "Copy" as copy_str %}
    {% include "wagtailadmin/shared/header.html" with title=copy_str subtitle=page.title icon="doc-empty-inverse" %}

        <form action="{% url 'wagtailadmin_pages:copy' page.id %}" method="POST">
            {% csrf_token %}

                {% include "wagtailadmin/shared/field_as_li.html" with field=form.new_title %}
                {% include "wagtailadmin/shared/field_as_li.html" with field=form.new_slug %}
                {% include "wagtailadmin/shared/field_as_li.html" with field=form.new_parent_page %}

                {% if form.copy_subpages %}
                    {% include "wagtailadmin/shared/field_as_li.html" with field=form.copy_subpages %}
                {% endif %}

                {% if form.publish_copies %}
                    {% include "wagtailadmin/shared/field_as_li.html" with field=form.publish_copies %}
                {% endif %}

            <input type="submit" value="{% trans 'Copy this page' %}">
        </form>

{% endblock %}

{% block extra_js %}
    {{ block.super }}
    {% include "wagtailadmin/pages/_editor_js.html" %}
{% endblock %}


text:
<?php

App::uses('CakeEventListener', 'Event');
App::uses('Cache', 'Cache');

/**
 * Nodes Event Handler
 *
 * @category Event
 * @package  Croogo.Nodes.Event
 * @license  http://www.opensource.org/licenses/mit-license.php The MIT License
 * @link     http://www.croogo.org
 */
class NodesEventHandler implements CakeEventListener {

/**
 * implementedEvents
 */
	public function implementedEvents() {
		return array(
			'Croogo.bootstrapComplete' => array(
				'callable' => 'onBootstrapComplete',
			),
			'Croogo.setupAdminData' => array(
				'callable' => 'onSetupAdminData',
			),
			'Controller.Links.setupLinkChooser' => array(
				'callable' => 'onSetupLinkChooser',
			),
			'Controller.Nodes.afterPublish' => array(
				'callable' => 'onAfterBulkProcess',
			),
			'Controller.Nodes.afterUnpublish' => array(
				'callable' => 'onAfterBulkProcess',
			),
			'Controller.Nodes.afterPromote' => array(
				'callable' => 'onAfterBulkProcess',
			),
			'Controller.Nodes.afterUnpromote' => array(
				'callable' => 'onAfterBulkProcess',
			),
			'Controller.Nodes.afterDelete' => array(
				'callable' => 'onAfterBulkProcess',
			),
		);
	}

/**
 * Setup admin data
 */
	public function onSetupAdminData($event) {
		$View = $event->subject;
          return false;//stop rending content menu children
		if (empty($View->viewVars['types_for_admin_layout'])) {
			$types = array();
		} else {
			$types = $View->viewVars['types_for_admin_layout'];
		}
		foreach ($types as $t) {
			if (!empty($t['Type']['plugin'])) {
				continue;
			}
			CroogoNav::add('sidebar', 'content.children.create.children.' . $t['Type']['alias'], array(
				'title' => $t['Type']['title'],
				'url' => array(
					'plugin' => 'nodes',
					'admin' => true,
					'controller' => 'nodes',
					'action' => 'add',
					$t['Type']['alias'],
				),
			));
		};
	}

/**
 * onBootstrapComplete
 */
	public function onBootstrapComplete($event) {
		if (CakePlugin::loaded('Comments')) {
			App::uses('Comment', 'Comments.Model');
			Croogo::hookBehavior('Node', 'Comments.Commentable');
			Croogo::hookComponent('Nodes', 'Comments.Comments');
			Croogo::hookModelProperty('Comment', 'belongsTo', array(
				'Node' => array(
					'className' => 'Nodes.Node',
					'foreignKey' => 'foreign_key',
					'counterCache' => true,
					'counterScope' => array(
						'Comment.model' => 'Node',
						'Comment.status' => Comment::STATUS_APPROVED,
					),
				),
			));
		}
		if (CakePlugin::loaded('Taxonomy')) {
			Croogo::hookBehavior('Node', 'Taxonomy.Taxonomizable');
		}
		if (CakePlugin::loaded('Meta')) {
			Croogo::hookBehavior('Node', 'Meta.Meta');
		}
	}

/**
 * Setup Link chooser values
 *
 * @return void
 */
	public function onSetupLinkChooser($event) {
		$Type = ClassRegistry::init('Taxonomy.Type');
		$types = $Type->find('all', array(
			'fields' => array('alias', 'title', 'description'),
		));
		$linkChoosers = array();
		foreach ($types as $type) {
			$linkChoosers[$type['Type']['title']] = array(
				'title' => $type['Type']['title'],
				'description' => $type['Type']['description'],
				'url' => array(
					'plugin' => 'nodes',
					'controller' => 'nodes',
					'action' => 'index',
					'?' => array(
						'type' => $type['Type']['alias'],
						'chooser' => 1,
						'KeepThis' => true,
						'TB_iframe' => true,
						'height' => 400,
						'width' => 600
					)
				)
			);
		}
		Croogo::mergeConfig('Menus.linkChoosers', $linkChoosers);
	}

/**
 * Clear Nodes related cache after bulk operation
 *
 * @param CakeEvent $event
 * @return void
 */
	public function onAfterBulkProcess($event) {
		Cache::clearGroup('nodes', 'nodes');
		Cache::clearGroup('nodes', 'nodes_view');
		Cache::clearGroup('nodes', 'nodes_promoted');
		Cache::clearGroup('nodes', 'nodes_term');
		Cache::clearGroup('nodes', 'nodes_index');
	}

}


text:
<#
.SYNOPSIS

A backup script for Lync that uses GIT (via libgit2) to save the data, provide diff emails of changes (similar to RANCID) and creates zip snapshots.

.DESCRIPTION

Version 1.2.2 released 2016-06-20

If you specify Commit, libgit2 is used to interact with GIT. It is used via libgit2sharp and if either of these dlls are not in the same directly as the script, they will be downloaded from NuGet.

.PARAMETER Path

path to the folder where the backup data will be stored

.PARAMETER IncludeConfig

switch to include configuration in backup (default true)

.PARAMETER IncludeUsers

switch to include user data in backup

.PARAMETER IncludeRgs

switch to include RGS data in backup

.PARAMETER Archive

switch to create a ZIP file of this backup run

.PARAMETER Commit

switch to commit this run into a local GIT repository

.PARAMETER CommitMessage

optional string to document this backup run for the Commit

.PARAMETER EmailArchiveTo

space or comma separated list of email addresses to email the ZIP archive to

.PARAMETER EmailChangesTo

space or comma separated list of email addresses to email the differences between this and the last commit to

.PARAMETER From

email address that the email sent by EmailArchiveTo and EmailChangesTo will be sent from

.PARAMETER SmtpServer

FQDN of the SMTP server that the email sent by EmailArchiveTo and EmailChangesTo will be sent using

.PARAMETER RemoteName

local remote name for the remote GIT repository (defaults to origin)

.PARAMETER RemoteRepoUrl

URL of the remote GIT repository to push changes to

.PARAMETER RemoteCredential

credentials to use to authenticate to the remote GIT repository

.PARAMETER SaveConfig

switch to save the parameters to ConfigFile and exit instead of running

.PARAMETER LoadConfig

switch to load config from ConfigFile instead of using parameters

.PARAMETER ConfigFile

path to XML configuration file to be written to (with SaveConfig) or read from (with LoadConfig)

.EXAMPLE

Backup-Lync.ps1

The default is to read the default configuration file (.\config.xml) and perform a backup of Lync/Skype for Business

.EXAMPLE

Write all parameters to the default configuration file (.\config.xml). A specific config file can be set using -ConfigFile path\to\config\file.xml

Backup-Lync.ps1 -IncludeConfig -Commit -EmailChangesTo my.email@domain.com -From lyncbackup@domain.com -SmtpServer smtp.domain.com -SaveConfig

.EXAMPLE

Backup-Lync.ps1 -IncludeConfig -Commit -EmailChangesTo my.email@domain.com -From lyncbackup@domain.com -SmtpServer smtp.domain.com

Skip the configuration file and immediately perform a backup of Lync/Skype for Business configuration, committing changes and emailing a diff (similar to RANCID)

#>
[CmdletBinding(SupportsShouldProcess=$true, DefaultParameterSetName = "cfg")]
param(
	[Parameter(Position=0, ParameterSetName = "cli")][string]$Path = ".\data",
	[Parameter(ParameterSetName = "cli")][switch]$IncludeConfig = $true,
	[Parameter(ParameterSetName = "cli")][switch]$IncludeUsers = $false,
	[Parameter(ParameterSetName = "cli")][switch]$IncludeRgs = $false,
	[Parameter(ParameterSetName = "cli")][switch]$Archive = $true,
	[Parameter(ParameterSetName = "cli")][switch]$Commit = $true,
	[Parameter(ParameterSetName = "cli")][string]$CommitMessage,
	[Parameter(ParameterSetName = "cli")][string]$EmailArchiveTo,
	[Parameter(ParameterSetName = "cli")][string]$EmailChangesTo,
	[Parameter(ParameterSetName = "cli")][string]$From,
	[Parameter(ParameterSetName = "cli")][string]$SmtpServer,
	[Parameter(ParameterSetName = "cli")][string]$RemoteName = "origin",
	[Parameter(ParameterSetName = "cli")][string]$RemoteRepoUrl,
	[Parameter(ParameterSetName = "cli")][System.Management.Automation.PSCredential]$RemoteCredential,
	[Parameter(ParameterSetName = "cli")][switch]$SaveConfig,
	[Parameter(ParameterSetName = "cfg")][switch]$LoadConfig = $true,
	[Parameter()][string]$ConfigFile = ".\config.xml"
)

$thisScriptPath = [io.path]::GetDirectoryName($MyInvocation.MyCommand.Path)

if($ConfigFile.StartsWith(".")) {
	$ConfigFile = join-path $thisScriptPath $ConfigFile.Substring(2)
}

if($pscmdlet.ParameterSetName -eq "cli" -and $SaveConfig) {
	# write the config then exit
	$cfg = [xml]"<config/>"
	$nCfg = $cfg.GetElementsByTagName("config")
	$nCfg.SetAttribute("path", $Path)

	$nInclude = $cfg.CreateElement("include");
	$nInclude.SetAttribute("config", $IncludeConfig)
	$nInclude.SetAttribute("users", $IncludeUsers)
	$nInclude.SetAttribute("rgs", $IncludeRgs)
	$nCfg.AppendChild($nInclude) | Out-Null

	$nArchive = $cfg.CreateElement("archive")
	$nArchive.SetAttribute("enabled", $Archive)
	$nCfg.AppendChild($nArchive) | Out-Null
	if($EmailArchiveTo) {
		$nEmail = $cfg.CreateElement("email")
		$nEmail.AppendChild($cfg.CreateTextNode($EmailArchiveTo)) | Out-Null
		$nArchive.AppendChild($nEmail) | Out-Null
	}

	$nCommit = $cfg.CreateElement("commit")
	$nCommit.SetAttribute("enabled", $Commit)
	$nCfg.AppendChild($nCommit) | Out-Null
	if($CommitMessage) {
		$nMsg = $cfg.CreateElement("message")
		$nMsg.AppendChild($cfg.CreateTextNode($CommitMessage)) | Out-Null
		$nCommit.AppendChild($nMsg) | Out-Null
	}
	if($EmailChangesTo) {
		$nEmail = $cfg.CreateElement("email")
		$nEmail.AppendChild($cfg.CreateTextNode($EmailChangesTo)) | Out-Null
		$nCommit.AppendChild($nEmail) | Out-Null
	}
	if($RemoteName -or $RemoteRepoUrl -or $RemoteCredential) {
		$nRemote = $cfg.CreateElement("remote")
		if($RemoteName) {
			$nRemote.SetAttribute("name", $RemoteName)
		}
		if($RemoteRepoUrl) {
			$nRemote.SetAttribute("href", $RemoteRepoUrl)
		}
		if($RemoteCredential) {
			$nRmtUsername = $cfg.CreateElement("username")
			$nRmtUsername.AppendChild($cfg.CreateTextNode($RemoteCredential.Username)) | Out-Null
			$nRemote.AppendChild($nRmtUsername) | Out-Null
			$nRmtPassword = $cfg.CreateElement("password")
			# encrypts password uring Data Protection API
			$pwd = $RemoteCredential.Password | ConvertFrom-SecureString
			$nRmtPassword.AppendChild($cfg.CreateTextNode($pwd)) | Out-Null
			$nRemote.AppendChild($nRmtPassword) | Out-Null
		}
		$nCommit.AppendChild($nRemote) | Out-Null
	}

	if($SmtpServer -or $From) {
		$nSmtp = $cfg.CreateElement("smtp")
		if($SmtpServer) {
			$nSmtp.SetAttribute("server", $SmtpServer)
		}
		if($From) {
			$nSmtp.SetAttribute("from", $From)
		}
		$nCfg.AppendChild($nSmtp) | Out-Null
	}

	$cfg.Save($ConfigFile)
	exit
}

if($pscmdlet.ParameterSetName -eq "cfg") {
	# check if the file exists
	if(!$(Test-Path $ConfigFile)) {
		Write-Error "$ConfigFile doesn't exist. Please create a config file with -SaveConfig and try running again, or specify a configuration using the command line parameters or with -LoadConfig"
		exit
	}

	# load the config
	[xml]$cfg = gc $ConfigFile -Raw -Encoding ASCII
	[string]$Path = $cfg.config.path
	[bool]$IncludeConfig = $($cfg.config.include.config -eq "True")
	[bool]$IncludeUsers = $($cfg.config.include.users-eq "True")
	[bool]$IncludeRgs = $($cfg.config.include.rgs -eq "True")
	[bool]$Archive = $($cfg.config.archive.enabled -eq "True")
	[string]$EmailArchiveTo = $cfg.config.archive.email
	[bool]$Commit = $($cfg.config.commit.enabled -eq "True")
	[string]$CommitMessage = $cfg.config.commit.message
	[string]$EmailChangesTo = $cfg.config.commit.email
	[string]$RemoteName = $cfg.config.commit.remote.name
	[string]$RemoteRepoUrl = $cfg.config.commit.remote.href
	if($cfg.config.commit.remote.username -and $cfg.config.commit.remote.password) {
		$rmtUsername = $cfg.config.commit.remote.username
		$rmtPassword = $cfg.config.commit.remote.password | ConvertTo-SecureString
		$RemoteCredential = new-object System.Management.Automation.PSCredential $rmtUsername, $rmtPassword
	}
	[string]$SmtpServer = $cfg.config.smtp.server
	[string]$From = $cfg.config.smtp.from
}

$start = [DateTime]::UtcNow

if(!$From) {
	$fqdn = [System.Net.Dns]::GetHostByName($env:computerName).HostName
	$From = $env:USERNAME + "@" + $fqdn
}

[reflection.assembly]::LoadWithPartialName("windowsbase") | out-null # for system.io.packaging

if($Commit -and !$(ls $thisScriptPath\libgit2sharp.dll -ErrorAction SilentlyContinue)) {
	Write-Verbose "Commit requested but libgit2sharp.dll not found; downloading..."

	$wc = new-object System.Net.WebClient

	#[system.reflection.assembly]::LoadWithPartialName("system.runtime.serialization") | out-null
	#$json = new-object system.runtime.serialization.json.datacontractjsonserializer $([string[]])
	#$verStr = $wc.downloadstring("https://nuget.org/api/v2/package-versions/libgit2sharp")
	#$verData = [system.text.encoding]::ascii.getbytes($verStr)
	#$mem = new-object system.io.memorystream @(,[byte[]]$verData)
	#[string[]]$versions = $json.ReadObject($mem)
	#$latestVersion = $versions | select -last 1
	$latestVersion = "0.21.0.176"

	$url = "https://www.nuget.org/api/v2/package/{0}/{1}" -f "libgit2sharp",$latestVersion
	$tempNupkg = join-path $env:temp "libgit2sharp.nupkg"
	$wc.DownloadFile($url, $tempNupkg)
	$nupkg = [system.io.packaging.package]::open($tempNupkg)

	$dll = $nupkg.GetPart("/lib/net40/LibGit2Sharp.dll")
	$file = new-object System.IO.FileStream $(Join-Path $thisScriptPath "libgit2sharp.dll"), "Create"
	$s = $dll.GetStream()
	$s.CopyTo($file)
	$s.Close()
	$file.Close()

	$dll = $nupkg.getparts() | where { $_.Uri -match "amd64/git2-.*\.dll" }
	$git2Dll = $dll.Uri.ToString() -split '/' | select -last 1
	$file = new-object System.IO.FileStream $(Join-Path $thisScriptPath $git2Dll), "Create"
	$s = $dll.GetStream()
	$s.CopyTo($file)
	$s.Close()
	$file.Close()

	$nupkg.Close()
}

if($EmailArchiveTo -and (!$From -or !$SmtpServer)) {
	Write-Error "From and SmtpServer are required for EmailArchiveTo"
	exit
}

if($EmailChangesTo -and (!$From -or !$SmtpServer)) {
	Write-Error "From and SmtpServer are required for EmailChangesTo"
	exit
}

Import-Module Lync -ErrorAction Stop -Verbose:$false
[reflection.assembly]::LoadWithPartialName("system.xml.linq") | out-null

if($Path.StartsWith(".")) {
	$Path = join-path $thisScriptPath $Path.Substring(2)
}

$arkPath = join-path $Path "archive"
$bakPath = join-path $Path "current"
if(-not $(Test-Path $bakPath)) {
	mkdir $bakPath | out-null
}

if($IncludeConfig) {
	## BACKUP TOPOLOGY
	Write-Verbose "Backing up topology"
	(Get-CsTopology -AsXml).ToString() | Out-File $bakPath\Topology.xml -encoding ascii

	## BACKUP CONFIG & POLICIES
	if(Test-Path $bakPath\config) {
		rm $bakPath\config -recurse
	}
	mkdir $bakPath\config | Out-Null

	$ExcludedCommands = @('Get-CsEffectivePolicy', 'Get-CsRgsConfiguration', 'Get-CsSlaConfiguration', 'Get-CsWatcherNodeConfiguration')
	$cmds = @("Get-CsDialPlan","Get-CsVoiceRoute","Get-CsPstnUsage","Get-CsDialInConferencingAccessNumber","Get-CsExUmContact")
	$cmds += @("Get-CsHostingProvider","Get-CsAllowedDomain","Get-CsBlockedDomain")
	$cmds += Get-Command Get-Cs*Configuration,Get-Cs*Policy -Module Lync | %{ $_.Name } | ?{ $ExcludedCommands -notcontains $_ }
	$cmds += Get-Command Get-Cs*Configuration,Get-Cs*Policy -Module SkypeForBusiness | %{ $_.Name } | ?{ $ExcludedCommands -notcontains $_ }

	$cmds | foreach {
		$type = $_.Substring(6)

		Write-Verbose "Backing up $type"
		[array]$ret = & $_ -Verbose:$false
		if($ret) {
			## don't have results with .element
			# Get-CsDialInConferencingAccessNumber
			# Get-CsExUmContact
			# Get-CsAccessEdgeConfiguration

			## in addition, some that have .element don't have .anchor (but they have identity)
			# Get-CsVoiceRoute
			# Get-CsHealthMonitoringConfiguration

			if($ret[0].Element) {
				mkdir "$bakPath\config\$type" | out-null

				# write one per file identified by anchor (if available) or identity otherwise
				$ret | foreach {
					if($_.Anchor) {
						if($_.Identity -eq "Global") {
							$id = $_.Identity
						} else {
							$id = $($_.Anchor.FullName -replace ":","_") + "_" + $_.Anchor.TagId
						}
					} else {
						$id = $_.Identity
					}
					$_.Element.ToString() | out-file "$bakPath\config\$type\$($id).xml" -encoding ascii
				}
			} elseif($ret[0].LineUri) { # exumcontact & dialinconferencingaccessnumber
				mkdir "$bakPath\config\$type" | out-null

				$ret | foreach {
					$id = $_.LineUri.Substring(4)
					$_ | Export-Clixml -Path "$bakPath\config\$type\$($id).xml" -encoding ascii
				}
			} else {
				$ret | Export-Clixml -Path "$bakPath\config\$($type).xml" -encoding ascii
			}
		}
	}
}

if($IncludeUsers) {
	## BACKUP USER DATA
	if(Test-Path $bakPath\users) {
		# by removing this path we don't have to prune it later for users who may be gone
		# and since git will detect changes; if the generated files are the same then it won't be included in the commit
		rm $bakPath\users -Recurse
	}
	mkdir $bakPath\users | Out-Null

	if(Test-Path $bakPath\userdata) {
		rm $bakPath\userdata -Recurse
	}
	mkdir $bakPath\userdata | Out-Null

	$settings = new-object system.xml.XmlWriterSettings
	$settings.Indent = $true;
	$settings.IndentChars = "  ";
	$settings.OmitXmlDeclaration = $false;

	# in case there's a mixed environment
	$supportedPools = Get-CsService -UserServer | ?{ $_.Version -ge 6 } | %{ $_.PoolFqdn } | sort -Unique

	$users = Get-CsUser | sort SipAddress
	foreach($u in $users) {
		$sip = $u.SipAddress.Substring(4)
		Write-Verbose "Backing up user $sip"
		$u | Export-Clixml -Path "$bakPath\users\$($sip).xml" -encoding ascii
		if($supportedPools -notcontains $u.RegistrarPool) {
			Write-Warning "$sip is not on a supported pool"
		} else {
			$tempZip = [io.path]::GetTempFileName()
			rm $tempZip
			Export-CsUserData -PoolFqdn $u.RegistrarPool.ToString() -UserFilter $sip -FileName $tempZip -Verbose:$false
			$pkg = [system.io.packaging.package]::open($tempZip)
			$zip = $pkg.GetPart("/DocItemSet.xml").GetStream()

			# this indents the file nicely so that we have better diffs
			[system.xml.linq.xdocument]::Load($zip).ToString() | Out-File "$bakPath\userdata\$($sip).xml" -encoding ascii

			$zip.Close()
			$pkg.Close()
			rm $tempZip
		}
	}
}

## TODO: backup the conferencing directory's (and their export-csuserdata -confdirectoryfilter data too)

if($IncludeRgs) {
	## BACKUP RGS
	# TODO: maybe we can export-clixml the rgs workflow/queue/agentgroup/holidayset/hoursofbusiness objects?
	# if(-not $(Test-Path $bakPath\rgs)) {
		# mkdir $bakPath\rgs | Out-Null
	# }

	get-csservice -applicationserver | ?{ $_.version -eq 6 } | %{ $_.identity } | sort -unique | foreach {
		$name = $_ -split ':' | select -first 1 -skip 1
		export-csrgsconfiguration -source "service:$_" -filename "$bakPath\rgs_$($name).zip"
	}
}

function Email($to, $subjTplt, $attachment, $mimetype) {
	$domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name
	$subj = $subjTplt -f $domain,$Script:start

	$msg = new-object System.Net.Mail.MailMessage
	$msg.From = $Script:From
	$atLeastOne = $false
	$to -split '[\s,]+' | foreach {
		$addr = $_.Trim()
		if($addr) {
			try {
				$msg.To.Add($addr)
				$atLeastOne = $true
			} catch {
				Write-Error "Failed to add $addr as 'To' address for email '$subjTplt': $_"
			}
		}
	}

	$msg.Subject = $subj
	if($([System.Net.Mime.MediaTypeNames+Text]::Plain) -eq $mimetype) {
		$msg.Body = gc $attachment -raw
	} else {
		$msg.Body = "See attached file"
		$msgAttachment = new-object System.Net.Mail.Attachment $attachment, $mimetype
		$msgAttachment.ContentDisposition.FileName = $domain + "_" + $date + ".zip"
		$msgAttachment.ContentDisposition.CreationDate = [System.IO.File]::GetCreationTime($attachment)
		$msgAttachment.ContentDisposition.ModificationDate = [System.IO.File]::GetLastWriteTime($attachment)
		$msgAttachment.ContentDisposition.ReadDate = [System.IO.File]::GetLastAccessTime($attachment)
		$msg.Attachments.Add($msgAttachment)
	}

	# TODO: instead of $SmtpServer we could MX lookup instead
	# SEE: http://blog.icewolf.ch/archive/2013/05/27/powershell-dns-reverse-and-mx-lookup.aspx
	if($atLeastOne) {
		$smtp = new-object System.Net.Mail.SmtpClient $SmtpServer
		$smtp.Send($msg)
	} else {
		Write-Warning "Not sending email '$subjTplt' since there are not valid 'To' email addresses"
	}
}

## ARCHIVE ALL DATA INTO DATE STAMPED FILE
if($Archive) {
	if(-not $(Test-Path $arkPath)) {
		mkdir $arkPath | out-null
	}
	$arkFile = "$arkPath\{0:yyyMMdd}.zip" -f $start
	if(Test-Path $arkFile) {
		rm $arkFile
	}

	$compression = [system.io.packaging.compressionoption]::Maximum

	Write-Verbose "Creating archive $arkFile"
	$zip = [system.io.packaging.package]::open($arkFile, [system.io.filemode]::Create)

	ls $bakPath\**.xml -recurse | foreach {
		$item = $_.FullName.Substring($bakPath.Length) -replace '\\','/'
		Write-Verbose "Archiving $item"
		# a part name can't have a space (per the Open Packaging Conventions specification) so replace those
		$item = $item -replace ' ','_' -replace '#',''
		try {
			$part = $zip.CreatePart($item, "text/xml", $compression)
			$s = $part.GetStream()
			$file = new-object system.io.filestream $_.FullName, $([system.io.filemode]::open), $([system.io.fileaccess]::Read)
			$file.CopyTo($s)
			$file.Close()
			$s.Close()
		} catch {
			Write-Error "Failed to create part $item; $_"
		}
	}

	$zip.Close()

	if($EmailArchiveTo) {
		Write-Verbose "Emailing archive $arkFile to $EmailArchiveTo"
		Email $EmailArchiveTo "Lync Backup for {0} ({1:yyyy-MMM-dd})" $arkFile $([System.Net.Mime.MediaTypeNames+Application]::Zip)
	}

	# TODO: optionally only keep a certain number of backups
}

## COMMIT ALL CHANGES
if($Commit) {
	Import-Module $thisScriptPath\libgit2sharp.dll -ErrorAction Stop -Verbose:$false

	if(-not $(Test-Path $bakPath\.git)) {
		Write-Verbose "Initializing git repo"
		[LibGit2Sharp.Repository]::Init($bakPath) | out-null
		"*.zip" | Out-File $bakPath\.gitignore -encoding ascii
	}

	$git = new-object LibGit2Sharp.Repository "$bakPath\.git"
	$dirty = $false
	$statusOpts = new-object LibGit2Sharp.StatusOptions
	$stageOpts = new-object LibGit2Sharp.StageOptions
	$git.RetrieveStatus($statusOpts) | foreach {
		if($_.State -eq "Untracked" -or $_.State -eq "Missing" -or $_.State -eq "Modified") {
			Write-Verbose "Staging $($_.FilePath)"
			$git.Stage($_.FilePath, $stageOpts)
			$dirty = $true
		} else {
			Write-Verbose "Skipping $($_.FilePath) [$($_.State)]"
		}
	}
	if($dirty) {
		if($EmailChangesTo) {
			Write-Verbose "Recording changes..."
			$diffPath = join-path $Path "changes"
			if(-not $(Test-Path $diffPath)) {
				mkdir $diffPath | out-null
			}

			$diffFile = "$diffPath\{0:yyyy-MM-dd_HHmm}.txt" -f $start
			$compare = $git.diff.gettype().getmethod("Compare", [type[]]@([LibGit2Sharp.Tree], [LibGit2Sharp.DiffTargets], [System.Collections.Generic.IEnumerable[string]], [LibGit2Sharp.ExplicitPathsOptions], [LibGit2Sharp.CompareOptions]))
			$compareTree = $compare.MakeGenericMethod([libgit2sharp.patch])
			# $co = new-object libgit2sharp.compareoptions
			# $co.ContextLines = 0
			$diff = $compareTree.Invoke($git.Diff, @($git.Head.Tip.Tree, [libgit2sharp.difftargets]::Index, $null, $null, $null))
			$diff | foreach {
				if($_.Status -eq "Added") {
					"diff added " + $($_.Path -Replace '\\','/') + "`r`n"
				} elseif($_.Status -eq "Removed") {
					"diff removed " + $($_.OldPath -Replace '\\','/') + "`r`n"
				} else {
					$_.Patch -Replace "`r?`n","`r`n"
				}
			} | Out-File $diffFile -encoding ascii

			Write-Verbose "Emailing changes $diffFile to $EmailChangesTo"
			Email $EmailChangesTo "Lync config changes for {0} ({1:yyyy-MMM-dd HH:mm})" $diffFile $([System.Net.Mime.MediaTypeNames+Text]::Plain)
		}

		Write-Verbose "Committing..."
		$sig = new-object libgit2sharp.signature "Backup-Lync.ps1",$From,$([DateTimeOffset]::Now)
		if($CommitMessage) {
			$msg = $CommitMessage
		} else {
			$msg = "Backup run @ {0:yyyy-MM-dd HH:mm} UTC" -f $start
		}
		$commitOpts = new-object LibGit2Sharp.CommitOptions
		$git.Commit($msg, $sig, $sig, $commitOpts) | out-null
	}

	if($RemoteName -and $RemoteRepoUrl) {
		# get the remote
		$remote = $git.Network.Remotes[$RemoteName]

		# if there's a remote check that it points to the right repo url
		if($remote -and $remote.Url -ne $RemoteRepoUrl) {
			# if not then remove since we will recreate the remote
			$git.Network.Remotes.Remove($RemoteName)
			$remote = $null
		}

		# if there's no remote create it it
		if(!$remote) {
			$remote = $git.Network.Remotes.Add($RemoteName, $RemoteRepoUrl)
			$git.Branches.Update($git.Head, {param($b) $b.Remote = $remote.Name; $b.UpstreamBranch = $git.Head.CanonicalName}) | Out-Null
		}

		## only push if we haven't pushed yet or master is ahead of the remote
		if(-not $git.Branches["$RemoteName/master"] -or $git.Branches["master"].Tip.Id.Sha -ne $git.Branches["$RemoteName/master"].Tip.Id.Sha) {
			Write-Verbose "Pushing to $RemoteName ($RemoteRepoUrl)"
			$pushOptions = new-object LibGit2Sharp.PushOptions
			if($RemoteCredential) {
				$credHandler = {
					param($url,$usernameFromUrl,$types)
					$cred = new-object LibGit2Sharp.UsernamePasswordCredentials
					$cred.Username = $RemoteCredential.Username
					$cred.Password = $RemoteCredential.GetNetworkCredential().Password
					return $cred
				}
				$pushOptions.CredentialsProvider = ($credHandler -as [LibGit2Sharp.Handlers.CredentialsHandler])
			}
			[LibGit2Sharp.NetworkExtensions]::Push($git.Network, $git.Branches["master"], $pushOptions)
		}
	}
}


text:
(function() {
    'use strict';

    angular
        .module('app.detail', [])
        .controller('Detail', Detail);

    /* @ngInject */
    function Detail($scope, modalInstance) {
        var vm = this;

        vm.confirm = function() {
            modalInstance.confirm();
        };
    }

})();


text:
@interface FanFeedImageCell : UITableViewCell

@property (strong, nonatomic) IBOutlet UIView *viewUser;
@property (strong, nonatomic) IBOutlet UIImageView *imgAvatar;
@property (strong, nonatomic) IBOutlet UILabel *lbUserName;
@property (strong, nonatomic) IBOutlet UILabel *lbTimeStamp;
@property (strong, nonatomic) IBOutlet UILabel *lbLikeNum;
@property (strong, nonatomic) IBOutlet UIButton *btnLike;

@property (strong, nonatomic) IBOutlet UILabel *lbTitle;

@property (strong, nonatomic) IBOutlet UIImageView *imgPhoto;
@property (strong, nonatomic) IBOutlet UIView *viewLock;
@property (strong, nonatomic) IBOutlet UILabel *lbLockNum;
@property (strong, nonatomic) IBOutlet UIImageView *imgLockIcon;
@property (strong, nonatomic) IBOutlet UIImageView *imgPremium;

@property (strong, nonatomic) IBOutlet UIView * viewMsg;
@property (strong, nonatomic) IBOutlet UIImageView *ivMessage1;
@property (strong, nonatomic) IBOutlet UILabel *lbMessage1;
@property (strong, nonatomic) IBOutlet UILabel *lbMsgTimeStamp1;

@property (strong, nonatomic) IBOutlet UIImageView *ivMessage2;
@property (strong, nonatomic) IBOutlet UILabel *lbMessage2;
@property (strong, nonatomic) IBOutlet UILabel *lbMsgTimeStamp2;

@property (strong, nonatomic) IBOutlet UIImageView *ivMessage3;
@property (strong, nonatomic) IBOutlet UILabel *lbMessage3;
@property (strong, nonatomic) IBOutlet UILabel *lbMsgTimeStamp3;

@property (strong, nonatomic) IBOutlet UILabel *lbComment;
@property (strong, nonatomic) IBOutlet UIButton *btnComment;
@property (strong, nonatomic) IBOutlet UIButton *btnAddComment;
@property (strong, nonatomic) IBOutlet UIButton *btnShare;
@property (strong, nonatomic) IBOutlet UIButton *btnMore;

@property (strong, nonatomic) IBOutlet UIImageView * ivVideoIcon;

@end


text:
package com.rendits.router;

import static org.junit.Assert.assertEquals;

import net.gcdc.camdenm.Iclcm.IgameCooperativeLaneChangeMessage;
import org.junit.Test;

public class SimpleIclcmTest {

  @Test
  public void testIclcm() {
    SimpleIclcm simpleIclcm = SampleMessages.getSampleIclcm();
    byte[] buffer = simpleIclcm.asByteArray();
    SimpleIclcm simpleIclcmFromArray = new SimpleIclcm(buffer);
    assertEquals(simpleIclcm, simpleIclcmFromArray);
    IgameCooperativeLaneChangeMessage iclcm = simpleIclcm.asIclcm();
    SimpleIclcm simpleIclcmFromIclcm = new SimpleIclcm(iclcm);
    assertEquals(simpleIclcm, simpleIclcmFromIclcm);
  }
}


text:
package com.inform.jamps.modeling;

public interface Variable extends Comparable<Variable> {

  String getName ();

  VariableType getType ();

  double getLowerBound ();

  void setLowerBound (double lowerBound);

  double getUpperBound ();

  void setUpperBound (double upperBound);

  boolean hasInitialValue ();

  double getInitialValue ();

  void setInitialValue (double initialValue);
}


text:
googleio
========

Google I/O Source Code

Original Code here:
https://code.google.com/p/iosched/

modified gradle to work with 1.8 and android studio


text:
package io.oasp.gastronomy.restaurant.general.service.impl.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;

import io.oasp.gastronomy.restaurant.general.service.impl.config.BaseWebSecurityConfig;
import io.oasp.module.basic.common.api.config.SpringProfileConstants;

/**
 * This type provides web security configuration for testing purposes.
 *
 */
@Configuration
@EnableWebSecurity
@Profile(SpringProfileConstants.JUNIT)
public class TestWebSecurityConfig extends BaseWebSecurityConfig {
  private static Logger LOG = LoggerFactory.getLogger(TestWebSecurityConfig.class);

  /**
   * Configure spring security to enable a simple webform-login + a simple rest login.
   */
  @Override
  public void configure(HttpSecurity http) throws Exception {

    super.configure(http);
    // usage of addFilter is sufficient for BasicAuthenticationFilter.class. The filter will be added according to the
    // order defined in:
    // http://docs.spring.io/autorepo/docs/spring-security/4.1.0.RC1/apidocs/org/springframework/security/config/annotation/web/builders/HttpSecurity.html#addFilter-javax.servlet.Filter-
    http.addFilter(basicAuthenticationFilter());

    // Use the following to disable csrf in tests
    http.csrf().disable();

    LOG.debug("used non static class");
  }

  @Bean
  protected BasicAuthenticationFilter basicAuthenticationFilter() throws Exception {

    AuthenticationEntryPoint authenticationEntryPoint = new BasicAuthenticationEntryPoint();
    BasicAuthenticationFilter basicAuthenticationFilter =
        new BasicAuthenticationFilter(authenticationManagerBean(), authenticationEntryPoint);
    LOG.debug("created basicAuthenticationFilter");
    return basicAuthenticationFilter;
  }

}


text:
import Kamaelia.ReadFileAdaptor
from Axon import Component
from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.Util.Chargen import Chargen
from Kamaelia.Util.ConsoleEcho import consoleEchoer
from DL_Util import SerialChargen
from Encryption import BasicEncryption

import random
"""
============================
Basic Data Integrity Checker
============================

This module contains a series of components which ensure the
integrity of data transferred between components.

It basically adds a hash code of the data to be transferred. Baisc Usage is

Data Producer -- (data) -- IntegrityStamper() -- (data, hash) -- <other components> ...

... <other components> -- (data, hash) -- IntegrityChecker() -- (data) -- Data Consumer

"""

class IntegrityError(Exception):

    def __str__(self):
        return "Checksum failed"

class BasicIntegrity(Component.component):

    def __init__(self,  algorithm="SHA"):

        super(BasicIntegrity,self).__init__()
        self.algorithm = algorithm
        self.setAlgorithm()

    def setAlgorithm(self):

        if self.algorithm is "SHA":
            from Crypto.Hash import SHA
            self.method = SHA
        elif self.algorithm is "MD5":
            from Crypto.Hash import MD5
            self.method = MD5
#        elif self.algorithm is "RIPEMD":
#            from Crypto.Hash import RIPEMD # Cannot do this for some reason
#            self.method = RIPEMD

    def calcHash(self, data):

        hashobj = self.method.new(data)
        return hashobj.digest()

class IntegrityStamper(BasicIntegrity):

    def __init__(self,  algorithm="SHA"):

        super(IntegrityStamper,self).__init__(algorithm)

    def main(self):

        while 1:

            if self.dataReady("inbox"):
                data = self.recv("inbox")

                checksum = self.calcHash(data)
                #print "Integrity stamper :", data, " ", checksum
                self.send((data, checksum), "outbox")
            yield 1

class IntegrityChecker(BasicIntegrity):

    def __init__(self,  algorithm="SHA"):

        super(IntegrityChecker, self).__init__(algorithm)

    def main(self):

        while 1:
            try:
                if self.dataReady("inbox"):

                    (data, checksum) = self.recv("inbox")
                    #print data , checksum , self.calcHash(data)
                    if checksum == self.calcHash(data):

                        self.send(data, "outbox")
                    else:                      # we have a hash failure
                        raise IntegrityError  # This mechanism needs improvement
            except IntegrityError:

                print "Integrity Error"

            yield 1

class DisruptiveComponent(Component.component):
    """ This component causes a minor change in the data
        so that data and its checksum will not match.
        Used for testing of integrity service.         """

    def __init__(self, probability=0.2):  # Probability of Disruption

        super(DisruptiveComponent, self).__init__()
        self.probability = probability

    def main(self):

        while 1:
            if self.dataReady("inbox"):
                (data, checksum) = self.recv("inbox")

                if random.random() < self.probability:
                    #print "Corrupting Data"
                    data = data[:-1]           #Corrupt Data

                self.send((data, checksum), "outbox")
            yield 1

class MAC_Stamper(BasicIntegrity):
    """ Provides message authentication only, message is still sent in plain text
    """

    def __init__(self, key,  encryption="AES", mode="ECB", hash="SHA"):

        super(MAC_Stamper,self).__init__(hash)
        self.encryptobj = BasicEncryption(key, encryption, mode)

    def main(self):

        while 1:

            if self.dataReady("inbox"):
                data = self.recv("inbox")

                mac = self.encryptobj.encrypt(self.calcHash(data))
                self.send((data, mac), "outbox")
            yield 1

class MAC_Checker(BasicIntegrity):

    def __init__(self, key, encryption="AES", mode="ECB", hash="SHA"):

        super(MAC_Checker, self).__init__(hash)
        self.decryptobj = BasicEncryption(key, encryption, mode)

    def main(self):

        while 1:
            try:
                if self.dataReady("inbox"):

                    (data, mac) = self.recv("inbox")
                    checksum = self.decryptobj.decrypt(mac)
                    if checksum == self.calcHash(data):

                        self.send(data, "outbox")
                    else:                      # we have a hash failure
                        raise IntegrityError  # This mechanism needs improvement
            except IntegrityError:

                print "Integrity Error"

            yield 1

if __name__ == "__main__":
    pipeline(
        SerialChargen(),
        MAC_Stamper("1234567812345678", mode="CBC"),
        DisruptiveComponent(),
        MAC_Checker("1234567812345678", mode="CBC"),
        consoleEchoer()
        ).run()


text:
package org.infinispan.notifications.cachelistener.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This annotation should be used on methods that need to be notified when a cache entry is removed from the cache.
 *

 * Methods annotated with this annotation should accept a single parameter, a {@link
 * org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent} otherwise a {@link
 * org.infinispan.notifications.IncorrectListenerException} will be thrown when registering your listener.
 *

 *  Locking: notification is performed WITH locks on the given key.
 *

 * Any exceptions thrown by the listener will abort the call. Any other listeners not yet called will not be called,
 * and any transactions in progress will be rolled back.
 * @author Manik Surtani
 * @see org.infinispan.notifications.Listener
 * @since 4.0
 */
// ensure this annotation is available at runtime.
@Retention(RetentionPolicy.RUNTIME)
// ensure that this annotation is applied to classes.
@Target(ElementType.METHOD)
public @interface CacheEntryRemoved {
}


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

<title>R: Permutation test to compare variability within and distance
between two groups</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />

 Permutation test to compare variability within and distance
between two groups

Documentation for package ‘permtest’ version 1.2

DESCRIPTION file.

Help Pages

permtest
Permutation test for testing two groups for a variability or location difference.


text:
package edu.gemini.qpt.core.listeners;

import java.beans.PropertyChangeEvent;

import edu.gemini.qpt.core.Alloc;
import edu.gemini.qpt.core.Variant;
import edu.gemini.qpt.core.Marker.Severity;
import edu.gemini.qpt.core.util.MarkerManager;
import edu.gemini.qpt.core.util.Interval.Overlap;

/**
 * Generates Alloc markers for Allocs that overlap.
 * @author rnorris
 */
public class OverlappingAllocListener extends MarkerModelListener<Variant> {

	public void propertyChange(PropertyChangeEvent evt) {
		Variant v = (Variant) evt.getSource();
		MarkerManager mm = getMarkerManager(v);
		mm.clearMarkers(this, v);

		// Allocs are sequential, so we only need to see if one overlaps with adjacent
		// ones in the array. TODO: optimize
		Alloc[] allocs = v.getAllocs().toArray(new Alloc[v.getAllocs().size()]);
		for (int i = 0; i < allocs.length; i++) {
			for (int j = i + 1; j < allocs.length; j++) {
				if (allocs[i].overlaps(allocs[j], Overlap.EITHER)) {
					mm.addMarker(false, this, Severity.Error, "Observation overlaps with " + allocs[j] + ".", v, allocs[i]);
					mm.addMarker(false, this, Severity.Error, "Observation overlaps with " + allocs[i] + ".", v, allocs[j]);
				} else {
					break;
				}
			}

		}

	}

	// TODO: add quick fixes

	@Override
	protected MarkerManager getMarkerManager(Variant t) {
		return t.getSchedule().getMarkerManager();
	}

}


text:
package org.mvcspec.ozark.binding;

import javax.enterprise.inject.Vetoed;
import javax.mvc.binding.BindingError;
import javax.mvc.binding.BindingResult;
import javax.mvc.binding.ParamError;
import javax.mvc.binding.ValidationError;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * Implementation for {@link javax.mvc.binding.BindingResult} interface.
 *
 * @author Santiago Pericas-Geertsen
 * @author Christian Kaltepoth
 */
@Vetoed // produced by BindingResultManager
public class BindingResultImpl implements BindingResult {

    private final Set<BindingError> bindingErrors = new LinkedHashSet<>();

    private final Set<ValidationError> validationErrors = new LinkedHashSet<>();

    private boolean consumed;

    @Override
    public boolean isFailed() {
        this.consumed = true;
        return validationErrors.size() > 0 || bindingErrors.size() > 0;
    }

    @Override
    public List<String> getAllMessages() {
        this.consumed = true;
        return Stream.concat(bindingErrors.stream(), validationErrors.stream())
                .map(ParamError::getMessage)
                .collect(Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList));
    }

    @Override
    public Set<ParamError> getAllErrors() {
        this.consumed = true;
        return Stream.concat(bindingErrors.stream(), validationErrors.stream())
                .collect(Collectors.collectingAndThen(Collectors.toSet(), Collections::unmodifiableSet));
    }

    @Override
    public Set<ParamError> getErrors(String param) {
        Objects.requireNonNull(param, "Parameter name is required");
        this.consumed = true;
        return Stream.concat(bindingErrors.stream(), validationErrors.stream())
                .filter(paramError -> Objects.equals(paramError.getParamName(), param))
                .collect(Collectors.collectingAndThen(Collectors.toSet(), Collections::unmodifiableSet));
    }

    public void addValidationErrors(Set<ValidationError> validationErrors) {
        this.validationErrors.addAll(validationErrors);
    }

    public void addBindingError(BindingError bindingError) {
        this.bindingErrors.add(bindingError);
    }

    public boolean hasUnconsumedErrors() {
        return !consumed && (!bindingErrors.isEmpty() || !validationErrors.isEmpty());
    }

}


text:
FROM ubuntu:16.04
MAINTAINER Aexea Carpentry

RUN apt-get update && \
    apt-get install --yes graphite-carbon graphite-api gunicorn3

EXPOSE 2003 8000
VOLUME "/var/lib/graphite"
CMD ["/usr/bin/carbon-cache", "--config=/etc/carbon/carbon.conf", "--pidfile=/var/run/carbon-cache.pid", "--logdir=/var/log/carbon/", "--nodaemon", "start" ]