text:
package tlc2.tool.liveness;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;

import org.junit.After;
import org.junit.Before;

import tlc2.TLC;
import tlc2.TLCGlobals;
import tlc2.TestMPRecorder;
import tlc2.output.EC;
import tlc2.output.EC.ExitStatus;
import tlc2.output.MP;
import tlc2.tool.CommonTestCase;
import tlc2.tool.ModelChecker;
import util.FileUtil;
import util.FilenameToStream;
import util.SimpleFilenameToStream;
import util.ToolIO;

public abstract class ModelCheckerTestCase extends CommonTestCase {

	protected String path = "";
	protected String spec;
	protected String[] extraArguments = new String[0];
	protected TLC tlc;
	protected int actualExitStatus = -1;
	protected int expectedExitStatus = ExitStatus.SUCCESS;

	public ModelCheckerTestCase(String spec) {
		this(spec, ExitStatus.SUCCESS);
	}

	public ModelCheckerTestCase(String spec, final int exitStatus) {
		this(spec, "", exitStatus);
	}

	public ModelCheckerTestCase(String spec, String path) {
		this(spec, path, ExitStatus.SUCCESS);
	}

	public ModelCheckerTestCase(String spec, String[] extraArguments) {
		this(spec, "", extraArguments, ExitStatus.SUCCESS);
	}

	public ModelCheckerTestCase(String spec, String[] extraArguments, final int exitStatus) {
		this(spec, "", extraArguments, exitStatus);
	}

	public ModelCheckerTestCase(String spec, String path, String[] extraArguments) {
		this(spec, path, extraArguments, ExitStatus.SUCCESS);
	}

	public ModelCheckerTestCase(String spec, String path, String[] extraArguments, final int exitStatus) {
		this(spec, path, exitStatus);
		this.extraArguments  = extraArguments;
	}

	public ModelCheckerTestCase(final String spec, final String path, final int exitStatus) {
		super(new TestMPRecorder());
		this.spec = spec;
		this.path = path;
		this.expectedExitStatus = exitStatus;
	}

	protected void beforeSetUp() {
		// No-op
	}

	/* (non-Javadoc)
	 * @see junit.framework.TestCase#setUp()
	 */
	@Before
	public void setUp() {
		beforeSetUp();

		// some tests might want to access the liveness graph after model
		// checking completed. Thus, prevent the liveness graph from being
		// closed too earlier.
		System.setProperty(ModelChecker.class.getName() + ".vetoCleanup", "true");

		try {
			// TEST_MODEL is where TLC should look for user defined .tla files
			ToolIO.setUserDir(BASE_PATH + path);

			MP.setRecorder(recorder);

			// Increase the liveness checking threshold to prevent liveness
			// checking of an incomplete graph. Most tests check that the
			// state queue is empty and fail if not. This is only given
			// when liveness checking is executed when all states have been
			// generated.
			TLCGlobals.livenessThreshold = getLivenessThreshold();

			tlc = new TLC();
			tlc.setResolver(getResolver());
			// * We want *no* deadlock checking to find the violation of the
			// temporal formula
			// * We use (unless overridden) a single worker to simplify
			// debugging by taking out threading
			// * MC is the name of the TLA+ specification to be checked (the file
			// is placed in TEST_MODEL
			final List<String> args = new ArrayList<String>(6);

			// *Don't* check for deadlocks. All tests are interested in liveness
			// checks which are shielded away by deadlock checking. TLC finds a
			// deadlock (if it exists) before it finds most liveness violations.
			if (!checkDeadLock()) {
				args.add("-deadlock");
			}

			if (getNumberOfThreads() == 1 && runWithDebugger()) {
				args.add("-debugger");
				args.add(String.format("nosuspend,port=%s,nohalt", 1025 + new Random().nextInt(64540)));
			}

			if (noGenerateSpec()) {
				args.add("-noGenerateSpecTE");
			} else {
				// Make sure the generated spec ends up in a designated location.
				args.add("-generateSpecTE");
				args.add("-teSpecOutDir");
				args.add(TTraceModelCheckerTestCase.getPath(getClass()));
			}

			if (noRandomFPandSeed()) {
				args.add("-fp");
				args.add("0");
				// Deterministic simulation (order in which actions are explored).
				args.add("-seed");
				args.add("1");
			}

			if (doCoverage()) {
				args.add("-coverage");
				args.add("1");
			}

			args.add("-workers");
			args.add(Integer.toString(getNumberOfThreads()));

			// Never create checkpoints. They distort performance tests and are
			// of no use anyway.
			args.add("-checkpoint");
			args.add(Integer.toString(doCheckpoint()));

			// Always print the state graph in dot file notation.
			if (doDump()) {
				args.add("-dump");
				args.add("dot");
				args.add("${metadir}" + FileUtil.separator + getClass().getCanonicalName() + ".dot");
			}

			args.addAll(Arrays.asList(extraArguments));

			args.add(spec);
			tlc.handleParameters(args.toArray(new String[args.size()]));

			// Run the ModelChecker
			final int errorCode = tlc.process();
			actualExitStatus = EC.ExitStatus.errorConstantToExitStatus(errorCode);

		} catch (Exception e) {
			fail(e.getMessage());
		}
	}

	protected boolean noRandomFPandSeed() {
		return true;
	}

	protected boolean runWithDebugger() {
		return true;
	}

	protected double getLivenessThreshold() {
		return Double.MAX_VALUE;
	}

	protected FilenameToStream getResolver() {
		return new SimpleFilenameToStream();
	}

	protected boolean noGenerateSpec() {
		return false;
	}

	protected void beforeTearDown() {
		// No-op
	}

	@After
	public void tearDown() {
		beforeTearDown();

		assertExitStatus();
	}

	protected void assertExitStatus() {
		assertEquals(expectedExitStatus, actualExitStatus);
	}

	protected boolean doCoverage() {
		return true;
	}

	/**
	 * @return True if TLC is to be called with "-deadlock".
	 */
	protected boolean checkDeadLock() {
		return false;
	}

	protected boolean doDump() {
		return true;
	}

	protected int doCheckpoint() {
		return 0;
	}

	/**
	 * @return The number of worker threads TLC should use.
	 */
	protected int getNumberOfThreads() {
		return 1;
	}

	protected void setExitStatus(final int exitStatus) {
		this.expectedExitStatus = exitStatus;
	}

	/**
	 * E.g.
	 * ILiveCheck liveCheck = (ILiveCheck) getField(AbstractChecker.class, "liveCheck",
	 * 				getField(TLC.class, "instance", tlc));
	 */
	protected Object getField(Class<?> targetClass, String fieldName, Object instance) {
		try {
			Field field = targetClass.getDeclaredField(fieldName);
			field.setAccessible(true);
			return field.get(instance);
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		return null;
	}
}


text:
Witchcraft
==========
[![Dependency Status](https://gemnasium.com/nicolasmccurdy/witchcraft.svg)](https://gemnasium.com/nicolasmccurdy/witchcraft)

A simple application skeleton for Sinatra, inspired by Express.

Installation
------------
1. Install Ruby (I recommend the latest Ruby, but 1.9 and later should work).
2. Install Bundler with `gem install bundler`.
3. `bundle`

Running the Server
------------------

### Development
    ruby app.rb

This will default to port 3000.

### Production
    bundle exec rackup

I recommend changing the default port with `-p`.

### Heroku
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

redpajama_set_name: RedPajamaGithub


text:
package org.ojalgo.random;

import static org.ojalgo.constant.PrimitiveMath.*;

import org.ojalgo.TestUtils;
import org.ojalgo.array.ArrayUtils;
import org.ojalgo.array.PrimitiveArray;
import org.ojalgo.constant.PrimitiveMath;
import org.ojalgo.series.CalendarDateSeries;
import org.ojalgo.type.TypeUtils;
import org.ojalgo.type.context.NumberContext;

/**
 * RandomNumberTest
 *
 * @author apete
 * @author Chris Lucas
 */
public class RandomNumberTest extends RandomTests {

    // A wrapper for two-parameter random numbers to make it easier to generalize tests. Easy to extend to single-parameter random numbers,
    // or just apply as-is by having one throw-away parameter.
    private abstract class Dist2 {

        public abstract RandomNumber getDist(double p0, double p1);
    }

    // Erlang's first argument is an int. For convenience, this takes the int value of the corresponding double's floor, which
    // should be the nearest lower int, according to the javadoc.
    private class Dist2Erlang extends Dist2 {

        @Override
        public RandomNumber getDist(final double p0, final double p1) {
            if (p0 < 1.0) {
                throw new IllegalArgumentException("The first argument must be at least 1");
            }
            return new Erlang((int) Math.floor(p0), p1);
        }
    }

    private class Dist2Gamma extends Dist2 {

        @Override
        public RandomNumber getDist(final double p0, final double p1) {
            return new Gamma(p0, p1);
        }
    }

    private class Dist2Norm extends Dist2 {

        @Override
        public RandomNumber getDist(final double p0, final double p1) {
            return new Normal(p0, p1);
        }
    }

    private class Dist2Weibull extends Dist2 {

        @Override
        public RandomNumber getDist(final double p0, final double p1) {
            return new Weibull(p0, p1);
        }
    }

    public RandomNumberTest() {
        super();
    }

    public RandomNumberTest(final String someName) {
        super(someName);
    }

    /**
     * Tests that the error function implementation returns correct confidence intervals for +/- 6 standard
     * deviations. They are all correct to at least 10 decimal places.
     */
    public void testERF() {

        double tmpStdDevCount;
        double tmpConfidence;
        double tmpError = new NumberContext(7, 12).epsilon();

        tmpStdDevCount = ZERO;
        tmpConfidence = ZERO;
        TestUtils.assertEquals(tmpConfidence, RandomUtils.erf(tmpStdDevCount / SQRT_TWO), tmpError);
        TestUtils.assertEquals(-tmpConfidence, RandomUtils.erf(-tmpStdDevCount / SQRT_TWO), tmpError);

        tmpStdDevCount = ONE;
        tmpConfidence = 0.682689492137;
        TestUtils.assertEquals(tmpConfidence, RandomUtils.erf(tmpStdDevCount / SQRT_TWO), tmpError);
        TestUtils.assertEquals(-tmpConfidence, RandomUtils.erf(-tmpStdDevCount / SQRT_TWO), tmpError);

        tmpStdDevCount = TWO;
        tmpConfidence = 0.954499736104;
        TestUtils.assertEquals(tmpConfidence, RandomUtils.erf(tmpStdDevCount / SQRT_TWO), tmpError);
        TestUtils.assertEquals(-tmpConfidence, RandomUtils.erf(-tmpStdDevCount / SQRT_TWO), tmpError);

        tmpStdDevCount = THREE;
        tmpConfidence = 0.997300203937;
        TestUtils.assertEquals(tmpConfidence, RandomUtils.erf(tmpStdDevCount / SQRT_TWO), tmpError);
        TestUtils.assertEquals(-tmpConfidence, RandomUtils.erf(-tmpStdDevCount / SQRT_TWO), tmpError);

        tmpStdDevCount = FOUR;
        tmpConfidence = 0.999936657516;
        TestUtils.assertEquals(tmpConfidence, RandomUtils.erf(tmpStdDevCount / SQRT_TWO), tmpError);
        TestUtils.assertEquals(-tmpConfidence, RandomUtils.erf(-tmpStdDevCount / SQRT_TWO), tmpError);

        tmpStdDevCount = FIVE;
        tmpConfidence = 0.999999426697;
        TestUtils.assertEquals(tmpConfidence, RandomUtils.erf(tmpStdDevCount / SQRT_TWO), tmpError);
        TestUtils.assertEquals(-tmpConfidence, RandomUtils.erf(-tmpStdDevCount / SQRT_TWO), tmpError);

        tmpError = new NumberContext(7, 8).epsilon();

        tmpStdDevCount = SIX;
        tmpConfidence = 0.999999998027;
        TestUtils.assertEquals(tmpConfidence, RandomUtils.erf(tmpStdDevCount / SQRT_TWO), tmpError);
        TestUtils.assertEquals(-tmpConfidence, RandomUtils.erf(-tmpStdDevCount / SQRT_TWO), tmpError);
    }

    public void testERFandERFI() {

        final double tmpError = PrimitiveMath.IS_ZERO;
        double tmpExpected = -1.5;
        double tmpActual;

        while (tmpExpected <= 1.5) {

            tmpActual = RandomUtils.erfi(RandomUtils.erf(tmpExpected));

            TestUtils.assertEquals(tmpExpected, tmpActual, tmpError);

            tmpExpected += 0.5;
        }
    }

    public void testERFI() {

        double tmpConfidenceLevel;
        double tmpExpected;
        final NumberContext tmpNewScale = new NumberContext(2, 5);

        tmpConfidenceLevel = 0.80;
        tmpExpected = 1.28155;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);

        tmpConfidenceLevel = 0.90;
        tmpExpected = 1.64485;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);

        tmpConfidenceLevel = 0.95;
        tmpExpected = 1.95996;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);

        tmpConfidenceLevel = 0.98;
        tmpExpected = 2.32635;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);

