text:
import { renderers } from 'callsite-record';
import { UncaughtTestCafeErrorInCustomScript } from '../../test-run';
import { shouldSkipCallsite } from '../utils';
import TEMPLATES from '../templates';

export function renderHtmlWithoutStack (err: UncaughtTestCafeErrorInCustomScript): string {
    return err.errCallsite._renderRecord(err.expression, {
        renderer: renderers.html,
        stack:    false,
    });
}

export function shouldRenderHtmlWithoutStack (err: UncaughtTestCafeErrorInCustomScript): boolean {
    return 'errCallsite' in err && TEMPLATES[err.originError.code] && !shouldSkipCallsite(err.originError);
}

redpajama_set_name: RedPajamaGithub


text:
#region License
//    Copyright 2012 Julien Lebosquain
//
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//        http://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.
#endregion
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using JetBrains.Annotations;
using JetBrains.Util.Lazy;

namespace GammaJul.ReSharper.ForTea.Psi.Directives {

	public class EncodingDirectiveAttributeInfo : DirectiveAttributeInfo {

		private readonly JetBrains.Util.Lazy.Lazy<JetHashSet<string>> _encodings;
		private ReadOnlyCollection<string> _intellisenseValues;

		[NotNull]
		private static JetHashSet<string> CreateEncodings() {
			return new JetHashSet<string>(Encoding.GetEncodings().Select(info => info.Name), StringComparer.OrdinalIgnoreCase);
		}

		public override bool IsValid(string value) {
			return _encodings.Value.Contains(value);
		}

		public override IEnumerable<string> IntelliSenseValues {
			get { return _intellisenseValues ?? (_intellisenseValues = Array.AsReadOnly(_encodings.Value.ToArray())); }
		}

		public EncodingDirectiveAttributeInfo([NotNull] string name, DirectiveAttributeOptions options)
			: base(name, options) {
			_encodings = Lazy.Of(CreateEncodings, true);
		}

	}

}


text:
using System;
using Unity.Burst;
using Unity.Jobs;
using UnityEngine;
using Unity.Jobs.LowLevel.Unsafe;

namespace UnityEngine
{
    public class Debug
    {
        public static void Log(object message)
        {
        }
    }
}

namespace Unity
{
    namespace Jobs
    {
        [JobProducerType]
        public interface IJob
        {
            void Execute();
        }

        namespace LowLevel
        {
            namespace Unsafe
            {
                public class JobProducerTypeAttribute : Attribute
                {
                }
            }
        }
    }

    namespace Burst
    {
        public class BurstCompileAttribute : Attribute
        {
        }

        public class BurstDiscardAttribute : Attribute
        {
        }

        public readonly struct SharedStatic<T> where T : struct
        {
            public static SharedStatic<T> GetOrCreate<T1>(uint par1 = 0)
            {
                return new SharedStatic<T>();
            }

            public static SharedStatic<T> GetOrCreate<TContext, TSubContext>(uint par1 = 0)
            {
                return new SharedStatic<T>();
            }

            public static SharedStatic<T> GetOrCreate(Type par1, uint par2 = 0)
            {
                return new SharedStatic<T>();
            }

            public static SharedStatic<T> GetOrCreate(Type par1, Type par2, uint par3 = 0)
            {
                return new SharedStatic<T>();
            }
        }
    }

    namespace Collections
    {
        public struct NativeArray<T> : IDisposable, IEnumerable<T>, IEnumerable, IEquatable<NativeArray<T>>
            where T : struct
        {
            public void Dispose()
            {
                throw new NotImplementedException();
            }

            public IEnumerator<T> GetEnumerator()
            {
                throw new NotImplementedException();
            }

            IEnumerator IEnumerable.GetEnumerator()
            {
                return GetEnumerator();
            }

            public bool Equals(NativeArray<T> other)
            {
                throw new NotImplementedException();
            }
        }
    }
}

public class SharedStaticCreateTests2 : MonoBehaviour
    {
        private static readonly Type myDoubleType = typeof(double);
        private static readonly Type myIntType = typeof(int);

        [BurstCompile]
        public struct SharedStaticTest1 : IJob
        {
            public void Execute()
            {
                var sharedStatic0 = SharedStatic<int>.GetOrCreate(myDoubleType);
            }
        }

        [BurstCompile]
        public struct SharedStaticTest4 : IJob
        {
            public void Execute()
            {
                var sharedStatic3 = SharedStatic<int>.GetOrCreate(myDoubleType, myIntType);
                F();
            }

            private void F()
            {
                var obj = new object();
            }
        }
    }


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

		    <link rel="stylesheet" type="text/css" href="Styles/branding.css"/>
		    		<title>Security Permission</title>
				<meta name="Description" content="Adds a SecurityPermission to the project. Describes a set of security permissions applied to code." />

								SharePoint Software Factory

								Recipe Index

								SPSF Artefacts

								Security

											Minimal CAS

											Medium CAS

											AspNetHosting Permission

											Dns Permission

											Environment Permission

											Reflection Permission

											FileIO Permission

											Printing Permission

											SqlClient Permission

											WebPart Permission

											Registry Permission

Security Permission

											SharePoint Permission

											SMTP Permission

Related Links

Security Permission

Adds a SecurityPermission to the project. Describes a set of security permissions applied to code.

Recipe Description

                        The recipe adds a line for the permission to the Package.Template.xml (for VS 2010 projects) or to the file CASPolicy.txt (for HIVE projects). Warning: Existing permissions with the same name are replaced completely.

Arguments

                        Name
                        Description

								Typical Permissions

								Assertion
								Optional Boolean. Ability to assert that all this code's callers have the requisite permission for the operation.

								BindingRedirects
								Optional Boolean. Permission to perform explicit binding redirection in the application configuration file. This includes redirection of .NET Framework assemblies that have been unified as well as other assemblies found outside the .NET Framework.

								Execution
								Optional Boolean. Permission for the code to run. Without this permission, managed code will not be executed. This flag has no effect when used dynamically with stack modifiers such as Deny, Assert, and PermitOnly.

								Infrastructure
								Optional Boolean. Permission to plug code into the common language runtime infrastructure, such as adding Remoting Context Sinks, Envoy Sinks and Dynamic Sinks.

								NoFlags
								Optional Boolean. No security access.

								RemotingConfiguration
								Optional Boolean. Permission to configure Remoting types and channels.

								SerializationFormatter
								Optional Boolean. Ability to provide serialization services. Used by serialization formatters.

								Advanced Permissions

								AllFlags
								Optional Boolean. The unrestricted state of the permission.

								ControlPolicy
								Optional Boolean. Ability to view and modify policy. This is a powerful permission that should only be granted to highly trusted code.

								ControlThread
								Optional Boolean. Ability to use certain advanced operations on threads.

								ControlEvidence
								Optional Boolean. Ability to provide evidence, including the ability to alter the evidence provided by the common language runtime. This is a powerful permission that should only be granted to highly trusted code.

								ControlAppDomain
								Optional Boolean. Ability to create and manipulate an AppDomain.

								ControlDomainPolicy
								Optional Boolean. Ability to specify domain policy.

								ControlPrincipal
								Optional Boolean. Ability to manipulate the principal object.

								SkipVerification
								Optional Boolean. Ability to skip verification of code in this assembly. Code that is unverifiable can be run if this permission is granted. This is a powerful permission that should be granted only to highly trusted code. This flag has no effect when used dynamically with stack modifiers such as Deny, Assert, and PermitOnly.

								UnmanagedCode
								Optional Boolean. Ability to call unmanaged code. Since unmanaged code potentially allows other permissions to be bypassed, this is a dangerous permission that should only be granted to highly trusted code. It is used for such applications as calling native code using PInvoke or using COM interop.

								No Permissions

								Unrestricted
								Required Boolean. If Unrestricted is true, all other permission will be ignored.

Authors

Torsten Mandelkow

Version history

1.0 Initial Recipe

						Disclaimer: The views and opinions expressed in this documentation and in SPSF are those of the authors and do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. All trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.

						SharePoint Software Factory, Version 4.1.3.2705, GPLv2, see http://spsf.codeplex.com for more information


text:
typedef struct item item;
typedef struct ordered_list ordered_list;

typedef struct node node;
typedef struct voice_node voice_node;
voice_node* new_voice_node();
typedef struct lang_node lang_node;
lang_node* new_lang_node();
typedef struct text_node text_node;
text_node* new_text_node();
typedef struct time_node time_node;
time_node* new_time_node();

typedef struct token token;
typedef struct string_token string_token;
typedef struct start_token start_token;
typedef struct end_token end_token;
typedef struct timestamp_token timestamp_token;

typedef enum type type;
enum type {
  undefined,
  string,
  start_tag,
  end_tag,
  timestamp_tag,
  eof
};

typedef enum node_type node_type;
enum node_type {
  list_type,
  class_type,
  italic_type,
  bold_type,
  underline_type,
  ruby_type,
  ruby_text_type,
  voice_type,
  language_type,
  text_type,
  timestamp_type
};

typedef enum tag tag;
enum tag {
  unknown_tag,
  c_tag,
  i_tag,
  b_tag,
  u_tag,
  ruby_tag,
  rt_tag,
  v_tag,
  lang_tag
};


text:
package org.apache.spark.ml.tuning

import org.apache.spark.SparkFunSuite
import org.apache.spark.ml.{Estimator, Model, Pipeline}
import org.apache.spark.ml.classification.{LogisticRegression, LogisticRegressionModel, OneVsRest}
import org.apache.spark.ml.classification.LogisticRegressionSuite.generateLogisticInput
import org.apache.spark.ml.evaluation.{BinaryClassificationEvaluator, Evaluator, MulticlassClassificationEvaluator, RegressionEvaluator}
import org.apache.spark.ml.feature.HashingTF
import org.apache.spark.ml.linalg.Vectors
import org.apache.spark.ml.param.ParamMap
import org.apache.spark.ml.param.shared.HasInputCol
import org.apache.spark.ml.regression.LinearRegression
import org.apache.spark.ml.util.{DefaultReadWriteTest, MLTestingUtils}
import org.apache.spark.mllib.util.{LinearDataGenerator, MLlibTestSparkContext}
import org.apache.spark.sql.Dataset
import org.apache.spark.sql.types.StructType

