text:
/* Generated automatically. */
static const char configuration_arguments[] = "../../src/or1k-gcc/configure --target=or1k-linux-musl --host=or1k-linux-musl --prefix=/usr --program-prefix= --disable-debug --disable-libssp --enable-shared=libstdc++,libgomp,libatomic,libsupc++ --srcdir=../../src/or1k-gcc --enable-languages=c --enable-threads=posix --disable-libquadmath --disable-libmudflap --disable-multilib --disable-bootstrap --disable-libsanitizer --disable-nls --disable-lto --with-system-zlib --disable-docs --with-target-libiberty=no";
static const char thread_model[] = "posix";

static const struct {
  const char *name, *value;
} configure_default_options[] = { { NULL, NULL} };

redpajama_set_name: RedPajamaGithub


text:
package idv.chatea.gldemo.postprocess;

/**
 * Kernel is an matrix that used in filter effect and used for convolution operation.
 * Due to performance reason, the suggestion kernel size is 3x3, and don't larger than 5x5
 *
 * Check https://en.wikipedia.org/wiki/Kernel_(image_processing) for more information.
 */
public class Kernel {

    /**
     * This value is same as the value in GLSL.
     */
    public static final int MAX_KERNEL_SIZE = 16;

    /**
     * The constant factor of kernel matrix. Default value is 1.
     * This is convenience for multiple/divide all value in kernel matrix.
     */
    private float mConstFactor = 1f;
    private float[] mKernelMatrix;
    private int mLength;

    public Kernel(int edgeLength) {
        if (edgeLength > MAX_KERNEL_SIZE) {
            throw new IllegalArgumentException("The Length is larger than maximum kernel size");
        }
        mLength = edgeLength;
        mKernelMatrix = new float[edgeLength * edgeLength];
    }

    public Kernel(float[] leftColumnVector, float[] rightRowVector) {
        if (leftColumnVector.length != rightRowVector.length) {
            throw new IllegalArgumentException("Lengths or column vector and row vector are different");
        }
        int length = leftColumnVector.length;
        if (length > MAX_KERNEL_SIZE) {
            throw new IllegalArgumentException("The Length is larger than maximum kernel size");
        }
        mLength = length;
        mKernelMatrix = new float[mLength * mLength];
        setRowMultipleColumn(leftColumnVector, rightRowVector);
    }

    public float getConstFactor() {
        return mConstFactor;
    }

    public int getKernelLength() {
        return mLength;
    }

    public float[] getFlattenKernelMatrix() {
        float[] returnedKernelMatrix = new float[mLength * mLength];
        for (int i = 0; i < mKernelMatrix.length; i++) {
            returnedKernelMatrix[i] = mKernelMatrix[i] * mConstFactor;
        }
        return returnedKernelMatrix;
    }

    /**
     * Used to set the const factor of kernel matrix.
     * Default value is 1f
     * @param factor the const factor of kernel matrix.
     */
    public void setConstFactor(float factor) {
        mConstFactor = factor;
    }

    public void setValue(int row, int column, float value) {
        if (row >= mLength && column >= mLength) {
            throw new IndexOutOfBoundsException("Out of kernel matrix bounds");
        }
        // column based matrix
        mKernelMatrix[row + column * mLength] = value;
    }

    public void setRowMultipleColumn(float[] leftColumnVector, float[] rightRowVector) {
        if (leftColumnVector.length != mLength || rightRowVector.length != mLength) {
            throw new IllegalArgumentException("row or column vector doesn't match the length of kernel atrix");
        }
        for (int row = 0; row < mLength; row++) {
            for (int column = 0; column < mLength; column++) {
                mKernelMatrix[row + column * mLength] = leftColumnVector[row] * rightRowVector[column];
            }
        }
    }

    /**
     * Set all slot as the specify value
     * @param value the value for all
     */
    public void setAll(float value) {
        for (int i = 0; i < mKernelMatrix.length; i++) {
            mKernelMatrix[i] = value;
        }
    }
}


text:
package com.shaubert.ui.adapters.common;

import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.ViewTreeObserver;

public class RecyclerViewHelper {

    public static void setupSpanCountAfterLayout(final RecyclerView recyclerView, final int spanSize) {
        setupSpanCountAfterLayout(recyclerView, spanSize, null);
    }

    public static void setupSpanCountAfterLayout(final RecyclerView recyclerView, final int spanSize, final Runnable onSetTask) {
        ViewTreeObserverHelper.registerOnGlobalLayoutListener(recyclerView, new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
                if (recyclerView.getWidth() > 0) {
                    ViewTreeObserverHelper.unregisterOnGlobalLayoutListener(recyclerView, this);
                } else {
                    return;
                }

                int w = recyclerView.getWidth() - recyclerView.getPaddingLeft() - recyclerView.getPaddingRight();
                int spanCount = w / spanSize;
                GridLayoutManager layoutManager = (GridLayoutManager) recyclerView.getLayoutManager();
                layoutManager.setSpanCount(spanCount);

                if (onSetTask != null) onSetTask.run();
            }
        });
    }

}


