text:
const nodesQuery = require(`../../db/nodes-query`)
const { store } = require(`../../redux`)
require(`../../db/__tests__/fixtures/ensure-loki`)()

const makeNodes = () => [
  {
    id: `0`,
    internal: { type: `Test` },
    index: 0,
    name: `The Mad Max`,
    string: `a`,
    float: 1.5,
    hair: 1,
    date: `2006-07-22T22:39:53.000Z`,
    anArray: [1, 2, 3, 4],
    key: {
      withEmptyArray: [],
    },
    anotherKey: {
      withANested: {
        nestedKey: `foo`,
        emptyArray: [],
        anotherEmptyArray: [],
      },
    },
    frontmatter: {
      date: `2006-07-22T22:39:53.000Z`,
      title: `The world of dash and adventure`,
      tags: [`moo`, `foo`],
      blue: 100,
    },
    anObjectArray: [
      { aString: `some string`, aNumber: 2, aBoolean: true },
      { aString: `some string`, aNumber: 2, anArray: [1, 2] },
    ],
    boolean: true,
    nestedRegex: {
      field: `har har`,
    },
  },
  {
    id: `1`,
    internal: { type: `Test` },
    index: 1,
    name: `The Mad Wax`,
    string: `b`,
    float: 2.5,
    hair: 2,
    anArray: [1, 2, 5, 4],
    waxOnly: {
      foo: true,
      bar: { baz: true },
    },
    anotherKey: {
      withANested: {
        nestedKey: `foo`,
      },
    },
    frontmatter: {
      date: `2006-07-22T22:39:53.000Z`,
      title: `The world of slash and adventure`,
      blue: 10010,
      circle: `happy`,
    },
    boolean: false,
    data: {
      tags: [
        {
          tag: {
            document: [
              {
                data: {
                  tag: `Design System`,
                },
                number: 3,
              },
            ],
          },
        },
      ],
    },
    nestedRegex: {
      field: ``,
    },
  },
  {
    id: `2`,
    internal: { type: `Test` },
    index: 2,
    name: `The Mad Wax`,
    string: `c`,
    float: 3.5,
    hair: 0,
    date: `2006-07-29T22:39:53.000Z`,
    waxOnly: null,
    anotherKey: {
      withANested: {
        nestedKey: `bar`,
      },
    },
    frontmatter: {
      date: `2006-07-22T22:39:53.000Z`,
      title: `The world of shave and adventure`,
      blue: 10010,
      circle: `happy`,
    },
    data: {
      tags: [
        {
          tag: {
            document: [
              {
                data: {
                  tag: `Gatsby`,
                },
              },
            ],
          },
        },
        {
          tag: {
            document: [
              {
                data: {
                  tag: `Design System`,
                },
                number: 5,
              },
            ],
          },
        },
      ],
    },
  },
]

function makeGqlType(nodes) {
  const { createSchemaComposer } = require(`../../schema/schema-composer`)
  const { addInferredFields } = require(`../infer/add-inferred-fields`)
  const { getExampleValue } = require(`../infer/example-value`)

  const sc = createSchemaComposer()
  const typeName = `Test`
  const tc = sc.createObjectTC(typeName)
  addInferredFields({
    schemaComposer: sc,
    typeComposer: tc,
    exampleValue: getExampleValue({ nodes, typeName }),
  })
  return tc.getType()
}

function resetDb(nodes) {
  store.dispatch({ type: `DELETE_CACHE` })
  for (const node of nodes) {
    store.dispatch({ type: `CREATE_NODE`, payload: node })
  }
}

async function runQuery(queryArgs) {
  const nodes = makeNodes()
  resetDb(nodes)
  const gqlType = makeGqlType(nodes)
  const args = {
    gqlType,
    firstOnly: false,
    queryArgs,
  }
  return await nodesQuery.run(args)
}

async function runFilter(filter) {
  return await runQuery({ filter })
}

describe(`Filter fields`, () => {
  it(`handles eq operator`, async () => {
    let result = await runFilter({ hair: { eq: 2 } })

    expect(result.length).toEqual(1)
    expect(result[0].hair).toEqual(2)
  })

  it(`handles eq operator with false value`, async () => {
    let result = await runFilter({ boolean: { eq: false } })

    expect(result.length).toEqual(1)
    expect(result[0].name).toEqual(`The Mad Wax`)
  })

  it(`handles eq operator with 0`, async () => {
    let result = await runFilter({ hair: { eq: 0 } })

    expect(result.length).toEqual(1)
    expect(result[0].hair).toEqual(0)
  })

  it(`handles ne operator`, async () => {
    let result = await runFilter({ hair: { ne: 2 } })

    expect(result.length).toEqual(2)
    expect(result[0].hair).toEqual(1)
  })

  it(`handles ne: true operator`, async () => {
    let result = await runFilter({ boolean: { ne: true } })

    expect(result.length).toEqual(2)
  })

  it(`handles nested ne: true operator`, async () => {
    let result = await runFilter({ waxOnly: { foo: { ne: true } } })

    expect(result.length).toEqual(2)
  })

  it(`handles deeply nested ne: true operator`, async () => {
    let result = await runFilter({
      waxOnly: { bar: { baz: { ne: true } } },
    })

    expect(result.length).toEqual(2)
  })

  it(`handles lt operator`, async () => {
    let result = await runFilter({ hair: { lt: 2 } })

    expect(result.length).toEqual(2)
    expect(result[0].hair).toEqual(1)
    expect(result[1].hair).toEqual(0)
  })

  it(`handles lte operator`, async () => {
    let result = await runFilter({ hair: { lte: 1 } })

    expect(result.length).toEqual(2)
    expect(result[0].hair).toEqual(1)
    expect(result[1].hair).toEqual(0)
  })

  it(`handles gt operator`, async () => {
    let result = await runFilter({ hair: { gt: 0 } })

    expect(result.length).toEqual(2)
    expect(result[0].hair).toEqual(1)
    expect(result[1].hair).toEqual(2)
  })

  it(`handles gte operator`, async () => {
    let result = await runFilter({ hair: { gte: 1 } })

    expect(result.length).toEqual(2)
    expect(result[0].hair).toEqual(1)
    expect(result[1].hair).toEqual(2)
  })

  it(`handles the regex operator`, async () => {
    let result = await runFilter({ name: { regex: `/^the.*wax/i` } })
    expect(result.length).toEqual(2)
    expect(result[0].name).toEqual(`The Mad Wax`)
  })

  it(`handles the nested regex operator`, async () => {
    let result = await runFilter({ nestedRegex: { field: { regex: `/.*/` } } })
    expect(result.length).toEqual(2)
    expect(result[0].id).toEqual(`0`)
    expect(result[1].id).toEqual(`1`)
  })

  it(`handles the in operator for strings`, async () => {
    let result = await runFilter({ string: { in: [`b`, `c`] } })
    expect(result.length).toEqual(2)
    expect(result[0].index).toEqual(1)
  })

  it(`handles the in operator for ints`, async () => {
    let result = await runFilter({ index: { in: [0, 2] } })
    expect(result.length).toEqual(2)
    expect(result[0].index).toEqual(0)
    expect(result[1].index).toEqual(2)
  })

  it(`handles the in operator for floats`, async () => {
    let result = await runFilter({ float: { in: [1.5, 2.5] } })
    expect(result.length).toEqual(2)
    expect(result[0].index).toEqual(0)
    expect(result[1].index).toEqual(1)
  })

  it(`handles the in operator for booleans`, async () => {
    let result = await runFilter({ boolean: { in: [true] } })
    expect(result.length).toEqual(1) // 2
    expect(result[0].index).toEqual(0)
    //    expect(result[1].index).toEqual(2)
  })

  it(`handles the in operator for array`, async () => {
    let result = await runFilter({ anArray: { in: [5] } })
    expect(result.length).toEqual(1)
    expect(result[0].name).toEqual(`The Mad Wax`)
  })

  it(`handles the nested in operator for array of strings`, async () => {
    let result = await runFilter({ frontmatter: { tags: { in: [`moo`] } } })
    expect(result).toHaveLength(1)
    expect(result[0].name).toEqual(`The Mad Max`)
  })

  it(`handles the elemMatch operator for array of objects`, async () => {
    let result = await runFilter({
      data: {
        tags: {
          elemMatch: {
            tag: {
              document: {
                elemMatch: {
                  data: {
                    tag: { eq: `Gatsby` },
                  },
                },
              },
            },
          },
        },
      },
    })

    expect(result.length).toEqual(1)
    expect(result[0].index).toEqual(2)
  })

  it(`handles the elemMatch operator for array of objects (2)`, async () => {
    let result = await runFilter({
      data: {
        tags: {
          elemMatch: {
            tag: {
              document: {
                elemMatch: {
                  data: {
                    tag: { eq: `Design System` },
                  },
                },
              },
            },
          },
        },
      },
    })

    expect(result.length).toEqual(2)
    expect(result[0].index).toEqual(1)
    expect(result[1].index).toEqual(2)
  })

  it(`handles the elemMatch operator for array of objects (number)`, async () => {
    let result = await runFilter({
      data: {
        tags: {
          elemMatch: {
            tag: {
              document: {
                elemMatch: {
                  number: { lt: 4 },
                },
              },
            },
          },
        },
      },
    })

    expect(result.length).toEqual(1)
    expect(result[0].index).toEqual(1)
  })

  it(`handles the nin operator for array`, async () => {
    let result = await runFilter({ anArray: { nin: [5] } })

    expect(result.length).toEqual(2)

    result.forEach(edge => {
      expect(edge.anArray).not.toEqual(expect.arrayContaining([5]))
    })
  })

  it(`handles the nin operator for strings`, async () => {
    let result = await runFilter({ string: { nin: [`b`, `c`] } })

    expect(result.length).toEqual(1)
    result.forEach(edge => {
      expect(edge.string).not.toEqual(`b`)
      expect(edge.string).not.toEqual(`c`)
    })
  })

  it(`handles the nin operator for ints`, async () => {
    let result = await runFilter({ index: { nin: [0, 2] } })

    expect(result.length).toEqual(1)
    result.forEach(edge => {
      expect(edge.index).not.toEqual(0)
      expect(edge.index).not.toEqual(2)
    })
  })

  it(`handles the nin operator for floats`, async () => {
    let result = await runFilter({ float: { nin: [1.5] } })

    expect(result.length).toEqual(2)
    result.forEach(edge => {
      expect(edge.float).not.toEqual(1.5)
    })
  })

  it(`handles the nin operator for booleans`, async () => {
    let result = await runFilter({ boolean: { nin: [true, null] } })

    expect(result.length).toEqual(1)
    expect(result[0].boolean).toBe(false)
  })

  it(`handles the glob operator`, async () => {
    let result = await runFilter({ name: { glob: `*Wax` } })

    expect(result.length).toEqual(2)
    expect(result[0].name).toEqual(`The Mad Wax`)
  })

  it(`filters date fields`, async () => {
    let result = await runFilter({ date: { ne: null } })

    expect(result.length).toEqual(2)
    expect(result[0].index).toEqual(0)
    expect(result[1].index).toEqual(2)
  })

  it(`handles the eq operator for array field values`, async () => {
    const result = await runFilter({ anArray: { eq: 5 } })

    expect(result.length).toBe(1)
    expect(result[0].index).toBe(1)
  })

  it(`handles the ne operator for array field values`, async () => {
    const result = await runFilter({ anArray: { ne: 1 } })

    expect(result.length).toBe(1)
    expect(result[0].index).toBe(2)
  })
})