        tmpConfidenceLevel = 0.99;
        tmpExpected = 2.57583;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);

        tmpConfidenceLevel = 0.995;
        tmpExpected = 2.80703;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);

        tmpConfidenceLevel = 0.998;
        tmpExpected = 3.09023;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);

        tmpConfidenceLevel = 0.999;
        tmpExpected = 3.29052;
        TestUtils.assertEquals(tmpExpected, SQRT_TWO * RandomUtils.erfi(tmpConfidenceLevel), tmpNewScale);
    }

    public void testErlang() {
        // Erlang is a special case of the gamma where the count is an integer -- verify that this is true for current implementation.
        for (double theta = .01; theta <= 10.0; theta = theta * 10.0) {
            for (int i = 1; i < 10; i++) {
                final Erlang erl = new Erlang(i, theta);
                final Gamma gam = new Gamma(i, theta);
                TestUtils.assertEquals("Gamma should match erlang for integer k", erl.getVariance(), gam.getVariance(), 0.0);
                TestUtils.assertEquals("Gamma should match erlang for integer k", erl.getExpected(), gam.getExpected(), 0.0);
            }
        }
        // param 1 is cast to integers by Dist2Erlang
        this.testDist2(new Dist2Erlang(), new double[] { 1, .01 }, new double[] { 5, 10 }, new double[] { 5, 100 }, 2500000, .05);
    }

    public void testGamma() {
        // TODO 15% error seems a little high
        this.testDist2(new Dist2Gamma(), new double[] { .01, .01 }, new double[] { 10, 10 }, new double[] { 100, 100 }, 200000, .15);
    }

    public void testGammaFunction() {

        final double tmpEps = 0.000005;

        // From a table of values 1.0 <= x <= 2.0
        TestUtils.assertEquals(ONE, RandomUtils.gamma(1.0), IS_ZERO);
        TestUtils.assertEquals(0.95135, RandomUtils.gamma(1.10), tmpEps);
        TestUtils.assertEquals(0.91817, RandomUtils.gamma(1.20), tmpEps);
        TestUtils.assertEquals(0.89747, RandomUtils.gamma(1.30), tmpEps);
        TestUtils.assertEquals(0.88726, RandomUtils.gamma(1.40), tmpEps);
        TestUtils.assertEquals(0.88623, RandomUtils.gamma(1.50), tmpEps);
        TestUtils.assertEquals(0.89352, RandomUtils.gamma(1.60), tmpEps);
        TestUtils.assertEquals(0.90864, RandomUtils.gamma(1.70), tmpEps);
        TestUtils.assertEquals(0.93138, RandomUtils.gamma(1.80), tmpEps);
        TestUtils.assertEquals(0.96177, RandomUtils.gamma(1.90), tmpEps);
        TestUtils.assertEquals(ONE, RandomUtils.gamma(2.0), IS_ZERO);

        // Values larger than 2.0 and smaller than 1.0
        TestUtils.assertEquals("π", RandomUtils.gamma(PI), (PI - ONE) * (PI - TWO) * RandomUtils.gamma(PI - TWO), IS_ZERO);
        TestUtils.assertEquals("0.5", RandomUtils.gamma(HALF), RandomUtils.gamma(HALF + ONE) / HALF, IS_ZERO);
        TestUtils.assertEquals("0.25", RandomUtils.gamma(QUARTER), RandomUtils.gamma(QUARTER + ONE) / QUARTER, IS_ZERO);
        TestUtils.assertEquals("0.1", RandomUtils.gamma(TENTH), RandomUtils.gamma(TENTH + ONE) / TENTH, tmpEps);
        TestUtils.assertEquals("0.01", RandomUtils.gamma(HUNDREDTH), RandomUtils.gamma(HUNDREDTH + ONE) / HUNDREDTH, tmpEps);
        TestUtils.assertEquals("0.001", RandomUtils.gamma(THOUSANDTH), RandomUtils.gamma(THOUSANDTH + ONE) / THOUSANDTH, tmpEps);

        // Should align with n! for positve integers
        for (int n = 0; n < 10; n++) {
            TestUtils.assertEquals("n!:" + n, RandomUtils.factorial(n), RandomUtils.gamma(n + ONE), tmpEps);
        }

        // Negative values
        TestUtils.assertEquals("-0.5", RandomUtils.gamma(-0.5), RandomUtils.gamma(HALF) / (-0.5), tmpEps);
        TestUtils.assertEquals("-1.5", RandomUtils.gamma(-1.5), RandomUtils.gamma(HALF) / (-1.5 * -0.5), tmpEps);
        TestUtils.assertEquals("-2.5", RandomUtils.gamma(-2.5), RandomUtils.gamma(HALF) / (-2.5 * -1.5 * -0.5), tmpEps);
        TestUtils.assertEquals("-3.5", RandomUtils.gamma(-3.5), RandomUtils.gamma(HALF) / (-3.5 * -2.5 * -1.5 * -0.5), tmpEps);
        TestUtils.assertEquals("-4.5", RandomUtils.gamma(-4.5), RandomUtils.gamma(HALF) / (-4.5 * -3.5 * -2.5 * -1.5 * -0.5), tmpEps);

        // Should be undefined for 0, -1, -2, -3...
        for (int n = 0; n < 10; n++) {
            TestUtils.assertTrue("-" + n, Double.isNaN(RandomUtils.gamma(NEG * n)));
        }

        final NumberContext tmpEval = new NumberContext(10, 10);

        // Positive half integer
        for (int n = 0; n < 10; n++) {
            TestUtils.assertEquals(n + ".5", (SQRT_PI * RandomUtils.factorial(2 * n)) / (Math.pow(FOUR, n) * RandomUtils.factorial(n)),
                    RandomUtils.gamma(n + HALF), tmpEval);
        }

    }

    public void testGeometricMeanAndStandardDeviation() {

        final int tmpSize = 1000;

        final double tmpFactoryExpected = 1.05;
        final double tmpFactoryStdDev = Math.abs(new Normal(0.0, (tmpFactoryExpected - ONE)).doubleValue());
        final Normal tmpFactoryDistr = new Normal(tmpFactoryExpected, tmpFactoryStdDev);
        TestUtils.assertEquals("Factory Expected", tmpFactoryExpected, tmpFactoryDistr.getExpected(), PrimitiveMath.IS_ZERO);
        TestUtils.assertEquals("Factory Std Dev", tmpFactoryStdDev, tmpFactoryDistr.getStandardDeviation(), PrimitiveMath.IS_ZERO);

        final PrimitiveArray tmpRawValues = PrimitiveArray.make(tmpSize);
        final PrimitiveArray tmpLogValues = PrimitiveArray.make(tmpSize);
        for (int i = 0; i < tmpSize; i++) {
            tmpRawValues.data[i] = tmpFactoryDistr.doubleValue();
            tmpLogValues.data[i] = Math.log(tmpRawValues.data[i]);
        }
        final SampleSet tmpLogValuesSet = SampleSet.wrap(tmpLogValues);
        final LogNormal tmpLogDistribut = new LogNormal(tmpLogValuesSet.getMean(), tmpLogValuesSet.getStandardDeviation());

        final double tmpGeometricMean = tmpLogDistribut.getGeometricMean();
        final double tmpGeometricStandardDeviation = tmpLogDistribut.getGeometricStandardDeviation();

        double tmpRawProduct = ONE;
        for (int i = 0; i < tmpSize; i++) {
            tmpRawProduct *= tmpRawValues.data[i];
        }
        TestUtils.assertEquals(tmpGeometricMean, Math.pow(tmpRawProduct, ONE / tmpSize), PrimitiveMath.IS_ZERO);

        double tmpLogSum = ZERO;
        for (int i = 0; i < tmpSize; i++) {
            tmpLogSum += tmpLogValues.data[i];
        }
        TestUtils.assertEquals(tmpGeometricMean, Math.exp(tmpLogSum / tmpSize), PrimitiveMath.IS_ZERO);

        final double tmpLogGeoMean = Math.log(tmpGeometricMean);

        double tmpVal;
        double tmpSumSqrDiff = ZERO;
        for (int i = 0; i < tmpSize; i++) {
            tmpVal = tmpLogValues.data[i] - tmpLogGeoMean;
            tmpSumSqrDiff += (tmpVal * tmpVal);
        }
        TestUtils.assertEquals(tmpGeometricStandardDeviation / tmpGeometricStandardDeviation, Math.exp(Math.sqrt(tmpSumSqrDiff / tmpSize))
                / tmpGeometricStandardDeviation, 0.00005);
        // Check that the geometric standard deviation is within ±0.005% of what it should be.
    }

    public void testLogNormal() {

        final double tmpAccuracy = TENTH / THREE;

        final RandomNumber tmpRandomNumber = new Normal(ONE, TENTH);
        double tmpValue = HUNDRED;
        final CalendarDateSeries<Double> tmpSeries = new CalendarDateSeries<Double>();
        for (int i = 0; i < 1000; i++) {
            tmpSeries.put(i, tmpValue);
            tmpValue *= tmpRandomNumber.doubleValue();
        }
        final double[] someValues1 = tmpSeries.getPrimitiveValues();
        final int tmpSize1 = someValues1.length - 1;

        final double[] retVal1 = new double[tmpSize1];

        for (int i1 = 0; i1 < tmpSize1; i1++) {
            retVal1[i1] = someValues1[i1 + 1] / someValues1[i1];
        }

        final SampleSet tmpQuotients = SampleSet.wrap(ArrayUtils.wrapAccess1D(retVal1));
        final double[] someValues = tmpSeries.getPrimitiveValues();
        final int tmpSize = someValues.length - 1;

        final double[] retVal = new double[tmpSize];

        for (int i = 0; i < tmpSize; i++) {
            retVal[i] = Math.log(someValues[i + 1] / someValues[i]);
        }
        final SampleSet tmpLogChanges = SampleSet.wrap(ArrayUtils.wrapAccess1D(retVal));

        // Quotient distribution parameters within 3% of the generating distribution
        TestUtils.assertEquals(ONE, tmpQuotients.getMean() / tmpRandomNumber.getExpected(), tmpAccuracy);
        TestUtils.assertEquals(ONE, tmpQuotients.getStandardDeviation() / tmpRandomNumber.getStandardDeviation(), tmpAccuracy);

        final Normal tmpNormal = new Normal(tmpQuotients.getMean(), tmpQuotients.getStandardDeviation());
        final LogNormal tmpLogNormal = new LogNormal(tmpLogChanges.getMean(), tmpLogChanges.getStandardDeviation());

        // LogNormal (logarithmic changes) parameters within 3% of the Normal (quotients) parameters
        TestUtils.assertEquals(ONE, tmpLogNormal.getExpected() / tmpNormal.getExpected(), tmpAccuracy);
        TestUtils.assertEquals(ONE, tmpLogNormal.getStandardDeviation() / tmpNormal.getStandardDeviation(), tmpAccuracy);
    }

    // Sample means differ from expectation by an amount greater than anticipated given the large samples. May be due to
    // rounding error. For comparison, matlab's estimates for the mean of the normal for large samples tend to be
    // within 2 percent of the mean.
    public void testNorm2() {
        this.testDist2(new Dist2Norm(), new double[] { .01, .01 }, new double[] { 10, 10 }, new double[] { 100, 100 }, 1500000, .05);
    }

    public void testNormal() {

        final double[] tmpStdDevCount = new double[] { ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX }; // ± this number of std devs
        final double[] tmpConfidence = new double[] { ZERO, 0.682689492137, 0.954499736104, 0.997300203937, 0.999936657516, 0.999999426697, 0.999999998027 };

        final Normal tmpDistribution = new Normal(TEN, PI);

        for (int c = 0; c < 4; c++) { // Can't handle the more extrem values

            final double tmpHalfSideRemainder = (ONE - tmpConfidence[c]) / TWO;

            final double tmpUpperBound = tmpDistribution.getQuantile(ONE - tmpHalfSideRemainder);
            final double tmpLowerBound = tmpDistribution.getQuantile(tmpHalfSideRemainder);

            final double tmpExpected = tmpStdDevCount[c];
            final double tmpActual = (tmpUpperBound - tmpLowerBound) / (TWO_PI); // Std Dev is PI

            TestUtils.assertEquals(tmpExpected, tmpActual, 5.0E-3);
        }

    }

    public void testSampledMean() {

        final RandomNumber[] tmpRndNmbrs = new RandomNumber[] { new Exponential(), new LogNormal(), new Normal(), new Uniform(), new Binomial(),
                new Geometric(), new Poisson(), new Erlang(), new Gamma(), new Weibull() };

        for (int d = 0; d < tmpRndNmbrs.length; d++) {

            final RandomNumber tmpDistr = tmpRndNmbrs[d];

            final SampleSet tmpSamples = SampleSet.make(tmpDistr, 1000);

            final String tmpDistrName = tmpDistr.getClass().getSimpleName();
            final double tmpDistrValue = tmpDistr.getExpected();
            final double tmpSampledValue = tmpSamples.getMean();
            final double tmpQuotient = tmpSampledValue / tmpDistrValue;

            final double tmpExpected = TypeUtils.isZero(tmpDistrValue) ? tmpDistrValue : ONE;
            final double tmpActual = TypeUtils.isZero(tmpDistrValue) ? tmpSampledValue : tmpQuotient;

            //            BasicLogger.logDebug("Name={}: Value={} <=> Sampled={} == Quotient={}", tmpDistrName, tmpDistrValue, tmpSampledValue, tmpQuotient);

            TestUtils.assertEquals(tmpDistrName, tmpExpected, tmpActual, TENTH);
        }

    }

    public void testVariance() {

        final double tmpStdDev = TEN;
        double tmpExpectedVar = tmpStdDev * tmpStdDev;

        final SampleSet tmpSampleSet = SampleSet.make(new Normal(PI, tmpStdDev), 10000);

        double tmpActualVar = tmpSampleSet.getVariance();

        TestUtils.assertEquals(tmpExpectedVar, tmpActualVar, Math.sqrt(TEN)); // Won't always pass - it's random...

        tmpExpectedVar = tmpSampleSet.getSumOfSquares() / (tmpSampleSet.size() - 1);

        TestUtils.assertEquals(tmpExpectedVar, tmpActualVar, IS_ZERO);

        final double[] tmpValues = tmpSampleSet.getValues();
        double s = ZERO, s2 = ZERO;
        for (final double tmpVal : tmpValues) {
            s += tmpVal;
            s2 += tmpVal * tmpVal;
        }

        tmpActualVar = RandomUtils.calculateVariance(s, s2, tmpValues.length);

        TestUtils.assertEquals(tmpExpectedVar, tmpActualVar, THOUSAND * IS_ZERO); // TODO Large numerical difference, which is better?
    }

    public void testWeibull() {
        for (double i = .01; i <= 10.0; i = i * 10) {
            for (double j = .01; j <= 100.0; j = j * 10) {
                final Weibull w0 = new Weibull(i, j);
                final Weibull w1 = new Weibull(i, j);
                // There are analytic solutions available for mean and variance of Weibull, users will probably assume they're being used.
                TestUtils.assertEquals("Weibull distribution's mean should be deterministic and precise.", w0.getExpected(), w1.getExpected());
                TestUtils.assertEquals("Weibull distribution's variance should be deterministic and precise.", w0.getVariance(), w1.getVariance());
            }
        }
        this.testDist2(new Dist2Weibull(), new double[] { .01, .5 }, new double[] { 10, 2 }, new double[] { 100, 4 }, 2500000, .05);
    }

    public void testWeibullWithShape1() {

        // Weibull with shape=1.0 shoud be equivalent to Exponential with the same lambda
        final double tmpEpsilon = IS_ZERO * THOUSAND * TEN;

        for (double lambda = HUNDREDTH; lambda <= HUNDRED; lambda *= TEN) {
            final Exponential tmpExpected = new Exponential(lambda);
            final Weibull tmpActual = new Weibull(lambda, ONE);
            TestUtils.assertEquals("Expected/Mean, lambda=" + lambda, tmpExpected.getExpected(), tmpActual.getExpected(), tmpEpsilon);
            TestUtils.assertEquals("Variance, lambda=" + lambda, tmpExpected.getVariance(), tmpActual.getVariance(), tmpEpsilon);
        }
    }

    void testDist2(final Dist2 dist, final double[] min, final double[] mult, final double[] max, final int samples, final double accuracyBound) {

        for (double p0 = min[0]; p0 <= max[0]; p0 *= mult[0]) {
            for (double p1 = min[1]; p1 <= max[1]; p1 *= mult[1]) {
                final RandomNumber tmpDistribution = dist.getDist(p0, p1);
                final SampleSet tmpSamples = SampleSet.make(tmpDistribution, samples);
                // Used to estimate an upper bound on how much the sample should deviate from the analytic expected value.
                final double stErr = Math.sqrt(tmpDistribution.getVariance() / samples);

                // Within 4 standard errors of the mean. False failures should be rare under this scheme.
                TestUtils.assertEquals("Sample mean was " + tmpSamples.getMean() + ", distribution mean was " + tmpDistribution.getExpected() + ".",
                        tmpSamples.getMean(), tmpDistribution.getExpected(), 4.0 * stErr);
                // Variance of variance is not always available or easy to obtain. accuracyBound is intended as a rough estimate.
                TestUtils.assertEquals(ONE, tmpSamples.getVariance() / tmpDistribution.getVariance(), accuracyBound);
            }
        }
    }

}