class CrossValidatorSuite
  extends SparkFunSuite with MLlibTestSparkContext with DefaultReadWriteTest {

  import testImplicits._

  @transient var dataset: Dataset[_] = _

  override def beforeAll(): Unit = {
    super.beforeAll()
    dataset = sc.parallelize(generateLogisticInput(1.0, 1.0, 100, 42), 2).toDF()
  }

  test("cross validation with logistic regression") {
    val lr = new LogisticRegression
    val lrParamMaps = new ParamGridBuilder()
      .addGrid(lr.regParam, Array(0.001, 1000.0))
      .addGrid(lr.maxIter, Array(0, 10))
      .build()
    val eval = new BinaryClassificationEvaluator
    val cv = new CrossValidator()
      .setEstimator(lr)
      .setEstimatorParamMaps(lrParamMaps)
      .setEvaluator(eval)
      .setNumFolds(3)
    val cvModel = cv.fit(dataset)

    MLTestingUtils.checkCopyAndUids(cv, cvModel)

    val parent = cvModel.bestModel.parent.asInstanceOf[LogisticRegression]
    assert(parent.getRegParam === 0.001)
    assert(parent.getMaxIter === 10)
    assert(cvModel.avgMetrics.length === lrParamMaps.length)
  }

  test("cross validation with linear regression") {
    val dataset = sc.parallelize(
      LinearDataGenerator.generateLinearInput(
        6.3, Array(4.7, 7.2), Array(0.9, -1.3), Array(0.7, 1.2), 100, 42, 0.1), 2)
      .map(_.asML).toDF()

    val trainer = new LinearRegression().setSolver("l-bfgs")
    val lrParamMaps = new ParamGridBuilder()
      .addGrid(trainer.regParam, Array(1000.0, 0.001))
      .addGrid(trainer.maxIter, Array(0, 10))
      .build()
    val eval = new RegressionEvaluator()
    val cv = new CrossValidator()
      .setEstimator(trainer)
      .setEstimatorParamMaps(lrParamMaps)
      .setEvaluator(eval)
      .setNumFolds(3)
    val cvModel = cv.fit(dataset)
    val parent = cvModel.bestModel.parent.asInstanceOf[LinearRegression]
    assert(parent.getRegParam === 0.001)
    assert(parent.getMaxIter === 10)
    assert(cvModel.avgMetrics.length === lrParamMaps.length)

    eval.setMetricName("r2")
    val cvModel2 = cv.fit(dataset)
    val parent2 = cvModel2.bestModel.parent.asInstanceOf[LinearRegression]
    assert(parent2.getRegParam === 0.001)
    assert(parent2.getMaxIter === 10)
    assert(cvModel2.avgMetrics.length === lrParamMaps.length)
  }

  test("transformSchema should check estimatorParamMaps") {
    import CrossValidatorSuite.{MyEstimator, MyEvaluator}

    val est = new MyEstimator("est")
    val eval = new MyEvaluator
    val paramMaps = new ParamGridBuilder()
      .addGrid(est.inputCol, Array("input1", "input2"))
      .build()

    val cv = new CrossValidator()
      .setEstimator(est)
      .setEstimatorParamMaps(paramMaps)
      .setEvaluator(eval)

    cv.transformSchema(new StructType()) // This should pass.

    val invalidParamMaps = paramMaps :+ ParamMap(est.inputCol -> "")
    cv.setEstimatorParamMaps(invalidParamMaps)
    intercept[IllegalArgumentException] {
      cv.transformSchema(new StructType())
    }
  }

  test("cross validation with parallel evaluation") {
    val lr = new LogisticRegression
    val lrParamMaps = new ParamGridBuilder()
      .addGrid(lr.regParam, Array(0.001, 1000.0))
      .addGrid(lr.maxIter, Array(0, 3))
      .build()
    val eval = new BinaryClassificationEvaluator
    val cv = new CrossValidator()
      .setEstimator(lr)
      .setEstimatorParamMaps(lrParamMaps)
      .setEvaluator(eval)
      .setNumFolds(2)
      .setParallelism(1)
    val cvSerialModel = cv.fit(dataset)
    cv.setParallelism(2)
    val cvParallelModel = cv.fit(dataset)

    val serialMetrics = cvSerialModel.avgMetrics.sorted
    val parallelMetrics = cvParallelModel.avgMetrics.sorted
    assert(serialMetrics === parallelMetrics)

    val parentSerial = cvSerialModel.bestModel.parent.asInstanceOf[LogisticRegression]
    val parentParallel = cvParallelModel.bestModel.parent.asInstanceOf[LogisticRegression]
    assert(parentSerial.getRegParam === parentParallel.getRegParam)
    assert(parentSerial.getMaxIter === parentParallel.getMaxIter)
  }

  test("read/write: CrossValidator with simple estimator") {
    val lr = new LogisticRegression().setMaxIter(3)
    val evaluator = new BinaryClassificationEvaluator()
      .setMetricName("areaUnderPR")  // not default metric
    val paramMaps = new ParamGridBuilder()
        .addGrid(lr.regParam, Array(0.1, 0.2))
        .build()
    val cv = new CrossValidator()
      .setEstimator(lr)
      .setEvaluator(evaluator)
      .setNumFolds(20)
      .setEstimatorParamMaps(paramMaps)
      .setSeed(42L)
      .setParallelism(2)

    val cv2 = testDefaultReadWrite(cv, testParams = false)

    assert(cv.uid === cv2.uid)
    assert(cv.getNumFolds === cv2.getNumFolds)
    assert(cv.getSeed === cv2.getSeed)
    assert(cv.getParallelism === cv2.getParallelism)

    assert(cv2.getEvaluator.isInstanceOf[BinaryClassificationEvaluator])
    val evaluator2 = cv2.getEvaluator.asInstanceOf[BinaryClassificationEvaluator]
    assert(evaluator.uid === evaluator2.uid)
    assert(evaluator.getMetricName === evaluator2.getMetricName)

    cv2.getEstimator match {
      case lr2: LogisticRegression =>
        assert(lr.uid === lr2.uid)
        assert(lr.getMaxIter === lr2.getMaxIter)
      case other =>
        throw new AssertionError(s"Loaded CrossValidator expected estimator of type" +
          s" LogisticRegression but found ${other.getClass.getName}")
    }

    ValidatorParamsSuiteHelpers
      .compareParamMaps(cv.getEstimatorParamMaps, cv2.getEstimatorParamMaps)
  }

  test("read/write: CrossValidator with nested estimator") {
    val ova = new OneVsRest().setClassifier(new LogisticRegression)
    val evaluator = new MulticlassClassificationEvaluator()
      .setMetricName("accuracy")
    val classifier1 = new LogisticRegression().setRegParam(2.0)
    val classifier2 = new LogisticRegression().setRegParam(3.0)
    // params that are not JSON serializable must inherit from Params
    val paramMaps = new ParamGridBuilder()
      .addGrid(ova.classifier, Array(classifier1, classifier2))
      .build()
    val cv = new CrossValidator()
      .setEstimator(ova)
      .setEvaluator(evaluator)
      .setNumFolds(20)
      .setEstimatorParamMaps(paramMaps)

    val cv2 = testDefaultReadWrite(cv, testParams = false)

    assert(cv.uid === cv2.uid)
    assert(cv.getNumFolds === cv2.getNumFolds)
    assert(cv.getSeed === cv2.getSeed)

    assert(cv2.getEvaluator.isInstanceOf[MulticlassClassificationEvaluator])
    val evaluator2 = cv2.getEvaluator.asInstanceOf[MulticlassClassificationEvaluator]
    assert(evaluator.uid === evaluator2.uid)
    assert(evaluator.getMetricName === evaluator2.getMetricName)

    cv2.getEstimator match {
      case ova2: OneVsRest =>
        assert(ova.uid === ova2.uid)
        ova2.getClassifier match {
          case lr: LogisticRegression =>
            assert(ova.getClassifier.asInstanceOf[LogisticRegression].getMaxIter
              === lr.getMaxIter)
          case other =>
            throw new AssertionError(s"Loaded CrossValidator expected estimator of type" +
              s" LogisticRegression but found ${other.getClass.getName}")
        }

      case other =>
        throw new AssertionError(s"Loaded CrossValidator expected estimator of type" +
          s" OneVsRest but found ${other.getClass.getName}")
    }

    ValidatorParamsSuiteHelpers
      .compareParamMaps(cv.getEstimatorParamMaps, cv2.getEstimatorParamMaps)
  }

  test("read/write: Persistence of nested estimator works if parent directory changes") {
    val ova = new OneVsRest().setClassifier(new LogisticRegression)
    val evaluator = new MulticlassClassificationEvaluator()
      .setMetricName("accuracy")
    val classifier1 = new LogisticRegression().setRegParam(2.0)
    val classifier2 = new LogisticRegression().setRegParam(3.0)
    // params that are not JSON serializable must inherit from Params
    val paramMaps = new ParamGridBuilder()
      .addGrid(ova.classifier, Array(classifier1, classifier2))
      .build()
    val cv = new CrossValidator()
      .setEstimator(ova)
      .setEvaluator(evaluator)
      .setNumFolds(20)
      .setEstimatorParamMaps(paramMaps)

    ValidatorParamsSuiteHelpers.testFileMove(cv, tempDir)
  }

  test("read/write: CrossValidator with complex estimator") {
    // workflow: CrossValidator[Pipeline[HashingTF, CrossValidator[LogisticRegression]]]
    val lrEvaluator = new BinaryClassificationEvaluator()
      .setMetricName("areaUnderPR")  // not default metric

    val lr = new LogisticRegression().setMaxIter(3)
    val lrParamMaps = new ParamGridBuilder()
      .addGrid(lr.regParam, Array(0.1, 0.2))
      .build()
    val lrcv = new CrossValidator()
      .setEstimator(lr)
      .setEvaluator(lrEvaluator)
      .setEstimatorParamMaps(lrParamMaps)

    val hashingTF = new HashingTF()
    val pipeline = new Pipeline().setStages(Array(hashingTF, lrcv))
    val paramMaps = new ParamGridBuilder()
      .addGrid(hashingTF.numFeatures, Array(10, 20))
      .addGrid(lr.elasticNetParam, Array(0.0, 1.0))
      .build()
    val evaluator = new BinaryClassificationEvaluator()

    val cv = new CrossValidator()
      .setEstimator(pipeline)
      .setEvaluator(evaluator)
      .setNumFolds(20)
      .setEstimatorParamMaps(paramMaps)

    val cv2 = testDefaultReadWrite(cv, testParams = false)

    assert(cv.uid === cv2.uid)
    assert(cv.getNumFolds === cv2.getNumFolds)
    assert(cv.getSeed === cv2.getSeed)

    assert(cv2.getEvaluator.isInstanceOf[BinaryClassificationEvaluator])
    assert(cv.getEvaluator.uid === cv2.getEvaluator.uid)

    ValidatorParamsSuiteHelpers
      .compareParamMaps(cv.getEstimatorParamMaps, cv2.getEstimatorParamMaps)

    cv2.getEstimator match {
      case pipeline2: Pipeline =>
        assert(pipeline.uid === pipeline2.uid)
        pipeline2.getStages match {
          case Array(hashingTF2: HashingTF, lrcv2: CrossValidator) =>
            assert(hashingTF.uid === hashingTF2.uid)
            lrcv2.getEstimator match {
              case lr2: LogisticRegression =>
                assert(lr.uid === lr2.uid)
                assert(lr.getMaxIter === lr2.getMaxIter)
              case other =>
                throw new AssertionError(s"Loaded internal CrossValidator expected to be" +
                  s" LogisticRegression but found type ${other.getClass.getName}")
            }
            assert(lrcv.uid === lrcv2.uid)
            assert(lrcv2.getEvaluator.isInstanceOf[BinaryClassificationEvaluator])
            assert(lrEvaluator.uid === lrcv2.getEvaluator.uid)
            ValidatorParamsSuiteHelpers
              .compareParamMaps(lrParamMaps, lrcv2.getEstimatorParamMaps)
          case other =>
            throw new AssertionError("Loaded Pipeline expected stages (HashingTF, CrossValidator)" +
              " but found: " + other.map(_.getClass.getName).mkString(", "))
        }
      case other =>
        throw new AssertionError(s"Loaded CrossValidator expected estimator of type" +
          s" CrossValidator but found ${other.getClass.getName}")
    }
  }

  test("read/write: CrossValidator fails for extraneous Param") {
    val lr = new LogisticRegression()
    val lr2 = new LogisticRegression()
    val evaluator = new BinaryClassificationEvaluator()
    val paramMaps = new ParamGridBuilder()
      .addGrid(lr.regParam, Array(0.1, 0.2))
      .addGrid(lr2.regParam, Array(0.1, 0.2))
      .build()
    val cv = new CrossValidator()
      .setEstimator(lr)
      .setEvaluator(evaluator)
      .setEstimatorParamMaps(paramMaps)
    withClue("CrossValidator.write failed to catch extraneous Param error") {
      intercept[IllegalArgumentException] {
        cv.write
      }
    }
  }

  test("read/write: CrossValidatorModel") {
    val lr = new LogisticRegression()
      .setThreshold(0.6)
    val lrModel = new LogisticRegressionModel(lr.uid, Vectors.dense(1.0, 2.0), 1.2)
      .setThreshold(0.6)
    val evaluator = new BinaryClassificationEvaluator()
      .setMetricName("areaUnderPR")  // not default metric
    val paramMaps = new ParamGridBuilder()
        .addGrid(lr.regParam, Array(0.1, 0.2))
        .build()
    val cv = new CrossValidatorModel("cvUid", lrModel, Array(0.3, 0.6))
    cv.set(cv.estimator, lr)
      .set(cv.evaluator, evaluator)
      .set(cv.numFolds, 20)
      .set(cv.estimatorParamMaps, paramMaps)

    val cv2 = testDefaultReadWrite(cv, testParams = false)

    assert(cv.uid === cv2.uid)
    assert(cv.getNumFolds === cv2.getNumFolds)
    assert(cv.getSeed === cv2.getSeed)

    assert(cv2.getEvaluator.isInstanceOf[BinaryClassificationEvaluator])
    val evaluator2 = cv2.getEvaluator.asInstanceOf[BinaryClassificationEvaluator]
    assert(evaluator.uid === evaluator2.uid)
    assert(evaluator.getMetricName === evaluator2.getMetricName)

    cv2.getEstimator match {
      case lr2: LogisticRegression =>
        assert(lr.uid === lr2.uid)
        assert(lr.getThreshold === lr2.getThreshold)
      case other =>
        throw new AssertionError(s"Loaded CrossValidator expected estimator of type" +
          s" LogisticRegression but found ${other.getClass.getName}")
    }

   ValidatorParamsSuiteHelpers
     .compareParamMaps(cv.getEstimatorParamMaps, cv2.getEstimatorParamMaps)

    cv2.bestModel match {
      case lrModel2: LogisticRegressionModel =>
        assert(lrModel.uid === lrModel2.uid)
        assert(lrModel.getThreshold === lrModel2.getThreshold)
        assert(lrModel.coefficients === lrModel2.coefficients)
        assert(lrModel.intercept === lrModel2.intercept)
      case other =>
        throw new AssertionError(s"Loaded CrossValidator expected bestModel of type" +
          s" LogisticRegressionModel but found ${other.getClass.getName}")
    }
    assert(cv.avgMetrics === cv2.avgMetrics)
  }
}

