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

<title>MathOperationBigDecimalBinary</title>
<meta name="date" content="2017-03-06">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.github.jessemull.microflex.bigdecimalflex.math

Class MathOperationBigDecimalBinary

java.lang.Object

com.github.jessemull.microflex.bigdecimalflex.math.MathOperationBigDecimalBinary

Direct Known Subclasses:

AdditionBigDecimal, SubtractionBigDecimal

public abstract class MathOperationBigDecimalBinary
extends java.lang.Object

This class performs mathematical operations with two arguments for BigDecimal
 plate stacks, plates, wells and well sets. To create a custom mathematical
 operation extend this class and override the calculate methods using the
 appropriate operation.

 Operations can be performed on stacks, plates, sets or wells of uneven length
 using standard or strict functions. Standard functions treat all values missing
 from a data set as zeroes and combine all stacks, plates, sets and wells from
 both input objects. Strict functions omit all values, stacks, plates, wells
 and sets missing from one of the input objects:

Operation

Output

                Standard

                Treats missing values as zeroes

                Combines stacks, plates, sets, wells and values from both input objects

                Strict

                Omits all missing values

                Combines stacks, plates, sets, wells and values present in both input objects only

 The functions within the MicroFlex library are designed to be flexible and the
 math operation binary object supports operations using two stacks, plates, sets
 and well objects as input. In addition, it supports operations using a single
 stack, plate, set or well object and a collection, array or constant. It also
 allows the developer to limit the operation to a subset of data:

Input 1

Input 2

Beginning
Index

Length of
Subset

Operation

       Well
       Well
       +/-
       +/-
       Performs the operation using the values in the two wells

       Well
       Array
       +/-
       +/-
       Performs the operation using the values in the array and the values in the well

       Well
       Collection
       +/-
       +/-
       Performs the operation using the values in the collection and the values in the well

       Well
       Constant
       +/-
       +/-
       Performs the operation using the constant value and each value in the well

       Set
       Set
       +/-
       +/-
       Performs the operation on the values in each matching pair of wells in the two sets

       Set
       Array
       +/-
       +/-
       Performs the operation using the values in the array and the values in each well of the set

       Set
       Collection
       +/-
       +/-
       Performs the operation using the values in the collection and the values in each well of the set

       Set
       Constant
       +/-
       +/-
       Performs the operation using the constant and each value in each well of the set

       Plate
       Plate
       +/-
       +/-
       Performs the operation on the values in each matching pair of wells in the two plates

       Plate
       Array
       +/-
       +/-
       Performs the operation using the values in the array and the values in each well of the plate

       Plate
       Collection
       +/-
       +/-
       Performs the operation using the values in the collection and the values in each well of the plate

       Plate
       Constant
       +/-
       +/-
       Performs the operation using the constant and each value in each well of the plate

       Stack
       Stack
       +/-
       +/-
       Performs the operation on the values in each matching pair of wells in each matching plate in the stack

       Stack
       Array
       +/-
       +/-
       Performs the operation using the values in the array and the values in each well of each plate in the stack

       Stack
       Collection
       +/-
       +/-
       Performs the operation using the values in the collection and the values in each well of each plate in the stack

       Stack
       Constant
       +/-
       +/-
       Performs the operation using the constant and each value in each well of each plate in the stack

 MicroFlex currently supports the following binary mathematical operations
 for BigDecimal objects:

Operations

       Addition

       Subtraction

       Multiplication

       Division

       Modulus

Author:

Jesse L. Mull

Constructor Summary

Constructors

Constructor and Description

MathOperationBigDecimalBinary()

Creates a new math operation.

Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods

Modifier and Type
Method and Description

abstract java.util.List<java.math.BigDecimal>
calculate(java.util.List<java.math.BigDecimal> list,
         java.math.BigDecimal constant)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculate(java.util.List<java.math.BigDecimal> list,
         java.math.BigDecimal[] array)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculate(java.util.List<java.math.BigDecimal> list,
         java.math.BigDecimal[] array,
         int begin,
         int length)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculate(java.util.List<java.math.BigDecimal> list,
         java.util.Collection<java.math.BigDecimal> collection)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculate(java.util.List<java.math.BigDecimal> list,
         java.util.Collection<java.math.BigDecimal> collection,
         int begin,
         int length)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculate(java.util.List<java.math.BigDecimal> list1,
         java.util.List<java.math.BigDecimal> list2)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculate(java.util.List<java.math.BigDecimal> list1,
         java.util.List<java.math.BigDecimal> list2,
         int begin,
         int length)

Performs the mathematical operation for the two lists using the values
 between the indices.

abstract java.util.List<java.math.BigDecimal>
calculateStrict(java.util.List<java.math.BigDecimal> list,
               java.math.BigDecimal[] array)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculateStrict(java.util.List<java.math.BigDecimal> list,
               java.math.BigDecimal[] array,
               int begin,
               int length)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculateStrict(java.util.List<java.math.BigDecimal> list,
               java.util.Collection<java.math.BigDecimal> collection)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculateStrict(java.util.List<java.math.BigDecimal> list,
               java.util.Collection<java.math.BigDecimal> collection,
               int begin,
               int length)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculateStrict(java.util.List<java.math.BigDecimal> list1,
               java.util.List<java.math.BigDecimal> list2)

Performs the mathematical operation for the two lists.

abstract java.util.List<java.math.BigDecimal>
calculateStrict(java.util.List<java.math.BigDecimal> list1,
               java.util.List<java.math.BigDecimal> list2,
               int begin,
               int length)

Performs the mathematical operation for the two lists.

PlateBigDecimal
plates(PlateBigDecimal plate,
      java.math.BigDecimal constant)

Returns the result of the mathematical operation.

