text:
package com.google.api.client.util;

import java.lang.reflect.Array;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.GenericDeclaration;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.lang.reflect.WildcardType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;

/**
 * Utilities for working with Java types.
 *
 * @since 1.4
 * @author Yaniv Inbar
 */
public class Types {

  /**
   * Returns the parameterized type that is or extends the given type that matches the given super
   * class.
   *
   *

   * For example, if the input type is {@code HashMap<String,Integer>} and the input super class is
   * {@code Map.class}, it will return the extended parameterized type {@link Map}, but which
   * retains the actual type information from the original {@code HashMap}.
   *

   *
   * @param type class or parameterized type
   * @param superClass super class
   * @return matching parameterized type or {@code null}
   */
  public static ParameterizedType getSuperParameterizedType(Type type, Class<?> superClass) {
    if (type instanceof Class<?> || type instanceof ParameterizedType) {
      outer: while (type != null && type != Object.class) {
        Class<?> rawType;
        if (type instanceof Class<?>) {
          // type is a class
          rawType = (Class<?>) type;
        } else {
          // current is a parameterized type
          ParameterizedType parameterizedType = (ParameterizedType) type;
          rawType = getRawClass(parameterizedType);
          // check if found Collection
          if (rawType == superClass) {
            // return the actual collection parameter
            return parameterizedType;
          }
          if (superClass.isInterface()) {
            for (Type interfaceType : rawType.getGenericInterfaces()) {
              // interface type is class or parameterized type
              Class<?> interfaceClass =
                  interfaceType instanceof Class<?> ? (Class<?>) interfaceType : getRawClass(
                      (ParameterizedType) interfaceType);
              if (superClass.isAssignableFrom(interfaceClass)) {
                type = interfaceType;
                continue outer;
              }
            }
          }
        }
        // move on to the super class
        type = rawType.getGenericSuperclass();
      }
    }
    return null;
  }

  /**
   * Returns whether a class is either assignable to or from another class.
   *
   * @param classToCheck class to check
   * @param anotherClass another class
   */
  public static boolean isAssignableToOrFrom(Class<?> classToCheck, Class<?> anotherClass) {
    return classToCheck.isAssignableFrom(anotherClass)
        || anotherClass.isAssignableFrom(classToCheck);
  }

  /**
   * Creates a new instance of the given class by invoking its default constructor.
   *
   *

   * The given class must be public and must have a public default constructor, and must not be an
   * array or an interface or be abstract. If an enclosing class, it must be static.
   *

   */
  public static <T> T newInstance(Class<T> clazz) {
    // TODO(yanivi): investigate "sneaky" options for allocating the class that GSON uses, like
    // setting the constructor to be accessible, or possibly provide a factory method of a special
    // name
    try {
      return clazz.newInstance();
    } catch (IllegalAccessException e) {
      throw handleExceptionForNewInstance(e, clazz);
    } catch (InstantiationException e) {
      throw handleExceptionForNewInstance(e, clazz);
    }
  }

  private static IllegalArgumentException handleExceptionForNewInstance(
      Exception e, Class<?> clazz) {
    StringBuilder buf =
        new StringBuilder("unable to create new instance of class ").append(clazz.getName());
    ArrayList<String> reasons = new ArrayList<String>();
    if (clazz.isArray()) {
      reasons.add("because it is an array");
    } else if (clazz.isPrimitive()) {
      reasons.add("because it is primitive");
    } else if (clazz == Void.class) {
      reasons.add("because it is void");
    } else {
      if (Modifier.isInterface(clazz.getModifiers())) {
        reasons.add("because it is an interface");
      } else if (Modifier.isAbstract(clazz.getModifiers())) {
        reasons.add("because it is abstract");
      }
      if (clazz.getEnclosingClass() != null && !Modifier.isStatic(clazz.getModifiers())) {
        reasons.add("because it is not static");
      }
      // we don't know what visibility is necessary, but we can give a hint
      if (!Modifier.isPublic(clazz.getModifiers())) {
        reasons.add("possibly because it is not public");
      } else {
        try {
          clazz.getConstructor();
        } catch (NoSuchMethodException e1) {
          reasons.add("because it has no accessible default constructor");
        }
      }
    }
    // append reasons
    boolean and = false;
    for (String reason : reasons) {
      if (and) {
        buf.append(" and");
      } else {
        and = true;
      }
      buf.append(" ").append(reason);
    }
    return new IllegalArgumentException(buf.toString(), e);
  }

  /** Returns whether the given type is an array. */
  public static boolean isArray(Type type) {
    return type instanceof GenericArrayType || type instanceof Class<?>
        && ((Class<?>) type).isArray();
  }

  /**
   * Returns the component type of the given array type, assuming {@link #isArray(Type)}.
   *
   *

   * Return type will either be class, parameterized type, generic array type, or type variable, but
   * not a wildcard type.
   *

   *
   * @throws ClassCastException if {@link #isArray(Type)} is false
   */
  public static Type getArrayComponentType(Type array) {
    return array instanceof GenericArrayType ? ((GenericArrayType) array).getGenericComponentType()
        : ((Class<?>) array).getComponentType();
  }

  /**
   * Returns the raw class for the given parameter type as defined in
   * {@link ParameterizedType#getRawType()}.
   *
   * @param parameterType parameter type
   * @return raw class
   */
  public static Class<?> getRawClass(ParameterizedType parameterType) {
    return (Class<?>) parameterType.getRawType();
  }