describe(`collection fields`, () => {
  it(`sorts results`, async () => {
    let result = await runQuery({
      limit: 10,
      sort: {
        fields: [`frontmatter.blue`],
        order: [`desc`],
      },
    })

    expect(result.length).toEqual(3)
    expect(result[0].name).toEqual(`The Mad Wax`)
  })

  it(`sorts results with desc has null fields first`, async () => {
    let result = await runQuery({
      limit: 10,
      sort: {
        fields: [`waxOnly`],
        order: [`desc`],
      },
    })

    expect(result.length).toEqual(3)
    expect(result[0].id).toEqual(`0`)
    expect(result[1].id).toEqual(`2`)
    expect(result[2].id).toEqual(`1`)
  })

  it(`sorts results with asc has null fields last`, async () => {
    let result = await runQuery({
      limit: 10,
      sort: {
        fields: [`waxOnly`],
        order: [`asc`],
      },
    })

    expect(result.length).toEqual(3)
    expect(result[0].id).toEqual(`1`)
    expect(result[1].id).toEqual(`2`)
    expect(result[2].id).toEqual(`0`)
  })

  it(`applies specified sort order, and sorts asc by default`, async () => {
    let result = await runQuery({
      limit: 10,
      sort: {
        fields: [`frontmatter.blue`, `id`],
        order: [`desc`], // `id` field will be sorted asc
      },
    })

    expect(result.length).toEqual(3)
    expect(result[0].id).toEqual(`1`) // blue = 10010, id = 1
    expect(result[1].id).toEqual(`2`) // blue = 10010, id = 2
    expect(result[2].id).toEqual(`0`) // blue = 100, id = 0
  })

  it(`applies specified sort order per field`, async () => {
    let result = await runQuery({
      limit: 10,
      sort: {
        fields: [`frontmatter.blue`, `id`],
        order: [`desc`, `desc`], // `id` field will be sorted desc
      },
    })

    expect(result.length).toEqual(3)
    expect(result[0].id).toEqual(`2`) // blue = 10010, id = 2
    expect(result[1].id).toEqual(`1`) // blue = 10010, id = 1
    expect(result[2].id).toEqual(`0`) // blue = 100, id = 0
  })
})


text:
#!/usr/bin/env bash
#
#
#
# Runs a Hadoop hbase command as a daemon.
#
# Environment Variables
#
#   HBASE_CONF_DIR   Alternate hbase conf dir. Default is ${HBASE_HOME}/conf.
#   HBASE_LOG_DIR    Where log files are stored.  PWD by default.
#   HBASE_PID_DIR    The pid files are stored. /tmp by default.
#   HBASE_IDENT_STRING   A string representing this instance of hadoop. $USER by default
#   HBASE_NICENESS The scheduling priority for daemons. Defaults to 0.
#
# Modelled after $HADOOP_HOME/bin/hadoop-daemon.sh

usage="Usage: hbase-daemon.sh [--config <conf-dir>]\
 (start|stop) <hbase-command> \
 <args...>"

# if no args specified, show usage
if [ $# -le 1 ]; then
  echo $usage
  exit 1
fi

bin=`dirname "$0"`
bin=`cd "$bin"; pwd`

. "$bin"/hbase-config.sh

# get arguments
startStop=$1
shift

command=$1
shift

hbase_rotate_log ()
{
    log=$1;
    num=5;
    if [ -n "$2" ]; then
    num=$2
    fi
    if [ -f "$log" ]; then # rotate logs
    while [ $num -gt 1 ]; do
        prev=`expr $num - 1`
        [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
        num=$prev
    done
    mv "$log" "$log.$num";
    fi
}

if [ -f "${HBASE_CONF_DIR}/hbase-env.sh" ]; then
  . "${HBASE_CONF_DIR}/hbase-env.sh"
fi

# get log directory
if [ "$HBASE_LOG_DIR" = "" ]; then
  export HBASE_LOG_DIR="$HBASE_HOME/logs"
fi
mkdir -p "$HBASE_LOG_DIR"

if [ "$HBASE_PID_DIR" = "" ]; then
  HBASE_PID_DIR=/tmp
fi

if [ "$HBASE_IDENT_STRING" = "" ]; then
  export HBASE_IDENT_STRING="$USER"
fi

# some variables
export HBASE_LOGFILE=hbase-$HBASE_IDENT_STRING-$command-$HOSTNAME.log
export HBASE_ROOT_LOGGER="INFO,DRFA"
log=$HBASE_LOG_DIR/hbase-$HBASE_IDENT_STRING-$command-$HOSTNAME.out
pid=$HBASE_PID_DIR/hbase-$HBASE_IDENT_STRING-$command.pid

# Set default scheduling priority
if [ "$HBASE_NICENESS" = "" ]; then
    export HBASE_NICENESS=0
fi

case $startStop in

  (start)
    mkdir -p "$HBASE_PID_DIR"
    if [ -f $pid ]; then
      if kill -0 `cat $pid` > /dev/null 2>&1; then
        echo $command running as process `cat $pid`.  Stop it first.
        exit 1
      fi
    fi

    hbase_rotate_log $log
    echo starting $command, logging to $log
    nohup nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
        --config "${HBASE_CONF_DIR}" \
        $command $startStop "$@" > "$log" 2>&1 < /dev/null &
    echo $! > $pid
    sleep 1; head "$log"
    ;;

  (stop)
    if [ -f $pid ]; then
      if kill -0 `cat $pid` > /dev/null 2>&1; then
        echo -n stopping $command
        if [ "$command" = "master" ]; then
          nohup nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
              --config "${HBASE_CONF_DIR}" \
              $command $startStop "$@" > "$log" 2>&1 < /dev/null &
        else
          kill `cat $pid` > /dev/null 2>&1
        fi
        while kill -0 `cat $pid` > /dev/null 2>&1; do
          echo -n "."
          sleep 1;
        done
        echo
      else
        echo no $command to stop
      fi
    else
      echo no $command to stop
    fi
    ;;

  (*)
    echo $usage
    exit 1
    ;;

esac

redpajama_set_name: RedPajamaGithub


text:
package spring.corp.framework.utils;

import java.math.BigDecimal;

import spring.corp.framework.exceptions.ConverterException;

public class BigDecimalUtils implements IConverter<BigDecimal> {

	public static final BigDecimal CEM = BigDecimal.valueOf(100D);
	private static BigDecimalUtils instance = new BigDecimalUtils();

	private BigDecimalUtils(){}
	public static BigDecimalUtils getInstance(){
		return instance;
	}

	/**
	 * Metodo responsável por converter uma String em BigDecimal.
	 * @param value (String) O valor a ser convertido.
	 * @return (BigDecimal) valor convertido em BigDecimal ou nulo, caso o valor informado seja null.
	 * @exception ConverterException Caso ocorra alguma exceçãoo na conversão.
	 */
	public BigDecimal convert(String value) throws ConverterException {
		BigDecimal newBig = null;
		if (value != null && !value.equals("")) {
			try {
				newBig = FormatCurrency.parseCurrency(value);
			} catch (NumberFormatException e) {
				throw new ConverterException(this.getClass(), e);
			}
		}
		return newBig;
	}

	/**
	 * Transformar em String o valor BigDecimal
	 * @param value (BigDecimal) valor para conversão
	 * @param numberDecimalPlaces (int) número de casas decimais que a String deverá conter
	 * @return (String) valor convertido ou nulo, caso o valor informado seja null.
	 */
	public static String toString(BigDecimal value, int numberDecimalPlaces) {
		String newStr = null;
		if (value != null) {
			try {
				newStr = String.format("%." + numberDecimalPlaces + "f", value);
				int posCorte = newStr.lastIndexOf(".");
				if (posCorte >=0) {
					String decimal = newStr.substring(posCorte+1);
					if (decimal.length() > numberDecimalPlaces) {
						decimal = decimal.substring(0,numberDecimalPlaces);
						newStr = newStr.substring(0,posCorte) + "." + decimal;
					}
				}
			} catch (IllegalArgumentException e) {
				newStr = "0";
			}
		}
		return newStr;
	}

	/**
	 * Transforma em String o valor BigDecimal levando em consideracao as casas decimais<br />
	 * Caso o campo opcional seja true e valor informado seja zero, entao NULL sera retornado
	 * @param value (BigDecimal) valor a ser convertido
	 * @param numberDecimalPlaces (int) número de casas decimais que a String deverá conter
	 * @param optional (boolean) Indicativo se o campo eh opcional ou nao
	 * @return (String) valor convertido ou nulo, caso o valor informado seja null.
	 */
	public static String toString(BigDecimal value, int numberDecimalPlaces, boolean optional) {
		String newStr = null;
		boolean isOptionalAndValueZeroed = (optional && value != null && value.signum() == 0);
		if (isOptionalAndValueZeroed) {
			newStr = null;
		} else {
			newStr = toString(value, numberDecimalPlaces);
		}
		return newStr;
	}

	/**
	 * Verificar se o BigDecimal esta vazio
	 * @param value (BigDecimal) valor para verificação
	 * @return (boolean) true para BigDecimal vazio e false caso contrário
	 */
	public static boolean isBlank(BigDecimal value) {
		return (value == null || value.signum() == 0);
	}

	/**
	 * Verificar se todos os BigDecimal do array estão vazio
	 * @param values (BigDecimal[]) array de valores para verificação
	 * @return (boolean) true caso todos estejam vazio false caso algum não esteja
	 * @see spring.corp.framework.utils.BigDecimalUtils.isBlank(BigDecimal)
	 */
	public static boolean isAllBlank(BigDecimal[] values) {
		boolean and = true;
		for (BigDecimal value : values) {
			and = and && isBlank(value);
		}
		return and;
	}

	/**
	 * Converte Number em BigDecimal
	 * @param value (Number) valor para conversão
	 * @return (BigDecimal) valor convertido
	 */
	public static BigDecimal parseBigDecimal(Number value) {
        if (value != null) {
            if (value instanceof BigDecimal) {
                return (BigDecimal)value;
            } else if (value instanceof Long) {
                return new BigDecimal(((Long)value).longValue());
            } else if (value instanceof Integer) {
                return new BigDecimal(LongUtils.parseLong(value));
            }
        }
        return BigDecimal.ZERO;
    }

	/**
	 * Converte String em BigDecimal
	 * @param value (String) valor para conversão
	 * @return (BigDecimal) valor convertido
	 */
    public static BigDecimal parseBigDecimal(String value) {
        if (value != null) {
            return new BigDecimal(value);
        }
        return BigDecimal.ZERO;
    }
}


text:
#ifndef ShellSort_h
#define ShellSort_h

#include <stdio.h>

void ShellSort(int values[], int n);

#endif /* ShellSort_h */


text:
Rox = {

    /* Here we've just got some global level vars that persist regardless of State swaps */
    score: 0,

    /* If the music in your game needs to play through-out a few State swaps, then you could reference it here */
    music: null,

    /* Your game can check Rox.orientated in internal loops to know if it should pause or not */
    orientated: false

};

Rox.Boot = function (game) {
};

Rox.Boot.prototype = {

    preload: function () {

        this.load.image('preloaderBar', 'images/preload.png');

    },

    create: function () {

        // this.stage.smoothed = false;
        this.physics.startSystem(Phaser.Physics.ARCADE);
        this.input.maxPointers = 1;

        // this.stage.disableVisibilityChange = true;

        if (this.game.device.desktop)
        {
            this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
            this.scale.minWidth = 320;
            this.scale.minHeight = 200;
            this.scale.maxWidth = 800;
            this.scale.maxHeight = 600;
            this.scale.pageAlignHorizontally = true;
            this.scale.pageAlignVertically = true;
            this.scale.setScreenSize(true);
        }
        else
        {
            this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
            this.scale.minWidth = 480;
            this.scale.minHeight = 260;
            this.scale.maxWidth = 1024;
            this.scale.maxHeight = 768;
            this.scale.pageAlignHorizontally = true;
            this.scale.pageAlignVertically = true;
            this.scale.forceOrientation(true, false);
            this.scale.setResizeCallback(this.gameResized, this);
            this.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this);
            this.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this);
            this.scale.setScreenSize(true);
        }

        this.state.start('Preloader');

    },

    gameResized: function (width, height) {
    },

    enterIncorrectOrientation: function () {

        Rox.orientated = false;

        document.getElementById('orientation').style.display = 'block';

    },

    leaveIncorrectOrientation: function () {

        Rox.orientated = true;

        document.getElementById('orientation').style.display = 'none';

    }

};

Rox.Preloader = function (game) {

	this.background = null;
	this.preloadBar = null;

	this.ready = false;

};

Rox.Preloader.prototype = {

	preload: function () {

		this.preloadBar = this.add.sprite(0, 100, 'preloaderBar');

		this.load.setPreloadSprite(this.preloadBar);

		this.load.image('photonstorm', 'images/photonstorm.png');
		this.load.image('space', 'images/space.png');
		this.load.image('bullet', 'images/bullets.png');
		this.load.image('ship', 'images/ship.png');
		this.load.spritesheet('flash', 'images/muzzle-flash.png', 48, 48);
		this.load.image('asteroid1', 'images/asteroid1.png');
		this.load.image('asteroid2', 'images/asteroid2.png');
		this.load.image('asteroid3', 'images/asteroid3.png');

		// this.load.image('jets', 'images/jets.png');
		// this.load.image('jets', '../../examples/assets/particles/muzzleflash7.png');
		this.load.image('jets', 'images/smoke.png');

	},

	create: function () {

		this.state.start('Game');

	},

	update: function () {

		// if (this.cache.isSoundDecoded('titleMusic') && this.ready == false)
		// {
			// this.ready = true;
			// this.state.start('MainMenu');
		// }

	}

};

