text:
The tensor type supports all standard arithmetic operators and arithmetic functions.

## Element-wise arithmetic operators

The elementary arithmetic operators ([+](xref:Tensor.Tensor`1.op_Addition*), [-](xref:Tensor.Tensor`1.op_Subtraction*), [*](xref:Tensor.Tensor`1.op_Multiply*), [/](xref:Tensor.Tensor`1.op_Division*), [%](xref:Tensor.Tensor`1.op_Modulus*), [**](xref:Tensor.Tensor`1.Pow*), [~-](xref:Tensor.Tensor`1.op_UnaryNegation*)) are executed element-wise.
For example, consider the vectors `d` and `e`, that are initialized as follows.

```fsharp
let d = HostTensor.init [4L] (fun [|i|] -> float i)
let e = HostTensor.init [4L] (fun [|i|] -> 10.0 * float i)
// d = [   0.0000    1.0000    2.0000    3.0000]
// e = [   0.0000   10.0000   20.0000   30.0000]
```

Then we can perform an element-wise addition using the following code.

```fsharp
let f = d + e
// f = [   0.0000   11.0000   22.0000   33.0000]
```

It is also possible to apply an operator to a tensor and a scalar value of the same data type.
In this case the scalar is repeated to match the size of the given tensor, as shown in the following example.

```fsharp
let d1 = d * 100.0
// d1 = [   0.0000  100.0000  200.0000  300.0000]
```

### Automatic broadcasting
If a binary operator (for example `+`) is applied to two tensors of different shapes, the library tries to automatically broadcast both tensors to a compatible shape using the following rules.

1. If the tensors have different ranks, the tensor with the lower rank is padded from the left with axes of size one until both tensors have the same rank.
For example, if tensor `a` is of shape *4x3x1* and tensor `b` is of shape *2*, then tensor `b` is padded to the shape **1**x**1**x2.

1. For each dimension that has different size in both tensors and size one in one of the tensors, this dimension of the tensor with size one is broadcasted to the corresponding dimension of the other tensor.
Thus, in our example, the last dimension of tensor `a` is broadcasted resulting in the shape 4x3x**2** and the first and second dimensions of tensor `b` (after padding it is of shape *1x1x2*) are broadcasted, resulting in the shape **4**x**3**x2.

If the shapes still differ after applying the above rules, the operation fails and an exception is raised.

```fsharp
let a = HostTensor.init [4L; 3L; 1L] (fun [|i; j; k|] -> float i + 0.1 * float j)
let b = HostTensor.init [2L] (fun [|i|] -> 10.0 * float i)
// a =
//   [[[   0.0000]
//     [   0.1000]
//     [   0.2000]]
//    [[   1.0000]
//     [   1.1000]
//     [   1.2000]]
//    [[   2.0000]
//     [   2.1000]
//     [   2.2000]]
//    [[   3.0000]
//     [   3.1000]
//     [   3.2000]]]
// b = [   0.0000   10.0000]
let apb = a + b
// apb =
//   [[[   0.0000   10.0000]
//     [   0.1000   10.1000]
//     [   0.2000   10.2000]]
//    [[   1.0000   11.0000]
//     [   1.1000   11.1000]
//     [   1.2000   11.2000]]
//    [[   2.0000   12.0000]
//     [   2.1000   12.1000]
//     [   2.2000   12.2000]]
//    [[   3.0000   13.0000]
//     [   3.1000   13.1000]
//     [   3.2000   13.2000]]]
// apb.Shape = [4L; 3L; 2L]
```

### Storage devices must match
All tensors participating in an operation must be located on the same storage device, i.e. their [Dev](xref:Tensor.Tensor`1.Dev*) property must be equal.
The result will be stored on the same device as the sources.
No automatic transfer between different devices (e.g. GPU and host memory) is performed; instead an exception is raised.

If working with tensors stored on different devices, you first have to use the [transfer](xref:Tensor.Tensor`1.transfer*) function to copy them to the same device, before applying an operator on them.

## Element-wise arithmetic and rounding functions
The standard F# arithmetic functions, such as [sin](xref:Tensor.Tensor`1.Sin*), [exp](xref:Tensor.Tensor`1.Exp*), [log](xref:Tensor.Tensor`1.Log*), and rounding functions, such as [floor](xref:Tensor.Tensor`1.Floor*) and [ceil](xref:Tensor.Tensor`1.Ceiling*), can also be applied to tensors.
They execute element-wise, just like the arithmetic operators presented above.
```fsharp
let f2 = sin f
// f2 = [   0.0000    -1.000    -0.009    0.9999]
```

## Specifying where the result should be stored
Sometimes you might want to specify in which (existing) tensor the result of an operation should be stored.
For this purpose there exist a corresponding `Fill*` variant of each operation provided by the tensor library.

For example, for the multiply operator [(*)](xref:Tensor.Tensor`1.op_Multiply*), there exist the [FillMultiply](xref:Tensor.Tensor`1.FillMultiply*) variant, which also performs a multiplication, but stores the result in the specified target tensor.
The previous contents of the target tensor are thereby overwritten.
The target tensor must have appropriate shape and data type to hold the result of the operation.
Also it must reside on the same device as the source(s) of the operation.

The following example illustrates the use of the `Fill*` functions.

```fsharp
// f3 = [  -1.0000   -1.0000   29.0000   40.0000]
f3.FillMultiply d e
// f3 = [   0.0000   10.0000   40.0000   90.0000]
```

It is also possible to perform operations in-place.
This means that one of the inputs of an operation is overwritten by the output.

```fsharp
f3.FillMultiply f3 e
// f3 = [   0.0000  100.0000  800.0000 2700.0000]
```

This is especially useful when working with very large tensors and thus care must be taken to conserve memory usage.

You can find the `Fill*` variants of each operation by checking the "*see also*" section in its reference documentation.

## Matrix multiplication (dot product)
Matrix multiplication (dot product) is implemented using the [.* operator](xref:Tensor.Tensor`1.op_DotMultiply*).
This operator can be used to calculate a vector/vector product resulting in a scalar, a matrix/vector product resulting in a vector and a matrix/matrix product resulting in a matrix.
If the inputs have more than two dimensions, a batched matrix/matrix product is computed.

The following example shows how to compute the matrix product of the *5x3* matrix `h` with the *3x3* matrix `i`, resulting in the *5x3* matrix `hi`.

```fsharp
let h = HostTensor.init [5L; 3L] (fun [|i; j|] -> 3.0 * float i + float j)
// h =
//     [[   0.0000    1.0000    2.0000]
//      [   3.0000    4.0000    5.0000]
//      [   6.0000    7.0000    8.0000]
//      [   9.0000   10.0000   11.0000]
//      [  12.0000   13.0000   14.0000]]
let i = 0.1 + HostTensor.identity 3L
// i =
//     [[   1.1000    0.1000    0.1000]
//      [   0.1000    1.1000    0.1000]
//      [   0.1000    0.1000    1.1000]]
let hi = h .* i
// hi =
//     [[   0.3000    1.3000    2.3000]
//      [   4.2000    5.2000    6.2000]
//      [   8.1000    9.1000   10.1000]
//      [  12.0000   13.0000   14.0000]
//      [  15.9000   16.9000   17.9000]]
```

## Linear algebra operations
The diagonal of a matrix can be extracted using the [diag](xref:Tensor.Tensor`1.diag*) function.
To create a diagonal matrix with specific elements on the diagonal use the [diagMat](xref:Tensor.Tensor`1.diagMat*) function.

The norm can be computed using the [norm](xref:Tensor.Tensor`1.norm*) and [normAxis](xref:Tensor.Tensor`1.normAxis*) functions.

To invert a square, invertable matrix use the [invert](xref:Tensor.Tensor`1.invert*) function.
However, this may be numerically instable, especially if the condition number of the matrix is low.
Thus it is usually better, but also more expensive, to compute the Moore-Penrose pseudo-inverse using the [pseudoInvert](xref:Tensor.Tensor`1.pseudoInvert*) function.
This is also applicable to non-square and non-invertable matrices.

```fsharp
let iinv = Tensor.invert i
// iinv =
//    [[   0.9231    -0.077    -0.077]
//     [   -0.077    0.9231    -0.077]
//     [   -0.077    -0.077    0.9231]]
```

The singular value decomposition (SVD) of a matrix is available through [SVD](xref:Tensor.Tensor`1.SVD*).
The eigen-decomposition of a symmetric matrix can be computed using the [symmetricEigenDecomposition](xref:Tensor.Tensor`1.symmetricEigenDecomposition*) function.

The tensor product (pairwise product between all elements of two tensors) between two tensors can be obtained using the the [tensorProduct](xref:Tensor.Tensor`1.tensorProduct*) function.

## Concatenation and block tensors
Tensors can be concatenated along an axis using the [concat](xref:Tensor.Tensor`1.concat*) function.

To replicate a tensor along an axis use the [replicate](xref:Tensor.Tensor`1.replicate*) function.

A tensor built out of smaller tensors block can be created using the [ofBlocks](xref:Tensor.Tensor`1.ofBlocks*) function.

## Element-wise function application (host-only)
For tensors stored in host memory, it is also possible to apply an arbitrary function element-wise using the [HostTensor.map](xref:Tensor.HostTensor.map*) function.

```fsharp
let f3 = HostTensor.map (fun x -> if x > 15.0 then 7.0 + x else -1.0) f
// f3 = [  -1.0000   -1.0000   29.0000   40.0000]
```

Likewise, the [HostTensor.map2](xref:Tensor.HostTensor.map2*) function takes two tensors and applies a binary function to their elements.
Indexed variants of both function are provided by [HostTensor.mapi](xref:Tensor.HostTensor.mapi*) and [HostTensor.mapi2](xref:Tensor.HostTensor.mapi2*).

The [HostTensor.foldAxis](xref:Tensor.HostTensor.foldAxis*) applies a function along the specified axis of a tensor and threads an state through the computation.

## Further algorithms

Further algorithms are provided in the [Tensor.Algorithm namespace](xref:Tensor.Algorithm).


text:
/*
 * rollingpolicy.h
 *
 * See the COPYING file for the terms of usage and distribution.
*/

#ifndef log4c_rollingpolicy_h
#define log4c_rollingpolicy_h

/**
 * @file rollingpolicy.h
 *
 * @brief Log4c rolling policy interface. Defines the interface for
 * managing and providing rolling policies.
 *
 * A rolling policy is used to confogure a rollingfile appender to tell
 * it when to trigger a rolover event.
*/

#include <stdio.h>
#include <log4c/defs.h>
#include <log4c/layout.h>

__LOG4C_BEGIN_DECLS

struct __log4c_rollingpolicy;

/**
 * log4c rollingpolicy type
 */
typedef struct __log4c_rollingpolicy log4c_rollingpolicy_t;

#define ROLLINGFILE_DEFAULT_LOG_DIR "."
#define ROLLINGFILE_DEFAULT_LOG_PREFIX "log"

typedef struct __rollingfile_udata rollingfile_udata_t; /* opaque */

/**
 * @brief log4c rollingpolicy type.  Defines the interface a specific policy
 * must provide to the rollingfile appender.
 *
 * Attributes description:
 *
 * @li @c name rollingpolicy type name
 * @li @c init() init the rollingpolicy
 * @li @c is_triggering_event()
 * @li @c rollover()
 *
 **/
typedef struct log4c_rollingpolicy_type {
  const char*	name;
  int (*init)(log4c_rollingpolicy_t *a_this, rollingfile_udata_t* rfudatap );
  int (*is_triggering_event)( log4c_rollingpolicy_t* a_policy,
			      const log4c_logging_event_t*,
			      long current_file_size );
  int (*rollover)(log4c_rollingpolicy_t* a_policy, FILE **);
  int (*fini)(log4c_rollingpolicy_t *a_this);
} log4c_rollingpolicy_type_t;

/**
 * Get a new rolling policy
 * @param policy_name a name for the policy
 * @return a new rolling policy, otherwise NULL.
 */
LOG4C_API log4c_rollingpolicy_t* log4c_rollingpolicy_get(
                                  const char* policy_name);

/**
 * Use this function to register a rollingpolicy type with log4c.
 * Once this is done you may refer to this type by name both
 * programmatically and in the log4c configuration file.
 *
 * @param a_type a pointer to the new rollingpolicy type to register.
 * @returns a pointer to the previous rollingpolicy type of same name.
 *
 * Example code fragment:
 * @code
 *
 * const log4c_rollingpolicy_type_t log4c_rollingpolicy_type_sizewin = {
 *   "sizewin",
 *   sizewin_init,
 *   sizewin_is_triggering_event,
 *   sizewin_rollover
 * };
 *
 * log4c_rollingpolicy_type_set(&log4c_rollingpolicy_type_sizewin);
 * @endcode
 *
 */
LOG4C_API const log4c_rollingpolicy_type_t* log4c_rollingpolicy_type_set(
                                    const log4c_rollingpolicy_type_t* a_type);

/**
 * Configure a rolling policy with a specific policy.
 * @param policyp pointer to the rolling policy
 * @param udatap a specific policy type, for example sizewin.
 * @return zero if successful, non-zero otherwise.
 */
LOG4C_API void log4c_rollingpolicy_set_udata(log4c_rollingpolicy_t* policyp,
					  void *udatap);
/**
 * Call the initialization code of a rolling policy.
 * @param policyp pointer to the rolling policy
 * @param app the rolling appender this policy is used with
 * @return zero if successful, non-zero otherwise.
*/
LOG4C_API int log4c_rollingpolicy_init(log4c_rollingpolicy_t *policyp,
                                       rollingfile_udata_t* rfup );

/**
 * Call the un initialization code of a rolling policy.
 * This will call the fini routine of the particular rollingpolicy type
 * to allow it to free up resources.  If the call to fini in the
 * rollingpolicy type fails then the rollingpolicy is not uninitialized.
 * Try again later model...
 * @param policyp pointer to the rolling policy
 * @return zero if successful, non-zero otherwise.
*/
LOG4C_API int log4c_rollingpolicy_fini(log4c_rollingpolicy_t *a_this);

/**
 * Determine if a logging event should trigger a rollover according to
 * the given policy.
 * @param policyp pointer to the rolling policy
 * @param evtp the logging event pointer.
 * @param current_file_size the size of the current file being logged to.
 * @return non-zero if rollover required, zero otherwise.
 */
LOG4C_API int log4c_rollingpolicy_is_triggering_event(
		     log4c_rollingpolicy_t* policyp,
                     const log4c_logging_event_t* evtp,
		     long current_file_size );
/**
 * Effect a rollover according to policyp on the given file stream.
 * @param policyp pointer to the rolling policy
 * @param fp filestream to rollover.
 * @return zero if successful, non-zero otherwise.
 * The policy can return an indication that something went wrong but
 * that the rollingfile appender can stull go ahead and log by returning an
 * error code <= ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG.  Anything greater than
 * means that the rolling file appender will not try to log it's message.
 */

#define  ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG 0x05
LOG4C_API int log4c_rollingpolicy_rollover(log4c_rollingpolicy_t* policyp,
                                            FILE ** fp);

/**
 * sets the rolling policy type
 *
 * @param a_rollingpolicy the log4c_rollingpolicy_t object
 * @param a_type the new rollingpolicy type
 * @return the previous appender type
 **/
LOG4C_API const log4c_rollingpolicy_type_t* log4c_rollingpolicy_set_type(
    log4c_rollingpolicy_t* a_rollingpolicy,
    const log4c_rollingpolicy_type_t* a_type);

/**
 * Get a pointer to an existing rollingpolicy type.
 *
 * @param a_name the name of the rollingpolicy type to return.
 * @returns a pointer to an existing rollingpolicy type, or NULL if no
 * rollingpolicy type with the specified name exists.
 */
LOG4C_API const log4c_rollingpolicy_type_t* log4c_rollingpolicy_type_get(
    const char* a_name);

/**
 * Get the rolling policy configuration.
 * @param policyp pointer to the rolling policy
 * @return pointer to the rolling policy configuration.
*/
LOG4C_API void* log4c_rollingpolicy_get_udata(
                        const log4c_rollingpolicy_t* policyp);

/**
 * Get the rollingfile appender associated with this policy.
 * @param policyp pointer to the rolling policy
 * @return pointer to the rolling file appender associated with this policy
*/
LOG4C_API rollingfile_udata_t* log4c_rollingpolicy_get_rfudata(
                        const log4c_rollingpolicy_t* policyp);

LOG4C_API void* log4c_rollingpolicy_get_name(const log4c_rollingpolicy_t* a_this);

LOG4C_API log4c_rollingpolicy_t* log4c_rollingpolicy_new(const char* a_name);
LOG4C_API void log4c_rollingpolicy_delete(log4c_rollingpolicy_t* a_this);
LOG4C_API void log4c_rollingpolicy_print(const log4c_rollingpolicy_t* a_this,
FILE* a_stream);

LOG4C_API int log4c_rollingpolicy_is_initialized(log4c_rollingpolicy_t* a_this);
LOG4C_API void log4c_rollingpolicy_types_print(FILE *fp);
/**
 * @internal
 **/
struct __sd_factory;
LOG4C_API struct __sd_factory* log4c_rollingpolicy_factory;

__LOG4C_END_DECLS
#endif

redpajama_set_name: RedPajamaGithub


text:
{-# OPTIONS_GHC -fno-warn-orphans #-}

{-|
Module:      Instances.Data.Tuple
Copyright:   (C) 2014-2017 Ryan Scott
License:     BSD-style (see the file LICENSE)
Maintainer:  Ryan Scott
Stability:   Provisional
Portability: GHC

'Arbitrary' instances for tuple types.
-}
module Instances.Data.Tuple () where

import Generics.Deriving.Instances ()
import Instances.Utils.GenericArbitrary (genericArbitrary)
import Test.QuickCheck (Arbitrary(..))

instance ( Arbitrary a
         , Arbitrary b
         , Arbitrary c
         , Arbitrary d
         , Arbitrary e
         , Arbitrary f
         , Arbitrary g
         , Arbitrary h
         , Arbitrary i
         , Arbitrary j
         , Arbitrary k
         ) => Arbitrary (a, b, c, d, e, f, g, h, i, j, k) where
    arbitrary = genericArbitrary

instance ( Arbitrary a
         , Arbitrary b
         , Arbitrary c
         , Arbitrary d
         , Arbitrary e
         , Arbitrary f
         , Arbitrary g
         , Arbitrary h
         , Arbitrary i
         , Arbitrary j
         , Arbitrary k
         , Arbitrary l
         ) => Arbitrary (a, b, c, d, e, f, g, h, i, j, k, l) where
    arbitrary = genericArbitrary

instance ( Arbitrary a
         , Arbitrary b
         , Arbitrary c
         , Arbitrary d
         , Arbitrary e
         , Arbitrary f
         , Arbitrary g
         , Arbitrary h
         , Arbitrary i
         , Arbitrary j
         , Arbitrary k
         , Arbitrary l
         , Arbitrary m
         ) => Arbitrary (a, b, c, d, e, f, g, h, i, j, k, l, m) where
    arbitrary = genericArbitrary

instance ( Arbitrary a
         , Arbitrary b
         , Arbitrary c
         , Arbitrary d
         , Arbitrary e
         , Arbitrary f
         , Arbitrary g
         , Arbitrary h
         , Arbitrary i
         , Arbitrary j
         , Arbitrary k
         , Arbitrary l
         , Arbitrary m
         , Arbitrary n
         ) => Arbitrary (a, b, c, d, e, f, g, h, i, j, k, l, m, n) where
    arbitrary = genericArbitrary

instance ( Arbitrary a
         , Arbitrary b
         , Arbitrary c
         , Arbitrary d
         , Arbitrary e
         , Arbitrary f
         , Arbitrary g
         , Arbitrary h
         , Arbitrary i
         , Arbitrary j
         , Arbitrary k
         , Arbitrary l
         , Arbitrary m
         , Arbitrary n
         , Arbitrary o
         ) => Arbitrary (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) where
    arbitrary = genericArbitrary


text:
import asyncio
import pathlib
import platform

SYSTEM = platform.uname().system

if SYSTEM == 'Windows':
    import ctypes.wintypes

    CSIDL_APPDATA = 0x001a

    def get_pg_home_directory() -> pathlib.Path:
        # We cannot simply use expanduser() as that returns the user's
        # home directory, whereas Postgres stores its config in
        # %AppData% on Windows.
        buf = ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH)
        r = ctypes.windll.shell32.SHGetFolderPathW(0, CSIDL_APPDATA, 0, 0, buf)
        if r:
            return None
        else:
            return pathlib.Path(buf.value) / 'postgresql'

else:
    def get_pg_home_directory() -> pathlib.Path:
        return pathlib.Path.home()

async def wait_closed(stream):
    # Not all asyncio versions have StreamWriter.wait_closed().
    if hasattr(stream, 'wait_closed'):
        try:
            await stream.wait_closed()
        except ConnectionResetError:
            # On Windows wait_closed() sometimes propagates
            # ConnectionResetError which is totally unnecessary.
            pass

# Workaround for https://bugs.python.org/issue37658
async def wait_for(fut, timeout):
    if timeout is None:
        return await fut

    fut = asyncio.ensure_future(fut)

    try:
        return await asyncio.wait_for(fut, timeout)
    except asyncio.CancelledError:
        if fut.done():
            return fut.result()
        else:
            raise


text:
/*
  Placing points directly into clip space is of limited use. What's better is
  to take model data and transform it into clip space. The cube is an easy example
  of how to do this. The cube data below consists of vertex positions, the colors
  of the faces of the cube, and the order of the vertex positions that make up
  the individual polygons (in groups of 3). The positions and colors are stored in
  buffers and sent to the shader as attributes, and then operated upon individually.

  Finally a single model matrix is set that represents the transformations that will
  be performed on each position that makes up the model to move it into the correct
  space. In this case, for every frame of the animation, a series of scale, rotation,
  and translation matrices move the data into the desired spot in clip space. The
  cube is the size of clip space (-1,-1,-1) to (1,1,1) so it will need to be shrunk
  down to fit. This matrix is sent to the shader having been multiplied in JavaScript
  beforehand.

  In the shader each position vertex is first transformed into a homogeneous
  coordinate (vec4), and then multiplied against the model matrix.

    gl_Position = model * vec4(position, 1.0);

  It may be noted that in JavaScript matrix multiplication requires a function,
  while in the shader it is built into the language with the simple * operator.

  At this point the W value of the transformed point is still 1.0. The cube still
  doesn't have any perspective. The next example will take this setup, and fiddle
  with the W values to provide some perspective.

  Exercise:

    1) Shrink down the box using the scale matrix and position it in different places
    within clip space. Try moving it outside of clip space. Resize the window
    and watch as the box skews out of shape. Add a rotateZ matrix.

    2) Modify the MDN.createCubeData() function in /shared/cube.js to change the underlying
    data for the cube and note how the model transform perserves it. (Make sure and
    restore it once you are done for the other examples.)

*/

function CubeDemo () {

  // Prep the canvas
  this.canvas = document.getElementById("canvas");
  this.canvas.width = window.innerWidth;
  this.canvas.height = window.innerHeight;

  // Grab a context
  this.gl = MDN.createContext(this.canvas);

  this.transforms = {}; // All of the matrix transforms
  this.locations = {}; //All of the shader locations

  // MDN.createBuffersForCube and MDN.createCubeData are located in /shared/cube.js
  this.buffers = MDN.createBuffersForCube(this.gl, MDN.createCubeData() );

  this.webglProgram = this.setupProgram();

}

CubeDemo.prototype.setupProgram = function() {

  var gl = this.gl;

  // Setup a WebGL program
  var webglProgram = MDN.createWebGLProgramFromIds(gl, "vertex-shader", "fragment-shader");
  gl.useProgram(webglProgram);

  // Save the attribute and uniform locations
  this.locations.model = gl.getUniformLocation(webglProgram, "model");
  this.locations.position = gl.getAttribLocation(webglProgram, "position");
  this.locations.color = gl.getAttribLocation(webglProgram, "color");

  // Tell WebGL to test the depth when drawing
  gl.enable(gl.DEPTH_TEST);

  return webglProgram;
};

CubeDemo.prototype.computeModelMatrix = function( now ) {

  //See /shared/matrices.js for the definitions of these matrix functions

  //Scale down by 50%
  var scale = MDN.scaleMatrix(0.5, 0.5, 0.5);

  // Rotate a slight tilt
  var rotateX = MDN.rotateXMatrix( now * 0.0003 );

  // Rotate according to time
  var rotateY = MDN.rotateYMatrix( now * 0.0005 );

  // Move slightly down
  var position = MDN.translateMatrix(0, -0.1, 0);

  // Multiply together, make sure and read them in opposite order
  this.transforms.model = MDN.multiplyArrayOfMatrices([
    position, // step 4
    rotateY,  // step 3
    rotateX,  // step 2
    scale     // step 1
  ]);

  // Performance caveat: in real production code it's best not to create
  // new arrays and objects in a loop. This example chooses code clarity
  // over performance.
};

CubeDemo.prototype.draw = function() {

  var gl = this.gl;
  var now = Date.now();

  // Compute our matrices
  this.computeModelMatrix( now );

  // Update the data going to the GPU
  this.updateAttributesAndUniforms();

  // Perform the actual draw
  gl.drawElements(gl.TRIANGLES, 36, gl.UNSIGNED_SHORT, 0);

  // Run the draw as a loop
  requestAnimationFrame( this.draw.bind(this) );
};

CubeDemo.prototype.updateAttributesAndUniforms = function() {

  var gl = this.gl;

  // Setup the color uniform that will be shared across all triangles
  gl.uniformMatrix4fv(this.locations.model, false, new Float32Array(this.transforms.model));

  // Set the positions attribute
  gl.enableVertexAttribArray(this.locations.position);
  gl.bindBuffer(gl.ARRAY_BUFFER, this.buffers.positions);
  gl.vertexAttribPointer(this.locations.position, 3, gl.FLOAT, false, 0, 0);

  // Set the colors attribute
  gl.enableVertexAttribArray(this.locations.color);
  gl.bindBuffer(gl.ARRAY_BUFFER, this.buffers.colors);
  gl.vertexAttribPointer(this.locations.color, 4, gl.FLOAT, false, 0, 0);

  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.buffers.elements );

};

var cube = new CubeDemo();

cube.draw();


text:
package org.drools.workbench.screens.guided.dtable.client.wizard.column.plugins;

import java.util.ArrayList;
import java.util.List;

import com.google.gwtmockito.GwtMockitoTestRunner;
import com.google.gwtmockito.WithClassesToStub;
import org.drools.workbench.models.datamodel.rule.BaseSingleFieldConstraint;
import org.drools.workbench.models.datamodel.rule.FactPattern;
import org.drools.workbench.models.datamodel.rule.IPattern;
import org.drools.workbench.models.datamodel.rule.RuleModel;
import org.drools.workbench.models.datamodel.rule.SingleFieldConstraint;
import org.drools.workbench.models.guided.dtable.shared.model.BRLConditionColumn;
import org.drools.workbench.models.guided.dtable.shared.model.BRLConditionVariableColumn;
import org.drools.workbench.models.guided.dtable.shared.model.BRLRuleModel;
import org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52;
import org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52;
import org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView;
import org.drools.workbench.screens.guided.dtable.client.wizard.column.pages.AdditionalInfoPage;
import org.drools.workbench.screens.guided.dtable.client.wizard.column.pages.DefaultValuesPage;
import org.drools.workbench.screens.guided.dtable.client.wizard.column.pages.RuleModellerPage;
import org.jboss.errai.ui.client.local.spi.TranslationService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.uberfire.ext.widgets.core.client.wizards.WizardPageStatusChangeEvent;
import org.uberfire.mocks.EventSourceMock;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;

@RunWith(GwtMockitoTestRunner.class)
@WithClassesToStub(BRLRuleModel.class)
public class BRLConditionColumnPluginOperatorTest {

    @Captor
    private ArgumentCaptor<List<BRLConditionVariableColumn>> listArgumentCaptor;
    @Mock
    private RuleModellerPage ruleModellerPage;
    @Mock
    private AdditionalInfoPage additionalInfoPage;
    @Mock
    private EventSourceMock<WizardPageStatusChangeEvent> changeEvent;
    @Mock
    private GuidedDecisionTableView.Presenter presenter;
    @Mock
    private GuidedDecisionTable52 model;
    @Mock
    private TranslationService translationService;
    @Mock
    private BRLConditionColumn editingCol;

    @InjectMocks
    private BRLConditionColumnPlugin plugin = spy(new BRLConditionColumnPlugin(ruleModellerPage,
                                                                               mock(DefaultValuesPage.class),
                                                                               additionalInfoPage,
                                                                               changeEvent,
                                                                               translationService) {
        @Override
        public RuleModel getRuleModel() {
            final RuleModel ruleModel = new RuleModel();
            ruleModel.lhs = new IPattern[1];
            final FactPattern factPattern = new FactPattern();
            final SingleFieldConstraint constraint = new SingleFieldConstraint();
            constraint.setValue("var1");
            constraint.setFieldType("fieldType");
            constraint.setFactType("factType");
            constraint.setFieldName("fieldName");
            constraint.setOperator("in");
            constraint.setConstraintValueType(BaseSingleFieldConstraint.TYPE_TEMPLATE);

            factPattern.addConstraint(constraint);
            ruleModel.lhs[0] = factPattern;
            return ruleModel;
        }
    });

    @Before
    public void setup() {
        doReturn(presenter).when(plugin).getPresenter();
        doReturn(model).when(presenter).getModel();
    }

    @Test
    public void getDefinedVariables() {

        doReturn(true).when(plugin).isNewColumn();
        doReturn(model).when(presenter).getModel();
        doReturn("header").when(editingCol).getHeader();

        plugin.generateColumn();

        verify(editingCol).setChildColumns(listArgumentCaptor.capture());
        final List<BRLConditionVariableColumn> value = listArgumentCaptor.getValue();
        assertEquals(1, value.size());

        final BRLConditionVariableColumn brlConditionVariableColumn = value.get(0);

        assertEquals("fieldType", brlConditionVariableColumn.getFieldType());
        assertEquals("var1", brlConditionVariableColumn.getVarName());
        assertEquals("fieldName", brlConditionVariableColumn.getFactField());
        assertEquals("in", brlConditionVariableColumn.getOperator());
        assertNull(brlConditionVariableColumn.getDefaultValue());
    }

    @Test
    public void getDefinedVariables2() {

        doReturn(true).when(plugin).isNewColumn();
        doReturn(model).when(presenter).getModel();
        doReturn("header").when(editingCol).getHeader();

        final ArrayList<BRLConditionVariableColumn> childColumns = new ArrayList<>();
        final BRLConditionVariableColumn brlConditionVariableColumn1 = new BRLConditionVariableColumn("var1",
                                                                                "fieldType");
        final DTCellValue52 defaultValue = new DTCellValue52();
        brlConditionVariableColumn1.setDefaultValue(defaultValue);
        childColumns.add(brlConditionVariableColumn1);
        childColumns.add(new BRLConditionVariableColumn("var2",
                                                        "fieldType"));
        doReturn(childColumns).when(editingCol).getChildColumns();

        plugin.generateColumn();

        verify(editingCol).setChildColumns(listArgumentCaptor.capture());
        final List<BRLConditionVariableColumn> value = listArgumentCaptor.getValue();
        assertEquals(1, value.size());

        final BRLConditionVariableColumn brlConditionVariableColumn = value.get(0);

        assertEquals(defaultValue, brlConditionVariableColumn.getDefaultValue());
    }

    @Test
    public void cloneBRLConditionColumn() {
        final BRLConditionColumn original = new BRLConditionColumn();
        original.setHeader("header");
        original.setOperator("==");
        final BRLConditionColumn clone = plugin.clone(original);

        assertEquals("header", clone.getHeader());
        assertEquals("==", clone.getOperator());
    }

    @Test
    public void cloneVariable() {
        final BRLConditionVariableColumn original = new BRLConditionVariableColumn();
        original.setHeader("header");
        original.setOperator("==");
        final BRLConditionVariableColumn clone = plugin.cloneVariable(original);

        assertEquals("header", clone.getHeader());
        assertEquals("==", clone.getOperator());
    }
}


text:
package com.datastax.spark.connector.writer

import com.datastax.spark.connector.cql.TableDef
import com.datastax.spark.connector.mapper.ColumnMapper

/** Creates instances of [[RowWriter]] objects for the given row type `T`.
  * `RowWriterFactory` is the trait you need to implement if you want to support row representations
  * which cannot be simply mapped by a [[com.datastax.spark.connector.mapper.ColumnMapper ColumnMapper]]. */
trait RowWriterFactory[T] {

  /** Creates a new `RowWriter` instance.
    * @param table target table the user wants to write into
    * @param columnNames columns selected by the user; the user might wish to write only a subset of columns
    * @param aliasToColumnName custom mappings for some properties */
  def rowWriter(table: TableDef, columnNames: Seq[String], aliasToColumnName: Map[String, String]): RowWriter[T]
}

/** Provides a low-priority implicit `RowWriterFactory` able to write objects of any class for which
  * a [[com.datastax.spark.connector.mapper.ColumnMapper ColumnMapper]] is defined. */
trait LowPriorityRowWriterFactoryImplicits {
  implicit def defaultRowWriterFactory[T: ColumnMapper]: RowWriterFactory[T] = DefaultRowWriter.factory
}

/** Provides an implicit `RowWriterFactory` for saving [[com.datastax.spark.connector.CassandraRow CassandraRow]] objects. */
object RowWriterFactory extends LowPriorityRowWriterFactoryImplicits {
  implicit val genericRowWriterFactory = CassandraRowWriter.Factory
}


text:
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
/**
 * 1. Change the default font family in all browsers (opinionated).
 * 2. Correct the line height in all browsers.
 * 3. Prevent adjustments of font size after orientation changes in
 *    IE on Windows Phone and in iOS.
 */
/* Document
   ========================================================================== */
/* line 13, ../../../sass/_normalize.scss */
html {
  font-family: sans-serif;
  /* 1 */
  line-height: 1.15;
  /* 2 */
  -ms-text-size-adjust: 100%;
  /* 3 */
  -webkit-text-size-adjust: 100%;
  /* 3 */
}

/* Sections
   ========================================================================== */
/**
 * Remove the margin in all browsers (opinionated).
 */
/* line 27, ../../../sass/_normalize.scss */
body {
  margin: 0;
}

/**
 * Add the correct display in IE 9-.
 */
/* line 35, ../../../sass/_normalize.scss */
article,
aside,
footer,
header,
nav,
section {
  display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */
/* line 49, ../../../sass/_normalize.scss */
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */
/**
 * Add the correct display in IE 9-.
 * 1. Add the correct display in IE.
 */
/* line 62, ../../../sass/_normalize.scss */
figcaption,
figure,
main {
  /* 1 */
  display: block;
}

/**
 * Add the correct margin in IE 8.
 */
/* line 72, ../../../sass/_normalize.scss */
figure {
  margin: 1em 40px;
}

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
/* line 81, ../../../sass/_normalize.scss */
hr {
  box-sizing: content-box;
  /* 1 */
  height: 0;
  /* 1 */
  overflow: visible;
  /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
/* line 92, ../../../sass/_normalize.scss */
pre {
  font-family: monospace, monospace;
  /* 1 */
  font-size: 1em;
  /* 2 */
}

/* Text-level semantics
   ========================================================================== */
/**
 * 1. Remove the gray background on active links in IE 10.
 * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
 */
/* line 105, ../../../sass/_normalize.scss */
a {
  background-color: transparent;
  /* 1 */
  -webkit-text-decoration-skip: objects;
  /* 2 */
}

/**
 * Remove the outline on focused links when they are also active or hovered
 * in all browsers (opinionated).
 */
/* line 115, ../../../sass/_normalize.scss */
a:active,
a:hover {
  outline-width: 0;
}

/**
 * 1. Remove the bottom border in Firefox 39-.
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
/* line 125, ../../../sass/_normalize.scss */
abbr[title] {
  border-bottom: none;
  /* 1 */
  text-decoration: underline;
  /* 2 */
  text-decoration: underline dotted;
  /* 2 */
}

/**
 * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
 */
/* line 135, ../../../sass/_normalize.scss */
b,
strong {
  font-weight: inherit;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
/* line 144, ../../../sass/_normalize.scss */
b,
strong {
  font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
/* line 154, ../../../sass/_normalize.scss */
code,
kbd,
samp {
  font-family: monospace, monospace;
  /* 1 */
  font-size: 1em;
  /* 2 */
}

/**
 * Add the correct font style in Android 4.3-.
 */
/* line 165, ../../../sass/_normalize.scss */
dfn {
  font-style: italic;
}

/**
 * Add the correct background and color in IE 9-.
 */
/* line 173, ../../../sass/_normalize.scss */
mark {
  background-color: #ff0;
  color: #000;
}

/**
 * Add the correct font size in all browsers.
 */
/* line 182, ../../../sass/_normalize.scss */
small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
/* line 191, ../../../sass/_normalize.scss */
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

/* line 199, ../../../sass/_normalize.scss */
sub {
  bottom: -0.25em;
}

/* line 203, ../../../sass/_normalize.scss */
sup {
  top: -0.5em;
}

/* Embedded content
   ========================================================================== */
/**
 * Add the correct display in IE 9-.
 */
/* line 214, ../../../sass/_normalize.scss */
audio,
video {
  display: inline-block;
}

/**
 * Add the correct display in iOS 4-7.
 */
/* line 223, ../../../sass/_normalize.scss */
audio:not([controls]) {
  display: none;
  height: 0;
}

/**
 * Remove the border on images inside links in IE 10-.
 */
/* line 232, ../../../sass/_normalize.scss */
img {
  border-style: none;
}

/**
 * Hide the overflow in IE.
 */
/* line 240, ../../../sass/_normalize.scss */
svg:not(:root) {
  overflow: hidden;
}

/* Forms
   ========================================================================== */
/**
 * 1. Change the font styles in all browsers (opinionated).
 * 2. Remove the margin in Firefox and Safari.
 */
/* line 252, ../../../sass/_normalize.scss */
button,
input,
optgroup,
select,
textarea {
  font-family: sans-serif;
  /* 1 */
  font-size: 100%;
  /* 1 */
  line-height: 1.15;
  /* 1 */
  margin: 0;
  /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
/* line 268, ../../../sass/_normalize.scss */
button,
input {
  /* 1 */
  overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
/* line 278, ../../../sass/_normalize.scss */
button,
select {
  /* 1 */
  text-transform: none;
}

/**
 * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
 *    controls in Android 4.
 * 2. Correct the inability to style clickable types in iOS and Safari.
 */
/* line 289, ../../../sass/_normalize.scss */
button,
html [type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  /* 2 */
}

/**
 * Remove the inner border and padding in Firefox.
 */
/* line 300, ../../../sass/_normalize.scss */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */
/* line 312, ../../../sass/_normalize.scss */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Change the border, margin, and padding in all browsers (opinionated).
 */
/* line 323, ../../../sass/_normalize.scss */
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */
/* line 336, ../../../sass/_normalize.scss */
legend {
  box-sizing: border-box;
  /* 1 */
  color: inherit;
  /* 2 */
  display: table;
  /* 1 */
  max-width: 100%;
  /* 1 */
  padding: 0;
  /* 3 */
  white-space: normal;
  /* 1 */
}

/**
 * 1. Add the correct display in IE 9-.
 * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
/* line 350, ../../../sass/_normalize.scss */
progress {
  display: inline-block;
  /* 1 */
  vertical-align: baseline;
  /* 2 */
}

/**
 * Remove the default vertical scrollbar in IE.
 */
/* line 359, ../../../sass/_normalize.scss */
textarea {
  overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10-.
 * 2. Remove the padding in IE 10-.
 */
/* line 368, ../../../sass/_normalize.scss */
[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  /* 1 */
  padding: 0;
  /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
/* line 378, ../../../sass/_normalize.scss */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
/* line 388, ../../../sass/_normalize.scss */
[type="search"] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/**
 * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
 */
/* line 397, ../../../sass/_normalize.scss */
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */
/* line 407, ../../../sass/_normalize.scss */
::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/* Interactive
   ========================================================================== */
/*
 * Add the correct display in IE 9-.
 * 1. Add the correct display in Edge, IE, and Firefox.
 */
/* line 420, ../../../sass/_normalize.scss */
details,
menu {
  display: block;
}

/*
 * Add the correct display in all browsers.
 */
/* line 429, ../../../sass/_normalize.scss */
summary {
  display: list-item;
}

/* Scripting
   ========================================================================== */
/**
 * Add the correct display in IE 9-.
 */
/* line 440, ../../../sass/_normalize.scss */
canvas {
  display: inline-block;
}

/**
 * Add the correct display in IE.
 */
/* line 448, ../../../sass/_normalize.scss */
template {
  display: none;
}

/* Hidden
   ========================================================================== */
/**
 * Add the correct display in IE 10-.
 */
/* line 459, ../../../sass/_normalize.scss */
[hidden] {
  display: none;
}

/* line 1, ../../../sass/include/_typografy.scss */
body {
  background-color: #d5dedd;
  font-family: Callibri;
  font-size: 16px;
}

/* line 6, ../../../sass/include/_typografy.scss */
table, tr, td, th {
  border: 1px solid;
  border-collapse: collapse;
}
/* line 9, ../../../sass/include/_typografy.scss */
table td:hover, table a:hover, tr td:hover, tr a:hover, td td:hover, td a:hover, th td:hover, th a:hover {
  color: red;
}

/* line 13, ../../../sass/include/_typografy.scss */
h1 {
  font-size: 35px;
  color: red;
}

/* line 17, ../../../sass/include/_typografy.scss */
h2 a {
  font-size: 27px;
  color: #5A3B00;
  text-decoration: none;
}

/* line 22, ../../../sass/include/_typografy.scss */
h2 a:hover {
  color: #ff8300;
}

/* line 25, ../../../sass/include/_typografy.scss */
li, li a {
  text-decoration: none;
  list-style: none;
}

/* line 1, ../../../sass/include/_header.scss */
.header {
  background-color: #bddad8;
}
/* line 3, ../../../sass/include/_header.scss */
.header .logo-header {
  margin: 2px auto;
  width: 960px;
  height: 70px;
}
/* line 7, ../../../sass/include/_header.scss */
.header .logo-header .block-logo {
  float: left;
}
/* line 13, ../../../sass/include/_header.scss */
.header .logo-header .block-logo-rev {
  float: right;
}
/* line 16, ../../../sass/include/_header.scss */
.header .logo-header .main_menu {
  float: right;
  margin-top: 10px;
}
/* line 19, ../../../sass/include/_header.scss */
.header .logo-header .main_menu ul {
  list-style: none;
}
/* line 21, ../../../sass/include/_header.scss */
.header .logo-header .main_menu ul li {
  float: left;
  margin-left: 15px;
}
/* line 24, ../../../sass/include/_header.scss */
.header .logo-header .main_menu ul li a {
  text-decoration: none;
  color: #1E1718;
  background-image: url("/uploads/images/bkg_op_btn.png");
  padding: 2px 5px;
  border: 1px solid #F7B800;
  border-radius: 7px;
  font-family: "Calibri Light";
  font-weight: bold;
  text-transform: uppercase;
}
/* line 35, ../../../sass/include/_header.scss */
.header .logo-header .main_menu ul li a:hover {
  background-image: url("/uploads/images/bkg_op_btn_push.png");
}

/* line 1, ../../../sass/include/_footer.scss */
footer {
  background-color: #bddad8;
  font-family: "Calibri Light";
  font-size: 14px;
  text-align: center;
  padding: 10px 0;
  color: #A8A9B3;
}

/* line 1, ../../../sass/include/_main.scss */
.main_container {
  background-image: url("/uploads/images/bkg_op.png");
  width: 960px;
  margin: 30px auto;
}
/* line 5, ../../../sass/include/_main.scss */
.main_container #post_date {
  font-size: 12px;
}
/* line 8, ../../../sass/include/_main.scss */
.main_container .main_post {
  padding: 5px 3px;
  border-bottom: 2px solid #ff8300;
}
/* line 11, ../../../sass/include/_main.scss */
.main_container .main_post #main_post_next {
  color: #ff8300;
}

/* line 16, ../../../sass/include/_main.scss */
.main_pagination {
  color: mediumvioletred;
  text-align: center;
}
/* line 19, ../../../sass/include/_main.scss */
.main_pagination ul {
  list-style: none;
}
/* line 21, ../../../sass/include/_main.scss */
.main_pagination ul li {
  display: inline;
  padding: 0 3px;
}
/* line 25, ../../../sass/include/_main.scss */
.main_pagination ul #current_page {
  font-weight: bold;
  color: red;
}

/* line 1, ../../../sass/include/_form.scss */
form {
  margin: 20px;
}
/* line 3, ../../../sass/include/_form.scss */
form label {
  display: block;
  font-size: 20px;
  magrin: 10px;
}

/* line 9, ../../../sass/include/_form.scss */
#post_title {
  width: 50%;
}

/* line 12, ../../../sass/include/_form.scss */
#post_description {
  width: 100%;
  height: 200px;
}

/* line 16, ../../../sass/include/_form.scss */
#delete_btn {
  color: red;
}


text:
* [#193](https://github.com/babel/ember-cli-babel/pull/193) Allow configuration to opt-out of babel-preset-env.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
-
## v6.9.2 (2017-11-16)

#### :bug: Bug Fix
* [#192](https://github.com/babel/ember-cli-babel/pull/192) `Project.prototype.emberCLIVersion` is a function.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.9.1 (2017-11-16)

#### :bug: Bug Fix
* [#190](https://github.com/babel/ember-cli-babel/pull/190) Properly detect host ember-cli version.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.9.0 (2017-11-08)

#### :rocket: Enhancement
* [#176](https://github.com/babel/ember-cli-babel/pull/176) Blacklists `@ember/string` if dependency is present. ([@locks](https://github.com/locks))

#### :memo: Documentation
* [#185](https://github.com/babel/ember-cli-babel/pull/185) Add CHANGELOG file. ([@Turbo87](https://github.com/Turbo87))

#### Committers: 3
- Alvin Crespo ([alvincrespo](https://github.com/alvincrespo))
- Ricardo Mendes ([locks](https://github.com/locks))
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))

## v6.8.2 (2017-08-30)

#### :bug: Bug Fix
* [#180](https://github.com/babel/ember-cli-babel/pull/180) Update "babel-plugin-ember-modules-api-polyfill" to v2.0.1. ([@Turbo87](https://github.com/Turbo87))

#### Committers: 1
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))

## v6.8.0 (2017-08-15)

#### :bug: Bug Fix
* [#177](https://github.com/babel/ember-cli-babel/pull/177) Update minimum version of babel-plugin-ember-modules-api-polyfill.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.7.2 (2017-08-07)

#### :rocket: Enhancement
* [#175](https://github.com/babel/ember-cli-babel/pull/175) Update `amd-name-resolver` version to enable parallel babel transpile. ([@mikrostew](https://github.com/mikrostew))

#### :house: Internal
* [#173](https://github.com/babel/ember-cli-babel/pull/173) CI: Deploy tags automatically. ([@Turbo87](https://github.com/Turbo87))

#### Committers: 2
- Michael Stewart ([mikrostew](https://github.com/mikrostew))
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))

## v6.7.1 (2017-08-02)

#### :house: Internal
* [#174](https://github.com/babel/ember-cli-babel/pull/174) update broccoli-babel-transpiler dependency to 6.1.2. ([@mikrostew](https://github.com/mikrostew))

#### Committers: 1
- Michael Stewart ([mikrostew](https://github.com/mikrostew))

## v6.7.0 (2017-08-02)

#### :rocket: Enhancement
* [#172](https://github.com/babel/ember-cli-babel/pull/172) Update "broccoli-babel-transpiler" to v6.1.1. ([@Turbo87](https://github.com/Turbo87))

#### :memo: Documentation
* [#165](https://github.com/babel/ember-cli-babel/pull/165) Include examples for where to put options. ([@dfreeman](https://github.com/dfreeman))

#### :house: Internal
* [#164](https://github.com/babel/ember-cli-babel/pull/164) Improve acceptance tests and Ember syntax. ([@villander](https://github.com/villander))
* [#167](https://github.com/babel/ember-cli-babel/pull/167) ember-cli 2.14.0 upgrade + eslint. ([@kellyselden](https://github.com/kellyselden))
* [#163](https://github.com/babel/ember-cli-babel/pull/163) Removes the flag MODEL_FACTORY_INJECTIONS. ([@villander](https://github.com/villander))

#### Committers: 4
- Dan Freeman ([dfreeman](https://github.com/dfreeman))
- Kelly Selden ([kellyselden](https://github.com/kellyselden))
- Michael Villander ([villander](https://github.com/villander))
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))

## v6.6.0 (2017-07-06)

#### :bug: Bug Fix
* [#161](https://github.com/babel/ember-cli-babel/pull/161) Avoid conflicting transforms for @ember/debug.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.5.0 (2017-07-03)

#### :rocket: Enhancement
* [#159](https://github.com/babel/ember-cli-babel/pull/159) Add emberjs/rfcs#176 support by default.. ([@rwjblue](https://github.com/rwjblue))

#### :house: Internal
* [#155](https://github.com/babel/ember-cli-babel/pull/155) only support supported versions of node. ([@stefanpenner](https://github.com/stefanpenner))

#### Committers: 2
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))

## v6.4.2 (2017-07-02)

#### :rocket: Enhancement
* [#158](https://github.com/babel/ember-cli-babel/pull/158) Respect babel sourceMaps option. ([@dwickern](https://github.com/dwickern))

#### :memo: Documentation
* [#157](https://github.com/babel/ember-cli-babel/pull/157) Add info on adding custom plugins.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 2
- Derek Wickern ([dwickern](https://github.com/dwickern))
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.4.1 (2017-06-01)

#### :rocket: Enhancement
* [#154](https://github.com/babel/ember-cli-babel/pull/154) Misc Updates. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.4.0 (2017-06-01)

#### :house: Internal
* [#145](https://github.com/babel/ember-cli-babel/pull/145) Disable loading configuration from `.babelrc`.. ([@aheuermann](https://github.com/aheuermann))
* [#152](https://github.com/babel/ember-cli-babel/pull/152) [Closes [#150](https://github.com/babel/ember-cli-babel/issues/150)] update babel-preset-env. ([@stefanpenner](https://github.com/stefanpenner))

#### Committers: 2
- Andrew Heuermann ([aheuermann](https://github.com/aheuermann))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))

## v6.2.0 (2017-05-31)

#### :rocket: Enhancement
* [#148](https://github.com/babel/ember-cli-babel/pull/148) Add node 8 support. ([@stefanpenner](https://github.com/stefanpenner))

#### :memo: Documentation
* [#139](https://github.com/babel/ember-cli-babel/pull/139) Specifically call out the `@glimmer/env` import path.. ([@rwjblue](https://github.com/rwjblue))
* [#138](https://github.com/babel/ember-cli-babel/pull/138) README: Add missing return type. ([@Turbo87](https://github.com/Turbo87))

#### :house: Internal
* [#144](https://github.com/babel/ember-cli-babel/pull/144) upgrade all the deps. ([@stefanpenner](https://github.com/stefanpenner))

#### Committers: 3
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))

## v6.1.0 (2017-04-28)

#### :rocket: Enhancement
* [#133](https://github.com/babel/ember-cli-babel/pull/133) Add debug tooling babel plugins.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.0.0 (2017-04-22)

#### :boom: Breaking Change
* [#115](https://github.com/babel/ember-cli-babel/pull/115) Babel 6. ([@rwjblue](https://github.com/rwjblue))

#### :rocket: Enhancement
* [#131](https://github.com/babel/ember-cli-babel/pull/131) Expose addon powerz. ([@stefanpenner](https://github.com/stefanpenner))
* [#126](https://github.com/babel/ember-cli-babel/pull/126) Expose a public mechanism to transpile a tree.. ([@rwjblue](https://github.com/rwjblue))
* [#121](https://github.com/babel/ember-cli-babel/pull/121) Allow babel options to be passed through to babel-preset-env.. ([@rwjblue](https://github.com/rwjblue))
* [#120](https://github.com/babel/ember-cli-babel/pull/120) Expose `postTransformPlugins` to be positioned after `preset-env` plugins.. ([@rwjblue](https://github.com/rwjblue))
* [#115](https://github.com/babel/ember-cli-babel/pull/115) Babel 6. ([@rwjblue](https://github.com/rwjblue))

#### :bug: Bug Fix
* [#132](https://github.com/babel/ember-cli-babel/pull/132) Remove debugging console.log statement in index.js. ([@pgrippi](https://github.com/pgrippi))
* [#125](https://github.com/babel/ember-cli-babel/pull/125) Fix clobbering behavior with babel vs babel6 config.. ([@rwjblue](https://github.com/rwjblue))
* [#123](https://github.com/babel/ember-cli-babel/pull/123) Only pass provided options to babel-preset-env.. ([@rwjblue](https://github.com/rwjblue))
* [#122](https://github.com/babel/ember-cli-babel/pull/122) Properly forward the browsers targets to ember-preset-env. ([@kanongil](https://github.com/kanongil))
* [#117](https://github.com/babel/ember-cli-babel/pull/117) Fix issues with isPluginRequired.. ([@rwjblue](https://github.com/rwjblue))

#### :memo: Documentation
* [#128](https://github.com/babel/ember-cli-babel/pull/128) First pass at README updates for 6.. ([@rwjblue](https://github.com/rwjblue))
* [#118](https://github.com/babel/ember-cli-babel/pull/118) Add code snippet for enabling polyfill. ([@li-xinyang](https://github.com/li-xinyang))
* [#113](https://github.com/babel/ember-cli-babel/pull/113) Update README.md. ([@marpo60](https://github.com/marpo60))

#### :house: Internal
* [#124](https://github.com/babel/ember-cli-babel/pull/124) Add basic sanity test to confirm babel-preset-env is working.. ([@rwjblue](https://github.com/rwjblue))
* [#116](https://github.com/babel/ember-cli-babel/pull/116) Remove temporary fork after babel release. ([@cibernox](https://github.com/cibernox))

#### Committers: 7
- Gil Pedersen ([kanongil](https://github.com/kanongil))
- Marcelo Dominguez ([marpo60](https://github.com/marpo60))
- Miguel Camba ([cibernox](https://github.com/cibernox))
- Peter Grippi ([pgrippi](https://github.com/pgrippi))
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))
- Xinyang Li ([li-xinyang](https://github.com/li-xinyang))

## v6.0.0-beta.11 (2017-04-20)

#### :bug: Bug Fix
* [#132](https://github.com/babel/ember-cli-babel/pull/132) Remove debugging console.log statement in index.js. ([@pgrippi](https://github.com/pgrippi))

#### Committers: 1
- Peter Grippi ([pgrippi](https://github.com/pgrippi))

## v6.0.0-beta.10 (2017-04-19)

#### :rocket: Enhancement
* [#131](https://github.com/babel/ember-cli-babel/pull/131) Expose addon powerz. ([@stefanpenner](https://github.com/stefanpenner))

#### :memo: Documentation
* [#128](https://github.com/babel/ember-cli-babel/pull/128) First pass at README updates for 6.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 2
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))

## v6.0.0-beta.9 (2017-03-22)

#### :rocket: Enhancement
* [#126](https://github.com/babel/ember-cli-babel/pull/126) Expose a public mechanism to transpile a tree.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.0.0-beta.8 (2017-03-21)

#### :bug: Bug Fix
* [#125](https://github.com/babel/ember-cli-babel/pull/125) Fix clobbering behavior with babel vs babel6 config.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.0.0-beta.7 (2017-03-21)

#### :bug: Bug Fix
* [#123](https://github.com/babel/ember-cli-babel/pull/123) Only pass provided options to babel-preset-env.. ([@rwjblue](https://github.com/rwjblue))
* [#122](https://github.com/babel/ember-cli-babel/pull/122) Properly forward the browsers targets to ember-preset-env. ([@kanongil](https://github.com/kanongil))

#### :house: Internal
* [#124](https://github.com/babel/ember-cli-babel/pull/124) Add basic sanity test to confirm babel-preset-env is working.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 2
- Gil Pedersen ([kanongil](https://github.com/kanongil))
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.0.0-beta.6 (2017-03-20)

#### :rocket: Enhancement
* [#121](https://github.com/babel/ember-cli-babel/pull/121) Allow babel options to be passed through to babel-preset-env.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.0.0-beta.5 (2017-03-15)

#### :rocket: Enhancement
* [#120](https://github.com/babel/ember-cli-babel/pull/120) Expose `postTransformPlugins` to be positioned after `preset-env` plugins.. ([@rwjblue](https://github.com/rwjblue))

#### :bug: Bug Fix
* [#117](https://github.com/babel/ember-cli-babel/pull/117) Fix issues with isPluginRequired.. ([@rwjblue](https://github.com/rwjblue))

#### :memo: Documentation
* [#118](https://github.com/babel/ember-cli-babel/pull/118) Add code snippet for enabling polyfill. ([@li-xinyang](https://github.com/li-xinyang))

#### Committers: 2
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
- Xinyang Li ([li-xinyang](https://github.com/li-xinyang))

## v6.0.0-beta.3 (2017-03-13)

#### :boom: Breaking Change
* [#115](https://github.com/babel/ember-cli-babel/pull/115) Babel 6. ([@rwjblue](https://github.com/rwjblue))

#### :rocket: Enhancement
* [#115](https://github.com/babel/ember-cli-babel/pull/115) Babel 6. ([@rwjblue](https://github.com/rwjblue))

#### :house: Internal
* [#116](https://github.com/babel/ember-cli-babel/pull/116) Remove temporary fork after babel release. ([@cibernox](https://github.com/cibernox))

#### Committers: 2
- Miguel Camba ([cibernox](https://github.com/cibernox))
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v6.0.0-beta.1 (2017-04-20)

#### :rocket: Enhancement
* [#131](https://github.com/babel/ember-cli-babel/pull/131) Expose addon powerz. ([@stefanpenner](https://github.com/stefanpenner))

#### :bug: Bug Fix
* [#132](https://github.com/babel/ember-cli-babel/pull/132) Remove debugging console.log statement in index.js. ([@pgrippi](https://github.com/pgrippi))

#### :memo: Documentation
* [#128](https://github.com/babel/ember-cli-babel/pull/128) First pass at README updates for 6.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 3
- Peter Grippi ([pgrippi](https://github.com/pgrippi))
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))

## v6.0.0-alpha.1 (2017-03-06)

#### :memo: Documentation
* [#113](https://github.com/babel/ember-cli-babel/pull/113) Update README.md. ([@marpo60](https://github.com/marpo60))

#### Committers: 1
- Marcelo Dominguez ([marpo60](https://github.com/marpo60))

## v5.2.4 (2017-02-09)

#### :bug: Bug Fix
* [#111](https://github.com/babel/ember-cli-babel/pull/111) Fix for undefined parent error. ([@hsdwayne](https://github.com/hsdwayne))

#### Committers: 1
- [hsdwayne](https://github.com/hsdwayne)

## v5.2.3 (2017-02-06)

#### :house: Internal
* [#110](https://github.com/babel/ember-cli-babel/pull/110) Update minimum version of broccoli-babel-transpiler.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v5.2.2 (2017-02-04)

#### :memo: Documentation
* [#107](https://github.com/babel/ember-cli-babel/pull/107) `Brocfile.js` -> `ember-cli-build.js`. ([@twokul](https://github.com/twokul))

#### :house: Internal
* [#108](https://github.com/babel/ember-cli-babel/pull/108) Add more detailed annotation.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 2
- Alex Navasardyan ([twokul](https://github.com/twokul))
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v5.2.1 (2016-12-07)

#### :bug: Bug Fix
* [#106](https://github.com/babel/ember-cli-babel/pull/106) Fix feature detection bug for setupPreprocessorRegistry.. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 1
- Robert Jackson ([rwjblue](https://github.com/rwjblue))

## v5.2.0 (2016-12-07)

#### :rocket: Enhancement
* [#103](https://github.com/babel/ember-cli-babel/pull/103) Add appveyor badge. ([@stefanpenner](https://github.com/stefanpenner))
* [#100](https://github.com/babel/ember-cli-babel/pull/100) Add on example options how to disable some transformations. ([@cibernox](https://github.com/cibernox))

#### :house: Internal
* [#105](https://github.com/babel/ember-cli-babel/pull/105) Move custom options to "ember-cli-babel" options hash. ([@Turbo87](https://github.com/Turbo87))
* [#104](https://github.com/babel/ember-cli-babel/pull/104) Replace deprecated version checker method call. ([@Turbo87](https://github.com/Turbo87))
* [#101](https://github.com/babel/ember-cli-babel/pull/101) package.json cleanup. ([@Turbo87](https://github.com/Turbo87))

#### Committers: 4
- Greenkeeper ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
- Miguel Camba ([cibernox](https://github.com/cibernox))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))

## v5.1.10 (2016-08-15)

#### :rocket: Enhancement
* [#89](https://github.com/babel/ember-cli-babel/pull/89) Fix issue with app.import being undefined. ([@sandersky](https://github.com/sandersky))

#### Committers: 1
- Matthew Dahl ([sandersky](https://github.com/sandersky))

## v5.1.9 (2016-08-12)

#### :rocket: Enhancement
* [#86](https://github.com/babel/ember-cli-babel/pull/86) Pass console object in to broccoli-babel-transpiler.. ([@rwjblue](https://github.com/rwjblue))
* [#81](https://github.com/babel/ember-cli-babel/pull/81) LazilyRequire broccoli-funnel. ([@stefanpenner](https://github.com/stefanpenner))
* [#78](https://github.com/babel/ember-cli-babel/pull/78) Update "ember-cli" to v1.13.8. ([@Turbo87](https://github.com/Turbo87))

#### :bug: Bug Fix
* [#88](https://github.com/babel/ember-cli-babel/pull/88) Prevent errors with console options under older ember-cli's.. ([@rwjblue](https://github.com/rwjblue))
* [#77](https://github.com/babel/ember-cli-babel/pull/77) Pin jQuery to v1.11.3 to fix builds. ([@Turbo87](https://github.com/Turbo87))

#### :house: Internal
* [#83](https://github.com/babel/ember-cli-babel/pull/83) Adds .npmignore and whitelists js files. ([@twokul](https://github.com/twokul))
* [#79](https://github.com/babel/ember-cli-babel/pull/79) upgrade ember-cli to 2.6.2. ([@stefanpenner](https://github.com/stefanpenner))

#### Committers: 8
- Alex Navasardyan ([twokul](https://github.com/twokul))
- Brian Sipple ([BrianSipple](https://github.com/BrianSipple))
- Greenkeeper ([greenkeeperio-bot](https://github.com/greenkeeperio-bot))
- Kelvin Luck ([vitch](https://github.com/vitch))
- Pat O'Callaghan ([patocallaghan](https://github.com/patocallaghan))
- Robert Jackson ([rwjblue](https://github.com/rwjblue))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))
- Tobias Bieniek ([Turbo87](https://github.com/Turbo87))

## v5.1.5 (2015-08-25)

#### :rocket: Enhancement
* [#51](https://github.com/babel/ember-cli-babel/pull/51) Using broccoli-babel-transpiler latest version. ([@msranade](https://github.com/msranade))

#### Committers: 3
- Gordon Kristan ([gordonkristan](https://github.com/gordonkristan))
- Manish Ranade ([msranade](https://github.com/msranade))
- Stefan Penner ([stefanpenner](https://github.com/stefanpenner))

## v5.1.1 (2016-08-15)

#### :rocket: Enhancement
* [#89](https://github.com/babel/ember-cli-babel/pull/89) Fix issue with app.import being undefined. ([@sandersky](https://github.com/sandersky))

#### Committers: 1
- Matthew Dahl ([sandersky](https://github.com/sandersky))


text:
#import <XXUnknownSuperclass.h> // Unknown library
#import "FBLoginDialogDelegate.h"

@class NSThread, NSMutableArray, FBLoginDialog, NSArray, FBAccessTokenData, FBSessionTokenCachingStrategy, NSString, FBSessionAppEventsState, NSDate, FBSessionAuthLogger;

@interface FBSession : XXUnknownSuperclass <FBLoginDialogDelegate> {
	NSString* _urlSchemeSuffix;
	BOOL _isInStateTransition;
	int _loginTypeOfPendingOpenUrlCallback;
	int _defaultDefaultAudience;
	int _loginBehavior;
	NSMutableArray* _declinedPermissions;
	NSArray* _requestedReauthPermissions;
	BOOL _isRepairing;
	int _state;
	NSString* _appID;
	FBAccessTokenData* _accessTokenData;
	NSArray* _initializedPermissions;
	int _lastRequestedSystemAudience;
	FBSessionTokenCachingStrategy* _tokenCachingStrategy;
	NSDate* _attemptedRefreshDate;
	NSDate* _attemptedPermissionsRefreshDate;
	id _loginHandler;
	id _reauthorizeHandler;
	FBLoginDialog* _loginDialog;
	NSThread* _affinitizedThread;
	FBSessionAppEventsState* _appEventsState;
	FBSessionAuthLogger* _authLogger;
}
@property(readonly, copy) NSString* accessToken;
@property(copy) FBAccessTokenData* accessTokenData;
@property(retain) NSThread* affinitizedThread;
@property(readonly, assign) NSString* appBaseUrl;
@property(retain) FBSessionAppEventsState* appEventsState;
@property(copy) NSString* appID;
@property(copy) NSDate* attemptedPermissionsRefreshDate;
@property(copy) NSDate* attemptedRefreshDate;
@property(retain) FBSessionAuthLogger* authLogger;
@property(readonly, copy) NSString* debugDescription;
@property(readonly, copy) NSArray* declinedPermissions;
@property(readonly, copy) NSString* description;
@property(readonly, copy) NSDate* expirationDate;
@property(readonly, assign) unsigned hash;
@property(copy) NSArray* initializedPermissions;
@property(readonly, assign) BOOL isOpen;
@property(assign) BOOL isRepairing;
@property(assign) int lastRequestedSystemAudience;
@property(retain) FBLoginDialog* loginDialog;
@property(copy) id loginHandler;
@property(readonly, assign) int loginType;
@property(readonly, copy) NSArray* permissions;
@property(copy) id reauthorizeHandler;
@property(assign) int state;
@property(readonly, assign) Class superclass;
@property(retain) FBSessionTokenCachingStrategy* tokenCachingStrategy;
@property(copy) NSString* urlSchemeSuffix;
+ (id)activeSession;
+ (id)activeSessionIfExists;
+ (id)activeSessionIfOpen;
+ (BOOL)automaticallyNotifiesObserversForKey:(id)key;
+ (id)defaultAppID;
+ (id)defaultUrlSchemeSuffix;
+ (BOOL)openActiveSessionWithAllowLoginUI:(BOOL)allowLoginUI;
+ (BOOL)openActiveSessionWithPermissions:(id)permissions allowLoginUI:(BOOL)ui allowSystemAccount:(BOOL)account isRead:(BOOL)read defaultAudience:(int)audience completionHandler:(id)handler;
+ (BOOL)openActiveSessionWithPermissions:(id)permissions allowLoginUI:(BOOL)ui completionHandler:(id)handler;
+ (BOOL)openActiveSessionWithPermissions:(id)permissions allowLoginUI:(BOOL)ui defaultAudience:(int)audience completionHandler:(id)handler;
+ (BOOL)openActiveSessionWithPermissions:(id)permissions allowLoginUI:(BOOL)ui loginBehavior:(int)behavior isRead:(BOOL)read defaultAudience:(int)audience completionHandler:(id)handler;
+ (BOOL)openActiveSessionWithPermissions:(id)permissions loginBehavior:(int)behavior isRead:(BOOL)read defaultAudience:(int)audience completionHandler:(id)handler;
+ (BOOL)openActiveSessionWithPublishPermissions:(id)publishPermissions defaultAudience:(int)audience allowLoginUI:(BOOL)ui completionHandler:(id)handler;
+ (BOOL)openActiveSessionWithReadPermissions:(id)readPermissions allowLoginUI:(BOOL)ui completionHandler:(id)handler;
+ (void)renewSystemCredentials:(id)credentials;
+ (id)sdkSurfacedErrorForNativeLoginError:(id)nativeLoginError;
+ (id)setActiveSession:(id)session;
+ (id)setActiveSession:(id)session userInfo:(id)info;
+ (void)setDefaultAppID:(id)anId;
+ (void)setDefaultUrlSchemeSuffix:(id)suffix;
- (id)init;
- (id)initWithAppID:(id)appID permissions:(id)permissions defaultAudience:(int)audience urlSchemeSuffix:(id)suffix tokenCacheStrategy:(id)strategy;
- (id)initWithAppID:(id)appID permissions:(id)permissions urlSchemeSuffix:(id)suffix tokenCacheStrategy:(id)strategy;
- (id)initWithPermissions:(id)permissions;
- (void)authorizeRequestWasImplicitlyCancelled;
- (BOOL)authorizeUsingFacebookApplication:(id)application;
- (void)authorizeUsingLoginDialog:(id)dialog;
- (BOOL)authorizeUsingSafari:(id)safari;
- (void)authorizeUsingSystemAccountStore:(id)store defaultAudience:(int)audience isReauthorize:(BOOL)reauthorize;
- (void)authorizeWithPermissions:(id)permissions behavior:(int)behavior defaultAudience:(int)audience isReauthorize:(BOOL)reauthorize;
- (void)authorizeWithPermissions:(id)permissions defaultAudience:(int)audience integratedAuth:(BOOL)auth FBAppAuth:(BOOL)auth4 safariAuth:(BOOL)auth5 fallback:(BOOL)fallback isReauthorize:(BOOL)reauthorize canFetchAppSettings:(BOOL)settings;
- (void)callReauthorizeHandlerAndClearState:(id)state updateDeclinedPermissions:(BOOL)permissions;
- (void)checkThreadAffinity;
- (void)clearAffinitizedThread;
- (void)close;
- (void)closeAndClearTokenInformation;
- (void)closeAndClearTokenInformation:(id)information;
- (void)completeReauthorizeWithAccessToken:(id)accessToken expirationDate:(id)date permissions:(id)permissions declinedPermissions:(id)permissions4;
- (void)dealloc;
- (id)declinedPermissionsForRequestedPermissions:(id)requestedPermissions grantedPermissions:(id)permissions declinedPermissions:(id)permissions3;
- (id)errorLoginFailedWithReason:(id)reason errorCode:(id)code innerError:(id)error;
- (id)errorLoginFailedWithReason:(id)reason errorCode:(id)code innerError:(id)error localizedDescription:(id)description;
- (void)fbDialogLogin:(id)login expirationDate:(id)date params:(id)params;
- (void)fbDialogNotLogin:(BOOL)login;
- (id)getSystemAccountStoreAdapter;
- (BOOL)handleAuthorizationCallbacks:(id)callbacks params:(id)params loginType:(int)type;
- (BOOL)handleAuthorizationOpen:(id)open accessToken:(id)token loginType:(int)type;
- (void)handleDidBecomeActive;
- (void)handleDidCompleteNativeLoginForAppCall:(id)handle;
- (BOOL)handleOpenURL:(id)url;
- (BOOL)handleReauthorize:(id)reauthorize accessToken:(id)token;
- (void)handleRefreshPermissions:(id)permissions;
- (BOOL)hasGranted:(id)granted;
- (BOOL)initializeFromCachedToken:(id)cachedToken withPermissions:(id)permissions;
- (BOOL)isURLSchemeRegistered;
- (id)jsonClientStateWithDictionary:(id)dictionary;
- (void)logIntegratedAuthAppEvent:(id)event permissions:(id)permissions;
- (BOOL)openFromAccessTokenData:(id)accessTokenData completionHandler:(id)handler;
- (BOOL)openFromAccessTokenData:(id)accessTokenData completionHandler:(id)handler raiseExceptionIfInvalidState:(BOOL)state;
- (void)openWithBehavior:(int)behavior completionHandler:(id)handler;
- (void)openWithCompletionHandler:(id)completionHandler;
- (void)reauthorizeWithPermissions:(id)permissions behavior:(int)behavior completionHandler:(id)handler;
- (void)reauthorizeWithPermissions:(id)permissions isRead:(BOOL)read behavior:(int)behavior defaultAudience:(int)audience completionHandler:(id)handler;
- (void)reauthorizeWithPublishPermissions:(id)publishPermissions defaultAudience:(int)audience completionHandler:(id)handler;
- (void)reauthorizeWithReadPermissions:(id)readPermissions completionHandler:(id)handler;
- (void)refreshAccessToken:(id)token expirationDate:(id)date;
- (id)refreshDate;
- (void)refreshPermissionsWithCompletionHandler:(id)completionHandler;
- (void)repairWithHandler:(id)handler;
- (void)requestNewPublishPermissions:(id)permissions defaultAudience:(int)audience completionHandler:(id)handler;
- (void)requestNewReadPermissions:(id)permissions completionHandler:(id)handler;
- (void)retryableAuthorizeWithPermissions:(id)permissions defaultAudience:(int)audience integratedAuth:(BOOL)auth FBAppAuth:(BOOL)auth4 safariAuth:(BOOL)auth5 fallback:(BOOL)fallback isReauthorize:(BOOL)reauthorize canFetchAppSettings:(BOOL)settings;
- (void)setLoginTypeOfPendingOpenUrlCallback:(int)pendingOpenUrlCallback;
- (void)setStateChangeHandler:(id)handler;
- (BOOL)shouldExtendAccessToken;
- (BOOL)shouldRefreshPermissions;
- (void)transitionAndCallHandlerWithState:(int)state error:(id)error tokenData:(id)data shouldCache:(BOOL)cache;
- (BOOL)transitionToState:(int)state withAccessTokenData:(id)accessTokenData shouldCache:(BOOL)cache;
- (BOOL)tryOpenURL:(id)url;
- (void)validateReauthorizedAccessToken:(id)token expirationDate:(id)date;
@end


text:
layout: IssuesMethods
title: 'Get-Issue-Types'
method: GetIssueTypes
---


text:
"""SRW declarative API bending magnet example

Bending magnet emitting in x-ray region for a multi-electron emission
(by convolution)
"""
from __future__ import absolute_import, division, print_function
from pykern.pkdebug import pkdc, pkdp

import copy
import itertools
import numpy as np
import srwlib as srw
import time

from pykern import pkarray
from pykern import pkcollections

#: Smallest number we can reasonably compare
_EPSILON = 1e-300

#: Default propagation parameters
_PROPAGATION = pkcollections.OrderedMapping(
    'auto_resize_before_propagation', True,
    'auto_resize_after_propagation', True,
    'auto_resize_relative_precision', 1.,
    'allow_semi_analytical_phase_treatment', False,
    'resize_on_fourier_side_using_fft', False,
    'horizontal_range_factor_when_resizing', 1.,
    'horizontal_resolution_factor_when_resizing', 1.,
    'vertical_range_factor_when_resizing', 1.,
    'vertical_resolution_factor_when_resizing', 1.,
    'unimplemented_0', 0,
    'unimplemented_1', 0,
    'unimplemented_2', 0,
)

_ELECTRON_BEAM = pkcollections.OrderedMapping(
    'average_current', .5,
    'moment_x', 0.,
    'moment_y', 0.,
    'moment_z', 0.,
    'moment_xp', 0.,
    'moment_yp', 0.,
    'moment_gamma', None,
    'moment_xx', 0.,
    'moment_xxp', 0.,
    'moment_xpxp', 0.,
    'moment_yy', 0.0,
    'eBeam.arStatMom2', 0.,
    'eBeam.arStatMom2', 0.,
    'moment_ypyp', 0.,
    'energy_spread_squared', 0.,
)

def main():
    wavefront = test_simulation()
    mesh = copy.deepcopy(wavefront.mesh)
    intensity = pkarray.new_float([0] * mesh.nx * mesh.ny)
    srw.srwl.CalcIntFromElecField(intensity, wavefront, 6, 1, 3, mesh.eStart, 0, 0)
    import matplotlib.pyplot as plt
    dim_x = np.linspace(mesh.xStart, mesh.xFin, mesh.nx)
    dim_y = np.linspace(mesh.yStart, mesh.yFin, mesh.ny)
    intensity = np.array(intensity).reshape((mesh.ny,mesh.nx))
    plt.pcolormesh(dim_x, dim_y, intensity)
    plt.title('Real space for infrared example')
    plt.colorbar()
    plt.show()

def simulate():
    t0_setting = time.time()
    B = 0.4
    LeffBM = 4.
    BM = srw.SRWLMagFldM(B, 1, 'n', LeffBM)
    magnetic_field_container = srw.SRWLMagFldC(
        [BM],
        pkarray.new_double([0]),
        pkarray.new_double([0]),
        pkarray.new_double([0]),
    )

    eBeam = srw.SRWLPartBeam()
    eBeam.Iavg = 0.5
    eBeam.partStatMom1.x = 0.
    eBeam.partStatMom1.y = 0.
    eBeam.partStatMom1.z = 0.
    eBeam.partStatMom1.xp = 0.
    eBeam.partStatMom1.yp = 0.
    eBeam.partStatMom1.gamma = 3./0.51099890221e-03
    eBeam.arStatMom2[0] = 127.346e-06 ** 2
    eBeam.arStatMom2[1] = -10.85e-09
    eBeam.arStatMom2[2] = 92.3093e-06 ** 2
    eBeam.arStatMom2[3] = 13.4164e-06 ** 2
    eBeam.arStatMom2[4] = 0.0072e-09
    eBeam.arStatMom2[5] = 0.8022e-06 ** 2
    eBeam.arStatMom2[10] = 0.89e-03 ** 2
    wavefront = srw.SRWLWfr()
    wavefront.allocate(1, 10, 10)
    distSrcLens = 5.
    wavefront.mesh.zStart = distSrcLens
    wavefront.mesh.eStart = 0.5 * 0.123984
    wavefront.mesh.eFin = wavefront.mesh.eStart
    horAng = 0.1
    wavefront.mesh.xStart = -0.5 * horAng * distSrcLens
    wavefront.mesh.xFin = 0.5 * horAng * distSrcLens
    verAng = 0.02
    wavefront.mesh.yStart = -0.5 * verAng * distSrcLens
    wavefront.mesh.yFin = 0.5 * verAng * distSrcLens
    wavefront.partBeam = eBeam
    distLensImg = distSrcLens
    focLen = wavefront.mesh.zStart * distLensImg / (distSrcLens + distLensImg)
    optBL = _container(
        srw.SRWLOptL(_Fx=focLen, _Fy=focLen),
        dict(
            horizontal_resolution_factor_when_resizing=2.,
            vertical_resolution_factor_when_resizing=2.,
        ),
        srw.SRWLOptD(distLensImg),
        {},
    )
    pkdc('parameters done in {}s', round(time.time() - t0_setting))
    meth = 2
    relPrec = 0.01
    zStartInteg = 0
    zEndInteg = 0
    npTraj = 20000
    useTermin = 1
    sampFactNxNyForProp = 0.7
    arPrecSR = [meth, relPrec, zStartInteg, zEndInteg, npTraj, useTermin, sampFactNxNyForProp]
    pkdc('Performing initial electric field calculation...')
    srw.srwl.CalcElecFieldSR(wavefront, 0, magnetic_field_container, arPrecSR)
    pkdc('Extracting intensity from calculated electric field and saving it to file(s)')
    mesh0 = copy.deepcopy(wavefront.mesh)
    arI0 = pkarray.new_float([0] * mesh0.nx * mesh0.ny)
    srw.srwl.CalcIntFromElecField(arI0, wavefront, 6, 0, 3, mesh0.eStart, 0, 0)
    pkdc('Simulating single-electron electric field wavefront propagation...')
    srw.srwl.PropagElecField(wavefront, optBL)
    return wavefront

def test_simulation():
    wavefront = simulate()
    checksum = np.sum( np.abs(wavefront.arEx) ) + np.abs( np.sum(wavefront.arEy) )
    pkdc('checksum = {:f}', checksum)
    _assert(11845644288, checksum)
    return wavefront

def _assert(expect, actual, expected_error=0.01):
    if _EPSILON > abs(expect):
        assert _EPSILON > abs(actual)
        return
    if _EPSILON <= abs(actual) and expected_error > abs(expect/actual - 1):
        return
    raise AssertionError(
        'expect {} != {} actual'.format(expect, actual))

def _container(*args):
    """Create a container based

    Args:
        element (SRWLOptL, SRWLOptD, etc.): optical element
        propagation (dict): propagation param modifications
    """
    elements = []
    propagations = []
    for element, propagation in zip(args[0::2], args[1::2]):
        elements.append(element)
        propagations.append(_propagation(propagation))
    assert len(elements)
    return srw.SRWLOptC(elements, propagations)

def _propagation(values):
    merged = copy.deepcopy(_PROPAGATION)
    pkcollections.mapping_merge(merged, values)
    return pkcollections.map_values(
        merged,
        lambda v: int(v) if isinstance(v, bool) else v,
    )

if __name__ == "__main__":
    main()


text:
FROM node:latest
ENV NPM_CONFIG_LOGLEVEL warn

# 应用在容器中的路径
RUN mkdir -p /home/code/featherjs \
    && mkdir -p /home/code/featherjs/backend \
    && mkdir -p /home/code/featherjs/frontend

WORKDIR /home/code/featherjs/backend

# 安装项目依赖
COPY backend/package.json /home/code/featherjs/backend
COPY .npmrc .npmrc
RUN npm install

# 将项目挪到之前配置的路径中
COPY backend /home/code/featherjs/backend
COPY frontend /home/code/featherjs/frontend

# Docker 中应用运行的端口
EXPOSE 3030

# 启动项目
CMD npm install mongodb && npm start


text:
package barqsoft.footballscores.DataSource;

import java.util.List;

import barqsoft.footballscores.DataSource.Model.FixturesResultEntity;
import barqsoft.footballscores.DataSource.Model.SeasonEntity;

import barqsoft.footballscores.DataSource.Model.TeamsResultEntity;
import retrofit.http.GET;
import retrofit.http.Path;
import retrofit.http.Query;

public interface FootballAPI {
    @GET("/soccerseasons")
    List<SeasonEntity> seasons();

    @GET("/soccerseasons/{id}/teams")
    TeamsResultEntity teams(@Path("id") String id);

    @GET("/fixtures")
    FixturesResultEntity fixtures(@Query("timeFrame") String timeFrame);
}


text:
<!DOCTYPE html>

    <title>OpenGL ES 2.0 - Shaders - CardBoard SDK</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">


text:
FROM williamyeh/ansible:debian8-onbuild

RUN apt-get update
CMD ["sh", "tests/test.sh"]

EXPOSE 6379


text:
package hudson.core;

import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.PluginManagerStaplerOverride;
import static org.junit.Assert.*;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestExtension;

/**
 * Verify that the PluginManagerStaplerOverride extensions register and allow safely modifying PluginManager views
 * @author Sam Van Oort
 */
public class PluginManagerOverrideTest {

    @Rule
    public JenkinsRule j = new JenkinsRule();

    @Test
    public void testViewOverrides() throws Exception {
        // Verify extension registered correctly and comes back in overrides
        assertEquals(1,PluginManagerStaplerOverride.all().size());
        assertTrue(PluginManagerStaplerOverride.all().get(0) instanceof BasicPluginManagerOverride);

        // Verify we can load untouched resources
        JenkinsRule.WebClient client = j.createWebClient();
        assertEquals(200, client.goTo("self/pluginManager/available").getWebResponse().getStatusCode());

        // Verify new view loads
        HtmlPage p = j.createWebClient().goTo("self/pluginManager/newview");
        assertEquals("LoremIpsum", p.getElementById("dummyElement").getTextContent());
    }

    /** Micro-implementation simply to allow adding a view resource */
    @TestExtension("testViewOverrides")
    public static class BasicPluginManagerOverride extends PluginManagerStaplerOverride {
    }
}


text:
package org.apache.spark.sql.catalyst.plans

import org.scalactic.source
import org.scalatest.Suite
import org.scalatest.Tag

import org.apache.spark.SparkFunSuite
import org.apache.spark.sql.AnalysisException
import org.apache.spark.sql.catalyst.analysis.SimpleAnalyzer
import org.apache.spark.sql.catalyst.expressions._
import org.apache.spark.sql.catalyst.expressions.CodegenObjectFactoryMode
import org.apache.spark.sql.catalyst.expressions.aggregate.AggregateExpression
import org.apache.spark.sql.catalyst.plans.logical._
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.internal.SQLConf

/**
 * Provides helper methods for comparing plans.
 */
trait PlanTest extends SparkFunSuite with PlanTestBase

trait CodegenInterpretedPlanTest extends PlanTest {

  override protected def test(
      testName: String,
      testTags: Tag*)(testFun: => Any)(implicit pos: source.Position): Unit = {
    val codegenMode = CodegenObjectFactoryMode.CODEGEN_ONLY.toString
    val interpretedMode = CodegenObjectFactoryMode.NO_CODEGEN.toString

    withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> codegenMode) {
      super.test(testName + " (codegen path)", testTags: _*)(testFun)(pos)
    }
    withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> interpretedMode) {
      super.test(testName + " (interpreted path)", testTags: _*)(testFun)(pos)
    }
  }
}

/**
 * Provides helper methods for comparing plans, but without the overhead of
 * mandating a FunSuite.
 */
trait PlanTestBase extends PredicateHelper { self: Suite =>

  // TODO(gatorsmile): remove this from PlanTest and all the analyzer rules
  protected def conf = SQLConf.get

  /**
   * Since attribute references are given globally unique ids during analysis,
   * we must normalize them to check if two different queries are identical.
   */
  protected def normalizeExprIds(plan: LogicalPlan) = {
    plan transformAllExpressions {
      case s: ScalarSubquery =>
        s.copy(exprId = ExprId(0))
      case e: Exists =>
        e.copy(exprId = ExprId(0))
      case l: ListQuery =>
        l.copy(exprId = ExprId(0))
      case a: AttributeReference =>
        AttributeReference(a.name, a.dataType, a.nullable)(exprId = ExprId(0))
      case a: Alias =>
        Alias(a.child, a.name)(exprId = ExprId(0))
      case ae: AggregateExpression =>
        ae.copy(resultId = ExprId(0))
      case lv: NamedLambdaVariable =>
        lv.copy(exprId = ExprId(0), value = null)
    }
  }

  /**
   * Normalizes plans:
   * - Filter the filter conditions that appear in a plan. For instance,
   *   ((expr 1 && expr 2) && expr 3), (expr 1 && expr 2 && expr 3), (expr 3 && (expr 1 && expr 2)
   *   etc., will all now be equivalent.
   * - Sample the seed will replaced by 0L.
   * - Join conditions will be resorted by hashCode.
   */
  protected def normalizePlan(plan: LogicalPlan): LogicalPlan = {
    plan transform {
      case Filter(condition: Expression, child: LogicalPlan) =>
        Filter(splitConjunctivePredicates(condition).map(rewriteEqual).sortBy(_.hashCode())
          .reduce(And), child)
      case sample: Sample =>
        sample.copy(seed = 0L)
      case Join(left, right, joinType, condition) if condition.isDefined =>
        val newCondition =
          splitConjunctivePredicates(condition.get).map(rewriteEqual).sortBy(_.hashCode())
            .reduce(And)
        Join(left, right, joinType, Some(newCondition))
    }
  }

  /**
   * Rewrite [[EqualTo]] and [[EqualNullSafe]] operator to keep order. The following cases will be
   * equivalent:
   * 1. (a = b), (b = a);
   * 2. (a <=> b), (b <=> a).
   */
  private def rewriteEqual(condition: Expression): Expression = condition match {
    case eq @ EqualTo(l: Expression, r: Expression) =>
      Seq(l, r).sortBy(_.hashCode()).reduce(EqualTo)
    case eq @ EqualNullSafe(l: Expression, r: Expression) =>
      Seq(l, r).sortBy(_.hashCode()).reduce(EqualNullSafe)
    case _ => condition // Don't reorder.
  }

  /** Fails the test if the two plans do not match */
  protected def comparePlans(
      plan1: LogicalPlan,
      plan2: LogicalPlan,
      checkAnalysis: Boolean = true): Unit = {
    if (checkAnalysis) {
      // Make sure both plan pass checkAnalysis.
      SimpleAnalyzer.checkAnalysis(plan1)
      SimpleAnalyzer.checkAnalysis(plan2)
    }

    val normalized1 = normalizePlan(normalizeExprIds(plan1))
    val normalized2 = normalizePlan(normalizeExprIds(plan2))
    if (normalized1 != normalized2) {
      fail(
        s"""
          |== FAIL: Plans do not match ===
          |${sideBySide(normalized1.treeString, normalized2.treeString).mkString("\n")}
         """.stripMargin)
    }
  }

  /** Fails the test if the two expressions do not match */
  protected def compareExpressions(e1: Expression, e2: Expression): Unit = {
    comparePlans(Filter(e1, OneRowRelation()), Filter(e2, OneRowRelation()), checkAnalysis = false)
  }

  /** Fails the test if the join order in the two plans do not match */
  protected def compareJoinOrder(plan1: LogicalPlan, plan2: LogicalPlan) {
    val normalized1 = normalizePlan(normalizeExprIds(plan1))
    val normalized2 = normalizePlan(normalizeExprIds(plan2))
    if (!sameJoinPlan(normalized1, normalized2)) {
      fail(
        s"""
           |== FAIL: Plans do not match ===
           |${sideBySide(normalized1.treeString, normalized2.treeString).mkString("\n")}
         """.stripMargin)
    }
  }

  /** Consider symmetry for joins when comparing plans. */
  private def sameJoinPlan(plan1: LogicalPlan, plan2: LogicalPlan): Boolean = {
    (plan1, plan2) match {
      case (j1: Join, j2: Join) =>
        (sameJoinPlan(j1.left, j2.left) && sameJoinPlan(j1.right, j2.right)) ||
          (sameJoinPlan(j1.left, j2.right) && sameJoinPlan(j1.right, j2.left))
      case (p1: Project, p2: Project) =>
        p1.projectList == p2.projectList && sameJoinPlan(p1.child, p2.child)
      case _ =>
        plan1 == plan2
    }
  }

  /**
   * Sets all SQL configurations specified in `pairs`, calls `f`, and then restores all SQL
   * configurations.
   */
  protected def withSQLConf(pairs: (String, String)*)(f: => Unit): Unit = {
    val conf = SQLConf.get
    val (keys, values) = pairs.unzip
    val currentValues = keys.map { key =>
      if (conf.contains(key)) {
        Some(conf.getConfString(key))
      } else {
        None
      }
    }
    (keys, values).zipped.foreach { (k, v) =>
      if (SQLConf.staticConfKeys.contains(k)) {
        throw new AnalysisException(s"Cannot modify the value of a static config: $k")
      }
      conf.setConfString(k, v)
    }
    try f finally {
      keys.zip(currentValues).foreach {
        case (key, Some(value)) => conf.setConfString(key, value)
        case (key, None) => conf.unsetConf(key)
      }
    }
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ScalaCompilerConfiguration">
    <profile name="Gradle 1" modules="app">
      <option name="deprecationWarnings" value="true" />
      <option name="uncheckedWarnings" value="true" />
      <parameters>
        <parameter value="-encoding" />
        <parameter value="UTF-8" />
        <parameter value="-target:jvm-1.7" />
      </parameters>
    </profile>
  </component>
</project>


text:
package org.osgi.service.onem2m;

import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.service.onem2m.dto.RequestPrimitiveDTO;

/**
 * Interface to receive notification from other oneM2M entities.
 * <p>
 * Application that receives notification must implement this interface and
 * register to OSGi service registry. No service property is required.
 */
@ConsumerType
public interface NotificationListener {
	/**
	 * receive notification.
	 *
	 * @param request request primitive
	 */
	public void notified(RequestPrimitiveDTO request);

}


text:
angular.module('remoteWork', [
  'remoteWork.services',
  'remoteWork.controllers',
  'ngRoute'
]).
config(['$routeProvider', function($routeProvider) {
  $routeProvider.
	when("/vacancies", {templateUrl: "partials/vacancies.html", controller: "vacanciesController"}).
	//when("/vacancy/:id", {templateUrl: "partials/vacancy.html", controller: "buildController"}).
	otherwise({redirectTo: '/vacancies'});
}]);


text:
chrome.app.runtime.onLaunched.addListener(function() {
  chrome.app.window.create('../index.html', {
    id: 'microflo-ui',
    bounds: {
      width: 400,
      height: 600
    },
    resizable: false
  });
});


text:
import {NgModule} from '@angular/core';
import {APP_BASE_HREF, CommonModule} from '@angular/common';

import {SharedModule} from '../shared.module';
import {SettingsRoutingModule} from './settings-routing.module';
import {SettingsComponent} from './settings.component';

@NgModule({
    imports: [
        CommonModule,
        SharedModule,
        SettingsRoutingModule
    ],
    providers: [],
    declarations: [
        SettingsComponent
    ],
    entryComponents: [

    ]
})
export class SettingsModule {
}


text:
package com.alibaba.json.bvt.issue_2900;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import junit.framework.TestCase;
import org.junit.Test;

public class Issue2982 extends TestCase {

    @Test
    public void test_for_issue() {
        String jsonStr = "[ { \"activity_type\" : 0, \"activity_id\" : \"***\", \"activity_tip\" : \"***\", \"position\" : \"1\" }, { \"activity_type\" : 0, \"activity_id\" : \"2669\", \"activity_tip\" : \"****\", \"position\" : \"1\" }]";
        assertTrue(JSONArray.isValidArray(jsonStr));
        assertTrue(JSON.isValidArray(jsonStr));
        assertTrue(JSONObject.isValidArray(jsonStr));
    }

}


text:
from db import DB
import nltk
import random
import classifiers
import dill, os.path

def getClassifier(all=True):
    if os.path.isfile("classifier.pkl"):
        with open("classifier.pkl", 'rb') as file:
            classifier = dill.load(file)
            classifier.show_most_informative_features(15)
            file.close()
            return classifier
    conn = DB()

    data = conn.getTrainingData()

    random.shuffle(data)

    feature_sets = [(classifiers.getFeatures(d), "yes" if d["is_valid"] else "no") for d in data]
    if all:
        train_set, test_set = feature_sets, feature_sets
    else:
        train_set, test_set = feature_sets[:1500], feature_sets[1500:]

    classifier = nltk.NaiveBayesClassifier.train(train_set)
    classifier.show_most_informative_features(10)
    conn.close()
    print(nltk.classify.accuracy(classifier, test_set))
    with open("classifier.pkl", 'wb') as file:
        dill.dump(classifier, file)
        file.close()

    return classifier

if __name__ == "__main__":
    classifier = getClassifier()

    conn = DB()
    #conn.create()

    data = conn.getTrainingData()
    for row in data:
        features = classifiers.getFeatures(row)
        is_valid = classifier.classify(features) == "yes"
        if row["is_valid"] != is_valid:
            print("{}->{} {} {}".format(row["is_valid"], is_valid, row["id"], row["title"]))
    conn.close()


text:
<?php

namespace app\models\authors;

use Yii;
use backend\models\BlogPostsTable;
use app\models\authors\Authors;
/**
 * This is the model class for table "authors_posts".
 *
 * @property string $1
 * @property string $id_author
 * @property string $id_post
 *
 * @property Authors $idAuthor
 * @property BlogPostsTable $idPost
 */
class AuthorsPosts extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'authors_posts';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id_author', 'id_post'], 'required'],
            [['id_author', 'id_post'], 'integer'],
            [['id_author'], 'exist', 'skipOnError' => true, 'targetClass' => Authors::className(), 'targetAttribute' => ['id_author' => 'id']],
            [['id_post'], 'exist', 'skipOnError' => true, 'targetClass' => BlogPostsTable::className(), 'targetAttribute' => ['id_post' => 'id']],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            '1' => '1',
            'id_author' => 'Id Author',
            'id_post' => 'Id Post',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getIdAuthor()
    {
        return $this->hasOne(Authors::className(), ['id' => 'id_author']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getIdPost()
    {
        return $this->hasOne(BlogPostsTable::className(), ['id' => 'id_post']);
    }
}