  /**
   * Returns the only bound of the given wildcard type.
   *
   * @param wildcardType wildcard type
   * @return only bound or {@code Object.class} for none
   */
  public static Type getBound(WildcardType wildcardType) {
    Type[] lowerBounds = wildcardType.getLowerBounds();
    if (lowerBounds.length != 0) {
      return lowerBounds[0];
    }
    return wildcardType.getUpperBounds()[0];
  }

  /**
   * Resolves the actual type of the given type variable that comes from a field type based on the
   * given context list.
   *

   * In case the type variable can be resolved partially, it will return the partially resolved type
   * variable.
   *

   *
   * @param context context list, ordering from least specific to most specific type context, for
   *        example container class and then its field
   * @param typeVariable type variable
   * @return resolved or partially resolved actual type (type variable, class, parameterized type,
   *         or generic array type, but not wildcard type) or {@code null} if unable to resolve at
   *         all
   */
  public static Type resolveTypeVariable(List<Type> context, TypeVariable<?> typeVariable) {
    // determine where the type variable was declared
    GenericDeclaration genericDeclaration = typeVariable.getGenericDeclaration();
    if (genericDeclaration instanceof Class<?>) {
      Class<?> rawGenericDeclaration = (Class<?>) genericDeclaration;
      // check if the context extends that declaration
      int contextIndex = context.size();
      ParameterizedType parameterizedType = null;
      while (parameterizedType == null && --contextIndex >= 0) {
        parameterizedType =
            getSuperParameterizedType(context.get(contextIndex), rawGenericDeclaration);
      }
      if (parameterizedType != null) {
        // find the type variable's index in the declaration's type parameters
        TypeVariable<?>[] typeParameters = genericDeclaration.getTypeParameters();
        int index = 0;
        for (; index < typeParameters.length; index++) {
          TypeVariable<?> typeParameter = typeParameters[index];
          if (typeParameter.equals(typeVariable)) {
            break;
          }
        }
        // use that index to get the actual type argument
        Type result = parameterizedType.getActualTypeArguments()[index];
        if (result instanceof TypeVariable<?>) {
          // attempt to resolve type variable
          Type resolve = resolveTypeVariable(context, (TypeVariable<?>) result);
          if (resolve != null) {
            return resolve;
          }
          // partially resolved type variable is okay
        }
        return result;
      }
    }
    return null;
  }

  /**
   * Returns the raw array component type to use -- for example for the first parameter of
   * {@link Array#newInstance(Class, int)} -- for the given component type.
   *
   * @param context context list, ordering from least specific to most specific type context, for
   *        example container class and then its field
   * @param componentType array component type or {@code null} for {@code Object.class} result
   * @return raw array component type
   */
  public static Class<?> getRawArrayComponentType(List<Type> context, Type componentType) {
    if (componentType instanceof TypeVariable<?>) {
      componentType = Types.resolveTypeVariable(context, (TypeVariable<?>) componentType);
    }
    if (componentType instanceof GenericArrayType) {
      Class<?> raw = getRawArrayComponentType(context, Types.getArrayComponentType(componentType));
      return Array.newInstance(raw, 0).getClass();
    }
    if (componentType instanceof Class<?>) {
      return (Class<?>) componentType;
    }
    if (componentType instanceof ParameterizedType) {
      return Types.getRawClass((ParameterizedType) componentType);
    }
    Preconditions.checkArgument(
        componentType == null, "wildcard type is not supported: %s", componentType);
    return Object.class;
  }

  /**
   * Returns the type parameter of {@link Iterable} that is assignable from the given iterable type.
   *
   *

   * For example, for the type {@code ArrayList<Integer>} -- or for a class that extends {@code
   * ArrayList<Integer>} -- it will return {@code Integer}.
   *

   *
   * @param iterableType iterable type (must extend {@link Iterable})
   * @return type parameter, which may be any type
   */
  public static Type getIterableParameter(Type iterableType) {
    return getActualParameterAtPosition(iterableType, Iterable.class, 0);
  }

  /**
   * Returns the value type parameter of {@link Map} that is assignable from the given map type.
   *
   *

   * For example, for the type {@code Map<String, Integer>} -- or for a class that extends {@code
   * Map<String, Integer>} -- it will return {@code Integer}.
   *

   *
   * @param mapType map type (must extend {@link Map})
   * @return type parameter, which may be any type
   */
  public static Type getMapValueParameter(Type mapType) {
    return getActualParameterAtPosition(mapType, Map.class, 1);
  }

  private static Type getActualParameterAtPosition(Type type, Class<?> superClass, int position) {
    ParameterizedType parameterizedType = Types.getSuperParameterizedType(type, superClass);
    if (parameterizedType == null) {
      return null;
    }
    Type valueType = parameterizedType.getActualTypeArguments()[position];
    // this is normally a type variable, except in the case where the class of iterableType is
    // superClass, e.g. Iterable<String>
    if (valueType instanceof TypeVariable<?>) {
      Type resolve = Types.resolveTypeVariable(Arrays.asList(type), (TypeVariable<?>) valueType);
      if (resolve != null) {
        return resolve;
      }
    }
    return valueType;
  }

