text:
package com.github.elegantwhelp.entity;

import org.joml.*;

import com.github.elegantwhelp.assets.Assets;
import com.github.elegantwhelp.collision.AABB;
import com.github.elegantwhelp.collision.Collision;
import com.github.elegantwhelp.io.Window;
import com.github.elegantwhelp.render.*;
import com.github.elegantwhelp.world.World;

public abstract class Entity {
	protected AABB bounding_box;
	// private Texture texture;
	protected Animation[] animations;
	private int use_animation;

	protected Transform transform;

	public Entity(int max_animations, Transform transform) {
		this.animations = new Animation[max_animations];

		this.transform = transform;
		this.use_animation = 0;

		bounding_box = new AABB(new Vector2f(transform.pos.x, transform.pos.y), new Vector2f(transform.scale.x, transform.scale.y));
	}

	protected void setAnimation(int index, Animation animation) {
		animations[index] = animation;
	}

	public void useAnimation(int index) {
		this.use_animation = index;
	}

	public void move(Vector2f direction) {
		transform.pos.add(new Vector3f(direction, 0));

		bounding_box.getCenter().set(transform.pos.x, transform.pos.y);
	}

	public void collideWithTiles(World world) {
		AABB[] boxes = new AABB[25];
		for (int i = 0; i < 5; i++) {
			for (int j = 0; j < 5; j++) {
				boxes[i + j * 5] = world.getTileBoundingBox((int) (((transform.pos.x / 2) + 0.5f) - (5 / 2)) + i, (int) (((-transform.pos.y / 2) + 0.5f) - (5 / 2)) + j);
			}
		}

		AABB box = null;
		for (int i = 0; i < boxes.length; i++) {
			if (boxes[i] != null) {
				if (box == null) box = boxes[i];

				Vector2f length1 = box.getCenter().sub(transform.pos.x, transform.pos.y, new Vector2f());
				Vector2f length2 = boxes[i].getCenter().sub(transform.pos.x, transform.pos.y, new Vector2f());

				if (length1.lengthSquared() > length2.lengthSquared()) {
					box = boxes[i];
				}
			}
		}
		if (box != null) {
			Collision data = bounding_box.getCollision(box);
			if (data.isIntersecting) {
				bounding_box.correctPosition(box, data);
				transform.pos.set(bounding_box.getCenter(), 0);
			}

			for (int i = 0; i < boxes.length; i++) {
				if (boxes[i] != null) {
					if (box == null) box = boxes[i];

					Vector2f length1 = box.getCenter().sub(transform.pos.x, transform.pos.y, new Vector2f());
					Vector2f length2 = boxes[i].getCenter().sub(transform.pos.x, transform.pos.y, new Vector2f());

					if (length1.lengthSquared() > length2.lengthSquared()) {
						box = boxes[i];
					}
				}
			}

			data = bounding_box.getCollision(box);
			if (data.isIntersecting) {
				bounding_box.correctPosition(box, data);
				transform.pos.set(bounding_box.getCenter(), 0);
			}
		}
	}

	public abstract void update(float delta, Window window, Camera camera, World world);

	public void render(Shader shader, Camera camera, World world) {
		Matrix4f target = camera.getProjection();
		target.mul(world.getWorldMatrix());

		shader.bind();
		shader.setUniform("sampler", 0);
		shader.setUniform("projection", transform.getProjection(target));
		animations[use_animation].bind(0);
		Assets.getModel().render();
	}

	public void collideWithEntity(Entity entity) {
		Collision collision = bounding_box.getCollision(entity.bounding_box);

		if (collision.isIntersecting) {
			collision.distance.x /= 2;
			collision.distance.y /= 2;

			bounding_box.correctPosition(entity.bounding_box, collision);
			transform.pos.set(bounding_box.getCenter().x, bounding_box.getCenter().y, 0);

			entity.bounding_box.correctPosition(bounding_box, collision);
			entity.transform.pos.set(entity.bounding_box.getCenter().x, entity.bounding_box.getCenter().y, 0);
		}
	}
}


text:
namespace TemperatureAlarm
{
  public enum PowerAlarmNotificationType
  {
    PowerOn, PowerOff
  }

  public struct PowerAlarmNotification : Notification
  {

    public PowerAlarmNotificationType Type
    {
      get; set;
    }

    public override string ToString ()
    {
      return string.Format ("[PowerAlarmNotification: Type={0}]", Type);
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
#include "ze_lib.h"
#ifndef DYNAMIC_LOAD_LOADER
#include "zes_ddi.h"
#endif

namespace ze_lib
{
    ///////////////////////////////////////////////////////////////////////////////

#ifdef DYNAMIC_LOAD_LOADER
    __zedlllocal ze_result_t context_t::zesInit()
    {
        ze_result_t result = ZE_RESULT_SUCCESS;

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetDeviceProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetDeviceProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Device );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetDriverProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetDriverProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Driver );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetDiagnosticsProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetDiagnosticsProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Diagnostics );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetEngineProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetEngineProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Engine );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetFabricPortProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetFabricPortProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.FabricPort );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetFanProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetFanProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Fan );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetFirmwareProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetFirmwareProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Firmware );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetFrequencyProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetFrequencyProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Frequency );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetLedProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetLedProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Led );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetMemoryProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetMemoryProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Memory );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetPerformanceFactorProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetPerformanceFactorProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.PerformanceFactor );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetPowerProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetPowerProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Power );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetPsuProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetPsuProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Psu );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetRasProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetRasProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Ras );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetSchedulerProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetSchedulerProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Scheduler );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetStandbyProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetStandbyProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Standby );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            auto getTable = reinterpret_cast<zes_pfnGetTemperatureProcAddrTable_t>(
                GET_FUNCTION_PTR(loader, "zesGetTemperatureProcAddrTable") );
            result = getTable( ZE_API_VERSION_1_4, &zesDdiTable.Temperature );
        }

        return result;
    }
#else
    __zedlllocal ze_result_t context_t::zesInit()
    {
        ze_result_t result = ZE_RESULT_SUCCESS;

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetDeviceProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Device );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetDriverProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Driver );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetDiagnosticsProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Diagnostics );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetEngineProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Engine );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetFabricPortProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.FabricPort );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetFanProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Fan );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetFirmwareProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Firmware );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetFrequencyProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Frequency );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetLedProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Led );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetMemoryProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Memory );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetPerformanceFactorProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.PerformanceFactor );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetPowerProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Power );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetPsuProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Psu );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetRasProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Ras );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetSchedulerProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Scheduler );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetStandbyProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Standby );
        }

        if( ZE_RESULT_SUCCESS == result )
        {
            result = zesGetTemperatureProcAddrTable( ZE_API_VERSION_1_4, &zesDdiTable.Temperature );
        }

        return result;
    }
#endif

} // namespace ze_lib


text:
package filestore

import (
	"errors"
	"github.com/crockeo/go-tuner/synth"
	"io"
)

// Some source for a set of RawDelayedNoteData that can be written out using an
// ArrangementDestination
type ArrangementSource interface {
	ReadNoteArrangement(io.Reader) ([]synth.RawDelayedNoteData, error)
}

// A destination for some set of []synth.RawDelayedNoteData.
type ArrangementDestination interface {
	WriteNoteArrangement(io.Writer, []synth.RawDelayedNoteData) error
}

// Merging the functionality of ArrangementSource and ArrangementDestination
// into a single interface.
type ArrangementFormat interface {
	ReadNoteArrangement(io.Reader) ([]synth.RawDelayedNoteData, error)
	WriteNoteArrangement(io.Writer, []synth.RawDelayedNoteData) error
}

// Given a string representing a file extension, attempt to map it to an
// arrangement type.
func DecideFormat(extension string) (ArrangementFormat, error) {
	switch extension {
	case ".json":
		return JSONArrangement{}, nil
	case ".mid":
		return MIDIArrangement{}, nil
	case ".txt":
		return TextArrangement{}, nil
	default:
		return nil, errors.New("Undecidable extension.")
	}
}


text:
package com.ibm.bi.dml.api.jmlc;

import java.util.ArrayList;
import java.util.Map;
import java.util.Map.Entry;

import com.ibm.bi.dml.runtime.controlprogram.ForProgramBlock;
import com.ibm.bi.dml.runtime.controlprogram.FunctionProgramBlock;
import com.ibm.bi.dml.runtime.controlprogram.IfProgramBlock;
import com.ibm.bi.dml.runtime.controlprogram.Program;
import com.ibm.bi.dml.runtime.controlprogram.ProgramBlock;
import com.ibm.bi.dml.runtime.controlprogram.WhileProgramBlock;
import com.ibm.bi.dml.runtime.instructions.Instruction;
import com.ibm.bi.dml.runtime.instructions.cp.VariableCPInstruction;

public class JMLCUtils
{