text:
class IdentifierNode : public ExpressionNode
{
private:
	// Name of identifier, excluding type suffix
	std::string name_;

	// Type of identifier
	BasicType type_;

	// Associated symbol from symbol table
	Symbol *symbol_;

public:
	IdentifierNode (std::string name, BasicType type) : name_ (name), type_ (type), symbol_ (nullptr) { };

	std::string toString ();
	std::string print (std::string indent);

	// Get name and type of identifier
	std::string getName () const { return name_; }
	BasicType getType () const { return type_; }

	// Get and set associated symbol
	Symbol *getSymbol () const { return symbol_; }
	void setSymbol (Symbol *sym) { symbol_ = sym; }

	// Setting the type should be disallowed
	void setType (BasicType type);

	// Nothing to infer on values
	int inferType () { return NO_ERROR; };

	std::tuple<int, IlAddress *> generateIlCode (IlBlock *block);

	// This is an identifier
	ParserNodeType getNodeType () const { return PT_IDENTIFIER; }

	// No children
	std::list<ParserNode *> getChildren () { return { nullptr }; }
	std::list<ParserNode **> getChildrenReferences () { return { nullptr }; }
};

#endif


text:
/* ==========================================================================
   Slide menu
   ========================================================================== */

   (function () {

	var slideMenuButton = document.querySelector('.js-slideMenuButton'),
	slideNav = document.querySelector('.slideNav'),
	navItem = document.querySelector('.js-navItem'),
	body = document.querySelector('body'),
	hasActiveMenu = 'has-activeMenu';

	// 1. When .js-slideMenuButton is clicked, add .has-activeMenu to body
	slideMenuButton.addEventListener('click', function() {

		// check to see if body already has .has-activeMenu, if so remove it when button gets clicked again to close the menu
		if (body.classList.contains(hasActiveMenu)) {
			removeHasActiveMenu();

		// else add class .has-activeMenu to body
		} else {
			body.classList.add(hasActiveMenu);
		}

	});

	// 2. when clicked anywhere on the page
	window.addEventListener('click', function(e) {
		// that is NOT .js-slideMenuButton or the slideMenu itself, remove .has-activeMenu from body
		if (!slideMenuButton.contains(e.target) && !slideNav.contains(e.target) ){
			removeHasActiveMenu();
		}
	});

	// 3. Get all the links in the nav list
	var navList = document.querySelector('.js-navigationList'),
		navListItems = navList.getElementsByTagName('a');

	for (var i=0; i < navListItems.length; i++) {

		// go to corresponding section (instead of smooth scroll)
		// and so that it doesnt change the url

		// remove .has-ActiveMenu class when it has reached section

		// add active class to active section

		// 4. When nav item gets clicked, close menu
		navListItems[i].addEventListener('click', function() {
			removeHasActiveMenu();
		})
	}

	// add active state to menu item on scroll

	//  Function to remove .has-activeMenu from body
	function removeHasActiveMenu() {
		body.classList.remove('has-activeMenu');
	}
})();


text:
"""BRTT Antelope API wrapper"""

import os, sys

# Antelope libs need to see this env var, otherwise blocking calls hold the GIL
# preventing other threads from running.
os.environ['ANTELOPE_PYTHON_GILRELEASE'] = '1'

# This is where Antelope puts it's python modules. Update for other antelope
# versions.
sys.path.append('/opt/antelope/5.3/data/python/antelope')

try:
    import _Pkt as _pkt
except ImportError:
    import warnings
    warnings.warn("Failed to import Antelope libs", RuntimeWarning)

__all__ = ['_pkt']