  /**
   * Returns an iterable for an input iterable or array value.
   *
   *

   * If the input value extends {@link Iterable}, it will just return the input value. Otherwise, it
   * will return an iterable that can handle arrays of primitive and non-primitive component type.
   *

   *
   * @param value iterable (extends {@link Iterable}) or array value
   * @return iterable
   */
  @SuppressWarnings("unchecked")
  public static <T> Iterable<T> iterableOf(final Object value) {
    if (value instanceof Iterable<?>) {
      return (Iterable<T>) value;
    }
    Class<?> valueClass = value.getClass();
    Preconditions.checkArgument(valueClass.isArray(), "not an array or Iterable: %s", valueClass);
    Class<?> subClass = valueClass.getComponentType();
    if (!subClass.isPrimitive()) {
      return Arrays.<T>asList((T[]) value);
    }
    return new Iterable<T>() {

      public Iterator<T> iterator() {
        return new Iterator<T>() {

          final int length = Array.getLength(value);
          int index = 0;

          public boolean hasNext() {
            return index < length;
          }

          public T next() {
            if (!hasNext()) {
              throw new NoSuchElementException();
            }
            return (T) Array.get(value, index++);
          }

          public void remove() {
            throw new UnsupportedOperationException();
          }
        };
      }
    };
  }

  /**
   * Returns a new array of the given component type (possibly a Java primitive) that is a copy of
   * the content of the given collection.
   *
   * @param collection collection
   * @param componentType component type (possibly a Java primitive)
   * @return new array
   */
  public static Object toArray(Collection<?> collection, Class<?> componentType) {
    if (componentType.isPrimitive()) {
      Object array = Array.newInstance(componentType, collection.size());
      int index = 0;
      for (Object value : collection) {
        Array.set(array, index++, value);
      }
      return array;
    }
    return collection.toArray((Object[]) Array.newInstance(componentType, collection.size()));
  }

  private Types() {
  }
}


text:
<?php

namespace SSD\Backup\Processors;

use SSD\Backup\Backup;

use League\Flysystem\MountManager;
use League\Flysystem\Adapter\Local;
use League\Flysystem\AdapterInterface;
use League\Flysystem\Filesystem as LeagueFilesystem;

class Distributor
{
    /**
     * Backup object instance.
     *
     * @var \SSD\Backup\Backup
     */
    protected $backup;

    /**
     * Distribution constructor.
     *
     * @param \SSD\Backup\Backup $backup
     */
    public function __construct(Backup $backup)
    {
        $this->backup = $backup;

        $local = new LeagueFilesystem(
            new Local(
                $this->backup->getLocalWorkingDirectory(),
                LOCK_EX,
                Local::SKIP_LINKS
            ),
            [
                'visibility' => AdapterInterface::VISIBILITY_PUBLIC
            ]
        );

        $this->backup->manager = new MountManager([
            'local' => $local,
            'remote' => $this->backup->remote->remote
        ]);
    }

