text:
package manu.tron.common

object Vocabulary {

  case class Pos(x: Int, y: Int)

  case class Board(width: Int, height: Int)

  type PlayerId = Int

  sealed trait Direction
  object West  extends Direction
  object North extends Direction
  object East  extends Direction
  object South extends Direction

  case class GameStatus(
    board: Board,
    playersPos: Map[PlayerId, Pos],
    playersPreviousPos: Map[PlayerId, Seq[Pos]],
    deadPlayers: Seq[PlayerId],
    nextPlayerToPlay: Option[PlayerId]
  )

}

redpajama_set_name: RedPajamaGithub


text:
import { Box, Label, Text } from '@sajari/react-components';
import { useSearchContext } from '@sajari/react-hooks';
import { getStylesObject } from '@sajari/react-sdk-utils';
import * as React from 'react';

import { useSearchUIContext } from '../ContextProvider';
import useViewOptionStyles from './styles';
import { ViewOptionProps } from './types';

const ViewOption = (props: ViewOptionProps) => {
  const { disableDefaultStyles = false } = useSearchUIContext();
  const {
    id,
    inline = true,
    renderAsLabel: input,
    label,
    size,
    styles: stylesProp,
    children,
    className,
    labelClassName,
    ...rest
  } = props;
  const labelId = `${id}-label`;
  const { searched } = useSearchContext();
  const styles = getStylesObject(useViewOptionStyles({ inline }), disableDefaultStyles);

  if (!searched) {
    return null;
  }

  const labelProps = {
    id: labelId,
    css: styles.label,
    size,
    disableDefaultStyles,
    className: labelClassName,
  };

  return (
    <Box css={[styles.container, stylesProp]} aria-labelledby={labelId} {...rest} className={className}>
      {input ? (
        <Label htmlFor={id} {...labelProps}>
          {label}
        </Label>
      ) : (
        <Text {...labelProps}>{label}</Text>
      )}

      {children}
    </Box>
  );
};

export default ViewOption;
export type { ViewOptionProps };


text:
/*
 * 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.
 */
package com.facebook.presto.type;

import com.facebook.presto.Session;
import com.facebook.presto.operator.scalar.FunctionAssertions;
import com.facebook.presto.spi.ConnectorSession;
import com.facebook.presto.spi.PrestoException;
import com.facebook.presto.spi.type.SqlDate;
import com.facebook.presto.spi.type.SqlTimeWithTimeZone;
import com.facebook.presto.spi.type.SqlTimestampWithTimeZone;
import com.facebook.presto.spi.type.TimeZoneKey;
import com.facebook.presto.spi.type.Type;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.testng.annotations.Test;

import java.util.concurrent.TimeUnit;

import static com.facebook.presto.spi.type.BooleanType.BOOLEAN;
import static com.facebook.presto.spi.type.DateType.DATE;
import static com.facebook.presto.spi.type.TimeType.TIME;
import static com.facebook.presto.spi.type.TimeWithTimeZoneType.TIME_WITH_TIME_ZONE;
import static com.facebook.presto.spi.type.TimeZoneKey.getTimeZoneKey;
import static com.facebook.presto.spi.type.TimeZoneKey.getTimeZoneKeyForOffset;
import static com.facebook.presto.spi.type.TimestampType.TIMESTAMP;
import static com.facebook.presto.spi.type.TimestampWithTimeZoneType.TIMESTAMP_WITH_TIME_ZONE;
import static com.facebook.presto.spi.type.VarcharType.VARCHAR;
import static com.facebook.presto.testing.TestingSqlTime.sqlTimeOf;
import static com.facebook.presto.testing.TestingSqlTime.sqlTimestampOf;
import static com.facebook.presto.util.DateTimeZoneIndex.getDateTimeZone;
import static org.joda.time.DateTimeZone.UTC;
import static org.testng.Assert.fail;

public abstract class TestDateTimeOperatorsBase
{
    protected static final TimeZoneKey TIME_ZONE_KEY = getTimeZoneKey("Europe/Berlin");
    protected static final DateTimeZone TIME_ZONE = getDateTimeZone(TIME_ZONE_KEY);
    protected static final DateTimeZone WEIRD_TIME_ZONE = DateTimeZone.forOffsetHoursMinutes(5, 9);
    protected static final TimeZoneKey WEIRD_TIME_ZONE_KEY = getTimeZoneKeyForOffset(5 * 60 + 9);

    private final FunctionAssertions functionAssertions;

    protected TestDateTimeOperatorsBase(Session session)
    {
        functionAssertions = new FunctionAssertions(session);
    }

    protected void assertFunction(String projection, Type expectedType, Object expected)
    {
        functionAssertions.assertFunction(projection, expectedType, expected);
    }

    @Test
    public void testDatePlusInterval()
    {
        assertFunction("DATE '2001-1-22' + INTERVAL '3' day", DATE, toDate(new DateTime(2001, 1, 25, 0, 0, 0, 0, UTC)));
        assertFunction("INTERVAL '3' day + DATE '2001-1-22'", DATE, toDate(new DateTime(2001, 1, 25, 0, 0, 0, 0, UTC)));
        assertFunction("DATE '2001-1-22' + INTERVAL '3' month", DATE, toDate(new DateTime(2001, 4, 22, 0, 0, 0, 0, UTC)));
        assertFunction("INTERVAL '3' month + DATE '2001-1-22'", DATE, toDate(new DateTime(2001, 4, 22, 0, 0, 0, 0, UTC)));
        assertFunction("DATE '2001-1-22' + INTERVAL '3' year", DATE, toDate(new DateTime(2004, 1, 22, 0, 0, 0, 0, UTC)));
        assertFunction("INTERVAL '3' year + DATE '2001-1-22'", DATE, toDate(new DateTime(2004, 1, 22, 0, 0, 0, 0, UTC)));

        try {
            functionAssertions.tryEvaluate("DATE '2001-1-22' + INTERVAL '3' hour", DATE);
            fail("Expected IllegalArgumentException");
        }
        catch (PrestoException expected) {
        }

        try {
            functionAssertions.tryEvaluate("INTERVAL '3' hour + DATE '2001-1-22'", DATE);
            fail("Expected IllegalArgumentException");
        }
        catch (PrestoException expected) {
        }
    }