Rox.MainMenu = function (game) {

	this.music = null;
	this.playButton = null;

};

Rox.MainMenu.prototype = {

	create: function () {

		// this.music = this.add.audio('titleMusic');
		// this.music.play();
        this.add.image(390, 360, 'photonstorm');

        this.input.onDown.addOnce(this.startGame, this);

	},

	update: function () {

	},

	startGame: function (pointer) {

		// this.music.stop();

		//	And start the actual game
		this.state.start('Game');

	}

};

Rox.Player = function (game, x, y) {

    Phaser.Sprite.call(this, game, x, y, 'ship');

    this.anchor.set(0.5);

    //  Handy physics ref
    this.physics = game.physics.arcade;

    this.physics.enable(this);

    this.body.drag.set(100);
    this.body.maxVelocity.set(200);

    this.speed = 200;
    this.turnSpeed = 300;

    //  The flash of the guns as we fire them
    this.muzzle = new Phaser.Sprite(game, x, y, 'flash', 0);
    this.muzzle.anchor.set(0.5);

    this.muzzle.animations.add('fire1', [ 0, 1, 0 ], 30, false);
    this.muzzle.animations.add('fire2', [ 0, 2, 0 ], 30, false);
    this.muzzle.animations.add('fire3', [ 0, 3, 0 ], 30, false);
    this.muzzle.animations.add('fire4', [ 0, 4, 0 ], 30, false);

    //  Our bullets - this is a Phaser.Group that we manage from here
    this.bullets = new Rox.PlayerBullets(game, 50);

    //  The smoke trail following the player
    this.trail = new Phaser.Particles.Arcade.Emitter(game, 0, 0, 1000);
    this.trail.makeParticles('jets');
    // this.trail.setRotation(0, 0);
    this.trail.gravity = 0;
    this.trail.minParticleSpeed.set(-50, 50);
    this.trail.maxParticleSpeed.set(50, 100);
    this.trail.setAlpha(1, 0, 3000);
    // this.trail.setScale(2, 0, 2, 0, 3000); // great for jets
    this.trail.setScale(1, 0, 1, 0, 3000);

    this.isThrusting = false;

    return this;

}

Rox.Player.prototype = Object.create(Phaser.Sprite.prototype);
Rox.Player.prototype.constructor = Rox.Player;

Rox.Player.prototype.update = function () {

    //  Happens AFTER the State update
    this.game.world.wrap(this, 16);

    this.muzzle.x = this.x;
    this.muzzle.y = this.y;
    this.muzzle.rotation = this.rotation;

    this.trail.emitX = this.x;
    this.trail.emitY = this.y;

    var px = this.body.velocity.x;
    var py = this.body.velocity.y;

    px *= -1;
    py *= -1;

    this.trail.minParticleSpeed.set(px, py);
    this.trail.maxParticleSpeed.set(px, py);

    if (this.body.speed > 50 && !this.isThrusting)
    {
        this.trail.start(true, 3000, 8);
    }

    this.trail.forEachExists(this.game.world.wrap, this.game.world);

}

Rox.Player.prototype.zero = function () {

    this.body.acceleration.set(0);
    this.body.angularVelocity = 0;
    this.isThrusting = false;

}

Rox.Player.prototype.thrust = function () {

    this.physics.accelerationFromRotation(this.rotation, this.speed, this.body.acceleration);

    this.trail.start(true, 3000, 8);

    this.isThrusting = true;

}

Rox.Player.prototype.rotateLeft = function () {

    this.body.angularVelocity = -this.turnSpeed;

}

Rox.Player.prototype.rotateRight = function () {

    this.body.angularVelocity = this.turnSpeed;

}

Rox.Player.prototype.fire = function () {

    if (this.bullets.fire(this))
    {
        this.muzzle.play('fire1');
    }

}

Rox.PlayerBullets = function (game, quantity) {

    Phaser.Group.call(this, game);

    //  Handy physics ref
    this.physics = game.physics.arcade;

    this.enableBody = true;
    this.physicsBodyType = Phaser.Physics.ARCADE;

    //  The maximum number of bullets for the player
    this.createMultiple(quantity, 'bullet');

    this.setAll('anchor.x', 0.5);
    this.setAll('anchor.y', 0.5);

    this.fireRate = 100;
    this.bulletTime = 0;
    this.bulletSpeed = 400;
    this.bulletLifeSpan = 1500;

    return this;

}

Rox.PlayerBullets.prototype = Object.create(Phaser.Group.prototype);
Rox.PlayerBullets.prototype.constructor = Rox.PlayerBullets;

Rox.PlayerBullets.prototype.update = function () {

    this.forEachExists(this.game.world.wrap, this.game.world);

}

Rox.PlayerBullets.prototype.fire = function (player) {

    if (this.game.time.now >= this.bulletTime)
    {
        var bullet = this.getFirstExists(false);

        if (bullet)
        {
            bullet.reset(player.body.x + 16, player.body.y + 16);

            bullet.lifespan = this.bulletLifeSpan;
            bullet.rotation = player.rotation;

            this.physics.velocityFromRotation(player.rotation, this.bulletSpeed, bullet.body.velocity);

            this.bulletTime = this.game.time.now + this.fireRate;

            return true;
        }
    }

    return false;

}

Rox.Asteroid = function (game, x, y) {

    Phaser.Sprite.call(this, game, x, y, 'asteroid3');

    this.anchor.set(0.5);

    //  Handy physics ref
    this.physics = game.physics.arcade;

    this.physics.enable(this);

    this.body.velocity.x = 67;
    this.body.velocity.y = 139;
    this.body.angularVelocity = 30;

    this.speed = 100;

    return this;

}

Rox.Asteroid.prototype = Object.create(Phaser.Sprite.prototype);
Rox.Asteroid.prototype.constructor = Rox.Asteroid;

Rox.Asteroid.prototype.update = function () {

    //  Happens AFTER the State update
    this.game.world.wrap(this, 16);

}

Rox.Asteroid.prototype.zero = function () {
}

Rox.Game = function (game) {

	this.player;

	this.cursors;
	this.fireButton;

};

Rox.Game.prototype = {

	create: function () {

		this.player = new Rox.Player(this.game, 200, 200);

		var bg = this.add.tileSprite(0, 0, this.game.width, this.game.height, 'space');

		// this.add.existing(new Rox.Asteroid(this.game, 100, 100));

		this.add.existing(this.player.trail);
		this.add.existing(this.player.bullets);
		this.add.existing(this.player.muzzle);
		this.add.existing(this.player);

		//	Still think maybe this ought to be inside the Player class
		this.cursors = this.input.keyboard.createCursorKeys();
		this.fireButton = this.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);

		this.world.sendToBack(bg);

	},

	update: function () {

	    this.player.zero();

	    if (this.cursors.up.isDown)
	    {
	    	this.player.thrust();
	    }

	    if (this.cursors.left.isDown)
	    {
	    	this.player.rotateLeft();
	    }
	    else if (this.cursors.right.isDown)
	    {
	    	this.player.rotateRight();
	    }

	    if (this.fireButton.isDown)
	    {
	    	this.player.fire();
	    }

	},

    gameOver: function () {
    },

	quitGame: function () {

		this.state.start('MainMenu');

	}

};


text:
//
//  Graph.h
//  latenttree

#ifndef __latentTree__Graph__
#define __latentTree__Graph__
#include "Eigen/Dense"
#include "Eigen/Sparse"
#include "Eigen/Core"
#include "Eigen/OrderingMethods"
#include "Eigen/SparseQR"
#include "Node.h"

using namespace Eigen;
using namespace std;

class Graph
{
public:
	// constructor
	Graph(vector<Edge *> neighbors);
	//Graph(vector<Edge> neighbors);
	Graph(vector<Node *> neighbors, Node * surNode);
	// destructor
	~Graph();
	// display
	void displayadj_edgeD(char * filename1, char * filename2, char * filename3, char * filename4);

	// get values
	int  readnum_N() const; // numner of observable variables.
	int readnum_H() const; // number of hidden varaibles; dynamically update num_H;
	Node * readsur() const;
	vector<vector<Node *> > readadj() const;
	vector<vector<double> > readedgeD() const;
	vector<Node*> readnodeset() const;
	vector<vector<Eigen::SparseMatrix<double > > > readedgePot() const;
	double readedgeD_oneval(Node *a, Node *b) const;

	//
	Eigen::SparseMatrix<double> estimateCategory();

	// dynamically add Edge
	void addEdge(Edge *myedge);
	// select the shortestPath
	vector<Node *> shortestPath(Node *v, Node *w);
	void deleteEdge(Node *a, Node *b);

private:
	Node * surrogate;
	vector<Node *> nodeset;
	vector<vector<Node *> > adj;
	vector<vector<double> > edgeD;
	vector<vector<Eigen::SparseMatrix<double > > > edgePot;
	int num_N;
	int num_H;
};
#endif


text:
@interface Router : NSObject
@property(nonatomic, strong) Class viewControllerClass;
@property(nonatomic, strong) NSArray* params;
@end

@implementation Router
@end

static NSMutableDictionary<NSString*, Router*> *RouterMap;
NSMutableDictionary<NSString*, Router*> *GetRouterMap(void)
{
    return RouterMap;
}

void RouterRegister(Class class, NSString* params, ...);
void RouterRegister(Class class, NSString* params, ...)
{
    NSCAssert([NSThread currentThread] == [NSThread mainThread], @"必须在主线程初始化");
    if (class == nil || !class_conformsToProtocol(class, @protocol(QDeepLinkProtocol))) {
        return;
    }
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        RouterMap = [NSMutableDictionary new];
    });

    NSString* routerName = params;
    NSMutableArray *paramArray = [NSMutableArray array];
    va_list args;
    va_start(args, params);
    {
        NSString* arg;
        while ((arg = va_arg(args, NSString *))) {
            [paramArray addObject:arg];
        }
    }
    va_end(args);

    Router* router = [[Router alloc] init];
    router.params = paramArray;
    router.viewControllerClass = class;

    [RouterMap setObject:router forKey:routerName];
}

@implementation QDRouter {
    NSMutableSet* _schemes;
    NSMutableSet* _hosts;
    __weak UINavigationController* _defaultNavigator;
    QDRouterFail _routeFailBlock;
}

-(void)onServiceInit {
    _schemes = [NSMutableSet new];
    _hosts = [NSMutableSet new];
}

-(QDRouter *)addScheme:(NSString *)scheme, ... {
    if (scheme) {
        [_schemes addObject:[scheme lowercaseString]];
        va_list args;
        va_start(args, scheme);
        NSString *eachScheme;
        while ((eachScheme = va_arg(args, NSString *))) {
            [_schemes addObject:[eachScheme lowercaseString]];
        }
        va_end(args);
    }
    return self;
}

-(QDRouter *)addHost:(NSString *)host, ... {
    if (host) {
        [_hosts addObject:[host lowercaseString]];
        va_list args;
        va_start(args, host);
        NSString *eachHost;
        while ((eachHost = va_arg(args, NSString *))) {
            [_hosts addObject:[eachHost lowercaseString]];
        }
        va_end(args);
    }
    return self;
}

-(QDRouter *)setDefaultNavigation:(UINavigationController *)naviController {
    _defaultNavigator = naviController;
    return self;
}

-(QDRouter *)setRouteFailBlock:(QDRouterFail)fail {
    _routeFailBlock = fail;
    return self;
}

- (BOOL) pushURLStr:(NSString*)url navigationController:(UINavigationController*) viewController {
    return [self pushURL:[url qd_toURL] navigationController:viewController];
}

- (BOOL) presentURLStr:(NSString*)url viewcontroller:(UIViewController*) viewController {
    return [self presentURL:[url qd_toURL] viewcontroller:viewController];
}