text:
We'd love for you to contribute to our source code and to make Polyfiller even better than it is
today! Here are the guidelines we'd like you to follow:

 - [Code of Conduct](#coc)
 - [Question or Problem?](#question)
 - [Issues and Bugs](#issue)
 - [Feature Requests](#feature)
 - [Update packages](#bump)
 - [API Requests](#api)
 - [Submission Guidelines](#submit)
 - [Coding Rules](#rules)
 - [Commit Message Guidelines](#commit)
 - [License](#license)
 - [Signing the CLA](#cla)
 - [Further Info](#info)

##  Code of Conduct
Help us keep Polyfiller open and inclusive. Please read and follow our [Code of Conduct][coc].

##  Got a Question or Problem?

If you have questions about how to use Polyfiller, please direct these to the [GitHub Issue][issue].

##  Found an Issue?
If you find a bug in the source code or a mistake in the documentation, you can help us by
submitting an issue to our [GitHub Repository][issue]. Even better you can submit a Pull Request
with a fix.

**Please see the Submission Guidelines below**.

##  API request?
You can request a new feature by submitting an issue to our [GitHub Repository][issue]. If you
would like to implement a new feature then consider what kind of change it is:

* **Major Changes** that you wish to contribute to the project should be discussed first on our
[GitHub Issue][issue] so that we can better coordinate our efforts, prevent
duplication of work, and help you to craft the change so that it is successfully accepted into the
project.

* **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a Pull Request.

##  Want a Polyfill?
You can request a new polyfill by submitting an issue to our [GitHub Repository][catalog-issue].

Have an interesting and well-tested polyfill for our [catalog][catalog]?

### File structure

Required file structure for each new package:

```
catalog
	Promise
		index.json
		index.js
```

**index.json**

```json
{
	"name": "Promise"
}
```

There are dependencies?

```
"dependencies": ["window.setImmediate"]
```

**index.js**

```js
module.exports = [
	{
		type: 'npm',
		name: 'es6-promises'
	}
];
```

*type*:

Type: `string [npm | bower | file]`

Default: `None`

*name*:

Type: `string`

Default: `None`

**package.json**

Use `dependencies` and `bundleDependencies` for new features located in `npm`

```json
{
	"dependencies": {
		"es6-promises": "^1.0.10"
	},

	"bundleDependencies": [
		"es6-promises"
	]
}
```

**bower.json**

Use `dependencies` for new features located in `bower`

```json
{
	"dependencies": {
		"es6-promises": "1.0.10"
	}
}
```

The files are located locally?

```
catalog
	Promise
		files
			index.js — your polyfill

		index.json
		index.js
```

```js
// index.js

var path = require('path');

module.exports = [
	{
		type: 'file',
		name: path.join(__dirname, './files/index.js')
	}
];
```

Run `npm test` and [commit your changes](#commit)

##  Want a new package version?

If you want to increment the version number to a new unique value:

1. Update package.json

```
{
	"version": "new version",

	"dependencies": {
		"polyfiller-catalog": "new version"
	}
}
```

2. Check this out

```
npm update
npm test
git commit -am 'new version'
git tag -a 'new version' -m 'new version'
```

[Commit your changes](#commit)

##  Want a Doc Fix?

If you want to help improve the docs, it's a good idea to let others know what you're working on to
minimize duplication of effort. Before starting, check out the issue queue for
[Milestone:Docs Only][milestone].
Comment on an issue to let others know what you're working on, or create a new issue if your work
doesn't fit within the scope of any of the existing doc fix projects.

For large fixes, please build and test the documentation before submitting the PR to be sure you haven't
accidentally introduced any layout or formatting issues. You should also make sure that your commit message
is labeled "docs:" and follows the **Git Commit Guidelines** outlined below.

If you're just making a small change, don't worry about filing an issue first. Use the friendly blue "Improve this doc" button at the top right of the doc page to fork the repository in-place and make a quick change on the fly. When naming the commit, it is advised to still label it according to the commit guidelines below, by starting the commit message with **docs** and referencing the filename. Since this is not obvious and some changes are made on the fly, this is not strictly necessary and we will understand if this isn't done the first few times.

All our documentation are located in `files/docs/` directory and `CONTRIBUTING.md` file.

To build the `README.md` please run the following command:

```
npm run prepublish
```

##  Submission Guidelines

### Submitting an Issue
Before you submit your issue search the archive, maybe your question was already answered.

If your issue appears to be a bug, and hasn't been reported, open a new issue.
Help us to maximize the effort we can spend fixing issues and adding new
features, by not reporting duplicate issues.  Providing the following information will increase the
chances of your issue being dealt with quickly:

* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
* **Motivation for or Use Case** - explain why this is a bug for you
* **Polyfiller Version(s)** - is it a regression?
* **Browsers and Operating System** - is this a problem with all browsers or only IE8?
* **Reproduce the Error** - provide a live example (using [Plunker][plunker] or
  [JSFiddle][jsfiddle]) or a unambiguous set of steps.
* **Related Issues** - has a similar issue been reported before?
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
  causing the problem (line of code or commit)

Here is a great example of a well defined issue: https://github.com/Polyfiller/Polyfiller.js/issues/5069

**If you get help, help others!**

### Submitting a Pull Request
Before you submit your pull request consider the following guidelines:

* Search [GitHub][pulls] for an open or closed Pull Request
  that relates to your submission. You don't want to duplicate effort.
* Please sign our [Contributor License Agreement (CLA)](#cla) before sending pull
  requests. We cannot accept code without this.
* Make your changes in a new git branch:

```shell
git checkout -b your-fix-branch master
```

* Create your patch, **including appropriate test cases**.
* Follow our [Coding Rules](#rules).
* Run the full Polyfiller test suite and ensure that all tests pass.

```shell
npm test
```

* Commit your changes
```shell
git commit -a
```
  Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.

* Push your branch to GitHub:

```shell
git push origin your-fix-branch
```

* In GitHub, send a pull request to `polyfiller:master`.
* If we suggest changes then:
  * Make the required updates.
  * Re-run the Polyfiller test suite to ensure tests are still passing.
  * Rebase your branch and force push to your GitHub repository (this will update your Pull Request):

    ```shell
    git rebase master -i
    git push origin your-fix-branch -f
    ```

That's it! Thank you for your contribution!

#### After your pull request is merged

After your pull request is merged, you can safely delete your branch and pull the changes
from the main (upstream) repository:

* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:

```shell
git push origin --delete my-fix-branch
```

* Check out the master branch:

```shell
git checkout master -f
```

* Delete the local branch:

```shell
git branch -D your-fix-branch
```

* Update your master with the latest upstream version:

```shell
git pull --ff upstream master
```

##  Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:

* All features or bug fixes **must be tested** by one or more [specs][unit-testing].
* All public API methods **must be documented** with [JSDoc][jsdoc].
* With the exceptions listed below, we follow the rules contained in
  [Google's JavaScript Style Guide][js-style-guide]:
    * **Do not use namespaces**: Instead,  wrap the entire Polyfiller code base in an anonymous closure and
      export our API explicitly rather than implicitly.
    * Wrap all code at **100 characters**.
    * Instead of complex inheritance hierarchies, we **prefer simple objects or classes**. We use prototypal
      inheritance only when absolutely necessary.
    * We **love functions and closures** and, whenever possible, prefer them over objects.
    * To write concise code that can be better minified, we **use aliases internally** that map to the
      external API. See our existing code to see what we mean.

##  Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**.

### Commit Message Format

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on github as well as in various git tools.

##  License
Our code is licensed under a liberal [MIT][mit] license.

##  Signing the CLA

Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
changes to be accepted, the CLA must be signed. It's a quick process, we promise!

* For individuals we have a [simple click-through form][cla-individual].
* For corporations we'll need you to
  [print, sign and one of scan+email, fax or mail the form][cla-corporate].

##  Further Information
You can find out more detailed information about contributing in the
[Polyfiller repository][github].

### Credits

Based on AngularJS contributing guide

[mit]: https://github.com/Polyfiller/polyfiller/blob/master/LICENSE.txt
[coc]: https://github.com/Polyfiller/polyfiller/blob/master/files/docs/coc.md
[cla-corporate]: https://github.com/Polyfiller/polyfiller/blob/master/files/docs/cla.md#cla-corporate
[cla-individual]: https://github.com/Polyfiller/polyfiller/blob/master/files/docs/cla.md#cla-individual
[github]: https://github.com/Polyfiller/Polyfiller.js
[issue]: https://github.com/Polyfiller/polyfiller/issues
[catalog-issue]: https://github.com/Polyfiller/polyfiller-catalog/issues
[catalog]: https://github.com/Polyfiller/polyfiller-catalog/tree/master/files
[pulls]: https://github.com/Polyfiller/polyfiller/pulls
[jsdoc]: http://usejsdoc.org
[milestone]: https://github.com/Polyfiller/polyfiller/issues?milestone=24&q=is%3Aopen
[js-style-guide]: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
[jsfiddle]: http://jsfiddle.net/
[plunker]: http://plnkr.co/edit


text: My personal portfolio powered by meteor, nodejs, material design and fontawesome.


text:
/* -*-C++-*- */
/**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
//
// @@@ END COPYRIGHT @@@
**********************************************************************/
#ifndef ELEMDDLUDFPARALLELISM_H
#define ELEMDDLUDFPARALLELISM_H
/* -*-C++-*-
******************************************************************************
*
* File:         ElemDDLUdfParallelism.h
* Description:  class for Udf Parallelism Attribute (parse node) elements in
*               DDL statements
*
*
* Created:      7/14/09
* Language:     C++
*
*
*
*
******************************************************************************
*/

#include "ElemDDLNode.h"

class ElemDDLUdfParallelism : public ElemDDLNode
{

public:

  // default constructor
  ElemDDLUdfParallelism(ComRoutineParallelism parallelismChoice);

  // virtual destructor
  virtual ~ElemDDLUdfParallelism(void);

  // cast
  virtual ElemDDLUdfParallelism * castToElemDDLUdfParallelism(void);

  // accessors
  inline const ComRoutineParallelism getParallelism(void) const
  {
    return parallelism_;
  }

  inline NABoolean getCanBeParallel(void) const
  {
    return parallelism_ NEQ COM_ROUTINE_NO_PARALLELISM;
  }

  //
  // methods for tracing
  //

  virtual NATraceList getDetailInfo() const;
  virtual const NAString getText() const;

private:

  ComRoutineParallelism parallelism_;

}; // class ElemDDLUdfParallelism

#endif /* ELEMDDLUDFPARALLELISM_H */


text:
/**
 * Autogenerated by Avro
 *
 * DO NOT EDIT DIRECTLY
 */
package crypto.avro;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class AvroKeyVersion extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AvroKeyVersion\",\"namespace\":\"crypto.avro\",\"fields\":[{\"name\":\"encryptedKey\",\"type\":\"bytes\"},{\"name\":\"encryptedIV\",\"type\":\"bytes\"},{\"name\":\"versionName\",\"type\":\"string\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  @Deprecated public java.nio.ByteBuffer encryptedKey;
  @Deprecated public java.nio.ByteBuffer encryptedIV;
  @Deprecated public java.lang.CharSequence versionName;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use newBuilder().
   */
  public AvroKeyVersion() {}

  /**
   * All-args constructor.
   */
  public AvroKeyVersion(java.nio.ByteBuffer encryptedKey, java.nio.ByteBuffer encryptedIV, java.lang.CharSequence versionName) {
    this.encryptedKey = encryptedKey;
    this.encryptedIV = encryptedIV;
    this.versionName = versionName;
  }

  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
  // Used by DatumWriter.  Applications should not call.
  public java.lang.Object get(int field$) {
    switch (field$) {
    case 0: return encryptedKey;
    case 1: return encryptedIV;
    case 2: return versionName;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }
  // Used by DatumReader.  Applications should not call.
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    switch (field$) {
    case 0: encryptedKey = (java.nio.ByteBuffer)value$; break;
    case 1: encryptedIV = (java.nio.ByteBuffer)value$; break;
    case 2: versionName = (java.lang.CharSequence)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'encryptedKey' field.
   */
  public java.nio.ByteBuffer getEncryptedKey() {
    return encryptedKey;
  }

  /**
   * Sets the value of the 'encryptedKey' field.
   * @param value the value to set.
   */
  public void setEncryptedKey(java.nio.ByteBuffer value) {
    this.encryptedKey = value;
  }

  /**
   * Gets the value of the 'encryptedIV' field.
   */
  public java.nio.ByteBuffer getEncryptedIV() {
    return encryptedIV;
  }

  /**
   * Sets the value of the 'encryptedIV' field.
   * @param value the value to set.
   */
  public void setEncryptedIV(java.nio.ByteBuffer value) {
    this.encryptedIV = value;
  }

  /**
   * Gets the value of the 'versionName' field.
   */
  public java.lang.CharSequence getVersionName() {
    return versionName;
  }

  /**
   * Sets the value of the 'versionName' field.
   * @param value the value to set.
   */
  public void setVersionName(java.lang.CharSequence value) {
    this.versionName = value;
  }

  /** Creates a new AvroKeyVersion RecordBuilder */
  public static crypto.avro.AvroKeyVersion.Builder newBuilder() {
    return new crypto.avro.AvroKeyVersion.Builder();
  }

  /** Creates a new AvroKeyVersion RecordBuilder by copying an existing Builder */
  public static crypto.avro.AvroKeyVersion.Builder newBuilder(crypto.avro.AvroKeyVersion.Builder other) {
    return new crypto.avro.AvroKeyVersion.Builder(other);
  }

  /** Creates a new AvroKeyVersion RecordBuilder by copying an existing AvroKeyVersion instance */
  public static crypto.avro.AvroKeyVersion.Builder newBuilder(crypto.avro.AvroKeyVersion other) {
    return new crypto.avro.AvroKeyVersion.Builder(other);
  }

  /**
   * RecordBuilder for AvroKeyVersion instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<AvroKeyVersion>
    implements org.apache.avro.data.RecordBuilder<AvroKeyVersion> {

    private java.nio.ByteBuffer encryptedKey;
    private java.nio.ByteBuffer encryptedIV;
    private java.lang.CharSequence versionName;

    /** Creates a new Builder */
    private Builder() {
      super(crypto.avro.AvroKeyVersion.SCHEMA$);
    }

    /** Creates a Builder by copying an existing Builder */
    private Builder(crypto.avro.AvroKeyVersion.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.encryptedKey)) {
        this.encryptedKey = data().deepCopy(fields()[0].schema(), other.encryptedKey);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.encryptedIV)) {
        this.encryptedIV = data().deepCopy(fields()[1].schema(), other.encryptedIV);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.versionName)) {
        this.versionName = data().deepCopy(fields()[2].schema(), other.versionName);
        fieldSetFlags()[2] = true;
      }
    }

    /** Creates a Builder by copying an existing AvroKeyVersion instance */
    private Builder(crypto.avro.AvroKeyVersion other) {
            super(crypto.avro.AvroKeyVersion.SCHEMA$);
      if (isValidValue(fields()[0], other.encryptedKey)) {
        this.encryptedKey = data().deepCopy(fields()[0].schema(), other.encryptedKey);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.encryptedIV)) {
        this.encryptedIV = data().deepCopy(fields()[1].schema(), other.encryptedIV);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.versionName)) {
        this.versionName = data().deepCopy(fields()[2].schema(), other.versionName);
        fieldSetFlags()[2] = true;
      }
    }

    /** Gets the value of the 'encryptedKey' field */
    public java.nio.ByteBuffer getEncryptedKey() {
      return encryptedKey;
    }

    /** Sets the value of the 'encryptedKey' field */
    public crypto.avro.AvroKeyVersion.Builder setEncryptedKey(java.nio.ByteBuffer value) {
      validate(fields()[0], value);
      this.encryptedKey = value;
      fieldSetFlags()[0] = true;
      return this;
    }

    /** Checks whether the 'encryptedKey' field has been set */
    public boolean hasEncryptedKey() {
      return fieldSetFlags()[0];
    }

    /** Clears the value of the 'encryptedKey' field */
    public crypto.avro.AvroKeyVersion.Builder clearEncryptedKey() {
      encryptedKey = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'encryptedIV' field */
    public java.nio.ByteBuffer getEncryptedIV() {
      return encryptedIV;
    }

    /** Sets the value of the 'encryptedIV' field */
    public crypto.avro.AvroKeyVersion.Builder setEncryptedIV(java.nio.ByteBuffer value) {
      validate(fields()[1], value);
      this.encryptedIV = value;
      fieldSetFlags()[1] = true;
      return this;
    }

    /** Checks whether the 'encryptedIV' field has been set */
    public boolean hasEncryptedIV() {
      return fieldSetFlags()[1];
    }

    /** Clears the value of the 'encryptedIV' field */
    public crypto.avro.AvroKeyVersion.Builder clearEncryptedIV() {
      encryptedIV = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'versionName' field */
    public java.lang.CharSequence getVersionName() {
      return versionName;
    }

    /** Sets the value of the 'versionName' field */
    public crypto.avro.AvroKeyVersion.Builder setVersionName(java.lang.CharSequence value) {
      validate(fields()[2], value);
      this.versionName = value;
      fieldSetFlags()[2] = true;
      return this;
    }

    /** Checks whether the 'versionName' field has been set */
    public boolean hasVersionName() {
      return fieldSetFlags()[2];
    }

    /** Clears the value of the 'versionName' field */
    public crypto.avro.AvroKeyVersion.Builder clearVersionName() {
      versionName = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    @Override
    public AvroKeyVersion build() {
      try {
        AvroKeyVersion record = new AvroKeyVersion();
        record.encryptedKey = fieldSetFlags()[0] ? this.encryptedKey : (java.nio.ByteBuffer) defaultValue(fields()[0]);
        record.encryptedIV = fieldSetFlags()[1] ? this.encryptedIV : (java.nio.ByteBuffer) defaultValue(fields()[1]);
        record.versionName = fieldSetFlags()[2] ? this.versionName : (java.lang.CharSequence) defaultValue(fields()[2]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}


text:
package skinny.orm.feature

import scalikejdbc._

/**
  * Provides ConnectionPool.
  */
trait ConnectionPoolFeature { self: SQLSyntaxSupport[_] =>

  /**
    * Returns connection pool.
    *
    * @return pool
    */
  def connectionPool: ConnectionPool = ConnectionPool(connectionPoolName)

}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--

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

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

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

--><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

    <display-name>Announcements Portlets</display-name>
    <description>Announcements Portlets</description>

    <context-param>
        <param-name>webAppRootKey</param-name>
        <param-value>announcements.root</param-value>
    </context-param>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            /WEB-INF/context/applicationContext.xml,
            /WEB-INF/context/databaseContext.xml
        </param-value>
    </context-param>

    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/classes/log4j.properties</param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.util.WebAppRootListener</listener-class>
    </listener>

    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>ViewRendererServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>spring</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/context/servlet/spring-servlet.xml</param-value>
        </init-param>
    </servlet>
<servlet>
<servlet-name>AnnouncementsDisplay</servlet-name>
<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
<init-param>
<param-name>portlet-name</param-name>
<param-value>AnnouncementsDisplay</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>AnnouncementsAdmin</servlet-name>
<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>
<init-param>
<param-name>portlet-name</param-name>
<param-value>AnnouncementsAdmin</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

    <!-- [INSERT JSPC FRAGMENT HERE] -->

    <servlet-mapping>
        <servlet-name>ViewRendererServlet</servlet-name>
        <url-pattern>/WEB-INF/servlet/view</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>spring</servlet-name>
        <url-pattern>/getRssFeed</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>spring</servlet-name>
        <url-pattern>/ajaxApprove</url-pattern>
    </servlet-mapping>
<servlet-mapping>
<servlet-name>AnnouncementsDisplay</servlet-name>
<url-pattern>/PlutoInvoker/AnnouncementsDisplay</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AnnouncementsAdmin</servlet-name>
<url-pattern>/PlutoInvoker/AnnouncementsAdmin</url-pattern>
</servlet-mapping>

</web-app>


text:
"""
Ansible module to manage A10 Networks slb virtual server objects
(c) 2014, Mischa Peters <mpeters@a10networks.com>

This file is part of Ansible

Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Ansible is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Ansible.  If not, see <http://www.gnu.org/licenses/>.
"""

DOCUMENTATION = '''
---
module: a10_virtual_server
version_added: 1.8
short_description: Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
description:
    - Manage slb virtual server objects on A10 Networks devices via aXAPI
author: Mischa Peters
notes:
    - Requires A10 Networks aXAPI 2.1
requirements:
    - urllib2
    - re
options:
  host:
    description:
      - hostname or ip of your A10 Networks device
    required: true
    default: null
    aliases: []
    choices: []
  username:
    description:
      - admin account of your A10 Networks device
    required: true
    default: null
    aliases: ['user', 'admin']
    choices: []
  password:
    description:
      - admin password of your A10 Networks device
    required: true
    default: null
    aliases: ['pass', 'pwd']
    choices: []
  virtual_server:
    description:
      - slb virtual server name
    required: true
    default: null
    aliases: ['vip', 'virtual']
    choices: []
  virtual_server_ip:
    description:
      - slb virtual server ip address
    required: false
    default: null
    aliases: ['ip', 'address']
    choices: []
  virtual_server_status:
    description:
      - slb virtual server status
    required: false
    default: enable
    aliases: ['status']
    choices: ['enabled', 'disabled']
  virtual_server_ports:
    description:
      - A list of ports to create for the virtual server. Each list item should be a
        dictionary which specifies the C(port:) and C(type:), but can also optionally
        specify the C(service_group:) as well as the C(status:). See the examples
        below for details. This parameter is required when C(state) is C(present).
    required: false
  write_config:
    description:
      - If C(yes), any changes will cause a write of the running configuration
        to non-volatile memory. This will save I(all) configuration changes,
        including those that may have been made manually or through other modules,
        so care should be taken when specifying C(yes).
    required: false
    default: "no"
    choices: ["yes", "no"]
  validate_certs:
    description:
      - If C(no), SSL certificates will not be validated. This should only be used
        on personally controlled devices using self-signed certificates.
    required: false
    default: 'yes'
    choices: ['yes', 'no']

'''

EXAMPLES = '''
# Create a new virtual server
- a10_virtual_server:
    host: a10.mydomain.com
    username: myadmin
    password: mypassword
    virtual_server: vserver1
    virtual_server_ip: 1.1.1.1
    virtual_server_ports:
      - port: 80
        protocol: TCP
        service_group: sg-80-tcp
      - port: 443
        protocol: HTTPS
        service_group: sg-443-https
      - port: 8080
        protocol: http
        status: disabled

'''

VALID_PORT_FIELDS = ['port', 'protocol', 'service_group', 'status']

def validate_ports(module, ports):
    for item in ports:
        for key in item:
            if key not in VALID_PORT_FIELDS:
                module.fail_json(msg="invalid port field (%s), must be one of: %s" % (key, ','.join(VALID_PORT_FIELDS)))

        # validate the port number is present and an integer
        if 'port' in item:
            try:
                item['port'] = int(item['port'])
            except:
                module.fail_json(msg="port definitions must be integers")
        else:
            module.fail_json(msg="port definitions must define the port field")

        # validate the port protocol is present, and convert it to
        # the internal API integer value (and validate it)
        if 'protocol' in item:
            protocol = axapi_get_vport_protocol(item['protocol'])
            if not protocol:
                module.fail_json(msg="invalid port protocol, must be one of: %s" % ','.join(AXAPI_VPORT_PROTOCOLS))
            else:
                item['protocol'] = protocol
        else:
            module.fail_json(msg="port definitions must define the port protocol (%s)" % ','.join(AXAPI_VPORT_PROTOCOLS))

        # convert the status to the internal API integer value
        if 'status' in item:
            item['status'] = axapi_enabled_disabled(item['status'])
        else:
            item['status'] = 1

        # ensure the service_group field is at least present
        if 'service_group' not in item:
            item['service_group'] = ''

def main():
    argument_spec = a10_argument_spec()
    argument_spec.update(url_argument_spec())
    argument_spec.update(
        dict(
            state=dict(type='str', default='present', choices=['present', 'absent']),
            virtual_server=dict(type='str', aliases=['vip', 'virtual'], required=True),
            virtual_server_ip=dict(type='str', aliases=['ip', 'address'], required=True),
            virtual_server_status=dict(type='str', default='enabled', aliases=['status'], choices=['enabled', 'disabled']),
            virtual_server_ports=dict(type='list', required=True),
        )
    )

    module = AnsibleModule(
        argument_spec=argument_spec,
        supports_check_mode=False
    )

    host = module.params['host']
    username = module.params['username']
    password = module.params['password']
    state = module.params['state']
    write_config = module.params['write_config']
    slb_virtual = module.params['virtual_server']
    slb_virtual_ip = module.params['virtual_server_ip']
    slb_virtual_status = module.params['virtual_server_status']
    slb_virtual_ports = module.params['virtual_server_ports']

    if slb_virtual is None:
        module.fail_json(msg='virtual_server is required')

    validate_ports(module, slb_virtual_ports)

    axapi_base_url = 'https://%s/services/rest/V2.1/?format=json' % host
    session_url = axapi_authenticate(module, axapi_base_url, username, password)

    slb_virtual_data = axapi_call(module, session_url + '&method=slb.virtual_server.search', json.dumps({'name': slb_virtual}))
    slb_virtual_exists = not axapi_failure(slb_virtual_data)

    changed = False
    if state == 'present':
        json_post = {
            'virtual_server': {
                'name': slb_virtual,
                'address': slb_virtual_ip,
                'status': axapi_enabled_disabled(slb_virtual_status),
                'vport_list': slb_virtual_ports,
            }
        }

        # before creating/updating we need to validate that any
        # service groups defined in the ports list exist since
        # since the API will still create port definitions for
        # them while indicating a failure occurred
        checked_service_groups = []
        for port in slb_virtual_ports:
            if 'service_group' in port and port['service_group'] not in checked_service_groups:
                # skip blank service group entries
                if port['service_group'] == '':
                    continue
                result = axapi_call(module, session_url + '&method=slb.service_group.search', json.dumps({'name': port['service_group']}))
                if axapi_failure(result):
                    module.fail_json(msg="the service group %s specified in the ports list does not exist" % port['service_group'])
                checked_service_groups.append(port['service_group'])

        if not slb_virtual_exists:
            result = axapi_call(module, session_url + '&method=slb.virtual_server.create', json.dumps(json_post))
            if axapi_failure(result):
                module.fail_json(msg="failed to create the virtual server: %s" % result['response']['err']['msg'])
            changed = True
        else:
            def needs_update(src_ports, dst_ports):
                '''
                Checks to determine if the port definitions of the src_ports
                array are in or different from those in dst_ports. If there is
                a difference, this function returns true, otherwise false.
                '''
                for src_port in src_ports:
                    found = False
                    different = False
                    for dst_port in dst_ports:
                        if src_port['port'] == dst_port['port']:
                            found = True
                            for valid_field in VALID_PORT_FIELDS:
                                if src_port[valid_field] != dst_port[valid_field]:
                                    different = True
                                    break
                            if found or different:
                                break
                    if not found or different:
                        return True
                # every port from the src exists in the dst, and none of them were different
                return False

            defined_ports = slb_virtual_data.get('virtual_server', {}).get('vport_list', [])

            # we check for a needed update both ways, in case ports
            # are missing from either the ones specified by the user
            # or from those on the device
            if needs_update(defined_ports, slb_virtual_ports) or needs_update(slb_virtual_ports, defined_ports):
                result = axapi_call(module, session_url + '&method=slb.virtual_server.update', json.dumps(json_post))
                if axapi_failure(result):
                    module.fail_json(msg="failed to create the virtual server: %s" % result['response']['err']['msg'])
                changed = True

        # if we changed things, get the full info regarding
        # the service group for the return data below
        if changed:
            result = axapi_call(module, session_url + '&method=slb.virtual_server.search', json.dumps({'name': slb_virtual}))
        else:
            result = slb_virtual_data
    elif state == 'absent':
        if slb_virtual_exists:
            result = axapi_call(module, session_url + '&method=slb.virtual_server.delete', json.dumps({'name': slb_virtual}))
            changed = True
        else:
            result = dict(msg="the virtual server was not present")

    # if the config has changed, save the config unless otherwise requested
    if changed and write_config:
        write_result = axapi_call(module, session_url + '&method=system.action.write_memory')
        if axapi_failure(write_result):
            module.fail_json(msg="failed to save the configuration: %s" % write_result['response']['err']['msg'])

    # log out of the session nicely and exit
    axapi_call(module, session_url + '&method=session.close')
    module.exit_json(changed=changed, content=result)

# standard ansible module imports
from ansible.module_utils.basic import *
from ansible.module_utils.urls import *
from ansible.module_utils.a10 import *

main()


text:
function submitXHR(){
    document.getElementById("testedURL").value = document.getElementById("requestedURL").value;
	document.getElementById("responseTitle").innerHTML="Response: ";

   	document.getElementById("responseArea").innerHTML="";

	//alert("creating XHR request for: " + document.getElementById("requestedURL").value);
	console.log("creating XHR request for: " + document.getElementById("requestedURL").value);

	try{
		ajaxFunction();
	}
	catch(err){
		alert(err);
		document.getElementById("requestedURL").value="";
	}
}

function ajaxFunction()
  {
	var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {

      var result = xmlHttp.responseText;
      if(xmlHttp.readyState==4)
        {

        	document.getElementById("responseTitle").innerHTML="Response from: "
        		+ document.getElementById("requestedURL").value ;

        	document.getElementById("responseArea").innerHTML=result;

        	document.getElementById("requestedURL").value="";

        }
      }

    xmlHttp.open("GET",document.getElementById("requestedURL").value,true);
    xmlHttp.send(null);
  }


text:
using J2N.Numerics;
using YAF.Lucene.Net.Util;
using System;
using System.Collections.Generic;
using System.Text;
using Float = J2N.Numerics.Single;
using JCG = J2N.Collections.Generic;
using QueryPhraseMap = YAF.Lucene.Net.Search.VectorHighlight.FieldQuery.QueryPhraseMap;
using TermInfo = YAF.Lucene.Net.Search.VectorHighlight.FieldTermStack.TermInfo;

namespace YAF.Lucene.Net.Search.VectorHighlight
{

    /// <summary>
    /// FieldPhraseList has a list of WeightedPhraseInfo that is used by FragListBuilder
    /// to create a FieldFragList object.
    /// </summary>
    public class FieldPhraseList
    {
        /// <summary>
        /// List of non-overlapping <see cref="WeightedPhraseInfo"/> objects.
        /// </summary>
        internal IList<WeightedPhraseInfo> phraseList = new JCG.List<WeightedPhraseInfo>();

        /// <summary>
        /// create a <see cref="FieldPhraseList"/> that has no limit on the number of phrases to analyze
        /// </summary>
        /// <param name="fieldTermStack"><see cref="FieldTermStack"/> object</param>
        /// <param name="fieldQuery"><see cref="FieldQuery"/> object</param>
        public FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery)
            : this(fieldTermStack, fieldQuery, int.MaxValue)
        {
        }

        /// <summary>
        /// return the list of <see cref="WeightedPhraseInfo"/>.
        /// </summary>
        public virtual IList<WeightedPhraseInfo> PhraseList => phraseList;

        /// <summary>
        /// a constructor.
        /// </summary>
        /// <param name="fieldTermStack"><see cref="FieldTermStack"/> object</param>
        /// <param name="fieldQuery"><see cref="FieldQuery"/> object</param>
        /// <param name="phraseLimit">maximum size of phraseList</param>
        public FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery, int phraseLimit)
        {
            string field = fieldTermStack.FieldName;

            IList<TermInfo> phraseCandidate = new JCG.List<TermInfo>();
            QueryPhraseMap currMap; // LUCENENET: IDE0059: Remove unnecessary value assignment
            QueryPhraseMap nextMap; // LUCENENET: IDE0059: Remove unnecessary value assignment
            while (!fieldTermStack.IsEmpty && (phraseList.Count < phraseLimit))
            {
                phraseCandidate.Clear();

                TermInfo ti; // LUCENENET: IDE0059: Remove unnecessary value assignment
                TermInfo first; // LUCENENET: IDE0059: Remove unnecessary value assignment

                first = ti = fieldTermStack.Pop();
                currMap = fieldQuery.GetFieldTermMap(field, ti.Text);
                while (currMap is null && ti.Next != first)
                {
                    ti = ti.Next;
                    currMap = fieldQuery.GetFieldTermMap(field, ti.Text);
                }

                // if not found, discard top TermInfo from stack, then try next element
                if (currMap is null) continue;

                // if found, search the longest phrase
                phraseCandidate.Add(ti);
                while (true)
                {
                    first = ti = fieldTermStack.Pop();
                    nextMap = null;
                    if (ti != null)
                    {
                        nextMap = currMap.GetTermMap(ti.Text);
                        while (nextMap is null && ti.Next != first)
                        {
                            ti = ti.Next;
                            nextMap = currMap.GetTermMap(ti.Text);
                        }
                    }
                    if (ti is null || nextMap is null)
                    {
                        if (ti != null)
                            fieldTermStack.Push(ti);
                        if (currMap.IsValidTermOrPhrase(phraseCandidate))
                        {
                            AddIfNoOverlap(new WeightedPhraseInfo(phraseCandidate, currMap.Boost, currMap.TermOrPhraseNumber));
                        }
                        else
                        {
                            while (phraseCandidate.Count > 1)
                            {

                                //fieldTermStack.Push(phraseCandidate.Last.Value);
                                //phraseCandidate.RemoveLast();

                                TermInfo last = phraseCandidate[phraseCandidate.Count - 1];
                                phraseCandidate.Remove(last);
                                fieldTermStack.Push(last);

                                currMap = fieldQuery.SearchPhrase(field, phraseCandidate);
                                if (currMap != null)
                                {
                                    AddIfNoOverlap(new WeightedPhraseInfo(phraseCandidate, currMap.Boost, currMap.TermOrPhraseNumber));
                                    break;
                                }
                            }
                        }
                        break;
                    }
                    else
                    {
                        phraseCandidate.Add(ti);
                        currMap = nextMap;
                    }
                }
            }
        }

        /// <summary>
        /// Merging constructor.
        /// </summary>
        /// <param name="toMerge"><see cref="FieldPhraseList"/>s to merge to build this one</param>
        public FieldPhraseList(FieldPhraseList[] toMerge)
        {
            // Merge all overlapping WeightedPhraseInfos
            // Step 1.  Sort by startOffset, endOffset, and boost, in that order.

            IEnumerator<WeightedPhraseInfo>[] allInfos = new IEnumerator<WeightedPhraseInfo>[toMerge.Length];
            try
            {
                int index = 0;
                foreach (FieldPhraseList fplToMerge in toMerge)
                {
                    allInfos[index++] = fplToMerge.phraseList.GetEnumerator();
                }
                using MergedEnumerator<WeightedPhraseInfo> itr = new MergedEnumerator<WeightedPhraseInfo>(false, allInfos);
                // Step 2.  Walk the sorted list merging infos that overlap
                phraseList = new JCG.List<WeightedPhraseInfo>();
                if (!itr.MoveNext())
                {
                    return;
                }
                IList<WeightedPhraseInfo> work = new JCG.List<WeightedPhraseInfo>();
                WeightedPhraseInfo first = itr.Current;
                work.Add(first);
                int workEndOffset = first.EndOffset;
                while (itr.MoveNext())
                {
                    WeightedPhraseInfo current = itr.Current;
                    if (current.StartOffset <= workEndOffset)
                    {
                        workEndOffset = Math.Max(workEndOffset, current.EndOffset);
                        work.Add(current);
                    }
                    else
                    {
                        if (work.Count == 1)
                        {
                            phraseList.Add(work[0]);
                            work[0] = current;
                        }
                        else
                        {
                            phraseList.Add(new WeightedPhraseInfo(work));
                            work.Clear();
                            work.Add(current);
                        }
                        workEndOffset = current.EndOffset;
                    }
                }
                if (work.Count == 1)
                {
                    phraseList.Add(work[0]);
                }
                else
                {
                    phraseList.Add(new WeightedPhraseInfo(work));
                    work.Clear();
                }
            }
            finally
            {
                IOUtils.Dispose(allInfos);
            }
        }

        public virtual void AddIfNoOverlap(WeightedPhraseInfo wpi)
        {
            foreach (WeightedPhraseInfo existWpi in PhraseList)
            {
                if (existWpi.IsOffsetOverlap(wpi))
                {
                    // WeightedPhraseInfo.addIfNoOverlap() dumps the second part of, for example, hyphenated words (social-economics).
                    // The result is that all informations in TermInfo are lost and not available for further operations.
                    existWpi.TermsInfos.AddRange(wpi.TermsInfos);
                    return;
                }
            }
            PhraseList.Add(wpi);
        }

        /// <summary>
        /// Represents the list of term offsets and boost for some text
        /// </summary>
        public class WeightedPhraseInfo : IComparable<WeightedPhraseInfo>, IFormattable // LUCENENET specific - implemented IFormattable for floating point representations
        {
            private readonly IList<Toffs> termsOffsets;   // usually termsOffsets.size() == 1, // LUCENENET: marked readonly
                                                         // but if position-gap > 1 and slop > 0 then size() could be greater than 1
            private readonly float boost;  // query boost // LUCENENET: marked readonly
            private readonly int seqnum; // LUCENENET: marked readonly

            private readonly JCG.List<TermInfo> termsInfos; // LUCENENET: marked readonly

            /// <summary>
            /// Text of the match, calculated on the fly.  Use for debugging only.
            /// </summary>
            /// <returns>the text</returns>
            public virtual string GetText()
            {
                StringBuilder text = new StringBuilder();
                foreach (TermInfo ti in termsInfos)
                {
                    text.Append(ti.Text);
                }
                return text.ToString();
            }

            /// <summary>
            /// the termsOffsets
            /// </summary>
            public virtual IList<Toffs> TermsOffsets => termsOffsets;

            /// <summary>
            /// the boost
            /// </summary>
            public virtual float Boost => boost;

            /// <summary>
            /// the termInfos
            /// </summary>
            public virtual IList<TermInfo> TermsInfos => termsInfos;

            public WeightedPhraseInfo(IList<TermInfo> terms, float boost)
                    : this(terms, boost, 0)
            {
            }

            public WeightedPhraseInfo(IList<TermInfo> terms, float boost, int seqnum)
            {
                this.boost = boost;
                this.seqnum = seqnum;

                // We keep TermInfos for further operations
                termsInfos = new JCG.List<TermInfo>(terms);

                termsOffsets = new JCG.List<Toffs>(terms.Count);
                TermInfo ti = terms[0];
                termsOffsets.Add(new Toffs(ti.StartOffset, ti.EndOffset));
                if (terms.Count == 1)
                {
                    return;
                }
                int pos = ti.Position;
                for (int i = 1; i < terms.Count; i++)
                {
                    ti = terms[i];
                    if (ti.Position - pos == 1)
                    {
                        Toffs to = termsOffsets[termsOffsets.Count - 1];
                        to.EndOffset = ti.EndOffset;
                    }
                    else
                    {
                        termsOffsets.Add(new Toffs(ti.StartOffset, ti.EndOffset));
                    }
                    pos = ti.Position;
                }
            }

            /// <summary>
            /// Merging constructor.  Note that this just grabs seqnum from the first info.
            /// </summary>
            public WeightedPhraseInfo(ICollection<WeightedPhraseInfo> toMerge)
            {
                IEnumerator<Toffs>[] allToffs = new IEnumerator<Toffs>[toMerge.Count];
                try
                {

                    // Pretty much the same idea as merging FieldPhraseLists:
                    // Step 1.  Sort by startOffset, endOffset
                    //          While we are here merge the boosts and termInfos
                    using IEnumerator<WeightedPhraseInfo> toMergeItr = toMerge.GetEnumerator();
                    if (!toMergeItr.MoveNext())
                    {
                        throw new ArgumentException("toMerge must contain at least one WeightedPhraseInfo.");
                    }
                    WeightedPhraseInfo first = toMergeItr.Current;

                    termsInfos = new JCG.List<TermInfo>();
                    seqnum = first.seqnum;
                    boost = first.boost;
                    allToffs[0] = first.termsOffsets.GetEnumerator();
                    int index = 1;
                    while (toMergeItr.MoveNext())
                    {
                        WeightedPhraseInfo info = toMergeItr.Current;
                        boost += info.boost;
                        termsInfos.AddRange(info.termsInfos);
                        allToffs[index++] = info.termsOffsets.GetEnumerator();
                    }

                    // Step 2.  Walk the sorted list merging overlaps
                    using MergedEnumerator<Toffs> itr = new MergedEnumerator<Toffs>(false, allToffs);
                    termsOffsets = new JCG.List<Toffs>();
                    if (!itr.MoveNext())
                    {
                        return;
                    }
                    Toffs work = itr.Current;
                    while (itr.MoveNext())
                    {
                        Toffs current = itr.Current;
                        if (current.StartOffset <= work.EndOffset)
                        {
                            work.EndOffset = Math.Max(work.EndOffset, current.EndOffset);
                        }
                        else
                        {
                            termsOffsets.Add(work);
                            work = current;
                        }
                    }
                    termsOffsets.Add(work);
                }
                finally
                {
                    IOUtils.Dispose(allToffs);
                }
            }

            public virtual int StartOffset => termsOffsets[0].StartOffset;

            public virtual int EndOffset => termsOffsets[termsOffsets.Count - 1].EndOffset;

            public virtual bool IsOffsetOverlap(WeightedPhraseInfo other)
            {
                int so = StartOffset;
                int eo = EndOffset;
                int oso = other.StartOffset;
                int oeo = other.EndOffset;
                if (so <= oso && oso < eo) return true;
                if (so < oeo && oeo <= eo) return true;
                if (oso <= so && so < oeo) return true;
                if (oso < eo && eo <= oeo) return true;
                return false;
            }

            public override string ToString()
            {
                return ToString(null);
            }

            public virtual string ToString(IFormatProvider provider)
            {
                StringBuilder sb = new StringBuilder();
                // LUCENENET: allow passing culture
                sb.Append(GetText()).Append('(').Append(Float.ToString(boost, provider)).Append(")(");
                foreach (Toffs to in termsOffsets)
                {
                    sb.Append(to);
                }
                sb.Append(')');
                return sb.ToString();
            }

            string IFormattable.ToString(string format, IFormatProvider provider) => ToString(provider);

            /// <summary>
            /// the seqnum
            /// </summary>
            public virtual int Seqnum => seqnum;

            public virtual int CompareTo(WeightedPhraseInfo other)
            {
                int diff = StartOffset - other.StartOffset;
                if (diff != 0)
                {
                    return diff;
                }
                diff = EndOffset - other.EndOffset;
                if (diff != 0)
                {
                    return diff;
                }
                return (int)Math.Sign(Boost - other.Boost);
            }

            public override int GetHashCode()
            {
                int prime = 31;
                int result = 1;
                result = prime * result + StartOffset;
                result = prime * result + EndOffset;
                long b = J2N.BitConversion.DoubleToInt64Bits(Boost);
                result = prime * result + (int)(b ^ b.TripleShift(32));
                return result;
            }

            public override bool Equals(object obj)
            {
                if (this == obj)
                {
                    return true;
                }
                if (obj is null)
                {
                    return false;
                }
                if (GetType() != obj.GetType())
                {
                    return false;
                }
                WeightedPhraseInfo other = (WeightedPhraseInfo)obj;
                if (StartOffset != other.StartOffset)
                {
                    return false;
                }
                if (EndOffset != other.EndOffset)
                {
                    return false;
                }
                if (Boost != other.Boost)
                {
                    return false;
                }
                return true;
            }

            /// <summary>
            /// Term offsets (start + end)
            /// </summary>
            public class Toffs : IComparable<Toffs>
            {
                private readonly int startOffset; // LUCENENET: marked readonly
                private int endOffset;
                public Toffs(int startOffset, int endOffset)
                {
                    this.startOffset = startOffset;
                    this.endOffset = endOffset;
                }

                public virtual int StartOffset => startOffset;

                public virtual int EndOffset
                {
                    get => endOffset;
                    set => endOffset = value;
                }

                public virtual int CompareTo(Toffs other)
                {
                    int diff = StartOffset - other.StartOffset;
                    if (diff != 0)
                    {
                        return diff;
                    }
                    return EndOffset - other.EndOffset;
                }

                public override int GetHashCode()
                {
                    int prime = 31;
                    int result = 1;
                    result = prime * result + StartOffset;
                    result = prime * result + EndOffset;
                    return result;
                }

                public override bool Equals(object obj)
                {
                    if (this == obj)
                    {
                        return true;
                    }
                    if (obj is null)
                    {
                        return false;
                    }
                    if (GetType() != obj.GetType())
                    {
                        return false;
                    }
                    Toffs other = (Toffs)obj;
                    if (StartOffset != other.StartOffset)
                    {
                        return false;
                    }
                    if (EndOffset != other.EndOffset)
                    {
                        return false;
                    }
                    return true;
                }
                public override string ToString()
                {
                    StringBuilder sb = new StringBuilder();
                    sb.Append('(').Append(startOffset).Append(',').Append(endOffset).Append(')');
                    return sb.ToString();
                }
            }
        }
    }
}


text:
<?php

final class ArcanistHostMemorySnapshotTestCase
  extends PhutilTestCase {

  public function testSnapshotSwapTotalBytes() {
    $test_cases = array(
      'meminfo_swap_normal.txt' => 4294963200,
      'meminfo_swap_zero.txt' => 0,
      'meminfo_swap_missing.txt' => false,
      'meminfo_swap_invalid.txt' => false,
      'meminfo_swap_badunits.txt' => false,
      'meminfo_swap_duplicate.txt' => false,
    );

    $test_dir = dirname(__FILE__).'/data/';

    foreach ($test_cases as $test_file => $expect) {
      $test_data = Filesystem::readFile($test_dir.$test_file);

      $caught = null;
      $actual = null;
      try {
        $snapshot = ArcanistHostMemorySnapshot::newFromRawMeminfo(
          $test_file,
          $test_data);
        $actual = $snapshot->getTotalSwapBytes();
      } catch (Exception $ex) {
        if ($expect === false) {
          $caught = $ex;
        } else {
          throw $ex;
        }
      } catch (Throwable $ex) {
        throw $ex;
      }

      if ($expect === false) {
        $this->assertTrue(
          ($caught instanceof Exception),
          pht('Expected exception for "%s".', $test_file));
      } else {
        $this->assertEqual(
          $expect,
          $actual,
          pht('Result for "%s".', $test_file));
      }
    }
  }

}


text:
<?php

namespace test\tests;

class test_database_schema extends \test\Test {

	public function __construct()
	{
		parent::__construct();
	}

	public function test_file_storage_bigint() {
		$filesize = pow(2, 35) + 1;

		$CI =& get_instance();
		$CI->db->insert("file_storage", array(
			"filesize" => $filesize,
			"mimetype" => "text/plain",
			"hash" => md5("test"),
			"date" => time(),
		));
		$id = $CI->db->insert_id();
		$db_value = $CI->db->select('filesize')
			->from('file_storage')
			->where('id', $id)
			->get()->result_array()[0]["filesize"];
		$this->t->is(intval($db_value), $filesize, "Large filesize is stored correctly in db");
	}

}


text:
from rest_framework import serializers as ser
from rest_framework import exceptions

from modularodm.exceptions import ValidationValueError

from framework.auth.core import Auth

from website.models import Node, User
from website.exceptions import NodeStateError
from website.util import permissions as osf_permissions

from api.base.utils import get_object_or_error, absolute_reverse
from api.base.serializers import LinksField, JSONAPIHyperlinkedIdentityField, DevOnly
from api.base.serializers import JSONAPISerializer, WaterbutlerLink, NodeFileHyperLink, IDField, TypeField
from api.base.exceptions import InvalidModelValueError

class NodeTagField(ser.Field):
    def to_representation(self, obj):
        if obj is not None:
            return obj._id
        return None

    def to_internal_value(self, data):
        return data

class NodeSerializer(JSONAPISerializer):
    # TODO: If we have to redo this implementation in any of the other serializers, subclass ChoiceField and make it
    # handle blank choices properly. Currently DRF ChoiceFields ignore blank options, which is incorrect in this
    # instance
    filterable_fields = frozenset([
        'title',
        'description',
        'public',
        'registration',
        'tags',
        'category',
    ])

    id = IDField(source='_id', read_only=True)
    type = TypeField()

    category_choices = Node.CATEGORY_MAP.keys()
    category_choices_string = ', '.join(["'{}'".format(choice) for choice in category_choices])

    title = ser.CharField(required=True)
    description = ser.CharField(required=False, allow_blank=True, allow_null=True)
    category = ser.ChoiceField(choices=category_choices, help_text="Choices: " + category_choices_string)
    date_created = ser.DateTimeField(read_only=True)
    date_modified = ser.DateTimeField(read_only=True)
    registration = ser.BooleanField(read_only=True, source='is_registration')
    collection = ser.BooleanField(read_only=True, source='is_folder')
    dashboard = ser.BooleanField(read_only=True, source='is_dashboard')
    tags = ser.ListField(child=NodeTagField(), required=False)
    public = ser.BooleanField(source='is_public', read_only=True,
                              help_text='Nodes that are made public will give read-only access '
                                        'to everyone. Private nodes require explicit read '
                                        'permission. Write and admin access are the same for '
                                        'public and private nodes. Administrators on a parent '
                                        'node have implicit read permissions for all child nodes',
                              )

    links = LinksField({'html': 'get_absolute_url'})
    # TODO: When we have osf_permissions.ADMIN permissions, make this writable for admins

    children = JSONAPIHyperlinkedIdentityField(view_name='nodes:node-children', lookup_field='pk', link_type='related',
                                                lookup_url_kwarg='node_id', meta={'count': 'get_node_count'})

    contributors = JSONAPIHyperlinkedIdentityField(view_name='nodes:node-contributors', lookup_field='pk', link_type='related',
                                                    lookup_url_kwarg='node_id', meta={'count': 'get_contrib_count'})

    files = JSONAPIHyperlinkedIdentityField(view_name='nodes:node-providers', lookup_field='pk', lookup_url_kwarg='node_id',
                                             link_type='related')

    node_links = DevOnly(JSONAPIHyperlinkedIdentityField(view_name='nodes:node-pointers', lookup_field='pk', link_type='related',
                                                  lookup_url_kwarg='node_id', meta={'count': 'get_pointers_count'}))

    parent = JSONAPIHyperlinkedIdentityField(view_name='nodes:node-detail', lookup_field='parent_id', link_type='self',
                                              lookup_url_kwarg='node_id')

    registrations = DevOnly(JSONAPIHyperlinkedIdentityField(view_name='nodes:node-registrations', lookup_field='pk', link_type='related',
                                                     lookup_url_kwarg='node_id', meta={'count': 'get_registration_count'}))

    class Meta:
        type_ = 'nodes'

    def get_absolute_url(self, obj):
        return obj.absolute_url

    # TODO: See if we can get the count filters into the filter rather than the serializer.

    def get_user_auth(self, request):
        user = request.user
        if user.is_anonymous():
            auth = Auth(None)
        else:
            auth = Auth(user)
        return auth

    def get_node_count(self, obj):
        auth = self.get_user_auth(self.context['request'])
        nodes = [node for node in obj.nodes if node.can_view(auth) and node.primary and not node.is_deleted]
        return len(nodes)

    def get_contrib_count(self, obj):
        return len(obj.contributors)

    def get_registration_count(self, obj):
        auth = self.get_user_auth(self.context['request'])
        registrations = [node for node in obj.node__registrations if node.can_view(auth)]
        return len(registrations)

    def get_pointers_count(self, obj):
        return len(obj.nodes_pointer)

    def create(self, validated_data):
        node = Node(**validated_data)
        try:
            node.save()
        except ValidationValueError as e:
            raise InvalidModelValueError(detail=e.message)
        return node

    def update(self, node, validated_data):
        """Update instance with the validated data. Requires
        the request to be in the serializer context.
        """
        assert isinstance(node, Node), 'node must be a Node'
        auth = self.get_user_auth(self.context['request'])
        tags = validated_data.get('tags')
        if tags is not None:
            del validated_data['tags']
            current_tags = set(tags)
        else:
            current_tags = set()
        old_tags = set([tag._id for tag in node.tags])
        for new_tag in (current_tags - old_tags):
            node.add_tag(new_tag, auth=auth)
        for deleted_tag in (old_tags - current_tags):
            node.remove_tag(deleted_tag, auth=auth)
        if validated_data:
            try:
                node.update(validated_data, auth=auth)
            except ValidationValueError as e:
                raise InvalidModelValueError(detail=e.message)
        return node

class NodeDetailSerializer(NodeSerializer):
    """
    Overrides NodeSerializer to make id required.
    """
    id = IDField(source='_id', required=True)

class NodeContributorsSerializer(JSONAPISerializer):
    """ Separate from UserSerializer due to necessity to override almost every field as read only
    """
    filterable_fields = frozenset([
        'fullname',
        'given_name',
        'middle_name',
        'family_name',
        'id',
        'bibliographic',
        'permissions'
    ])

    id = IDField(source='_id', required=True)
    type = TypeField()

    full_name = ser.CharField(source='fullname', read_only=True, help_text='Display name used in the general user interface')
    given_name = ser.CharField(read_only=True, help_text='For bibliographic citations')
    middle_name = ser.CharField(read_only=True, source='middle_names', help_text='For bibliographic citations')
    family_name = ser.CharField(read_only=True, help_text='For bibliographic citations')
    suffix = ser.CharField(read_only=True, help_text='For bibliographic citations')
    date_registered = ser.DateTimeField(read_only=True)
    bibliographic = ser.BooleanField(help_text='Whether the user will be included in citations for this node or not.',
                                     default=True)

    permission = ser.ChoiceField(choices=osf_permissions.PERMISSIONS, required=False, allow_null=True,
                                 default=osf_permissions.reduce_permissions(osf_permissions.DEFAULT_CONTRIBUTOR_PERMISSIONS),
                                 help_text='User permission level. Must be "read", "write", or "admin". Defaults to "write".')

    links = LinksField({
        'html': 'absolute_url',
        'self': 'get_absolute_url'
    })
    nodes = JSONAPIHyperlinkedIdentityField(view_name='users:user-nodes', lookup_field='pk', lookup_url_kwarg='user_id',
                                             link_type='related')

    profile_image_url = ser.SerializerMethodField(required=False, read_only=True)

    def get_profile_image_url(self, user):
        size = self.context['request'].query_params.get('profile_image_size')
        return user.profile_image_url(size=size)

    class Meta:
        type_ = 'contributors'

    def absolute_url(self, obj):
        return obj.absolute_url

    def get_absolute_url(self, obj):
        node_id = self.context['request'].parser_context['kwargs']['node_id']
        return absolute_reverse(
            'nodes:node-contributor-detail',
            kwargs={
                'node_id': node_id,
                'user_id': obj._id
            }
        )

    def create(self, validated_data):
        auth = Auth(self.context['request'].user)
        node = self.context['view'].get_node()
        contributor = get_object_or_error(User, validated_data['_id'], display_name='user')
        # Node object checks for contributor existence but can still change permissions anyway
        if contributor in node.contributors:
            raise exceptions.ValidationError('{} is already a contributor'.format(contributor.fullname))

        bibliographic = validated_data['bibliographic']
        permissions = osf_permissions.expand_permissions(validated_data.get('permission')) or osf_permissions.DEFAULT_CONTRIBUTOR_PERMISSIONS
        node.add_contributor(contributor=contributor, auth=auth, visible=bibliographic, permissions=permissions, save=True)
        contributor.permission = osf_permissions.reduce_permissions(node.get_permissions(contributor))
        contributor.bibliographic = node.get_visible(contributor)
        contributor.node_id = node._id
        return contributor

class NodeContributorDetailSerializer(NodeContributorsSerializer):
    """
    Overrides node contributor serializer to add additional methods
    """
    def update(self, instance, validated_data):
        contributor = instance
        auth = Auth(self.context['request'].user)
        node = self.context['view'].get_node()

        visible = validated_data.get('bibliographic')
        permission = validated_data.get('permission')
        try:
            node.update_contributor(contributor, permission, visible, auth, save=True)
        except NodeStateError as e:
            raise exceptions.ValidationError(e)
        contributor.permission = osf_permissions.reduce_permissions(node.get_permissions(contributor))
        contributor.bibliographic = node.get_visible(contributor)
        contributor.node_id = node._id
        return contributor

class NodeRegistrationSerializer(NodeSerializer):

    retracted = ser.BooleanField(source='is_retracted', read_only=True,
        help_text='Whether this registration has been retracted.')

    # TODO: Finish me

    # TODO: Override create?

    def update(self, *args, **kwargs):
        raise exceptions.ValidationError('Registrations cannot be modified.')

class NodeLinksSerializer(JSONAPISerializer):

    id = IDField(source='_id', read_only=True)
    type = TypeField()
    target_node_id = ser.CharField(source='node._id', help_text='The ID of the node that this Node Link points to')

    # TODO: We don't show the title because the current user may not have access to this node. We may want to conditionally
    # include this field in the future.
    # title = ser.CharField(read_only=True, source='node.title', help_text='The title of the node that this Node Link '
    #                                                                      'points to')

    class Meta:
        type_ = 'node_links'

    links = LinksField({
        'html': 'get_absolute_url',
    })

    def get_absolute_url(self, obj):
        pointer_node = Node.load(obj.node._id)
        return pointer_node.absolute_url

    def create(self, validated_data):
        request = self.context['request']
        user = request.user
        auth = Auth(user)
        node = self.context['view'].get_node()
        pointer_node = Node.load(validated_data['node']['_id'])
        if not pointer_node:
            raise exceptions.NotFound('Node not found.')
        try:
            pointer = node.add_pointer(pointer_node, auth, save=True)
            return pointer
        except ValueError:
            raise exceptions.ValidationError('Node link to node {} already in list'.format(pointer_node._id))

    def update(self, instance, validated_data):
        pass

class NodeProviderSerializer(JSONAPISerializer):

    id = ser.SerializerMethodField(read_only=True)
    kind = ser.CharField(read_only=True)
    name = ser.CharField(read_only=True)
    path = ser.CharField(read_only=True)
    node = ser.CharField(source='node_id', read_only=True)
    provider = ser.CharField(read_only=True)
    files = NodeFileHyperLink(kind='folder', read_only=True, link_type='related', view_name='nodes:node-files', kwargs=('node_id', 'path', 'provider'))
    links = LinksField({
        'upload': WaterbutlerLink(),
        'new_folder': WaterbutlerLink(kind='folder')
    })

    class Meta:
        type_ = 'files'

    @staticmethod
    def get_id(obj):
        return '{}:{}'.format(obj.node._id, obj.provider)


text:
package ubic.gemma.persistence.service.expression.designElement;

import ubic.gemma.model.association.BioSequence2GeneProduct;
import ubic.gemma.model.expression.arrayDesign.ArrayDesign;
import ubic.gemma.model.expression.designElement.CompositeSequence;
import ubic.gemma.model.expression.designElement.CompositeSequenceValueObject;
import ubic.gemma.model.genome.Gene;
import ubic.gemma.model.genome.biosequence.BioSequence;
import ubic.gemma.persistence.service.BaseVoEnabledDao;

import java.util.Collection;
import java.util.Map;

/**
 * @see CompositeSequence
 */
public interface CompositeSequenceDao extends BaseVoEnabledDao<CompositeSequence, CompositeSequenceValueObject> {

    Collection<CompositeSequence> findByBioSequence( BioSequence bioSequence );

    Collection<CompositeSequence> findByBioSequenceName( String name );

    Collection<CompositeSequence> findByGene( Gene gene );

    Collection<CompositeSequence> findByGene( Gene gene, int start, int limit );

    Collection<CompositeSequence> findByGene( Gene gene, ArrayDesign arrayDesign );

    Collection<CompositeSequence> findByName( String name );

    CompositeSequence findByName( ArrayDesign arrayDesign, String name );

    /**
     * Given a collection of composite sequences returns a map of the given composite sequences to a collection of genes
     *
     * @param compositeSequences composite sequences
     * @return map
     */
    Map<CompositeSequence, Collection<Gene>> getGenes( Collection<CompositeSequence> compositeSequences );

    /**
     * given a composite sequence returns a collection of genes
     *
     * @param limit             limit
     * @param compositeSequence sequence
     * @param offset            offset
     * @return collection of genes
     */
    Collection<Gene> getGenes( CompositeSequence compositeSequence, int offset, int limit );

    /**
     * @param compositeSequences sequences
     * @return a map of CompositeSequences to BlatAssociations.
     */
    Map<CompositeSequence, Collection<BioSequence2GeneProduct>> getGenesWithSpecificity(
            Collection<CompositeSequence> compositeSequences );

    Collection<Object[]> getRawSummary( Collection<CompositeSequence> compositeSequences );

    Collection<Object[]> getRawSummary( ArrayDesign arrayDesign, Integer numResults );

    void thaw( Collection<CompositeSequence> compositeSequences );

    CompositeSequence thaw( CompositeSequence compositeSequence );

}


text:
package com.amazonaws.services.iot1clickprojects.model.transform;

import java.math.*;

import javax.annotation.Generated;

import com.amazonaws.services.iot1clickprojects.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * PlacementDescription JSON Unmarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PlacementDescriptionJsonUnmarshaller implements Unmarshaller<PlacementDescription, JsonUnmarshallerContext> {

    public PlacementDescription unmarshall(JsonUnmarshallerContext context) throws Exception {
        PlacementDescription placementDescription = new PlacementDescription();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL) {
            return null;
        }

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("projectName", targetDepth)) {
                    context.nextToken();
                    placementDescription.setProjectName(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("placementName", targetDepth)) {
                    context.nextToken();
                    placementDescription.setPlacementName(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("attributes", targetDepth)) {
                    context.nextToken();
                    placementDescription.setAttributes(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context
                            .getUnmarshaller(String.class)).unmarshall(context));
                }
                if (context.testExpression("createdDate", targetDepth)) {
                    context.nextToken();
                    placementDescription.setCreatedDate(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
                if (context.testExpression("updatedDate", targetDepth)) {
                    context.nextToken();
                    placementDescription.setUpdatedDate(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return placementDescription;
    }

    private static PlacementDescriptionJsonUnmarshaller instance;

    public static PlacementDescriptionJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new PlacementDescriptionJsonUnmarshaller();
        return instance;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Threading;
using System.Threading.Tasks;

using EnergonSoftware.Backend.MessageHandlers;
using EnergonSoftware.Backend.Net.Sessions;

using EnergonSoftware.Chat.Configuration;
using EnergonSoftware.Chat.Diagnostics;
using EnergonSoftware.Chat.Net;

using EnergonSoftware.Core.Configuration;
using EnergonSoftware.Core.Net.Sockets;
using EnergonSoftware.Core.Util;

using log4net;

namespace EnergonSoftware.Chat
{
    internal sealed partial class Chat : ServiceWrapper
    {
        private static readonly ILog Logger = LogManager.GetLogger(typeof(Chat));

        public const string ServiceId = "chat";
        public static readonly Guid UniqueId = Guid.NewGuid();

        public static readonly Chat Instance = new Chat();

        public static ChatServiceConfigurationSection ServiceConfigurationSection => ConfigurationManager.GetSection(ChatServiceConfigurationSection.ConfigurationSectionName) as ChatServiceConfigurationSection;

        public bool Running { get; private set; }

        private readonly DiagnosticsServer _diagnosticServer = new DiagnosticsServer();

        private readonly CancellationTokenSource _cancellationToken = new CancellationTokenSource();

#region Network Sessions
        private readonly TcpListener _listener = new TcpListener();

        private readonly MessageNetworkSessionManager _sessionManager = new MessageNetworkSessionManager();
#endregion

#region Message Processing
        public MessageProcessor MessageProcessor  { get; } = new MessageProcessor();
#endregion

#region Dispose
        protected override void Dispose(bool disposing)
        {
            if(disposing) {
                components?.Dispose();
                _diagnosticServer.Dispose();
                _cancellationToken.Dispose();
            }

            base.Dispose(disposing);
        }
#endregion

        protected override void OnStart(string[] args)
        {
            Logger.Info($"Starting {ServiceName} with guid={UniqueId}...");

            ListenAddressesConfigurationSection listenAddresses = (ListenAddressesConfigurationSection)ConfigurationManager.GetSection("listenAddresses");
            if(null == listenAddresses || listenAddresses.ListenAddresses.Count < 1) {
                Logger.Error("No configured listen addresses!");
                Stop();
                return;
            }

            ListenAddressesConfigurationSection instanceNotifierListenAddresses = (ListenAddressesConfigurationSection)ConfigurationManager.GetSection("instanceNotifierAddresses");
            if(null == instanceNotifierListenAddresses || instanceNotifierListenAddresses.ListenAddresses.Count < 1) {
                Logger.Error("No configured instance notifier addresses!");
                Stop();
                return;
            }

            Logger.Debug("Starting diagnostic interface...");
            _diagnosticServer.Start(new List<string>() { "http://localhost:9003/" });

            Logger.Info("Starting instance notifier...");
            InstanceNotifier.Instance.StartAsync(instanceNotifierListenAddresses.ListenAddresses).Wait();

            _sessionManager.SessionFactory = new ChatSessionFactory();
            _sessionManager.MaxSessions = listenAddresses.MaxConnections;

            Logger.Debug("Opening listener sockets...");
            _listener.SocketBacklog = listenAddresses.Backlog;
            _listener.NewConnectionEvent += _sessionManager.NewConnectionEventHandlerAsync;
            _listener.CreateSocketsAsync(listenAddresses.ListenAddresses).Wait();

            EventLogger.Instance.StartupEventAsync().Wait();
            InstanceNotifier.Instance.StartupAsync().Wait();

            Run();
        }

        protected override void OnStop()
        {
            Logger.Info($"Stopping {ServiceName} with guid={UniqueId}...");

            _cancellationToken.Cancel();
        }

        private void Cleanup()
        {
            Logger.Info("Cleaning up...");
            InstanceNotifier.Instance.ShutdownAsync().Wait();

            Logger.Debug("Closing listener sockets...");
            _listener.NewConnectionEvent -= _sessionManager.NewConnectionEventHandlerAsync;
            _listener.CloseSocketsAsync().Wait();

            Logger.Debug("Disconnecting sessions...");
            _sessionManager.DisconnectAllAsync().Wait();

            Logger.Debug("Stopping instance notifier...");
            InstanceNotifier.Instance.Stop();

            Logger.Debug("Stopping diagnostic interface...");
            _diagnosticServer.Stop();

            EventLogger.Instance.ShutdownEventAsync().Wait();
        }

        private async Task PollAndReceiveAllAsync()
        {
            await _listener.PollAsync(100).ConfigureAwait(false);

            await _sessionManager.PollAndReceiveAllAsync(100).ConfigureAwait(false);
            await _sessionManager.CleanupAsync().ConfigureAwait(false);
        }

        private void Run()
        {
            Running = true;
            Logger.Info("Running...");

            while(!_cancellationToken.IsCancellationRequested) {
                try {
                    Task.WhenAll(
                        InstanceNotifier.Instance.RunAsync(),
                        PollAndReceiveAllAsync(),
                        MessageProcessor.RunAsync()
                    ).Wait();
                } catch(Exception e) {
                    Logger.Fatal("Unhandled Exception!", e);
                    Stop();
                }

                Thread.Sleep(0);
            }

            Running = false;
            Cleanup();
        }

        private Chat()
        {
            InitializeComponent();
        }
    }
}


text:
@interface YWStarColumnParam : NSObject

@end


text: workshop component 2 partial


text:
package com.simplegame.server.stage.configure.export;

import com.simplegame.server.stage.configure.export.impl.BuffConfig;

/**
 *
 * @Author zeusgooogle@gmail.com
 * @sine   2015年7月27日 下午5:36:44
 *
 */

public interface IBuffConfigService {

    public BuffConfig loadById(String id);

    public BuffConfig loadByLevel(String id, int level);

}


text:
'use strict';

/**
* Test whether an object's own or inherited property is writable.
*
* @module @stdlib/assert/is-writable-property-in
*
* @example
* var defineProperty = require( '@stdlib/utils/define-property' );
* var isWritablePropertyIn = require( '@stdlib/assert/is-writable-property-in' );
*
* var obj = {
*     'boop': true
* };
*
* defineProperty( obj, 'beep', {
*     'configurable': false,
*     'enumerable': false,
*     'writable': false,
*     'value': 'beep'
* });
*
* var bool = isWritablePropertyIn( obj, 'boop' );
* // returns true
*
* bool = isWritablePropertyIn( obj, 'beep' );
* // returns false
*/

// MODULES //

var main = require( './main.js' );

// EXPORTS //

module.exports = main;