    @Test
    public void testTimePlusInterval()
    {
        assertFunction("TIME '03:04:05.321' + INTERVAL '3' hour", TIME, sqlTimeOf(6, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' hour + TIME '03:04:05.321'", TIME, sqlTimeOf(6, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIME '03:04:05.321' + INTERVAL '3' day", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' day + TIME '03:04:05.321'", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIME '03:04:05.321' + INTERVAL '3' month", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' month + TIME '03:04:05.321'", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIME '03:04:05.321' + INTERVAL '3' year", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' year + TIME '03:04:05.321'", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));

        assertFunction("TIME '03:04:05.321' + INTERVAL '27' hour", TIME, sqlTimeOf(6, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '27' hour + TIME '03:04:05.321'", TIME, sqlTimeOf(6, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));

        assertFunction("TIME '03:04:05.321 +05:09' + INTERVAL '3' hour",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 6, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' hour + TIME '03:04:05.321 +05:09'",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 6, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIME '03:04:05.321 +05:09' + INTERVAL '3' day",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' day + TIME '03:04:05.321 +05:09'",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIME '03:04:05.321 +05:09' + INTERVAL '3' month",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' month + TIME '03:04:05.321 +05:09'",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIME '03:04:05.321 +05:09' + INTERVAL '3' year",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' year + TIME '03:04:05.321 +05:09'",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));

        assertFunction("TIME '03:04:05.321 +05:09' + INTERVAL '27' hour",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 6, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '27' hour + TIME '03:04:05.321 +05:09'",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 6, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
    }

    @Test
    public void testTimestampPlusInterval()
    {
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321' + INTERVAL '3' hour",  TIMESTAMP, sqlTimestampOf(2001, 1, 22, 6, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' hour + TIMESTAMP '2001-1-22 03:04:05.321'",  TIMESTAMP, sqlTimestampOf(2001, 1, 22, 6, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321' + INTERVAL '3' day",   TIMESTAMP, sqlTimestampOf(2001, 1, 25, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' day + TIMESTAMP '2001-1-22 03:04:05.321'",   TIMESTAMP, sqlTimestampOf(2001, 1, 25, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321' + INTERVAL '3' month", TIMESTAMP, sqlTimestampOf(2001, 4, 22, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' month + TIMESTAMP '2001-1-22 03:04:05.321'", TIMESTAMP, sqlTimestampOf(2001, 4, 22, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321' + INTERVAL '3' year",  TIMESTAMP, sqlTimestampOf(2004, 1, 22, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("INTERVAL '3' year + TIMESTAMP '2001-1-22 03:04:05.321'",  TIMESTAMP, sqlTimestampOf(2004, 1, 22, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));

        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321 +05:09' + INTERVAL '3' hour",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2001, 1, 22, 6, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' hour + TIMESTAMP '2001-1-22 03:04:05.321 +05:09'",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2001, 1, 22, 6, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321 +05:09' + INTERVAL '3' day",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2001, 1, 25, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' day + TIMESTAMP '2001-1-22 03:04:05.321 +05:09'",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2001, 1, 25, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321 +05:09' + INTERVAL '3' month",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2001, 4, 22, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' month + TIMESTAMP '2001-1-22 03:04:05.321 +05:09'",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2001, 4, 22, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321 +05:09' + INTERVAL '3' year",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2004, 1, 22, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("INTERVAL '3' year + TIMESTAMP '2001-1-22 03:04:05.321 +05:09'",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2004, 1, 22, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
    }

    @Test
    public void testDateMinusInterval()
    {
        assertFunction("DATE '2001-1-22' - INTERVAL '3' day", DATE, toDate(new DateTime(2001, 1, 19, 0, 0, 0, 0, UTC)));

        try {
            functionAssertions.tryEvaluate("DATE '2001-1-22' - INTERVAL '3' hour", DATE);
            fail("Expected IllegalArgumentException");
        }
        catch (PrestoException expected) {
        }
    }

    @Test
    public void testTimeMinusInterval()
    {
        assertFunction("TIME '03:04:05.321' - INTERVAL '3' hour", TIME, sqlTimeOf(0, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIME '03:04:05.321' - INTERVAL '3' day", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIME '03:04:05.321' - INTERVAL '3' month", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIME '03:04:05.321' - INTERVAL '3' year", TIME, sqlTimeOf(3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));

        assertFunction("TIME '03:04:05.321' - INTERVAL '6' hour", TIME, sqlTimeOf(21, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));

        assertFunction("TIME '03:04:05.321 +05:09' - INTERVAL '3' hour",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 0, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIME '03:04:05.321 +05:09' - INTERVAL '3' day",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIME '03:04:05.321 +05:09' - INTERVAL '3' month",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIME '03:04:05.321 +05:09' - INTERVAL '3' year",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIME '03:04:05.321 +05:09' - INTERVAL '6' hour",
                TIME_WITH_TIME_ZONE,
                new SqlTimeWithTimeZone(new DateTime(1970, 1, 1, 21, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
    }

    private ConnectorSession getConnectorSession()
    {
        return functionAssertions.getSession().toConnectorSession();
    }

    @Test
    public void testTimestampMinusInterval()
    {
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321' - INTERVAL '3' day", TIMESTAMP, sqlTimestampOf(2001, 1, 19, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321 +05:09' - INTERVAL '3' day",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2001, 1, 19, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321' - INTERVAL '3' month", TIMESTAMP, sqlTimestampOf(2000, 10, 22, 3, 4, 5, 321, TIME_ZONE, TIME_ZONE_KEY, getConnectorSession()));
        assertFunction("TIMESTAMP '2001-1-22 03:04:05.321 +05:09' - INTERVAL '3' month",
                TIMESTAMP_WITH_TIME_ZONE,
                new SqlTimestampWithTimeZone(new DateTime(2000, 10, 22, 3, 4, 5, 321, WEIRD_TIME_ZONE).getMillis(), WEIRD_TIME_ZONE_KEY));
    }

    @Test
    public void testDateToTimestampCoercing()
    {
        assertFunction("date_format(DATE '2013-10-27', '%Y-%m-%d %H:%i:%s')", VARCHAR, "2013-10-27 00:00:00");

        assertFunction("DATE '2013-10-27' = TIMESTAMP '2013-10-27 00:00:00'", BOOLEAN, true);
        assertFunction("DATE '2013-10-27' < TIMESTAMP '2013-10-27 00:00:01'", BOOLEAN, true);
        assertFunction("DATE '2013-10-27' > TIMESTAMP '2013-10-26 23:59:59'", BOOLEAN, true);
    }

    @Test
    public void testDateToTimestampWithZoneCoercing()
    {
        assertFunction("DATE '2013-10-27' = TIMESTAMP '2013-10-27 00:00:00 Europe/Berlin'", BOOLEAN, true);
        assertFunction("DATE '2013-10-27' < TIMESTAMP '2013-10-27 00:00:01 Europe/Berlin'", BOOLEAN, true);
        assertFunction("DATE '2013-10-27' > TIMESTAMP '2013-10-26 23:59:59 Europe/Berlin'", BOOLEAN, true);
    }

    @Test
    public void testIsDistinctFrom()
            throws Exception
    {
        assertFunction("CAST(NULL AS DATE) IS DISTINCT FROM CAST(NULL AS DATE)", BOOLEAN, false);
        assertFunction("DATE '2013-10-27' IS DISTINCT FROM TIMESTAMP '2013-10-27 00:00:00'", BOOLEAN, false);
        assertFunction("DATE '2013-10-27' IS DISTINCT FROM TIMESTAMP '2013-10-28 00:00:00'", BOOLEAN, true);
        assertFunction("NULL IS DISTINCT FROM DATE '2013-10-27'", BOOLEAN, true);
        assertFunction("DATE '2013-10-27' IS DISTINCT FROM NULL", BOOLEAN, true);
    }

    private static SqlDate toDate(DateTime dateTime)
    {
        return new SqlDate((int) TimeUnit.MILLISECONDS.toDays(dateTime.getMillis()));
    }

    ConnectorSession getSession()
    {
        return functionAssertions.getSession().toConnectorSession();
    }
}


text:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

include_once 'Conexao.php';
include_once './Auxiliares/Auxiliar.php';

/**
 * Description of ServicoFornecedorSaida
 *
 * @author joao
 */
class ServicoFornecedorSaida extends Conexao{
    private $id_servico_fornecedor_saida;
    private $id_servico_fornecedor;
    private $quantidade;
    private $valor_unitario;
    private $valor_pago;
    private $id_pai;
    private $data_cadastro;
    private $modificado_por;
    private $data_modificacao;
    private $id_status;
    private $id_saida;
    private $id_fornecedor;

    function getId_saida() {
        return $this->id_saida;
    }

    function getId_fornecedor() {
        return $this->id_fornecedor;
    }

    function setId_saida($id_saida) {
        $this->id_saida = $id_saida;
    }

    function setId_fornecedor($id_fornecedor) {
        $this->id_fornecedor = $id_fornecedor;
    }

    function getId_servico_fornecedor_saida() {
        return $this->id_servico_fornecedor_saida;
    }

    function getQuantidade() {
        return $this->quantidade;
    }

    function setQuantidade($quantidade) {
        $this->quantidade = $quantidade;
    }

    function getId_servico_fornecedor() {
        return $this->id_servico_fornecedor;
    }

    function getValor_unitario() {
        return $this->valor_unitario;
    }

    function getValor_pago() {
        return $this->valor_pago;
    }

    function getId_pai() {
        return $this->id_pai;
    }

    function getData_cadastro() {
        return $this->data_cadastro;
    }

    function getModificado_por() {
        return $this->modificado_por;
    }

    function getData_modificacao() {
        return $this->data_modificacao;
    }

    function getId_status() {
        return $this->id_status;
    }

    function setId_servico_fornecedor_saida($id_servico_fornecedor_saida) {
        $this->id_servico_fornecedor_saida = $id_servico_fornecedor_saida;
    }

    function setId_servico_fornecedor($id_servico_fornecedor) {
        $this->id_servico_fornecedor = $id_servico_fornecedor;
    }

    function setValor_unitario($valor_unitario) {
        $this->valor_unitario = $valor_unitario;
    }

    function setValor_pago($valor_pago) {
        $this->valor_pago = $valor_pago;
    }

    function setId_pai($id_pai) {
        $this->id_pai = $id_pai;
    }

    function setData_cadastro($data_cadastro) {
        $this->data_cadastro = $data_cadastro;
    }

    function setModificado_por($modificado_por) {
        $this->modificado_por = $modificado_por;
    }

    function setData_modificacao($data_modificacao) {
        $this->data_modificacao = $data_modificacao;
    }

    function setId_status($id_status) {
        $this->id_status = $id_status;
    }

    public function inserir(){
        try {
            $pdo = parent::getDB();

            $query = $pdo->prepare("insert into "
                    . " servico_fornecedor_saida ("
                    . " id_servico_fornecedor"
                    . ", quantidade"
                    . ", valor_unitario"
                    . ", valor_pago"
                    . ", id_pai"
                    . ", id_fornecedor "
                    . ") "
                    . " VALUES "
                    . "(?, ?, ?, ?, ?, ?);");

            $query->bindValue(1, $this->getId_servico_fornecedor());
            $query->bindValue(2, $this->getQuantidade());
            $query->bindValue(3, Auxiliar::convParaDecimal($this->getValor_unitario()));
            $query->bindValue(4, Auxiliar::convParaDecimal($this->getValor_pago()));
            $query->bindValue(5, $_SESSION['id_usuario']);
            $query->bindValue(6, $this->getId_fornecedor());

            $query->execute();

            return true;
        } catch (Exception $ex) {
            return $ex->getMessage();
        }
    }

    public static function removerItemSelecionado($id_servico_fornecedor_saida){
        try{
            $pdo = parent::getDB();
            $query = $pdo->prepare("update
                servico_fornecedor_saida
                set
                id_status = '2'
                , modificado_por = ?
                , data_modificacao = NOW()
                where
                id_status = '3'
                AND id_servico_fornecedor_saida = ?
                ;");

            $query->bindValue(1, $_SESSION['id_usuario']);
            $query->bindValue(2, $id_servico_fornecedor_saida);
            $query->execute();

            return true;
        } catch (Exception $ex) {
            return false;
        }
    }

    public static function getListaServicoSelecionados($id_fornecedor){
        try{
            $pdo = parent::getDB();
            $query = $pdo->prepare("select
                                sfs.id_servico_fornecedor_saida as id
                                , sf.descricao as descricao
                                , sfs.quantidade as quantidade
                                , sfs.valor_unitario as valor_unitario
                                , sfs.valor_pago as valor_pago
                            from servico_fornecedor_saida as sfs
                            inner join servico_fornecedor as sf on sf.id_servico = sfs.id_servico_fornecedor AND sf.id_fornecedor = ?
                            where
                                sfs.id_status = '3'
                                ;
                            ;");

            $query->bindValue(1, $id_fornecedor);

            $lista = "";
            $i = 1;

            $query->execute();

            while($row = $query->fetch(PDO::FETCH_OBJ)){

                $valor_total = ($row->quantidade) * ($row->valor_unitario);
                $lista = $lista . "
"
                        . "".$i."	"
                        . "".$row->descricao."	"
                        . "".$row->quantidade."	"
                        . "".Auxiliar::convParaReal($row->valor_unitario)."	"
                        . "".Auxiliar::convParaReal($valor_total)."	"
                        . "".Auxiliar::convParaReal(($valor_total) - ($row->valor_pago))."	"
                        . "".Auxiliar::convParaReal($row->valor_pago)."	"
                        . "id."&remover_item_selecionado=true'>Remover	"
                        . "
";
                $i++;
            }

            return $lista;

        } catch (Exception $ex) {
            return $ex->getMessage();
        }
    }

    public static function getTotalSaida($id_fornecedor){
        try{
            $pdo = parent::getDB();
            $query = $pdo->prepare("select
                                 SUM(valor_pago) as valor_pago
                            from servico_fornecedor_saida as sfs
                            inner join servico_fornecedor as sf on sf.id_servico = sfs.id_servico_fornecedor AND sf.id_fornecedor = ?
                            where
                                sfs.id_status = '3'
                                ;
                            ;");

            $query->bindValue(1, $id_fornecedor);

            $lista = "0,00";

            $query->execute();

            while($row = $query->fetch(PDO::FETCH_OBJ)){
                $lista = $row->valor_pago;
            }

            return $lista;

        } catch (Exception $ex) {
            return $ex->getMessage();
        }
    }

    public static function finalizarSaida($IdFornecedor, $idSaida){
         try{
            $pdo = parent::getDB();
            $query = $pdo->prepare(" UPDATE servico_fornecedor_saida "
                    . " SET id_status = 7 "
                    . ", data_modificacao = NOW() "
                    . ", modificado_por = ? "
                    . ", id_saida = ? "
                    . " WHERE "
                    . " id_status = 3 "
                    . " AND id_fornecedor = ?;");

            $query->bindValue(1, $_SESSION['id_usuario']);
            $query->bindValue(2, $idSaida);
            $query->bindValue(3, $IdFornecedor);

            $query->execute();

            return 1;
        } catch (Exception $ex) {
           // echo $ex->getMessage();
            return $ex->getMessage();
        }
    }
}


text:
package com.linkedin.norbert
package network
package partitioned
package loadbalancer

/**
 * Object which provides hash function implementations.
 */
object HashFunctions {
  /**
   * An implementation of the FNV hash function.
   *
   * @param bytes the bytes to hash
   *
   * @return the hashed value of the bytes
   *
   * @see http://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function
   */
  def fnv[T <% Array[Byte]](bytes: T): Int = {
    val FNV_BASIS = 0x811c9dc5
    val FNV_PRIME = (1 << 24) + 0x193

    var hash: Long = FNV_BASIS
    var i: Int = 0
    var maxIdx: Int = bytes.length

    while (i < maxIdx) {
      hash = (hash ^ (0xFF & bytes(i))) * FNV_PRIME
      i += 1
    }
    hash.toInt
  }
}


text:
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using Xunit;

namespace Config.Net.Tests
{
   public class PerformanceExperimentTest
   {
      public class Poco
      {
         public string S { get; set; }

         public int I { get; set; }
      }

      [Fact]
      public void Reflect_and_assign_plain()
      {
         Type t = typeof(Poco);
         PropertyInfo[] pi = t.GetTypeInfo().GetProperties();

         for(int i = 0; i < 100000; i++)
         {
            string s = i.ToString();

            object o = Activator.CreateInstance(typeof(Poco));
            pi[0].SetValue(o, s);
            pi[1].SetValue(o, i);
         }
      }

   }

}


text:
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { renderIntoDocument, findRenderedComponentWithType } from 'react-dom/test-utils';
import createMatchMediaConnect from '../src/createMatchMediaConnect';

class Component extends React.Component {
    render() {
        return <div />;
    }
}

describe('createMatchMediaConnect', () => {
    let iframe;
    let connectOptions;

    before((done) => {
        iframe = document.createElement('iframe');
        document.body.appendChild(iframe);
        const iframeMatchMedia = iframe.contentWindow.matchMedia;
        connectOptions = { matchMediaFn: iframeMatchMedia };
        done();
    });
    after(() => {
        connectOptions = undefined;
        document.body.removeChild(iframe);
        iframe = undefined;
    });

    function setSize(width, height) {
        iframe.style.width = `${width}px`;
        iframe.style.height = `${height}px`;
        return iframe.clientWidth; // Force layout
    }

    let connect;
    beforeEach(() => {
        setSize(800, 600);
        connect = createMatchMediaConnect({
            isLandscape: '(orientation: landscape)',
            isMin700: '(min-width: 700px)',
            isMax700: '(max-width: 700px)'
        }, connectOptions);
    });

    afterEach(() => {
        connect.destroy();
        connect = undefined;
    });

    describe('when called', () => {
        it('should return a function and a destroy function', (done) => {
            const { destroy } = connect;
            expect(connect).toBeInstanceOf(Function);
            expect(destroy).toBeInstanceOf(Function);
            done();
        });
    });

    describe('when mounted', () => {
        it('should subscribe to updates', (done) => {
            const wrapWithConnect = connect();
            const Connected = wrapWithConnect(Component);
            expect(connect.listeners.length).toEqual(0);
            renderIntoDocument(<Connected />);
            expect(connect.listeners.length).toEqual(1);
            done();
        });
        it('should pass a property for each query', (done) => {
            const wrapWithConnect = connect();
            const Connected = wrapWithConnect(Component);
            const tree = renderIntoDocument(<Connected />);
            const component = findRenderedComponentWithType(tree, Component);
            expect(component.props).toEqual({
                isLandscape: true,
                isMin700: true,
                isMax700: false
            });
            done();
        });
    });

    describe('when dimensions change', () => {
        it('should update properties', (done) => {
            const wrapWithConnect = connect();
            const Connected = wrapWithConnect(Component);
            const tree = renderIntoDocument(<Connected />);
            const component = findRenderedComponentWithType(tree, Component);
            setSize(600, 800);
            window.setTimeout(() => {
                expect(component.props).toEqual({
                    isLandscape: false,
                    isMin700: false,
                    isMax700: true
                });
                done();
            }, 100);
        });
        it('should update properties once', (done) => {
            const wrapWithConnect = connect();
            const Connected = wrapWithConnect(Component);
            const tree = renderIntoDocument(<Connected />);
            const component = findRenderedComponentWithType(tree, Component);
            const spy = sinon.spy(component, 'render');
            setSize(600, 800);
            window.setTimeout(() => {
                expect(spy.callCount).toEqual(1);
                spy.reset();
                done();
            }, 100);
        });
    });

    describe('when `pickProperties` is not empty', () => {
        it('should only pass the given properties', (done) => {
            const wrapWithConnect = connect(['isLandscape']);
            const Connected = wrapWithConnect(Component);
            const tree = renderIntoDocument(<Connected />);
            const component = findRenderedComponentWithType(tree, Component);
            expect(component.props).toEqual({ isLandscape: true });
            done();
        });
        describe('when properties change that are not in the list', () => {
            it('should not rerender', (done) => {
                const wrapWithConnect = connect(['isLandscape']);
                const Connected = wrapWithConnect(Component);
                const tree = renderIntoDocument(<Connected />);
                const component = findRenderedComponentWithType(tree, Component);
                const spy = sinon.spy(component, 'render');
                setSize(400, 300);
                window.setTimeout(() => {
                    expect(spy.callCount).toEqual(0);
                    spy.reset();
                    done();
                }, 100);
            });
        });
    });

    describe('when unmounting', () => {
        it('should unsubscribe', (done) => {
            const wrapWithConnect = connect();
            const Connected = wrapWithConnect(Component);
            const div = document.createElement('div');
            render(<Connected />, div, function callback() {
                expect(connect.listeners.length).toEqual(1);
                unmountComponentAtNode(div);
                window.setTimeout(() => {
                    expect(connect.listeners.length).toEqual(0);
                    done();
                }, 100);
            });
        });
    });
});


text:
import React, {PropTypes} from 'react';
import {connect} from 'react-redux';

//component
import NotFoundPageContent from './NotFoundPageContent';

//actions
import * as imageGalleryActions from '../../actions/imageGalleryActions';

class NotFoundPage extends React.Component {
  constructor(props, context) {
    super(props, context);
  }

  componentDidMount() {
    //fake action dispatch to hide loading screen
    this.props.dispatch(imageGalleryActions.allImagesLoaded());
  }

  render() {
    return (
      <NotFoundPageContent />
    );
  }
}

NotFoundPage.propTypes = {
  dispatch: PropTypes.func.isRequired
};

export default connect()(NotFoundPage);


text:
@implementation GBButton{
    SKLabelNode* _textLabel;
}
- (instancetype)initWithColor:(SKColor *)color size:(CGSize)size text:(NSString*)text{
    self = [super initWithColor:color size:size];
    if (self) {
        _textLabel = [SKLabelNode labelNodeWithFontNamed:kFontName];
        _textLabel.text = text;
        _textLabel.fontColor = color == [SKColor whiteColor] ? [SKColor blackColor] : [SKColor whiteColor];
        [self addChild:_textLabel];

        [self setUserInteractionEnabled:YES];
    }
    return self;
}
+ (instancetype)buttonWithColor:(SKColor *)color size:(CGSize)size text:(NSString*)text{
    GBButton* button = [[GBButton alloc]initWithColor:color size:size text:text];
    return button;
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [self.delegate onClick:self];
}
-(void)setFontSize:(CGFloat)size{
    _textLabel.fontSize=size;
}
-(void)setTextPosition:(CGPoint)position{
    _textLabel.position = CGPointMake(position.x,position.y);
}
@end


text:
SDK para acesso da API de publicação JáCotei

## Instalando o Pacote ##

Execute o seguinte comando no diretório do sdk para instalar a SDK java no repositório local:

```
mvn clean compile install
```

Depois você já pode utilizá-la no seu projeto maven:
```
<dependency>
    <groupId>br.com.jacotei</groupId>
    <artifactId>sdk-api-v1-jacotei</artifactId>
    <version>1.0.0</version>
</dependency>
```

Ou Gradle:
```
compile 'br.com.jacotei:sdk-api-v1-jacotei:1.0.0'
```

### Exemplos ###

Envio de 1000 ofertas:
```Java
import br.com.jacotei.api.v1.OffersApi;
import br.com.jacotei.api.v1.client.ApiClient;
import br.com.jacotei.api.v1.client.ApiException;
import br.com.jacotei.api.v1.client.auth.ApiKeyAuth;
import br.com.jacotei.api.v1.model.Offer;
import br.com.jacotei.api.v1.model.OfferPrice;
import br.com.jacotei.api.v1.model.OfferRequest;
import br.com.jacotei.api.v1.model.OfferResponse;

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

public class OfertasPost {
    public static void main (String[] args){
        ApiClient apiClient = new ApiClient();
        apiClient.setBasePath("https://webapisb.jacotei.com.br/publisher/v1"); // Sandbox
        //apiClient.setBasePath("https://webapi.jacotei.com.br/publisher/v1"); // Producao

        apiClient.setDebugging(true);

        // Alterar a chave informada com o valor de client_id da sua APP
        ((ApiKeyAuth)apiClient.getAuthentication("client_id")).setApiKey("xxxx");

        // Alterar a chave informada com o valor de access_token disponível
        ((ApiKeyAuth)apiClient.getAuthentication("access_token")).setApiKey("xxxx");

        OffersApi offersApi = new OffersApi(apiClient);

        List<Offer> offerList = new ArrayList<Offer>();

        for(int i = 0; i < 1000; i++){
            String sku = String.format("%s", i);
            Offer offer = new Offer();
            offer.setAvailable(true);
            offer.setSku(sku);
            offer.setTitle("Oferta "+sku);
            offer.setLink("http://foo.com/"+sku);

            List<OfferPrice> offerPrices = new ArrayList<OfferPrice>();
            OfferPrice offerPrice = new OfferPrice();
            offerPrice.setPrice(1.99);
            offerPrice.setInstallment(1);
            offerPrice.setInstallmentValue(1.99);
            offerPrices.add(offerPrice);

            List<String> images = new ArrayList<String>();
            images.add("http://foo.com/"+sku+".jpg");

            List<String> categories = new ArrayList<String>();
            categories.add("Categoria");
            categories.add("Subcategoria");
            categories.add("Sub subcategoria");

            offer.setImages(images);
            offer.setCategories(categories);
            offer.setPrices(offerPrices);
            offerList.add(offer);
        }

        OfferRequest offerRequest = new OfferRequest();
        offerRequest.setOffers(offerList);

        try {
            OfferResponse offerResponse = offersApi.updateOffersUsingPOST(offerRequest);
            System.out.println(offerResponse);
        } catch (ApiException e) {
            e.printStackTrace();
        }
    }
}
```


text:
package eu.mihosoft.vtk;

import java.awt.*;
import java.awt.color.ColorSpace;
import java.awt.event.*;
import java.awt.geom.AffineTransform;
import java.awt.image.*;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JWindow;
import sun.awt.image.ByteInterleavedRaster;
import vtk.vtkPanel;
import vtk.vtkRenderWindow;
import vtk.vtkRenderer;
import vtk.vtkUnsignedCharArray;

/**
 * Swing component that displays the content of a {@link vtk.vtkPanel}. In
 * contrast to the original vtk panel this component is a lightweight component.
 * Although this slows down rendering it may be usefull if transparency and
 * layering of components shall be used. This panel gives full access to the
 * offscreen image which allows to postprocess the image with AWT/Swing.
 *
 *
In addition to {@link vtk.vtkPanel} this component provides a fullscreen
 * mode that can be enabled either manually through
 * {@link #enterFullscreenMode() } or by double clicking on the component.

 *
 * @author Michael Hoffer <info@michaelhoffer.de>
 */
public class VTKJPanel extends JPanel
        implements MouseListener, MouseMotionListener, MouseWheelListener, KeyListener {

    private static final long serialVersionUID = 1L;
    //
    // vtk objects
    //
    private final vtkRenderWindow rw;
    private final VTKCanvas panel;
    private final vtkRenderer ren;
    //
    //fullscreen component
    //
    private Window window;
    //
    // offscreen image
    private Image img;
    //
    // offsets for sample model
    private final int[] bOffs = {0, 1, 2, 3};
    //
    // sample model (used by writable raster)
    private SampleModel sampleModel;
    //
    // transform to get around the axis problem
    // @vtk devs why din't you choose the "right" orientation ;)
    private AffineTransform at;
    //
    // render data (contains data for the offscreen image)
    private byte[] renderData;
    //
    // the color model for the offscreen image
    private static ColorModel colorModel = createColorModel();
    //
    // indicates whether rendering content
    private boolean renderContent;
    //
    // indicates whether this panel is in fullscreen mode
    private boolean fullscreen;
    //
    // indicates whether the content has changed and whether this component
    // shall be rerendered
    private boolean contentChanged;
    //
    // alpha value of vtk content. allows transparency.
    private float contentAlpha = 1.f;

    /**
     * Constructor.
     */
    public VTKJPanel() {

        // panel wich leaves fullscreen if ESC is pressed
        panel = new VTKCanvas() {
            @Override
            public void keyPressed(KeyEvent e) {

                super.keyPressed(e);

                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                    leaveFullscreenMode();
                }
            }
        };

        rw = panel.GetRenderWindow();
        ren = panel.GetRenderer();

        // create the window
        if (!SysUtil.isLinux()) {
            window = new JWindow();
        } else {
            window = new JFrame();
            ((JFrame) window).setUndecorated(true);
        }

        initWindow();

        // double click will leave fullscreen mode
        panel.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2) {

                    leaveFullscreenMode();
                }
            }
        });

        addMouseListener(this);
        addMouseMotionListener(this);
        addMouseWheelListener(this);
        addKeyListener(this);
        setBackground(new Color(120, 120, 120));

        rw.SetAlphaBitPlanes(1);
        ren.SetGradientBackground(true);

        setOpaque(true);
    }

    public void setBackgroundTransparent(boolean v) {
        if (v) {
            rw.SetAlphaBitPlanes(1);
        } else {
            rw.SetAlphaBitPlanes(0);
        }
    }

    public boolean isBackgroundTransparent() {
        return rw.GetAlphaBitPlanes() == 1;
    }

    public void setGradientBackground(boolean v) {
        ren.SetGradientBackground(v);
    }

    public boolean isGradientBackground() {
        return ren.GetGradientBackground();
    }

    /**
     * Leaves fullscreen mode.
     */
    public void leaveFullscreenMode() {
        GraphicsUtil.leaveFullscreenMode(window);
        window.setVisible(false);
        fullscreen = false;

        this.setSize(1, 1);
        this.revalidate();
        this.setSize(getSize());

        repair();
    }

    /**
     * Enters fullscreen mode.
     */
    public void enterFullscreenMode() {
        GraphicsUtil.enterFullscreenMode(window);
        fullscreen = true;
//        this.setSize(getSize());
    }

    /**
     * Reports rendering capabilites.
     *
     * @see vtk.vtkPanel#Report()
     */
    public void report() {
        panel.Report();

    }

    /**
     * Defines the background color of this panel. This method will also set the
     * background color of the vtk renderer.
 Note: only red, green
     * abd blue values are used. Alpha is ignored.

     *
     * @param c color to set
     */
    @Override
    public void setBackground(Color c) {
        super.setBackground(c);
        if (ren != null) {

            ren.SetBackground(
                    c.getRed() / 255.f,
                    c.getGreen() / 255.f,
                    c.getBlue() / 255.f);
        }
    }

    /**
     * Returns the vtk renderer used by this panel.
     *
     * @return vtk renderer
     */
    public vtkRenderer getRenderer() {
        return ren;
    }

    /**
     * Returns the vtk render window used by this panel.
     *
     * @return
     */
    public vtkRenderWindow getRenderWindow() {
        return rw;
    }

    @Override
    public void setBounds(int x, int y, int w, int h) {
        super.setBounds(x, y, w, h);
        if (window != null && !fullscreen) {

            // on windows we must manually change the size of the render window
            if (SysUtil.isWindows()) {
                panel.lock();
                rw.SetSize(w, h);
                panel.unlock();
            }

            window.setSize(w, h);

            contentChanged();
        }
    }

    /**
     * Renders this panel.
     */
    private synchronized void render() {
        panel.lock();
        panel.Render();
        panel.unlock();

        renderContent = ren.VisibleActorCount() > 0;
        updateImage();
        contentChanged = false;

    }

    /**
     * Indicates that the content of this component has changed. The next
     * repaint event after calling this method will trigger rendering.
     *
Note:This method does not directly trigger rendering. Thus,
     * calling it multiple times does not change behavior.

     */
    public void contentChanged() {
        contentChanged = true;
    }

    /**
     * Deletes the render content and the associated buffer image
     */
    public void deleteContent() {
        img = null;
    }

    @Override
    protected void paintComponent(Graphics g) {

        super.paintComponent(g);

        Graphics2D g2 = (Graphics2D) g;

        Composite original = g2.getComposite();

        // TODO find out if this condition really improves performance
        if (getContentAlpha() < 1.f) {
            AlphaComposite ac1 =
                    AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
                    getContentAlpha());
            g2.setComposite(ac1);

            g2.drawImage(getImage(), 0, 0, /*
                     * getWidth(), getHeight(),
                     */ null);

            g2.setComposite(original);
        } else {
            g2.drawImage(getImage(), 0, 0, /*
                     * getWidth(), getHeight(),
                     */ null);
        }

    }

    /**
     * Returns the content of this panel as awt image.
     *
     * @return image that contains the rendered content
     */
    private Image getImage() {

        if (img == null || sizeChanged() || contentChanged) {
            render();
        }

        return img;
    }

    /**
     * Indicates whether the render window and the offscreen image differ in
     * size.
     *
     * @return true if sizes differ; false otherwise
     */
    private boolean sizeChanged() {

        int[] renderSize = rw.GetSize();
        int width = renderSize[0];
        int height = renderSize[1];

        boolean changed = img == null || width != img.getWidth(null) - 1
                || height != img.getHeight(null) - 1;

        return changed;
    }

    /**
     * Updates the offscreen image of this panel.
     */
    private synchronized void updateImage() {

        // if we have no content to render nothing to be done
        if (!renderContent) {
            return;
        }

        // size of render window
        int[] renderSize = rw.GetSize();
        int width = renderSize[0];
        int height = renderSize[1];

        // if either samplemodel, the mirror transform are null or
        // render window and offscreen image have different sizes we need to
        // create new sample model and transform
        if (sampleModel == null || at == null || sizeChanged()) {

            // as far as I know vtk uses RGBA component layout (see below)
            sampleModel = new PixelInterleavedSampleModel(
                    DataBuffer.TYPE_BYTE,
                    width + 1, height + 1,
                    4, 4 * (width + 1),
                    bOffs);

            // transform to get around the axis problem
            // @vtk devs why din't you choose the "right" orientation ;)
            at = new AffineTransform(1, 0.0d, 0.0d, -1, 0, height + 1);

            // resize hidden frame if not in fullscreen mode
            if (!fullscreen) {
                panel.lock();
                window.setSize(getWidth(), getHeight());
                panel.unlock();
            }
        }

        panel.lock();
        // retrieve the pixeldata from render window
        vtkUnsignedCharArray vtkPixelData = new vtkUnsignedCharArray();
        ren.GetRenderWindow().GetRGBACharPixelData(0, 0, width, height,
                1, vtkPixelData);

        renderData = vtkPixelData.GetJavaArray();
        DataBuffer dbuf = new DataBufferByte(renderData, width * height, 0);

        // we now construct an image raster with sample model (see above)
        WritableRaster raster =
                new ByteInterleavedRaster(sampleModel, dbuf, new Point(0, 0));

        // transform the original raster
        AffineTransformOp op = new AffineTransformOp(
                at, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
        WritableRaster mirrorRaster = op.filter(raster, null);

        // finally, create an image
        img = new BufferedImage(colorModel, mirrorRaster, false, null);
        panel.unlock();
    }

    /**
     * Returns the color model used to construct the offscreen image.
     *
     * @return color model
     */
    private static ColorModel createColorModel() {
        ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
        int[] nBits = {8, 8, 8, 8};

        return new ComponentColorModel(cs, nBits, true, false,
                Transparency.TRANSLUCENT,
                DataBuffer.TYPE_BYTE);
    }

    @Override
    public void mouseClicked(MouseEvent e) {

        if (e.getClickCount() == 2) {
            enterFullscreenMode();
        }

//        render();
        contentChanged();
        repaint();

        panel.mouseClicked(e);

    }

    @Override
    public void mousePressed(MouseEvent e) {
        panel.mousePressed(e);
//        render();
        contentChanged();
        repaint();
    }

    @Override
    public void mouseReleased(MouseEvent e) {
        panel.mouseReleased(e);
    }

    @Override
    public void mouseEntered(MouseEvent e) {
        this.requestFocus();
        panel.mouseEntered(e);;
    }

    @Override
    public void mouseExited(MouseEvent e) {
        panel.mouseMoved(e);
    }

    @Override
    public void mouseMoved(MouseEvent e) {
        panel.mouseMoved(e);;
    }

    @Override
    public void mouseDragged(MouseEvent e) {

        panel.mouseDragged(e);
//        render();
        contentChanged();
        repaint();
    }

    @Override
    public void mouseWheelMoved(MouseWheelEvent e) {
        panel.mouseWheelMoved(e);
//        render();
        contentChanged();
        repaint();
    }

    @Override
    public void keyTyped(KeyEvent e) {
        panel.keyReleased(e);
//        render();
        contentChanged();
        repaint();
    }

    public void HardCopy(String filename, int mag) {
        panel.HardCopy(filename, mag);
    }

    @Override
    public void keyReleased(KeyEvent e) {
        panel.keyReleased(e);
//        render();
        contentChanged();
        repaint();
    }

    @Override
    public void keyPressed(KeyEvent e) {
        panel.keyPressed(e);
//        render();
        contentChanged();
        repaint();
    }

    /**
     * Disposes this component.
     */
    public void dispose() {
        panel.Delete();
        window.dispose();
    }

    /**
     * Returns the content alpha value (defines transparency of vtk content).
     *
     * A value of 1.f means full opacity, 0.0f full transparency.
     *
     * @return the content alpha
     */
    public float getContentAlpha() {
        return contentAlpha;
    }

    /**
     * Resets the camera. Additionally this method triggers a repaint event.
     */
    public void resetCamera() {
        panel.resetCamera();
        contentChanged();
        repaint();
    }

    /**
     * Defines the default camera position (used when resetting the camera).
     *
     * @param x
     * @param y
     * @param z
     */
    public void setDefaultCamPos(double x, double y, double z) {
        panel.setDefaultCamPos(x, y, z);
    }

    /**
     * Defines whether to use parallel projection (disabled by default). This
     * method triggers a repaint event.
     *
     * @param b defines whether to enable parallel projection
     */
    public void setParallelProjection(boolean b) {

        panel.lock();

        int val = b ? 1 : 0;
        ren.GetActiveCamera().SetParallelProjection(val);

        panel.unlock();

        contentChanged();
        repaint();
    }

    /**
     * Indicates whether parallel projection is enabled.
     *
     * @return true if parallel projection is enabled;
     * false otherwise
     */
    public boolean isParallelProjection() {
        int val = ren.GetActiveCamera().GetParallelProjection();

        return val == 1 ? true : false;
    }

    /**
     * Defines the content alpha value (defines transparency of vtk content).
     *
     * A value of 1.f means full opacity, 0.0f full transparency.
     *
     * @param contentAlpha the content alpha to set
     */
    public void setContentAlpha(float contentAlpha) {
        this.contentAlpha = contentAlpha;
        contentChanged();
    }

    /**
     * @return the panel
     */
    public VTKCanvas getPanel() {
        return panel;
    }

    //
    //****************************************************
    //*       !!! CAUTION: UGLY METHODS BELOW !!!        *
    //****************************************************
    //
    /**
     * Initializes the internal window.
     */
    private void initWindow() {
        // we add the panel to give it access to native memory etc.
        window.add(panel);

        // unfortunately a window has to be visible to be initialized.
        // that is why we toggle visibility
        // this window does not have a title bar and is not visible (hopefully)
        window.setVisible(true);

        // ati on linux sucks!
        if (SysUtil.isLinux()) {

            // linux:
            // we must ensure that the window gets painted at least once with
            // width and height > 0
            window.setSize(1, 1);

            // I am so unhappy with this :(
            // But otherwise the window will show up detached from this panel
            // which looks very strange
            for (int i = 0; i < 15; i++) {
                window.paint(window.getGraphics());
                try {
                    Thread.sleep(2);
                } catch (InterruptedException ex) {
                    // we don't care
                }
            }
        }

        window.setVisible(false);
    }

    /**
     * Repairs the visual appearance of this panel.
     */
    private void repair() {
        // This is a hack!
        // I put this method to the bottom because no one should read its code.
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                GraphicsUtil.invokeLater(new Runnable() {
                    @Override
                    public void run() {
                        contentChanged();
                        repaint();
                    }
                });
            }
        }, 10);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">AndroidGameDev</string>
    <string name="hello_world">Hello world!</string>
    <string name="action_settings">Settings</string>
    <string name="currentScore">Current Session Score: </string>
    <string name="alertDialog">Alert Dialog: </string>

</resources>


text:
/**
 * @file
 *   This file includes macros for validating runtime conditions.
 */

#ifndef CODE_UTILS_H
#define CODE_UTILS_H

/**
 *  This checks for the specified condition, which is expected to
 *  commonly be true, and branches to the local label 'exit' if the
 *  condition is false.
 *
 *  @param[in]  aCondition  A Boolean expression to be evaluated.
 *
 */
#define otEXPECT(aCondition) \
    do                       \
    {                        \
        if (!(aCondition))   \
        {                    \
            goto exit;       \
        }                    \
    } while (0)

/**
 *  This checks for the specified condition, which is expected to
 *  commonly be true, and both executes @p anAction and branches to
 *  the local label 'exit' if the condition is false.
 *
 *  @param[in]  aCondition  A Boolean expression to be evaluated.
 *  @param[in]  aAction     An expression or block to execute when the
 *                          assertion fails.
 *
 */
#define otEXPECT_ACTION(aCondition, aAction) \
    do                                       \
    {                                        \
        if (!(aCondition))                   \
        {                                    \
            aAction;                         \
            goto exit;                       \
        }                                    \
    } while (0)

/**
 *  This unconditionally executes @aAction and branches to the local
 *  label 'exit'.
 *
 *  @note The use of this interface implies neither success nor
 *        failure for the overall exit status of the enclosing
 *        function body.
 *
 *  @param[in]  aAction     An expression or block to execute.
 *
 */
#define otEXIT_NOW(aAction) \
    do                      \
    {                       \
        aAction;            \
        goto exit;          \
    } while (0)

#endif // CODE_UTILS_H


text: #import "api/peerconnection/RTCIceServer.h"


text:
namespace Halide {
namespace Internal {

using std::vector;
using std::string;

using namespace llvm;

CodeGen_MIPS::CodeGen_MIPS(Target t) : CodeGen_Posix(t) {
    #if !(WITH_MIPS)
    user_error << "llvm build not configured with MIPS target enabled.\n";
    #endif
    user_assert(llvm_Mips_enabled) << "llvm build not configured with MIPS target enabled.\n";
}

llvm::Triple CodeGen_MIPS::get_target_triple() const {
    llvm::Triple triple;

    // Currently MIPS support is only little-endian.
    if (target.bits == 32) {
        triple.setArch(llvm::Triple::mipsel);
    } else {
        user_assert(target.bits == 64) << "Target must be 32- or 64-bit.\n";
        triple.setArch(llvm::Triple::mips64el);
    }

    if (target.os == Target::Android) {
        triple.setOS(llvm::Triple::Linux);
        triple.setEnvironment(llvm::Triple::Android);
    } else {
        user_error << "No mips support for this OS\n";
    }

    return triple;
}

void CodeGen_MIPS::compile(Stmt stmt, string name,
                          const vector<Argument> &args,
                          const vector<Buffer> &images_to_embed) {
    init_module();

    module = get_initial_module_for_target(target, context);

    // Fix the target triple.
    debug(1) << "Target triple of initial module: " << module->getTargetTriple() << "\n";

    llvm::Triple triple = get_target_triple();
    module->setTargetTriple(triple.str());

    debug(1) << "Target triple of initial module: " << module->getTargetTriple() << "\n";

    // Pass to the generic codegen
    CodeGen::compile(stmt, name, args, images_to_embed);

    // Optimize
    CodeGen::optimize_module();
}

string CodeGen_MIPS::mcpu() const {
    if (target.bits == 32) {
        return "";
    } else {
        return "";
    }
}

string CodeGen_MIPS::mattrs() const {
    if (target.bits == 32) {
        return "";
    } else {
        return "mips64r6";
    }
}

bool CodeGen_MIPS::use_soft_float_abi() const {
    return false;
}

int CodeGen_MIPS::native_vector_bits() const {
    return 128;
}

}}


text:
#pragma once

#include "saiga/core/sophus/SophusSelector.h"

namespace Sophus
{

/// @brief Decoupled version of logmap for SE(3)
///
/// For SE(3) element vector
/// \f[
/// \begin{pmatrix} R & t \\ 0 & 1 \end{pmatrix} \in SE(3),
/// \f]
/// returns \f$ (t, \log(R)) \in \mathbb{R}^6 \f$. Here rotation is not coupled
/// with translation.
///
/// @param[in] SE(3) member
/// @return tangent vector (6x1 vector)
template <typename Scalar>
inline typename SE3<Scalar>::Tangent se3_logd(const SE3<Scalar>& se3)
{
    typename SE3<Scalar>::Tangent upsilon_omega;
    upsilon_omega.template head<3>() = se3.translation();
    upsilon_omega.template tail<3>() = se3.so3().log();

    return upsilon_omega;
}

/// @brief Decoupled version of expmap for SE(3)
///
/// For tangent vector \f$ (\upsilon, \omega) \in \mathbb{R}^6 \f$ returns
/// \f[
/// \begin{pmatrix} \exp(\omega) & \upsilon \\ 0 & 1 \end{pmatrix} \in SE(3),
/// \f]
/// where \f$ \exp(\omega) \in SO(3) \f$. Here rotation is not coupled with
/// translation.
///
/// @param[in] tangent vector (6x1 vector)
/// @return  SE(3) member
template <typename Derived>
HD inline SE3<typename Derived::Scalar> se3_expd(const Eigen::MatrixBase<Derived>& upsilon_omega)
{
    using Scalar = typename Derived::Scalar;
    return SE3<Scalar>(SO3<Scalar>::exp(upsilon_omega.eval().template tail<3>()),
                       upsilon_omega.eval().template head<3>());
}

#if SAIGA_REAL_SOPHUS
template <typename Scalar>
inline Eigen::Matrix<Scalar, 7, 1> dsim3_logd(const DSim3<Scalar>& sim3)
{
    Eigen::Matrix<Scalar, 7, 1> upsilon_omega_scale;
    upsilon_omega_scale.template head<6>() = se3_logd(sim3.se3());
    upsilon_omega_scale(6)                 = log(sim3.scale());
    return upsilon_omega_scale;
}

template <typename Derived>
HD inline DSim3<typename Derived::Scalar> dsim3_expd(const Eigen::MatrixBase<Derived>& upsilon_omega)
{
    EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived);
    EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived, 7);

    using Scalar = typename Derived::Scalar;
    return DSim3<Scalar>(se3_expd(upsilon_omega.template head<6>()), exp(upsilon_omega(6)));
}
template <typename Scalar>
inline void decoupled_inc(const Eigen::Matrix<Scalar, 6, 1>& inc, Sophus::DSim3<Scalar>& T)
{
    decoupled_inc(inc.template head<6>(), T.se3());
    T.scale() = exp(inc(6)) * T.scale();
}

#else

template <class Scalar>
struct Constants
{
    HD static Scalar epsilon() { return Scalar(1e-10); }

    HD static Scalar epsilonSqrt()
    {
        using std::sqrt;
        return sqrt(epsilon());
    }

    HD static Scalar pi() { return Scalar(3.141592653589793238462643383279502884); }
};

template <>
struct Constants<float>
{
    HD static float constexpr epsilon() { return static_cast<float>(1e-5); }

    HD static float epsilonSqrt() { return std::sqrt(epsilon()); }

    HD static float constexpr pi() { return 3.141592653589793238462643383279502884f; }
};

#endif
template <typename Scalar>
inline typename Sim3<Scalar>::Tangent sim3_logd(const Sim3<Scalar>& se3)
{
    typename Sim3<Scalar>::Tangent upsilon_omega;
    upsilon_omega.template tail<4>() = se3.rxso3().log();
    upsilon_omega.template head<3>() = se3.translation();

    return upsilon_omega;
}

/// @brief Right Jacobian for SO(3)
///
/// For \f$ \exp(x) \in SO(3) \f$ provides a Jacobian that approximates the sum
/// under expmap with a right multiplication of expmap for small \f$ \epsilon
/// \f$.  Can be used to compute:  \f$ \exp(\phi + \epsilon) \approx \exp(\phi)
/// \exp(J_{\phi} \epsilon)\f$
/// @param[in] phi (3x1 vector)
/// @param[out] J_phi (3x3 matrix)
template <typename Derived1, typename Derived2>
inline void rightJacobianSO3(const Eigen::MatrixBase<Derived1>& phi, const Eigen::MatrixBase<Derived2>& J_phi)
{
    using Scalar = typename Derived1::Scalar;

    Eigen::MatrixBase<Derived2>& J = const_cast<Eigen::MatrixBase<Derived2>&>(J_phi);

    Scalar phi_norm2 = phi.squaredNorm();
    Scalar phi_norm  = std::sqrt(phi_norm2);
    Scalar phi_norm3 = phi_norm2 * phi_norm;

    J.setIdentity();

    if (Sophus::Constants<Scalar>::epsilon() < phi_norm)
    {
        Eigen::Matrix<Scalar, 3, 3> phi_hat  = Sophus::SO3<Scalar>::hat(phi);
        Eigen::Matrix<Scalar, 3, 3> phi_hat2 = phi_hat * phi_hat;

        J -= phi_hat * (1 - std::cos(phi_norm)) / phi_norm2;
        J += phi_hat2 * (phi_norm - std::sin(phi_norm)) / phi_norm3;
    }
}

/// @brief Left Jacobian for SO(3)
///
/// For \f$ \exp(x) \in SO(3) \f$ provides a Jacobian that approximates the sum
/// under expmap with a left multiplication of expmap for small \f$ \epsilon
/// \f$.  Can be used to compute:  \f$ \exp(\phi + \epsilon) \approx
/// \exp(J_{\phi} \epsilon) \exp(\phi) \f$
/// @param[in] phi (3x1 vector)
/// @param[out] J_phi (3x3 matrix)
template <typename Derived1, typename Derived2>
inline void leftJacobianSO3(const Eigen::MatrixBase<Derived1>& phi, const Eigen::MatrixBase<Derived2>& J_phi)
{
    using Scalar = typename Derived1::Scalar;

    Eigen::MatrixBase<Derived2>& J = const_cast<Eigen::MatrixBase<Derived2>&>(J_phi);

    Scalar phi_norm2 = phi.squaredNorm();
    Scalar phi_norm  = std::sqrt(phi_norm2);
    Scalar phi_norm3 = phi_norm2 * phi_norm;

    J.setIdentity();

    if (Sophus::Constants<Scalar>::epsilon() < phi_norm)
    {
        Eigen::Matrix<Scalar, 3, 3> phi_hat  = Sophus::SO3<Scalar>::hat(phi);
        Eigen::Matrix<Scalar, 3, 3> phi_hat2 = phi_hat * phi_hat;

        J += phi_hat * (1 - std::cos(phi_norm)) / phi_norm2;
        J += phi_hat2 * (phi_norm - std::sin(phi_norm)) / phi_norm3;
    }
}

/// @brief Right Inverse Jacobian for SO(3)
///
/// For \f$ \exp(x) \in SO(3) \f$ provides an inverse Jacobian that approximates
/// the logmap of the right multiplication of expmap of the arguments with a sum
/// for small \f$ \epsilon \f$.  Can be used to compute:  \f$ \log
/// (\exp(\phi) \exp(\epsilon)) \approx \phi + J_{\phi} \epsilon\f$
/// @param[in] phi (3x1 vector)
/// @param[out] J_phi (3x3 matrix)
template <typename Derived1, typename Derived2>
inline void rightJacobianInvSO3(const Eigen::MatrixBase<Derived1>& phi, const Eigen::MatrixBase<Derived2>& J_phi)
{
    using Scalar = typename Derived1::Scalar;

    Eigen::MatrixBase<Derived2>& J = const_cast<Eigen::MatrixBase<Derived2>&>(J_phi);

    Scalar phi_norm2 = phi.squaredNorm();
    Scalar phi_norm  = std::sqrt(phi_norm2);

    J.setIdentity();

    if (Sophus::Constants<Scalar>::epsilon() < phi_norm)
    {
        Eigen::Matrix<Scalar, 3, 3> phi_hat  = Sophus::SO3<Scalar>::hat(phi);
        Eigen::Matrix<Scalar, 3, 3> phi_hat2 = phi_hat * phi_hat;

        J += phi_hat / 2;
        J += phi_hat2 * (1 / phi_norm2 - (1 + std::cos(phi_norm)) / (2 * phi_norm * std::sin(phi_norm)));
    }
}

/// @brief Left Inverse Jacobian for SO(3)
///
/// For \f$ \exp(x) \in SO(3) \f$ provides an inverse Jacobian that approximates
/// the logmap of the left multiplication of expmap of the arguments with a sum
/// for small \f$ \epsilon \f$.  Can be used to compute:  \f$ \log
/// (\exp(\epsilon) \exp(\phi)) \approx \phi + J_{\phi} \epsilon\f$
/// @param[in] phi (3x1 vector)
/// @param[out] J_phi (3x3 matrix)
template <typename Derived1, typename Derived2>
inline void leftJacobianInvSO3(const Eigen::MatrixBase<Derived1>& phi, const Eigen::MatrixBase<Derived2>& J_phi)
{
    using Scalar = typename Derived1::Scalar;

    Eigen::MatrixBase<Derived2>& J = const_cast<Eigen::MatrixBase<Derived2>&>(J_phi);

    Scalar phi_norm2 = phi.squaredNorm();
    Scalar phi_norm  = std::sqrt(phi_norm2);

    J.setIdentity();

    if (Sophus::Constants<Scalar>::epsilon() < phi_norm)
    {
        Eigen::Matrix<Scalar, 3, 3> phi_hat  = Sophus::SO3<Scalar>::hat(phi);
        Eigen::Matrix<Scalar, 3, 3> phi_hat2 = phi_hat * phi_hat;

        J -= phi_hat / 2;
        J += phi_hat2 * (1 / phi_norm2 - (1 + std::cos(phi_norm)) / (2 * phi_norm * std::sin(phi_norm)));
    }
}

/// @brief Right Jacobian for decoupled SE(3)
///
/// For \f$ \exp(x) \in SE(3) \f$ provides a Jacobian that approximates the sum
/// under decoupled expmap with a right multiplication of decoupled expmap for
/// small \f$ \epsilon \f$.  Can be used to compute:  \f$ \exp(\phi + \epsilon)
/// \approx \exp(\phi) \exp(J_{\phi} \epsilon)\f$
/// @param[in] phi (6x1 vector)
/// @param[out] J_phi (6x6 matrix)
template <typename Derived1, typename Derived2>
inline void rightJacobianSE3Decoupled(const Eigen::MatrixBase<Derived1>& phi, const Eigen::MatrixBase<Derived2>& J_phi)
{
    using Scalar = typename Derived1::Scalar;

    Eigen::MatrixBase<Derived2>& J = const_cast<Eigen::MatrixBase<Derived2>&>(J_phi);

    J.setZero();

    Eigen::Matrix<Scalar, 3, 1> omega = phi.template tail<3>();
    rightJacobianSO3(omega, J.template bottomRightCorner<3, 3>());
    J.template topLeftCorner<3, 3>() = Sophus::SO3<Scalar>::exp(omega).inverse().matrix();
}

/// @brief Right Inverse Jacobian for decoupled SE(3)
///
/// For \f$ \exp(x) \in SE(3) \f$ provides an inverse Jacobian that approximates
/// the decoupled logmap of the right multiplication of the decoupled expmap of
/// the arguments with a sum for small \f$ \epsilon \f$.  Can be used to
/// compute:  \f$ \log
/// (\exp(\phi) \exp(\epsilon)) \approx \phi + J_{\phi} \epsilon\f$
/// @param[in] phi (6x1 vector)
/// @param[out] J_phi (6x6 matrix)
template <typename Derived1, typename Derived2>
inline void rightJacobianInvSE3Decoupled(const Eigen::MatrixBase<Derived1>& phi,
                                         const Eigen::MatrixBase<Derived2>& J_phi)
{
    using Scalar = typename Derived1::Scalar;

    Eigen::MatrixBase<Derived2>& J = const_cast<Eigen::MatrixBase<Derived2>&>(J_phi);

    J.setZero();

    Eigen::Matrix<Scalar, 3, 1> omega = phi.template tail<3>();
    rightJacobianInvSO3(omega, J.template bottomRightCorner<3, 3>());
    J.template topLeftCorner<3, 3>() = Sophus::SO3<Scalar>::exp(omega).matrix();
}

template <typename Derived1, typename Derived2>
inline void rightJacobianInvDSim3Decoupled(const Eigen::MatrixBase<Derived1>& phi,
                                           const Eigen::MatrixBase<Derived2>& J_phi)
{
    using Scalar = typename Derived1::Scalar;

    Eigen::MatrixBase<Derived2>& J = const_cast<Eigen::MatrixBase<Derived2>&>(J_phi);

    J.setZero();

    Eigen::Matrix<Scalar, 3, 1> omega = phi.template segment<3>(3);
    J.template topLeftCorner<3, 3>()  = Sophus::SO3<Scalar>::exp(omega).matrix() * exp(phi(6));
    rightJacobianInvSO3(omega, J.template block<3, 3>(3, 3));
    J(6, 6) = 1;
}

template <typename Scalar>
inline void decoupled_inc(const Eigen::Matrix<Scalar, 6, 1>& inc, Sophus::SE3<Scalar>& T)
{
    T.translation() += inc.template head<3>();
    T.so3() = Sophus::SO3d::exp(inc.template tail<3>()) * T.so3();
}

}  // namespace Sophus

namespace Sophus
{
template <typename T>
inline T translationalError(const Sophus::SE3<T>& a, const Sophus::SE3<T>& b)
{
    Eigen::Matrix<T, 3, 1> diff = a.translation() - b.translation();
    return diff.norm();
}

// the angle (in radian) between two rotations
template <typename T>
inline T rotationalError(const Sophus::SE3<T>& a, const Sophus::SE3<T>& b)
{
    Eigen::Quaternion<T> q1 = a.unit_quaternion();
    Eigen::Quaternion<T> q2 = b.unit_quaternion();
    return q1.angularDistance(q2);
}

// Spherical interpolation
template <typename T>
inline Sophus::SE3<T> slerp(const Sophus::SE3<T>& a, const Sophus::SE3<T>& b, T alpha)
{
    using Vec3 = Eigen::Matrix<T, 3, 1>;
    using Quat = Eigen::Quaternion<T>;

    Vec3 t  = (1.0 - alpha) * a.translation() + (alpha)*b.translation();
    Quat q1 = a.unit_quaternion();
    Quat q2 = b.unit_quaternion();
    Quat q  = q1.slerp(alpha, q2);
    return Sophus::SE3<T>(q, t);
}

template <typename T>
inline Sophus::SE3<T> mix(const Sophus::SE3<T>& a, const Sophus::SE3<T>& b, T alpha)
{
    return slerp(a, b, alpha);
}

// scale the transformation by a scalar
template <typename T>
inline Sophus::SE3<T> scale(const Sophus::SE3<T>& a, double alpha)
{
    return slerp(Sophus::SE3<T>(), a, alpha);
}

}  // namespace Sophus


text:
!function() {
  'use strict';
  // tslint:disable-next-line:no-console
  console.log('Hello, Alice in Wonderland');
  var A = function() {
    function A() {}
    return A.prototype.a = function() {
      return document.a;
    }, A;
  }(), B = function() {
    function B() {}
    return B.prototype.b = function() {
      return window.b;
    }, B;
  }();
  var no_initializer;
  // tslint:disable-next-line:no-console
  console.error(new A().a(), new B().b());
}();


text:
pub mod colors;
mod follow;
mod group;
pub mod helper;
mod log;
mod state;

use self::{colors::Colors, helper::style_text};

// Re-exports
pub use self::follow::follow_local_task_logs;
pub use self::group::print_groups;
pub use self::log::{determine_log_line_amount, print_logs};
pub use self::state::print_state;

/// Used to style any generic success message from the daemon.
pub fn print_success(_colors: &Colors, message: &str) {
    println!("{}", message);
}

/// Used to style any generic failure message from the daemon.
pub fn print_error(colors: &Colors, message: &str) {
    let styled = style_text(message, Some(colors.red()), None);
    println!("{}", styled);
}


text:
<!DOCTYPE html>

		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>SSI</title>

		<meta name="description" content="overview & stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<link rel="stylesheet" href="<?php echo base_url() ?>assets/css/bootstrap.css" />
		<link rel="stylesheet" href="<?php echo base_url() ?>assets/css/font-awesome.css" />

		<link rel="stylesheet" href="<?php echo base_url() ?>assets/css/ace-fonts.css" />

		<link rel="stylesheet" href="<?php echo base_url() ?>assets/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />

				<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
					Toggle sidebar

				</button>

							<img src="<?php echo base_url() ?>assets/images/nombre.jpg" width="32%" heigth="22%">


text:
/////////////////////////////
/// ECMAScript Internationalization API
/////////////////////////////

declare module Intl {
    interface CollatorOptions {
        usage?: string;
        localeMatcher?: string;
        numeric?: boolean;
        caseFirst?: string;
        sensitivity?: string;
        ignorePunctuation?: boolean;
    }

    interface ResolvedCollatorOptions {
        locale: string;
        usage: string;
        sensitivity: string;
        ignorePunctuation: boolean;
        collation: string;
        caseFirst: string;
        numeric: boolean;
    }

    interface Collator {
        compare(x: string, y: string): number;
        resolvedOptions(): ResolvedCollatorOptions;
    }
    var Collator: {
        new (locales?: string[], options?: CollatorOptions): Collator;
        new (locale?: string, options?: CollatorOptions): Collator;
        (locales?: string[], options?: CollatorOptions): Collator;
        (locale?: string, options?: CollatorOptions): Collator;
        supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];
        supportedLocalesOf(locale: string, options?: CollatorOptions): string[];
    }

    interface NumberFormatOptions {
        localeMatcher?: string;
        style?: string;
        currency?: string;
        currencyDisplay?: string;
        useGrouping?: boolean;
        minimumIntegerDigits?: number;
        minimumFractionDigits?: number;
        maximumFractionDigits?: number;
        minimumSignificantDigits?: number;
        maximumSignificantDigits?: number;
    }

    interface ResolvedNumberFormatOptions {
        locale: string;
        numberingSystem: string;
        style: string;
        currency?: string;
        currencyDisplay?: string;
        minimumIntegerDigits: number;
        minimumFractionDigits: number;
        maximumFractionDigits: number;
        minimumSignificantDigits?: number;
        maximumSignificantDigits?: number;
        useGrouping: boolean;
    }

    interface NumberFormat {
        format(value: number): string;
        resolvedOptions(): ResolvedNumberFormatOptions;
    }
    var NumberFormat: {
        new (locales?: string[], options?: NumberFormatOptions): NumberFormat;
        new (locale?: string, options?: NumberFormatOptions): NumberFormat;
        (locales?: string[], options?: NumberFormatOptions): NumberFormat;
        (locale?: string, options?: NumberFormatOptions): NumberFormat;
        supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];
        supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];
    }

    interface DateTimeFormatOptions {
        localeMatcher?: string;
        weekday?: string;
        era?: string;
        year?: string;
        month?: string;
        day?: string;
        hour?: string;
        minute?: string;
        second?: string;
        timeZoneName?: string;
        formatMatcher?: string;
        hour12?: boolean;
        timeZone?: string;
    }

    interface ResolvedDateTimeFormatOptions {
        locale: string;
        calendar: string;
        numberingSystem: string;
        timeZone: string;
        hour12?: boolean;
        weekday?: string;
        era?: string;
        year?: string;
        month?: string;
        day?: string;
        hour?: string;
        minute?: string;
        second?: string;
        timeZoneName?: string;
    }

    interface DateTimeFormat {
        format(date?: Date | number): string;
        resolvedOptions(): ResolvedDateTimeFormatOptions;
    }
    var DateTimeFormat: {
        new (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;
        new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;
        (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;
        (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;
        supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];
        supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];
    }
}

interface String {
    /**
      * Determines whether two strings are equivalent in the current locale.
      * @param that String to compare to target string
      * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
      * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
      */
    localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;

    /**
      * Determines whether two strings are equivalent in the current locale.
      * @param that String to compare to target string
      * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
      * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
      */
    localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;
}

interface Number {
    /**
      * Converts a number to a string by using the current or specified locale.
      * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;

    /**
      * Converts a number to a string by using the current or specified locale.
      * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;
}

interface Date {
    /**
      * Converts a date and time to a string by using the current or specified locale.
      * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
    /**
      * Converts a date to a string by using the current or specified locale.
      * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;

    /**
      * Converts a time to a string by using the current or specified locale.
      * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;

    /**
      * Converts a date and time to a string by using the current or specified locale.
      * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;

    /**
      * Converts a date to a string by using the current or specified locale.
      * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;

    /**
      * Converts a time to a string by using the current or specified locale.
      * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
      * @param options An object that contains one or more properties that specify comparison options.
      */
    toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
}


text:
if(NOT CPackComponentsDEB_SOURCE_DIR)
  message(FATAL_ERROR "CPackComponentsDEB_SOURCE_DIR not set")
endif()

include(${CPackComponentsDEB_SOURCE_DIR}/RunCPackVerifyResult.cmake)

# expected results
set(expected_file_mask "${CPackComponentsDEB_BINARY_DIR}/MyLib-*.deb")
set(expected_count 3)

set(actual_output)
run_cpack(actual_output
          CPack_output
          CPack_error
          EXPECTED_FILE_MASK "${expected_file_mask}"
          CONFIG_ARGS ${config_args}
          CONFIG_VERBOSE ${config_verbose})

if(NOT actual_output)
  message(STATUS "expected_count='${expected_count}'")
  message(STATUS "expected_file_mask='${expected_file_mask}'")
  message(STATUS "actual_output_files='${actual_output}'")
  message(FATAL_ERROR "error: expected_files do not exist: CPackComponentsDEB test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error}")
endif()

list(LENGTH actual_output actual_count)
if(NOT actual_count EQUAL expected_count)
  message(STATUS "actual_count='${actual_count}'")
  message(FATAL_ERROR "error: expected_count=${expected_count} does not match actual_count=${actual_count}: CPackComponents test fails. (CPack_output=${CPack_output}, CPack_error=${CPack_error})")
endif()

# dpkg-deb checks for the summary of the packages
find_program(DPKGDEB_EXECUTABLE dpkg-deb)
if(DPKGDEB_EXECUTABLE)
  set(dpkgdeb_output_errors_all "")
  foreach(_f IN LISTS actual_output)

    # extracts the metadata from the package
    run_dpkgdeb(dpkg_output
                FILENAME ${_f}
                )

    dpkgdeb_return_specific_metaentry(dpkg_package_name
                                      DPKGDEB_OUTPUT "${dpkg_output}"
                                      METAENTRY "Package:")

    dpkgdeb_return_specific_metaentry(dpkg_description
                                      DPKGDEB_OUTPUT "${dpkg_output}"
                                      METAENTRY "Description:")

    message(STATUS "package='${dpkg_package_name}', description='${dpkg_description}'")

    if("${dpkg_package_name}" STREQUAL "mylib-applications")
      if(NOT "${dpkg_description}" STREQUAL "applications_description")
        set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
                                      "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != applications_description")
      endif()
    elseif("${dpkg_package_name}" STREQUAL "mylib-headers")
      if(NOT "${dpkg_description}" STREQUAL "headers_description")
        set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
                                      "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != headers_description")
      endif()
    elseif("${dpkg_package_name}" STREQUAL "mylib-libraries")
      if(NOT "${dpkg_description}" STREQUAL "main description")
        set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
                                      "dpkg-deb: ${_f}: Incorrect description for package ${dpkg_package_name}: ${dpkg_description} != 'main description'")
      endif()
    else()
      set(dpkgdeb_output_errors_all ${dpkgdeb_output_errors_all}
                                    "dpkg-deb: ${_f}: component name not found: ${dpkg_package_name}\n")
    endif()

  endforeach()

  if(NOT "${dpkgdeb_output_errors_all}" STREQUAL "")
    message(FATAL_ERROR "dpkg-deb checks failed:\n${dpkgdeb_output_errors_all}")
  endif()
else()
  message("dpkg-deb executable not found - skipping dpkg-deb test")
endif()


text:
package com.fionapet.business.facade;

import org.dubbo.x.facade.CURDRestService;
import org.dubbo.x.facade.RestResult;
import org.dubbo.x.util.ConstantVariable;
import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
import com.fionapet.business.entity.Enterprise;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.util.List;

/**
 * 企业信息表 接口
 *
* Created by tom on 2016-07-25 09:32:31.
 */

@Path("enterprises")
@Consumes({MediaType.APPLICATION_JSON})
@Produces({ContentType.APPLICATION_JSON_UTF_8})
@Api(value="enterprises", description = "企业信息表接口")
public interface EnterpriseRestService extends CURDRestService<Enterprise>{
    /**
     * 企业信息表
     * @return
     */
    @GET
    @Path("")
    @ApiOperation(value = "企业信息表",
            notes = "企业信息表列表.")
    RestResult<List<Enterprise>> list(@HeaderParam(ConstantVariable.HEADER_AUTHORIZATION_KEY) String token);

    /**
     * 企业信息表 详细信息
     *
     * @return
     */
    @GET
    @Path("/{id}")
    @ApiOperation(value = "详细信息",
            notes = "企业信息表详细信息.")
    RestResult<Enterprise> detail(@HeaderParam(ConstantVariable.HEADER_AUTHORIZATION_KEY) String token, @ApiParam("id") @PathParam("id") String uuid);

    @POST
    @Path("")
    @ApiOperation(value = "添加/修改企业信息表", notes = "添加/修改企业信息表")
    RestResult<Enterprise> create(@HeaderParam(ConstantVariable.HEADER_AUTHORIZATION_KEY) String token,Enterprise enterprise);

    @DELETE
    @Path("/{id}")
    @ApiOperation(value = "删除企业信息表", notes = "删除企业信息表")
    RestResult<String> delete(@HeaderParam(ConstantVariable.HEADER_AUTHORIZATION_KEY) String token, @ApiParam("id") @PathParam("id") String uuid);
}


text:
// disable checked iterator warning for msvc
#include <boost/config.hpp>
#ifdef BOOST_MSVC
    #pragma warning(disable:4996)
#endif

#define BOOST_TEST_MODULE odeint_runge_kutta_controlled_concepts

#include <vector>
#include <cmath>
#include <iostream>

#include <boost/numeric/odeint/config.hpp>

#include <boost/array.hpp>

#include <boost/test/unit_test.hpp>

#include <boost/ref.hpp>
#include <boost/bind.hpp>
#include <boost/utility.hpp>
#include <boost/type_traits/add_reference.hpp>

#include <boost/mpl/vector.hpp>
#include <boost/mpl/for_each.hpp>
#include <boost/mpl/insert_range.hpp>
#include <boost/mpl/end.hpp>
#include <boost/mpl/copy.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/inserter.hpp>

#include <boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp>
#include <boost/numeric/odeint/stepper/runge_kutta_cash_karp54.hpp>
#include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
#include <boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp>
#include <boost/numeric/odeint/stepper/controlled_runge_kutta.hpp>
#include <boost/numeric/odeint/stepper/bulirsch_stoer.hpp>

#include "prepare_stepper_testing.hpp"
#include "dummy_odes.hpp"

using std::vector;

using namespace boost::unit_test;
using namespace boost::numeric::odeint;
namespace mpl = boost::mpl;

const double result = 2.2; // two steps

const double eps = 1.0e-14;

template< class Stepper , class System >
void check_controlled_stepper_concept( Stepper &stepper , System system , typename Stepper::state_type &x )
{
    typedef Stepper stepper_type;
    typedef typename stepper_type::deriv_type container_type;
    //typedef typename stepper_type::order_type order_type;  controlled_error_stepper don't necessarily have a order (burlish-stoer)
    typedef typename stepper_type::time_type time_type;

    time_type t = 0.0 , dt = 0.1;
    controlled_step_result step_result = stepper.try_step( system , x , t , dt );

    BOOST_CHECK_MESSAGE( step_result == success , "step result: " << step_result ); // error = 0 for constant system -> step size is always too small
}

template< class ControlledStepper , typename T >
struct perform_controlled_stepper_test
{
    typedef T vector_space_type;
    void operator()( void ) const
    {
        vector_space_type x;
        x = 2.0;
        ControlledStepper controlled_stepper;
        constant_system_functor_vector_space sys;
#ifndef _MSC_VER
        // dont run this for MSVC due to compiler bug 697006
        check_controlled_stepper_concept( controlled_stepper ,
                                          constant_system_vector_space< vector_space_type , vector_space_type , typename ControlledStepper::time_type >
                                          , x );
#else
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
#endif
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
        BOOST_CHECK( (abs( x - result )) < eps );
    }
};

template< class ControlledStepper , typename T >
struct perform_controlled_stepper_test< ControlledStepper , std::vector<T> >
{
    typedef std::vector<T> vector_type;
    void operator()( void )
    {
        using std::abs;
        vector_type x( 1 , 2.0 );
        ControlledStepper controlled_stepper;
        constant_system_functor_standard sys;
#ifndef _MSC_VER
        // dont run this for MSVC due to compiler bug 697006

        check_controlled_stepper_concept( controlled_stepper ,
                                          constant_system_standard< vector_type , vector_type , typename ControlledStepper::time_type > ,
                                          x );
#else
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
#endif
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
        BOOST_CHECK( (abs( x[0] - result )) < eps );
    }
};

template< class ControlledStepper >
struct perform_controlled_stepper_test< ControlledStepper , vector_space_type >
{
    void operator()( void ) const
    {
        vector_space_type x;
        x = 2.0;
        ControlledStepper controlled_stepper;
        constant_system_functor_vector_space sys;
#ifndef _MSC_VER
        // dont run this for MSVC due to compiler bug 697006
        check_controlled_stepper_concept( controlled_stepper ,
                                          constant_system_vector_space< vector_space_type , vector_space_type , typename ControlledStepper::time_type >
                                          , x );
#else
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
#endif
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
        BOOST_CHECK( (abs( x - result )) < eps );
    }
};

template< class ControlledStepper , typename T >
struct perform_controlled_stepper_test< ControlledStepper , boost::array<T,1> >
{
    typedef boost::array<T,1> array_type;
    void operator()( void )
    {
        using std::abs;
        array_type x;
        x[0] = 2.0;
        ControlledStepper controlled_stepper;
        constant_system_functor_standard sys;
#ifndef _MSC_VER
        // dont run this for MSVC due to compiler bug 697006
        check_controlled_stepper_concept( controlled_stepper , constant_system_standard< array_type , array_type , typename ControlledStepper::time_type > , x );
#else
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
#endif
        check_controlled_stepper_concept( controlled_stepper , boost::cref( sys ) , x );
        BOOST_CHECK( (abs( x[0] - result )) < eps );
    }
};

template< class State > class controlled_stepper_methods : public mpl::vector<
    controlled_runge_kutta< runge_kutta_cash_karp54_classic< State , typename detail::extract_value_type<State>::type > > ,
    controlled_runge_kutta< runge_kutta_dopri5< State , typename detail::extract_value_type<State>::type > > ,
    controlled_runge_kutta< runge_kutta_fehlberg78< State , typename detail::extract_value_type<State>::type > > ,
    bulirsch_stoer< State , typename detail::extract_value_type<State>::type >
    > { };

typedef mpl::copy
<
    container_types ,
    mpl::inserter
    <
        mpl::vector0<> ,
        mpl::insert_range
        <
            mpl::_1 ,
            mpl::end< mpl::_1 > ,
            controlled_stepper_methods< mpl::_2 >
            >
        >
    >::type all_controlled_stepper_methods;

BOOST_AUTO_TEST_SUITE( controlled_runge_kutta_concept_test )

BOOST_AUTO_TEST_CASE_TEMPLATE( controlled_stepper_test , ControlledStepper , all_controlled_stepper_methods )
{
    perform_controlled_stepper_test< ControlledStepper , typename ControlledStepper::state_type > tester;
    tester();
}

BOOST_AUTO_TEST_SUITE_END()