text:
namespace RightpointLabs.ConferenceRoom.Infrastructure.Services.ExchangeRest.Models
{
    public class NotificationRequest
    {
        public int ConnectionTimeoutInMinutes { get; set; }
        public int KeepAliveNotificationIntervalInSeconds { get; set; }
        public string[] SubscriptionIds { get; set; }
    }
}


text:
namespace AspComet
{
    public interface IMessageBus
    {
        void HandleMessages(Message[] messages, ICometAsyncResult cometAsyncResult);
    }
}


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

namespace Diffusion_Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            update_text();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            setup_grid();
        }

        const int cell_size = 50;

        private List<ChunkPollution> list = new List<ChunkPollution>();

        int im = 0;
        int jm = 0;

        private void setup_grid()
        {
            list.Clear();
            sources.Clear();
            panel1.Controls.Clear();

            GC.Collect();

            panel1.SetBounds(panel1.Location.X, panel1.Location.Y, this.Width - 20, this.Height - 100);

            int sizeX = this.panel1.Size.Width;
            int sizeZ = this.panel1.Size.Height;

            this.panel1.SuspendLayout();
            this.SuspendLayout();

            im = sizeX / cell_size;
            jm = sizeZ / cell_size;

            for (int i = 0; i < im; i++)
                for (int j = 0; j < jm; j++)
                {
                    list.Add(new ChunkPollution(i, j, 0));

                    Label l = new Label();

                    l.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                    l.Font = new System.Drawing.Font("Times New Roman", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                    l.Location = new System.Drawing.Point(i * cell_size, j * cell_size);
                    l.Name = "cell"+i+"_"+j;
                    l.Size = new System.Drawing.Size(cell_size, cell_size);
                    l.Text = "X";
                    l.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

                    l.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cell_click);

                    this.panel1.Controls.Add(l);
                }

            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);

            update_text();
        }

        private void reset_button_Click(object sender, EventArgs e)
        {
            setup_grid();

            if (timer1.Enabled)
                timer1.Enabled = false;

            timer_toggle.Text = "Start Timer";
        }

        private void update_text()
        {
            for (int i = 0; i < im; i++)
                for (int j = 0; j < jm; j++)
                {
                    Label l = (Label)panel1.Controls.Find("cell" + i + "_" + j, false)[0];

                    l.Text = ""+getPollution(i, j);
                }
        }

        private void update_color()
        {
            for (int i = 0; i < im; i++)
                for (int j = 0; j < jm; j++)
                {
                    Label l = (Label)panel1.Controls.Find("cell" + i + "_" + j, false)[0];

                    if (hasListChunkPollution(sources, i, j))
                    {
                        l.BackColor = Color.Red;
                        continue;
                    }

                    double coef = (double)(getPollution(i, j) * 2550) / (double)addition_meter.Maximum;

                    if ((int)coef > 255)
                        coef = 255;

                    l.BackColor = Color.FromArgb(200, (int)(255 - (int)coef), 255, (255 - (int)coef));
                }
        }

        private double getPollution(int i, int j)
        {
            if (i < 0 || i > im || j < 0 || j > jm)
            {
                return -1;
            }

            foreach (ChunkPollution item in list)
            {
                if (item.x == i && item.z == j)
                {
                    return item.pollution;
                }
            }

            return -1;
        }

        List<ChunkPollution> sources = new List<ChunkPollution>();

        private bool hasListChunkPollution(List<ChunkPollution> li, int x, int z)
        {
            if (x < 0 || x > im || z < 0 || z > jm)
            {
                return false;
            }

            foreach (ChunkPollution item in li)
            {
                if (item.x == x && item.z == z)
                {
                    return true;
                }
            }

            return false;
        }

        private void setPollution(int x, int z, double pollution)
        {
            if (x < 0 || x > im || z < 0 || z > jm)
            {
                return;
            }

            if(!hasListChunkPollution(sources, x, z))
            for (int i = 0; i < list.Count; i++)
            {
                ChunkPollution item = list[i];
                if (item.x == x && item.z == z)
                {
                    list.Remove(item);
                    list.Add(new ChunkPollution(x, z, pollution > 0 ? pollution : 0));
                }
            }
        }

        private void addPollution(int x, int z, double delta)
        {
            if (delta + getPollution(x, z) > (double)addition_meter.Maximum)
            {
                delta = (double)addition_meter.Maximum - getPollution(x, z);
            }

            setPollution(x, z, delta + getPollution(x, z));
        }

        private void setSource(int x, int z, double emission)
        {
            if (!hasListChunkPollution(sources, x, z))
            {
                setPollution(x, z, emission);
                sources.Add(new ChunkPollution(x, z, emission));
            }
        }

        private void cell_click(object sender, EventArgs e)
        {
            Label l = (Label)sender;

            String s = l.Name.Substring(4);

            String[] crds = s.Split('_');

            if (crds.Length != 2)
            {
                return;
            }

            int i = int.Parse(crds[0]);
            int j = int.Parse(crds[1]);

            if (((MouseEventArgs)e).Button != MouseButtons.Middle)
                addPollution(i, j, (double)addition_meter.Value);
            else
            {
                if (hasListChunkPollution(sources, i, j))
                {
                    for (int k = 0; k < sources.Count; k++)
                    {
                        ChunkPollution item = sources[k];
                        if (item.x == i && item.z == j)
                        {
                            sources.Remove(item);
                        }
                    }
                }
                else
                    setSource(i, j, (double)addition_meter.Value);
            }

            update_text();

            update_color();
        }

        float diffusion_factor = 0.01F;

        public void diffuse(ChunkPollution c)
        {
            diffuse(c.x, c.z);
        }

        private void diffuse(int i, int j)
        {
            double origin_pollution = getPollution(i, j);

            int to_spread = (int)(origin_pollution * diffusion_factor) + 1;

            addPollution(i + 1, j, to_spread);
            addPollution(i - 1, j, to_spread);
            addPollution(i, j - 1, to_spread);
            addPollution(i, j + 1, to_spread);

            addPollution(i, j, -4F * to_spread);
        }

        private void process_diffusion()
        {
            for (int i = 0; i < im; i++)
                for (int j = 0; j < jm; j++)
                {
                    diffuse(i, j);
                }
        }

        private void update()
        {
            diffusion_factor = (float)coefmter.Value;
            process_diffusion();

            update_text();
            update_color();

            if (timer1.Interval != timinter.Value)
                timer1.Interval = (int)timinter.Value;
        }

        private void update_full(object sender, EventArgs e)
        {
            update();
        }

        private void timer_tick(object sender, EventArgs e)
        {
            update();
        }

        private void timer_toggle_Click(object sender, EventArgs e)
        {
            timer1.Enabled = !timer1.Enabled;

            timer_toggle.Text = timer_toggle.Text == "Start Timer" ? "Stop Timer" : "Start Timer";
        }
    }

    public class ChunkPollution
    {
        public int x;
        public int z;

        public double pollution;

        public ChunkPollution()
        {

        }

        public ChunkPollution(int nx, int nz, double npoll)
        {
            x = nx;
            z = nz;
            pollution = npoll;
        }
    }
}


text:
/**
 * \addtogroup cc2538-platforms
 * @{
 *
 * \defgroup cc2538dk The cc2538 Development Kit platform
 *
 * The cc2538DK is a platform by Texas Instruments, based on the
 * cc2538 SoC with an ARM Cortex-M3 core.
 * @{
 *
 * \file
 *   Main module for the cc2538dk platform
 */
/*---------------------------------------------------------------------------*/
#include "contiki.h"
#include "dev/leds.h"
#include "dev/sys-ctrl.h"
#include "dev/scb.h"
#include "dev/nvic.h"
#include "dev/uart.h"
#include "dev/watchdog.h"
#include "dev/ioc.h"
#include "dev/button-sensor.h"
#include "dev/serial-line.h"
#include "dev/slip.h"
#include "dev/cc2538-rf.h"
#include "dev/udma.h"
#include "usb/usb-serial.h"
#include "lib/random.h"
#include "net/netstack.h"
#include "net/queuebuf.h"
#include "net/ip/tcpip.h"
#include "net/ip/uip.h"
#include "net/mac/frame802154.h"
#include "cpu.h"
#include "reg.h"
#include "ieee-addr.h"
#include "lpm.h"

#include <stdint.h>
#include <string.h>
#include <stdio.h>
/*---------------------------------------------------------------------------*/
#if STARTUP_CONF_VERBOSE
#define PRINTF(...) printf(__VA_ARGS__)
#else
#define PRINTF(...)
#endif

#if UART_CONF_ENABLE
#define PUTS(s) puts(s)
#else
#define PUTS(s)
#endif
/*---------------------------------------------------------------------------*/
static void
fade(unsigned char l)
{
  volatile int i;
  int k, j;
  for(k = 0; k < 800; ++k) {
    j = k > 400 ? 800 - k : k;

    leds_on(l);
    for(i = 0; i < j; ++i) {
      asm("nop");
    }
    leds_off(l);
    for(i = 0; i < 400 - j; ++i) {
      asm("nop");
    }
  }
}
/*---------------------------------------------------------------------------*/
static void
set_rf_params(void)
{
  uint16_t short_addr;
  uint8_t ext_addr[8];

  ieee_addr_cpy_to(ext_addr, 8);

  short_addr = ext_addr[7];
  short_addr |= ext_addr[6] << 8;

  /* Populate linkaddr_node_addr. Maintain endianness */
  memcpy(&linkaddr_node_addr, &ext_addr[8 - LINKADDR_SIZE], LINKADDR_SIZE);

#if STARTUP_CONF_VERBOSE
  {
    int i;
    printf("Rime configured with address ");
    for(i = 0; i < LINKADDR_SIZE - 1; i++) {
      printf("%02x:", linkaddr_node_addr.u8[i]);
    }
    printf("%02x\n", linkaddr_node_addr.u8[i]);
  }
#endif

  NETSTACK_RADIO.set_value(RADIO_PARAM_PAN_ID, IEEE802154_PANID);
  NETSTACK_RADIO.set_value(RADIO_PARAM_16BIT_ADDR, short_addr);
  NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, CC2538_RF_CHANNEL);
  NETSTACK_RADIO.set_object(RADIO_PARAM_64BIT_ADDR, ext_addr, 8);
}
/*---------------------------------------------------------------------------*/
/**
 * \brief Main routine for the cc2538dk platform
 */