- (BOOL) pushURL:(NSURL*)url navigationController:(UINavigationController*) viewController {
    if (!viewController) {
        viewController = _defaultNavigator;
    }
    if (url) {
        NSString* scheme = url.scheme;
        NSString* host = url.host;
        NSString* routeName = url.qd_firstPath;

        BOOL result = NO;
        if ([self->_schemes containsObject:[scheme lowercaseString]] && [self->_hosts containsObject:[host lowercaseString]]) {
            result = [self push:routeName params:url.qd_parameters navigationController:viewController];
        }
        if (!result && _routeFailBlock) {
            result = _routeFailBlock(url, viewController, NO);
        }
        return result;
    }
    return NO;
}

- (BOOL) presentURL:(NSURL*)url viewcontroller:(UIViewController*) viewController {
    if (!viewController) {
        viewController = _defaultNavigator;
    }
    if (url) {
        NSString* scheme = url.scheme;
        NSString* host = url.host;
        NSString* routeName = url.qd_firstPath;

        BOOL result;
        if ([self->_schemes containsObject:[scheme lowercaseString]] && [self->_hosts containsObject:[host lowercaseString]]) {
            result = [self present:routeName params:url.qd_parameters viewcontroller:viewController];
        }
        if (!result && _routeFailBlock) {
            result = _routeFailBlock(url, viewController, YES);
        }
        return result;
    }
    return NO;
}

- (BOOL) push:(NSString*)routerName params:(NSDictionary*)params navigationController:(UINavigationController*) viewController {
    if (!viewController) {
        viewController = _defaultNavigator;
    }
    UIViewController* newVC = [self matchViewController:routerName params:params];
    if (newVC && viewController && [viewController isKindOfClass:[UINavigationController class]]) {
        [viewController pushViewController:newVC animated:YES];
        return YES;
    }

    return NO;
}

- (BOOL) present:(NSString*)routerName params:(NSDictionary*)params viewcontroller:(UIViewController*) viewController {
    if (!viewController) {
        viewController = _defaultNavigator;
    }
    UIViewController* newVC = [self matchViewController:routerName params:params];
    if (newVC && viewController) {
        [viewController presentViewController:newVC animated:YES completion:nil];
        return YES;
    }
    return NO;
}

- (UIViewController*) matchViewControllerURLStr:(NSString*)url {
    return [self matchViewControllerURL:[NSURL URLWithString:url]];
}

- (UIViewController*) matchViewControllerURL:(NSURL*)url {
    if (url) {
        NSString* scheme = url.scheme;
        NSString* host = url.host;
        NSString* routeName = url.qd_firstPath;
        if ([self->_schemes containsObject:[scheme lowercaseString]] && [self->_hosts containsObject:[host lowercaseString]]) {
            return [self matchViewController:routeName params:url.qd_parameters];
        }
    }
    return nil;
}

- (UIViewController*) matchViewController:(NSString*)routerName params:(NSDictionary*)params {
    if (routerName) {
        Router* router = GetRouterMap()[routerName];
        if (router != nil) {
            for (NSString* key in router.params) {
                if (params[key] == nil || (![params[key] isKindOfClass:[NSNumber class]] && ![params[key] isKindOfClass:[NSString class]])) {
                    return nil;
                }
            }
            return [[router.viewControllerClass alloc] initWithURLParams:params];
        }
    }
    return nil;
}

@end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" href="assets/css/bootstrap.min.css">

      <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">

      </button>
      i♥Cactus

Hello, world!

 I love ♥ Cactus.

Cactus

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

Last updated 3 mins ago

Lithops

This card has supporting text below as a natural lead-in to additional content.

Last updated 3 mins ago

Haworthia

This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.

Last updated 3 mins ago

	  © Copyright 2017


text:
// Copyright 2014 Google Inc. All rights reserved.
//
// 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.google.devtools.build.lib.rules.java;

import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration.Fragment;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration.StrictDepsMode;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.analysis.config.InvalidConfigurationException;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.EventHandler;
import com.google.devtools.build.lib.syntax.Label;
import com.google.devtools.build.lib.syntax.Label.SyntaxException;
import com.google.devtools.build.lib.syntax.SkylarkCallable;
import com.google.devtools.build.lib.syntax.SkylarkModule;
import com.google.devtools.common.options.TriState;

import java.util.List;

/**
 * A java compiler configuration containing the flags required for compilation.
 */
@Immutable
@SkylarkModule(name = "java_configuration", doc = "A java compiler configuration")
public final class JavaConfiguration extends Fragment {
  /**
   * Values for the --experimental_java_classpath option
   */
  public static enum JavaClasspathMode {
    /** Use full transitive classpaths, the default behavior. */
    OFF,
    /** JavaBuilder computes the reduced classpath before invoking javac. */
    JAVABUILDER,
    /** Blaze computes the reduced classpath before invoking JavaBuilder. */
    BLAZE
  }

  private final ImmutableList<String> commandLineJavacFlags;
  private final Label javaLauncherLabel;
  private final Label javaBuilderTop;
  private final ImmutableList<String> defaultJavaBuilderJvmOpts;
  private final Label javaLangtoolsJar;
  private final boolean useIjars;
  private final boolean generateJavaDeps;
  private final JavaClasspathMode experimentalJavaClasspath;
  private final ImmutableList<String> javaWarns;
  private final ImmutableList<String> defaultJvmFlags;
  private final ImmutableList<String> checkedConstraints;
  private final StrictDepsMode strictJavaDeps;
  private final Label javacBootclasspath;
  private final Label javacExtdir;
  private final ImmutableList<String> javacOpts;
  private final TriState bundleTranslations;
  private final ImmutableList<Label> translationTargets;
  private final String javaCpu;

  private final String cacheKey;
  private Label javaToolchain;

  JavaConfiguration(boolean generateJavaDeps,
      List<String> defaultJvmFlags, JavaOptions javaOptions, Label javaToolchain, String javaCpu,
      ImmutableList<String> defaultJavaBuilderJvmOpts) throws InvalidConfigurationException {
    this.commandLineJavacFlags =
        ImmutableList.copyOf(JavaHelper.tokenizeJavaOptions(javaOptions.javacOpts));
    this.javaLauncherLabel = javaOptions.javaLauncher;
    this.javaBuilderTop = javaOptions.javaBuilderTop;
    this.defaultJavaBuilderJvmOpts = defaultJavaBuilderJvmOpts;
    this.javaLangtoolsJar = javaOptions.javaLangtoolsJar;
    this.useIjars = javaOptions.useIjars;
    this.generateJavaDeps = generateJavaDeps;
    this.experimentalJavaClasspath = javaOptions.experimentalJavaClasspath;
    this.javaWarns = ImmutableList.copyOf(javaOptions.javaWarns);
    this.defaultJvmFlags = ImmutableList.copyOf(defaultJvmFlags);
    this.checkedConstraints = ImmutableList.copyOf(javaOptions.checkedConstraints);
    this.strictJavaDeps = javaOptions.strictJavaDeps;
    this.javacBootclasspath = javaOptions.javacBootclasspath;
    this.javacExtdir = javaOptions.javacExtdir;
    this.javacOpts = ImmutableList.copyOf(javaOptions.javacOpts);
    this.bundleTranslations = javaOptions.bundleTranslations;
    this.javaCpu = javaCpu;
    this.javaToolchain = javaToolchain;

    ImmutableList.Builder<Label> translationsBuilder = ImmutableList.builder();
    for (String s : javaOptions.translationTargets) {
      try {
        Label label = Label.parseAbsolute(s);
        translationsBuilder.add(label);
      } catch (SyntaxException e) {
        throw new InvalidConfigurationException("Invalid translations target '" + s + "', make " +
            "sure it uses correct absolute path syntax.", e);
      }
    }
    this.translationTargets = translationsBuilder.build();

    this.cacheKey = Joiner.on(" ").join(commandLineJavacFlags);
  }

  @SkylarkCallable(name = "default_javac_flags", structField = true,
      doc = "The default flags for the Java compiler.")
  // TODO(bazel-team): this is the command-line passed options, we should remove from skylark
  // probably.
  public List<String> getDefaultJavacFlags() {
    return commandLineJavacFlags;
  }

  @Override
  public String cacheKey() {
    return cacheKey;
  }

  @Override
  public void reportInvalidOptions(EventHandler reporter, BuildOptions buildOptions) {
    if ((bundleTranslations == TriState.YES) && translationTargets.isEmpty()) {
      reporter.handle(Event.error("Translations enabled, but no message translations specified. " +
          "Use '--message_translations' to select the message translations to use"));
    }
  }

  @Override
  public void addGlobalMakeVariables(Builder<String, String> globalMakeEnvBuilder) {
    globalMakeEnvBuilder.put("JAVA_TRANSLATIONS", buildTranslations() ? "1" : "0");
    globalMakeEnvBuilder.put("JAVA_CPU", javaCpu);
  }

  /**
   * Returns the Java cpu.
   */
  public String getJavaCpu() {
    return javaCpu;
  }

  /**
   * Returns the default javabuilder jar
   */
  public Label getDefaultJavaBuilderJar() {
    return javaBuilderTop;
  }

  /**
   * Returns the default JVM flags to be used when invoking javabuilder.
   */
  public ImmutableList<String> getDefaultJavaBuilderJvmFlags() {
    return defaultJavaBuilderJvmOpts;
  }

  /**
   * Returns the default java langtools jar
   */
  public Label getDefaultJavaLangtoolsJar() {
    return javaLangtoolsJar;
  }

  /**
   * Returns true iff Java compilation should use ijars.
   */
  public boolean getUseIjars() {
    return useIjars;
  }

  /**
   * Returns true iff dependency information is generated after compilation.
   */
  public boolean getGenerateJavaDeps() {
    return generateJavaDeps;
  }

  public JavaClasspathMode getReduceJavaClasspath() {
    return experimentalJavaClasspath;
  }

  /**
   * Returns the extra warnings enabled for Java compilation.
   */
  public List<String> getJavaWarns() {
    return javaWarns;
  }

  public List<String> getDefaultJvmFlags() {
    return defaultJvmFlags;
  }

  public List<String> getCheckedConstraints() {
    return checkedConstraints;
  }

  public StrictDepsMode getStrictJavaDeps() {
    return strictJavaDeps;
  }

  public StrictDepsMode getFilteredStrictJavaDeps() {
    StrictDepsMode strict = getStrictJavaDeps();
    switch (strict) {
      case STRICT:
      case DEFAULT:
        return StrictDepsMode.ERROR;
      default:   // OFF, WARN, ERROR
        return strict;
    }
  }

  /**
   * @return proper label only if --java_launcher= is specified, otherwise null.
   */
  public Label getJavaLauncherLabel() {
    return javaLauncherLabel;
  }

  public Label getJavacBootclasspath() {
    return javacBootclasspath;
  }

  public Label getJavacExtdir() {
    return javacExtdir;
  }

  public List<String> getJavacOpts() {
    return javacOpts;
  }

  @Override
  public String getName() {
    return "Java";
  }

  /**
   * Returns the raw translation targets.
   */
  public List<Label> getTranslationTargets() {
    return translationTargets;
  }

  /**
   * Returns true if the we should build translations.
   */
  public boolean buildTranslations() {
    return (bundleTranslations != TriState.NO) && !translationTargets.isEmpty();
  }

  /**
   * Returns whether translations were explicitly disabled.
   */
  public boolean isTranslationsDisabled() {
    return bundleTranslations == TriState.NO;
  }

  /**
   * Returns the label of the default java_toolchain rule
   */
  public Label getToolchainLabel() {
    return javaToolchain;
  }
}


text:
require 'spec_helper'

describe Obviews::ExposedAssigns do
  let(:object) { double('object', :a_method => 'a value') }

  it 'lazily calls methods' do
    exposed_assigns = described_class.new object, [:a_method]
    object.should_receive :a_method
    exposed_assigns[:a_method]
  end

  it 'returns the value' do
    exposed_assigns = described_class.new object, [:a_method]
    exposed_assigns[:a_method].should eq('a value')
  end

  it 'memoizes the value' do
    exposed_assigns = described_class.new object, [:a_method]
    exposed_assigns[:a_method]

    object.should_not_receive :a_method
    exposed_assigns[:a_method]
  end

  describe '#keys' do
    context 'with merged hash' do
      it 'has keys from both' do
        exposed_assigns = described_class.new object, [:a_method]
        exposed_assigns.merge! :another_method => 'another value'
        exposed_assigns.keys.should include(:another_method)
        exposed_assigns.keys.should include(:a_method)
      end
    end
  end
end


text:
export declare const POLYDATA_FIELDS : string[];

declare const _default: {
	POLYDATA_FIELDS: typeof POLYDATA_FIELDS;
};
export default _default;