    /**
     * Execute job.
     *
     * @return void
     */
    public function execute(): void
    {
        $remoteDirectory = $this->backup->getRemoteDirectory();
        $archiveFile = $this->backup->getArchiveName();

        if ( ! $this->backup->manager->has("remote://{$remoteDirectory}")) {

            $this->backup->manager->createDir("remote://{$remoteDirectory}");

        }

        $this->backup->manager->move(
            'local://' . $archiveFile,
            'remote://' . $this->backup->getRemoteDirectory() . '/' . $archiveFile
        );
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace Models.Json
{
	[DataContract]
	public class Organization : JsonLDDocument
	{
		public Organization()
		{
			foreach ( var item in this.GetType().GetProperties() )
			{
				if ( item == null )
				{
					if ( item.PropertyType == typeof( string ) )
					{
						item.SetValue( this, "" );
					}
					else
					{
						item.SetValue( this, Activator.CreateInstance( item.PropertyType ) );
					}
				}
			}

			type = "ceterms:Organization";
		}

		//Basic Properties
		[DataMember( Name = "ceterms:description" )]
		public string description { get; set; }

		[DataMember( Name = "ceterms:image" )]
		public string image { get; set; } //Image URL

		[DataMember( Name = "ceterms:name" )]
		public string name { get; set; }

		[DataMember( Name = "ceterms:url" )]
		public string url { get; set; } //URL

		[DataMember( Name = "ceterms:ctid" )]
		public string ctid { get; set; }

		[DataMember( Name = "ceterms:email" )]
		public string email { get; set; } //Email

		[DataMember( Name = "ceterms:fein" )]
		public string fein { get; set; }

		[DataMember( Name = "ceterms:identifier" )]
		public List<object> identifier { get; set; }

		[DataMember( Name = "ceterms:opeid" )]
		public string opeid { get; set; }

		[DataMember( Name = "ceterms:versioning" )]
		public string versioning { get; set; }

		[DataMember( Name = "ceterms:duns" )]
		public string duns { get; set; }

		[DataMember( Name = "ceterms:foundingDate" )]
		public string foundingDate { get; set; }

		[DataMember( Name = "ceterms:naics" )]
		public string naics { get; set; }

		[DataMember( Name = "ceterms:purpose" )]
		public string purpose { get; set; }

		[DataMember( Name = "ceterms:sameAs" )]
		public List<string> sameAs { get; set; }

		//Organization Roles
		[DataMember( Name = "ceterms:creatorOf" )]
		public List<string> creatorOf { get; set; } //Organization URL, Person URL

		[DataMember( Name = "ceterms:owns" )]
		public List<string> owns { get; set; } //Organization URL, Person URL

		[DataMember( Name = "ceterms:updatesVersion" )]
		public List<string> updatesVersion { get; set; } //Organization URL, Person URL

		[DataMember( Name = "ceterms:verifies" )]
		public List<string> verifies { get; set; } //Organization URL, Person URL

		[DataMember( Name = "ceterms:assesses" )]
		public List<string> assesses { get; set; } //Organization URL, Person URL

		[DataMember( Name = "ceterms:offersCredential" )]
		public List<string> offersCredential { get; set; } //Organization URL, Person URL

		[DataMember( Name = "ceterms:employee" )]
		public List<string> employee { get; set; } //Organization URL, Person URL

		[DataMember( Name = "ceterms:trainingOffered" )]
		public List<string> trainingOffered { get; set; } //URLs

		//Quality Assurance Roles
		[DataMember( Name = "ceterms:accredits" )]
		public object accredits { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:approves" )]
		public object approves { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:confers" )]
		public object confers { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:contributorTo" )]
		public object contributorTo { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:endorses" )]
		public object endorses { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:potentialAction" )]
		public object potentialAction { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:recognizes" )]
		public object recognizes { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:regulates" )]
		public object regulates { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:revokes" )]
		public object revokes { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:renews" )]
		public object renews { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		[DataMember( Name = "ceterms:validates" )]
		public object validates { get; set; } //QualityAssuranceAction, Organization URL, Person URL

		//Enumerations
		[DataMember( Name = "ceterms:agentCategory" )]
		public List<string> agentCategory { get; set; } //Organization Type

		[DataMember( Name = "ceterms:serviceType" )]
		public List<string> serviceType { get; set; }

		//Profiles
		[DataMember( Name = "ceterms:agentProcess" )]
		public List<ProcessProfile> agentProcess { get; set; }

		[DataMember( Name = "ceterms:authenticationService" )]
		public List<AuthenticationProfile> authenticationService { get; set; }

		[DataMember( Name = "ceterms:jurisdiction" )]
		public List<JurisdictionProfile> jurisdiction { get; set; }

		[DataMember( Name = "ceterms:address" )]
		public PostalAddress address { get; set; }

		[DataMember( Name = "ceterms:contactPoint" )]
		public object contactPoint { get; set; }

	}
	//
}


text:
<?php
function detect_mobile_device(){
    // check if the user agent value claims to be windows but not windows mobile
if(stristr(@$_SERVER['HTTP_USER_AGENT'],'windows')&&!stristr(@$_SERVER['HTTP_USER_AGENT'],'windows ce')) return false;

    // check if the user agent gives away any tell tale signs it's a mobile browser
if(preg_match('/up.browser|up. link |windows ce|iemobile|mini|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp/i',
    @$_SERVER['HTTP_USER_AGENT'])) return true;

    // check the http accept header to see if wap.wml or wap.xhtml support is claimed
if(isset($_SERVER['HTTP_ACCEPT'])&&(stristr($_SERVER['HTTP_ACCEPT'],'text/vnd.wap.wml')||
    stristr($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml xml'))) return true;

    // check if there are any tell tales signs it's a mobile device from the server headers
if(isset($_SERVER['HTTP_X_WAP_PROFILE'])||isset($_SERVER['HTTP_PROFILE'])||
    isset($_SERVER['X-OperaMini-Features'])||isset($_SERVER['UA-pixels'])) return true;

    // build an array with the first four characters from the most common mobile user agents
$a = array ('acs-','alav','alca','amoi','audi','aste','avan','benq','bird','blac',
    'bla z','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',
    'ipaq','java', 'jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',
    'maui','maxo','midp','mi ts','mmef','mobi','mot-','moto','mwbp','nec-',
    'newt','noki','opwv','palm','pana' ,'pant','pdxg','phil','play','pluc',
    'port','prox','qtek','qwap','sage','sams','s any','sch-','sec-','send',
    'seri','sgh-','shar','sie-','siem','smal','smar','sony ','sph-','symb',
    't-mo','teli','tim-','tosh','tsm-','upg1','upsi','vk-v','voda',' w3c ',
    'wap-','wapa','wapi','wapp','wapr','webc','winw','winw','xda','xda-');
    // check if the first four characters of the current user agent are set as a key in the array
if(isset($a[ substr (@$_SERVER['HTTP_USER_AGENT'],0,4)])) return true;
}


text:
<?xml version="1.0" encoding="utf-8" ?>
<LearningStandardItem RefId="F0DF610EDD5E45959D006940783E6323" xml:lang="en">
	<StandardHierarchyLevel>
		<Number>2</Number>
		<Description>Subject Grade</Description>
	</StandardHierarchyLevel>
	<StatementCodes>
		<StatementCode>Mathematics.A</StatementCode>
	</StatementCodes>
	<Statements>
		<Statement>Mathematics | Algebra</Statement>
	</Statements>
	<GradeLevels>
		<GradeLevel>HS</GradeLevel>
	</GradeLevels>
	<LearningStandardDocumentRefId>B62C1C106873438AA0126760075A65A3</LearningStandardDocumentRefId>
</LearningStandardItem>


text:
namespace mixal_parse {

inline Expression::Token Token(
	std::optional<UnaryOperation> unary_op,
	BasicExpression basic_expr,
	std::optional<BinaryOperation> binary_op)
{
	return {unary_op, basic_expr, binary_op};
}

inline Expression::Token Token(
	BasicExpression basic_expr)
{
	return Token({}, basic_expr, {});
}

inline Expression::Token BinaryToken(
	BasicExpression basic_expr,
	BinaryOperation binary_op)
{
	return Token({}, basic_expr, binary_op);
}

inline Expression::Token UnaryToken(
	UnaryOperation unary_op,
	BasicExpression basic_expr)
{
	return Token(unary_op, basic_expr, {});
}

struct ExpressionBuilder
{
	Expression build() const
	{
		return expr_;
	}

	ExpressionBuilder& add(Expression::Token token)
	{
		expr_.add_token(std::move(token));
		return *this;
	}

	template<typename... Exprs>
	static Expression Build(const Exprs&... exprs)
	{
		ExpressionBuilder expr_builder;
		(void)std::initializer_list<int>{((void)expr_builder.add(exprs), 0)...};
		return expr_builder.build();
	}

private:
	Expression expr_;
};

inline ExpressionBuilder Expr()
{
	return ExpressionBuilder{};
}

struct WTokenBuilder
{
	template<typename... Exprs>
	WTokenBuilder& expression_is(const Exprs&... exprs)
	{
		token_.expression = ExpressionBuilder::Build(exprs...);
		return *this;
	}

	template<typename... Exprs>
	WTokenBuilder& field_is(const Exprs&... exprs)
	{
		token_.field = ExpressionBuilder::Build(exprs...);
		return *this;
	}

	WValue::Token build() const
	{
		return token_;
	}

	template<typename... Builders>
	static WValue Build(const Builders&... builders)
	{
		WValue value;
		(void)std::initializer_list<int>{((void)value.add_token(builders.build()), 0)...};
		return value;
	}

private:
	WValue::Token token_;
};

inline WTokenBuilder WToken()
{
	return WTokenBuilder{};
}

struct MIXALOpBuilder
{
	std::optional<WValue> w_value;
	std::optional<Text> alf_text;

	MIXALOpBuilder& ALF_text_is(const Text& text)
	{
		assert(!alf_text);
		alf_text = text;
		return *this;
	}

	MIXALOpBuilder& token(WTokenBuilder& token_builder)
	{
		if (!w_value)
		{
			w_value = WValue{};
		}

		w_value->add_token(token_builder.build());
		return *this;
	}
};

inline MIXALOpBuilder MIXAL()
{
	return MIXALOpBuilder{};
}

struct MIXOpBuilder
{
	std::optional<Expression> index_expr;
	std::optional<Expression> field_expr;

	std::optional<Expression> address_expr;
	std::optional<WValue> address_w_value;

	template<typename... Exprs>
	MIXOpBuilder& address_is(const Expression::Token& expr0, const Exprs&... exprs)
	{
		address_expr = ExpressionBuilder::Build(expr0, exprs...);
		return *this;
	}

	template<typename... WBuilders>
	MIXOpBuilder& address_is(const WTokenBuilder& w_builder, const WBuilders&... builders)
	{
		address_w_value = WTokenBuilder::Build(w_builder, builders...);
		return *this;
	}

	template<typename... Exprs>
	MIXOpBuilder& index_is(const Exprs&... exprs)
	{
		index_expr = ExpressionBuilder::Build(exprs...);
		return *this;
	}

	template<typename... Exprs>
	MIXOpBuilder& field_is(const Exprs&... exprs)
	{
		field_expr = ExpressionBuilder::Build(exprs...);
		return *this;
	}

};

inline MIXOpBuilder MIX()
{
	return MIXOpBuilder{};
}

} // namespace mixal_parse


text:
package com.opengamma.analytics.financial.instrument.index;

import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;

import org.testng.annotations.Test;
import org.threeten.bp.Period;

import com.opengamma.financial.convention.businessday.BusinessDayConvention;
import com.opengamma.financial.convention.businessday.BusinessDayConventions;
import com.opengamma.financial.convention.daycount.DayCount;
import com.opengamma.financial.convention.daycount.DayCounts;
import com.opengamma.util.money.Currency;
import com.opengamma.util.test.TestGroup;

/**
 * Test.
 */
@Test(groups = TestGroup.UNIT)
public class IborIndexTest {
  //Libor3m
  private static final Period TENOR = Period.ofMonths(3);
  private static final int SETTLEMENT_DAYS = 2;
  private static final DayCount DAY_COUNT = DayCounts.ACT_360;
  private static final BusinessDayConvention BUSINESS_DAY = BusinessDayConventions.MODIFIED_FOLLOWING;
  private static final boolean IS_EOM = true;
  private static final Currency CUR = Currency.EUR;
  private static final IborIndex INDEX = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
  private static final String NAME = "USD LIBOR 3M";
  private static final IborIndex INDEX2 = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, NAME);

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullCurrency() {
    new IborIndex(null, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullTenor() {
    new IborIndex(CUR, null, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullDayCount() {
    new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, null, BUSINESS_DAY, IS_EOM, "Ibor");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullBusinessDay() {
    new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, null, IS_EOM, "Ibor");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testName() {
    new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, null);
  }

  @Test
  public void getter() {
    assertEquals(INDEX.getCurrency(), CUR);
    assertEquals(INDEX.getTenor(), TENOR);
    assertEquals(INDEX.getSpotLag(), SETTLEMENT_DAYS);
    assertEquals(INDEX.getDayCount(), DAY_COUNT);
    assertEquals(INDEX.getBusinessDayConvention(), BUSINESS_DAY);
    assertEquals(INDEX.isEndOfMonth(), IS_EOM);
    final String name = "Ibor";
    assertEquals(name, INDEX.getName());
    assertEquals(INDEX.toString(), "IborIndex[Ibor, currency=EUR, tenor=P3M, day count=Actual/360, business day convention=Modified Following, spot lag=2, end-of-month]");
    assertEquals(NAME, INDEX2.getName());
  }

  @Test
  public void testEqualHash() {
    assertEquals(INDEX, INDEX);
    final IborIndex indexDuplicate = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
    assertEquals(INDEX, indexDuplicate);
    assertEquals(INDEX.hashCode(), indexDuplicate.hashCode());
    final IborIndex indexNoEOM1 = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, !IS_EOM, "Ibor");
    final IborIndex indexNoEOM2 = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, !IS_EOM, "Ibor");
    assertEquals(indexNoEOM1.hashCode(), indexNoEOM2.hashCode());
    final Currency currencyModified = Currency.USD;
    IborIndex indexModified = new IborIndex(currencyModified, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, !IS_EOM, "Ibor");
    assertFalse(INDEX.equals(indexModified));
    final Period tenorModified = Period.ofMonths(2);
    indexModified = new IborIndex(CUR, tenorModified, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
    assertFalse(INDEX.equals(indexModified));
    indexModified = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS + 1, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
    assertFalse(INDEX.equals(indexModified));
    indexModified = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DayCounts.ACT_365, BUSINESS_DAY, IS_EOM, "Ibor");
    assertFalse(INDEX.equals(indexModified));
    indexModified = new IborIndex(CUR, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BusinessDayConventions.FOLLOWING, IS_EOM, "Ibor");
    assertFalse(INDEX.equals(indexModified));
    final Currency otherCurrency = Currency.USD;
    indexModified = new IborIndex(otherCurrency, TENOR, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
    assertFalse(INDEX.equals(indexModified));
    final Period otherTenor = Period.ofMonths(6);
    indexModified = new IborIndex(CUR, otherTenor, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor");
    assertFalse(INDEX.equals(indexModified));
    indexModified = new IborIndex(CUR, otherTenor, SETTLEMENT_DAYS, DAY_COUNT, BUSINESS_DAY, IS_EOM, "Ibor1");
    assertFalse(INDEX.equals(indexModified));
    assertFalse(INDEX.equals(null));
    assertFalse(INDEX.equals(CUR));
  }

}


text:
#!/usr/bin/env bash

set -o errexit
set -o pipefail
set -o nounset
set -o xtrace

if [[ "$#" -ne 2 ]]; then
    echo "Usage: $0 <git sha or tag of Onyx core> <onyx version>"
    echo "Example: $0 0.8.4 0.8.4"
else

    coderay -h >/dev/null 2>&1 || { echo >&2 "I require coderay but it's not installed. Please install with 'gem install coderay'. Aborting."; exit 1; }

    # Ensure we're in the project's dir before we start
    cd "$(dirname "$0")"

    # Build user guide
    rm -rf onyx
    git clone https://github.com/onyx-platform/onyx.git
    git -C onyx checkout $1

    mkdir -p docs/user-guide/latest
    mkdir -p docs/user-guide/$2
    rm -rf docs/user-guide/$2/*
    cp -R onyx/doc/user-guide/* docs/user-guide/$2/
    rm -rf docs/user-guide/latest/*
    cp -R onyx/doc/user-guide/* docs/user-guide/latest/

    # Convert ADOC to HTML.
    asciidoctor docs/user-guide/$2/index.adoc
    asciidoctor docs/user-guide/latest/index.adoc

    rm -rf docs/user-guide/$2/*.adoc
    rm -rf docs/user-guide/latest/*.adoc

    # Build API docs
    mkdir -p docs/api/$2/
    rm -rf docs/api/$2/*
    cp -R onyx/doc/api/* docs/api/$2/

    mkdir -p docs/api/latest/
    rm -rf docs/api/latest/*
    cp -R onyx/doc/api/* docs/api/latest/

    rm -rf onyx

    # Build cheat sheet
    rm -rf onyx-cheat-sheet
    git clone https://github.com/onyx-platform/onyx-cheat-sheet.git
    rm onyx-cheat-sheet/resources/public/js/app.js || true
    mkdir -p docs/cheat-sheet/$2
    rm -rf docs/cheat-sheet/$2/*
    cd onyx-cheat-sheet && lein update-dependency org.onyxplatform/onyx $1 && lein with-profile -dev,+uberjar cljsbuild once
    cd ..

    echo "Working dir before copy " $PWD
    cp onyx-cheat-sheet/resources/public/js/app.js docs/cheat-sheet/$2
    cp onyx-cheat-sheet/resources/public/css/style.css css/cheat-sheet-style.css
    cp onyx-cheat-sheet/resources/index.html docs/cheat-sheet/$2

    mkdir -p docs/user-guide/latest
    rm -rf docs/cheat-sheet/latest/*
    cp onyx-cheat-sheet/resources/public/js/app.js docs/cheat-sheet/latest
    cp onyx-cheat-sheet/resources/index.html docs/cheat-sheet/latest

    rm -rf onyx-cheat-sheet

    git add docs

    # Update Onyx version
    sed -i.bak "s/.*onyx_version.*/onyx_version: $2/g" _config.yml
    git add _config.yml
    rm _config.yml.bak
    git commit -a -m "Stage "$1
    git push
fi


text:
set(CMAKE_DEPENDS_GENERATOR "MinGW Makefiles")

# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
  "CMakeCache.txt"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeCCompiler.cmake.in"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeCCompilerABI.c"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeCInformation.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeCommonLanguageInclude.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeCompilerIdDetection.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeConfigurableFile.in"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDependentOption.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineCCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineCompileFeatures.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineCompilerABI.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineCompilerId.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineRCCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineSystem.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeFindBinUtils.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeGenericSystem.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeMinGWFindMake.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeParseArguments.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeParseImplicitLinkInfo.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeRCCompiler.cmake.in"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeRCInformation.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeSystem.cmake.in"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeSystemSpecificInformation.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeSystemSpecificInitialize.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeTestCCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeTestCompilerCommon.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeTestRCCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckCCompilerFlag.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckCSourceCompiles.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckCSourceRuns.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckCXXSourceCompiles.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckFunctionExists.c"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckFunctionExists.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckIncludeFile.c.in"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckIncludeFile.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckIncludeFileCXX.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckIncludeFiles.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckLibraryExists.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckStructHasMember.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckSymbolExists.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckTypeSize.c.in"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CheckTypeSize.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/ADSP-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Borland-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Clang-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Cray-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/GHS-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/GNU-C-FeatureTests.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/GNU-C.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/GNU-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/GNU.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/HP-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/IAR-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Intel-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/MSVC-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/PGI-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/PathScale-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/SCO-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/TI-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/Watcom-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/XL-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageMessage.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPkgConfig.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/GNUInstallDirs.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Internal/FeatureTesting.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Platform/Windows-GNU-C-ABI.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Platform/Windows-GNU-C.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Platform/Windows-GNU.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Platform/Windows-windres.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Platform/Windows.cmake"
  "C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/Platform/WindowsPaths.cmake"
  "../CMakeLists.txt"
  "CMakeFiles/3.4.1/CMakeCCompiler.cmake"
  "CMakeFiles/3.4.1/CMakeRCCompiler.cmake"
  "CMakeFiles/3.4.1/CMakeSystem.cmake"
  "CMakeFiles/CheckTypeSize/SIZEOF_SIZE_T.c"
  "CMakeFiles/feature_tests.c"
  "../cmake/macros.cmake"
  "../cmake/sdlchecks.cmake"
  "../cmake_uninstall.cmake.in"
  "../include/SDL_config.h.cmake"
  )

# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
  "Makefile"
  "CMakeFiles/cmake.check_cache"
  )

# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
  "CMakeFiles/3.4.1/CMakeSystem.cmake"
  "CMakeFiles/3.4.1/CMakeCCompiler.cmake"
  "CMakeFiles/3.4.1/CMakeRCCompiler.cmake"
  "CMakeFiles/3.4.1/CMakeCCompiler.cmake"
  "CMakeFiles/CheckTypeSize/SIZEOF_SIZE_T.c"
  "include/SDL_config.h"
  "cmake_uninstall.cmake"
  "CMakeFiles/CMakeDirectoryInformation.cmake"
  )

# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
  "CMakeFiles/uninstall.dir/DependInfo.cmake"
  "CMakeFiles/SDL2-static.dir/DependInfo.cmake"
  "CMakeFiles/SDL2.dir/DependInfo.cmake"
  "CMakeFiles/SDL2main.dir/DependInfo.cmake"
  )


text: All of the exams i have done before the academy


text:
module TreeConcern
  module Migration
    extend ActiveSupport::Concern

    def add_tree table_name
      add_reference table_name, :parent, foreign_key: {to_table: table_name}
    end
  end
end


text:
echo bin/noa command Elixir.NoaRelease.Tasks seed $@
bin/noa command Elixir.NoaRelease.Tasks seed $@


text:
from __future__ import division
from __future__ import print_function

import logging
import os
import sys
import threading
import time

from redis import StrictRedis

from redis_lock import Lock

from config import TIMEOUT

if __name__ == '__main__':
    logging.basicConfig(
        level=logging.DEBUG, format='%(process)d %(asctime)s,%(msecs)05d %(name)s %(levelname)s %(message)s', datefmt="%x~%X"
    )
    redis_socket = sys.argv[1]
    test_name = sys.argv[2]
    if ':' in test_name:
        test_name, effect = test_name.split(':')
        logging.info('Applying effect %r.', effect)
        if effect == 'gevent':
            from gevent import monkey

            monkey.patch_all()
        elif effect == 'eventlet':
            import eventlet

            eventlet.monkey_patch()
        else:
            raise RuntimeError('Invalid effect spec %r.' % effect)
    logging.info('threading.get_ident.__module__=%s', threading.get_ident.__module__)
    if test_name == 'test_simple':
        conn = StrictRedis(unix_socket_path=redis_socket)
        with Lock(conn, "foobar"):
            time.sleep(0.1)
    elif test_name == 'test_simple_auto_renewal':
        conn = StrictRedis(unix_socket_path=redis_socket)
        with Lock(conn, "foobar", expire=1, auto_renewal=True) as lock:
            time.sleep(2)
    elif test_name == 'test_no_block':
        conn = StrictRedis(unix_socket_path=redis_socket)
        lock = Lock(conn, "foobar")
        res = lock.acquire(blocking=False)
        logging.info("acquire=>%s", res)
    elif test_name == 'test_timeout':
        conn = StrictRedis(unix_socket_path=redis_socket)
        with Lock(conn, "foobar"):
            time.sleep(1)
    elif test_name == 'test_expire':
        conn = StrictRedis(unix_socket_path=redis_socket)
        with Lock(conn, "foobar", expire=TIMEOUT / 4):
            time.sleep(0.1)
        with Lock(conn, "foobar", expire=TIMEOUT / 4):
            time.sleep(0.1)
    elif test_name == 'test_no_overlap':
        from sched import scheduler

        sched = scheduler(time.time, time.sleep)
        start = time.time() + TIMEOUT / 2

        # the idea is to start all the lock at the same time - we use the scheduler to start everything in TIMEOUT/2 seconds, by
        # that time all the forks should be ready

        def cb_no_overlap():
            with Lock(conn, "foobar"):
                time.sleep(0.001)

        sched.enterabs(start, 0, cb_no_overlap, ())
        pids = []

        for _ in range(125):
            pid = os.fork()
            if pid:
                pids.append(pid)
            else:
                try:
                    conn = StrictRedis(unix_socket_path=redis_socket)
                    sched.run()
                finally:
                    os._exit(0)
        for pid in pids:
            os.waitpid(pid, 0)
    else:
        raise RuntimeError('Invalid test spec %r.' % test_name)
    logging.info('DIED.')


text:
package util;

public class Armor extends Item{//inherits from Item
	private double armor;
	public Armor(){
		super("defualtArmor");
	}
	public Armor(double armor, String name){
		super(name);
		this.armor = armor;//assigns the value from this method to the variable form this class
	}
	public double getArmor(){
		return armor;
	}

}


text:
package org.ovirt.engine.core.common.queries;

import org.ovirt.engine.core.compat.*;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "GetImageByImageIdParameters")
public class GetImageByImageIdParameters extends VdcQueryParametersBase {
    private static final long serialVersionUID = 8163118634744815433L;

    public GetImageByImageIdParameters(Guid imageId) {
        _imageId = imageId;
    }

    @XmlElement(name = "ImageId")
    private Guid _imageId = new Guid();

    public Guid getImageId() {
        return _imageId;
    }

    public GetImageByImageIdParameters() {
    }
}


text:
package org.pentaho.di.laf;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;

public class OverlayProperties extends Properties implements PropertyHandler {

  private static final long serialVersionUID = 1L;
  private String name = null;

  public OverlayProperties( String file ) throws IOException {
    load( file );
  }

  @Override
  public boolean exists( String filename ) {
    try {
      return ( getURL( filename ) != null );
    } catch ( MalformedURLException e ) {
      return false;
    }
  }

  @Override
  public boolean loadProps( String filename ) {
    try {
      return load( filename );
    } catch ( IOException e ) {
      return false;
    }
  }

  private URL getURL( String filename ) throws MalformedURLException {
    URL url;
    File file = new File( filename );
    if ( file.exists() ) {
      url = file.toURI().toURL();
    } else {
      ClassLoader classLoader = getClass().getClassLoader();
      url = classLoader.getResource( filename );
    }
    return url;
  }

  /**
   * cleanse and reload the property file
   *
   * @param filename
   * @return
   * @throws IOException
   */
  public boolean load( String filename ) throws IOException {
    URL url = getURL( filename );
    if ( url == null ) {
      return false;
    }
    clear();
    load( url.openStream() );
    return true;
  }

  public String getName() {
    return name;
  }
}


text:
package fr.bouyguestelecom.tv.bboxiot.datamodel.enums;

/**
 * Unit enum
 *
 * @author Bertrand Martel
 */
public enum Unit {

    NONE("none"),
    CELSIUS("celsius"),
    PURCENT("purcent"),
    VOLTAGE("voltage"),
    AMPERE("ampere"),
    SECOND("second"),
    WATT("watt");

    private String valueStr = "";

    private Unit(String valueStr) {
        this.valueStr = valueStr;
    }

    public static String getUnitStr(Unit value) {

        switch (value) {
            case CELSIUS:
                return "°C";
            case PURCENT:
                return "%";
            case VOLTAGE:
                return "V";
            case AMPERE:
                return "A";
            case SECOND:
                return "s";
            case WATT:
                return "W";
        }
        return "";
    }

    public static Unit getUnitStr(String value) {

        for (Unit unit : Unit.values()) {
            if (value.equals(unit.valueStr))
                return unit;
        }
        return NONE;
    }

    public String getValueStr() {
        return valueStr;
    }

}


text:
FROM dockerfile/nodejs

RUN npm install -g ws