int
main(void)
{
  nvic_init();
  ioc_init();
  sys_ctrl_init();
  clock_init();
  lpm_init();
  rtimer_init();
  gpio_init();

  leds_init();
  fade(LEDS_YELLOW);

  process_init();

  watchdog_init();
  button_sensor_init();

  /*
   * Character I/O Initialisation.
   * When the UART receives a character it will call serial_line_input_byte to
   * notify the core. The same applies for the USB driver.
   *
   * If slip-arch is also linked in afterwards (e.g. if we are a border router)
   * it will overwrite one of the two peripheral input callbacks. Characters
   * received over the relevant peripheral will be handled by
   * slip_input_byte instead
   */
#if UART_CONF_ENABLE
  uart_init(0);
  uart_init(1);
  uart_set_input(SERIAL_LINE_CONF_UART, serial_line_input_byte);
#endif

#if USB_SERIAL_CONF_ENABLE
  usb_serial_init();
  usb_serial_set_input(serial_line_input_byte);
#endif

  serial_line_init();

  INTERRUPTS_ENABLE();
  fade(LEDS_GREEN);

  PUTS(CONTIKI_VERSION_STRING);
  PUTS(BOARD_STRING);

  PRINTF(" Net: ");
  PRINTF("%s\n", NETSTACK_NETWORK.name);
  PRINTF(" MAC: ");
  PRINTF("%s\n", NETSTACK_MAC.name);
  PRINTF(" RDC: ");
  PRINTF("%s\n", NETSTACK_RDC.name);

  /* Initialise the H/W RNG engine. */
  random_init(0);

  udma_init();

  process_start(&etimer_process, NULL);
  ctimer_init();

  set_rf_params();
  netstack_init();

#if NETSTACK_CONF_WITH_IPV6
  memcpy(&uip_lladdr.addr, &linkaddr_node_addr, sizeof(uip_lladdr.addr));
  queuebuf_init();
  process_start(&tcpip_process, NULL);
#endif /* NETSTACK_CONF_WITH_IPV6 */

  process_start(&sensors_process, NULL);

  energest_init();
  ENERGEST_ON(ENERGEST_TYPE_CPU);

  autostart_start(autostart_processes);

  watchdog_start();
  fade(LEDS_ORANGE);

  while(1) {
    uint8_t r;
    do {
      /* Reset watchdog and handle polls and events */
      watchdog_periodic();

      r = process_run();
    } while(r > 0);

    /* We have serviced all pending events. Enter a Low-Power mode. */
    lpm_enter();
  }
}
/*---------------------------------------------------------------------------*/

/**
 * @}
 * @}
 */


text: void jmp(uint32_t addr) __attribute__((noreturn));


text:
/**
 * services.js
 *
 * All my Angular Services
 *
 * @author Taylor Kemper
 */


text:
import {StyleManager} from 'lineupengine';
import {round} from '../internal';
import Column from '../model/Column';
import {IMultiLevelColumn} from '../model';
import {ISummaryRenderer} from '../renderer/interfaces';
import {gridClass} from '../renderer/MultiLevelCellRenderer';
import {COLUMN_PADDING} from '../styles';
import {createHeader, updateHeader} from './header';
import {IRankingContext} from './interfaces';
import RenderColumn from './RenderColumn';
import {ILineUpFlags} from '../interfaces';

/** @internal */
export default class MultiLevelRenderColumn extends RenderColumn {
  private readonly summaries: ISummaryRenderer[] = [];

  constructor(c: IMultiLevelColumn & Column, index: number, ctx: IRankingContext, flags: ILineUpFlags) {
    super(c, index, ctx, flags);
  }

  private get mc() {
    return <IMultiLevelColumn & Column>this.c;
  }

  get width() {
    return this.c.getWidth() + COLUMN_PADDING * this.mc.length;
  }

  createHeader() {
    const node = super.createHeader();
    const wrapper = this.ctx.document.createElement('div');
    wrapper.classList.add('lu-nested');
    wrapper.classList.add(gridClass(this.c));
    node.appendChild(wrapper);

    this.summaries.splice(0, this.summaries.length);
    this.mc.children.forEach((cc, i) => {
      const n = createHeader(cc, this.ctx, {
        mergeDropAble: false
      });
      n.classList.add('lu-header');
      (<any>n.style).gridColumnStart = (i + 1).toString();
      wrapper.appendChild(n);

      if (!this.renderers || !this.renderers.summary) {
        return;
      }
      const summary = this.ctx.summaryRenderer(cc, false);
      n.insertAdjacentHTML('beforeend', summary.template);
      const summaryNode = <HTMLElement>n.lastElementChild!;
      summaryNode.classList.add('lu-summary');
      summaryNode.dataset.renderer = cc.getSummaryRenderer();
      this.summaries.push(summary);
      summary.update(summaryNode, this.ctx.statsOf(<any>cc));
    });

    this.updateNested(wrapper);

    return node;
  }

  updateHeader(node: HTMLElement) {
    super.updateHeader(node);

    const wrapper = <HTMLElement>node.querySelector('.lu-nested');
    if (!wrapper) {
      return node; // too early
    }
    node.appendChild(wrapper); // ensure the last one
    this.updateNested(wrapper);
    return node;
  }

  updateWidthRule(style: StyleManager) {
    const mc = this.mc;
    // need this for chrome to work properly
    const widths = mc.children.map((c) => `minmax(0, ${round(c.getWidth())}fr)`);
    const clazz = gridClass(this.c);
    style.updateRule(`stacked-${this.c.id}`, `.lineup-engine .${clazz} {
      display: grid;
      grid-template-columns: ${widths.join(' ')};
    }`);
    return clazz;
  }

  private updateNested(wrapper: HTMLElement) {
    const sub = this.mc.children;
    const children = <HTMLElement[]>Array.from(wrapper.children);
    sub.forEach((c, i) => {
      const node = children[i];
      updateHeader(node, c);

      if (!this.renderers || !this.renderers.summary) {
        return;
      }
      let summary = <HTMLElement>node.querySelector('.lu-summary')!;
      const oldRenderer = summary.dataset.renderer;
      const currentRenderer = c.getSummaryRenderer();
      if (oldRenderer !== currentRenderer) {
        const renderer = this.ctx.summaryRenderer(c, false);
        summary.remove();
        summary.innerHTML = renderer.template;
        summary = <HTMLElement>summary.firstElementChild!;
        summary.classList.add('lu-summary');
        summary.dataset.renderer = currentRenderer;
        this.summaries[i] = renderer;
        node.appendChild(summary);
      }
      this.summaries[i].update(summary, this.ctx.statsOf(<any>c));
    });
  }
}


text:
<!DOCTYPE html><html><head><meta charset="utf-8" />
<meta http-equiv="refresh" content="0;url=/place/romania/weather/" />
</head></html>


text:
<form action="page4-backend.php" method="" onsubmit="return false;">

3. Architectural Features

3.5 Proximity to adjoining building

<input type="radio" name="_3-5" value="a" id='_3-5_a_-5'> Houses touch each other
<input type="radio" name="_3-5" value="b" id='_3-5_b_-5'> Houses have small gap between them
<input type="radio" name="_3-5" value="c" id='_3-5_c_-5' checked> None of the Above

3.6 Parapets, objects on roof or Projections

You may select 0 or more.

<input type="checkbox" name="_3-6[]" value="a" id='_3-6_a_-5'> Not secured to the structural system
<input type="checkbox" name="_3-6[]" value="b" id='_3-6_b_-5'> Large and heavy projections and overhangs

3.7 Staircase

You may select 0 or more.

<input type="checkbox" name="_3-7[]" value="a" id='_3-7_a_-5'> Unsymmetrical position
<input type="checkbox" name="_3-7[]" value="b" id='_3-7_b_-5'> Poorly Connected

3.8 Number of storeys

You may select 0 or more.

<input type="checkbox" name="_3-8[]" value="a" id='_3-8_a_-5'> 2 storeys
<input type="checkbox" name="_3-8[]" value="b" id='_3-8_b_-5'> 3 storey or more

<button onclick="window.openTab(5)">Next page</button>
</form>


text:
layout: post
title: How to authorize ArcSDE geodatabases on SQL Server
date: 2015-02-27 08:55
tags: [ArcGIS, ArcSDE, keycodes, SQL]
---

ArcSDE stores authorization/license info in a table called `SDE_server_config`.
Use the template below to update this table when a new authorization is needed:

{% highlight sql %}
UPDATE [MyGDB].[dbo].[SDE_server_config]
SET [char_prop_value] = 'arcsdeserver,101,ecp000000000,31-dec-2016,JA4FAKE3RA9DJLMAP105'
WHERE prop_name = 'AUTH_KEY'
{% endhighlight %}

The keycode above is *fake*. A real code can be found in the `keycodes` file
after you authorize ArcGIS Server. This file is typically in
`\\Program Files\ESRI\License<release>\sysgen` on Windows or
`/arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release>/sysgen`
on Linux.


text:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace Project31.ApplicationFramework
{
	public class MultiPaneApplicationWorkspace : Project31.Controls.LightweightControlContainerControl
	{
		private System.ComponentModel.IContainer components = null;

		public MultiPaneApplicationWorkspace()
		{
			// This call is required by the Windows Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitializeComponent call
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			components = new System.ComponentModel.Container();
		}
		#endregion
	}
}


text:
package com.jme3.renderer.opengl;

import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;

/**
 * Baseline GL methods that must be available on all platforms.
 *
 * This is the subset of vanilla desktop OpenGL 2 and OpenGL ES 2.
 *
 * @author Kirill Vainer
 */
public interface GL {