text:
\Section{notes}{Notes}
With apologies for the scattered format

\paragraph{Approach:}
\begin{itemize}
%  \item We tackle two big problems with OpenIE:
%    \begin{enumerate}
%      \item Relations can be embedded in more complex syntactic relations;
%        for example, between a subject and the object of a subordinate
%        clause, or the object of a prepositional phrase.
%        For example, in:
%        \w{Born in Honolulu, Hawaii, Obama is a graduate of Columbia University and Harvard Law School}
%        the verb `Born' has an incoming, not outgoing edge to Obama.
%        Similarly:
%        \w{Waldheim left the U.N. in 1982 and served as a visiting professor.}
%        We have a path `left' $\rightarrow$ served $\rightarrow$ professor.
%        This I actually do pretty good with -- we have some nice examples
%        (like the above two) that I get right.
%
%      \item OpenIE often ignores relevant context in the surrounding
%        sentence. For example, \w{Chris is friends with Fei-Fei}, we would
%        not want to extract the ``Chris be friend''.
%        Honestly, I'm not sure there are many cases where we prohibit such
%        an extraction, but we do penalize them with reasonable accuracy.
%    \end{enumerate}

  \item For clause splitting, we define a class of actions
    (split on dependency arc, split on dependency arc and take the subject,
    split on dependency arc and take the entire parent), and use that to
    recursively break the sentence into smaller and smaller chunks.

  \item This process isn't well suited for rules, primarily because of the
    ambiguity of when the subject wants to migrate into the subordinate
    clause. Mistakes both ways are bad: consider extracting the clause
    \w{Born in Honolulu, Hawaii} and pretending it's a coherent sentence.

  \item To learn the clause splitting rules, we need training data.
    We take inspiration from distant supervision (like a good
    indoctrinated Stanford kid), and assume that clause splits that cause
    us to extract relations are good splits.

    The KBP data lends itself naturally to this kind of task, so we both
    train and evaluate on it. But, importantly, the relations are not
    in any way tied to KBP -- we just assume that clauses that express
    KBP relations are likely to be clauses that express the other relations
    we care about.

    Importantly, this is a twice-noisy dataset: first, we only have limited
    annotations for any relations in text, and so we complement the annotations
    we have with a large distantly supervised set of sentences (distantly supervised
    in the conventional sense).
    Second, we know neither whether (1) the relation in the sentence can be captured
    via the class of actions we are splitting on, and (2) whether if we find another
    clause in the sentence this should be a negative example, or just happens to be
    another relation.

  \item There's a bit of learning of the mapping from OpenIE to KBP
    relations in there too. Nothing really fancy, but it turns out
    taking the PMI$^2$ between OpenIE and KBP relations works pretty OK,
    and with Greenplum we have the global statistics to compute it well
    (i.e., we know the empirical P(kbp\_relation) and P(openie\_relation) --
    which we've never actually had before).
    Nonetheless, a good portion of our leverage is from the hard-coded
    translations, adapted from our rule set.
    It didn't take me much (if any) longer than the 3 hours UW claims,
    and by pure necessity it can't possibly take me longer than their
    2 week system.

  \item A bit of a random note:
      we split the space of possible relations we're extracting into two classes:
      ``verb-y'' relations, and ``state-y'' relations. The first of these
      generally pivots around a verb; the second, around a dependency
      arc or a prepositional phrase. For example:
      \w{Chris Manning works at Stanford} versus
      \w{Chris Manning of Stanford}.
      Particularly relevant is that people tend to have their KBP relations
      expressed with verbs; organizations tend to have theirs expressed
      in terms of state (\w{Apple in Cupertino released $\dots$},
      \w{The CS department at Stanford $\dots$}, etc.).

      I don't think this is a new insight (UW has been saying it for
      a while), but nonetheless they don't extract anything for phrases
      like \w{Chancellor Merkel of Germany} and that's kind of awful -- two
      whole relations in there!
\end{itemize}

\paragraph{Contributions}
\begin{itemize}
  \item I split the task differently. I only need a small number of
        patterns, and put the rest of the work in the clause splitting.
        The main advantage of this, that I can think of, is that I also
        produce coherent sentence fragments rather than triples.

  \item I can tout the benefits of natural logic again.
        For the sentence \w{blue cats have tails}, Ollie will extract
        (blue cats, have, tails), while I'll also get that
        (cats, have, tails).
        Whereas, for \w{no blue cats have tails}, Ollie will still get
        (no blue cats, have, tails), and I extract nothing (correctly,
        I think -- I reject that ``no blue cats'' is a meaningful mention).

        In line with this, I do think I do better at providing more reliable
        atomic arguments. For example:
        \w{Chancellor Merkel of Germany visited China yesterday} gets parsed
        by Ollie as (Chancellor Merkel of Germany, visit, China).

        Similarly, Ollie completely fails at
        \w{Furry cats, who drink milk, play with yarn}:
        (milk, be play with, yarn), whereas we correctly get
        (cat, play with yarn) -- and I guess with low confidence
        (who, drink, milk), but let's not talk about that one...

  \item I evaluate on a real dataset, and show good performance.
        We're about to run OpenIE 4 on the same dataset -- if that gets good
        performance too, I guess I can talk about how great the relation
        mapping learning is, and that model combination works well?
\end{itemize}

%\paragraph{contributions:}
%\begin{itemize}
%  \item An approach to process a large sentence into simpler, logically
%    entailed chunks, which can be used even independently of the triple
%    format of OpenIE. This also, in effect, allows us to capture more
%    complicated dependency patterns by first splitting (which mutates
%    the tree) and then applying the simple patterns
%
%  \item An OpenIE system that's a bit more sensitive to context, particularly
%    dropping PPs and direct objects (from \w{Obama signed the bill}
%    it may not necessarily be useful to entail \w{Obama signed}).
%
%  \item We (hopefully) beat UW on the KBP dataset. Their 2013 numbers are
%    17.7 F$_1$; we're between 11.8 (on 2012) and 18.12 (on 2010) currently.
%    But, we're missing a fifth of the annotated documents (rerunning with
%    Wikifier), as well as all of the prep\_* edges out of organizations.
%    Both should help a bit, plus I still have a week of debugging time.
%\end{itemize}

%\paragraph{Help!}
%So, as it turns out, most of the supposed improvements of this paper are
%  also in Ollie.
%They also learn long-range dependencies, by simply extracting more patterns
%  and learning which ones are correct.
%I haven't yet found an example of a pattern we get that they don't.
%I can try to make claims about being higher precision, but I don't put a
%  high probability on that panning out significantly in the results.
%
%Being aware of context, in turn, is also in Ollie.
%They have both an attribution module (for things like ``X said that triple'')
%  and try to lexicalize on patterns which are low precision to avoid the same
%  kinds of PP dropping that I'm avoiding.
%I suspect this makes the abstract as written pretty much wrong.
%
%Open IE can be viewed as a \textit{bottom up} approach to extracting
%  atomic relation triples.
%Given the surface form of the sentence, and often additional annotations
%  such as dependency trees or semantic role labelling frames,
%  most systems will eagerly extract any matching pattern ignoring most
%  or all of the context around it.
%This is similar in spirit to most ``closed'' domain relation extractors,
%  where a pair of mentions is classified into the relation between them
%  based primarily on the basis of very local contexts around the mentions.


text:
// XLA-specific Ops for FFT.

#include "tensorflow/compiler/tf2xla/mlir_xla_op_kernel.h"
#include "tensorflow/compiler/tf2xla/xla_helpers.h"
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
#include "tensorflow/compiler/xla/client/xla_builder.h"
#include "tensorflow/compiler/xla/literal_util.h"
#include "tensorflow/compiler/xla/util.h"
#include "tensorflow/core/framework/bounds_check.h"
#include "tensorflow/core/framework/numeric_op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/ops_util.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/tensor_slice.h"
#include "tensorflow/core/util/padding.h"
#include "tensorflow/core/util/tensor_format.h"

namespace tensorflow {

namespace {

using xla::FftType;

class GenericFftOp : public XlaOpKernel {
 public:
  explicit GenericFftOp(OpKernelConstruction* ctx, FftType fft_type,
                        int fft_rank)
      : XlaOpKernel(ctx), fft_type_(fft_type), fft_rank_(fft_rank) {}

  void Compile(XlaOpKernelContext* ctx) override {
    const TensorShape input_shape = ctx->InputShape(0);
    OP_REQUIRES(
        ctx, TensorShapeUtils::IsVectorOrHigher(input_shape),
        errors::InvalidArgument("input must be at least 1 dimensional"));

    std::vector<int64_t> fft_length;
    xla::XlaOp input = ctx->Input(0);
    if (fft_type_ == FftType::RFFT || fft_type_ == FftType::IRFFT) {
      OP_REQUIRES_OK(ctx, ctx->ConstantInputAsIntVector(1, &fft_length));
      OP_REQUIRES(ctx, fft_length.size() == fft_rank_,
                  errors::InvalidArgument("fft_length must be length ",
                                          fft_rank_, " vector"));

      // Zero pad or truncate the axes we're doing FFT on.
      absl::InlinedVector<int64_t, 4> slice_sizes = input_shape.dim_sizes();
      std::vector<std::pair<int64_t, int64_t>> padding_sizes(
          slice_sizes.size());
      std::vector<int64_t> expected_sizes = fft_length;
      // IRFFT wants the innermost axis to be n / 2 + 1.
      if (fft_type_ == FftType::IRFFT) {
        expected_sizes[fft_rank_ - 1] = fft_length[fft_rank_ - 1] / 2 + 1;
      }
      for (int i = 0; i < fft_rank_; i++) {
        int index = input_shape.dims() - fft_rank_ + i;
        OP_REQUIRES(
            ctx,
            input_shape.dim_size(index) == 0 ||
                input_shape.dim_size(index) >= expected_sizes[i],
            errors::InvalidArgument(
                "Input dimension ", index, " must have length of at least ",
                expected_sizes[i], " but got: ", input_shape.dim_size(index)));
        if (input_shape.dim_size(index) > expected_sizes[i]) {
          slice_sizes[index] = expected_sizes[i];
        } else {
          padding_sizes[index].second =
              expected_sizes[i] - input_shape.dim_size(index);
        }
      }

      std::vector<int64_t> start_indices(input_shape.dims(), 0);
      std::vector<int64_t> strides(input_shape.dims(), 1);
      input = xla::Pad(xla::Slice(input, start_indices, slice_sizes, strides),
                       XlaHelpers::Zero(ctx->builder(), ctx->input_type(0)),
                       xla::MakeEdgePaddingConfig(padding_sizes));
    } else {
      // Innermost axis provides the FFT length.
      for (int i = 0; i < fft_rank_; i++) {
        fft_length.push_back(
            input_shape.dim_size(input_shape.dims() - fft_rank_ + i));
      }
    }

    xla::XlaOp fft = xla::Fft(input, fft_type_, fft_length);
    ctx->SetOutput(0, fft);
  }

 protected:
  const FftType fft_type_;
  const int fft_rank_;