object CrossValidatorSuite extends SparkFunSuite {

  abstract class MyModel extends Model[MyModel]

  class MyEstimator(override val uid: String) extends Estimator[MyModel] with HasInputCol {

    override def fit(dataset: Dataset[_]): MyModel = {
      throw new UnsupportedOperationException
    }

    override def transformSchema(schema: StructType): StructType = {
      require($(inputCol).nonEmpty)
      schema
    }

    override def copy(extra: ParamMap): MyEstimator = defaultCopy(extra)
  }

  class MyEvaluator extends Evaluator {

    override def evaluate(dataset: Dataset[_]): Double = {
      throw new UnsupportedOperationException
    }

    override def isLargerBetter: Boolean = true

    override val uid: String = "eval"

    override def copy(extra: ParamMap): MyEvaluator = defaultCopy(extra)
  }
}


text:
 .. Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

 ..   http://www.apache.org/licenses/LICENSE-2.0

 .. Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

Changelog
---------

2.0.1
.....

Bug Fixes
~~~~~~~~~

* ``Fixed to check number key from jenkins response (#16963)``

.. Below changes are excluded from the changelog. Move them to
   appropriate section above if needed. Do not delete the lines(!):
   * ``Removes pylint from our toolchain (#16682)``
   * ``Prepare documentation for July release of providers. (#17015)``
   * ``Fixed wrongly escaped characters in amazon's changelog (#17020)``
   * ``Updating Jenkins example DAGs to use XComArgs (#16874)``

2.0.0
.....

Breaking changes
~~~~~~~~~~~~~~~~

* ``Auto-apply apply_default decorator (#15667)``

.. warning:: Due to apply_default decorator removal, this version of the provider requires Airflow 2.1.0+.
   If your Airflow version is < 2.1.0, and you want to install this provider version, first upgrade
   Airflow to at least version 2.1.0. Otherwise your Airflow package version will be upgraded
   automatically and you will have to manually run ``airflow upgrade db`` to complete the migration.

.. Below changes are excluded from the changelog. Move them to
   appropriate section above if needed. Do not delete the lines(!):
   * ``Fix string concatenation using 'f-strings' (#15200)``
   * ``Adds interactivity when generating provider documentation. (#15518)``
   * ``Prepares provider release after PIP 21 compatibility (#15576)``
   * ``Remove Backport Providers (#14886)``
   * ``Updated documentation for June 2021 provider release (#16294)``
   * ``More documentation update for June providers release (#16405)``
   * ``Synchronizes updated changelog after buggfix release (#16464)``

1.1.0
.....

Features
~~~~~~~~

* ``Add allowed_jenkins_states to JenkinsJobTriggerOperator (#14131)``

1.0.1
.....

Updated documentation and readme files.

1.0.0
.....

Initial version of the provider.


text:
namespace System.Diagnostics
{
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public partial struct CounterSample
    {
        public static System.Diagnostics.CounterSample Empty;
        public CounterSample(long rawValue, long baseValue, long counterFrequency, long systemFrequency, long timeStamp, long timeStamp100nSec, System.Diagnostics.PerformanceCounterType counterType) { throw new System.NotImplementedException(); }
        public CounterSample(long rawValue, long baseValue, long counterFrequency, long systemFrequency, long timeStamp, long timeStamp100nSec, System.Diagnostics.PerformanceCounterType counterType, long counterTimeStamp) { throw new System.NotImplementedException(); }
        public long BaseValue { get { return default(long); } }
        public long CounterFrequency { get { return default(long); } }
        public long CounterTimeStamp { get { return default(long); } }
        public System.Diagnostics.PerformanceCounterType CounterType { get { return default(System.Diagnostics.PerformanceCounterType); } }
        public long RawValue { get { return default(long); } }
        public long SystemFrequency { get { return default(long); } }
        public long TimeStamp { get { return default(long); } }
        public long TimeStamp100nSec { get { return default(long); } }
        public static float Calculate(System.Diagnostics.CounterSample counterSample) { return default(float); }
        public static float Calculate(System.Diagnostics.CounterSample counterSample, System.Diagnostics.CounterSample nextCounterSample) { return default(float); }
        public bool Equals(System.Diagnostics.CounterSample sample) { return default(bool); }
        public override bool Equals(object o) { return default(bool); }
        public override int GetHashCode() { return default(int); }
        public static bool operator ==(System.Diagnostics.CounterSample a, System.Diagnostics.CounterSample b) { return default(bool); }
        public static bool operator !=(System.Diagnostics.CounterSample a, System.Diagnostics.CounterSample b) { return default(bool); }
    }
    public sealed partial class PerformanceCounter
    {
        [System.ObsoleteAttribute("This field has been deprecated and is not used.  Use machine.config or an application configuration file to set the size of the PerformanceCounter file mapping.")]
        public static int DefaultFileMappingSize;
        public PerformanceCounter() { }
        public PerformanceCounter(string categoryName, string counterName) { }
        public PerformanceCounter(string categoryName, string counterName, bool readOnly) { }
        public PerformanceCounter(string categoryName, string counterName, string instanceName) { }
        public PerformanceCounter(string categoryName, string counterName, string instanceName, bool readOnly) { }
        public PerformanceCounter(string categoryName, string counterName, string instanceName, string machineName) { }
        [System.ComponentModel.DefaultValueAttribute("")]
        public string CategoryName { get { return default(string); } set { } }
        public string CounterHelp { get { return default(string); } }
        [System.ComponentModel.DefaultValueAttribute("")]
        public string CounterName { get { return default(string); } set { } }
        public System.Diagnostics.PerformanceCounterType CounterType { get { return default(System.Diagnostics.PerformanceCounterType); } }
        [System.ComponentModel.DefaultValueAttribute((System.Diagnostics.PerformanceCounterInstanceLifetime)(0))]
        public System.Diagnostics.PerformanceCounterInstanceLifetime InstanceLifetime { get { return default(System.Diagnostics.PerformanceCounterInstanceLifetime); } set { } }
        [System.ComponentModel.DefaultValueAttribute("")]
        public string InstanceName { get { return default(string); } set { } }
        [System.ComponentModel.DefaultValueAttribute(".")]
        public string MachineName { get { return default(string); } set { } }
        public long RawValue { get { return default(long); } set { } }
        [System.ComponentModel.DefaultValueAttribute(true)]
        public bool ReadOnly { get { return default(bool); } set { } }
        public void BeginInit() { }
        public void Close() { }
        public void EndInit() { }
        public long Increment() { return default(long); }
        public long IncrementBy(long value) { return default(long); }
        public System.Diagnostics.CounterSample NextSample() { return default(System.Diagnostics.CounterSample); }
        public float NextValue() { return default(float); }
        public void RemoveInstance() { }
    }
    public enum PerformanceCounterInstanceLifetime
    {
        Global = 0,
        Process = 1,
    }
    public enum PerformanceCounterType
    {
        AverageBase = 1073939458,
        AverageCount64 = 1073874176,
        AverageTimer32 = 805438464,
        CounterDelta32 = 4195328,
        CounterDelta64 = 4195584,
        CounterMultiBase = 1107494144,
        CounterMultiTimer = 574686464,
        CounterMultiTimer100Ns = 575735040,
        CounterMultiTimer100NsInverse = 592512256,
        CounterMultiTimerInverse = 591463680,
        CounterTimer = 541132032,
        CounterTimerInverse = 557909248,
        CountPerTimeInterval32 = 4523008,
        CountPerTimeInterval64 = 4523264,
        ElapsedTime = 807666944,
        NumberOfItems32 = 65536,
        NumberOfItems64 = 65792,
        NumberOfItemsHEX32 = 0,
        NumberOfItemsHEX64 = 256,
        RateOfCountsPerSecond32 = 272696320,
        RateOfCountsPerSecond64 = 272696576,
        RawBase = 1073939459,
        RawFraction = 537003008,
        SampleBase = 1073939457,
        SampleCounter = 4260864,
        SampleFraction = 549585920,
        Timer100Ns = 542180608,
        Timer100NsInverse = 558957824,
    }
}


text:
import {expect} from "chai";
import Functions from "wasabi-common/lib/types/Functions";

/* tslint:disable no-unused-expression */
describe("types/Functions", () => {
    it("is", () => {
        expect(Functions.is(() => {
            /* */
        })).to.be.true;
        expect(Functions.is("")).to.be.false;
        expect(Functions.is("Danina")).to.be.false;
        expect(Functions.is(true)).to.be.false;
        expect(Functions.is(false)).to.be.false;
        expect(Functions.is(0)).to.be.false;
        expect(Functions.is(6)).to.be.false;
        expect(Functions.is(-10)).to.be.false;
        expect(Functions.is(new Date())).to.be.false;
        expect(Functions.is([])).to.be.false;
        expect(Functions.is({})).to.be.false;
    });

    it("getName", () => {
        expect(Functions.getName(Functions)).to.be.eq("Functions");
    });
});


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

public class ObjectRot : MonoBehaviour {

	// Use this for initialization
	void Start () {
        Renderer rend = GetComponent<Renderer>();
        //Material tmpMat = rend.material;
       // rend.material = new Material(tmpMat);
        rend.material.SetFloat("_objectrotation", transform.rotation.eulerAngles.z/180*Mathf.PI);

    }

	// Update is called once per frame
	void Update () {

	}
}


text:
trait FooBase {
  type Bar >: Null <: BarBase { type This <: FooBase.this.Bar }
  type This >: this.type <: FooBase { type This <: FooBase.this.This }

  def derived(bar: Bar): This = ???
}

trait BarBase {
  type This >: Null <: BarBase { type This <: BarBase.this.This }
}

object Test {
  def bad(foo: FooBase): FooBase = foo match {
    case foo: FooBase =>
      foo.derived(???)  // Triggers infinite loop in TypeAssigner.avoid()
  }
}


text:
"""Support for Motion Blinds using their WLAN API."""

import logging

from motionblinds import BlindType
import voluptuous as vol

from homeassistant.components.cover import (
    ATTR_POSITION,
    ATTR_TILT_POSITION,
    DEVICE_CLASS_AWNING,
    DEVICE_CLASS_BLIND,
    DEVICE_CLASS_CURTAIN,
    DEVICE_CLASS_GATE,
    DEVICE_CLASS_SHADE,
    DEVICE_CLASS_SHUTTER,
    CoverEntity,
)
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.update_coordinator import CoordinatorEntity

from .const import (
    ATTR_ABSOLUTE_POSITION,
    ATTR_WIDTH,
    DOMAIN,
    KEY_COORDINATOR,
    KEY_GATEWAY,
    MANUFACTURER,
    SERVICE_SET_ABSOLUTE_POSITION,
)

_LOGGER = logging.getLogger(__name__)

POSITION_DEVICE_MAP = {
    BlindType.RollerBlind: DEVICE_CLASS_SHADE,
    BlindType.RomanBlind: DEVICE_CLASS_SHADE,
    BlindType.HoneycombBlind: DEVICE_CLASS_SHADE,
    BlindType.DimmingBlind: DEVICE_CLASS_SHADE,
    BlindType.DayNightBlind: DEVICE_CLASS_SHADE,
    BlindType.RollerShutter: DEVICE_CLASS_SHUTTER,
    BlindType.Switch: DEVICE_CLASS_SHUTTER,
    BlindType.RollerGate: DEVICE_CLASS_GATE,
    BlindType.Awning: DEVICE_CLASS_AWNING,
    BlindType.Curtain: DEVICE_CLASS_CURTAIN,
    BlindType.CurtainLeft: DEVICE_CLASS_CURTAIN,
    BlindType.CurtainRight: DEVICE_CLASS_CURTAIN,
}

TILT_DEVICE_MAP = {
    BlindType.VenetianBlind: DEVICE_CLASS_BLIND,
    BlindType.ShangriLaBlind: DEVICE_CLASS_BLIND,
    BlindType.DoubleRoller: DEVICE_CLASS_SHADE,
}

TDBU_DEVICE_MAP = {
    BlindType.TopDownBottomUp: DEVICE_CLASS_SHADE,
}

SET_ABSOLUTE_POSITION_SCHEMA = {
    vol.Required(ATTR_ABSOLUTE_POSITION): vol.All(cv.positive_int, vol.Range(max=100)),
    vol.Optional(ATTR_WIDTH): vol.All(cv.positive_int, vol.Range(max=100)),
}

async def async_setup_entry(hass, config_entry, async_add_entities):
    """Set up the Motion Blind from a config entry."""
    entities = []
    motion_gateway = hass.data[DOMAIN][config_entry.entry_id][KEY_GATEWAY]
    coordinator = hass.data[DOMAIN][config_entry.entry_id][KEY_COORDINATOR]

    for blind in motion_gateway.device_list.values():
        if blind.type in POSITION_DEVICE_MAP:
            entities.append(
                MotionPositionDevice(
                    coordinator, blind, POSITION_DEVICE_MAP[blind.type], config_entry
                )
            )

        elif blind.type in TILT_DEVICE_MAP:
            entities.append(
                MotionTiltDevice(
                    coordinator, blind, TILT_DEVICE_MAP[blind.type], config_entry
                )
            )

        elif blind.type in TDBU_DEVICE_MAP:
            entities.append(
                MotionTDBUDevice(
                    coordinator, blind, TDBU_DEVICE_MAP[blind.type], config_entry, "Top"
                )
            )
            entities.append(
                MotionTDBUDevice(
                    coordinator,
                    blind,
                    TDBU_DEVICE_MAP[blind.type],
                    config_entry,
                    "Bottom",
                )
            )
            entities.append(
                MotionTDBUDevice(
                    coordinator,
                    blind,
                    TDBU_DEVICE_MAP[blind.type],
                    config_entry,
                    "Combined",
                )
            )

        else:
            _LOGGER.warning("Blind type '%s' not yet supported", blind.blind_type)

    async_add_entities(entities)

    platform = entity_platform.current_platform.get()
    platform.async_register_entity_service(
        SERVICE_SET_ABSOLUTE_POSITION,
        SET_ABSOLUTE_POSITION_SCHEMA,
        SERVICE_SET_ABSOLUTE_POSITION,
    )

class MotionPositionDevice(CoordinatorEntity, CoverEntity):
    """Representation of a Motion Blind Device."""

    def __init__(self, coordinator, blind, device_class, config_entry):
        """Initialize the blind."""
        super().__init__(coordinator)

        self._blind = blind
        self._device_class = device_class
        self._config_entry = config_entry

    @property
    def unique_id(self):
        """Return the unique id of the blind."""
        return self._blind.mac

    @property
    def device_info(self):
        """Return the device info of the blind."""
        device_info = {
            "identifiers": {(DOMAIN, self._blind.mac)},
            "manufacturer": MANUFACTURER,
            "name": f"{self._blind.blind_type}-{self._blind.mac[12:]}",
            "model": self._blind.blind_type,
            "via_device": (DOMAIN, self._config_entry.unique_id),
        }

        return device_info

    @property
    def name(self):
        """Return the name of the blind."""
        return f"{self._blind.blind_type}-{self._blind.mac[12:]}"

    @property
    def available(self):
        """Return True if entity is available."""
        return self._blind.available

    @property
    def current_cover_position(self):
        """
        Return current position of cover.

        None is unknown, 0 is open, 100 is closed.
        """
        if self._blind.position is None:
            return None
        return 100 - self._blind.position

    @property
    def device_class(self):
        """Return the device class."""
        return self._device_class

    @property
    def is_closed(self):
        """Return if the cover is closed or not."""
        return self._blind.position == 100

    async def async_added_to_hass(self):
        """Subscribe to multicast pushes and register signal handler."""
        self._blind.Register_callback(self.unique_id, self.schedule_update_ha_state)
        await super().async_added_to_hass()

    async def async_will_remove_from_hass(self):
        """Unsubscribe when removed."""
        self._blind.Remove_callback(self.unique_id)
        await super().async_will_remove_from_hass()

    def open_cover(self, **kwargs):
        """Open the cover."""
        self._blind.Open()

    def close_cover(self, **kwargs):
        """Close cover."""
        self._blind.Close()

    def set_cover_position(self, **kwargs):
        """Move the cover to a specific position."""
        position = kwargs[ATTR_POSITION]
        self._blind.Set_position(100 - position)

    def set_absolute_position(self, **kwargs):
        """Move the cover to a specific absolute position (see TDBU)."""
        position = kwargs[ATTR_ABSOLUTE_POSITION]
        self._blind.Set_position(100 - position)

    def stop_cover(self, **kwargs):
        """Stop the cover."""
        self._blind.Stop()

class MotionTiltDevice(MotionPositionDevice):
    """Representation of a Motion Blind Device."""

    @property
    def current_cover_tilt_position(self):
        """
        Return current angle of cover.

        None is unknown, 0 is closed/minimum tilt, 100 is fully open/maximum tilt.
        """
        if self._blind.angle is None:
            return None
        return self._blind.angle * 100 / 180

    def open_cover_tilt(self, **kwargs):
        """Open the cover tilt."""
        self._blind.Set_angle(180)

    def close_cover_tilt(self, **kwargs):
        """Close the cover tilt."""
        self._blind.Set_angle(0)

    def set_cover_tilt_position(self, **kwargs):
        """Move the cover tilt to a specific position."""
        angle = kwargs[ATTR_TILT_POSITION] * 180 / 100
        self._blind.Set_angle(angle)

    def stop_cover_tilt(self, **kwargs):
        """Stop the cover."""
        self._blind.Stop()

class MotionTDBUDevice(MotionPositionDevice):
    """Representation of a Motion Top Down Bottom Up blind Device."""

    def __init__(self, coordinator, blind, device_class, config_entry, motor):
        """Initialize the blind."""
        super().__init__(coordinator, blind, device_class, config_entry)
        self._motor = motor
        self._motor_key = motor[0]

        if self._motor not in ["Bottom", "Top", "Combined"]:
            _LOGGER.error("Unknown motor '%s'", self._motor)

    @property
    def unique_id(self):
        """Return the unique id of the blind."""
        return f"{self._blind.mac}-{self._motor}"

    @property
    def name(self):
        """Return the name of the blind."""
        return f"{self._blind.blind_type}-{self._motor}-{self._blind.mac[12:]}"

    @property
    def current_cover_position(self):
        """
        Return current position of cover.

        None is unknown, 0 is open, 100 is closed.
        """
        if self._blind.scaled_position is None:
            return None

        return 100 - self._blind.scaled_position[self._motor_key]

    @property
    def is_closed(self):
        """Return if the cover is closed or not."""
        if self._blind.position is None:
            return None

        if self._motor == "Combined":
            return self._blind.width == 100

        return self._blind.position[self._motor_key] == 100

    @property
    def device_state_attributes(self):
        """Return device specific state attributes."""
        attributes = {}
        if self._blind.position is not None:
            attributes[ATTR_ABSOLUTE_POSITION] = (
                100 - self._blind.position[self._motor_key]
            )
        if self._blind.width is not None:
            attributes[ATTR_WIDTH] = self._blind.width
        return attributes

    def open_cover(self, **kwargs):
        """Open the cover."""
        self._blind.Open(motor=self._motor_key)

    def close_cover(self, **kwargs):
        """Close cover."""
        self._blind.Close(motor=self._motor_key)

    def set_cover_position(self, **kwargs):
        """Move the cover to a specific scaled position."""
        position = kwargs[ATTR_POSITION]
        self._blind.Set_scaled_position(100 - position, motor=self._motor_key)

    def set_absolute_position(self, **kwargs):
        """Move the cover to a specific absolute position."""
        position = kwargs[ATTR_ABSOLUTE_POSITION]
        target_width = kwargs.get(ATTR_WIDTH, None)

        self._blind.Set_position(
            100 - position, motor=self._motor_key, width=target_width
        )

    def stop_cover(self, **kwargs):
        """Stop the cover."""
        self._blind.Stop(motor=self._motor_key)


text:
package upgrade

import (
	"os"
	"testing"

	"knative.dev/operator/pkg/apis/operator/base"
	"knative.dev/operator/pkg/apis/operator/v1beta1"
	"knative.dev/operator/pkg/reconciler/common"
	util "knative.dev/operator/pkg/reconciler/common/testing"
	"knative.dev/operator/pkg/reconciler/knativeserving/ingress"
	"knative.dev/operator/test"
	"knative.dev/operator/test/client"
	"knative.dev/operator/test/resources"
	pkgupgrade "knative.dev/pkg/test/upgrade"
)

// OperatorPostDowngradeTests verifies the KnativeServing and KnativeEventing creation, after downgraded to the previous version.
func OperatorPostDowngradeTests() []pkgupgrade.Operation {
	return []pkgupgrade.Operation{
		ServingCRPostDowngradeTests(),
		EventingCRPostDowngradeTests(),
	}
}

// ServingCRPostDowngradeTests verifies the KnativeServing creation, after downgraded to the previous version.
func ServingCRPostDowngradeTests() pkgupgrade.Operation {
	return pkgupgrade.NewOperation("ServingCRPostDowngradeTests", func(c pkgupgrade.Context) {
		servingCRPostDowngrade(c.T)
	})
}

// EventingCRPostDowngradeTests verifies the KnativeEventing creation, after downgraded to the previous version.
func EventingCRPostDowngradeTests() pkgupgrade.Operation {
	return pkgupgrade.NewOperation("EventingCRPostDowngradeTests", func(c pkgupgrade.Context) {
		eventingCRPostDowngrade(c.T)
	})
}

func eventingCRPostDowngrade(t *testing.T) {
	clients := client.Setup(t)

	names := test.ResourceNames{
		KnativeEventing: test.OperatorName,
		Namespace:       test.EventingOperatorNamespace,
	}

	// Create a KnativeEventing
	if _, err := resources.EnsureKnativeEventingExists(clients.KnativeEventing(), names); err != nil {
		t.Fatalf("KnativeService %q failed to create: %v", names.KnativeEventing, err)
	}

	// Verify if resources match the requirement for the previous release after downgrade
	t.Run("verify resources", func(t *testing.T) {
		resources.AssertKEOperatorCRReadyStatus(t, clients, names)
		resources.SetKodataDir()
		defer os.Unsetenv(common.KoEnvKey)

		_, err := common.TargetManifest(&v1beta1.KnativeEventing{})
		if err != nil {
			t.Fatalf("Failed to get the manifest for Knative: %v", err)
		}

		instance := &v1beta1.KnativeEventing{
			Spec: v1beta1.KnativeEventingSpec{
				CommonSpec: base.CommonSpec{
					Version: test.OperatorFlags.PreviousEventingVersion,
				},
			},
		}

		// Based on the previous release version, get the deployment resources.
		preManifest, err := common.TargetManifest(instance)
		if err != nil {
			t.Fatalf("Failed to get KnativeEventing manifest: %v", err)
		}
		expectedDeployments := resources.GetExpectedDeployments(preManifest)
		util.AssertEqual(t, len(expectedDeployments) > 0, true)
		resources.AssertKnativeDeploymentStatus(t, clients, names.Namespace, common.TargetVersion(instance), "",
			expectedDeployments)
	})
}

func servingCRPostDowngrade(t *testing.T) {
	clients := client.Setup(t)

	names := test.ResourceNames{
		KnativeServing: test.OperatorName,
		Namespace:      test.ServingOperatorNamespace,
	}

	// Create a KnativeServing
	if _, err := resources.EnsureKnativeServingExists(clients.KnativeServing(), names); err != nil {
		t.Fatalf("KnativeService %q failed to create: %v", names.KnativeServing, err)
	}

	// Verify if resources match the requirement for the previous release after downgrade
	t.Run("verify resources", func(t *testing.T) {
		resources.AssertKSOperatorCRReadyStatus(t, clients, names)
		resources.SetKodataDir()
		defer os.Unsetenv(common.KoEnvKey)

		_, err := common.TargetManifest(&v1beta1.KnativeServing{})
		if err != nil {
			t.Fatalf("Failed to get the manifest for Knative: %v", err)
		}

		instance := &v1beta1.KnativeServing{
			Spec: v1beta1.KnativeServingSpec{
				CommonSpec: base.CommonSpec{
					Version: test.OperatorFlags.PreviousServingVersion,
				},
			},
		}

		// Based on the previous release version, get the deployment resources.
		preManifest, err := common.TargetManifest(instance)
		if err != nil {
			t.Fatalf("Failed to get KnativeServing manifest: %v", err)
		}
		expectedDeployments := resources.GetExpectedDeployments(preManifest.Filter(ingress.Filters(instance)))
		util.AssertEqual(t, len(expectedDeployments) > 0, true)
		resources.AssertKnativeDeploymentStatus(t, clients, names.Namespace, common.TargetVersion(instance), "",
			expectedDeployments)
	})
}


text:
<?xml version="1.0" encoding="utf-8"?>
<package>
  <name>bsplines_python</name>
  <version>0.0.1</version>
  <description>bsplines_python</description>
  <maintainer email="paulfurgale@mavt.ethz.ch">Paul Furgale</maintainer>
  <author>Paul Furgale</author>
  <license>New BSD</license>
  <buildtool_depend>catkin</buildtool_depend>
  <buildtool_depend>catkin_simple</buildtool_depend>

  <build_depend>bsplines</build_depend>
  <build_depend>numpy_eigen</build_depend>
  <build_depend>python_module</build_depend>
  <build_depend>eigen_catkin</build_depend>
  <build_depend>sparse_block_matrix</build_depend>
  <build_depend>sm_common</build_depend>
  <build_depend>suitesparse</build_depend>
  <build_depend>sm_kinematics</build_depend>
</package>


text:
place: "Saerbeck"
title: "senseBox-Workshop – Sensorstation für Umweltmesswerte"
link: "https://www.klimakommune-saerbeck.de/city_info/webaccessibility/index.cfm?item_id=872300&waid=317"
starting-date: 2018-09-09
ending-date: 2018-09-09
---


text:
    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">

    </button>

thisweek

lastweek

thismonth

lastmonth

Other timeframe


text:
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;

namespace PhotoShopBackUpC
{
    public class FileOperater
    {
        Object lockCopyObject = new Object();
        private UInt64 tick = 0;
        private UInt64 count = 0;

        void AddCopyTime(UInt64 addTick)
        {
            lock (lockCopyObject)
            {
                tick += addTick;
                count++;
            }
        }

        public UInt64 GetTick()
        {
            return tick;
        }

        public UInt64 GetCount()
        {
            return count;
        }

        public void Copy(string src, string des)
        {
            Thread thread = null;
            //为了不让界面死掉,要将该操作放在一个线程中
            thread = new Thread
            (() => {

                Stopwatch sp = new Stopwatch();
                sp.Start();
                FileStream fsRead = new FileStream(src, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
                FileStream fsWrite = new FileStream(des, FileMode.OpenOrCreate);

                byte[] buffer = new byte[2 * 1024 * 1024];
                int readLength = fsRead.Read(buffer, 0, buffer.Length);
                long readCount = 0;
                while (readLength != 0)
                {
                    fsWrite.Write(buffer, 0, readLength);
                    readCount += readLength;
                    readLength = fsRead.Read(buffer, 0, buffer.Length);
                }
                fsRead.Close();
                fsWrite.Close();
                buffer = null;
                GC.Collect();
                sp.Stop();
                AddCopyTime((UInt64)sp.ElapsedTicks);
            }
            );
            thread.Start();
        }
    }
}


text:
<!doctype html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>BookBuilder | Coinbase Pro Trading Toolkit API Reference</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">

						Search
						<input id="tsd-search-field" type="text" />

Preparing search index...

The search index is not available

					Coinbase Pro Trading Toolkit API Reference

						Options

								All

Public

Public/Protected

All

							<input type="checkbox" id="tsd-filter-inherited" checked />
							Inherited
							<input type="checkbox" id="tsd-filter-externals" checked />
							Externals
							<input type="checkbox" id="tsd-filter-only-exported" />
							Only exported

					Menu

					Globals

					"lib/BookBuilder"

					BookBuilder

Class BookBuilder

BookBuilder is a convenience class for maintaining an in-memory Level 3 order book. Each
						side of the book is represented internally by a binary tree and a global order hash map

The individual orders can be tracked globally via the orderPool set, or per level. The orderpool and the aggregated
					levels point to the same order objects, and not copies.

Call #state to get a hierarchical object representation of the orderbook

Hierarchy

						EventEmitter

								BookBuilder

Implements

Orderbook

Index

Constructors

constructor

Properties

_asks<wbr>Total

_asks<wbr>Value<wbr>Total

_bids<wbr>Total

_bids<wbr>Value<wbr>Total

_order<wbr>Pool

asks

bids

logger

sequence

default<wbr>Max<wbr>Listeners

Accessors

asks<wbr>Total

asks<wbr>Value<wbr>Total

bids<wbr>Total

bids<wbr>Value<wbr>Total

highest<wbr>Bid

lowest<wbr>Ask

num<wbr>Asks

num<wbr>Bids

order<wbr>Pool

Methods

add

add<wbr>Level

add<wbr>Listener

add<wbr>ToTotal

clear

emit

event<wbr>Names

from<wbr>State

get<wbr>Level

get<wbr>Max<wbr>Listeners

get<wbr>Order

get<wbr>Tree

has<wbr>Order

listener<wbr>Count

listeners

modify

on

once

orders<wbr>For<wbr>Value

prepend<wbr>Listener

prepend<wbr>Once<wbr>Listener

remove

remove<wbr>All<wbr>Listeners

remove<wbr>From<wbr>Pool

remove<wbr>Level

remove<wbr>Listener

set<wbr>Level

set<wbr>Max<wbr>Listeners

state

state<wbr>Copy

subtract<wbr>From<wbr>Total

listener<wbr>Count

Constructors

constructor

new <wbr>Book<wbr>Builder(logger: Logger): BookBuilder

Defined in lib/BookBuilder.ts:161

Parameters

logger: Logger

Returns BookBuilder

Properties

Protected _asks<wbr>Total

_asks<wbr>Total: BigJS

Defined in lib/BookBuilder.ts:158

Protected _asks<wbr>Value<wbr>Total

_asks<wbr>Value<wbr>Total: BigJS

Defined in lib/BookBuilder.ts:159

Protected _bids<wbr>Total

_bids<wbr>Total: BigJS

Defined in lib/BookBuilder.ts:156

Protected _bids<wbr>Value<wbr>Total

_bids<wbr>Value<wbr>Total: BigJS

Defined in lib/BookBuilder.ts:157

Private _order<wbr>Pool

_order<wbr>Pool: OrderPool

Defined in lib/BookBuilder.ts:160

Protected asks

asks: RBTree<AggregatedLevelWithOrders> = PriceTreeFactory<AggregatedLevelWithOrders>()

Defined in lib/BookBuilder.ts:155

Protected bids

bids: RBTree<AggregatedLevelWithOrders> = PriceTreeFactory<AggregatedLevelWithOrders>()

Defined in lib/BookBuilder.ts:154

Private logger

logger: Logger

Defined in lib/BookBuilder.ts:161

sequence

sequence: number

Implementation of Orderbook.sequence

Defined in lib/BookBuilder.ts:153

Static default<wbr>Max<wbr>Listeners

default<wbr>Max<wbr>Listeners: number

Inherited from EventEmitter.defaultMaxListeners

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:707

Accessors

asks<wbr>Total

get asksTotal(): BigJS

Defined in lib/BookBuilder.ts:188

Returns BigJS

asks<wbr>Value<wbr>Total

get asksValueTotal(): BigJS

Defined in lib/BookBuilder.ts:192

Returns BigJS

bids<wbr>Total

get bidsTotal(): BigJS

Defined in lib/BookBuilder.ts:180

Returns BigJS

bids<wbr>Value<wbr>Total

get bidsValueTotal(): BigJS

Defined in lib/BookBuilder.ts:184

Returns BigJS

highest<wbr>Bid

get highestBid(): AggregatedLevelWithOrders

Defined in lib/BookBuilder.ts:212

Returns AggregatedLevelWithOrders

lowest<wbr>Ask

get lowestAsk(): AggregatedLevelWithOrders

Defined in lib/BookBuilder.ts:216

Returns AggregatedLevelWithOrders

num<wbr>Asks

get numAsks(): number

Defined in lib/BookBuilder.ts:196

Returns number

num<wbr>Bids

get numBids(): number

Defined in lib/BookBuilder.ts:200

Returns number

order<wbr>Pool

get orderPool(): OrderPool

set orderPool(value: OrderPool): void

Defined in lib/BookBuilder.ts:204

Returns OrderPool

Defined in lib/BookBuilder.ts:208

Parameters

value: OrderPool

Returns void

Methods

add

add(order: Level3Order): boolean

Defined in lib/BookBuilder.ts:237

Add an order's information to the book

Parameters

order: Level3Order

Returns boolean

add<wbr>Level

add<wbr>Level(side: Side, level: AggregatedLevelWithOrders): void

Defined in lib/BookBuilder.ts:280

Parameters

side: Side

level: AggregatedLevelWithOrders

Returns void

add<wbr>Listener

add<wbr>Listener(event: string | symbol, listener: Function): this

Inherited from EventEmitter.addListener

Overrides EventEmitter.addListener

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:709

Parameters

event: string | symbol

listener: Function

Returns this

Private add<wbr>ToTotal

add<wbr>ToTotal(amount: BigJS, side: Side, price: BigJS): void

Defined in lib/BookBuilder.ts:478

Parameters

amount: BigJS

side: Side

price: BigJS

Returns void

clear

clear(): void

Defined in lib/BookBuilder.ts:169

Returns void

emit

emit(event: string | symbol, ...args: any[]): boolean

Inherited from EventEmitter.emit

Overrides EventEmitter.emit

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:719

Parameters

event: string | symbol

Rest ...args: any[]

Returns boolean

event<wbr>Names

event<wbr>Names(): (string | symbol)[]

Inherited from EventEmitter.eventNames

Overrides EventEmitter.eventNames

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:720

Returns (string | symbol)[]

from<wbr>State

from<wbr>State(state: OrderbookState): void

Defined in lib/BookBuilder.ts:389

Parameters

state: OrderbookState

Returns void

get<wbr>Level

get<wbr>Level(side: Side, price: BigJS): AggregatedLevelWithOrders

Defined in lib/BookBuilder.ts:228

Parameters

side: Side

price: BigJS

Returns AggregatedLevelWithOrders

get<wbr>Max<wbr>Listeners

get<wbr>Max<wbr>Listeners(): number

Inherited from EventEmitter.getMaxListeners

Overrides EventEmitter.getMaxListeners

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:717

Returns number

get<wbr>Order

get<wbr>Order(id: string): Level3Order

Defined in lib/BookBuilder.ts:220

Parameters

id: string

Returns Level3Order

get<wbr>Tree

get<wbr>Tree(side: Side): RBTree<AggregatedLevelWithOrders>

Defined in lib/BookBuilder.ts:356

Parameters

side: Side

Returns RBTree<AggregatedLevelWithOrders>

has<wbr>Order

has<wbr>Order(orderId: string): boolean

Defined in lib/BookBuilder.ts:224

Parameters

orderId: string

Returns boolean

listener<wbr>Count

listener<wbr>Count(type: string | symbol): number

Inherited from EventEmitter.listenerCount

Overrides EventEmitter.listenerCount

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:721

Parameters

type: string | symbol

Returns number

listeners

listeners(event: string | symbol): Function[]

Inherited from EventEmitter.listeners

Overrides EventEmitter.listeners

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:718

Parameters

event: string | symbol

Returns Function[]

modify

modify(id: string, newSize: BigJS, newSide?: Side): boolean

Defined in lib/BookBuilder.ts:265

Changes the size of an existing order to newSize. If the order doesn't exist, returns false.
										If newSize is negative, an error is thrown.
										Even if newSize is zero, the order is kept.
									It is possible for an order to switch sides, in which case the newSide parameter determines the new side.

Parameters

id: string

newSize: BigJS

Optional newSide: Side

Returns boolean

on

on(event: string | symbol, listener: Function): this

Inherited from EventEmitter.on

Overrides EventEmitter.on

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:710

Parameters

event: string | symbol

listener: Function

Returns this

once

once(event: string | symbol, listener: Function): this

Inherited from EventEmitter.once

Overrides EventEmitter.once

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:711

Parameters

event: string | symbol

listener: Function

Returns this

orders<wbr>For<wbr>Value

orders<wbr>For<wbr>Value(side: Side, value: BigJS, useQuote: boolean, start?: StartPoint): CumulativePriceLevel[]

Defined in lib/BookBuilder.ts:409

Return an array of (aggregated) orders whose sum is equal to or greater than value.
										The side parameter is from the perspective of the purchaser, so 'buy' returns asks and 'sell' bids.
										If useQuote is true, value is assumed to represent price * size, otherwise just size is used
									startPrice sets the first price to start counting from (inclusive). The default is undefined, which starts at the best bid/by

Parameters

side: Side

value: BigJS

useQuote: boolean

Optional start: StartPoint

Returns CumulativePriceLevel[]

prepend<wbr>Listener

prepend<wbr>Listener(event: string | symbol, listener: Function): this

Inherited from EventEmitter.prependListener

Overrides EventEmitter.prependListener

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:712

Parameters

event: string | symbol

listener: Function

Returns this

prepend<wbr>Once<wbr>Listener

prepend<wbr>Once<wbr>Listener(event: string | symbol, listener: Function): this

Inherited from EventEmitter.prependOnceListener

Overrides EventEmitter.prependOnceListener

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:713

Parameters

event: string | symbol

listener: Function

Returns this

remove

remove(orderId: string): Level3Order

Defined in lib/BookBuilder.ts:325

Remove the order from the orderbook If numOrders drops to zero, remove the level

Parameters

orderId: string

Returns Level3Order

remove<wbr>All<wbr>Listeners

remove<wbr>All<wbr>Listeners(event?: string | symbol): this

Inherited from EventEmitter.removeAllListeners

Overrides EventEmitter.removeAllListeners

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:715

Parameters

Optional event: string | symbol

Returns this

Protected remove<wbr>From<wbr>Pool

remove<wbr>From<wbr>Pool(orderId: string): boolean

Defined in lib/BookBuilder.ts:462

Parameters

orderId: string

Returns boolean

remove<wbr>Level

remove<wbr>Level(side: Side, priceLevel: PriceComparable): boolean

Defined in lib/BookBuilder.ts:297

Remove a complete level and links to orders in the order pool. If the price level doesn't exist, it returns
									false

Parameters

side: Side

priceLevel: PriceComparable

Returns boolean

remove<wbr>Listener

remove<wbr>Listener(event: string | symbol, listener: Function): this

Inherited from EventEmitter.removeListener

Overrides EventEmitter.removeListener

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:714

Parameters

event: string | symbol

listener: Function

Returns this

set<wbr>Level

set<wbr>Level(side: Side, level: AggregatedLevelWithOrders): boolean

Defined in lib/BookBuilder.ts:314

Shortcut method for replacing a level. First removeLevel is called, and then addLevel

Parameters

side: Side

level: AggregatedLevelWithOrders

Returns boolean

set<wbr>Max<wbr>Listeners

set<wbr>Max<wbr>Listeners(n: number): this

Inherited from EventEmitter.setMaxListeners

Overrides EventEmitter.setMaxListeners

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:716

Parameters

n: number

Returns this

state

state(): OrderbookState

Implementation of Orderbook.state

Defined in lib/BookBuilder.ts:365

Returns a book object that has all the bids and asks at this current moment. For performance reasons, this method
										returns a shallow copy of the underlying orders, so modifying the state object may break the orderbook generally.
									For deep copies, call #stateCopy instead

Returns OrderbookState

state<wbr>Copy

state<wbr>Copy(): OrderbookState

Defined in lib/BookBuilder.ts:384

Returns a deep copy of the orderbook state.

Returns OrderbookState

Private subtract<wbr>From<wbr>Total

subtract<wbr>From<wbr>Total(amount: BigJS, side: Side, price: BigJS): void

Defined in lib/BookBuilder.ts:468

Parameters

amount: BigJS

side: Side

price: BigJS

Returns void

Static listener<wbr>Count

listener<wbr>Count(emitter: EventEmitter, event: string | symbol): number

Inherited from EventEmitter.listenerCount

Defined in /Users/felixbohm/src/coinbase-pro-trading-toolkit/node_modules/@types/node/index.d.ts:706

Parameters

emitter: EventEmitter

event: string | symbol

Returns number

						Globals

						"lib/<wbr>Book<wbr>Builder"

						Aggregated<wbr>Level

						Aggregated<wbr>Level<wbr>With<wbr>Orders

						Book<wbr>Builder

								constructor

								_asks<wbr>Total

								_asks<wbr>Value<wbr>Total

								_bids<wbr>Total

								_bids<wbr>Value<wbr>Total

								_order<wbr>Pool

								asks

								bids

								logger

								sequence

								default<wbr>Max<wbr>Listeners

								asks<wbr>Total

								asks<wbr>Value<wbr>Total

								bids<wbr>Total

								bids<wbr>Value<wbr>Total

								highest<wbr>Bid

								lowest<wbr>Ask

								num<wbr>Asks

								num<wbr>Bids

								order<wbr>Pool

								add

								add<wbr>Level

								add<wbr>Listener

								add<wbr>ToTotal

								clear

								emit

								event<wbr>Names

								from<wbr>State

								get<wbr>Level

								get<wbr>Max<wbr>Listeners

								get<wbr>Order

								get<wbr>Tree

								has<wbr>Order

								listener<wbr>Count

								listeners

								modify

								on

								once

								orders<wbr>For<wbr>Value

								prepend<wbr>Listener

								prepend<wbr>Once<wbr>Listener

								remove

								remove<wbr>All<wbr>Listeners

								remove<wbr>From<wbr>Pool

								remove<wbr>Level

								remove<wbr>Listener

								set<wbr>Level

								set<wbr>Max<wbr>Listeners

								state

								state<wbr>Copy

								subtract<wbr>From<wbr>Total

								listener<wbr>Count

						Order<wbr>Pool

						Start<wbr>Point

						Aggregated<wbr>Level<wbr>Factory

						Aggregated<wbr>Level<wbr>From<wbr>Price<wbr>Level

Legend

Module

Object literal

Variable

Function

Function with type parameter

Index signature

Type alias

Enumeration

Enumeration member

Property

Method

Interface

Interface with type parameter

Constructor

Property

Method

Index signature

Class

Class with type parameter

Constructor

Property

Method

Accessor

Index signature

Inherited constructor

Inherited property

Inherited method

Inherited accessor

Protected property

Protected method

Protected accessor

Private property

Private method

Private accessor

Static property

Static method

Generated using TypeDoc


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
org.jsoup.parser
</TITLE>

<META NAME="date" CONTENT="2014-06-02">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package org.jsoup.parser

Contains the HTML parser, tag specifications, and HTML tokeniser.

See:

          Description

Class Summary

ParseError
A Parse Error records an error in the input HTML that occurs in either the tokenisation or the tree building phase.

Parser
Parses HTML into a Document.

Tag
HTML Tag capabilities.

TokenQueue
A character queue with parsing helpers.

XmlTreeBuilder

Package org.jsoup.parser Description

Contains the HTML parser, tag specifications, and HTML tokeniser.

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes


text:
layout: post
title: Trades and Quotes, Visualized
unlisted: true
---

# Tasks
> * Visualize trades and quotes (TAQ) data.
>
> * Include a comparison of continuous limit order book (CLOB) and frequent batch auctions (FBA).

# Demo

    <form>
  FBA Interval: <select name = "fbaInterval" onFocus="this.select()"  onchange="switchInterval(this.value)">
    <option value = "120">120 seconds</option>
    <option value = "360">360 seconds</option>
    <option value = "1">1 second</option>
</select>
    </form>

  <FORM METHOD="POST" id="control_form">

Frame:
      <INPUT TYPE="text" id="frame_nr" VALUE="9" SIZE="2" onFocus="this.select()" onChange="go2image(this.value)"></INPUT>

  </FORM>

The above illustration shows GOOG TAQ data on the NASDAQ OMX BX exchange over two hours' time.

The bid and ask are represented by two horizontal bars whose lengths are defined by quote size.

The left graph represents the data feed in its original CLOB form. The trades are represented by yellow stars whose sizes are defined by trade volume. (Translucency and horizontal noise are added so that accumulation is observable.)

The right graph represents a simulated FBA feed. Analogous to the CLOB representation, the exchange BBO is denoted by the two bars. When an auction results in trading, the trades' aggregate is represented by a star at the clearing price, whose size is defined by aggregate volume.

# Data
The TAQ data covered the following time frame and symbols:

      Timeframe	 Symbol	 Exchange

      09-July-2014
      GOOG
      NASDAQ OMX BX

# To Do
* Given TAQ data, simulate the FBA better. Currently, it's just randomly choosing when the auction results in a trade or not, and otherwise mirroring CLOB. Differentiate between snipe trades and investor trades.
* Consider accounting for multiple exchanges.


text:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:layout_marginBottom="@dimen/activity_vertical_margin"
    android:layout_marginLeft="@dimen/activity_horizontal_margin"
    android:layout_marginRight="@dimen/activity_horizontal_margin"
    android:layout_marginTop="@dimen/activity_vertical_margin"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    app:refreshType="material"
    tools:context="gachon.mobile.programming.android.finalproject.activities.RegisterActivity"
    tools:showIn="@layout/activity_register">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            style="@style/defaultTextLayout">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:text="@string/username"/>

            <gachon.mobile.programming.android.finalproject.utils.ClearEditText
                android:id="@+id/username"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/register_username"
                android:inputType="text"
                android:maxLength="20" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/username_text_limit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:text=" / 20"
                android:textColor="@color/black"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/username_text_edited"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@id/username_text_limit"
                android:text="0"
                android:textColor="@color/black"
                android:textSize="16sp" />
        </RelativeLayout>

        <LinearLayout
            style="@style/defaultTextLayout"
            android:layout_marginTop="@dimen/default_margin_top">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:text="@string/email"/>

            <gachon.mobile.programming.android.finalproject.utils.ClearEditText
                android:id="@+id/email"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/register_email"
                android:imeActionId="@+id/register"
                android:imeActionLabel="@string/email"
                android:imeOptions="actionUnspecified"
                android:inputType="textEmailAddress"
                android:maxLength="30" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/email_text_limit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:text=" / 30"
                android:textColor="@color/black"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/email_text_edited"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@id/email_text_limit"
                android:text="0"
                android:textColor="@color/black"
                android:textSize="16sp" />
        </RelativeLayout>

        <LinearLayout
            style="@style/defaultTextLayout"
            android:layout_marginTop="@dimen/default_margin_top">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:text="@string/password"/>

            <gachon.mobile.programming.android.finalproject.utils.PasswordEditText
                android:id="@+id/password"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/register_password"
                android:imeActionId="@+id/register"
                android:imeActionLabel="@string/password"
                android:imeOptions="actionUnspecified"
                android:inputType="textPassword"
                android:maxLength="60" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/password_text_limit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:text=" / 60"
                android:textColor="@color/black"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/password_text_edited"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@id/password_text_limit"
                android:text="0"
                android:textColor="@color/black"
                android:textSize="16sp" />
        </RelativeLayout>

        <LinearLayout
            style="@style/defaultTextLayout"
            android:layout_marginTop="@dimen/default_margin_top">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:text="@string/password_confirm"/>

            <gachon.mobile.programming.android.finalproject.utils.PasswordEditText
                android:id="@+id/password_confirm"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/register_password_confirm"
                android:imeActionId="@+id/register"
                android:imeActionLabel="@string/password_confirm"
                android:imeOptions="actionUnspecified"
                android:inputType="textPassword"
                android:maxLength="60" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/password_confirm_text_limit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:text=" / 60"
                android:textColor="@color/black"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/password_confirm_text_edited"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@id/password_confirm_text_limit"
                android:text="0"
                android:textColor="@color/black"
                android:textSize="16sp" />
        </RelativeLayout>

        <LinearLayout
            style="@style/defaultTextLayout"
            android:layout_marginTop="@dimen/default_margin_top">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:text="@string/phone"/>

            <gachon.mobile.programming.android.finalproject.utils.ClearEditText
                android:id="@+id/phone"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/register_phone"
                android:inputType="phone"
                android:maxLength="11" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/phone_text_limit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:text=" / 11"
                android:textColor="@color/black"
                android:textSize="16sp" />

            <TextView
                android:id="@+id/phone_text_edited"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@id/phone_text_limit"
                android:text="0"
                android:textColor="@color/black"
                android:textSize="16sp" />
        </RelativeLayout>

        <Button
            android:id="@+id/register_sign_up_button"
            style="@style/defaultButton"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/default_margin_top"
            android:text="@string/action_sign_up" />
    </LinearLayout>
</ScrollView>


text:
package com.emeraldcube.ais.samples;

import com.emeraldcube.ais.objects.p01012.P01012_W01012B_FormParent;
import com.emeraldcube.ais.objects.p01012.P01012_W01012B_GridRow;
import com.emeraldcube.ais.sso.Login;
import com.emeraldcube.ais.tools.Logger;
import com.oracle.e1.aisclient.AISClientUtilities;
import com.oracle.e1.aisclient.FSREvent;
import com.oracle.e1.aisclient.FormRequest;
import com.oracle.e1.aisclient.JDERestServiceException;
import com.oracle.e1.aisclient.JDERestServiceProvider;
import com.oracle.e1.aisclient.LoginEnvironment;
import java.io.IOException;

/**
 * @author mtamassia Created on May 8, 2015 6:30:32 PM
 */
public class AddressBook {

    public static void main(String[] args) {
        // Perform call
        P01012_W01012B_FormParent aBook = getAddressBookForm("JDE");

        Logger.l("Processing data retrieved");
        Logger.l(" Application Title: " + aBook.getFs_P01012_W01012B().getTitle());
        Logger.l(" Retrieving " + aBook.getFs_P01012_W01012B().getData().getGridData().getRowset().size() + " grid rows");
        for (P01012_W01012B_GridRow gr : aBook.getFs_P01012_W01012B().getData().getGridData().getRowset()) {
            Logger.l("   Row: " + gr.getRowIndex() + ", Address Book:" + gr.getMnAddressNumber_19().getValue() + ", Name:" + gr.getSAlphaName_20().getValue());
        }
    }

    public static P01012_W01012B_FormParent getAddressBookForm(String e1User) {
        LoginEnvironment lEnv = Login.getLoginAIS(e1User);

        P01012_W01012B_FormParent addressBook = null;

        try {
            // Perform Logout
            Logger.l("Opening Address Book application with user " + e1User);

            FormRequest formRequest = new FormRequest(lEnv);
            formRequest.setFormName("P01012_W01012B");
            formRequest.setFormServiceAction("R");
            formRequest.setMaxPageSize("5"); //only get 5 records
            formRequest.setReturnControlIDs("54|1[19,20]");

            FSREvent fsrEvent = new FSREvent();
            fsrEvent.setFieldValue("54", "E"); //customers
            fsrEvent.setQBEValue("1[19]", ">=" + "4800"); // Address Book Record to filter
            fsrEvent.checkBoxChecked("62"); //show address
            fsrEvent.checkBoxChecked("63"); //show phone
            fsrEvent.doControlAction("15"); //find

            formRequest.addFSREvent(fsrEvent); //add the events to the request
            String response = JDERestServiceProvider.jdeRestServiceCall(lEnv, formRequest, JDERestServiceProvider.POST_METHOD, JDERestServiceProvider.FORM_SERVICE_URI);

            //de-serialize the JSON string into the form parent object
            addressBook = lEnv.getObjectMapper().readValue(response, P01012_W01012B_FormParent.class);
        } catch (JDERestServiceException e) {
            Logger.l(JDERestServiceProvider.handleServiceException(e));
        } catch (IOException e) {
            Logger.l(e);
        }

        // Perform Logout
        Logger.l("Logging out user " + e1User);
        AISClientUtilities.logout(lEnv);

        return addressBook;
    }

}


text:
package model

// A Service contains information about a service corresponding to a catalog entry.
type Service struct {
	Name           string   `json:"name"`
	ID             string   `json:"id"`
	Description    string   `json:"description"`
	Bindable       bool     `json:"bindable"`
	PlanUpdateable bool     `json:"plan_updateable, omitempty"`
	Tags           []string `json:"tags, omitempty"`
	Requires       []string `json:"requires, omitempty"`

	Metadata        interface{}   `json:"metadata, omitempty"`
	Plans           []ServicePlan `json:"plans"`
	DashboardClient interface{}   `json:"dashboard_client"`
}


text:
#ifndef PEARL_REPLAY_H
#define PEARL_REPLAY_H

#include "LocalTrace.h"

/*-------------------------------------------------------------------------*/
/**
 * @file    pearl_replay.h
 * @ingroup PEARL_replay
 * @brief   Declarations of replay-related library functions.
 *
 * This header file provides declarations of all replay-related library
 * functions provided by PEARL.
 */
/*-------------------------------------------------------------------------*/

namespace pearl
{

//--- Forward declarations --------------------------------------------------

class CallbackData;
class CallbackManager;

//--- Function prototypes ---------------------------------------------------

/// @name Replay functionality
/// @{

extern void PEARL_forward_replay (const LocalTrace&           trace,
                                  const CallbackManager&      cbmanager,
                                  CallbackData*               data,
                                  const LocalTrace::iterator& begin,
                                  const LocalTrace::iterator& end);
inline void PEARL_forward_replay (const LocalTrace&           trace,
                                  const CallbackManager&      cbmanager,
                                  CallbackData*               data);

extern void PEARL_backward_replay(const LocalTrace&                   trace,
                                  const CallbackManager&              cbmanager,
                                  CallbackData*                       data,
                                  const LocalTrace::reverse_iterator& rbegin,
                                  const LocalTrace::reverse_iterator& rend);
inline void PEARL_backward_replay(const LocalTrace&                   trace,
                                  const CallbackManager&              cbmanager,
                                  CallbackData*                       data);

/// @}

//--- Inline functions ------------------------------------------------------

inline void PEARL_forward_replay (const LocalTrace&      trace,
                                  const CallbackManager& cbmanager,
                                  CallbackData*          data)
{
  PEARL_forward_replay(trace, cbmanager, data, trace.begin(), trace.end());
}

inline void PEARL_backward_replay(const LocalTrace&      trace,
                                  const CallbackManager& cbmanager,
                                  CallbackData*          data)
{
  PEARL_backward_replay(trace, cbmanager, data, trace.rbegin(), trace.rend());
}

}   /* namespace pearl */

#endif   /* !PEARL_REPLAY_H */


text:
go-statemachine
===============

About
-----

This package provides an implementation of a finite state machine in Go (http://golang.org/), inspired by David Mertz's article "Charming Python: Using state machines" (http://www.ibm.com/developerworks/library/l-python-state/index.html).

Usage
-----

Install the package in your environment:

```
$ go get github.com/dpapathanasiou/go-statemachine
```

Make sure the GOPATH environment variable is defined correctly and test it:

```
$ go test github.com/dpapathanasiou/go-statemachine
ok  	github.com/dpapathanasiou/go-statemachine	0.014s
```

To use it within your own code, import "github.com/dpapathanasiou/go-statemachine" and instantiate the state machine with an empty map of handler functions, along with the string name of the initial state handler function.

Example
-------

See the statemachine_test.go file included in this package.


text:
class UsersController < ApplicationController

  def index
  end

  def show
    current_user
  end

  def new
    @user = User.new
  end

  def edit
  end

  def create
    @user = User.new(user_params)
    if @user.save
      flash.notice = "User was successfully created."
      redirect_to root_path
    else
      flash.notice = "Try again."
      render :new
    end
  end

  def update
    if current_user.update(user_params)
      flash.notice = 'User was successfully updated.'
      redirect_to user_path(@user)
    else
      flash.notice = "Try again."
      render :edit
    end
  end

  # def destroy
  #   @user.destroy
  #   flash.notice = 'User was successfully destroyed.'
  #   redirect_to root_path
  # end

private

  def user_params
    params.require(:user).permit(:email, :password)
  end

end


text:
.avia_wpml_language_switch {
position: relative;
padding: 0px 0 0 10px;
height: 30px;
line-height: 36px;
margin: 0 0 0 0;
z-index: 151;
-webkit-backface-visibility: hidden;
top:-2px;
right:0;

}

.sub_menu ul{float:left;}

#top ul.avia_wpml_language_switch  li{
float:left;
margin: 0px 0px 0px 5px;
padding:0;
border:none;
}

.avia_wpml_language_switch li:hover{
opacity: 0.8;
}

.avia_wpml_language_switch li span{
display:none;
}

.avia_wpml_language_switch li .language_flag{
display:block;
}

.avia_wpml_language_switch li .language_flag img{
display:inline-block;
border:1px solid rgba(255,255,255,0.2);
}

#icl_lang_sel_widget{
overflow:visible;
z-index:20;
}

.html_header_sidebar #top .avia_wpml_language_switch{border-bottom-style:solid; border-bottom-width:1px; padding:0px 10px;}


text:
/*****************************************************************
 M3CSVValueTransformer.h
 M3Foundation

 Created by Martin Pilkington on 02/08/2009.

 Please read the LICENCE.txt for licensing information
*****************************************************************/

/***************************
 Converts a list of comma separated variables into an array and back
 @since M3Foundation 1.0 and later
***************************/
@interface M3CSVValueTransformer : NSValueTransformer

@end


text:
package com.puppycrawl.tools.checkstyle;

import java.awt.*;
import java.awt.event.*;
import java.io.*;

/**
 *
 * blah blah
 * @see foo
 */
public class InputRegexpHeader2
{
}


text:
TranslateDownloadManager* TranslateDownloadManager::GetInstance() {
  return Singleton<TranslateDownloadManager>::get();
}

TranslateDownloadManager::TranslateDownloadManager()
    : language_list_(new TranslateLanguageList),
      script_(new TranslateScript) {}

TranslateDownloadManager::~TranslateDownloadManager() {}

void TranslateDownloadManager::Shutdown() {
  language_list_.reset();
  script_.reset();
  request_context_ = NULL;
}

// static
void TranslateDownloadManager::RequestLanguageList() {
  TranslateLanguageList* language_list = GetInstance()->language_list();
  if (!language_list) {
    NOTREACHED();
    return;
  }

  language_list->RequestLanguageList();
}

// static
void TranslateDownloadManager::RequestLanguageList(PrefService* prefs) {
  // We don't want to do this when translate is disabled.
  DCHECK(prefs != NULL);
  if (CommandLine::ForCurrentProcess()->HasSwitch(
          translate::switches::kDisableTranslate) ||
      !prefs->GetBoolean(prefs::kEnableTranslate)) {
    return;
  }

  RequestLanguageList();
}

// static
void TranslateDownloadManager::GetSupportedLanguages(
    std::vector<std::string>* languages) {
  TranslateLanguageList* language_list = GetInstance()->language_list();
  if (!language_list) {
    NOTREACHED();
    return;
  }

  language_list->GetSupportedLanguages(languages);
}

// static
base::Time TranslateDownloadManager::GetSupportedLanguagesLastUpdated() {
  TranslateLanguageList* language_list = GetInstance()->language_list();
  if (!language_list) {
    NOTREACHED();
    return base::Time();
  }

  return language_list->last_updated();
}

// static
std::string TranslateDownloadManager::GetLanguageCode(
    const std::string& language) {
  TranslateLanguageList* language_list = GetInstance()->language_list();
  if (!language_list) {
    NOTREACHED();
    return language;
  }

  return language_list->GetLanguageCode(language);
}

// static
bool TranslateDownloadManager::IsSupportedLanguage(
    const std::string& language) {
  TranslateLanguageList* language_list = GetInstance()->language_list();
  if (!language_list) {
    NOTREACHED();
    return false;
  }

  return language_list->IsSupportedLanguage(language);
}

// static
bool TranslateDownloadManager::IsAlphaLanguage(const std::string& language) {
  TranslateLanguageList* language_list = GetInstance()->language_list();
  if (!language_list) {
    NOTREACHED();
    return false;
  }

  return language_list->IsAlphaLanguage(language);
}

void TranslateDownloadManager::ClearTranslateScriptForTesting() {
  if (script_.get() == NULL) {
    NOTREACHED();
    return;
  }
  script_->Clear();
}

void TranslateDownloadManager::ResetForTesting() {
  language_list_.reset(new TranslateLanguageList);
  script_.reset(new TranslateScript);
}

void TranslateDownloadManager::SetTranslateScriptExpirationDelay(int delay_ms) {
  if (script_.get() == NULL) {
    NOTREACHED();
    return;
  }
  script_->set_expiration_delay(delay_ms);
}


text:
package net.tokensmith.otter.dispatch.entity.either;

import net.tokensmith.otter.controller.entity.request.RestRequest;
import net.tokensmith.otter.controller.entity.response.RestResponse;
import net.tokensmith.otter.dispatch.entity.RestBtwnRequest;
import net.tokensmith.otter.dispatch.entity.RestBtwnResponse;

public class RestResponseError<S, U, P> {
    private RestBtwnRequest<S, U> btwnRequest;
    private RestBtwnResponse btwnResponse;
    private RestRequest<U, P> requestForResource;
    private RestResponse<P> responseForResource;
    private RestResponse<P> resourceResponse;
    private RestResponse<P> response;
    private Throwable cause;
    private ErrorType errorType;

    public RestResponseError(RestBtwnRequest<S, U> btwnRequest, RestBtwnResponse btwnResponse, RestRequest<U, P> requestForResource, RestResponse<P> responseForResource, RestResponse<P> resourceResponse, RestResponse<P> response, Throwable cause, ErrorType errorType) {
        this.btwnRequest = btwnRequest;
        this.btwnResponse = btwnResponse;
        this.requestForResource = requestForResource;
        this.responseForResource = responseForResource;
        this.resourceResponse = resourceResponse;
        this.response = response;
        this.cause = cause;
        this.errorType = errorType;
    }

    public RestBtwnRequest<S, U> getBtwnRequest() {
        return btwnRequest;
    }

    public void setBtwnRequest(RestBtwnRequest<S, U> btwnRequest) {
        this.btwnRequest = btwnRequest;
    }

    public RestBtwnResponse getBtwnResponse() {
        return btwnResponse;
    }

    public void setBtwnResponse(RestBtwnResponse btwnResponse) {
        this.btwnResponse = btwnResponse;
    }

    public RestRequest<U, P> getRequestForResource() {
        return requestForResource;
    }

    public void setRequestForResource(RestRequest<U, P> requestForResource) {
        this.requestForResource = requestForResource;
    }

    public RestResponse<P> getResponseForResource() {
        return responseForResource;
    }

    public void setResponseForResource(RestResponse<P> responseForResource) {
        this.responseForResource = responseForResource;
    }

    public RestResponse<P> getResourceResponse() {
        return resourceResponse;
    }

    public void setResourceResponse(RestResponse<P> resourceResponse) {
        this.resourceResponse = resourceResponse;
    }

    public RestResponse<P> getResponse() {
        return response;
    }

    public void setResponse(RestResponse<P> response) {
        this.response = response;
    }

    public Throwable getCause() {
        return cause;
    }

    public void setCause(Throwable cause) {
        this.cause = cause;
    }

    public ErrorType getErrorType() {
        return errorType;
    }

    public void setErrorType(ErrorType errorType) {
        this.errorType = errorType;
    }

    public enum ErrorType {
        HALT, CLIENT, BAD_REQUEST, SERVER
    }
}


text:
@interface PodsDummy_Pods_HelloWordForCocoaPods_Example : NSObject
@end
@implementation PodsDummy_Pods_HelloWordForCocoaPods_Example
@end