	public static final int GL_ALPHA = 0x1906;
	public static final int GL_ALWAYS = 0x207;
	public static final int GL_ARRAY_BUFFER = 0x8892;
	public static final int GL_BACK = 0x405;
	public static final int GL_BLEND = 0xBE2;
	public static final int GL_BYTE = 0x1400;
	public static final int GL_CLAMP_TO_EDGE = 0x812F;
	public static final int GL_COLOR_BUFFER_BIT = 0x4000;
	public static final int GL_COMPILE_STATUS = 0x8B81;
	public static final int GL_CULL_FACE = 0xB44;
	public static final int GL_DECR = 0x1E03;
	public static final int GL_DECR_WRAP = 0x8508;
	public static final int GL_DEPTH_BUFFER_BIT = 0x100;
	public static final int GL_DEPTH_COMPONENT = 0x1902;
	public static final int GL_DEPTH_COMPONENT16 = 0x81A5;
	public static final int GL_DEPTH_TEST = 0xB71;
	public static final int GL_DOUBLE = 0x140A;
	public static final int GL_DST_COLOR = 0x306;
	public static final int GL_DYNAMIC_DRAW = 0x88E8;
	public static final int GL_ELEMENT_ARRAY_BUFFER = 0x8893;
	public static final int GL_EQUAL = 0x202;
	public static final int GL_EXTENSIONS = 0x1F03;
	public static final int GL_FALSE = 0x0;
	public static final int GL_FLOAT = 0x1406;
	public static final int GL_FRAGMENT_SHADER = 0x8B30;
	public static final int GL_FRONT = 0x404;
	public static final int GL_FRONT_AND_BACK = 0x408;
	public static final int GL_GEQUAL = 0x206;
	public static final int GL_GREATER = 0x204;
        public static final int GL_GREEN = 0x1904;
	public static final int GL_INCR = 0x1E02;
	public static final int GL_INCR_WRAP = 0x8507;
	public static final int GL_INFO_LOG_LENGTH = 0x8B84;
	public static final int GL_INT = 0x1404;
        public static final int GL_INVALID_ENUM = 0x500;
        public static final int GL_INVALID_VALUE = 0x501;
        public static final int GL_INVALID_OPERATION = 0x502;
	public static final int GL_INVERT = 0x150A;
	public static final int GL_KEEP = 0x1E00;
	public static final int GL_LEQUAL = 0x203;
	public static final int GL_LESS = 0x201;
	public static final int GL_LINEAR = 0x2601;
	public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703;
	public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701;
	public static final int GL_LINES = 0x1;
	public static final int GL_LINE_LOOP = 0x2;
	public static final int GL_LINE_STRIP = 0x3;
	public static final int GL_LINK_STATUS = 0x8B82;
	public static final int GL_LUMINANCE = 0x1909;
	public static final int GL_LUMINANCE_ALPHA = 0x190A;
	public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
	public static final int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872;
	public static final int GL_MAX_TEXTURE_SIZE = 0xD33;
	public static final int GL_MAX_VERTEX_ATTRIBS = 0x8869;
	public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
	public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS  = 0x8B4A;
	public static final int GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
	public static final int GL_MIRRORED_REPEAT = 0x8370;
	public static final int GL_NEAREST = 0x2600;
	public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702;
	public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700;
	public static final int GL_NEVER = 0x200;
        public static final int GL_NO_ERROR = 0x0;
	public static final int GL_NONE = 0x0;
	public static final int GL_NOTEQUAL = 0x205;
	public static final int GL_ONE = 0x1;
	public static final int GL_ONE_MINUS_DST_COLOR = 0x307;
	public static final int GL_ONE_MINUS_SRC_ALPHA = 0x303;
	public static final int GL_ONE_MINUS_SRC_COLOR = 0x301;
        public static final int GL_OUT_OF_MEMORY = 0x505;
	public static final int GL_POINTS = 0x0;
	public static final int GL_POLYGON_OFFSET_FILL = 0x8037;
        public static final int GL_RED = 0x1903;
        public static final int GL_RENDERER = 0x1F01;
	public static final int GL_REPEAT = 0x2901;
	public static final int GL_REPLACE = 0x1E01;
	public static final int GL_RGB = 0x1907;
        public static final int GL_RGB565 = 0x8D62;
        public static final int GL_RGB5_A1 = 0x8057;
	public static final int GL_RGBA = 0x1908;
        public static final int GL_RGBA4 = 0x8056;
	public static final int GL_SCISSOR_TEST = 0xC11;
	public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C;
	public static final int GL_SHORT = 0x1402;
	public static final int GL_SRC_ALPHA = 0x302;
	public static final int GL_SRC_COLOR = 0x300;
	public static final int GL_STATIC_DRAW = 0x88E4;
	public static final int GL_STENCIL_BUFFER_BIT = 0x400;
	public static final int GL_STENCIL_TEST = 0xB90;
	public static final int GL_STREAM_DRAW = 0x88E0;
        public static final int GL_STREAM_READ = 0x88E1;
	public static final int GL_TEXTURE = 0x1702;
	public static final int GL_TEXTURE0 = 0x84C0;
        public static final int GL_TEXTURE1 = 0x84C1;
        public static final int GL_TEXTURE2 = 0x84C2;
        public static final int GL_TEXTURE3 = 0x84C3;
        public static final int GL_TEXTURE4 = 0x84C4;
        public static final int GL_TEXTURE5 = 0x84C5;
        public static final int GL_TEXTURE6 = 0x84C6;
        public static final int GL_TEXTURE7 = 0x84C7;
        public static final int GL_TEXTURE8 = 0x84C8;
        public static final int GL_TEXTURE9 = 0x84C9;
        public static final int GL_TEXTURE10 = 0x84CA;
        public static final int GL_TEXTURE11 = 0x84CB;
        public static final int GL_TEXTURE12 = 0x84CC;
        public static final int GL_TEXTURE13 = 0x84CD;
        public static final int GL_TEXTURE14 = 0x84CE;
        public static final int GL_TEXTURE15 = 0x84CF;
	public static final int GL_TEXTURE_2D = 0xDE1;
	public static final int GL_TEXTURE_CUBE_MAP = 0x8513;
	public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
        public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
        public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
        public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
        public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
        public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
	public static final int GL_TEXTURE_MAG_FILTER = 0x2800;
	public static final int GL_TEXTURE_MAX_LEVEL = 0x813D;
	public static final int GL_TEXTURE_MIN_FILTER = 0x2801;
	public static final int GL_TEXTURE_WRAP_S = 0x2802;
	public static final int GL_TEXTURE_WRAP_T = 0x2803;
	public static final int GL_TRIANGLES = 0x4;
	public static final int GL_TRIANGLE_FAN = 0x6;
	public static final int GL_TRIANGLE_STRIP = 0x5;
	public static final int GL_TRUE = 0x1;
	public static final int GL_UNPACK_ALIGNMENT = 0xCF5;
	public static final int GL_UNSIGNED_BYTE = 0x1401;
	public static final int GL_UNSIGNED_INT = 0x1405;
	public static final int GL_UNSIGNED_SHORT = 0x1403;
        public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
	public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
        public static final int GL_VENDOR = 0x1F00;
	public static final int GL_VERSION = 0x1F02;
	public static final int GL_VERTEX_SHADER = 0x8B31;
	public static final int GL_ZERO = 0x0;

        public void resetStats();

	public void glActiveTexture(int texture);
	public void glAttachShader(int program, int shader);
	public void glBindBuffer(int target, int buffer);
	public void glBindTexture(int target, int texture);
	public void glBlendFunc(int sfactor, int dfactor);
        public void glBufferData(int target, long data_size, int usage);
	public void glBufferData(int target, FloatBuffer data, int usage);
	public void glBufferData(int target, ShortBuffer data, int usage);
	public void glBufferData(int target, ByteBuffer data, int usage);
	public void glBufferSubData(int target, long offset, FloatBuffer data);
	public void glBufferSubData(int target, long offset, ShortBuffer data);
	public void glBufferSubData(int target, long offset, ByteBuffer data);
	public void glClear(int mask);
	public void glClearColor(float red, float green, float blue, float alpha);
	public void glColorMask(boolean red, boolean green, boolean blue, boolean alpha);
	public void glCompileShader(int shader);
	public void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ByteBuffer data);
	public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ByteBuffer data);
	public int glCreateProgram();
	public int glCreateShader(int shaderType);
	public void glCullFace(int mode);
	public void glDeleteBuffers(IntBuffer buffers);
	public void glDeleteProgram(int program);
	public void glDeleteShader(int shader);
	public void glDeleteTextures(IntBuffer textures);
	public void glDepthFunc(int func);
	public void glDepthMask(boolean flag);
	public void glDepthRange(double nearVal, double farVal);
	public void glDetachShader(int program, int shader);
	public void glDisable(int cap);
	public void glDisableVertexAttribArray(int index);
	public void glDrawArrays(int mode, int first, int count);

	public void glDrawRangeElements(int mode, int start, int end, int count, int type, long indices); /// GL2+
	public void glEnable(int cap);
	public void glEnableVertexAttribArray(int index);
	public void glGenBuffers(IntBuffer buffers);
	public void glGenTextures(IntBuffer textures);
	public int glGetAttribLocation(int program, String name);
	public void glGetBoolean(int pname, ByteBuffer params);
        public void glGetBufferSubData(int target, long offset, ByteBuffer data);
        public int glGetError();
	public void glGetInteger(int pname, IntBuffer params);
	public void glGetProgram(int program, int pname, IntBuffer params);
	public String glGetProgramInfoLog(int program, int maxSize);
	public void glGetShader(int shader, int pname, IntBuffer params);
	public String glGetShaderInfoLog(int shader, int maxSize);
	public String glGetString(int name);
	public int glGetUniformLocation(int program, String name);
	public boolean glIsEnabled(int cap);
	public void glLineWidth(float width);
	public void glLinkProgram(int program);
	public void glPixelStorei(int pname, int param);
	public void glPolygonOffset(float factor, float units);
	public void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data);
        public void glReadPixels(int x, int y, int width, int height, int format, int type, long offset);
	public void glScissor(int x, int y, int width, int height);
	public void glShaderSource(int shader, String[] string, IntBuffer length);
	public void glStencilFuncSeparate(int face, int func, int ref, int mask);
	public void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass);
	public void glTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data);
	public void glTexParameterf(int target, int pname, float param);
	public void glTexParameteri(int target, int pname, int param);
	public void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data);
	public void glUniform1(int location, FloatBuffer value);
	public void glUniform1(int location, IntBuffer value);
	public void glUniform1f(int location, float v0);
	public void glUniform1i(int location, int v0);
	public void glUniform2(int location, IntBuffer value);
	public void glUniform2(int location, FloatBuffer value);
	public void glUniform2f(int location, float v0, float v1);
	public void glUniform3(int location, IntBuffer value);
	public void glUniform3(int location, FloatBuffer value);
	public void glUniform3f(int location, float v0, float v1, float v2);
	public void glUniform4(int location, FloatBuffer value);
	public void glUniform4(int location, IntBuffer value);
	public void glUniform4f(int location, float v0, float v1, float v2, float v3);
	public void glUniformMatrix3(int location, boolean transpose, FloatBuffer value);
	public void glUniformMatrix4(int location, boolean transpose, FloatBuffer value);
	public void glUseProgram(int program);
	public void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer);
	public void glViewport(int x, int y, int width, int height);
}


text:
"""
    Pytorch adaptation of https://omoindrot.github.io/triplet-loss
    https://github.com/omoindrot/tensorflow-triplet-loss
"""
import torch
import torch.nn as nn

class TripletMarginLoss(nn.Module):
    def __init__(self, margin=1.0, p=2.0, mining="batch_all"):
        super().__init__()
        self.margin = margin
        self.p = p
        self.mining = mining

        if mining == "batch_all":
            self.loss_fn = batch_all_triplet_loss
        if mining == "batch_hard":
            self.loss_fn = batch_hard_triplet_loss

    def forward(self, embeddings, labels):
        return self.loss_fn(labels, embeddings, self.margin, self.p)

def batch_hard_triplet_loss(labels, embeddings, margin, p):
    pairwise_dist = torch.cdist(embeddings, embeddings, p=p)

    mask_anchor_positive = _get_anchor_positive_triplet_mask(labels).float()
    anchor_positive_dist = mask_anchor_positive * pairwise_dist

    # hardest positive for every anchor
    hardest_positive_dist, _ = anchor_positive_dist.max(1, keepdim=True)

    mask_anchor_negative = _get_anchor_negative_triplet_mask(labels).float()

    # Add max value in each row to invalid negatives
    max_anchor_negative_dist, _ = pairwise_dist.max(1, keepdim=True)
    anchor_negative_dist = pairwise_dist + max_anchor_negative_dist * (1.0 - mask_anchor_negative)

    # hardest negative for every anchor
    hardest_negative_dist, _ = anchor_negative_dist.min(1, keepdim=True)

    triplet_loss = hardest_positive_dist - hardest_negative_dist + margin
    triplet_loss[triplet_loss < 0] = 0

    triplet_loss = triplet_loss.mean()

    return triplet_loss, -1

def batch_all_triplet_loss(labels, embeddings, margin, p):
    pairwise_dist = torch.cdist(embeddings, embeddings, p=p)

    anchor_positive_dist = pairwise_dist.unsqueeze(2)
    anchor_negative_dist = pairwise_dist.unsqueeze(1)

    triplet_loss = anchor_positive_dist - anchor_negative_dist + margin

    mask = _get_triplet_mask(labels)
    triplet_loss = mask.float() * triplet_loss

    # Remove negative losses (easy triplets)
    triplet_loss[triplet_loss < 0] = 0

    # Count number of positive triplets (where triplet_loss > 0)
    valid_triplets = triplet_loss[triplet_loss > 1e-16]
    num_positive_triplets = valid_triplets.size(0)
    num_valid_triplets = mask.sum()

    fraction_positive_triplets = num_positive_triplets / (num_valid_triplets.float() + 1e-16)

    # Get final mean triplet loss over the positive valid triplets
    triplet_loss = triplet_loss.sum() / (num_positive_triplets + 1e-16)

    return triplet_loss, fraction_positive_triplets