PlateBigDecimal
plates(PlateBigDecimal plate,
      java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

PlateBigDecimal
plates(PlateBigDecimal plate,
      java.math.BigDecimal[] array,
      int begin,
      int length)

Returns the result of the mathematical operation.

PlateBigDecimal
plates(PlateBigDecimal plate,
      java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

PlateBigDecimal
plates(PlateBigDecimal plate,
      java.util.Collection<java.math.BigDecimal> collection,
      int begin,
      int length)

Returns the result of the mathematical operation.

PlateBigDecimal
plates(PlateBigDecimal plate1,
      PlateBigDecimal plate2)

Returns the result of the mathematical operation.

PlateBigDecimal
plates(PlateBigDecimal plate1,
      PlateBigDecimal plate2,
      int begin,
      int length)

Returns the result of the mathematical operation using the values between
 the indices.

PlateBigDecimal
platesStrict(PlateBigDecimal plate,
            java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

PlateBigDecimal
platesStrict(PlateBigDecimal plate,
            java.math.BigDecimal[] array,
            int begin,
            int length)

Returns the result of the mathematical operation.

PlateBigDecimal
platesStrict(PlateBigDecimal plate,
            java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

PlateBigDecimal
platesStrict(PlateBigDecimal plate,
            java.util.Collection<java.math.BigDecimal> collection,
            int begin,
            int length)

Returns the result of the mathematical operation.

PlateBigDecimal
platesStrict(PlateBigDecimal plate1,
            PlateBigDecimal plate2)

Returns the result of the mathematical operation.

PlateBigDecimal
platesStrict(PlateBigDecimal plate1,
            PlateBigDecimal plate2,
            int begin,
            int length)

Returns the result of the mathematical operation using the values between
 the indices.

WellSetBigDecimal
sets(WellSetBigDecimal set,
    java.math.BigDecimal constant)

Returns the result of the mathematical operation.

WellSetBigDecimal
sets(WellSetBigDecimal set,
    java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

WellSetBigDecimal
sets(WellSetBigDecimal set,
    java.math.BigDecimal[] array,
    int begin,
    int length)

Returns the result of the mathematical operation.

WellSetBigDecimal
sets(WellSetBigDecimal set,
    java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

WellSetBigDecimal
sets(WellSetBigDecimal set,
    java.util.Collection<java.math.BigDecimal> collection,
    int begin,
    int length)

Returns the result of the mathematical operation.

WellSetBigDecimal
sets(WellSetBigDecimal set1,
    WellSetBigDecimal set2)

Returns the result of the mathematical operation.

WellSetBigDecimal
sets(WellSetBigDecimal set1,
    WellSetBigDecimal set2,
    int begin,
    int length)

Returns the result of the mathematical operation using the values between
 the indices.

WellSetBigDecimal
setsStrict(WellSetBigDecimal set,
          java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

WellSetBigDecimal
setsStrict(WellSetBigDecimal set,
          java.math.BigDecimal[] array,
          int begin,
          int length)

Returns the result of the mathematical operation.

WellSetBigDecimal
setsStrict(WellSetBigDecimal set,
          java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

WellSetBigDecimal
setsStrict(WellSetBigDecimal set,
          java.util.Collection<java.math.BigDecimal> collection,
          int begin,
          int length)

Returns the result of the mathematical operation.

WellSetBigDecimal
setsStrict(WellSetBigDecimal set1,
          WellSetBigDecimal set2)

Returns the result of the mathematical operation.

WellSetBigDecimal
setsStrict(WellSetBigDecimal set1,
          WellSetBigDecimal set2,
          int begin,
          int length)

Returns the result of the mathematical operation using the values between
 the indices.

StackBigDecimal
stacks(StackBigDecimal stack,
      java.math.BigDecimal constant)

Returns the result of the mathematical operation.

StackBigDecimal
stacks(StackBigDecimal stack,
      java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

StackBigDecimal
stacks(StackBigDecimal stack,
      java.math.BigDecimal[] array,
      int begin,
      int length)

Returns the result of the mathematical operation.

StackBigDecimal
stacks(StackBigDecimal stack,
      java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

StackBigDecimal
stacks(StackBigDecimal stack,
      java.util.Collection<java.math.BigDecimal> collection,
      int begin,
      int length)

Returns the result of the mathematical operation.

StackBigDecimal
stacks(StackBigDecimal stack1,
      StackBigDecimal stack2)

Returns the result of the mathematical operation.

StackBigDecimal
stacks(StackBigDecimal stack1,
      StackBigDecimal stack2,
      int begin,
      int length)

Returns the result of the mathematical operation using the values between
 the indices.

StackBigDecimal
stacksStrict(StackBigDecimal stack,
            java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

StackBigDecimal
stacksStrict(StackBigDecimal stack,
            java.math.BigDecimal[] array,
            int begin,
            int length)

Returns the result of the mathematical operation.

StackBigDecimal
stacksStrict(StackBigDecimal stack,
            java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

StackBigDecimal
stacksStrict(StackBigDecimal stack,
            java.util.Collection<java.math.BigDecimal> collection,
            int begin,
            int length)

Returns the result of the mathematical operation.

StackBigDecimal
stacksStrict(StackBigDecimal stack1,
            StackBigDecimal stack2)

Returns the result of the mathematical operation.

StackBigDecimal
stacksStrict(StackBigDecimal stack1,
            StackBigDecimal stack2,
            int begin,
            int length)

Returns the result of the mathematical operation using the values between
 the indices.

java.util.List<java.math.BigDecimal>
wells(WellBigDecimal well,
     java.math.BigDecimal constant)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wells(WellBigDecimal well,
     java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wells(WellBigDecimal well,
     java.math.BigDecimal[] array,
     int begin,
     int length)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wells(WellBigDecimal well,
     java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wells(WellBigDecimal well,
     java.util.Collection<java.math.BigDecimal> collection,
     int begin,
     int length)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wells(WellBigDecimal well1,
     WellBigDecimal well2)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wells(WellBigDecimal well1,
     WellBigDecimal well2,
     int begin,
     int length)

Returns the result of the mathematical operation using the data between
 the indices.

java.util.List<java.math.BigDecimal>
wellsStrict(WellBigDecimal well,
           java.math.BigDecimal[] array)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wellsStrict(WellBigDecimal well,
           java.math.BigDecimal[] array,
           int begin,
           int length)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wellsStrict(WellBigDecimal well,
           java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wellsStrict(WellBigDecimal well,
           java.util.Collection<java.math.BigDecimal> collection,
           int begin,
           int length)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wellsStrict(WellBigDecimal well1,
           WellBigDecimal well2)

Returns the result of the mathematical operation.

java.util.List<java.math.BigDecimal>
wellsStrict(WellBigDecimal well1,
           WellBigDecimal well2,
           int begin,
           int length)

Returns the result of the mathematical operation using the data between
 the indices.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MathOperationBigDecimalBinary

public MathOperationBigDecimalBinary()

Creates a new math operation.

Method Detail

wells

public java.util.List<java.math.BigDecimal> wells(WellBigDecimal well1,
                                                  WellBigDecimal well2)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellBigDecimal - the first well

WellBigDecimal - the second well

Returns:

result of the operation

wells

public java.util.List<java.math.BigDecimal> wells(WellBigDecimal well1,
                                                  WellBigDecimal well2,
                                                  int begin,
                                                  int length)

Returns the result of the mathematical operation using the data between
 the indices. Missing data points due to uneven data set lengths are treated as
 zeroes.

Parameters:

WellBigDecimal - the first well

WellBigDecimal - the second well

int - beginning index of the subset

int - length of the subset

Returns:

result of the operation

wellsStrict

public java.util.List<java.math.BigDecimal> wellsStrict(WellBigDecimal well1,
                                                        WellBigDecimal well2)

Returns the result of the mathematical operation. Missing data points
 due to uneven data set lengths are omitted.

Parameters:

WellBigDecimal - the first well

WellBigDecimal - the second well

Returns:

result of the operation

wellsStrict

public java.util.List<java.math.BigDecimal> wellsStrict(WellBigDecimal well1,
                                                        WellBigDecimal well2,
                                                        int begin,
                                                        int length)

Returns the result of the mathematical operation using the data between
 the indices. Missing data points due to uneven data set lengths are omitted.

Parameters:

WellBigDecimal - the first well

WellBigDecimal - the second well

int - beginning index of the subset

int - length of the subset

Returns:

result of the operation

wells

public java.util.List<java.math.BigDecimal> wells(WellBigDecimal well,
                                                  java.math.BigDecimal constant)

Returns the result of the mathematical operation.

Parameters:

WellBigDecimal - the well

BigDecimal - constant for operation

Returns:

result of the operation

wells

public java.util.List<java.math.BigDecimal> wells(WellBigDecimal well,
                                                  java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellBigDecimal - the well

BigDecimal[] - array for the operation

Returns:

result of the operation

wells

public java.util.List<java.math.BigDecimal> wells(WellBigDecimal well,
                                                  java.math.BigDecimal[] array,
                                                  int begin,
                                                  int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellBigDecimal - the well

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

wells

public java.util.List<java.math.BigDecimal> wells(WellBigDecimal well,
                                                  java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellBigDecimal - the well

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

wells

public java.util.List<java.math.BigDecimal> wells(WellBigDecimal well,
                                                  java.util.Collection<java.math.BigDecimal> collection,
                                                  int begin,
                                                  int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellBigDecimal - the well

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

wellsStrict

public java.util.List<java.math.BigDecimal> wellsStrict(WellBigDecimal well,
                                                        java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellBigDecimal - the well

BigDecimal[] - array for the operation

Returns:

result of the operation

wellsStrict

public java.util.List<java.math.BigDecimal> wellsStrict(WellBigDecimal well,
                                                        java.math.BigDecimal[] array,
                                                        int begin,
                                                        int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellBigDecimal - the well

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

wellsStrict

public java.util.List<java.math.BigDecimal> wellsStrict(WellBigDecimal well,
                                                        java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellBigDecimal - the well

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

wellsStrict

public java.util.List<java.math.BigDecimal> wellsStrict(WellBigDecimal well,
                                                        java.util.Collection<java.math.BigDecimal> collection,
                                                        int begin,
                                                        int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellBigDecimal - the well

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

plates

public PlateBigDecimal plates(PlateBigDecimal plate1,
                              PlateBigDecimal plate2)

Returns the result of the mathematical operation. Missing data points due
 to unequal data set lengths are treated as zero values.

Parameters:

PlateBigDecimal - the first plate

PlateBigDecimal - the second plate

Returns:

result of the operation

plates

public PlateBigDecimal plates(PlateBigDecimal plate1,
                              PlateBigDecimal plate2,
                              int begin,
                              int length)

Returns the result of the mathematical operation using the values between
 the indices. Missing data points due to data sets of unequal length are
 treated as zero values.

Parameters:

PlateBigDecimal - the first plate

PlateBigDecimal - the second plate

int - beginning index of the subset

int - length of the subset

Returns:

result of the operation

platesStrict

public PlateBigDecimal platesStrict(PlateBigDecimal plate1,
                                    PlateBigDecimal plate2)

Returns the result of the mathematical operation. Missing data points due
 to unequal data set lengths are omitted.

Parameters:

PlateBigDecimal - the first plate

PlateBigDecimal - the second plate

Returns:

result of the operation

platesStrict

public PlateBigDecimal platesStrict(PlateBigDecimal plate1,
                                    PlateBigDecimal plate2,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation using the values between
 the indices. Missing data points due to unequal data set lengths are omitted.

Parameters:

PlateBigDecimal - the first plate

PlateBigDecimal - the second plate

int - beginning index of the subset

int - length of the subset

Returns:

result of the operation

plates

public PlateBigDecimal plates(PlateBigDecimal plate,
                              java.math.BigDecimal constant)

Returns the result of the mathematical operation.

Parameters:

PlateBigDecimal - the plate

BigDecimal - constant for operation

Returns:

result of the operation

plates

public PlateBigDecimal plates(PlateBigDecimal plate,
                              java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

PlateBigDecimal - the plate

BigDecimal[] - array for the operation

Returns:

result of the operation

plates

public PlateBigDecimal plates(PlateBigDecimal plate,
                              java.math.BigDecimal[] array,
                              int begin,
                              int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

PlateBigDecimal - the plate

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

plates

public PlateBigDecimal plates(PlateBigDecimal plate,
                              java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

PlateBigDecimal - the plate

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

plates

public PlateBigDecimal plates(PlateBigDecimal plate,
                              java.util.Collection<java.math.BigDecimal> collection,
                              int begin,
                              int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

PlateBigDecimal - the plate

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

platesStrict

public PlateBigDecimal platesStrict(PlateBigDecimal plate,
                                    java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

PlateBigDecimal - the plate

BigDecimal[] - array for the operation

Returns:

result of the operation

platesStrict

public PlateBigDecimal platesStrict(PlateBigDecimal plate,
                                    java.math.BigDecimal[] array,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

PlateBigDecimal - the plate

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

platesStrict

public PlateBigDecimal platesStrict(PlateBigDecimal plate,
                                    java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

PlateBigDecimal - the plate

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

platesStrict

public PlateBigDecimal platesStrict(PlateBigDecimal plate,
                                    java.util.Collection<java.math.BigDecimal> collection,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

PlateBigDecimal - the plate

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

sets

public WellSetBigDecimal sets(WellSetBigDecimal set1,
                              WellSetBigDecimal set2)

Returns the result of the mathematical operation. Missing data points due
 to unequal data set lengths are treated as zero values.

Parameters:

WellSetBigDecimal - the first set

WellSetBigDecimal - the second set

Returns:

result of the operation

sets

public WellSetBigDecimal sets(WellSetBigDecimal set1,
                              WellSetBigDecimal set2,
                              int begin,
                              int length)

Returns the result of the mathematical operation using the values between
 the indices. Missing data points due to data sets of unequal length are
 treated as zero values.

Parameters:

WellSetBigDecimal - the first set

WellSetBigDecimal - the second set

int - beginning index of the subset

int - length of the subset

Returns:

result of the operation

setsStrict

public WellSetBigDecimal setsStrict(WellSetBigDecimal set1,
                                    WellSetBigDecimal set2)

Returns the result of the mathematical operation. Missing data points due
 to unequal data set lengths are omitted.

Parameters:

WellSetBigDecimal - the first set

WellSetBigDecimal - the second set

Returns:

result of the operation

setsStrict

public WellSetBigDecimal setsStrict(WellSetBigDecimal set1,
                                    WellSetBigDecimal set2,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation using the values between
 the indices. Missing data points due to unequal data set lengths are omitted.

Parameters:

WellSetBigDecimal - the first set

WellSetBigDecimal - the second set

int - beginning index of the subset

int - length of the subset

Returns:

result of the operation

sets

public WellSetBigDecimal sets(WellSetBigDecimal set,
                              java.math.BigDecimal constant)

Returns the result of the mathematical operation.

Parameters:

WellSetBigDecimal - the well set

BigDecimal - constant for operation

Returns:

result of the operation

sets

public WellSetBigDecimal sets(WellSetBigDecimal set,
                              java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellSetBigDecimal - the well set

BigDecimal[] - array for the operation

Returns:

result of the operation

sets

public WellSetBigDecimal sets(WellSetBigDecimal set,
                              java.math.BigDecimal[] array,
                              int begin,
                              int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellSetBigDecimal - the well set

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

sets

public WellSetBigDecimal sets(WellSetBigDecimal set,
                              java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellSetBigDecimal - the well set

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

sets

public WellSetBigDecimal sets(WellSetBigDecimal set,
                              java.util.Collection<java.math.BigDecimal> collection,
                              int begin,
                              int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are treated as zeroes.

Parameters:

WellSetBigDecimal - the well set

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

setsStrict

public WellSetBigDecimal setsStrict(WellSetBigDecimal set,
                                    java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellSetBigDecimal - the well set

BigDecimal[] - array for the operation

Returns:

result of the operation

setsStrict

public WellSetBigDecimal setsStrict(WellSetBigDecimal set,
                                    java.math.BigDecimal[] array,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellSetBigDecimal - the well set

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

setsStrict

public WellSetBigDecimal setsStrict(WellSetBigDecimal set,
                                    java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellSetBigDecimal - the well set

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

setsStrict

public WellSetBigDecimal setsStrict(WellSetBigDecimal set,
                                    java.util.Collection<java.math.BigDecimal> collection,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data set lengths are omitted.

Parameters:

WellSetBigDecimal - the well set

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

stacks

public StackBigDecimal stacks(StackBigDecimal stack1,
                              StackBigDecimal stack2)

Returns the result of the mathematical operation. Missing data points due
 to data sets of unequal length are treated as zero values.

Parameters:

StackBigDecimal - the first stack

StackBigDecimal - the second stack

Returns:

the result of the operation

stacks

public StackBigDecimal stacks(StackBigDecimal stack1,
                              StackBigDecimal stack2,
                              int begin,
                              int length)

Returns the result of the mathematical operation using the values between
 the indices. Missing data points due to data sets of unequal length are
 treated as zero values.

Parameters:

StackBigDecimal - the first stack

StackBigDecimal - the second stack

int - beginning index of the subset

int - length of the subset

Returns:

the result of the addition

stacksStrict

public StackBigDecimal stacksStrict(StackBigDecimal stack1,
                                    StackBigDecimal stack2)

Returns the result of the mathematical operation. Missing data points due
 to data sets of unequal length are omitted.

Parameters:

StackBigDecimal - the first stack

StackBigDecimal - the second stack

Returns:

the result of the operation

stacksStrict

public StackBigDecimal stacksStrict(StackBigDecimal stack1,
                                    StackBigDecimal stack2,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation using the values between
 the indices. Missing data points due to data sets of unequal length are
 omitted.

Parameters:

StackBigDecimal - the first stack

StackBigDecimal - the second stack

int - beginning index of the subset

int - length of the subset

Returns:

the result of the addition

stacks

public StackBigDecimal stacks(StackBigDecimal stack,
                              java.math.BigDecimal constant)

Returns the result of the mathematical operation.

Parameters:

StackBigDecimal - the stack

BigDecimal - constant for operation

Returns:

result of the operation

stacks

public StackBigDecimal stacks(StackBigDecimal stack,
                              java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are treated as zeroes.

Parameters:

StackBigDecimal - the stack

BigDecimal[] - array for the operation

Returns:

result of the operation

stacks

public StackBigDecimal stacks(StackBigDecimal stack,
                              java.math.BigDecimal[] array,
                              int begin,
                              int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are treated as zeroes.

Parameters:

StackBigDecimal - the stack

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

stacks

public StackBigDecimal stacks(StackBigDecimal stack,
                              java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are treated as zeroes.

Parameters:

StackBigDecimal - the stack

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

stacks

public StackBigDecimal stacks(StackBigDecimal stack,
                              java.util.Collection<java.math.BigDecimal> collection,
                              int begin,
                              int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are treated as zeroes.

Parameters:

StackBigDecimal - the stack

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

stacksStrict

public StackBigDecimal stacksStrict(StackBigDecimal stack,
                                    java.math.BigDecimal[] array)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are omitted.

Parameters:

StackBigDecimal - the stack

BigDecimal[] - array for the operation

Returns:

result of the operation

stacksStrict

public StackBigDecimal stacksStrict(StackBigDecimal stack,
                                    java.math.BigDecimal[] array,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are omitted.

Parameters:

StackBigDecimal - the stack

BigDecimal[] - array for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

stacksStrict

public StackBigDecimal stacksStrict(StackBigDecimal stack,
                                    java.util.Collection<java.math.BigDecimal> collection)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are omitted.

Parameters:

StackBigDecimal - the stack

Collection<BigDecimal> - collection for the operation

Returns:

result of the operation

stacksStrict

public StackBigDecimal stacksStrict(StackBigDecimal stack,
                                    java.util.Collection<java.math.BigDecimal> collection,
                                    int begin,
                                    int length)

Returns the result of the mathematical operation. Missing data points due
 to uneven data stack lengths are omitted.

Parameters:

StackBigDecimal - the stack

Collection<BigDecimal> - collection for the operation

int - beginning index of subset

int - length of the subset

Returns:

result of the operation

calculate

public abstract java.util.List<java.math.BigDecimal> calculate(java.util.List<java.math.BigDecimal> list1,
                                                               java.util.List<java.math.BigDecimal> list2)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are treated as zero values.

Parameters:

List<BigDecimal> - the first list

List<BigDecimal> - the second list

Returns:

result of the mathematical operation

calculateStrict

public abstract java.util.List<java.math.BigDecimal> calculateStrict(java.util.List<java.math.BigDecimal> list1,
                                                                     java.util.List<java.math.BigDecimal> list2)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are omitted.

Parameters:

List<BigDecimal> - the first list

List<BigDecimal> - the second list

Returns:

result of the mathematical operation

calculate

public abstract java.util.List<java.math.BigDecimal> calculate(java.util.List<java.math.BigDecimal> list1,
                                                               java.util.List<java.math.BigDecimal> list2,
                                                               int begin,
                                                               int length)

Performs the mathematical operation for the two lists using the values
 between the indices. Missing data points due to data sets of unequal
 length are treated as zero values.

Parameters:

List<BigDecimal> - the first list

List<BigDecimal> - the second list

int - the beginning index of the subset

int - the length of the subset

Returns:

result of the mathematical operation

calculateStrict

public abstract java.util.List<java.math.BigDecimal> calculateStrict(java.util.List<java.math.BigDecimal> list1,
                                                                     java.util.List<java.math.BigDecimal> list2,
                                                                     int begin,
                                                                     int length)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are omitted.

Parameters:

List<BigDecimal> - the first list

List<BigDecimal> - the second list

int - the beginning index of the subset

int - the length of the subset

Returns:

result of the mathematical operation

calculate

public abstract java.util.List<java.math.BigDecimal> calculate(java.util.List<java.math.BigDecimal> list,
                                                               java.math.BigDecimal constant)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are treated as zero values.

Parameters:

List<BigDecimal> - the first list

BigDecimal - the constant value

Returns:

result of the mathematical operation

calculate

public abstract java.util.List<java.math.BigDecimal> calculate(java.util.List<java.math.BigDecimal> list,
                                                               java.math.BigDecimal[] array)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are treated as zero values.

Parameters:

List<BigDecimal> - the first list

BigDecimal[] - the array values

Returns:

result of the mathematical operation

calculate

public abstract java.util.List<java.math.BigDecimal> calculate(java.util.List<java.math.BigDecimal> list,
                                                               java.math.BigDecimal[] array,
                                                               int begin,
                                                               int length)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are treated as zero values.

Parameters:

List<BigDecimal> - the first list

BigDecimal[] - the array values

int - beginning index of the subset

int - length of the subset

Returns:

result of the mathematical operation

calculate

public abstract java.util.List<java.math.BigDecimal> calculate(java.util.List<java.math.BigDecimal> list,
                                                               java.util.Collection<java.math.BigDecimal> collection)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are treated as zero values.

Parameters:

List<BigDecimal> - the first list

Collection<BigDecimal> - the array values

Returns:

result of the mathematical operation

calculate

public abstract java.util.List<java.math.BigDecimal> calculate(java.util.List<java.math.BigDecimal> list,
                                                               java.util.Collection<java.math.BigDecimal> collection,
                                                               int begin,
                                                               int length)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are treated as zero values.

Parameters:

List<BigDecimal> - the first list

Collection<BigDecimal> - the array values

int - beginning index of the subset

int - length of the subset

Returns:

result of the mathematical operation

calculateStrict

public abstract java.util.List<java.math.BigDecimal> calculateStrict(java.util.List<java.math.BigDecimal> list,
                                                                     java.math.BigDecimal[] array)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are omitted.

Parameters:

List<BigDecimal> - the first list

BigDecimal[] - the array values

Returns:

result of the mathematical operation

calculateStrict

public abstract java.util.List<java.math.BigDecimal> calculateStrict(java.util.List<java.math.BigDecimal> list,
                                                                     java.math.BigDecimal[] array,
                                                                     int begin,
                                                                     int length)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are omitted.

Parameters:

List<BigDecimal> - the first list

BigDecimal[] - the array values

int - beginning index of the subset

int - length of the subset

Returns:

result of the mathematical operation

calculateStrict

public abstract java.util.List<java.math.BigDecimal> calculateStrict(java.util.List<java.math.BigDecimal> list,
                                                                     java.util.Collection<java.math.BigDecimal> collection)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are omitted.

Parameters:

List<BigDecimal> - the first list

Collection<BigDecimal> - the array values

Returns:

result of the mathematical operation

calculateStrict

public abstract java.util.List<java.math.BigDecimal> calculateStrict(java.util.List<java.math.BigDecimal> list,
                                                                     java.util.Collection<java.math.BigDecimal> collection,
                                                                     int begin,
                                                                     int length)

Performs the mathematical operation for the two lists. Missing data points
 due to data sets of unequal length are omitted.

Parameters:

List<BigDecimal> - the first list

Collection<BigDecimal> - the array values

int - beginning index of the subset

int - length of the subset

Returns:

result of the mathematical operation

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
import Adapter from "./Source/Adapter"
import Repository from "./Source/Repository"

/* ----------------------------------------------------------------------------
 * Module
 * ------------------------------------------------------------------------- */

export default {
  Adapter,
  Repository
}

redpajama_set_name: RedPajamaGithub


text:
<?php namespace kamermans\GuzzleOAuth2\Signer\AccessToken;

use GuzzleHttp\Message\RequestInterface;

class BasicAuth implements SignerInterface
{

	public function sign(RequestInterface $request, $accessToken)
	{
		$request->setHeader('Authorization', 'Bearer ' . $accessToken);
	}

}


text:
"""Local Nest authentication."""
import asyncio
from functools import partial

from nest.nest import AUTHORIZE_URL, AuthorizationError, NestAuth

from homeassistant.core import callback

from . import config_flow
from .const import DOMAIN

@callback
def initialize(hass, client_id, client_secret):
    """Initialize a local auth provider."""
    config_flow.register_flow_implementation(
        hass,
        DOMAIN,
        "configuration.yaml",
        partial(generate_auth_url, client_id),
        partial(resolve_auth_code, hass, client_id, client_secret),
    )

async def generate_auth_url(client_id, flow_id):
    """Generate an authorize url."""
    return AUTHORIZE_URL.format(client_id, flow_id)

async def resolve_auth_code(hass, client_id, client_secret, code):
    """Resolve an authorization code."""

    result = asyncio.Future()
    auth = NestAuth(
        client_id=client_id,
        client_secret=client_secret,
        auth_callback=result.set_result,
    )
    auth.pin = code

    try:
        await hass.async_add_job(auth.login)
        return await result
    except AuthorizationError as err:
        if err.response.status_code == 401:
            raise config_flow.CodeInvalid()
        raise config_flow.NestAuthError(
            f"Unknown error: {err} ({err.response.status_code})"
        )


text:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Inserter</title>
<link rel="stylesheet" href="../style.css" type="text/css" />

Prev Next | Back Along | Up Home | Full TOC
Front Page / Algorithms / Concepts / Inserter

Inserter

Description

An Inserter is a compile-time substitute for STL Output Iterator.
Under the hood, it's simply a type holding
two entities: a state and an operation. When passed to a
transformation algorithm, the inserter's binary operation is
invoked for every element that would normally be written into the
output iterator, with the element itself (as the second
argument) and the result of the previous operation's invocation — or,
for the very first element, the inserter's initial state.

Technically, instead of taking a single inserter parameter,
transformation algorithms could accept the state and the "output"
operation separately. Grouping these in a single parameter entity,
however, brings the algorithms semantically and syntactically closer to
their STL counterparts, significantly simplifying many of the common
use cases.

Valid expressions

In the following table and subsequent specifications, <tt class="literal">in</tt> is a model of Inserter.

<colgroup>
<col width="43%" />
<col width="57%" />
</colgroup>

Expression
Type

<tt class="literal">in::state</tt>
Any type

<tt class="literal">in::operation</tt>
Binary Lambda Expression

Expression semantics

<colgroup>
<col width="35%" />
<col width="65%" />
</colgroup>

Expression
Semantics

<tt class="literal">in::state</tt>
The inserter's initial state.

<tt class="literal">in::operation</tt>
The inserter's "output" operation.

Example

typedef transform<
      range_c<int,0,10>
    , plus<_1,_1>
    , back_inserter< vector0<> >
    >::type result;

Models

inserter (class)

front_inserter

back_inserter

See also

Algorithms, Transformation Algorithms, inserter (class), front_inserter, back_inserter

Prev Next | Back Along | Up Home | Full TOC

Copyright ©  2001-2009 Aleksey Gurtovoy and David Abrahams

Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
<!DOCTYPE html>

	<title>Double Calendar</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>


text:
\documentclass[c]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsfonts}
%\usepackage{fourier}
\usepackage{wasysym}
\usetheme{Warsaw}

\title{Projet Grand Prix}
\author{Hicham Benjelloun}
\institute{ENSICAEN}
\date{14 juin 2013}

\begin{document}

\logo{\includegraphics[height=15mm]{logo.jpg}}

\begin{frame}
\transdissolve[duration=1]
\titlepage
\end{frame}

\begin{frame}
\transdissolve[duration=1]
  \tableofcontents
\end{frame}

\begin{frame}[label=objectifs]
\transdissolve[duration=1]
\frametitle{Objectifs de base}
\section{Objectifs de base}
Réaliser un pilote :

\begin{enumerate}
\item Qui termine tout type de carte.
\item Qui termine une carte en un nombre quasi optimal de coups.
\item Qui soit robuste.
\end{enumerate}
\end{frame}

\begin{frame}[label=structures]
\transdissolve[duration=1]
\frametitle{Structures de données utilisées}
\section{Structures de données utilisées}
Graphe des états possibles = Tableau 4D de sommets
\end{frame}

\begin{frame}[label=structures1]
\transdissolve[duration=1]
\frametitle{Graphe des états possibles}
\subsection{Graphe des états possibles}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/g001.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=structures2]
\transdissolve[duration=1]
\frametitle{Graphe des états possibles}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/g002.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=structures3]
\transdissolve[duration=1]
\frametitle{Graphe des états possibles}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/g003.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=structures4]
\transdissolve[duration=1]
\frametitle{Graphe des états possibles}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/g004.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=structures5]
\transdissolve[duration=1]
\frametitle{Graphe des états possibles}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/g005.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=structures5]
\transdissolve[duration=1]
\frametitle{Graphe des états possibles}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/g006.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=strategie]
\transdissolve[duration=1]
\frametitle{Stratégie de course}
\section{Stratégie de course}
Calcul du chemin optimal et mise à jour dynamique.
\end{frame}

\begin{frame}[label=strategie1]
\transdissolve[duration=1]
\frametitle{Stratégie de course}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/diag3.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=strategie2]
\transdissolve[duration=1]
\frametitle{Stratégie de course}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/diag4.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=strategie3]
\transdissolve[duration=1]
\frametitle{Stratégie de course}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/diag5.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=strategie4]
\transdissolve[duration=1]
\frametitle{Stratégie de course}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/diag6.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=strategie5]
\transdissolve[duration=1]
\frametitle{Stratégie de course}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/diag7.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=strategie6]
\transdissolve[duration=1]
\frametitle{Stratégie de course}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.3]{fig/diag8.pdf}
\end{figure}
\end{frame}

\begin{frame}[label=strategie7]
\frametitle{Stratégie de course}
\begin{figure}[!h]
\centering
\includegraphics[scale=0.18]{fig/crash.jpg}
\end{figure}
\end{frame}

\begin{frame}[label=resultats]
\transdissolve[duration=1]
\frametitle{Quelques résultats}
\begin{tabular}{|c|c|c|c|}
  \hline
  Carte/Pilote& GPDriverOne & GPDriverTwo & Mon pilote \\
  \hline
  Droit au but &13 & 9 & 6 \\
  Virages &112 & 75 & 39 \\
  Virages et sable & 430 & 354& 41\\
  Serpent & 257 & 77& 33\\
  \hline
\end{tabular}
\end{frame}

\end{document}


text:
package extended

import "jvmgo/ch09/instructions/base"
import "jvmgo/ch09/rtda"

// Branch if reference is null
type IFNULL struct{ base.BranchInstruction }

func (self *IFNULL) Execute(frame *rtda.Frame) {
	ref := frame.OperandStack().PopRef()
	if ref == nil {
		base.Branch(frame, self.Offset)
	}
}

// Branch if reference not null
type IFNONNULL struct{ base.BranchInstruction }

func (self *IFNONNULL) Execute(frame *rtda.Frame) {
	ref := frame.OperandStack().PopRef()
	if ref != nil {
		base.Branch(frame, self.Offset)
	}
}


text:
package com.opengamma.core.marketdatasnapshot;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotEquals;
import static org.testng.Assert.assertNotNull;

import org.testng.annotations.Test;

import com.opengamma.util.money.Currency;
import com.opengamma.util.test.AbstractFudgeBuilderTestCase;
import com.opengamma.util.test.TestGroup;

/**
 * Tests for {@link YieldCurveKey}.
 */
@Test(groups = TestGroup.UNIT)
public class YieldCurveKeyTest extends AbstractFudgeBuilderTestCase {
  private static final Currency CCY = Currency.AUD;
  private static final String NAME = "FOO";

  /**
   * Tests the hashCode method.
   */
  @Test
  public void testHashCode() {
    assertEquals(YieldCurveKey.of(CCY, NAME).hashCode(), YieldCurveKey.of(CCY, NAME).hashCode());
  }

  /**
   * Tests the equals method.
   */
  @Test
  public void testEquals() {
    final YieldCurveKey key = YieldCurveKey.of(CCY, NAME);
    assertEquals(key, key);
    assertNotEquals(null, key);
    assertNotEquals(key, NAME);
    YieldCurveKey other = YieldCurveKey.of(Currency.of("AUD"), "FOO");
    assertEquals(key, other);
    other = YieldCurveKey.of(Currency.BRL, NAME);
    assertNotEquals(key, other);
    other = YieldCurveKey.of(Currency.AUD, "BAR");
    assertNotEquals(key, other);
  }

  /**
   * Tests the compareTo method.
   */
  @Test
  public void testCompareTo() {
    final YieldCurveKey key = YieldCurveKey.of(CCY, NAME);
    assertEquals(key.compareTo(YieldCurveKey.of(CCY, NAME)), 0);
    assertNotEquals(key.compareTo(YieldCurveKey.of(Currency.of("AAA"), NAME)), 0);
    assertNotEquals(key.compareTo(YieldCurveKey.of(Currency.of("ZZZ"), NAME)), 0);
    assertNotEquals(key.compareTo(YieldCurveKey.of(CCY, "z" + NAME)), 0);
    assertNotEquals(key.compareTo(YieldCurveKey.of(CCY, "a" + NAME)), 0);
  }

  /**
   * Tests the visitor.
   */
  @Test
  public void testVisitor() {
    final YieldCurveKey key = YieldCurveKey.of(CCY, NAME);
    assertEquals(key.accept(TestKeyVisitor.INSTANCE), "YieldCurveKey");
  }

  /**
   * Tests a message cycle.
   */
  @Test
  public void testCycle() {
    assertEncodeDecodeCycle(YieldCurveKey.class, YieldCurveKey.of(CCY, NAME));
  }

  /**
   * Tests the bean.
   */
  @Test
  public void testBean() {
    final YieldCurveKey key = YieldCurveKey.of(CCY, NAME);
    assertNotNull(key.metaBean());
    assertNotNull(key.metaBean().currency());
    assertNotNull(key.metaBean().name());
    assertEquals(key.metaBean().currency().get(key), CCY);
    assertEquals(key.metaBean().name().get(key), NAME);
    assertEquals(key.property("currency").get(), CCY);
    assertEquals(key.property("name").get(), NAME);
  }

}


text:
namespace GrafeasV1.Snippets
{
    // [START containeranalysis_v1_generated_Grafeas_CreateNote_async_flattened_resourceNames]
    using Grafeas.V1;
    using System.Threading.Tasks;

    public sealed partial class GeneratedGrafeasClientSnippets
    {
        /// <summary>Snippet for CreateNoteAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreateNoteResourceNamesAsync()
        {
            string endpoint = "";
            // Create client
            GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
            // Initialize request argument(s)
            ProjectName parent = ProjectName.FromProject("[PROJECT]");
            string noteId = "";
            Note note = new Note();
            // Make the request
            Note response = await grafeasClient.CreateNoteAsync(parent, noteId, note);
        }
    }
    // [END containeranalysis_v1_generated_Grafeas_CreateNote_async_flattened_resourceNames]
}


text:
<?php

namespace Silver\init;

class Silver
{

    public function run()
    {
        $result = Image::pull();
        if (!$result) {
            throw new Exception('Download error...');
        }
    }

}


text:
function rank_lists_by_length()
    local ranker_key = "__tmp__.hot_redis.rank_lists_by_length." .. KEYS[1]
    for _, key in pairs(KEYS) do
        redis.call('ZADD',
            ranker_key,
            redis.call('LLEN', key),
            key)
    end
    local result = redis.call('ZREVRANGE', ranker_key, ARGV[1], ARGV[2],
        'WITHSCORES')
    redis.call('DEL', ranker_key)
    return result
end

function rank_sets_by_cardinality()
    local ranker_key = "__tmp__.hot_redis.rank_sets_by_cardinality." .. KEYS[1]
    for _, key in pairs(KEYS) do
        redis.call('ZADD',
            ranker_key,
            redis.call('SCARD', key),
            key)
    end
    local result = redis.call('ZREVRANGE', ranker_key, ARGV[1], ARGV[2],
        'WITHSCORES')
    redis.call('DEL', ranker_key)
    return result
end


text:
using dnlib.IO;

namespace dnlib.PE {
	/// <summary>
	/// Interface for PE optional header classes
	/// </summary>
	public interface IImageOptionalHeader : IFileSection {
		/// <summary>
		/// Returns the Magic field
		/// </summary>
		ushort Magic { get; }

		/// <summary>
		/// Returns the MajorLinkerVersion field
		/// </summary>
		byte MajorLinkerVersion { get; }

		/// <summary>
		/// Returns the MinorLinkerVersion field
		/// </summary>
		byte MinorLinkerVersion { get; }

		/// <summary>
		/// Returns the SizeOfCode field
		/// </summary>
		uint SizeOfCode { get; }

		/// <summary>
		/// Returns the SizeOfInitializedData field
		/// </summary>
		uint SizeOfInitializedData { get; }

		/// <summary>
		/// Returns the SizeOfUninitializedData field
		/// </summary>
		uint SizeOfUninitializedData { get; }

		/// <summary>
		/// Returns the AddressOfEntryPoint field
		/// </summary>
		RVA AddressOfEntryPoint { get; }

		/// <summary>
		/// Returns the BaseOfCode field
		/// </summary>
		RVA BaseOfCode { get; }

		/// <summary>
		/// Returns the BaseOfData field
		/// </summary>
		RVA BaseOfData { get; }

		/// <summary>
		/// Returns the ImageBase field
		/// </summary>
		ulong ImageBase { get; }

		/// <summary>
		/// Returns the SectionAlignment field
		/// </summary>
		uint SectionAlignment { get; }

		/// <summary>
		/// Returns the FileAlignment field
		/// </summary>
		uint FileAlignment { get; }

		/// <summary>
		/// Returns the MajorOperatingSystemVersion field
		/// </summary>
		ushort MajorOperatingSystemVersion { get; }

		/// <summary>
		/// Returns the MinorOperatingSystemVersion field
		/// </summary>
		ushort MinorOperatingSystemVersion { get; }

		/// <summary>
		/// Returns the MajorImageVersion field
		/// </summary>
		ushort MajorImageVersion { get; }

		/// <summary>
		/// Returns the MinorImageVersion field
		/// </summary>
		ushort MinorImageVersion { get; }

		/// <summary>
		/// Returns the MajorSubsystemVersion field
		/// </summary>
		ushort MajorSubsystemVersion { get; }

		/// <summary>
		/// Returns the MinorSubsystemVersion field
		/// </summary>
		ushort MinorSubsystemVersion { get; }

		/// <summary>
		/// Returns the Win32VersionValue field
		/// </summary>
		uint Win32VersionValue { get; }

		/// <summary>
		/// Returns the SizeOfImage field
		/// </summary>
		uint SizeOfImage { get; }

		/// <summary>
		/// Returns the SizeOfHeaders field
		/// </summary>
		uint SizeOfHeaders { get; }

		/// <summary>
		/// Returns the CheckSum field
		/// </summary>
		uint CheckSum { get; }

		/// <summary>
		/// Returns the Subsystem field
		/// </summary>
		Subsystem Subsystem { get; }

		/// <summary>
		/// Returns the DllCharacteristics field
		/// </summary>
		DllCharacteristics DllCharacteristics { get; }

		/// <summary>
		/// Returns the SizeOfStackReserve field
		/// </summary>
		ulong SizeOfStackReserve { get; }

		/// <summary>
		/// Returns the SizeOfStackCommit field
		/// </summary>
		ulong SizeOfStackCommit { get; }

		/// <summary>
		/// Returns the SizeOfHeapReserve field
		/// </summary>
		ulong SizeOfHeapReserve { get; }

		/// <summary>
		/// Returns the SizeOfHeapCommit field
		/// </summary>
		ulong SizeOfHeapCommit { get; }

		/// <summary>
		/// Returns the LoaderFlags field
		/// </summary>
		uint LoaderFlags { get; }

		/// <summary>
		/// Returns the NumberOfRvaAndSizes field
		/// </summary>
		uint NumberOfRvaAndSizes { get; }

		/// <summary>
		/// Returns the DataDirectories field. This array contains exactly 16 elements.
		/// </summary>
		ImageDataDirectory[] DataDirectories { get; }
	}
}


text:
package org.kuali.kfs.gl.batch;

import java.util.Date;
import java.util.Iterator;
import java.util.List;

import org.kuali.kfs.coa.service.ChartService;
import org.kuali.kfs.gl.service.CollectorDetailService;
import org.kuali.kfs.sys.KFSConstants;
import org.kuali.kfs.sys.batch.AbstractStep;

/**
 * A step to purge old collector details from the database.
 */
public class PurgeCollectorDetailStep extends AbstractStep {
    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(PurgeCollectorDetailStep.class);
    private ChartService chartService;
    private CollectorDetailService collectorDetailService;

    /**
     * This step will purge data from the gl_id_bill_t table older than a specified year. It purges the data one chart at a time
     * each within their own transaction so database transaction logs don't get completely filled up when doing this. This step
     * class should NOT be transactional.
     *
     * @param jobName the name of the job this step is being run as part of
     * @param jobRunDate the time/date the job was started
     * @return true if the job completed successfully, false if otherwise
     * @see org.kuali.kfs.sys.batch.Step#execute(String, Date)
     */
    public boolean execute(String jobName, Date jobRunDate) {
        String yearStr = getParameterService().getParameterValueAsString(getClass(), KFSConstants.SystemGroupParameterNames.PURGE_GL_ID_BILL_T_BEFORE_YEAR);
        LOG.info("PurgeCollectorDetailStep was run with year = "+yearStr);
        int year = Integer.parseInt(yearStr);
        List charts = chartService.getAllChartCodes();
        for (Iterator iter = charts.iterator(); iter.hasNext();) {
            String chart = (String) iter.next();
            collectorDetailService.purgeYearByChart(chart, year);
        }
        return true;
    }

    /**
     * Sets the chartService attribute, allowing the injection of an implementation of the service.
     *
     * @param chartService the chartService implementation to set
     * @see org.kuali.kfs.coa.service.ChartService
     */
    public void setChartService(ChartService chartService) {
        this.chartService = chartService;
    }

    /**
     * Sets the collectorDetailService attribute, allowing the injection of an implementation of the service.
     *
     * @param collectorDetailService the collectorDetailService implementation to set
     * @see org.kuali.kfs.gl.service.CollectorDetailService
     */
    public void setCollectorDetailService(CollectorDetailService collectorDetailService) {
        this.collectorDetailService = collectorDetailService;
    }
}


text:
using UnityEngine;
using System.Collections;

public class NetworkBall : MonoBehaviour {

	private float lastSynchronizationTime = 0f;
	private float syncDelay = 0f;
	private float syncTime = 0f;
	private Vector3 syncStartPosition = Vector3.zero;
	private Vector3 syncEndPosition = Vector3.zero;
    private Quaternion rotation = Quaternion.identity;

    void Update(){

	    if (GetComponent<NetworkView>().isMine){
        	//Do nothing
    	}
    	else{
        	SyncedMovement();
    	}
    }

 	void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info){
	    Vector3 syncPosition = Vector3.zero;
  	    Vector3 syncVelocity = Vector3.zero;
  	    Quaternion syncRotation = Quaternion.identity;

    	if (stream.isWriting){
        	syncPosition = GetComponent<Rigidbody>().position;
        	stream.Serialize(ref syncPosition);

        	syncVelocity = GetComponent<Rigidbody>().velocity;
        	stream.Serialize(ref syncVelocity);

        	syncRotation = transform.rotation;
        	stream.Serialize(ref syncRotation);
    	}
    	else{
        	stream.Serialize(ref syncPosition);
        	stream.Serialize(ref syncVelocity);
        	stream.Serialize(ref syncRotation);

  	        syncTime = 0f;
            syncDelay = Time.time - lastSynchronizationTime;
            lastSynchronizationTime = Time.time;

            syncEndPosition = syncPosition + syncVelocity * syncDelay;
            syncStartPosition = GetComponent<Rigidbody>().position;

            rotation = syncRotation;
    	}
	}

	private void SyncedMovement(){
	    syncTime += Time.deltaTime;
	    GetComponent<Rigidbody>().position = Vector3.Lerp(syncStartPosition, syncEndPosition, syncTime / syncDelay);
	    transform.rotation = Quaternion.Lerp(transform.rotation, rotation, syncTime / syncDelay);
	}

}


text:
import OrangeNavbar from '../../src/orange-navbar'
import { clearFixture, getFixture, createEvent, jQueryMock } from '../helpers/fixture'

describe('OrangeNavbar', () => {
  let fixtureEl

  beforeAll(() => {
    fixtureEl = getFixture()
  })

  afterEach(() => {
    clearFixture()
  })

  describe('VERSION', () => {
    it('should return plugin version', () => {
      expect(OrangeNavbar.VERSION).toEqual(jasmine.any(String))
    })
  })

  describe('Default', () => {
    it('should return plugin default config', () => {
      expect(OrangeNavbar.Default).toEqual(jasmine.any(Object))
    })
  })

  describe('DefaultType', () => {
    it('should return plugin default type config', () => {
      expect(OrangeNavbar.DefaultType).toEqual(jasmine.any(Object))
    })
  })

  describe('DATA_KEY', () => {
    it('should return plugin data key', () => {
      expect(OrangeNavbar.DATA_KEY).toEqual('bs.orangenavbar')
    })
  })

  describe('jQueryInterface', () => {
    it('should create an orange navbar', () => {
      fixtureEl.innerHTML = '

'

      const div = fixtureEl.querySelector('div')

      jQueryMock.fn.orangenavbar = OrangeNavbar.jQueryInterface
      jQueryMock.elements = [div]

      jQueryMock.fn.orangenavbar.call(jQueryMock)

      expect(OrangeNavbar.getInstance(div)).not.toBeNull()
    })

    it('should not re create an orange navbar', () => {
      fixtureEl.innerHTML = '

'

      const div = fixtureEl.querySelector('div')
      const orangenavbar = new OrangeNavbar(div)

      jQueryMock.fn.orangenavbar = OrangeNavbar.jQueryInterface
      jQueryMock.elements = [div]

      jQueryMock.fn.orangenavbar.call(jQueryMock)

      expect(OrangeNavbar.getInstance(div)).toEqual(orangenavbar)
    })

    it('should throw error on undefined method', () => {
      fixtureEl.innerHTML = '

'

      const div = fixtureEl.querySelector('div')
      const action = 'undefinedMethod'

      jQueryMock.fn.orangenavbar = OrangeNavbar.jQueryInterface
      jQueryMock.elements = [div]

      expect(() => {
        jQueryMock.fn.orangenavbar.call(jQueryMock, action)
      }).toThrowError(TypeError, `No method named "${action}"`)
    })
  })

  it('should call enableMinimizing when the page finish loading', () => {
    fixtureEl.innerHTML = [
      ''
    ].join('')

    const loadEvent = createEvent('load')
    const spy = spyOn(OrangeNavbar, 'enableMinimizing')

    window.dispatchEvent(loadEvent)

    expect(spy).toHaveBeenCalled()
  })

  it('should call enableMinimizing when there is a scroll on the page', () => {
    fixtureEl.innerHTML = [
      ''
    ].join('')

    const scrollEvent = createEvent('scroll')
    const spy = spyOn(OrangeNavbar, 'enableMinimizing')
    window.scrollY = 1

    window.dispatchEvent(scrollEvent)

    expect(spy).toHaveBeenCalled()
  })

  it('should not call enableMinimizing when there is a scroll on the page and the header does not have .sticky-top', () => {
    fixtureEl.innerHTML = [
      ''
    ].join('')

    const scrollEvent = createEvent('scroll')
    const spy = spyOn(OrangeNavbar, 'enableMinimizing')
    window.scrollY = 1

    window.dispatchEvent(scrollEvent)

    expect(spy).not.toHaveBeenCalled()
  })

  it('should add .header-minimized to the global header non-supra first  when enableMinimizing is called not at the top of the page', () => {
    fixtureEl.innerHTML = [
      '',
      '  ',
      '  ',
      '  ',
      ''
    ].join('')

    const targetEl = fixtureEl.querySelector('#target')
    const notTargetedEl = fixtureEl.querySelector('#notTargeted')
    const notTargeted2El = fixtureEl.querySelector('#notTargeted2')
    window.scrollY = 1

    OrangeNavbar.enableMinimizing(fixtureEl.querySelector('header.sticky-top'))

    expect(targetEl).toHaveClass('header-minimized')
    expect(notTargetedEl).not.toHaveClass('header-minimized')
    expect(notTargeted2El).not.toHaveClass('header-minimized')
  })

  it('should remove .header-minimized to the global header non-supra first  when enableMinimizing is called at the top of the page', () => {
    fixtureEl.innerHTML = [
      '',
      '  ',
      '  ',
      '  ',
      ''
    ].join('')

    const targetEl = fixtureEl.querySelector('#target')
    const notTargetedEl = fixtureEl.querySelector('#notTargeted')
    const notTargeted2El = fixtureEl.querySelector('#notTargeted2')
    window.scrollY = 0

    OrangeNavbar.enableMinimizing(fixtureEl.querySelector('header.sticky-top'))

    expect(targetEl).not.toHaveClass('header-minimized')
    expect(notTargetedEl).not.toHaveClass('header-minimized')
    expect(notTargeted2El).not.toHaveClass('header-minimized')
  })

  it('should not add .header-minimized to the global header non-supra first  when the header only has .supra ', () => {
    fixtureEl.innerHTML = [
      '',
      '  ',
      '  ',
      '  ',
      ''
    ].join('')

    const target0El = fixtureEl.querySelector('#target0')
    const target1El = fixtureEl.querySelector('#target1')
    const target2El = fixtureEl.querySelector('#target2')
    window.scrollY = 1

    OrangeNavbar.enableMinimizing(fixtureEl.querySelector('header.sticky-top'))

    expect(target0El).not.toHaveClass('header-minimized')
    expect(target1El).not.toHaveClass('header-minimized')
    expect(target2El).not.toHaveClass('header-minimized')
  })
})


text:
class vtkPolyData;

namespace Ui { class QInteractorStyleTubularVOI; }
class QInteractorStyleTubularVOI : public QInteractorStyleLumenSeedsPlacer
{
	Q_OBJECT;
	QSETUP_UI_HEAD(QInteractorStyleTubularVOI);

public:
	vtkTypeMacro(QInteractorStyleTubularVOI, QInteractorStyleLumenSeedsPlacer);
	static QInteractorStyleTubularVOI* New();

public slots:
	virtual void GenerateWidgetFromSeeds() override;
	virtual void SaveWidgetToSeeds() override;
	virtual void ClearAllSeeds() override;
	virtual void SetFocalSeed(int i) override;
	virtual void DeleteFocalSeed();
	virtual void DropSeed() override;
	virtual void UpdateWidgetToSeeds(
		int* newImagePos,
		int* oldImagePos = nullptr);
	virtual vtkPolyData* UpdateSpline();
	virtual void SetExtractRadius(int radius);
	virtual void ExtractSegmentation();
	virtual void ExtractVOI();
	virtual void ResetVOI();

protected:
	QInteractorStyleTubularVOI(int uiType = UNIQUE_UI, QWidget* parent = Q_NULLPTR);
	~QInteractorStyleTubularVOI();

	virtual void ExtractSegmentation(QList<int*>& seed);
	virtual void ExtractVOI(QList<int*> &seed);
	virtual void UpdateWidgetToSeeds(
		QList<int*>& seeds,
		int* newImagePos,
		int* oldImagePos = nullptr);
	virtual vtkPolyData* UpdateSpline(QList<int*> &seed);

	void uniqueInitialization();
	void initialization();

	virtual void uniqueEnable() override;

	static QList<int*> m_tubularSeeds;
	virtual QListWidget* GetListWidget();

	vtkSmartPointer<vtkPolyData> m_spline = nullptr;

	int m_extractRadius = 10;
private:
	Ui::QInteractorStyleTubularVOI* ui = nullptr;
};

#endif // !__QINTERACTOR_STYLE_TUBULAR_VOI_H__


text:
define("sap_viz_ext_footballheatmap-src/js/render", ['heatmap2'], function() {
	/*
	 * This function is a drawing function; you should put all your drawing logic in it.
	 * it's called in moduleFunc.prototype.render
	 * @param {Object} data - proceessed dataset, check dataMapping.js
	 * @param {Object} container - the target d3.selection element of plot area
	 * @example
	 *   container size:     this.width() or this.height()
	 *   chart properties:   this.properties()
	 *   dimensions info:    data.meta.dimensions()
	 *   measures info:      data.meta.measures()
	 */
	var render = function(data, container) {

		var width = this.width(),
			height = this.height(),
			colorPalette = this.colorPalette(),
			properties = this.properties(),
			dispatch = this.dispatch();
		//Prepare canvas with width and height of container

		container.selectAll('svg').remove();

		var mset1 = data.meta.measures(0);
		var dset1 = data.meta.dimensions(0),
			measureValue = mset1[0],
			xDimension = dset1[0],
			yDimension = dset1[1];

		//Convert measure into number
		data.forEach(function(d) {
			d[xDimension] = +d[xDimension];
			d[yDimension] = +d[yDimension];
			d[measureValue] = +d[measureValue];

		});

		var canvasWidth = container.node().offsetWidth;
		var canvasHeight = container.node().offsetHeight;
		var fieldWidth, fieldHeight, leftMargin;

		if (canvasWidth / canvasHeight > 1.5) {
			fieldWidth = canvasHeight * 1.5;
			fieldHeight = canvasHeight;
			leftMargin = (canvasWidth - fieldWidth) / 2;
		} else {
			fieldWidth = canvasWidth;
			fieldHeight = canvasWidth / 1.5;
			leftMargin = 0;
		}

		var centerRadius = 9.15 * fieldHeight / 68;
		var sideLengthOfPenaltyArc = 5.5 * fieldWidth / 105;

		//!!!!!!!!!!!!If you know min and max point, please assign manually!!!!!!!!!!!!!!!1
		var xMin = d3.min(data, function(d) {
			return d[xDimension];
		});
		var xMax = d3.max(data, function(d) {
			return d[xDimension];
		});

		var yMin = d3.min(data, function(d) {
			return d[yDimension];
		});
		var yMax = d3.max(data, function(d) {
			return d[yDimension];
		});

		var maxValue = d3.max(data, function(d) {
			return d[measureValue];
		});

		//Calculators for finding place of points on pitch
		var y = d3.scale.linear()
			.range([0, fieldHeight])
			.domain([yMin, yMax]);

		var x = d3.scale.linear()
			.range([0, fieldWidth])
			.domain([xMin, xMax]);

		var heatData = [];

		var datasetControl = 0; //to check if x and y has proper data.

		data.forEach(function(d) {
			var point = {
				x: x(d[xDimension]),
				y: y(d[yDimension]),
				value: d[measureValue]

			};
			if (!isNaN(point.x) && !isNaN(point.y)) {
				datasetControl = 1;
			}

			heatData.push(point);
		});

		if (datasetControl === 1) {
			initializeHeatMap();
		}

		function initializeHeatMap() {

			//Main div for including heatmap and football pitch
			container.node().innerHTML = "";
			var mainContainer = document.createElement('div');
			mainContainer.style.width = canvasWidth + 'px';
			mainContainer.style.height = fieldHeight + 'px';
			//  mainContainer.style.left = leftMargin+'px';
			mainContainer.className = 'sap_viz_ext_footballheatmap_divGreen';
			container.node().appendChild(mainContainer);

			//Div for heatmap
			var heatmapContainer = document.createElement('div');
			heatmapContainer.style.width = fieldWidth + 'px';
			heatmapContainer.style.height = fieldHeight + 'px';
			//heatmapContainer.style.left = leftMargin+'px';
			heatmapContainer.className = 'sap_viz_ext_footballheatmap_divCSS';

			//Div for drawing football pitch
			var pitchContainer = document.createElement('div');
			pitchContainer.style.width = fieldWidth + 'px';
			pitchContainer.style.height = fieldHeight + 'px';
			pitchContainer.style.left = leftMargin + 'px';
			pitchContainer.style.strokeWidth = fieldWidth / 150;
			pitchContainer.className = 'sap_viz_ext_footballheatmap_divCSS';

			var lineContainer = document.createElement('div');
			lineContainer.style.width = fieldWidth + 'px';
			lineContainer.style.height = fieldHeight + 'px';
			lineContainer.style.left = leftMargin + 'px';
			lineContainer.style.strokeWidth = fieldWidth / 150;
			lineContainer.className = 'sap_viz_ext_footballheatmap_lines';

			//Div for drawing football pitch
			var greenLayer = document.createElement('div');
			greenLayer.style.width = fieldWidth + 'px';
			greenLayer.style.height = fieldHeight + 'px';
			greenLayer.style.left = leftMargin + 'px';
			greenLayer.style.strokeWidth = fieldWidth / 150;
			greenLayer.className = 'sap_viz_ext_footballheatmap_divCSS';

			mainContainer.appendChild(pitchContainer);
			pitchContainer.appendChild(heatmapContainer);
			mainContainer.appendChild(greenLayer);
			mainContainer.appendChild(lineContainer);

			var centerRadius = 9.15 * fieldHeight / 68;

			var heatmap = h337.create({
				container: heatmapContainer,
				radius: centerRadius * 1.5
			});

			heatmap.setData({
				max: maxValue,
				data: heatData
			});

			//Calculate angle of penalty arc.
			var sideLengthOfPenaltyArc = 5.5 * fieldWidth / 105;
			var arcAngle = Math.asin(sideLengthOfPenaltyArc / centerRadius);

			//svg container for drawing all pitch lines
			var svgContainerLines = d3.select(lineContainer).append("svg")
				.attr("width", fieldWidth)
				.attr("height", fieldHeight);

			//Create a svg container for green rectangle (green pitch)
			var svgContainerGreen = d3.select(mainContainer).append("svg")
				.attr("width", canvasWidth)
				.attr("height", canvasHeight);

			//green field
			svgContainerGreen.append("rect")
				.attr("x", leftMargin)
				.attr("y", 0)
				.attr("width", fieldWidth)
				.attr("height", fieldHeight)
				.attr("fill", "#35BA02");

			//Draw vertical bars on field
			for (i = 1; i < 21; i = i + 2) {
				svgContainerGreen.append("rect")
					.attr("x", leftMargin + i * fieldWidth / 20)
					.attr("y", 0)
					.attr("width", fieldWidth / 20)
					.attr("height", fieldHeight)
					.attr("fill", "white")
					.attr("fill-opacity", "0.2");
			}

			//Center Circle
			svgContainerLines.append("circle")
				.attr("cx", fieldWidth / 2)
				.attr("cy", fieldHeight / 2)
				.attr("r", centerRadius);

			//Center dot
			svgContainerLines.append("circle")
				.attr("cx", fieldWidth / 2)
				.attr("cy", fieldHeight / 2)
				.attr("r", fieldHeight * 0.3 / 68)
				.attr("fill", "white");

			//Side Border
			svgContainerLines.append("rect")
				.attr("x", 3)
				.attr("y", 3)
				.attr("width", fieldWidth - 6)
				.attr("height", fieldHeight - 6);

			//Center Line
			svgContainerLines.append("line")
				.attr("x1", fieldWidth / 2)
				.attr("y1", 3)
				.attr("x2", fieldWidth / 2)
				.attr("y2", fieldHeight - 3);

			//Left big ractangle
			svgContainerLines.append("rect")
				.attr("x", 3)
				.attr("y", fieldHeight * 13.85 / 68)
				.attr("width", fieldWidth * 16.5 / 105)
				.attr("height", fieldHeight * 40.3 / 68);

			//Left small rectangle
			svgContainerLines.append("rect")
				.attr("x", 3)
				.attr("y", fieldHeight * 24.85 / 68)
				.attr("width", fieldWidth * 5.5 / 105)
				.attr("height", fieldHeight * 18.3 / 68);

			//Left goal
			svgContainerLines.append("rect")
				.attr("x", 2)
				.attr("y", fieldHeight * 30.34 / 68)
				.attr("width", 2)
				.attr("height", fieldHeight * 7.32 / 68)
				.attr("fill", "white");

			var leftArc = d3.svg.arc()
				.innerRadius(centerRadius)
				.outerRadius(centerRadius)
				.startAngle(arcAngle) //converting from degs to radians
				.endAngle(Math.PI - arcAngle); //just radians

			svgContainerLines.append("path")
				.attr("d", leftArc)
				.attr("transform", "translate(" + (fieldWidth * 11 / 105 + 3) + "," + fieldHeight / 2 + ")");

			//Left dot
			svgContainerLines.append("circle")
				.attr("cx", fieldWidth * 11 / 105 + 3)
				.attr("cy", fieldHeight / 2)
				.attr("r", fieldHeight * 0.2 / 68)
				.attr("fill", "white");

			//Right big ractangle
			svgContainerLines.append("rect")
				.attr("x", fieldWidth - 3 - fieldWidth * 16.5 / 105)
				.attr("y", fieldHeight * 13.85 / 68)
				.attr("width", fieldWidth * 16.5 / 105)
				.attr("height", fieldHeight * 40.3 / 68);

			//Right small rectangle
			svgContainerLines.append("rect")
				.attr("x", fieldWidth - 3 - fieldWidth * 5.5 / 105)
				.attr("y", fieldHeight * 24.85 / 68)
				.attr("width", fieldWidth * 5.5 / 105)
				.attr("height", fieldHeight * 18.3 / 68);

			//Right goal
			svgContainerLines.append("rect")
				.attr("x", fieldWidth - 4.5)
				.attr("y", fieldHeight * 30.34 / 68)
				.attr("width", 2)
				.attr("height", fieldHeight * 7.32 / 68)
				.attr("fill", "white");

			//Right dot
			svgContainerLines.append("circle")
				.attr("cx", fieldWidth - 3 - fieldWidth * 11 / 105)
				.attr("cy", fieldHeight / 2)
				.attr("r", fieldHeight * 0.2 / 68)
				.attr("fill", "white");

			var rightArc = d3.svg.arc()
				.innerRadius(centerRadius)
				.outerRadius(centerRadius)
				.startAngle(Math.PI + arcAngle)
				.endAngle(2 * Math.PI - arcAngle);

			svgContainerLines.append("path")
				.attr("d", rightArc)
				.attr("transform", "translate(" + Math.round(fieldWidth - 3 - fieldWidth * 11 / 105) + "," + fieldHeight / 2 + ")");

			centerRadius = 9.15 * fieldHeight / 68;
			sideLengthOfPenaltyArc = 5.5 * fieldWidth / 105;
		}

	};

	return render;
});


text:
static NSString *const WCBuildDefineNameKey = @"name";
static NSString *const WCBuildDefineValueKey = @"value";

@implementation WCBuildDefine
#pragma mark *** Subclass Overrides ***
- (void)dealloc {
	[_name release];
	[_value release];
	[super dealloc];
}
#pragma mark NSCopying
- (id)copyWithZone:(NSZone *)zone {
	WCBuildDefine *copy = [[[self class] alloc] initWithName:[self name] value:[self value]];

	return copy;
}
#pragma mark NSMutableCopying
- (id)mutableCopyWithZone:(NSZone *)zone {
	WCBuildDefine *copy = [[[self class] alloc] initWithName:[self name] value:[self value]];

	return copy;
}
#pragma mark RSPlistArchiving
- (NSDictionary *)plistRepresentation {
	NSMutableDictionary *retval = [NSMutableDictionary dictionaryWithDictionary:[super plistRepresentation]];

	[retval setObject:[self name] forKey:WCBuildDefineNameKey];

	if ([[self value] length])
		[retval setObject:[self value] forKey:WCBuildDefineValueKey];

	return [[retval copy] autorelease];
}

- (id)initWithPlistRepresentation:(NSDictionary *)plistRepresentation {
	if (!(self = [super init]))
		return nil;

	_name = [[plistRepresentation objectForKey:WCBuildDefineNameKey] copy];
	_value = [[plistRepresentation objectForKey:WCBuildDefineValueKey] copy];

	return self;
}
#pragma mark *** Public Methods ***
+ (id)buildDefine; {
	return [[[[self class] alloc] initWithName:NSLocalizedString(@"NEW_DEFINE", @"NEW_DEFINE")] autorelease];
}
+ (id)buildDefineWithName:(NSString *)name; {
	return [[[[self class] alloc] initWithName:name] autorelease];
}
- (id)initWithName:(NSString *)name; {
	return [self initWithName:name value:nil];
}
+ (id)buildDefineWithName:(NSString *)name value:(NSString *)value; {
	return [[[[self class] alloc] initWithName:name value:value] autorelease];
}
- (id)initWithName:(NSString *)name value:(NSString *)value; {
	if (!(self = [super init]))
		return nil;

	_name = [name copy];
	_value = [value copy];

	return self;
}
#pragma mark Properties
@synthesize name=_name;
@synthesize value=_value;

@end


text:
Capistrano::Configuration.instance(true).load do
  ## common variables
  set :webserver_link,    true
  set :webserver_config,  "config/webserver/webserver.conf"
  set :webserver_application, application
  set :webserver_restart, true

  ## apache specific variables
  set :webserver_init,    "/etc/init.d/apache2"
  set :webserver_dir,     "/etc/apache2/sites-enabled"

  after "deploy:setup", "webserver:setup"

  namespace :webserver do
    desc <<-DESC
      setup webserver directories.

      creates a directory under the shared resources directory for webserver
      related files
    DESC
    task :setup, :roles => :web do
      run "mkdir -p #{shared_path}/webserver"
    end

    desc <<-DESC
    update configuration.

    Upload the webserver configuration file to the shared resources directory
    and create a link (or copy to) the webserver configuration directory

    This task is designed to push the file directly, rather than use the deployed
    application directory. This means you will not need to do a deploy just to
    update configuration files for the webserver.
    DESC
    task :configuration, :roles => :web do
      # upload the file
      upload "#{webserver_config}", "#{shared_path}/webserver/#{webserver_application}"

      # remove the old file / link
      run "sudo rm -f #{webserver_dir}/#{webserver_application}"

      # link or copy file from shared to webserver directory
      if webserver_link == true
        run "sudo ln -sf #{shared_path}/webserver/#{webserver_application} #{webserver_dir}/#{webserver_application}"
      else
        run "sudo cp #{shared_path}/webserver/#{webserver_application} #{webserver_dir}/#{webserver_application}"
      end

      # restart the webserver
      if webserver_restart == true
        webserver.restart
      end
    end

    desc "start webserver (apache)"
    task :start, :roles => :web do
      run "sudo #{webserver_init} start"
    end

    desc "stop webserver (apache)"
    task :stop, :roles => :web do
      run "sudo #{webserver_init} stop"
    end

    desc "restart webserver (apache)"
    task :restart, :roles => :web do
      run "sudo #{webserver_init} restart"
    end

  end
end


text: LOCAL_TEST_CASES = []


text:
package org.hawkular.inventory.api;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Collection;
import java.util.Optional;

import org.hawkular.inventory.api.model.InventoryHealth;
import org.hawkular.inventory.api.model.RawResource;
import org.hawkular.inventory.api.model.Resource;
import org.hawkular.inventory.api.model.ResourceNode;
import org.hawkular.inventory.api.model.ResourceType;
import org.hawkular.inventory.api.model.ResultSet;

/**
 * Provides access to the inventory backend
 * @author Joel Takvorian
 */
public interface InventoryService {
    /**
     * Add or replace a single resource
     */
    void addResource(RawResource r);

    /**
     * Add or replace multiple resources
     */
    void addResource(Collection<RawResource> r);

    /**
     * Add or replace a single resource type
     */
    void addResourceType(ResourceType rt);

    /**
     * Add or replace multiple resource types
     */
    void addResourceType(Collection<ResourceType> rt);

    /**
     * Delete a single resource by ID
     */
    void deleteResources(Collection<String> ids);

    /**
     * Delete all resources
     */
    void deleteAllResources();

    /**
     * Delete a single resource type
     */
    void deleteResourceTypes(Collection<String> typeIds);

    /**
     * Delete all resource types
     */
    void deleteAllTypes();

    /**
     * Get a resource from its ID. The resulting object includes {@link ResourceType}
     * @return the {@link Resource} if found
     */
    Optional<Resource> getResourceById(String id);

    /**
     * Get a resource from its ID, and load all its child subtree. The resulting objects include {@link ResourceType}
     * @return the {@link ResourceNode} if found
     */
    Optional<ResourceNode> getTree(String parentId);

    /**
     * Get a list of resources with filters and default pagination options
     * @param filter filter object (only root, typeId, ...)
     * @return resources embedded in page object {@link ResultSet}
     */
    ResultSet<Resource> getResources(ResourceFilter filter);

    /**
     * Get a list of resources with filters and the provided pagination options
     * @param filter filter object (only root, typeId, ...)
     * @param startOffset pagination offset
     * @param maxResults pagination number of results
     * @return resources embedded in page object {@link ResultSet}
     */
    ResultSet<Resource> getResources(ResourceFilter filter, long startOffset, int maxResults);

    /**
     * Get a list of of child resources for a parent resource, with default pagination
     * @param parentId resourceId of the parent resource
     * @return resources embedded in page object {@link ResultSet}
     */
    ResultSet<Resource> getChildren(String parentId);

    /**
     * Get a list of child resources for a parent resource, with the provided pagination options
     * @param parentId resourceId of the parent resource
     * @param startOffset pagination offset
     * @param maxResults pagination number of results
     * @return resources embedded in page object {@link ResultSet}
     */
    ResultSet<Resource> getChildren(String parentId, long startOffset, int maxResults);

    /**
     * Get resource types with the default pagination options (first 100 results)
     * @return resource types embedded in page object {@link ResultSet}
     */
    ResultSet<ResourceType> getResourceTypes();

    /**
     * Get resource types with the provided pagination options
     * @return resource types embedded in page object {@link ResultSet}
     */
    ResultSet<ResourceType> getResourceTypes(long startOffset, int maxResults);

    /**
     * Get resource type by ID
     * @return the {@link ResourceType} if found
     */
    Optional<ResourceType> getResourceType(String typeId);

    /**
     * Get the content of agents configuration file for a given template
     * @return config file content as String, if found
     */
    Optional<String> getAgentConfig(String templateName);

    /**
     * Get the content of JMX exporter configuration file for a given template
     * @return config file content as String, if found
     */
    Optional<String> getJMXExporterConfig(String templateName);

    /**
     * @return true is InventoryService is Up and Running
     */
    boolean isRunning();

    void buildExport(OutputStream os) throws IOException;

    InventoryHealth getHealthStatus();

    void buildMetricsEndpoints();
}


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

namespace Octokit
{
    [DebuggerDisplay("{DebuggerDisplay,nq}")]
    public class DeleteEventPayload : ActivityPayload
    {
        public string Ref { get; protected set; }

        public StringEnum<RefType> RefType { get; protected set; }
    }
}


text:
package qub;

public class FakeDNS implements DNS
{
    private final MutableMap<String,IPv4Address> hostToIPAddressMap;

    private FakeDNS()
    {
        this.hostToIPAddressMap = Map.create();
    }

    public static FakeDNS create()
    {
        return new FakeDNS();
    }

    public FakeDNS set(String host, IPv4Address ipAddress)
    {
        PreCondition.assertNotNullAndNotEmpty(host, "host");
        PreCondition.assertNotNull(ipAddress, "ipAddress");

        hostToIPAddressMap.set(host, ipAddress);
        return this;
    }

    @Override
    public Result<IPv4Address> resolveHost(String host)
    {
        PreCondition.assertNotNullAndNotEmpty(host, "host");

        return IPv4Address.parse(host)
            .catchError(ParseException.class, () ->
            {
                return hostToIPAddressMap.get(host)
                    .convertError(NotFoundException.class, () -> new HostNotFoundException(host))
                    .await();
            });
    }
}


text:
/* eslint-disable */

'use strict';

/*::
import type { Fragment, ReaderFragment } from 'relay-runtime';
import type { FragmentType } from "relay-runtime";
declare export opaque type RelayConcreteVariablesTest2Fragment$fragmentType: FragmentType;
export type RelayConcreteVariablesTest2Fragment$data = {|
  +firstName: ?string,
  +$fragmentType: RelayConcreteVariablesTest2Fragment$fragmentType,
|};
export type RelayConcreteVariablesTest2Fragment$key = {
  +$data?: RelayConcreteVariablesTest2Fragment$data,
  +$fragmentSpreads: RelayConcreteVariablesTest2Fragment$fragmentType,
  ...
};
*/

var node/*: ReaderFragment*/ = {
  "argumentDefinitions": [
    {
      "defaultValue": null,
      "kind": "LocalArgument",
      "name": "condition"
    }
  ],
  "kind": "Fragment",
  "metadata": null,
  "name": "RelayConcreteVariablesTest2Fragment",
  "selections": [
    {
      "alias": null,
      "args": [
        {
          "kind": "Variable",
          "name": "if",
          "variableName": "condition"
        }
      ],
      "kind": "ScalarField",
      "name": "firstName",
      "storageKey": null
    }
  ],
  "type": "User",
  "abstractKey": null
};

if (__DEV__) {
  (node/*: any*/).hash = "df79c95ad35ba6394bc4ff9a22a8c95c";
}

module.exports = ((node/*: any*/)/*: Fragment<
  RelayConcreteVariablesTest2Fragment$fragmentType,
  RelayConcreteVariablesTest2Fragment$data,
>*/);