 private:
  TF_DISALLOW_COPY_AND_ASSIGN(GenericFftOp);
};

template <int FFTRank>
class FFTOp : public GenericFftOp {
 public:
  explicit FFTOp(OpKernelConstruction* ctx)
      : GenericFftOp(ctx, /*fft_type=*/FftType::FFT, /*fft_rank=*/FFTRank) {}
};
REGISTER_XLA_OP(Name("FFT").TypeConstraint("Tcomplex", DT_COMPLEX64), FFTOp<1>);
REGISTER_XLA_OP(Name("FFT2D").TypeConstraint("Tcomplex", DT_COMPLEX64),
                FFTOp<2>);
REGISTER_XLA_OP(Name("FFT3D").TypeConstraint("Tcomplex", DT_COMPLEX64),
                FFTOp<3>);

template <int FFTRank>
class IFFTOp : public GenericFftOp {
 public:
  explicit IFFTOp(OpKernelConstruction* ctx)
      : GenericFftOp(ctx, /*fft_type=*/FftType::IFFT, /*fft_rank=*/FFTRank) {}
};
REGISTER_XLA_OP(Name("IFFT").TypeConstraint("Tcomplex", DT_COMPLEX64),
                MlirXlaOpKernel);
REGISTER_XLA_OP(Name("IFFT2D").TypeConstraint("Tcomplex", DT_COMPLEX64),
                IFFTOp<2>);
REGISTER_XLA_OP(Name("IFFT3D").TypeConstraint("Tcomplex", DT_COMPLEX64),
                IFFTOp<3>);

template <int FFTRank>
class RFFTOp : public GenericFftOp {
 public:
  explicit RFFTOp(OpKernelConstruction* ctx)
      : GenericFftOp(ctx, /*fft_type=*/FftType::RFFT, /*fft_rank=*/FFTRank) {}
};
REGISTER_XLA_OP(Name("RFFT")
                    .TypeConstraint("Treal", DT_FLOAT)
                    .TypeConstraint("Tcomplex", DT_COMPLEX64)
                    .CompileTimeConstantInput("fft_length"),
                RFFTOp<1>);
REGISTER_XLA_OP(Name("RFFT2D")
                    .TypeConstraint("Treal", DT_FLOAT)
                    .TypeConstraint("Tcomplex", DT_COMPLEX64)
                    .CompileTimeConstantInput("fft_length"),
                RFFTOp<2>);
REGISTER_XLA_OP(Name("RFFT3D")
                    .TypeConstraint("Treal", DT_FLOAT)
                    .TypeConstraint("Tcomplex", DT_COMPLEX64)
                    .CompileTimeConstantInput("fft_length"),
                RFFTOp<3>);

template <int FFTRank>
class IRFFTOp : public GenericFftOp {
 public:
  explicit IRFFTOp(OpKernelConstruction* ctx)
      : GenericFftOp(ctx, /*fft_type=*/FftType::IRFFT, /*fft_rank=*/FFTRank) {}
};
REGISTER_XLA_OP(Name("IRFFT")
                    .TypeConstraint("Treal", DT_FLOAT)
                    .TypeConstraint("Tcomplex", DT_COMPLEX64)
                    .CompileTimeConstantInput("fft_length"),
                IRFFTOp<1>);
REGISTER_XLA_OP(Name("IRFFT2D")
                    .TypeConstraint("Treal", DT_FLOAT)
                    .TypeConstraint("Tcomplex", DT_COMPLEX64)
                    .CompileTimeConstantInput("fft_length"),
                IRFFTOp<2>);
REGISTER_XLA_OP(Name("IRFFT3D")
                    .TypeConstraint("Treal", DT_FLOAT)
                    .TypeConstraint("Tcomplex", DT_COMPLEX64)
                    .CompileTimeConstantInput("fft_length"),
                IRFFTOp<3>);

}  // namespace
}  // namespace tensorflow


text:
package com.scut.gof.coordinator.main.animation;

import android.graphics.Camera;
import android.graphics.Matrix;
import android.view.animation.Animation;
import android.view.animation.Transformation;

/**
 * Created by Administrator on 2015/9/8.
 */
public class XRotationAnimation extends Animation {
    private float centerX,centerY;
    private Camera mCamera;
    public XRotationAnimation (){
        mCamera=new Camera();
    }

    @Override
    public void initialize(int width, int height, int parentWidth, int parentHeight) {
        super.initialize(width, height, parentWidth, parentHeight);
        centerX=width/2f;
        centerY=height/2f;
        setDuration(1000);
        setFillAfter(true);
    }

    @Override
    protected void applyTransformation(float interpolatedTime, Transformation t) {
        Matrix matrix=t.getMatrix();
        mCamera.save();//保存参数,与restore出现成对
        mCamera.rotateX(720 * interpolatedTime);
        mCamera.getMatrix(matrix);//将camera的旋转效果附加到matrix
        matrix.preTranslate(-centerX, -centerY);
        matrix.postTranslate(centerX, centerY);//这两个用于标示中心点,涉及矩阵计算,暂不深究
        mCamera.restore();
    }
}


text:
module Spree
  Promotion.class_eval do
    translates :name, :description, :fallbacks_for_empty_translations => true
    include SpreeI18n::Translatable
  end
end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>playbuzz examples</title>
    <link rel="canonical" href="amps.html">
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">

Times.com

Some Article

        orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus felis
        arcu, vehicula sed pretium eget, pulvinar eu elit. Ut nibh nulla,
        pharetra at tristique at, pharetra et mi. Ut elementum quam eu feugiat
        varius. Vestibulum dui ligula, dapibus at suscipit venenatis, elementum
        vitae libero. Vivamus efficitur nibh et tortor semper, sit amet interdum
        augue tempor. Nulla vitae tempus dolor, ac molestie odio. Cras cursus,
        lectus ac consectetur scelerisque, mi arcu egestas velit, ac ultricies
        est mi aliquam enim. Aenean ac neque in arcu euismod ornare. Fusce
        sodales massa ac lectus finibus rutrum. Nunc laoreet nunc id rutrum
        vehicula. Sed tempor turpis posuere, auctor elit quis, ultricies ligula.
        Maecenas posuere pulvinar mi, ac congue nulla placerat nec.

      <amp-playbuzz
        data-item="a6aa5a14-8888-4618-b2e3-fe6a30d8c51b"
        layout="responsive"
        height="300"
        width="300"
        data-item-info="false"
        data-share-buttons="false"
        data-comments="false"
      >
      </amp-playbuzz>

        orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus felis
        arcu, vehicula sed pretium eget, pulvinar eu elit. Ut nibh nulla,
        pharetra at tristique at, pharetra et mi. Ut elementum quam eu feugiat
        varius. Vestibulum dui ligula, dapibus at suscipit venenatis, elementum
        vitae libero. Vivamus efficitur nibh et tortor semper, sit amet interdum
        augue tempor. Nulla vitae tempus dolor, ac molestie odio. Cras cursus,
        lectus ac consectetur scelerisque, mi arcu egestas velit, ac ultricies
        est mi aliquam enim. Aenean ac neque in arcu euismod ornare. Fusce
        sodales massa ac lectus finibus rutrum. Nunc laoreet nunc id rutrum
        vehicula. Sed tempor turpis posuere, auctor elit quis, ultricies ligula.
        Maecenas posuere pulvinar mi, ac congue nulla placerat nec.

      <amp-playbuzz
        src="https://www.playbuzz.com/HistoryUK/10-classic-christmas-movies"
        layout="responsive"
        height="300"
        width="300"
        data-item-info="false"
        data-share-buttons="false"
        data-comments="false"
      >
      </amp-playbuzz>

        orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus felis
        arcu, vehicula sed pretium eget, pulvinar eu elit. Ut nibh nulla,
        pharetra at tristique at, pharetra et mi. Ut elementum quam eu feugiat
        varius. Vestibulum dui ligula, dapibus at suscipit venenatis, elementum
        vitae libero. Vivamus efficitur nibh et tortor semper, sit amet interdum
        augue tempor. Nulla vitae tempus dolor, ac molestie odio. Cras cursus,
        lectus ac consectetur scelerisque, mi arcu egestas velit, ac ultricies
        est mi aliquam enim. Aenean ac neque in arcu euismod ornare. Fusce
        sodales massa ac lectus finibus rutrum. Nunc laoreet nunc id rutrum
        vehicula. Sed tempor turpis posuere, auctor elit quis, ultricies ligula.
        Maecenas posuere pulvinar mi, ac congue nulla placerat nec.

      <amp-playbuzz
        src="http://www.playbuzz.com/perezhilton/vote-for-the-worst-dressed-at-the-2016-american-music-awards-here"
        layout="responsive"
        height="300"
        width="300"
        data-item-info="true"
        data-share-buttons="true"
        data-comments="true"
      >
      </amp-playbuzz>

        orem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus felis
        arcu, vehicula sed pretium eget, pulvinar eu elit. Ut nibh nulla,
        pharetra at tristique at, pharetra et mi. Ut elementum quam eu feugiat
        varius. Vestibulum dui ligula, dapibus at suscipit venenatis, elementum
        vitae libero. Vivamus efficitur nibh et tortor semper, sit amet interdum
        augue tempor. Nulla vitae tempus dolor, ac molestie odio. Cras cursus,
        lectus ac consectetur scelerisque, mi arcu egestas velit, ac ultricies
        est mi aliquam enim. Aenean ac neque in arcu euismod ornare. Fusce
        sodales massa ac lectus finibus rutrum. Nunc laoreet nunc id rutrum
        vehicula. Sed tempor turpis posuere, auctor elit quis, ultricies ligula.
        Maecenas posuere pulvinar mi, ac congue nulla placerat nec.

    Footer


text:
//
//  NSData+Addition.m
//  Line0
//
//  Created by line0 on 12-12-5.
//  Copyright (c) 2012年 line0. All rights reserved.
//

#import "NSData+Addition.h"
#import <CommonCrypto/CommonDigest.h>

@implementation NSData (Addition)

- (NSData *)dataWithObject:(id)object
{
    NSData *data = [NSKeyedArchiver archivedDataWithRootObject:object];
    return data;
}

- (id)convertDataToObject
{
    NSArray *array = [NSKeyedUnarchiver unarchiveObjectWithData:self];
    return array;
}

/**
 * Returns hexadecimal string of NSData.
 * Empty string if data is empty.
 */
- (NSString *)hexadecimalString
{
    const unsigned char *dataBuffer = (const unsigned char *)[self bytes];

    if (!dataBuffer)
        return [NSString string];

    NSUInteger          dataLength  = [self length];
    NSMutableString     *hexString  = [NSMutableString stringWithCapacity:(dataLength * 2)];

    for (int i = 0; i < dataLength; ++i)
        [hexString appendString:[NSString stringWithFormat:@"%02lx", (unsigned long)dataBuffer[i]]];

    return [NSString stringWithString:hexString];
}

- (NSString *)md5 {
    unsigned char result[CC_MD5_DIGEST_LENGTH];
    CC_MD5(self.bytes, (int) self.length, result); // This is the md5 call
    return [NSString stringWithFormat:
            @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
            result[0], result[1], result[2], result[3],
            result[4], result[5], result[6], result[7],
            result[8], result[9], result[10], result[11],
            result[12], result[13], result[14], result[15]
    ];
}

@end


text:
using Newtonsoft.Json;
using AppWeb.TelegramBotClient.Configurations;
using AppWeb.TelegramBotClient.Enums;
using AppWeb.TelegramBotClient.Models;

namespace AppWeb.TelegramBotClient
{
    public interface ITelegramClient
    {
        void SetAuthenticationToken(string token);
        string GetAuthenticationToken();
        Message SendMessage(long chat_id, string text);
        Update[] GetUpdates(int? offset, int? limit, int? timeout, UpdateType[] allowedUpdates = null);
        void DeleteWebhook();
        bool SetWebhook(string url, int maxConnections, UpdateType[] allowedUpdates = null);
    }
}


text:
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;
using Papyrus.Features;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Linq;
using System.Windows.Media;