	/**
	 * Removes rmvar instructions that would remove any of the given outputs.
	 * This is important for keeping registered outputs after the program terminates.
	 *
	 * @param prog
	 */
	public static void cleanupRuntimeProgram( Program prog, String[] outputs)
	{
		Map<String, FunctionProgramBlock> funcMap = prog.getFunctionProgramBlocks();
		if( funcMap != null && !funcMap.isEmpty() )
		{
			for( Entry<String, FunctionProgramBlock> e : funcMap.entrySet() )
			{
				FunctionProgramBlock fpb = e.getValue();
				for( ProgramBlock pb : fpb.getChildBlocks() )
					rCleanupRuntimeProgram(pb, outputs);
			}
		}

		for( ProgramBlock pb : prog.getProgramBlocks() )
			rCleanupRuntimeProgram(pb, outputs);
	}

	/**
	 *
	 * @param pb
	 * @param outputs
	 */
	private static void rCleanupRuntimeProgram( ProgramBlock pb, String[] outputs )
	{
		if( pb instanceof WhileProgramBlock )
		{
			WhileProgramBlock wpb = (WhileProgramBlock)pb;
			for( ProgramBlock pbc : wpb.getChildBlocks() )
				rCleanupRuntimeProgram(pbc,outputs);
		}
		else if( pb instanceof IfProgramBlock )
		{
			IfProgramBlock ipb = (IfProgramBlock)pb;
			for( ProgramBlock pbc : ipb.getChildBlocksIfBody() )
				rCleanupRuntimeProgram(pbc,outputs);
			for( ProgramBlock pbc : ipb.getChildBlocksElseBody() )
				rCleanupRuntimeProgram(pbc,outputs);
		}
		else if( pb instanceof ForProgramBlock )
		{
			ForProgramBlock fpb = (ForProgramBlock)pb;
			for( ProgramBlock pbc : fpb.getChildBlocks() )
				rCleanupRuntimeProgram(pbc,outputs);
		}
		else
		{
			ArrayList<Instruction> tmp = pb.getInstructions();
			for( int i=0; i<tmp.size(); i++ )
			{
				Instruction linst = tmp.get(i);
				if( linst instanceof VariableCPInstruction && ((VariableCPInstruction)linst).isRemoveVariable() )
				{
					VariableCPInstruction varinst = (VariableCPInstruction) linst;
					for( String var : outputs )
						if( varinst.isRemoveVariable(var) )
						{
							tmp.remove(i);
							i--;
							break;
						}
				}
			}
		}
	}
}


text:
package org.apache.druid.query.aggregation.datasketches.hll;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.datasketches.hll.HllSketch;
import org.apache.datasketches.hll.TgtHllType;
import org.apache.druid.query.aggregation.Aggregator;
import org.apache.druid.query.aggregation.AggregatorUtil;
import org.apache.druid.query.aggregation.BufferAggregator;
import org.apache.druid.query.aggregation.VectorAggregator;
import org.apache.druid.segment.ColumnInspector;
import org.apache.druid.segment.ColumnSelectorFactory;
import org.apache.druid.segment.ColumnValueSelector;
import org.apache.druid.segment.vector.VectorColumnSelectorFactory;

import javax.annotation.Nullable;

/**
 * This aggregator factory is for building sketches from raw data.
 * The input column can contain identifiers of type string, char[], byte[] or any numeric type.
 */
public class HllSketchBuildAggregatorFactory extends HllSketchAggregatorFactory
{

  @JsonCreator
  public HllSketchBuildAggregatorFactory(
      @JsonProperty("name") final String name,
      @JsonProperty("fieldName") final String fieldName,
      @JsonProperty("lgK") @Nullable final Integer lgK,
      @JsonProperty("tgtHllType") @Nullable final String tgtHllType,
      @JsonProperty("round") final boolean round
  )
  {
    super(name, fieldName, lgK, tgtHllType, round);
  }

  @Override
  public String getComplexTypeName()
  {
    return HllSketchModule.BUILD_TYPE_NAME;
  }

  @Override
  protected byte getCacheTypeId()
  {
    return AggregatorUtil.HLL_SKETCH_BUILD_CACHE_TYPE_ID;
  }

  @Override
  public Aggregator factorize(final ColumnSelectorFactory columnSelectorFactory)
  {
    final ColumnValueSelector<Object> selector = columnSelectorFactory.makeColumnValueSelector(getFieldName());
    return new HllSketchBuildAggregator(selector, getLgK(), TgtHllType.valueOf(getTgtHllType()));
  }

  @Override
  public BufferAggregator factorizeBuffered(final ColumnSelectorFactory columnSelectorFactory)
  {
    final ColumnValueSelector<Object> selector = columnSelectorFactory.makeColumnValueSelector(getFieldName());
    return new HllSketchBuildBufferAggregator(
        selector,
        getLgK(),
        TgtHllType.valueOf(getTgtHllType()),
        getMaxIntermediateSize()
    );
  }

  @Override
  public boolean canVectorize(ColumnInspector columnInspector)
  {
    return true;
  }

  @Override
  public VectorAggregator factorizeVector(VectorColumnSelectorFactory selectorFactory)
  {
    return new HllSketchBuildVectorAggregator(
        selectorFactory,
        getFieldName(),
        getLgK(),
        TgtHllType.valueOf(getTgtHllType()),
        getMaxIntermediateSize()
    );
  }

  /**
   * For the HLL_4 sketch type, this value can be exceeded slightly in extremely rare cases.
   * The sketch will request on-heap memory and move there. It is handled in HllSketchBuildBufferAggregator.
   */
  @Override
  public int getMaxIntermediateSize()
  {
    return HllSketch.getMaxUpdatableSerializationBytes(getLgK(), TgtHllType.valueOf(getTgtHllType()));
  }

}


text:
"use strict";
const inheritFrom = require("../utils").inheritFrom;
const NODE_TYPE = require("../living/node-type");

module.exports = function (core) {
  core.ProcessingInstruction = function ProcessingInstruction(ownerDocument, target, data) {
    core.CharacterData.call(this, ownerDocument, data);

    this._target = target;
  };

  inheritFrom(core.CharacterData, core.ProcessingInstruction, {
    nodeType: NODE_TYPE.PROCESSING_INSTRUCTION_NODE, // TODO should be on prototype, not here
    get target() {
      return this._target;
    }
  });
};


text:
layout: card_list
title: "API"
---

## Basic Information

* version 7 of the API was released April 11, 2016 (Lagotto 5.0).

### Base URL
* API calls start with `/api/`. API versioning is done via the request header, e.g. `Accept: application/json; version=7`, and currently defaults to `version=7`. Previous API versions are no longer supported because of breaking changes in the data model.

### Supported Media Types
* application/json

The default media type is JSON. The media type is set in the header, e.g. "Accept: application/json", but defaults to this format anyway. Media type negotiation via file extension (e.g. ".json") is not supported. `JSONP` and `CORS` are supported.