def _get_triplet_mask(labels):
    # Check that i, j and k are distinct
    indices_equal = torch.eye(labels.size(0), dtype=torch.bool, device=labels.device)
    indices_not_equal = ~indices_equal
    i_not_equal_j = indices_not_equal.unsqueeze(2)
    i_not_equal_k = indices_not_equal.unsqueeze(1)
    j_not_equal_k = indices_not_equal.unsqueeze(0)

    distinct_indices = (i_not_equal_j & i_not_equal_k) & j_not_equal_k

    label_equal = labels.unsqueeze(0) == labels.unsqueeze(1)
    i_equal_j = label_equal.unsqueeze(2)
    i_equal_k = label_equal.unsqueeze(1)

    valid_labels = ~i_equal_k & i_equal_j

    return valid_labels & distinct_indices

def _get_anchor_positive_triplet_mask(labels):
    # Check that i and j are distinct
    indices_equal = torch.eye(labels.size(0), dtype=torch.bool, device=labels.device)
    indices_not_equal = ~indices_equal

    # Check if labels[i] == labels[j]
    labels_equal = labels.unsqueeze(0) == labels.unsqueeze(1)

    return labels_equal & indices_not_equal

def _get_anchor_negative_triplet_mask(labels):
    return labels.unsqueeze(0) != labels.unsqueeze(1)


text: from .v1 import v1


text:
class BestmoviesPipeline(object):
    def process_item(self, item, spider):
        return item


text:
if [ -d "/vagrant/app/craft/storage/backups" ]; then
  db_init=`ls /vagrant/app/craft/storage/backups | tail -1`;
else
  db_init='';
fi

## If there is, restore it:
if test ! -s $db_init
then
  echo
  echo "Populating Craft database from latest backup ($db_init)";
  mysql -u$1 -p$2 $3 < /vagrant/app/craft/storage/backups/$db_init;
  echo
else
  echo
  echo "No Craft database backups found.";
  echo "Please finish installing Craft by visiting craft.dev/admin/install in your browser.";
  echo
fi


text:
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, InputLayer, Dropout

# 入力サイズ等はここを変更
width = 416
height = 416
r_w = 13
r_h = 13
r_n = 5
classes = 20