namespace Papyrus.Language.Components.Tokens {
    [DebuggerStepThrough]
    [Export(typeof(EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = Name)]
    [Name(Name)]
    [UserVisible(true)]
    [Order(Before = Priority.Default)]
    internal sealed class IdentifierColorFormat : ClassificationFormatDefinition {
        internal const string Name = "PapyrusIdentifier";

        internal IdentifierColorFormat() {
            DisplayName = "Papyrus Identifier";
            ForegroundColor = Color.FromRgb(220, 220, 220);
        }
    }

    [DebuggerStepThrough]
    internal static class IdentifierColorClassificationDefinition {
        [Export(typeof(ClassificationTypeDefinition))]
        [Name(IdentifierColorFormat.Name)]
        private static ClassificationTypeDefinition typeDefinition;
    }

    public enum IdentifierType {
        Unknown,
        Local,
        Field,
        Property,
        Function,
        Event,
        State,
        Group,
        Struct,
    }

    [DebuggerStepThrough]
    public sealed class Identifier : Token, ISyntaxColorable {
        private static TokenManager<Identifier> Manager = new TokenManager<Identifier>(false);

        public IdentifierType type;
        private string name;

        public Identifier(IdentifierType type, string name) {
            this.type = type;
            this.name = name;

        }
        public Identifier(string name) :
            this(IdentifierType.Unknown, name) {
        }

        public override string Text {
            get { return name; }
        }
        public override TokenTypeID TypeID {
            get { return TokenTypeID.Identifier; }
        }

        IClassificationType ISyntaxColorable.GetClassificationType(IClassificationTypeRegistryService registry) {
            return registry.GetClassificationType(IdentifierColorFormat.Name);
        }

        public override int GetHashCode() {
            return name.GetHashCode();
        }
        public override bool Equals(object obj) {
            return obj is Identifier && String.Equals(this.name, ((Identifier)obj).name, StringComparison.OrdinalIgnoreCase);
        }

        public static explicit operator string(Identifier identifier) {
            return identifier.name;
        }
        public static implicit operator Identifier(string value) {
            return new Identifier(value);
        }

        public static bool operator ==(Identifier x, Identifier y) {
            return Equals(x, y);
        }
        public static bool operator !=(Identifier x, Identifier y) {
            return !Equals(x, y);
        }
        public static bool operator ==(Identifier x, Token y) {
            return x == y as Identifier;
        }
        public static bool operator !=(Identifier x, Token y) {
            return x == y as Identifier;
        }
        public static bool operator ==(Token x, Identifier y) {
            return x as Identifier == y;
        }
        public static bool operator !=(Token x, Identifier y) {
            return x as Identifier != y;
        }

        public static bool IsValid(string value) {
            if (String.IsNullOrWhiteSpace(value)) {
                return false;
            }

            bool first = true;
            return value.All(c => {
                if (first) {
                    first = false;
                    return Char.IsLetter(c) || c == '_';
                }
                return Char.IsLetterOrDigit(c) ||c == '_';
            });
        }
    }

    internal class IdentifierParser : TokenParser {
        public override bool TryParse(string sourceTextSpan, TokenScanner scanner, IEnumerable<Token> previousTokens, out Token token) {
            token = null;

            if (scanner.TopLevelState == ScannerStates.GlobalScope) {
                int length = Delimiter.FindNext(sourceTextSpan, 0);
                if (Identifier.IsValid(sourceTextSpan.Substring(0, length))) {
                    string name = sourceTextSpan.Substring(0, length);

                    Token lastToken = previousTokens.LastOrDefault();
                    if (lastToken != null && lastToken.IsVariableType) {
                        token = new Identifier(IdentifierType.Field, name);
                    }
                    else if (lastToken == Keyword.Property) {
                        token = new Identifier(IdentifierType.Property, name);
                    }
                    else if (lastToken == Keyword.Function) {
                        token = new Identifier(IdentifierType.Function, name);
                    }
                    else if (lastToken == Keyword.Event) {
                        token = new Identifier(IdentifierType.Event, name);
                    }
                    else {
                        token = new Identifier(name);
                    }
                }
            }

            return token != null;
        }
    }
}


text:
layout: page
title: Spring Edge Holdings Executive Retreat
date: 2016-05-24
author: William Richard
tags: weekly links, java
status: published
summary: Nullam eleifend elit non neque sollicitudin mollis. Sed et turpis.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 08/28/2019
  endDate: 08/31/2019
  ctyhocn: BDRSMHX
  groupCode: SEHER
published: true
---
Proin euismod, tellus ac tristique maximus, diam elit mollis enim, in venenatis metus ex in erat. Nam condimentum lorem sapien. Nunc id ultrices nisi, ut convallis elit. Curabitur dignissim vulputate quam, eu dictum odio elementum id. Proin dapibus ligula urna, vitae dignissim mauris vestibulum a. Praesent eget gravida nulla, non mattis nisl. Morbi sollicitudin, urna quis egestas posuere, nibh libero porttitor metus, quis elementum elit quam ac sapien. Nunc in felis elit.

* Sed sit amet dolor dictum, finibus risus in, commodo tellus
* Curabitur facilisis velit rutrum erat condimentum pulvinar id posuere quam
* Fusce scelerisque quam vel dapibus venenatis
* Nullam aliquam orci non ultricies consectetur
* Maecenas eleifend quam sit amet leo molestie auctor
* Curabitur et lacus eget velit aliquam rhoncus nec at nibh.

Nunc id dignissim dolor. Vivamus consectetur finibus fringilla. Integer sagittis lacus ut elit commodo, non elementum lectus hendrerit. Vivamus fringilla volutpat magna eget mollis. Pellentesque consectetur ante non sapien porttitor, et tempus risus maximus. Praesent elementum ullamcorper quam, non venenatis libero aliquet eget. Phasellus pulvinar, turpis non ultricies aliquet, odio tortor pulvinar magna, ac condimentum enim ipsum at nisi. Phasellus auctor id libero hendrerit lobortis. Duis sagittis nisi felis, id placerat erat pretium vel. Nam ac urna nibh. Fusce sodales nisl vel purus interdum commodo. Etiam condimentum, sapien at fringilla pellentesque, tellus eros volutpat odio, venenatis scelerisque velit lectus vel tortor. Integer porttitor sapien nec ligula convallis eleifend. Suspendisse tristique convallis enim nec porta. Sed nec sapien finibus, ultrices magna ut, molestie massa.
Donec ornare auctor metus quis eleifend. Donec ullamcorper felis at dui rutrum, vitae aliquam arcu fringilla. Integer vel quam ac elit convallis fringilla. Nullam non orci a nisl facilisis vulputate sed at risus. Curabitur tristique luctus laoreet. Aenean vulputate fringilla orci, id sollicitudin magna eleifend ac. Maecenas tempor metus nec tempus consequat.


text:
package org.onosproject.drivers.fujitsu;

import org.apache.commons.configuration.HierarchicalConfiguration;
import org.onosproject.drivers.utilities.XmlConfigParser;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.ChannelSpacing;
import org.onosproject.net.CltSignalType;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.GridType;
import org.onosproject.net.OchSignal;
import org.onosproject.net.OduSignalType;
import org.onosproject.net.PortNumber;
import org.onosproject.net.behaviour.PortDiscovery;
import org.onosproject.net.device.PortDescription;
import org.onosproject.net.driver.AbstractHandlerBehaviour;
import org.onosproject.netconf.NetconfController;
import org.onosproject.netconf.NetconfException;
import org.onosproject.netconf.NetconfSession;
import org.slf4j.Logger;

import com.google.common.collect.Lists;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

import static com.google.common.base.Preconditions.checkNotNull;
import static org.onosproject.net.optical.device.OchPortHelper.ochPortDescription;
import static org.onosproject.net.optical.device.OduCltPortHelper.oduCltPortDescription;
import static org.slf4j.LoggerFactory.getLogger;

/**
 * Retrieves the ports from a Fujitsu T100 device via netconf.
 */
public class PortGetterFujitsuImpl extends AbstractHandlerBehaviour
        implements PortDiscovery {

    private final Logger log = getLogger(getClass());

    @Override
    public List<PortDescription> getPorts() {
        NetconfController controller = checkNotNull(handler().get(NetconfController.class));
        NetconfSession session = controller.getDevicesMap().get(handler().data().deviceId()).getSession();
        String reply;
        try {
            reply = session.get(requestBuilder());
        } catch (IOException e) {
            throw new RuntimeException(new NetconfException("Failed to retrieve configuration.", e));
        }
        List<PortDescription> descriptions =
                parseFujitsuT100Ports(XmlConfigParser.
                        loadXml(new ByteArrayInputStream(reply.getBytes())));
        return descriptions;
    }

    /**
     * Builds a request crafted to get the configuration required to create port
     * descriptions for the device.
     * @return The request string.
     */
    private String requestBuilder() {
        StringBuilder rpc = new StringBuilder("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
        //Message ID is injected later.
        rpc.append("<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">");
        rpc.append("<get>");
        rpc.append("<filter type=\"subtree\">");
        rpc.append("<interfaces xmlns=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">");
        rpc.append("</interfaces>");
        rpc.append("</filter>");
        rpc.append("</get>");
        rpc.append("</rpc>");
        return rpc.toString();
    }

    /**
     * Parses a configuration and returns a set of ports for the fujitsu T100.
     * @param cfg a hierarchical configuration
     * @return a list of port descriptions
     */
    private static List<PortDescription> parseFujitsuT100Ports(HierarchicalConfiguration cfg) {
        AtomicInteger counter = new AtomicInteger(1);
        List<PortDescription> portDescriptions = Lists.newArrayList();
        List<HierarchicalConfiguration> subtrees =
                cfg.configurationsAt("data.interfaces.interface");
        for (HierarchicalConfiguration portConfig : subtrees) {
            if (!portConfig.getString("name").contains("LCN") &&
                    !portConfig.getString("name").contains("LMP") &&
                    portConfig.getString("type").equals("ianaift:ethernetCsmacd")) {
                portDescriptions.add(parseT100OduPort(portConfig, counter.getAndIncrement()));
            } else if (portConfig.getString("type").equals("ianaift:otnOtu")) {
                portDescriptions.add(parseT100OchPort(portConfig, counter.getAndIncrement()));
            }
        }
        return portDescriptions;
    }

    private static PortDescription parseT100OchPort(HierarchicalConfiguration cfg, long count) {
        PortNumber portNumber = PortNumber.portNumber(count);
        HierarchicalConfiguration otuConfig = cfg.configurationAt("otu");
        boolean enabled = otuConfig.getString("administrative-state").equals("up");
        OduSignalType signalType = otuConfig.getString("rate").equals("OTU4") ? OduSignalType.ODU4 : null;
        //Unsure how to retreive, outside knowledge it is tunable.
        boolean isTunable = true;
        OchSignal lambda = new OchSignal(GridType.DWDM, ChannelSpacing.CHL_50GHZ, 0, 4);
        DefaultAnnotations annotations = DefaultAnnotations.builder().
                set(AnnotationKeys.PORT_NAME, cfg.getString("name")).
                build();
        return ochPortDescription(portNumber, enabled, signalType, isTunable, lambda, annotations);
    }

    private static PortDescription parseT100OduPort(HierarchicalConfiguration cfg, long count) {
        PortNumber portNumber = PortNumber.portNumber(count);
        HierarchicalConfiguration ethernetConfig = cfg.configurationAt("ethernet");
        boolean enabled = ethernetConfig.getString("administrative-state").equals("up");
        //Rate is in kbps
        CltSignalType signalType = ethernetConfig.getString("rate").equals("100000000") ?
                CltSignalType.CLT_100GBE : null;
        DefaultAnnotations annotations = DefaultAnnotations.builder().
                set(AnnotationKeys.PORT_NAME, cfg.getString("name")).
                build();
        return oduCltPortDescription(portNumber, enabled, signalType, annotations);
    }

}


text:
#include "L3DParticle.h"
#include "LAssert.h"
#include "IO/LFileReader.h"

L3DParticle::L3DParticle()
{

}

L3DParticle::~L3DParticle()
{

}

HRESULT L3DParticle::LoadParticle(LPCWSTR cszFileName)
{
	BYTE *pbyParticle = NULL;
	SFX_FILE_HEADER* pHeader = NULL;
	PARSYS_ELEMENT* pParSysArr = NULL;
	PARSYS_FILE_DATA* pFileData = NULL;
	size_t uBufferLen = 0;
	size_t uFileLen = 0;

	do
	{
		LFileReader::Reader(cszFileName, &pbyParticle, &uBufferLen);
		BOOL_ERROR_BREAK(pbyParticle);

		pbyParticle = LFileReader::Convert(pbyParticle, pHeader);
		BOOL_ERROR_BREAK(pHeader->dwID == PARSYS_ID);

		uFileLen = pHeader->dwFileLength - sizeof(SFX_FILE_HEADER);

		pFileData = new PARSYS_FILE_DATA;
		BOOL_ERROR_BREAK(pFileData);

		ZeroMemory(pFileData, sizeof(PARSYS_FILE_DATA));
		pFileData->strFileName = cszFileName;
		pFileData->nVersion = (int)LOWORD(pHeader->dwVersion);
		//pFileData->dwOption = dwOption;

		pbyParticle = LFileReader::Convert(pbyParticle, pParSysArr);

		for (DWORD i = 0; i < pHeader->dwElementNum; i++)
		{
			(this->*ms_ParSysLoadFunction[pParSysArr[i].dwElementID])(pbyParticle + pParSysArr[i].dwElementOffset - uFileLen, pParSysArr[i].dwElementLength, pFileData);
		}

	} while (0);

	return S_OK;
}

HRESULT L3DParticle::ReadGeneralInformationBlock(BYTE *pbyBuffer, DWORD dwLength, PARSYS_FILE_DATA *pFileData)
{
	HRESULT hResult = E_FAIL;

	do
	{
		PARSYS_GENERAL_INFORMATION_BLOCK *pBlock = (PARSYS_GENERAL_INFORMATION_BLOCK*)&pbyBuffer;

		pFileData->nNumLodLevel    = pBlock->nNumLodLevel;
		pFileData->bCloseFloorFlag = (BOOL)pBlock->byCloseFloorFlag;
		pFileData->bFixedSize      = (BOOL)pBlock->byFixedSize;
		pFileData->bLockYAxis      = (BOOL)pBlock->byLockYAlex;
		//pFileData->RenderOrder     = (RENDER_LAUNCHER_ORDER)pBlock->byRenderOrder;
		pFileData->dwMaxParticles  = pBlock->dwMaxParticle;
		pFileData->byShockWaveFlag  = pBlock->byShockWaveFlag;

		for (int i = 0; i < MAX_LODLEVEL; i++)
		{
			pFileData->fLodDistance[i] = pBlock->fLodDistance[i];
		}
		//pFileData->AABBoxLocal.AddPosition(pBlock->vAABBoxMax);
		//pFileData->AABBoxLocal.AddPosition(pBlock->vAABBoxMin);

	} while (0);

	return S_OK;
}

HRESULT L3DParticle::ReadParticleMaterialBlock(BYTE *pbyBuffer, DWORD dwLength, PARSYS_FILE_DATA *pFileData)
{
	/*
	HRESULT hrResult = E_FAIL;
	HRESULT hRetCode = E_FAIL;
	IKG3DMaterial2Instance* pMtlIns = NULL;
	DWORD dwTextureOption = 0;

	do
	{
		//GetTextureScaleOption(pFileData->dwOption, dwTextureOption);

		g_cEngineManager.m_lpMaterialSystem->RequestMaterialInstance(&pMtlIns);
		KG_PROCESS_ERROR(pMtlIns);

		hRetCode = pMtlIns->LoadFromBuffer(&pbyBuffer, dwLength, dwTextureOption);
		KG_COM_PROCESS_ERROR(hRetCode);

		pFileData->vecMaterial.push_back(pMtlIns);

	} while (0);
	*/

	return S_OK;
}

HRESULT L3DParticle::ReadParticleLauncherBlock(BYTE *pbyBuffer, DWORD dwLength, PARSYS_FILE_DATA *pFileData)
{
	/*HRESULT hResult = E_FAIL;
	DWORD i;
	PARTICLE_LAUNCHER_DATA* pLauncherData = NULL;
	PARSYS_LAUNCHER_BLOCK* pBlock = NULL;
	DWORD dwPos = 0;

	pBlock = (PARSYS_LAUNCHER_BLOCK *)&pbyBuffer;
	dwPos = sizeof(PARSYS_LAUNCHER_BLOCK);

	ASSERT(pFileData);

	pLauncherData = new PARTICLE_LAUNCHER_DATA;
	KGLOG_PROCESS_ERROR(pLauncherData);

	strcpy_s(pLauncherData->m_szName, sizeof(pLauncherData->m_szName), pBlock->szName);
	pLauncherData->m_byLauncherType = pBlock->byLauncherType;
	pLauncherData->m_dwID           = pBlock->dwID;
	pLauncherData->m_byMotionType   = pBlock->byMotionType;
	pLauncherData->m_bySpawnMode    = pBlock->bySpawnMode;
	pLauncherData->m_byHorizontal   = pBlock->byHorizontal;
	pLauncherData->m_byVertical     = pBlock->byVertical;
	pLauncherData->m_ParticleFaceType = (PARSYS_PARTICLE_FACETYPE)pBlock->byFaceType;
	pLauncherData->m_byParticleType = pBlock->byParticleType;
	pLauncherData->m_bPreCompute   = pBlock->bPreCompute;
	pLauncherData->m_dwNumPlay     = pBlock->dwNumPlay;
	pLauncherData->m_fDurationTime = pBlock->fDurationTime;
	pLauncherData->m_fDelayTime    = pBlock->fDelayTime;
	pLauncherData->m_SortMode      = (ParticleSortMode)pBlock->bySortMode;
	pLauncherData->m_nMaterialIndex = pBlock->nMaterialIndex;
	pLauncherData->m_byUVFlowType  = pBlock->byUVFlowType;
	pLauncherData->m_dwVersion     = pBlock->dwVersion;

	if(pLauncherData->m_dwVersion < PARSYS_LAUCHER_VERSION_1)
	{
		if(pLauncherData->m_byLauncherType == MESH_LAUNCHER ||
			pLauncherData->m_byLauncherType == MESHQUOTE_LAUNCHER)
		{
			pLauncherData->m_byUVFlowType = PARTICLE_UV_FLOW_RESET;
		}
		else
		{
			pLauncherData->m_byUVFlowType = PARTICLE_UV_FLOW_CONTINUE;
		}
	}

	for (int i = 0; i < MAX_LODLEVEL; i++)
	{
		pLauncherData->m_fLod[i] = pBlock->fLod[i];
	}

	for (i = 0; i < pBlock->dwNumModules; ++i)
	{
		DWORD dwType = *(DWORD*)(&pbyBuffer[dwPos]);
		dwPos += sizeof(DWORD);
		DWORD dwReadLength = 0;
		KG3DParticleModule* pModules = g_CreateParticleModule(dwType);
		BYTE* pByteData = (BYTE*)&pbyBuffer[dwPos];
		dwReadLength = pModules->ReadData(pByteData);
		dwPos += dwReadLength;

		pLauncherData->m_Modules.push_back(pModules);
	}

	if (pLauncherData->m_bPreCompute)
	{
		BYTE* pbyData = (BYTE*)&pbyBuffer[dwPos];
		pLauncherData->m_pPreComputeInfo = new KG3DPreComputeInfo;
		KGLOG_PROCESS_ERROR(pLauncherData->m_pPreComputeInfo);

		pLauncherData->m_pPreComputeInfo->Init();
		pLauncherData->m_pPreComputeInfo->Clear();

		dwPos += pLauncherData->m_pPreComputeInfo->ReadData(pbyData);
	}

	if (dwPos < dwLength)
	{
		pLauncherData->m_dwExLength = dwLength - dwPos;
		pLauncherData->m_pByte = new BYTE[pLauncherData->m_dwExLength];
		KG_PROCESS_ERROR(pLauncherData->m_pByte);

		memcpy(pLauncherData->m_pByte, &(pbyBuffer[dwPos]), pLauncherData->m_dwExLength);
	}

	pFileData->vecLauncherData.push_back(pLauncherData);
	pLauncherData = NULL;*/

	return S_OK;
}

HRESULT L3DParticle::ReadParticleTrackBlock(BYTE *pbyBuffer, DWORD dwLength, PARSYS_FILE_DATA *pFileData)
{
	/*HRESULT hResult = E_FAIL;
	HRESULT hrRetCode = E_FAIL;
	SFX_TRACK_BLOCK*   pBlock = (SFX_TRACK_BLOCK*)&pbyBuffer;
	KG3DSFXTrackData*  pTrackData = NULL;
	TRACK_STATIC_DATA* pTrackStaticData = NULL;

	KG_PROCESS_ERROR(pFileData);

	pTrackStaticData = new TRACK_STATIC_DATA;
	KGLOG_PROCESS_ERROR(pTrackStaticData);

	hrRetCode = g_cTrackTable.LoadResourceFromFile(
		(const char*)pBlock->byTrackFileName,
		0,
		0,
		(IKG3DResourceBase **)&pTrackData
		);
	if (FAILED(hrRetCode))
	{
		KGLogPrintf(KGLOG_ERR, "[SFX] Load track file failed : %s", (const char*)pBlock->byTrackFileName);
		goto Exit0;
	}

	pTrackStaticData->vTranslation = pBlock->vTranslation;
	pTrackStaticData->vScalingCenter = pBlock->vScalingCenter;
	pTrackStaticData->qScalingRotation = pBlock->qScalingRotation;
	pTrackStaticData->vScaling = pBlock->vScaling;
	pTrackStaticData->vRotationCenter = pBlock->vRotationCenter;
	pTrackStaticData->qRotation = pBlock->qRotation;
	pTrackStaticData->dwInterval = pBlock->dwInterval;

	pTrackStaticData->pTrackData = pTrackData;
	pTrackData = NULL;

	pFileData->vecParticleTrackData.push_back(pTrackStaticData);
	pTrackStaticData = NULL;*/

	return S_OK;
}


text:
#include "tensorflow/core/framework/common_shape_fns.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/shape_inference.h"

namespace tensorflow {
namespace risc {
namespace experimental {

template <typename T>
class RiscExpOp : public OpKernel {
 public:
  explicit RiscExpOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}

  void Compute(OpKernelContext* ctx) override {
    // TODO(b/171294012): Implement RiscExp op.
  }
};

#define REGISTER_CPU(T)                                          \
  REGISTER_KERNEL_BUILDER(                                       \
      Name("RiscExp").Device(DEVICE_CPU).TypeConstraint<T>("T"), \
      RiscExpOp<T>);

REGISTER_CPU(bfloat16);
REGISTER_CPU(Eigen::half);
REGISTER_CPU(float);
REGISTER_CPU(double);

}  // namespace experimental
}  // namespace risc
}  // namespace tensorflow


text:
#region License

#endregion

namespace RedBadger.Xpf.Controls
{
    public enum Orientation
    {
        Horizontal,
        Vertical
    }
}


text:
<app-material-sidenav>

        Channel list:

        Zeb89

        ZombieBest

        QDSS

        QDSS 2

        PDV

        Yamato Animation

        NoCopyrightSounds

        SamuX

        Pyrocynical

        Open YouTube instead

        YouTube HTML5 settings

        <app-material-toolbar>
            <button md-icon-button (click)="openChildSidenav()">
                <md-icon>menu</md-icon>
            </button>
            ViStriker
              [
            <app-input-search-channel></app-input-search-channel>
             ]
            <app-video-options-button></app-video-options-button>
        </app-material-toolbar>
        <router-outlet></router-outlet>

</app-material-sidenav>


text:
import unittest
from igf_data.utils.tools.ppqt_utils import Ppqt_tools

class Ppqt_util_test1(unittest.TestCase):
  def test_parse_spp_output(self):
    ppqt = Ppqt_tools(rscript_path='blah',ppqt_exe='blah')
    metrics = ppqt._parse_spp_output(spp_file='data/ppqt_metrics/test.spp.out')
    self.assertTrue(isinstance(metrics,list))
    self.assertEqual(len(metrics[0]),11)
    self.assertTrue('PPQT_Normalized_SCC_NSC' in metrics[0])
    self.assertEqual(float(metrics[0].get('PPQT_Normalized_SCC_NSC')),1.17548)

if __name__=='__main__':
  unittest.main()


text:
<?php

namespace Panza\Library\Issue;

/**
 * Class StatusTransition
 * @package Panza\Library\Issue
 */
class StatusTransition
{
    /**
     * Made by.
     *
     * @var string
     */
    private $madeBy;

    /**
     * Made At.
     *
     * @var \DateTime
     */
    private $madeAt;

    /**
     * Name of status before transition.
     *
     * @var string
     */
    private $oldStatus;

    /**
     * Name of status after transition.
     *
     * @var string
     */
    private $newStatus;

    /**
     * Ctor.
     *
     * @param string $madeBy
     * @param \DateTime $madeAt
     * @param string $oldStatus
     * @param string $newStatus
     */
    public function __construct($madeBy, \DateTime $madeAt, $oldStatus, $newStatus)
    {
        $this->madeBy = $madeBy;
        $this->madeAt = $madeAt;
        $this->oldStatus = $oldStatus;
        $this->newStatus = $newStatus;
    }

    /**
     * Returns author of transition.
     *
     * @return string
     */
    public function getMadeBy()
    {
        return $this->madeBy;
    }

    /**
     * Returns datetime of transition.
     *
     * @return \DateTime
     */
    public function getMadeAt()
    {
        return $this->madeAt;
    }

    /**
     * Returns the status name which was before transition.
     *
     * @return string
     */
    public function getOldStatus()
    {
        return $this->oldStatus;
    }

    /**
     * Returns the status name which set by transition.
     *
     * @return string
     */
    public function getNewStatus()
    {
        return $this->newStatus;
    }
}


text:
We'd love to accept your patches and contributions to this project.

Below are guidelines to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Issues

Use the [Issue Template](docs/ISSUE_TEMPLATE.md) to log project issues.

## Pull Requests

Use the [Pull Request Template](docs/PULL_REQUEST_TEMPLATE.md) to submit changes and new code to the project.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.

## Community Guidelines

This project follows [Google's Open Source Community
Guidelines](https://opensource.google/conduct/).