### API Key
Almost all information regarding works (with the exception of sources that don't allow redistribution of data) is available without API keys since the Lagotto 3.12.7 release (January 9, 2015). An API key is required to add/update works, and to access some of the internal data of the application. A key can be obtained by registering as API user with the ALM application and this shouldn't take more than a few minutes. Lagotto supports OAuth authentication via Github and ORCID, as well as CAS and JWT. Authentication via username/password is not supported.

The v7 API requires the API key in the header in the format `Authorization: Token token=API_KEY`.

### API endpoints

All API endpoints are described in the [live API documentation](/api). The most important ones are:

* /works
* /api/works/doi.org/10.1371/JOURNAL.PONE.0148637
* /api/works/doi.org/10.1371/JOURNAL.PONE.0148637/relations
* /api/works/doi.org/10.1371/JOURNAL.PONE.0148637/results
* /api/works/doi.org/10.1371/JOURNAL.PONE.0148637/contributions

The last three API endpoints provide more detailed information associated with a work.

### Meta
Every API response starts with a `meta` object with basic information such as `message-type` and number of results (`total`).

```
"meta": {
  "status": "ok",
  "message-type": "work-list",
  "message-version": "v7",
  "total": 1077,
  "total_pages": 2,
  "page": 1
}
```

### Query for one or several works
Specify one or more works by a comma-separated list of pids in the `ids` parameter. These DOIs have to be URL-escaped, e.g. `%2F` for `/`:

```sh
/api/works?ids=http://doi.org/10.1371%2Fjournal.pone.0036240
/api/works?ids=http://doi.org/10.1371%2Fjournal.pone.0036240,http://doi.org/10.1371%2Fjournal.pbio.0020413
```

Alternatively you can specify the identifier with the `type` query parameter, e.g.

```sh
/api/works?ids=10.1371%2Fjournal.pone.0036240&type=doi
/api/works?ids=10.1371%2Fjournal.pone.0036240,10.1371%2Fjournal.pbio.0020413&type=doi
```

Queries for up to 1,000 works at a time are supported. With many ids, in particular DOIs or URLs, the size limit of the query URL might be reached. It is therefore advisable to put the ids into the body of a POST, and include an `X-HTTP-Method-Override: GET` header:

```sh
curl -X POST -d "ids=http://doi.org/10.1371%2Fjournal.pone.0036240,http://doi.org/10.1371%2Fjournal.pbio.0020413" -H "Authorization: Token token=API_KEY" -H "X-HTTP-Method-Override: GET" "http://alm.plos.org/api/works"
```

### Search
Search is not supported by the API, users have to provide one or more specific identifiers (see above).

### Date and Time Format
All dates and times are in ISO 8601 format, e.g. ``2003-10-13T07:00:00Z`` or ``2014-10``, partial dates are supported.

## Additional Parameters

### type=doi|pmid|pmcid|arxiv|scp|wos|ark|url
The API supports queries for DOI, PubMed ID, PubMed Central ID, ArXiV ID, Scopus ID, Web of Science ID, ark, and publisher URL. The pid is used if no type is given in the query. The following queries are all for the same work:

```sh
/api/works?ids=http://doi.org/10.1371%2Fjournal.pmed.1001361
/api/works?ids=10.1371%2Fjournal.pmed.1001361&type=doi
/api/works?ids=23300388&type=pmid
/api/works?ids=PMC3531501&type=pmcid
/api/works?ids=84871667565&type=scp
/api/works?ids=000312934200011&type=wos
/api/works?ids=http://www.plosmedicine.org/article/info:doi/10.1371/journal.pmed.1001361&type=url
```

### publisher_id=x
Only show works from a given publisher, using the CrossRef member ID (e.g. `340`) or DataCite data center symbol (e.g. `CERN.ZENODO`). The response format is the same as the default response.

```sh
/api/works?publisher_id=340
```

### sort=x
Results are sorted by descending result count when given the source name, e.g. `&sort=wikipedia`. Otherwise (the default) results are sorted by descending publication date. When using `&source=x`, we can only sort by publication date or that source, not a different source.

### page|per_page

Results of the v7 API are paged with 1000 results per page. Use `per_page` to pick a smaller number (0-1000) of results per page, and use `page` to page through the results.

### Metadata

All metadata are in Citation Style Language ([CSl](http://citationstyles.org/)) format where possible. We are adding additional values, and we are deviating from CSL by formatting dates using iso8601. The following metadata fields should be available for most works:

* title
* container-title
* author (one or more authors)
* issued (publication date)
* DOI
* URL
* volume
* issue
* pages
* work-type

## Example Responses

#### /api/works/

```json
{
  "meta": {
    "status": "ok",
    "message-type": "work-list",
    "message-version": "v7",
    "total": 203,
    "total_pages": 1,
    "page": 1
  },
  "works": [
    {
      "id": "http://doi.org/10.1371/JOURNAL.PONE.0148637",
      "publisher_id": "340",
      "author": [
        {
          "family": "Weber",
          "given": "Kirsten"
        },
        {
          "family": "Lau",
          "given": "Ellen F."
        },
        {
          "family": "Stillerman",
          "given": "Benjamin"
        },
        {
          "family": "Kuperberg",
          "given": "Gina R."
        }
      ],
      "title": "The Yin and the Yang of Prediction: An fMRI Study of Semantic Predictive Processing",
      "issued": "2016-03-24",
      "updated": "2016-04-07T08:46:18Z",
      "container-title": "PLOS ONE",
      "volume": "11",
      "page": "e0148637",
      "issue": "3",
      "DOI": "10.1371/journal.pone.0148637",
      "work_type_id": "article-journal",
      "results": {
        "datacite_related": 1
      }
    },
    {
      "id": "http://doi.org/10.1371/JOURNAL.PONE.0151763",
      "publisher_id": "340",
      "author": [
        {
          "family": "Murphy",
          "given": "Peter R."
        },
        {
          "family": "van Moort",
          "given": "Marianne L."
        },
        {
          "family": "Nieuwenhuis",
          "given": "Sander"
        }
      ],
      "title": "The Pupillary Orienting Response Predicts Adaptive Behavioral Adjustment after Errors",
      "issued": "2016-03-24",
      "updated": "2016-04-06T22:27:01Z",
      "container-title": "PLOS ONE",
      "volume": "11",
      "page": "e0151763",
      "issue": "3",
      "DOI": "10.1371/journal.pone.0151763",
      "work_type_id": "article-journal",
      "results": {
        "datacite_related": 1
      }
    }
  ]
}
```

#### /api/works/doi.org/10.1371/JOURNAL.PONE.0148637

```json
{
  "meta": {
    "status": "ok",
    "message-type": "work",
    "message-version": "v7"
  },
  "work": {
    "id": "http://doi.org/10.1371/JOURNAL.PONE.0148637",
    "publisher_id": "340",
    "author": [
      {
        "family": "Weber",
        "given": "Kirsten"
      },
      {
        "family": "Lau",
        "given": "Ellen F."
      },
      {
        "family": "Stillerman",
        "given": "Benjamin"
      },
      {
        "family": "Kuperberg",
        "given": "Gina R."
      }
    ],
    "title": "The Yin and the Yang of Prediction: An fMRI Study of Semantic Predictive Processing",
    "issued": "2016-03-24",
    "updated": "2016-04-07T08:46:18Z",
    "container-title": "PLOS ONE",
    "volume": "11",
    "page": "e0148637",
    "issue": "3",
    "DOI": "10.1371/journal.pone.0148637",
    "work_type_id": "article-journal",
    "results": {
      "datacite_related": 1
    }
  }
}
```

## Deposits

## Notifications
The notifications API endpoint is only available to authenticated admin users. The same query parameters as in the admin web interface are supported:

* source
* class_name
* level
* query (using `q`)

By default the API returns all notifications, add `&unresolved=1` to only retrieve unresolved notifications, as in the admin web interface. An example API response would be:

```sh
{
  "meta": {
    "status": "ok",
    "message-type": "notification-list",
    "message-version": "v7",
    "total": 152,
    "total_pages": 4,
    "page": 1
  },
  "notifications": [
    {
      "id": "39586c14-8d3e-4f83-9636-d36ca2d6b958",
      "level": "FATAL",
      "class_name": "StandardError",
      "message": "No Sidekiq process running, Sidekiq process started at 2015-04-16T06:24:14Z.",
      "hostname": "lagotto-4-0-unstable.local",
      "unresolved": true,
      "timestamp": "2015-04-16T06:24:15Z"
    },
    {
      "id": "018a1fb6-60e3-4b63-b84f-f33204163917",
      "level": "ERROR",
      "class_name": "NameError",
      "message": "uninitialized constant DeleteEventJob::Relation",
      "hostname": "lagotto-4-0-unstable.local",
      "unresolved": true,
      "timestamp": "2015-04-16T06:21:51Z"
    },
    {
      "id": "ecccba25-4c11-4396-b1d1-5534ca60c27d",
      "level": "FATAL",
      "class_name": "StandardError",
      "message": "No Sidekiq process running, Sidekiq process started at 2015-04-16T06:14:24Z.",
      "hostname": "lagotto-4-0-unstable.local",
      "unresolved": true,
      "timestamp": "2015-04-16T06:14:24Z"
    },
    {
      "id": "12b40b31-e347-4ec7-ac26-545844be872a",
      "level": "ERROR",
      "class_name": "NoMethodError",
      "message": "undefined method `DOI' for #<Work:0x00000007f00008>",
      "status": 422,
      "hostname": "lagotto-4-0-unstable.local",
      "unresolved": false,
      "timestamp": "2015-04-16T05:01:30Z"
    }
  ]
}
```


text:
package qualitycheck

//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// ReviewHistoryList is a nested struct in qualitycheck response
type ReviewHistoryList struct {
	ReviewHistory []ReviewHistory `json:"ReviewHistory" xml:"ReviewHistory"`
}


text:
<form  name="JournalEntries" method="post" action="savenewEntry.php">

				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					×</button>

New Journal Entry

					Journal Entry No:

					 <?php

						$JournalNumber = "";
								if( isset( $_GET['id'])) {
										$JournalNumber = $_GET['id'];
									}

						$JournalYear=$connection->myQuery("SELECT EXTRACT(YEAR FROM journal_date) AS JournalYear FROM journals WHERE journal_id=$JournalNumber ORDER BY journal_id DESC LIMIT 1")->fetch(PDO::FETCH_ASSOC);
						$JournalMonth=$connection->myQuery("SELECT EXTRACT(MONTH FROM journal_date) AS JournalMonth FROM journals WHERE journal_id=$JournalNumber ORDER BY journal_id DESC LIMIT 1")->fetch(PDO::FETCH_ASSOC);
						$JournalEntryCount=$connection->myQuery("SELECT COUNT(*) AS JournalEntryCount FROM journal_entries WHERE journal_id = $JournalNumber")->fetch(PDO::FETCH_ASSOC);

											$JournalYear = implode( " ",$JournalYear);
											$JournalMonth = implode(" ",$JournalMonth);
											$JournalMonth= sprintf("%02s", $JournalMonth);
											$JournalEntryCount = implode( " ",$JournalEntryCount);

											$JournalEntry_ID = substr($JournalYear,2).$JournalMonth.($JournalEntryCount+1);
											echo $JournalEntry_ID;

						?>
						<input type="hidden" name="JournalNumber" value="<?php echo $JournalNumber?>"></input>
						<input type="hidden" name="JournalID" value="<?php echo $JournalEntry_ID?>"></input>

					<input type="text" placeholder="mm/dd/yyyy" name="entry_date" value="<?php echo date('m/d/Y'); ?>" class="form-control" required>

						Debit
						Accounts:
						<select class="form-control" id="selectdr" name="selectdr" required>

							<?php
							$accounttable =$connection -> myQuery("SELECT type,account_name FROM accounts;")->fetchAll(PDO::FETCH_ASSOC);
                           	echo makeOptions($accounttable);
						?>
						</select>

					<input type="text" class="form-control" data-allow-clear='True' placeholder="Account Description" id = "descdr">

					<input type="text" class="form-control" data-allow-clear='True' placeholder="Bank Name" id = "bankdr">

					<input type="number" class="form-control" data-allow-clear='True' placeholder="Cheque Number" id = "chqdr">

						<input type="text" class="form-control" placeholder="Amount" id = "AmountDr" onkeypress="return isNumberKey(event)" required>

							<button type="button" class="btn btn-primary btn-flat " onclick="return Dr();">Add Debit</button>
							<button type="button"  id="dreset" class="btn btn-danger btn-flat">Cancel</button>

									Accounts
									Description
									Amount
									Action

					<input id="debit_total" class="form-control" value="0" placeholder="Total Debit" disabled >

							Credit
							Accounts:
						<select class="form-control" id="selectcr" name="selectcr">

							<?php
								$accounttable =$connection -> myQuery("SELECT type,account_name FROM accounts;")->fetchAll(PDO::FETCH_ASSOC);
								echo makeOptions($accounttable);
							?>
						</select>

						<input type="text" class="form-control" placeholder="Description" id = "desccr">

						<input type="text" class="form-control" data-allow-clear='True' placeholder="Bank Name" id = "bankcr">

						<input type="number" class="form-control" data-allow-clear='True' placeholder="Cheque Number" id = "chqcr">

								<input type="text" class="form-control" placeholder="Amount" id = "AmountCr" onchange="change(this);" onkeypress="return isNumberKey(event)">

								<button type="button" class="btn btn-primary btn-flat " onclick="return Cr();">Add Credit</button>
								<button type="button"  id="creset" class="btn btn-danger btn-flat ">Cancel</button>

										Accounts
										Description
										Amount
										Action

							<input id="credit_total" class="form-control" value="0" placeholder="Total Credit" disabled>

                  Remarks:
                  <input class="form-control" name="entry_description" placeholder="Enter Remarks" onkeypress="return noSpecialChar(event)" required>

					<button type="submit" id="pass" class="btn btn-primary" onclick="GetCellValues()" disabled>Save</button>
					<button type="button" class="btn btn-danger" data-dismiss="modal" onclick="clearTable()">Close</button>

</form>


text:
from .license import License, LicenseCheck       # NOQA
from .tokens import Tokens, TokensId             # NOQA
from .sites import Sites, SitesName              # NOQA
from .agents import Agents, AgentsName           # NOQA
from .executions import (     # NOQA
    Executions,
    ExecutionsCheck,
    ExecutionGroups,
    ExecutionGroupsId,
)

from .execution_schedules import (               # NOQA
    ExecutionSchedules,
    ExecutionSchedulesId,
)

from .log_bundles import (                       # NOQA
    LogBundles,
    LogBundlesId,
    LogBundlesIdArchive,
)

from .manager import (                           # NOQA
    Managers,
    ManagersId,
    RabbitMQBrokers,
    RabbitMQBrokersId,
    DBNodes,
    FileServerIndex,
    FileServerProxy,
    MonitoringAuth,
)

from .manager_config import (                    # NOQA
    ManagerConfig,
    ManagerConfigId,
)

from .plugins import (                           # NOQA
    Plugins,
    PluginsUpdate,
    PluginsUpdates,
    PluginsUpdateId,
    PluginsId,
    PluginsSetGlobal,
    PluginsSetVisibility,
    PluginsYaml,
)

from .deployments import (                       # NOQA
    DeploymentsId,
    DeploymentsSetSite,
    DeploymentsSetVisibility,
    DeploymentsIdCapabilities,
    InterDeploymentDependencies,
    InterDeploymentDependenciesId,
    DeploymentGroups,
    DeploymentGroupsId
)

from .blueprints import (                        # NOQA
    BlueprintsId,
    BlueprintsIdArchive,
    BlueprintsIdValidate,
    BlueprintsSetGlobal,
    BlueprintsSetVisibility,
    BlueprintsIcon,
)

from .idp import Idp                             # NOQA

from .summary import (                           # NOQA
    SummarizeDeployments,
    SummarizeNodes,
    SummarizeNodeInstances,
    SummarizeExecutions,
    SummarizeBlueprints,
    SummarizeNodeInstances,
    SummarizeExecutionSchedules,
)

from .operations import (                        # NOQA
    Operations,
    OperationsId,
    TasksGraphs,
    TasksGraphsId,
)

from .status import OK, Status                   # NOQA

from .cluster_status import (                    # NOQA
    ClusterStatus
)

from .snapshots import ( # noqa
    SnapshotsStatus
)

from .labels import (                           # NOQA
    DeploymentsLabels,
    DeploymentsLabelsKey,
    BlueprintsLabels,
    BlueprintsLabelsKey
)
from .permissions import (  # NOQA
    Permissions,
    PermissionsRole,
    PermissionsRoleId
)

from .filters import (                           # NOQA
    BlueprintsFilters,
    BlueprintsFiltersId,
    DeploymentsFilters,
    DeploymentsFiltersId
)

from .nodes import (  # NOQA
    Nodes,
    NodesId,
    NodeInstances,
    NodeInstancesId,
)

from .searches import (  # NOQA
    DeploymentsSearches,
    BlueprintsSearches,
    WorkflowsSearches,
    NodesSearches,
    NodeTypesSearches,
    NodeInstancesSearches,
    SecretsSearches,
    CapabilitiesSearches,
    ScalingGroupsSearches,
)

from .workflows import (  # NOQA
    Workflows,
)

from .community_contacts import (  # NOQA
    CommunityContacts,
)

from .secrets_provider import (  # NOQA
    SecretsProvider,
    SecretsProviderKey,
)


text:
package org.hibernate.test.unidir;

import org.junit.Test;

import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

/**
 * @author Gavin King
 */
public class BackrefTest extends BaseCoreFunctionalTestCase {
	@Override
	protected String[] getMappings() {
		return new String[] { "unidir/ParentChild.hbm.xml" };
	}

	@Override
	protected Class<?>[] getAnnotatedClasses() {
		// No test needed at this time.  This was purely to test a
		// validation issue from HHH-5836.
		return new Class<?>[] { Parent1.class, Child1.class, Child2.class };
	}

	@Override
	protected String getCacheConcurrencyStrategy() {
		return null;
	}

	@Test
	public void testBackRef() {
		Session s = openSession();
		Transaction t = s.beginTransaction();
		Parent p = new Parent("Marc");
		Parent p2 = new Parent("Nathalie");
		Child c = new Child("Elvira");
		Child c2 = new Child("Blase");
		p.getChildren().add(c);
		p.getChildren().add(c2);
		s.persist(p);
		s.persist(p2);
		t.commit();
		s.close();

		s = openSession();
		t = s.beginTransaction();
		c = (Child) s.get(Child.class, "Elvira");
		c.setAge(2);
		t.commit();
		s.close();

		s = openSession();
		t = s.beginTransaction();
		p = (Parent) s.get(Parent.class, "Marc");
		c = (Child) s.get(Child.class, "Elvira");
		c.setAge(18);
		t.commit();
		s.close();

		s = openSession();
		t = s.beginTransaction();
		p = (Parent) s.get(Parent.class, "Marc");
		p2 = (Parent) s.get(Parent.class, "Nathalie");
		c = (Child) s.get(Child.class, "Elvira");
		assertEquals( p.getChildren().indexOf(c), 0 );
		p.getChildren().remove(c);
		p2.getChildren().add(c);
		t.commit();

		s.close();
		s = openSession();
		t = s.beginTransaction();
		Parent p3 = new Parent("Marion");
		p3.getChildren().add( new Child("Gavin") );
		s.merge(p3);
		t.commit();
		s.close();

		s = openSession();
		t = s.beginTransaction();
		s.createQuery( "delete from Child" ).executeUpdate();
		s.createQuery( "delete from Parent" ).executeUpdate();
		t.commit();
		s.close();
	}

	@Test
	public void testBackRefToProxiedEntityOnMerge() {
		Session s = openSession();
		s.beginTransaction();
		Parent me = new Parent( "Steve" );
		me.getChildren().add( new Child( "Joe" ) );
  		s.persist( me );
		s.getTransaction().commit();
		s.close();

		// while detached, add a new element
		me.getChildren().add( new Child( "Cece" ) );
		me.getChildren().add( new Child( "Austin" ) );

		s = openSession();
		s.beginTransaction();
		// load 'me' to associate it with the new session as a proxy (this may have occurred as 'prior work'
		// to the reattachment below)...
		Object meProxy = s.load( Parent.class, me.getName() );
		assertFalse( Hibernate.isInitialized( meProxy ) );
		// now, do the reattchment...
		s.merge( me );
		s.getTransaction().commit();
		s.close();

		s = openSession();
		s.beginTransaction();
		s.createQuery( "delete from Child" ).executeUpdate();
		s.createQuery( "delete from Parent" ).executeUpdate();
		s.getTransaction().commit();
		s.close();
	}
}


text:
<!DOCTYPE html>

  <link href="http://gmpg.org/xfn/11" rel="profile">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

  <title>

      Peppernuts · Thinking .·. Computationally

  </title>

  <link rel="stylesheet" href="/public/css/poole.css">
  <link rel="stylesheet" href="/public/css/syntax.css">
  <link rel="stylesheet" href="/public/css/lanyon.css">
  <link rel="stylesheet" href="/public/font-awesome/css/font-awesome.min.css">
  <link href='https://fonts.googleapis.com/css?family=Pacifico|Philosopher' rel='stylesheet' type='text/css'>

  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-precomposed.png">
  <link rel="shortcut icon" href="/public/favicon.ico">

  <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">

<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">

a blog for my thoughts, musings, and ramblings; updated infrequently but passionately; may not be suitable for those unwilling to be mentally challenged

    Home

          About

      Archive
      Culinary Adventures
      Recipe Archive

      © 2018. All rights reserved.

            Thinking .·. Computationally
            thoughts, musings, and ramblings

Peppernuts

  05 Jan 2017

cookies

german

christmas

  Active: 1 hourTotal: 1.5 hoursMakes: dozens

Peppernuts (pfeffernusse in German) are little spiced cookies that my grandmother used to make every Christmas.

I loved the taste of them fresh out of the oven, but after a few days they always got hard as a rock and you could barely eat them. So, I wondered if there was a way to preserve the delicious taste while creating something that won't dry out as easily, and I think I got it! The test might not be perfect, since most of them were gone after only a week, but everyone I talked to said they tasted just right and were surprisingly soft.

To get to this recipe, I used bits of my grandmother's recipe (namely, the spice blend she used), another family recipe posted by a friend on Facebook, as well as a couple I found online. I combined them all together using my own knowledge of baking, and arrived at a recipe that I felt would retain the flavor while remaining softer than I remember. My uneducated guess is that the inclusion of eggs, brown sugar, and honey helped them stay softer longer.

Original sources: Heavenly Homemakers, Baker Bettie, Denise Sullivan, Marge Feldhausen

Ingredients

1 cup unsalted butter, softened

1 packed cup brown sugar

1/2 cup honey

1/2 cup white sugar

3 cups flour, sifted

1 egg

1 tsp. baking soda

spices (customize to your taste)

1/2 tsp. anise oil

1/2 tsp. cinnamon

1/2 tsp. allspice

1/2 tsp. ginger

1/4 tsp. cloves

1/4 tsp. nutmeg

1/4 tsp. white pepper (some recipes omit this; I used black pepper and it was fine too)

1/4 tsp. salt

Equipment

stand mixer or large bowl and electric mixer

2 baking sheets

cutting board & knives

parchment paper

Setup

Preheat oven to 350°F.

Process

Combine all ingredients and mix thoroughly. It should make a very dry dough that barely holds together. Chill the dough in the fridge for 30 minutes before baking.

Take a small portion of the dough, and roll into a 1/2 inch roll, then cut into small pillow-shaped cookies. Place cookies on a baking sheet with plenty of room between them. If the dough is sticky and hard to shape, chill it in the fridge for a while.

Bake for about 8 minutes, until just set. They will be quite soft, but should finish setting quickly after you take them out. The bottoms should be just slightly browned, but not too dark. Sometimes it takes a batch or two to get a feel for when they are done. I usually start one tray, then fill another while the first cooks, then rotate the trays in the oven and repeat. That way I always have a steady stream of cookies in and out of the oven.

Immediately remove cookies from hot baking sheet and place on parchment paper to cool.

Once they are cool, store in an airtight container. You can store them up to 1 month, and I hear the flavor gets better the longer they are stored.

Notes

2016-12-23 - These were a big hit all around. I think this recipe works well, but I'll have to see if I can duplicate it again next year.


text:
package gremlin.scala

import java.util.{Map => JMap, UUID}
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal
import shapeless.ops.tuple.{Prepend => TuplePrepend}
import shapeless.syntax.std.tuple._

class ProjectionBuilder[T <: Product] private[gremlin] (
    labels: Seq[String],
    addBy: GraphTraversal[_, JMap[String, Any]] => GraphTraversal[_, JMap[String, Any]],
    buildResult: JMap[String, Any] => T) {

  def apply[U, TR <: Product](by: By[U])(
      implicit prepend: TuplePrepend.Aux[T, Tuple1[U], TR]): ProjectionBuilder[TR] = {
    val label = UUID.randomUUID().toString
    new ProjectionBuilder[TR](labels :+ label,
                              addBy.andThen(by.apply),
                              map => buildResult(map) :+ map.get(label).asInstanceOf[U])
  }

  def and[U, TR <: Product](by: By[U])(
      implicit prepend: TuplePrepend.Aux[T, Tuple1[U], TR]): ProjectionBuilder[TR] = apply(by)

  private[gremlin] def build(g: GremlinScala[_]): GremlinScala[T] = {
    GremlinScala(addBy(g.traversal.project(labels.head, labels.tail: _*))).map(buildResult)
  }
}

object ProjectionBuilder {
  def apply() = new ProjectionBuilder[Nil.type](Nil, scala.Predef.identity, _ => Nil)
}


text:
==========
Developers
==========

* Hobson Lane <hobsonlane@gmail.com>


text:
- [Table of Contents](#table-of-contents)
- UI
  - [Project Preferences](./project-preferences.md)
  - [Serving the PWA application](./pwa-info.md)
  - [Components](./components.md)
  - [Services](./services.md)
- lib
  - [Manager](./lib-manager.md)
  - [Command Buffer Util](./command-buffer.md)
  - Devices
    - [devices/index](./lib-devices-index.md)
    - [devices/configurator](./lib-devices-configurator.md)
    - [devices/devices](./lib-devices-devices.md)
    - [devices/components](./lib-devices-components.md)
    - [devices/util](./lib-devices-util.md)
  - [Util](./lib-util.md)


text:
var searchData=
[
  ['operator_3c_3c',['operator<<',['../namespacens_console.html#a319f543b9617b49511d3f15601d0fafe',1,'nsConsole::operator<<(std::ostream &os, const Colors &Color)'],['../namespacens_console.html#a1b3bc93290449637f067ffbb1d066be2',1,'nsConsole::operator<<(std::ostream &os, const BackgroundColors &Color)']]]
];


text:
<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Generated by Maven Help Plugin on 2014-06-13T04:13:18                  -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/                -->
<!--                                                                        -->
<!-- ====================================================================== -->

<!-- ====================================================================== -->
<!--                                                                        -->
<!-- Effective POM for project 'ch.qos.logback:logback-core:jar:1.1.2'      -->
<!--                                                                        -->
<!-- ====================================================================== -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-parent</artifactId>
    <version>1.1.2</version>
  </parent>
  <groupId>ch.qos.logback</groupId>
  <artifactId>logback-core</artifactId>
  <version>1.1.2</version>
  <name>Logback Core Module</name>
  <description>logback-core module</description>
  <url>http://logback.qos.ch/logback-core</url>
  <inceptionYear>2005</inceptionYear>
  <organization>
    <name>QOS.ch</name>
    <url>http://www.qos.ch</url>
  </organization>
  <licenses>
    <license>
      <name>Eclipse Public License - v 1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
    </license>
    <license>
      <name>GNU Lesser General Public License</name>
      <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>ceki</id>
      <name>Ceki Gulcu</name>
      <email>ceki@qos.ch</email>
    </developer>
    <developer>
      <id>hixi</id>
      <name>Joern Huxhorn</name>
      <email>huxi@undisclosed.org</email>
    </developer>
  </developers>
  <scm>
    <connection>git@github.com:ceki/logback.git/logback-core</connection>
    <url>https://github.com/ceki/logback/logback-core</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <site>
      <id>pixie</id>
      <url>scp://pixie.qos.ch/var/www/logback.qos.ch/htdocs/logback-core/</url>
    </site>
  </distributionManagement>
  <properties>
    <consolePlugin.version>1.1.0</consolePlugin.version>
    <groovy.version>2.0.7</groovy.version>
    <janino.version>2.6.1</janino.version>
    <jansi.version>1.9</jansi.version>
    <javax.mail.version>1.4</javax.mail.version>
    <jetty.version>7.5.1.v20110908</jetty.version>
    <junit.version>4.10</junit.version>
    <maven-license-plugin.version>1.9.0</maven-license-plugin.version>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <slf4j.version>1.7.7</slf4j.version>
    <tomcat.version>7.0.21</tomcat.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>1.1.2</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>1.1.2</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.1.2</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-access</artifactId>
        <version>1.1.2</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.7</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.janino</groupId>
        <artifactId>janino</artifactId>
        <version>2.6.1</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.0.7</version>
      </dependency>
      <dependency>
        <groupId>org.fusesource.jansi</groupId>
        <artifactId>jansi</artifactId>
        <version>1.9</version>
      </dependency>
      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>dom4j</groupId>
        <artifactId>dom4j</artifactId>
        <version>1.6.1</version>
      </dependency>
      <dependency>
        <groupId>hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>1.8.0.7</version>
      </dependency>
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.2.132</version>
      </dependency>
      <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>8.4-701.jdbc4</version>
      </dependency>
      <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.9</version>
      </dependency>
      <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-catalina</artifactId>
        <version>7.0.21</version>
      </dependency>
      <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-coyote</artifactId>
        <version>7.0.21</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>7.5.1.v20110908</version>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-jms_1.1_spec</artifactId>
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.janino</groupId>
      <artifactId>janino</artifactId>
      <version>2.6.1</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.fusesource.jansi</groupId>
      <artifactId>jansi</artifactId>
      <version>1.9</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jms_1.1_spec</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easytesting</groupId>
      <artifactId>fest-assert</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>http://repo.maven.apache.org/maven2</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>http://repo.maven.apache.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <sourceDirectory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/src/main/java</sourceDirectory>
    <scriptSourceDirectory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/src/main/scripts</scriptSourceDirectory>
    <testSourceDirectory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/src/test/java</testSourceDirectory>
    <outputDirectory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/target/classes</outputDirectory>
    <testOutputDirectory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/target/test-classes</testOutputDirectory>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>2.6</version>
      </extension>
    </extensions>
    <resources>
      <resource>
        <directory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/src/main/resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/src/test/resources</directory>
      </testResource>
    </testResources>
    <directory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/target</directory>
    <finalName>logback-core-1.1.2</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2-beta-5</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.17</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.4.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>true</downloadJavadocs>
          <sourceIncludes>
            <sourceInclude>**/*.java</sourceInclude>
          </sourceIncludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/dist.xml</descriptor>
          </descriptors>
          <finalName>logback-1.1.2</finalName>
          <appendAssemblyId>false</appendAssemblyId>
          <outputDirectory>target/site/dist/</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <threshold>High</threshold>
          <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.3</version>
        <executions>
          <execution>
            <id>default-site</id>
            <phase>site</phase>
            <goals>
              <goal>site</goal>
            </goals>
            <configuration>
              <reportPlugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jxr-plugin</artifactId>
                  <version>2.4</version>
                  <configuration>
                    <aggregate>true</aggregate>
                    <javadocDir>target/site/apidocs/</javadocDir>
                    <linkJavadoc>true</linkJavadoc>
                  </configuration>
                </plugin>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>2.9.1</version>
                  <configuration>
                    <aggregate>true</aggregate>
                    <links>
                      <link>http://docs.oracle.com/javase/6/docs/api/</link>
                    </links>
                    <groups>
                      <group>
                        <title>Logback Core</title>
                        <packages>ch.qos.logback.core:ch.qos.logback.core.*</packages>
                      </group>
                      <group>
                        <title>Logback Classic</title>
                        <packages>ch.qos.logback:ch.qos.logback.classic:ch.qos.logback.classic.*</packages>
                      </group>
                      <group>
                        <title>Logback Access</title>
                        <packages>ch.qos.logback.access:ch.qos.logback.access.*</packages>
                      </group>
                      <group>
                        <title>SLF4J</title>
                        <packages>org.slf4j:org.slf4j.*</packages>
                      </group>
                      <group>
                        <title>Examples</title>
                        <packages>chapter*:joran*</packages>
                      </group>
                    </groups>
                  </configuration>
                </plugin>
              </reportPlugins>
            </configuration>
          </execution>
          <execution>
            <id>default-deploy</id>
            <phase>site-deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
            <configuration>
              <reportPlugins>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jxr-plugin</artifactId>
                  <version>2.4</version>
                  <configuration>
                    <aggregate>true</aggregate>
                    <javadocDir>target/site/apidocs/</javadocDir>
                    <linkJavadoc>true</linkJavadoc>
                  </configuration>
                </plugin>
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>2.9.1</version>
                  <configuration>
                    <aggregate>true</aggregate>
                    <links>
                      <link>http://docs.oracle.com/javase/6/docs/api/</link>
                    </links>
                    <groups>
                      <group>
                        <title>Logback Core</title>
                        <packages>ch.qos.logback.core:ch.qos.logback.core.*</packages>
                      </group>
                      <group>
                        <title>Logback Classic</title>
                        <packages>ch.qos.logback:ch.qos.logback.classic:ch.qos.logback.classic.*</packages>
                      </group>
                      <group>
                        <title>Logback Access</title>
                        <packages>ch.qos.logback.access:ch.qos.logback.access.*</packages>
                      </group>
                      <group>
                        <title>SLF4J</title>
                        <packages>org.slf4j:org.slf4j.*</packages>
                      </group>
                      <group>
                        <title>Examples</title>
                        <packages>chapter*:joran*</packages>
                      </group>
                    </groups>
                  </configuration>
                </plugin>
              </reportPlugins>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <reportPlugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jxr-plugin</artifactId>
              <version>2.4</version>
              <configuration>
                <aggregate>true</aggregate>
                <javadocDir>target/site/apidocs/</javadocDir>
                <linkJavadoc>true</linkJavadoc>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.9.1</version>
              <configuration>
                <aggregate>true</aggregate>
                <links>
                  <link>http://docs.oracle.com/javase/6/docs/api/</link>
                </links>
                <groups>
                  <group>
                    <title>Logback Core</title>
                    <packages>ch.qos.logback.core:ch.qos.logback.core.*</packages>
                  </group>
                  <group>
                    <title>Logback Classic</title>
                    <packages>ch.qos.logback:ch.qos.logback.classic:ch.qos.logback.classic.*</packages>
                  </group>
                  <group>
                    <title>Logback Access</title>
                    <packages>ch.qos.logback.access:ch.qos.logback.access.*</packages>
                  </group>
                  <group>
                    <title>SLF4J</title>
                    <packages>org.slf4j:org.slf4j.*</packages>
                  </group>
                  <group>
                    <title>Examples</title>
                    <packages>chapter*:joran*</packages>
                  </group>
                </groups>
              </configuration>
            </plugin>
          </reportPlugins>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.17</version>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <forkMode>once</forkMode>
              <reportFormat>plain</reportFormat>
              <trimStackTrace>false</trimStackTrace>
              <excludes>
                <exclude>**/All*Test.java</exclude>
                <exclude>**/PackageTest.java</exclude>
                <exclude>**/ConsoleAppenderTest.java</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <forkMode>once</forkMode>
          <reportFormat>plain</reportFormat>
          <trimStackTrace>false</trimStackTrace>
          <excludes>
            <exclude>**/All*Test.java</exclude>
            <exclude>**/PackageTest.java</exclude>
            <exclude>**/ConsoleAppenderTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>default-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <archive>
                <manifestFile>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/target/classes/META-INF/MANIFEST.MF</manifestFile>
              </archive>
            </configuration>
          </execution>
          <execution>
            <id>bundle-test-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
            <configuration>
              <archive>
                <manifestFile>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/target/classes/META-INF/MANIFEST.MF</manifestFile>
              </archive>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <archive>
            <manifestFile>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/target/classes/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <instructions>
                <Export-Package>ch.qos.logback.core.*</Export-Package>
                <Import-Package>javax.*;resolution:=optional,
                            org.xml.*;resolution:=optional,
                            org.fusesource.jansi;resolution:=optional,
                            org.codehaus.janino;resolution:=optional,
                            org.codehaus.commons.compiler;resolution:=optional,
                            *</Import-Package>
                <Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
              </instructions>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <instructions>
            <Export-Package>ch.qos.logback.core.*</Export-Package>
            <Import-Package>javax.*;resolution:=optional,
                            org.xml.*;resolution:=optional,
                            org.fusesource.jansi;resolution:=optional,
                            org.codehaus.janino;resolution:=optional,
                            org.codehaus.commons.compiler;resolution:=optional,
                            *</Import-Package>
            <Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <executions>
          <execution>
            <id>default-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>default-testResources</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>testResources</goal>
            </goals>
          </execution>
          <execution>
            <id>default-resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>default-testCompile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.1</version>
        <executions>
          <execution>
            <id>default-install</id>
            <phase>install</phase>
            <goals>
              <goal>install</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.1</version>
        <executions>
          <execution>
            <id>default-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <outputDirectory>/home/ajozwik/workspace/mvn2sbt/exampleProjects/logback/logback-core/target/site</outputDirectory>
  </reporting>
</project>


text:
using Foundation;
using UIKit;

namespace FFImageLoading.Transformations
{
	[Preserve(AllMembers = true)]
	public class CircleTransformation : TransformationBase
	{
		public CircleTransformation() : this(0d, null)
		{
		}

		public CircleTransformation(double borderSize, string borderHexColor)
		{
			BorderSize = borderSize;
			BorderHexColor = borderHexColor;
		}

		public double BorderSize { get; set; }
		public string BorderHexColor { get; set; }

		public override string Key
		{
			get { return string.Format("CircleTransformation,borderSize={0},borderHexColor={1}", BorderSize, BorderHexColor); }
		}

		protected override UIImage Transform(UIImage sourceBitmap, string path, Work.ImageSource source, bool isPlaceholder, string key)
		{
			return RoundedTransformation.ToRounded(sourceBitmap, 0f, 1f, 1f, BorderSize, BorderHexColor);
		}
	}
}


text:
//
//      Copyright (C) DataStax Inc.
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//

using Cassandra.Mapping.Attributes;

namespace Cassandra.IntegrationTests.Mapping.Structures
{
    internal class ReservedKeywordPoco
    {
        [PartitionKey]
        [Column("id")]
        public string Id { get; set; }

        [Column("select")]
        public string Select { get; set; }

        [Column("Batch")]
        public string Batch { get; set; }

        [Column("not_reserved")]
        public string NotReserved { get; set; }
    }
}


text:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>

<link href="doc-style.css" type="text/css" rel="StyleSheet">

		Local Properties

Managed Object Types	Data Object Types	All Properties	All Methods

Data Object - VMwareDvsLacpGroupConfig

Property of

VMwareDVSConfigInfo, VMwareDvsLacpGroupSpec

Extends

DynamicData

See also

VMwareDvsLagIpfixConfig, VMwareDvsLagVlanConfig

Since

vSphere API 5.5

Data Object
                  Description

         This class defines VMware specific multiple IEEE 802.3ad
  Dynamic Link Aggregation Control Protocol groups.

Properties

	          Name

	          Type

	          Description

ipfix*	VMwareDvsLagIpfixConfig

         Ipfix configuration of the Link Aggregation
  Control Protocol group.

key*	xsd:string

         The generated key as the identifier for the Link Aggregation group.

loadbalanceAlgorithm*	xsd:string

         Load balance policy.
  See LacpLoadBalanceAlgorithm for valid values.

mode*	xsd:string

         The mode of Link Aggregation Control Protocol.
  See UplinkLacpMode for valid values.

name*	xsd:string

         The display name.

uplinkName*	xsd:string[]

         Names for the Uplink Ports in the group.
  This property is ignored in an update operation.

uplinkNum*	xsd:int

         The number of uplink ports.

uplinkPortKey*	xsd:string[]

         Keys for the Uplink Ports in the group.
  This property is ignored in an update operation.

vlan*	VMwareDvsLagVlanConfig

         The VLAN Specification of the Uplink Ports in the Link Aggregation group.

						Properties inherited from DynamicData

dynamicProperty, dynamicType

*Need not be set

Show WSDL type definition

<textarea cols="20" rows="10" name="wsdl-textarea" wrap="off" readonly="1" id="wsdl-textarea">         <complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vim25="urn:vim25" name="VMwareDvsLacpGroupConfig">
            <complexContent>
               <extension base="vim25:DynamicData">
                  <sequence>
                     <element name="key" type="xsd:string" minOccurs="0"/>
                     <element name="name" type="xsd:string" minOccurs="0"/>
                     <element name="mode" type="xsd:string" minOccurs="0"/>
                     <element name="uplinkNum" type="xsd:int" minOccurs="0"/>
                     <element name="loadbalanceAlgorithm" type="xsd:string" minOccurs="0"/>
                     <element name="vlan" type="vim25:VMwareDvsLagVlanConfig" minOccurs="0"/>
                     <element name="ipfix" type="vim25:VMwareDvsLagIpfixConfig" minOccurs="0"/>
                     <element name="uplinkName" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
                     <element name="uplinkPortKey" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
                  </sequence>
               </extension>
            </complexContent>
         </complexType></textarea>

Top of page		Local Properties

Managed Object Types	Data Object Types	All Properties	All Methods


text:
using namespace llvm;
using namespace llvm::pdb;

TypeDumper::TypeDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {}

void TypeDumper::start(const PDBSymbolExe &Exe) {
  auto Enums = Exe.findAllChildren<PDBSymbolTypeEnum>();
  Printer.NewLine();
  WithColor(Printer, PDB_ColorItem::Identifier).get() << "Enums";
  Printer << ": (" << Enums->getChildCount() << " items)";
  Printer.Indent();
  while (auto Enum = Enums->getNext())
    Enum->dump(*this);
  Printer.Unindent();

  auto Typedefs = Exe.findAllChildren<PDBSymbolTypeTypedef>();
  Printer.NewLine();
  WithColor(Printer, PDB_ColorItem::Identifier).get() << "Typedefs";
  Printer << ": (" << Typedefs->getChildCount() << " items)";
  Printer.Indent();
  while (auto Typedef = Typedefs->getNext())
    Typedef->dump(*this);
  Printer.Unindent();

  auto Classes = Exe.findAllChildren<PDBSymbolTypeUDT>();
  Printer.NewLine();
  WithColor(Printer, PDB_ColorItem::Identifier).get() << "Classes";
  Printer << ": (" << Classes->getChildCount() << " items)";
  Printer.Indent();
  while (auto Class = Classes->getNext())
    Class->dump(*this);
  Printer.Unindent();
}

void TypeDumper::dump(const PDBSymbolTypeEnum &Symbol) {
  if (Symbol.getUnmodifiedTypeId() != 0)
    return;
  if (Printer.IsTypeExcluded(Symbol.getName()))
    return;
  // Dump member enums when dumping their class definition.
  if (nullptr != Symbol.getClassParent())
    return;

  Printer.NewLine();
  EnumDumper Dumper(Printer);
  Dumper.start(Symbol);
}

void TypeDumper::dump(const PDBSymbolTypeTypedef &Symbol) {
  if (Printer.IsTypeExcluded(Symbol.getName()))
    return;

  Printer.NewLine();
  TypedefDumper Dumper(Printer);
  Dumper.start(Symbol);
}

void TypeDumper::dump(const PDBSymbolTypeUDT &Symbol) {
  if (Symbol.getUnmodifiedTypeId() != 0)
    return;
  if (Printer.IsTypeExcluded(Symbol.getName()))
    return;

  Printer.NewLine();

  if (opts::pretty::NoClassDefs) {
    WithColor(Printer, PDB_ColorItem::Keyword).get() << "class ";
    WithColor(Printer, PDB_ColorItem::Identifier).get() << Symbol.getName();
  } else {
    ClassDefinitionDumper Dumper(Printer);
    Dumper.start(Symbol);
  }
}


text:
package client

import (
	"bytes"
	"encoding/json"
	"net/http"

	"github.com/heketi/heketi/pkg/glusterfs/api"
	"github.com/heketi/heketi/pkg/utils"
)

func (c *Client) AdminStatusGet() (*api.AdminStatus, error) {
	req, err := http.NewRequest("GET", c.host+"/admin", nil)
	if err != nil {
		return nil, err
	}
	req.Header.Set("Content-Type", "application/json")

	// Set token
	err = c.setToken(req)
	if err != nil {
		return nil, err
	}

	// Send request
	r, err := c.do(req)
	if err != nil {
		return nil, err
	}
	var as api.AdminStatus
	err = utils.GetJsonFromResponse(r, &as)
	if err != nil {
		return nil, err
	}
	return &as, nil
}

func (c *Client) AdminStatusSet(request *api.AdminStatus) error {
	// Marshal request to JSON
	buffer, err := json.Marshal(request)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", c.host+"/admin", bytes.NewBuffer(buffer))
	if err != nil {
		return err
	}
	req.Header.Set("Content-Type", "application/json")

	// Set token
	err = c.setToken(req)
	if err != nil {
		return err
	}

	// Send request
	r, err := c.do(req)
	if err != nil {
		return err
	}
	if r.StatusCode == http.StatusOK || r.StatusCode == http.StatusNoContent {
		return nil
	}
	return utils.GetErrorFromResponse(r)
}


text:
def largest_sum(array)
  largest_sum = 0
  array.inject(0) do |running, element|
    running += element
    if running >= 0
      largest_sum = running if running > largest_sum
    else
      running = 0
    end
    running
  end
  largest_sum
end


text:
require 'builder'
# if i18n gem loaded use it instead
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "i18n") unless defined?(I18n)
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) if defined?(I18n::Backend::Simple)
I18n.load_path += Dir[File.join(File.expand_path(File.dirname(__FILE__)), "../lang/*.yml")].collect { |f| f }

require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "version")
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "core_ext")
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "namespaces")
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "extension")
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "section")
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "wiki_buffer")
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "wiki_link_handler")
require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "parser")

String.send(:include, ExtendedString)

module WikiCloth

  class WikiCloth

    def initialize(opt={})
      self.options.merge!(opt)
      self.options[:extensions] ||= []
      self.options[:link_handler] = opt[:link_handler] unless opt[:link_handler].nil?
      self.load(opt[:data],opt[:params]) unless opt[:data].nil?
      @current_line = 1
      @current_row = 0
    end

    def load(data,p={})
      depth = 1
      count = 0
      root = [self.sections]

      # parse wiki document into sections
      data.each_line do |line|
        if line =~ /^([=]{1,6})\s*(.*?)\s*(\1)/
          root << root.last[-1].children if $1.length > depth
          root.pop if $1.length < depth
          depth = $1.length
          root.last << Section.new(line, get_id_for($2.gsub(/\s+/,'_')))
          count += 1
        else
          root.last[-1] << line
        end
      end

      # if we find template variables assume document is
      # a template
      self.sections.first.template = true if data =~ /\{\{\{\s*([A-Za-z0-9]+)\s*\}\}\}/

      # If there are more than four sections enable automatic
      # table of contents
      self.sections.first.auto_toc = true unless count < 4 || data =~ /__(NO|)TOC__/

      self.params = p
    end

    def render(opt={})
      self.options = { :noedit => false, :fast => true, :output => :html, :link_handler => self.link_handler,
	:params => self.params, :sections => self.sections }.merge(self.options).merge(opt)
      self.options[:link_handler].params = options[:params]

      locale = self.options[:locale] || I18n.locale

      I18n.with_locale(locale) do
        data = self.sections.collect { |s| s.render(self.options) }.join
        data.gsub!(/<!--(.|\s)*?-->/,"")
        data << "\n" if data.last(1) != "\n"
        data << "garbage"

        buffer = WikiBuffer.new("",options)

        begin
          if self.options[:fast]
            until data.empty?
              case data
              when /\A\w+/
                data = $'
                @current_row += $&.length
                buffer.add_word($&)
              when /\A[^\w]+(\w|)/m
                data = $'
                $&.each_char { |c| add_current_char(buffer,c) }
              end
            end
          else
            data.each_char { |c| add_current_char(buffer,c) }
          end
        rescue => err
          debug_tree = buffer.buffers.collect { |b| b.debug }.join("-->")
          puts I18n.t("unknown error on line", :line => @current_line, :row => @current_row, :tree => debug_tree)
          raise err
        end

        buffer.eof()
        buffer.send("to_#{self.options[:output]}")
      end
    end

    def sections
      @sections ||= [Section.new]
    end

    def to_html(opt={})
      self.render(opt.merge(:output => :html))
    end

    def link_handler
      self.options[:link_handler] ||= WikiLinkHandler.new
    end

    def params
      @page_params ||= {}
    end

    def options
      @options ||= {}
    end

    def method_missing(method, *args)
      if self.link_handler.respond_to?(method)
        self.link_handler.send(method, *args)
      else
        super(method, *args)
      end
    end

    protected
    def add_current_char(buffer,c)
      if c == "\n"
        @current_line += 1
        @current_row = 1
      else
        @current_row += 1
      end
      buffer.add_char(c)
    end

    def sections=(val)
      @sections = val
    end

    def get_id_for(val)
      val.gsub!(/[^A-Za-z0-9_]+/,'')
      @idmap ||= {}
      @idmap[val] ||= 0
      @idmap[val] += 1
      @idmap[val] == 1 ? val : "#{val}-#{@idmap[val]}"
    end

    def options=(val)
      @options = val
    end

    def params=(val)
      @page_params = val
    end

  end

end


text:
require "spec_helper"

describe Mongoid::Matchable::And do

  let(:person) do
    Person.new
  end

  let(:matcher) do
    described_class.new("value", person)
  end

  describe "#_matches?" do

    context "when provided a simple expression" do

      context "when only one expression provided" do

        context "when the value matches" do

          let(:matches) do
            matcher._matches?([ { title: "Sir" } ])
          end

          before do
            person.title = "Sir"
          end

          it "returns true" do
            expect(matches).to be true
          end
        end

        context "when the expression is a $not" do

          let(:matches) do
            matcher._matches?([ { title: {:$not => /Foobar/ } }])
          end

          context "when the value matches" do

            it "returns true" do
              expect(matches).to be true
            end
          end

          context "when the value does not match" do

            before do
              person.title = "Foobar baz"
            end

            it "returns false" do
              expect(matches).to be false
            end
          end
        end

        context "when the value does not match" do

          let(:matches) do
            matcher._matches?([ { title: "Sir" } ])
          end

          it "returns false" do
            expect(matches).to be false
          end
        end
      end

      context "when multiple expressions provided" do

        context "when all of the values are equal" do

          let(:matches) do
            matcher._matches?(
              [ { title: "Sir" }, { _id: person.id } ]
            )
          end

          before do
            person.title = "Sir"
          end

          it "returns true" do
            expect(matches).to be true
          end
        end

        context "when one of the values does not match" do

          let(:matches) do
            matcher._matches?(
              [ { title: "Sir" }, { _id: BSON::ObjectId.new } ]
            )
          end

          before do
            person.title = "Sir"
          end

          it "returns false" do
            expect(matches).to be false
          end
        end

        context "when provided no expressions" do

          let(:matches) do
            matcher._matches?([])
          end

          it "returns true" do
            expect(matches).to be true
          end
        end
      end
    end

    context "when provided a complex expression" do

      context "when all of the values are equal" do

        let(:matches) do
          matcher._matches?(
            [
              { title: { "$in" => [ "Sir", "Madam" ] } },
              { _id: person.id }
            ]
          )
        end

        before do
          person.title = "Sir"
        end

        it "returns true" do
          expect(matches).to be true
        end
      end

      context "when one of the values does not match" do

        let(:matches) do
          matcher._matches?(
            [
              { title: { "$in" => [ "Prince", "Madam" ] } },
              { _id: BSON::ObjectId.new }
            ]
          )
        end

        before do
          person.title = "Sir"
        end

        it "returns false" do
          expect(matches).to be false
        end
      end

      context "when expression contain multiple fields" do

        context "when all the expressions match" do

          let(:matches) do
            matcher._matches?(
              [
                { title: "Sir", age: 23 },
                { _id: person.id }
              ]
            )
          end

          before do
            person.title = "Sir"
            person.age = 23
          end

          it "returns true" do
            expect(matches).to be true
          end
        end
      end
    end
  end
end


text:
`heroku maintenance`
====================

enable/disable access to app

* [`heroku maintenance`](#heroku-maintenance)
* [`heroku maintenance:off`](#heroku-maintenanceoff)
* [`heroku maintenance:on`](#heroku-maintenanceon)

## `heroku maintenance`

display the current maintenance status of app

```
display the current maintenance status of app