def vgg_yolo_model():
    model = Sequential()
    model.add(InputLayer(input_shape=(width, height, 3)))

    model.add(Conv2D(64, data_format="channels_last", activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(Conv2D(64, data_format="channels_last",
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(MaxPooling2D(pool_size=(2, 2), padding='same', strides=(2, 2)))

    model.add(Conv2D(128, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(Conv2D(128, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(MaxPooling2D(pool_size=(2, 2), padding='same', strides=(2, 2)))

    model.add(Conv2D(256, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(Conv2D(256, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(MaxPooling2D(pool_size=(2, 2), padding='same', strides=(2, 2)))

    model.add(Conv2D(512, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(Conv2D(512, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(Conv2D(512, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(MaxPooling2D(pool_size=(2, 2), padding='same', strides=(2, 2)))

    model.add(Conv2D(512, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(Conv2D(512, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(Conv2D(512, data_format="channels_last",  activation='relu',
                     padding='same', kernel_size=(3, 3), strides=(1, 1)))
    model.add(MaxPooling2D(pool_size=(2, 2), padding='same', strides=(2, 2)))

    model.add(Dropout(0.25))
    model.add(Conv2D(125, use_bias=True, data_format="channels_last", activation='relu',
                     padding='same', kernel_size=(1, 1), strides=(1, 1)))

    return model

vgg_yolo_model = vgg_yolo_model()
vgg_yolo_model.summary()


text:
module Middleman
  module Blog
    VERSION = "3.6.0.beta.2"
  end
end


text:
package weather.model;

/**
 * Model for Coordinates returned in Weather query
 * @author Praveen
 *
 */
public class Coordinates {
	private double longitude;
	private double latitude;

	// construct the object
	public Coordinates(double latitude, double longitude) {
		this.latitude = latitude;
		this.longitude = longitude;
	}

	/*
	 * Getters and Setters
	 */
	public double getLatitude() {
		return latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
}


text:
class RenderWindowUIMultipleInheritance
  : public QMainWindow,
    private Ui::RenderWindowUIMultipleInheritance
{
  Q_OBJECT
public:
  RenderWindowUIMultipleInheritance();

public slots:

  void slotExit();
};

#endif


text:
module Koi
  class SettingsController < TranslationsController
    defaults resource_class: Setting

    def new
      @setting = Setting.new(prefix: params[:prefix])
    end

    def create
      create! { resource.prefix.present? ? "#{request.referer}#tab-extra" : { action: :index } }
    end

    def update
      update! { resource.prefix.present? ? "#{request.referer}#tab-extra" : { action: :index } }
    end

    def update_multiple
      params[:setting][:setting].each do |id, _value|
        @setting = Setting.find(id.to_i)
        @setting.update(params[:setting][:setting][id])
      end

      params[:group] = "main" if params[:group].blank?

      redirect_to(request.referer + "#tab-#{params[:group]}")
    end
  end
end


text:
package com.zimbra.cs.util.tnef.mapi;

/**
 *
 * @author Gren Elliot
 */
public enum AppointmentStateFlags {
    ASF_MEETING (0x00000001),
    ASF_RECEIVED (0x00000002),
    ASF_CANCELED (0x00000004);

    private final int MapiPropValue;

    AppointmentStateFlags(int propValue) {
        MapiPropValue = propValue;
    }

    public int mapiPropValue() {
        return MapiPropValue;
    }

}


text:
package com.mulberry.athena.toolkit.compile;

import javax.tools.SimpleJavaFileObject;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;

/**
 * Created with IntelliJ IDEA.
 *
 * @author James Zhan
 *         Date: 6/17/14
 *         Time: 7:36 PM
 */
public class StringSourceFile extends SimpleJavaFileObject {
    private String contents = null;

    public StringSourceFile(String className, String contents) {
        super(URI.create("string:///" + className.replace('.', '/') + Kind.SOURCE.extension), Kind.SOURCE);
        this.contents = contents;
    }

    public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
        return contents;
    }

    @Override
    public InputStream openInputStream() throws IOException {
        return new ByteArrayInputStream(contents.getBytes());
    }

}


text:
<!doctype html>

	<meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width"/>
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../assets/ico/favicon.ico">
    <title>simple Server</title>

    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

    <link rel="stylesheet" href="master.css">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="files/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="files/apple-touch-icon-114-precomposed.png">
       <link rel="apple-touch-icon-precomposed" sizes="72x72" href="files/apple-touch-icon-72-precomposed.png">
                     <link rel="apple-touch-icon-precomposed" href="files/apple-touch-icon-57-precomposed.png">
                                                            <link rel="shortcut icon" href="files/favicon.png">

hello Franz, from the server


text:
import * as Scrivito from 'scrivito'
import { registerTextExtract } from '../../utils/textExtractRegistry'

const AddressWidget = Scrivito.provideWidgetClass('AddressWidget', {
  attributes: {
    showLogo: ['enum', { values: ['yes', 'no'] }],
    showBorderBottom: ['enum', { values: ['yes', 'no'] }],

    locationName: 'string',
    locationStreetAddress: 'string',
    locationLocality: 'string',
    locationPostalCode: 'string',
    locationRegion: 'string',
    locationCountry: 'string',
    addressFormat: ['enum', { values: ['USA', 'GER'] }],

    phone: 'string',
    fax: 'string',
    email: 'string'
  }
})

registerTextExtract('AddressWidget', [
  { attribute: 'locationName', type: 'string' },
  { attribute: 'locationStreetAddress', type: 'string' },
  { attribute: 'locationLocality', type: 'string' },
  { attribute: 'locationPostalCode', type: 'string' },
  { attribute: 'locationRegion', type: 'string' },
  { attribute: 'locationCountry', type: 'string' },
  { attribute: 'phone', type: 'string' },
  { attribute: 'fax', type: 'string' },
  { attribute: 'email', type: 'string' }
])

export default AddressWidget


text:
package org.apache.zeppelin.server;

import org.apache.zeppelin.conf.ZeppelinConfiguration;
import org.apache.zeppelin.utils.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.URISyntaxException;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Cors filter
 *
 */
public class CorsFilter implements Filter {

  private static final Logger LOGGER = LoggerFactory.getLogger(CorsFilter.class);

  @Override
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
      throws IOException, ServletException {
    String sourceHost = ((HttpServletRequest) request).getHeader("Origin");
    String origin = "";

    try {
      if (SecurityUtils.isValidOrigin(sourceHost, ZeppelinConfiguration.create())) {
        origin = sourceHost;
      }
    } catch (URISyntaxException e) {
      LOGGER.error("Exception in WebDriverManager while getWebDriver ", e);
    }

    if (((HttpServletRequest) request).getMethod().equals("OPTIONS")) {
      HttpServletResponse resp = ((HttpServletResponse) response);
      addCorsHeaders(resp, origin);
      return;
    }

    if (response instanceof HttpServletResponse) {
      HttpServletResponse alteredResponse = ((HttpServletResponse) response);
      addCorsHeaders(alteredResponse, origin);
    }
    filterChain.doFilter(request, response);
  }

  private void addCorsHeaders(HttpServletResponse response, String origin) {
    response.setHeader("Access-Control-Allow-Origin", origin);
    response.setHeader("Access-Control-Allow-Credentials", "true");
    response.setHeader("Access-Control-Allow-Headers", "authorization,Content-Type");
    response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, HEAD, DELETE");
    DateFormat fullDateFormatEN =
        DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL, new Locale("EN", "en"));
    response.setHeader("Date", fullDateFormatEN.format(new Date()));
    ZeppelinConfiguration zeppelinConfiguration = ZeppelinConfiguration.create();
    response.setHeader("X-FRAME-OPTIONS", zeppelinConfiguration.getXFrameOptions());
    if (zeppelinConfiguration.useSsl()) {
      response.setHeader("Strict-Transport-Security", zeppelinConfiguration.getStrictTransport());
    }
    response.setHeader("X-XSS-Protection", zeppelinConfiguration.getXxssProtection());
  }

  @Override
  public void destroy() {}

  @Override
  public void init(FilterConfig filterConfig) throws ServletException {}
}


text:
/**
 * Forcify Example
 * use with CommonJS
 *
 * If you want to run CommonJS in browser, you need build tool
 * this example is built by webpack, you can use browserify as well.
 */

//Require Forcify
var Forcify = require('forcify')

/**
 * Cache Element
 */
var element             = document.getElementById('forceMe');
var element2            = document.getElementById('forceMe2');
var forceValueOutput    = document.getElementById('forceValue');
var background          = document.getElementById('background');

/**
 * Create Forcify Instances
 */
var qf = new Forcify(element);
qf.on('force', function(e){
    renderElement(e.force, element)
});

// Forcify support Muti-touch!
var qf2 = new Forcify(element2);
qf2.on('force', function(e){
    renderElement(e.force, element2)
});

/**
 * Render!
 */
function renderElement(forceValue, _element) {
    // animate element
    _element.style.webkitTransform =
        'translateX(-50%) translateY(-50%) scale(' +
        (1 + forceValue * 1.5) +
        ')';

    // blur background, only in iOS/OSX for performance reasons.
    if(Forcify.detection.TOUCH3D || Forcify.detection.OSXFORCE){
        background.style.webkitFilter = 'blur(' + forceValue * 30 + 'px)';
    }

    // output force value
    forceValueOutput.innerHTML = 'Force: ' + forceValue.toFixed(4);
}


text:
<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta charset="UTF-8">

    <link rel="stylesheet" type="text/css" href="css/reset.min.css">
    <link rel="stylesheet" type="text/css" href="build/ui.min.css">
    <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">


text:
import os

def find(filename):
    path = os.path.join(os.path.dirname(__file__), '..', 'data', filename)
    if os.path.exists(path):
        return path


text:
// +skip_license_check

/*
This file contains portions of code directly taken from the 'xenolf/lego' project.
A copy of the license for this code can be found in the file named LICENSE in
this directory.
*/

package route53

import (
	"errors"
	"fmt"
	"net/http/httptest"
	"os"
	"testing"

	logf "github.com/jetstack/cert-manager/pkg/logs"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/credentials"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/route53"
	"github.com/aws/aws-sdk-go/service/sts"
	"github.com/aws/aws-sdk-go/service/sts/stsiface"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	"github.com/jetstack/cert-manager/pkg/issuer/acme/dns/util"
)

var (
	route53Secret string
	route53Key    string
	route53Region string
)

func init() {
	route53Key = os.Getenv("AWS_ACCESS_KEY_ID")
	route53Secret = os.Getenv("AWS_SECRET_ACCESS_KEY")
	route53Region = os.Getenv("AWS_REGION")
}

func restoreRoute53Env() {
	os.Setenv("AWS_ACCESS_KEY_ID", route53Key)
	os.Setenv("AWS_SECRET_ACCESS_KEY", route53Secret)
	os.Setenv("AWS_REGION", route53Region)
}

func makeRoute53Provider(ts *httptest.Server) (*DNSProvider, error) {
	config := &aws.Config{
		Credentials: credentials.NewStaticCredentials("abc", "123", " "),
		Endpoint:    aws.String(ts.URL),
		Region:      aws.String("mock-region"),
		MaxRetries:  aws.Int(1),
	}

	sess, err := session.NewSession(config)
	if err != nil {
		return nil, err
	}
	client := route53.New(sess)
	return &DNSProvider{client: client, dns01Nameservers: util.RecursiveNameservers}, nil
}

func TestAmbientCredentialsFromEnv(t *testing.T) {
	os.Setenv("AWS_ACCESS_KEY_ID", "123")
	os.Setenv("AWS_SECRET_ACCESS_KEY", "123")
	os.Setenv("AWS_REGION", "us-east-1")
	defer restoreRoute53Env()

	provider, err := NewDNSProvider("", "", "", "", "", true, util.RecursiveNameservers)
	assert.NoError(t, err, "Expected no error constructing DNSProvider")

	_, err = provider.client.Config.Credentials.Get()
	assert.NoError(t, err, "Expected credentials to be set from environment")
	assert.Equal(t, provider.client.Config.Region, aws.String("us-east-1"))
}

func TestNoCredentialsFromEnv(t *testing.T) {
	os.Setenv("AWS_ACCESS_KEY_ID", "123")
	os.Setenv("AWS_SECRET_ACCESS_KEY", "123")
	os.Setenv("AWS_REGION", "us-east-1")
	defer restoreRoute53Env()

	_, err := NewDNSProvider("", "", "", "", "", false, util.RecursiveNameservers)
	assert.Error(t, err, "Expected error constructing DNSProvider with no credentials and not ambient")
}

func TestAmbientRegionFromEnv(t *testing.T) {
	os.Setenv("AWS_REGION", "us-east-1")
	defer restoreRoute53Env()

	provider, err := NewDNSProvider("", "", "", "", "", true, util.RecursiveNameservers)
	assert.NoError(t, err, "Expected no error constructing DNSProvider")

	assert.Equal(t, "us-east-1", *provider.client.Config.Region, "Expected Region to be set from environment")
}

func TestNoRegionFromEnv(t *testing.T) {
	os.Setenv("AWS_REGION", "us-east-1")
	defer restoreRoute53Env()

	provider, err := NewDNSProvider("marx", "swordfish", "", "", "", false, util.RecursiveNameservers)
	assert.NoError(t, err, "Expected no error constructing DNSProvider")

	assert.Equal(t, "", *provider.client.Config.Region, "Expected Region to not be set from environment")
}

func TestRoute53Present(t *testing.T) {
	mockResponses := MockResponseMap{
		"/2013-04-01/hostedzonesbyname":         MockResponse{StatusCode: 200, Body: ListHostedZonesByNameResponse},
		"/2013-04-01/hostedzone/ABCDEFG/rrset/": MockResponse{StatusCode: 200, Body: ChangeResourceRecordSetsResponse},
		"/2013-04-01/hostedzone/HIJKLMN/rrset/": MockResponse{StatusCode: 200, Body: ChangeResourceRecordSetsResponse},
		"/2013-04-01/change/123456":             MockResponse{StatusCode: 200, Body: GetChangeResponse},
		"/2013-04-01/hostedzone/OPQRSTU/rrset/": MockResponse{StatusCode: 403, Body: ChangeResourceRecordSets403Response},
	}

	ts := newMockServer(t, mockResponses)
	defer ts.Close()

	provider, err := makeRoute53Provider(ts)
	assert.NoError(t, err, "Expected to make a Route 53 provider without error")

	domain := "example.com"
	keyAuth := "123456d=="

	err = provider.Present(domain, "_acme-challenge."+domain+".", keyAuth)
	assert.NoError(t, err, "Expected Present to return no error")

	subDomain := "foo.example.com"
	err = provider.Present(subDomain, "_acme-challenge."+subDomain+".", keyAuth)
	assert.NoError(t, err, "Expected Present to return no error")

	nonExistentSubDomain := "bar.foo.example.com"
	err = provider.Present(nonExistentSubDomain, nonExistentSubDomain+".", keyAuth)
	assert.NoError(t, err, "Expected Present to return no error")

	nonExistentDomain := "baz.com"
	err = provider.Present(nonExistentDomain, nonExistentDomain+".", keyAuth)
	assert.Error(t, err, "Expected Present to return an error")

	// This test case makes sure that the request id has been properly
	// stripped off. It has to be stripped because it changes on every
	// request which causes spurious challenge updates.
	err = provider.Present("bar.example.com", "bar.example.com.", keyAuth)
	require.Error(t, err, "Expected Present to return an error")
	assert.Equal(t, `failed to change Route 53 record set: AccessDenied: User: arn:aws:iam::0123456789:user/test-cert-manager is not authorized to perform: route53:ChangeResourceRecordSets on resource: arn:aws:route53:::hostedzone/OPQRSTU`, err.Error())
}

func TestAssumeRole(t *testing.T) {
	creds := &sts.Credentials{
		AccessKeyId:     aws.String("foo"),
		SecretAccessKey: aws.String("bar"),
		SessionToken:    aws.String("my-token"),
	}
	cases := []struct {
		name      string
		ambient   bool
		role      string
		expErr    bool
		expCreds  *sts.Credentials
		expRegion string
		key       string
		secret    string
		region    string
		mockSTS   *mockSTS
	}{
		{
			name:      "should assume role w/ ambient creds",
			role:      "my-role",
			key:       "key",
			secret:    "secret",
			region:    "",
			ambient:   true,
			expErr:    false,
			expCreds:  creds,
			expRegion: "",
			mockSTS: &mockSTS{
				AssumeRoleFn: func(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
					return &sts.AssumeRoleOutput{
						Credentials: creds,
					}, nil
				},
			},
		},
		{
			name:     "should assume role w/o ambient",
			ambient:  false,
			role:     "my-role",
			key:      "key",
			secret:   "secret",
			region:   "eu-central-1",
			expErr:   false,
			expCreds: creds,
			mockSTS: &mockSTS{
				AssumeRoleFn: func(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
					return &sts.AssumeRoleOutput{
						Credentials: creds,
					}, nil
				},
			},
		},
		{
			name:    "no role set: do NOT assume role and use provided credentials",
			ambient: true,
			role:    "",
			key:     "my-explicit-key",
			secret:  "my-explicit-secret",
			region:  "eu-central-1",
			expErr:  false,
			expCreds: &sts.Credentials{
				AccessKeyId:     aws.String("my-explicit-key"),    // from <key> above
				SecretAccessKey: aws.String("my-explicit-secret"), // from <secret> above
			},
			mockSTS: &mockSTS{
				AssumeRoleFn: func(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
					return &sts.AssumeRoleOutput{
						Credentials: creds,
					}, nil
				},
			},
		},
		{
			// AssumeRole() error should be forwarded by provider
			name:     "error assuming role w/ ambient",
			ambient:  true,
			role:     "my-role",
			key:      "key",
			secret:   "secret",
			region:   "eu-central-1",
			expErr:   true,
			expCreds: nil,
			mockSTS: &mockSTS{
				AssumeRoleFn: func(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
					return nil, fmt.Errorf("error assuming mock role")
				},
			},
		},
	}

	for _, c := range cases {
		t.Run(c.name, func(t *testing.T) {
			provider, err := makeMockSessionProvider(func(sess *session.Session) stsiface.STSAPI {
				return c.mockSTS
			}, c.key, c.secret, c.region, c.role, c.ambient)
			assert.NoError(t, err)
			sess, err := provider.GetSession()
			if c.expErr {
				assert.NotNil(t, err)
			} else {
				sessCreds, _ := sess.Config.Credentials.Get()
				assert.Equal(t, c.mockSTS.assumedRole, c.role)
				assert.Equal(t, *c.expCreds.SecretAccessKey, sessCreds.SecretAccessKey)
				assert.Equal(t, *c.expCreds.AccessKeyId, sessCreds.AccessKeyID)
				assert.Equal(t, c.region, *sess.Config.Region)
			}
		})
	}
}

type mockSTS struct {
	*sts.STS
	AssumeRoleFn func(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
	assumedRole  string
}

func (m *mockSTS) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
	if m.AssumeRoleFn != nil {
		m.assumedRole = *input.RoleArn
		return m.AssumeRoleFn(input)
	}

	return nil, nil
}

func makeMockSessionProvider(defaultSTSProvider func(sess *session.Session) stsiface.STSAPI, accessKeyID, secretAccessKey, region, role string, ambient bool) (*sessionProvider, error) {
	return &sessionProvider{
		AccessKeyID:     accessKeyID,
		SecretAccessKey: secretAccessKey,
		Ambient:         ambient,
		Region:          region,
		Role:            role,
		StsProvider:     defaultSTSProvider,
		log:             logf.Log.WithName("route53-session"),
	}, nil
}

func Test_removeReqID(t *testing.T) {
	tests := []struct {
		name    string
		err     error
		wantErr error
	}{
		{
			name:    "should remove the request id and the origin error",
			err:     awserr.NewRequestFailure(awserr.New("foo", "bar", nil), 400, "SOMEREQUESTID"),
			wantErr: awserr.New("foo", "bar", nil),
		},
		{
			name:    "should do nothing if no request id is set",
			err:     awserr.New("foo", "bar", nil),
			wantErr: awserr.New("foo", "bar", nil),
		},
		{
			name:    "should do nothing if the error is not an aws error",
			err:     errors.New("foo"),
			wantErr: errors.New("foo"),
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			err := removeReqID(tt.err)
			if tt.wantErr != nil {
				require.Error(t, err)
				assert.Equal(t, tt.wantErr.Error(), err.Error())
				return
			}
			require.NoError(t, err)
		})
	}
}