USAGE
  $ heroku maintenance

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
```

## `heroku maintenance:off`

take the app out of maintenance mode

```
take the app out of maintenance mode

USAGE
  $ heroku maintenance:off

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
```

## `heroku maintenance:on`

put the app into maintenance mode

```
put the app into maintenance mode

USAGE
  $ heroku maintenance:on

OPTIONS
  -a, --app=app        (required) app to run command against
  -r, --remote=remote  git remote of app to use
```


text:
ActiveRecord::Schema.define(version: 20150530072336) do

  create_table "carts", force: true do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "identities", force: true do |t|
    t.integer  "user_id"
    t.string   "provider"
    t.string   "uid"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "identities", ["user_id"], name: "index_identities_on_user_id", using: :btree

  create_table "line_items", force: true do |t|
    t.integer  "product_id"
    t.integer  "cart_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "quantity",   default: 1
    t.integer  "order_id"
  end

  add_index "line_items", ["cart_id"], name: "index_line_items_on_cart_id", using: :btree
  add_index "line_items", ["order_id"], name: "index_line_items_on_order_id", using: :btree
  add_index "line_items", ["product_id"], name: "index_line_items_on_product_id", using: :btree

  create_table "orders", force: true do |t|
    t.string   "name"
    t.text     "address"
    t.string   "email"
    t.string   "pay_type"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "user_id"
  end

  add_index "orders", ["user_id"], name: "index_orders_on_user_id", using: :btree

  create_table "products", force: true do |t|
    t.string   "title"
    t.text     "description"
    t.string   "image_url"
    t.decimal  "price",       precision: 10, scale: 0
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "salers", force: true do |t|
    t.string   "name"
    t.string   "email",                  default: "", null: false
    t.string   "encrypted_password",     default: "", null: false
    t.text     "description"
    t.string   "reset_password_token"
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",          default: 0,  null: false
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip"
    t.string   "last_sign_in_ip"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "image"
  end

  add_index "salers", ["email"], name: "index_salers_on_email", unique: true, using: :btree
  add_index "salers", ["reset_password_token"], name: "index_salers_on_reset_password_token", unique: true, using: :btree

  create_table "users", force: true do |t|
    t.string   "email",                  default: "", null: false
    t.string   "encrypted_password",     default: "", null: false
    t.string   "reset_password_token"
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",          default: 0,  null: false
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip"
    t.string   "last_sign_in_ip"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "employee"
    t.string   "avatar"
    t.string   "provider"
    t.string   "uid"
    t.string   "username"
    t.string   "confirmation_token"
    t.datetime "confirmed_at"
    t.datetime "confirmation_sent_at"
  end

  add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
  add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
  add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree

end