text:
<?php

	namespace Sistema\Bootstrap;
	use \Doctrine\ORM\Proxy\Autoloader;
	use \Neural\Excepcion;
	use \Sistema\Utilidades\ConfigAcceso;
	use \Sistema\Utilidades\ConfigModulos;
	use \Sistema\Utilidades\ModReWrite;

	class Boot extends Estructura {

		 private $confg = false;
		 private $confgModulo = false;
		 private $modReWrite = false;

		 /**
		  * Boot::__construct()
		  *
		  * Genera las variables necesarias para el proceso
		  * @param string $app
		  * @param string $directorio
		  * @return void
		  */
		 function __construct($app = false, $directorio = false) {
		 	$this->modReWrite = ModReWrite::leer();
		 }

		 /**
		  * Boot::ejecutar()
		  *
		  * Ejecuta el proceso de ejecucion
		  * @return void
		  */
		 public function ejecutar() {
		 	$this->appExistencia();
		 }

		 /**
		  * Boot::appExistencia()
		  *
		  * Genera la validacion si la aplicacion existe
		  * en el archivo de configuracion de accesos
		  *
		  * @return void
		  */
		 private function appExistencia() {
		 	if(ConfigAcceso::appExistencia($this->modReWrite['app']) == true):
		 		$this->appSeleccionEntorno();
		 	else:
		 		throw new Excepcion(sprintf('La aplicación: %s no existe en el archivo de configuración.', $this->modReWrite['app']), 0);
		 	endif;
		 }

		 /**
		  * Boot::appSeleccionEntorno()
		  *
		  * Genera la validacion inicial del entorno a definir
		  * @return void
		  */
		 private function appSeleccionEntorno() {
		 	$this->confg = ConfigAcceso::leer($this->modReWrite['app']);
		 	if($this->confg['localhost']['habilitado'] == true):
		 		if(array_key_exists($_SERVER['REMOTE_ADDR'], array_flip($this->confg['localhost']['ip'])) == true):
		 			define('ENV_ENTORNO', 'Desarrollo');
		 		else:
		 			define('ENV_ENTORNO', 'Produccion');
		 		endif;
		 	else:
		 		define('ENV_ENTORNO', 'Produccion');
		 	endif;
		 	$this->directorioExistencia();
		 }

		 /**
		  * Boot::directorioExistencia()
		  *
		  * Genera la validacion si el directorio de
		  * la aplicacion existe
		  *
		  * @return void
		  */
		 private function directorioExistencia() {
		 	if(is_dir(ROOT_APPS.DIRECTORY_SEPARATOR.$this->confg['fuente']['directorio']) == true):
		 		$this->directorioLectura();
		 	else:
		 		throw new Excepcion(sprintf('El directorio de la aplicación: %s no existe', $this->modReWrite['app']), 0);
		 	endif;
		 }

		 /**
		  * Boot::directorioLectura()
		  *
		  * Genera la validacion de la lectura del directorio
		  * de la aplicacion
		  *
		  * @return void
		  */
		 private function directorioLectura() {
		 	if(is_readable(ROOT_APPS.DIRECTORY_SEPARATOR.$this->confg['fuente']['directorio']) == true):
		 		$this->estructuraValidacion();
		 	else:
		 		throw new Excepcion(sprintf('El directorio de la aplicación: %s no es posible leerlo', $this->modReWrite['app']), 0);
		 	endif;
		 }

		 /**
		  * Boot::estructuraValidacion()
		  *
		  * Genera el proceso de validacion de la estructura
		  * de toda la aplicacion
		  *
		  * @return void
		  */
		 private function estructuraValidacion() {
		 	if($this->confg['sistema']['estructura'][ENV_ENTORNO] == true):
		 		parent::ejecutarEstructura($this->confg['fuente']['directorio']);
		 	endif;
		 	$this->adicionalesIncluir();
		 	$this->moduloValidacion();
		 }

		 /**
		  * Boot::adicionalesIncluir()
		  *
		  * Genera la carga de procesos adicionales
		  * necesarios dentro de la aplicacion
		  *
		  * @return void
		  */
		 private function adicionalesIncluir() {
		 	date_default_timezone_set($this->confg['sistema']['tiempo']['zona']);
			require implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Configuracion', 'Parametros.php'));

			$consola = new \AutoCargador('Consola', implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Complementos')));
			$consola->registrar();

			$entidades = new \AutoCargador('Entidades', implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Complementos', 'ORM')));
		 	$entidades->registrar();

		 	$formulario = new \AutoCargador('Formularios', implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Complementos')));
		 	$formulario->registrar();

			$interface = new \AutoCargador('Interfaces', implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Complementos')));
		 	$interface->registrar();

		 	Autoloader::register(implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Complementos', 'ORM', 'Proxy')), 'Proxy');

			$utilidades = new \AutoCargador('Utilidades', implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Complementos')));
		 	$utilidades->registrar();

			$controladorMVC = new \AutoCargador('Controlador', implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Sistema')));
		 	$controladorMVC->registrarControlador();

			$modeloMVC = new \AutoCargador('Modelo', implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->confg['fuente']['directorio'], ENV_ENTORNO, 'Fuente', 'Sistema')));
		 	$modeloMVC->registrarModelo();
		 }

		 /**
		  * Boot::moduloValidacion()
		  *
		  * Genera la validacion de modulos activos
		  * @return void
		  */
		 private function moduloValidacion() {
		 	$this->confgModulo = ConfigModulos::leer($this->confg['fuente']['directorio'], ENV_ENTORNO);
		 	if($this->confgModulo['configuracion']['habilitado'] == true):
		 		$this->moduloSeleccion();
		 	else:
		 		$this->cargaMVC();
		 	endif;
		 }

		 /**
		  * Boot::moduloSeleccion()
		  *
		  * Genera la validacion si existe registrado el modulo
		  * @return void
		  */
		 private function moduloSeleccion() {
		 	if(array_key_exists($this->modReWrite['modulo']['modulo'], $this->confgModulo['modulos']) == true):
		 		$this->moduloActivo();
		 	else:
		 		$this->cargaMVC();
		 	endif;
		 }

		 /**
		  * Boot::moduloActivo()
		  *
		  * Genera la validacion si el modulo se encuentra activo
		  * @return void
		  */
		 private function moduloActivo() {
		 	if($this->confgModulo['modulos'][$this->modReWrite['modulo']['modulo']]['habilitado'] == true):
		 		$this->cargaModulo();
		 	else:
		 		$this->cargaMVC();
		 	endif;
		 }

		 /**
		  * Boot::cargaModulo()
		  *
		  * Genera el proceso de carga del modulo correspondiente
		  * @return void
		  */
		 private function cargaModulo() {
			$modulo = new Modulo($this->modReWrite['app'], $this->confg['fuente']['directorio'], ENV_ENTORNO, $this->modReWrite['modulo'], $this->confgModulo['modulos'][$this->modReWrite['modulo']['modulo']]);
		 	$modulo->ejecutar();
		 }

		 /**
		  * Boot::cargaMVC()
		  *
		  * Genera el proceso de carga del MVC correspondiente
		  * @return void
		  */
		 private function cargaMVC() {
		 	$mvc = new Mvc($this->modReWrite['app'], $this->confg['fuente']['directorio'], ENV_ENTORNO, $this->modReWrite['mvc']);
		 	$mvc->ejecutar();
		 }
	}


text:
package fr.jbrunet.app.dw.ng.starterkit.test.db;

import fr.jbrunet.app.dw.ng.starterkit.db.FooDAO;
import fr.jbrunet.app.dw.ng.starterkit.pojos.Foo;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.skife.jdbi.v2.DBI;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;

/**
 * Created by Julien BRUNET on 27/10/2014.
 */
public class FooDAOTest {

    private DBI dbi;
    private FooDAO dao;

    @Before
    public void setup() {
        dbi = new DBI("jdbc:h2:mem:" + UUID.randomUUID());
        // dbi.setSQLLog(new PrintStreamLog(System.out));
        dao = dbi.open(FooDAO.class);
        dao.createTable();
    }

    @After
    public void teardown() {
        dao.close();
    }

    private void create20Foos() {
        List<Foo> foos = new ArrayList<Foo>();
        foos.add(new Foo(null, "foo1",  "description", new Date(), false));
        foos.add(new Foo(null, "foo2",  "description", new Date(), true));
        foos.add(new Foo(null, "foo3",  "description", new Date(), false));
        foos.add(new Foo(null, "foo4",  "description", new Date(), true));
        foos.add(new Foo(null, "foo5",  "description", new Date(), false));
        foos.add(new Foo(null, "foo6",  "description", new Date(), false));
        foos.add(new Foo(null, "foo7",  "description", new Date(), false));
        foos.add(new Foo(null, "foo8",  "description", new Date(), true));
        foos.add(new Foo(null, "foo9",  "description", new Date(), true));
        foos.add(new Foo(null, "foo10", "description", new Date(), true));
        foos.add(new Foo(null, "foo11", "description", new Date(), false));
        foos.add(new Foo(null, "foo12", "description", new Date(), true));
        foos.add(new Foo(null, "foo13", "description", new Date(), false));
        foos.add(new Foo(null, "foo14", "description", new Date(), true));
        foos.add(new Foo(null, "foo15", "description", new Date(), false));
        foos.add(new Foo(null, "foo16", "description", new Date(), false));
        foos.add(new Foo(null, "foo17", "description", new Date(), false));
        foos.add(new Foo(null, "foo18", "description", new Date(), true));
        foos.add(new Foo(null, "foo19", "description", new Date(), true));
        foos.add(new Foo(null, "foo20", "description", new Date(), true));

        //Create
        dao.create(foos);
    }

    @Test
    public void CreateAndSearchById() {
        //Create
        Long id1 = dao.create(new Foo(null, "foo1", "description", new Date(), false));
        Assert.assertNotNull(id1);
        Long id2 = dao.create(new Foo(null, "foo2", "description", new Date(), false));
        Assert.assertNotNull(id2);

        //Read
        Foo f1 = dao.searchById(id1);
        Assert.assertNotNull(f1);
        Assert.assertEquals(f1.getLabel(), "foo1");

        Foo f2 = dao.searchById(id2);
        Assert.assertNotNull(f2);
        Assert.assertEquals(f2.getLabel(), "foo2");
    }

    @Test
    public void Search() {
        create20Foos();

        //Read
        List<Foo> results = dao.search(null, "foo1", null, null, null, 0, -1, null, null);
        Assert.assertEquals(results.size(), 11); //Retrieve foo1%

        //Read
        List<Foo> result2 = dao.search(null, null, null, null, false, 0, -1, null, null);
        Assert.assertEquals(result2.size(), 10);
    }

    @Test
    public void SearchOrderBy() {
        create20Foos();

        List<Foo> results = dao.search(null, "foo", null, null, null, 0, -1, new String[]{"LABEL"}, false);
        Assert.assertEquals(results.get(1).getLabel(), "foo10");
        List<Foo> results2 = dao.search(null, "foo", null, null, null, 0, -1, new String[]{"ID"}, false);
        Assert.assertEquals(results2.get(1).getLabel(), "foo2");

        //Select * order by ID DESC
        List<Foo> results3 = dao.search(null, null, null, null, null, 0, -1, new String[]{"ID"}, true);
        Assert.assertEquals(results3.get(0).getLabel(), "foo20");
    }

    @Test
    public void SearchPaging() {
        create20Foos();

        //Get first page with 3 line pages
        List<Foo> results = dao.search(null, "foo", null, null, null, 0, 3, new String[]{"ID"}, false);
        Assert.assertEquals(results.size(), 3);
        Assert.assertEquals(results.get(0).getLabel(),"foo1");
        Assert.assertEquals(results.get(1).getLabel(),"foo2");
        Assert.assertEquals(results.get(2).getLabel(),"foo3");

        //Get 3rd page with 5 line pages
        results = dao.search(null, "foo", null, null, null, 5*2, 5, new String[]{"ID"}, false);
        Assert.assertEquals(results.size(), 5);
        Assert.assertEquals(results.get(0).getLabel(),"foo11");
        Assert.assertEquals(results.get(1).getLabel(),"foo12");
        Assert.assertEquals(results.get(2).getLabel(),"foo13");
        Assert.assertEquals(results.get(3).getLabel(),"foo14");
        Assert.assertEquals(results.get(4).getLabel(),"foo15");
    }

    @Test(expected = IllegalArgumentException.class)
    public void SearchWithWrongArg() {
        dao.search(null, "foo", null, null, null, 0, -1, new String[]{"UNEXISTING_COLUMN"}, false);
    }
}

redpajama_set_name: RedPajamaGithub


text:
from redis import ConnectionPool, StrictRedis

class Myredis:

    def __init__(self, host, port, password, use_pool=True):

        self.db_configs = None
        self.host = host
        self.port = port
        self.password = password
        self.use_pool = use_pool

    def init_app(self):

        # redis init
        if self.use_pool:
            redis_pool = ConnectionPool(
                host=self.host,
                port=self.port,
                password=self.password)
            redis = StrictRedis(
                connection_pool=redis_pool
            )
        else:
            redis = StrictRedis(
                host=self.host,
                port=self.port,
                password=self.password
            )

        for op in redis.__class__.__dict__.keys():
            if op.startswith("_"):
                continue
            self.__dict__[op] = getattr(redis, op)


text:
"""Test that show and hide events work correctly.

Expected behaviour:
    One window will be opened.  There should be one shown event printed
    initially.  Minimizing and restoring the window should produce hidden
    and shown events, respectively.

    On OS X the events should also be fired when the window is hidden
    and shown (using Command+H or the dock context menu).

    Close the window or press ESC to end the test.
"""

import unittest

from pyglet import window

class EVENT_SHOW_HIDE(unittest.TestCase):

    def on_show(self):
        print('Window shown.')

    def on_hide(self):
        print('Window hidden.')

    def test_show_hide(self):
        w = window.Window(200, 200, visible=False)
        w.push_handlers(self)
        w.set_visible()
        while not w.has_exit:
            w.dispatch_events()
        w.close()


text:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyProduct("Repository")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCopyright("Copyright ©  2015 Pablo Pérez - Licensed under MIT License")]
[assembly: AssemblyTrademark("Licensed under MIT License")]
//[assembly: AssemblyCulture("")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyInformationalVersion("0.1")]
[assembly: AssemblyVersion("0.1.0")]


text:
layout: page
title: Malichyte Valley Chemical Party
date: 2016-05-24
author: Stephanie Stephenson
tags: weekly links, java
status: published
summary: Duis molestie accumsan est. Nunc.
banner: images/banner/leisure-04.jpg
booking:
  startDate: 10/28/2018
  endDate: 10/30/2018
  ctyhocn: GSPWDHX
  groupCode: MVCP
published: true
---
Nullam elementum cursus urna, in fringilla purus fermentum vel. Morbi maximus aliquam diam ut pretium. Praesent id maximus massa, id lobortis lorem. Cras eleifend, elit vitae sodales tristique, sem elit pellentesque felis, vel placerat dolor urna a mauris. Curabitur pharetra, lorem vitae ullamcorper tristique, orci elit elementum ligula, non volutpat diam velit vel magna. Sed congue sapien ante, ut fermentum ligula volutpat a. Phasellus et lectus diam. In hac habitasse platea dictumst. Curabitur rutrum velit quis neque sollicitudin, at vulputate ligula mollis. Quisque sollicitudin semper nisl, at viverra velit aliquet id. Integer vitae massa a quam ornare vulputate. Proin sem ante, ultricies nec rhoncus ac, cursus dictum nibh. Nulla mi erat, blandit in ex et, venenatis varius neque. Fusce imperdiet cursus sapien non laoreet. Nam orci felis, commodo vel arcu a, finibus aliquet ante. Donec vel nisl sit amet ligula rutrum pellentesque nec eu ex.

1 Aliquam pulvinar risus a eros tempor fermentum
1 Aenean rutrum nibh ac quam semper, et tristique magna imperdiet.

Vestibulum tempor massa eros, vitae euismod mi blandit nec. Sed posuere arcu eget ante auctor, pharetra consectetur libero vehicula. Sed interdum orci in lobortis lobortis. Pellentesque mi lorem, cursus ac tellus non, luctus imperdiet arcu. Pellentesque efficitur est id sodales iaculis. Nulla ipsum massa, venenatis at volutpat at, semper ultricies elit. Nam scelerisque, justo sit amet vulputate pharetra, mauris sapien malesuada sapien, ac mollis urna diam in leo.


text:
{% extends "b-col-2-left.html" %}

{% block aside %}

{% include 'includes/nav-proveedor.html' %}

{% endblock %}

{% block contenido %}

Cree nuevos productos para su proveedor:

	Crear producto

{% if productos|length > 0 %}

					#
					Contacto
					Role

				{% for producto in productos %}

					1
					{{ producto.nombre_producto }}
					Otto

				{% endfor %}

{% else %}

	Lo sentimos! Aún no tiene productos registrados para su proveedor

{% endif %}

{% endblock %}


text:
package org.onosproject.ospf.controller.impl;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.Ip6Address;

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

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

/**
 * Unit test class for OspfDeviceTedImpl.
 */
public class OspfDeviceTedImplTest {
    private OspfDeviceTedImpl ospfDeviceTed;

    @Before
    public void setUp() throws Exception {
        ospfDeviceTed = new OspfDeviceTedImpl();
    }

    @After
    public void tearDown() throws Exception {
        ospfDeviceTed = null;
    }

    /**
     * Tests ipv4RouterIds() getter method.
     */
    @Test
    public void testIpv4RouterIds() throws Exception {
        List list = new ArrayList();
        list.add(Ip4Address.valueOf("1.1.1.1"));
        ospfDeviceTed.setIpv4RouterIds(list);
        assertThat(ospfDeviceTed.ipv4RouterIds().size(), is(1));
    }

    /**
     * Tests ipv4RouterIds() setter method.
     */
    @Test
    public void testSetIpv4RouterIds() throws Exception {
        List list = new ArrayList();
        list.add(Ip4Address.valueOf("1.1.1.1"));
        ospfDeviceTed.setIpv4RouterIds(list);
        assertThat(ospfDeviceTed.ipv4RouterIds().size(), is(1));
    }

    /**
     * Tests abr() getter method.
     */
    @Test
    public void testAbr() throws Exception {
        ospfDeviceTed.setAbr(true);
        assertThat(ospfDeviceTed.abr(), is(true));
    }

    /**
     * Tests abr() setter method.
     */
    @Test
    public void testSetAbr() throws Exception {
        ospfDeviceTed.setAbr(true);
        assertThat(ospfDeviceTed.abr(), is(true));
    }

    /**
     * Tests asbr() getter method.
     */
    @Test
    public void testAsbr() throws Exception {
        ospfDeviceTed.setAsbr(true);
        assertThat(ospfDeviceTed.asbr(), is(true));
    }

    /**
     * Tests asbr() setter method.
     */
    @Test
    public void testSetAsbr() throws Exception {
        ospfDeviceTed.setAsbr(true);
        assertThat(ospfDeviceTed.asbr(), is(true));
    }

    /**
     * Tests topologyIds() getter method.
     */
    @Test
    public void testTopologyIds() throws Exception {
        List list = new ArrayList();
        list.add(Ip4Address.valueOf("1.1.1.1"));
        ospfDeviceTed.setTopologyIds(list);
        assertThat(ospfDeviceTed.topologyIds().size(), is(1));
    }

    /**
     * Tests topologyIds() setter method.
     */
    @Test
    public void testSetTopologyIds() throws Exception {
        List list = new ArrayList();
        list.add(Ip4Address.valueOf("1.1.1.1"));
        ospfDeviceTed.setTopologyIds(list);
        assertThat(ospfDeviceTed.topologyIds().size(), is(1));
    }

    /**
     * Tests ipv6RouterIds() getter method.
     */
    @Test
    public void testIpv6RouterIds() throws Exception {
        List list = new ArrayList();
        list.add(Ip6Address.valueOf(1));
        ospfDeviceTed.setIpv6RouterIds(list);
        assertThat(ospfDeviceTed.ipv6RouterIds().size(), is(1));
    }

    /**
     * Tests ipv6RouterIds() setter method.
     */
    @Test
    public void testSetIpv6RouterIds() throws Exception {
        List list = new ArrayList();
        list.add(Ip6Address.valueOf(1));
        ospfDeviceTed.setIpv6RouterIds(list);
        assertThat(ospfDeviceTed.ipv6RouterIds().size(), is(1));
    }
}


text:
from unittest import TestCase

from metrology.instruments.counter import Counter

class CounterTest(TestCase):
    def setUp(self):
        self.counter = Counter()

    def test_increment(self):
        self.counter.increment()
        self.assertEqual(1, self.counter.count)

    def test_increment_more(self):
        self.counter.increment(10)
        self.assertEqual(10, self.counter.count)

    def test_clear(self):
        self.counter.increment(10)
        self.counter.clear()
        self.assertEqual(0, self.counter.count)

    def test_decrement(self):
        self.counter.increment(10)
        self.counter.decrement()
        self.assertEqual(9, self.counter.count)

    def test_decrement_more(self):
        self.counter.increment(10)
        self.counter.decrement(9)
        self.assertEqual(1, self.counter.count)


text:
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/10.2R3/junos">
    <multi-routing-engine-results>
        <multi-routing-engine-item>
            <re-name>node0</re-name>
            </multi-routing-engine-item>
            <multi-routing-engine-item>
                <re-name>node1</re-name>
                </multi-routing-engine-item>
				<multi-routing-engine-item>
					<chassis-inventory xmlns="http://xml.juniper.net/junos/12.1X46/junos-chassis">
						<chassis junos:style="inventory">
							<name>Chassis</name>
							<description>FIREFLY-PERIMETER</description>
							<chassis-module>
								<name>Midplane</name>
							</chassis-module>
							<chassis-module>
								<name>System IO</name>
							</chassis-module>
							<chassis-module>
								<name>Backplane</name>
								<serial-number>123456789</serial-number>
							</chassis-module>
							<chassis-module>
								<name>Routing Engine</name>
								<description>FIREFLY-PERIMETER RE</description>
							</chassis-module>
							<chassis-module>
								<name>FPC 0</name>
								<description>Virtual FPC</description>
								<chassis-sub-module>
									<name>PIC 0</name>
									<description>Virtual GE</description>
								</chassis-sub-module>
							</chassis-module>
							<chassis-module>
								<name>Power Supply 0</name>
							</chassis-module>
						</chassis>
					</chassis-inventory>
				</multi-routing-engine-item>
            </multi-routing-engine-results>
            <cli>
                <banner>{disabled:node0}</banner>
            </cli>
        </rpc-reply>


text:
import { combineReducers, Reducer } from 'redux';
import { RootState } from '../typings/RootTypings';
import gameReducer from './gameReducer';

const rootReducer: Reducer<RootState> = combineReducers({
  game: gameReducer
});

export default rootReducer;


text:
ActiveRecord::Schema.define do
  create_table "articles", :force => true do |t|
    t.column  :title, :text
    t.column  :body, :text
  end

  create_table "comments", :force => true do |t|
    t.references  :article
    t.column  :title, :text
    t.column  :body, :text
  end
end


text:
'use babel';
export default function bluewire(config) {
let bw = {};
bw.postNew = function(body, onSuccess, onError)
{
  var xhr = new XMLHttpRequest();
  xhr.open('POST', '' + config.address + '/new', true);
  xhr.setRequestHeader("Accept","application/json");
  xhr.setRequestHeader("Content-Type","application/json");
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState == 4) {
      if (xhr.status == 204 || xhr.status == 205) {
        onSuccess();
      } else if (xhr.status >= 200 && xhr.status < 300) {
        var value = JSON.parse(xhr.responseText);
        onSuccess(value);
      } else {
        var value = JSON.parse(xhr.responseText);
        onError(value);
      }
    }
};
  xhr.send(JSON.stringify(body)
);
};

bw.getAppByApplication = function(application, onSuccess, onError)
{
  var xhr = new XMLHttpRequest();
  xhr.open('GET', '' + config.address + '/app/' + encodeURIComponent(application) + '', true);
  xhr.setRequestHeader("Accept","application/json");
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState == 4) {
      if (xhr.status == 204 || xhr.status == 205) {
        onSuccess();
      } else if (xhr.status >= 200 && xhr.status < 300) {
        var value = JSON.parse(xhr.responseText);
        onSuccess(value);
      } else {
        var value = JSON.parse(xhr.responseText);
        onError(value);
      }
    }
};
  xhr.send(null);
};

bw.postAppByApplicationHeartbeat = function(application, onSuccess, onError)
{
  var xhr = new XMLHttpRequest();
  xhr.open('POST', '' + config.address + '/app/' + encodeURIComponent(application) + '/heartbeat', true);
  xhr.setRequestHeader("Accept","application/json");
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState == 4) {
      if (xhr.status == 204 || xhr.status == 205) {
        onSuccess();
      } else if (xhr.status >= 200 && xhr.status < 300) {
        var value = JSON.parse(xhr.responseText);
        onSuccess(value);
      } else {
        var value = JSON.parse(xhr.responseText);
        onError(value);
      }
    }
};
  xhr.send(null);
};

bw.getAppByApplicationKicks = function(application, onSuccess, onError)
{
  var xhr = new XMLHttpRequest();
  xhr.open('GET', '' + config.address + '/app/' + encodeURIComponent(application) + '/kicks', true);
  xhr.setRequestHeader("Accept","application/json");
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState == 4) {
      if (xhr.status == 204 || xhr.status == 205) {
        onSuccess();
      } else if (xhr.status >= 200 && xhr.status < 300) {
        var value = JSON.parse(xhr.responseText);
        onSuccess(value);
      } else {
        var value = JSON.parse(xhr.responseText);
        onError(value);
      }
    }
};
  xhr.send(null);
};

bw.postAppByApplicationKicks = function(application, body, onSuccess, onError)
{
  var xhr = new XMLHttpRequest();
  xhr.open('POST', '' + config.address + '/app/' + encodeURIComponent(application) + '/kicks', true);
  xhr.setRequestHeader("Accept","application/json");
  xhr.setRequestHeader("Content-Type","application/json");
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState == 4) {
      if (xhr.status == 204 || xhr.status == 205) {
        onSuccess();
      } else if (xhr.status >= 200 && xhr.status < 300) {
        var value = JSON.parse(xhr.responseText);
        onSuccess(value);
      } else {
        var value = JSON.parse(xhr.responseText);
        onError(value);
      }
    }
};
  xhr.send(JSON.stringify(body)
);
};

bw.postAppByApplicationKicksAdd = function(application, body, onSuccess, onError)
{
  var xhr = new XMLHttpRequest();
  xhr.open('POST', '' + config.address + '/app/' + encodeURIComponent(application) + '/kicks/add', true);
  xhr.setRequestHeader("Accept","application/json");
  xhr.setRequestHeader("Content-Type","application/json");
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState == 4) {
      if (xhr.status == 204 || xhr.status == 205) {
        onSuccess();
      } else if (xhr.status >= 200 && xhr.status < 300) {
        var value = JSON.parse(xhr.responseText);
        onSuccess(value);
      } else {
        var value = JSON.parse(xhr.responseText);
        onError(value);
      }
    }
};
  xhr.send(JSON.stringify(body)
);
};

bw.getConfig = function(onSuccess, onError)
{
  var xhr = new XMLHttpRequest();
  xhr.open('GET', '' + config.address + '/config', true);
  xhr.setRequestHeader("Accept","application/json");
  xhr.onreadystatechange = function (e) {
    if (xhr.readyState == 4) {
      if (xhr.status == 204 || xhr.status == 205) {
        onSuccess();
      } else if (xhr.status >= 200 && xhr.status < 300) {
        var value = JSON.parse(xhr.responseText);
        onSuccess(value);
      } else {
        var value = JSON.parse(xhr.responseText);
        onError(value);
      }
    }
};
  xhr.send(null);
};

return bw;
}


text:
define(function (require, exports, module) {
// This grammar is from the XML and XML Namespace specs. It specifies whether
// a string (such as an element or attribute name) is a valid Name or QName.
//
// Name           ::= NameStartChar (NameChar)*
// NameStartChar  ::= ":" | [A-Z] | "_" | [a-z] |
//                    [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] |
//                    [#x370-#x37D] | [#x37F-#x1FFF] |
//                    [#x200C-#x200D] | [#x2070-#x218F] |
//                    [#x2C00-#x2FEF] | [#x3001-#xD7FF] |
//                    [#xF900-#xFDCF] | [#xFDF0-#xFFFD] |
//                    [#x10000-#xEFFFF]
//
// NameChar       ::= NameStartChar | "-" | "." | [0-9] |
//                    #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
//
// QName          ::= PrefixedName| UnprefixedName
// PrefixedName   ::= Prefix ':' LocalPart
// UnprefixedName ::= LocalPart
// Prefix         ::= NCName
// LocalPart      ::= NCName
// NCName         ::= Name - (Char* ':' Char*)
//                    # An XML Name, minus the ":"
//

exports.isValidName = isValidName;
exports.isValidQName = isValidQName;

// Most names will be ASCII only. Try matching against simple regexps first
var simplename = /^[_:A-Za-z][-.:\w]+$/;
var simpleqname = /^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/

// If the regular expressions above fail, try more complex ones that work
// for any identifiers using codepoints from the Unicode BMP
var ncnamestartchars = "_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02ff\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";
var ncnamechars = "-._A-Za-z0-9\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02ff\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203f\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";

var ncname = "[" + ncnamestartchars + "][" + ncnamechars + "]*";
var namestartchars = ncnamestartchars + ":";
var namechars = ncnamechars + ":";
var name = new RegExp("^[" + namestartchars + "]" + "[" + namechars + "]*$");
var qname = new RegExp("^(" + ncname + "|" + ncname + ":" + ncname + ")$");

// XML says that these characters are also legal:
// [#x10000-#xEFFFF].  So if the patterns above fail, and the
// target string includes surrogates, then try the following
// patterns that allow surrogates and then run an extra validation
// step to make sure that the surrogates are in valid pairs and in
// the right range.  Note that since the characters \uf0000 to \u1f0000
// are not allowed, it means that the high surrogate can only go up to
// \uDB7f instead of \uDBFF.
var hassurrogates = /[\uD800-\uDB7F\uDC00-\uDFFF]/;
var surrogatechars = /[\uD800-\uDB7F\uDC00-\uDFFF]/g;
var surrogatepairs = /[\uD800-\uDB7F][\uDC00-\uDFFF]/g;

// Modify the variables above to allow surrogates
ncnamestartchars += "\uD800-\uDB7F\uDC00-\uDFFF";
ncnamechars += "\uD800-\uDB7F\uDC00-\uDFFF";
ncname = "[" + ncnamestartchars + "][" + ncnamechars + "]*";
namestartchars = ncnamestartchars + ":";
namechars = ncnamechars + ":";

// Build another set of regexps that include surrogates
var surrogatename = new RegExp("^[" + namestartchars + "]" + "[" + namechars + "]*$");
var surrogateqname = new RegExp("^(" + ncname + "|" + ncname + ":" + ncname + ")$");

function isValidName(s) {
  if (simplename.test(s)) return true; // Plain ASCII
  if (name.test(s)) return true; // Unicode BMP

  // Maybe the tests above failed because s includes surrogate pairs
  // Most likely, though, they failed for some more basic syntax problem
  if (!hassurrogates.test(s)) return false;

  // Is the string a valid name if we allow surrogates?
  if (!surrogatename.test(s)) return false;

  // Finally, are the surrogates all correctly paired up?
  var chars = s.match(surrogatechars), pairs = s.match(surrogatepairs);
  return pairs != null && 2*pairs.length === chars.length;
}

function isValidQName(s) {
  if (simpleqname.test(s)) return true; // Plain ASCII
  if (qname.test(s)) return true; // Unicode BMP

  if (!hassurrogates.test(s)) return false;
  if (!surrogateqname.test(s)) return false;
  var chars = s.match(surrogatechars), pairs = s.match(surrogatepairs);
  return pairs != null && 2*pairs.length === chars.length;
}

});


text:
package com.opensource.opencamera.ui;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import com.opensource.opencamera.Util;

class ResourceTexture extends BitmapTexture {

    protected final Context mContext;
    protected final int mResId;
    protected Bitmap mBitmap;

    public ResourceTexture(Context context, int resId) {
        mContext = Util.checkNotNull(context);
        mResId = resId;
    }

    @Override
    protected Bitmap getBitmap() {
        if (mBitmap != null) return mBitmap;
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inPreferredConfig = Bitmap.Config.ARGB_8888;
        mBitmap = BitmapFactory.decodeResource(
                mContext.getResources(), mResId, options);
        setSize(mBitmap.getWidth(), mBitmap.getHeight());
        return mBitmap;
    }

    @Override
    protected void freeBitmap(Bitmap bitmap) {
        Util.Assert(bitmap == mBitmap);
        bitmap.recycle();
        mBitmap = null;
    }
}


text:
"""
Destination registration view
"""

from aiohttp import web_exceptions
import simplejson as json

from sunhead.conf import settings
from sunhead.rest.views import JSONView

from aeroport.destinations.models import Destination

class BaseDestinationView(JSONView):

    @property
    def requested_destination(self):
        id_ = self.request.match_info.get("destination", None)
        return int(id_) if id_ else None

    def json_response(self, context_data=None, status=None):
        context_data.update(
            {
                "requested_destination": self.requested_destination,
            }
        )
        return super().json_response(context_data)

    def _extract_fields(self, item):
        fields = item._meta.model_class.get_fields()
        data = {
            name: getattr(item, name, None)
            for name in fields.keys()
        }
        return data

    def _get_json_field(self, txt):
        if txt is not None:
            return json.loads(txt)

class DestinationsListView(BaseDestinationView):

    async def get(self):
        destinations = await Destination.db_manager.execute(
            Destination.select()
        )
        ctx = {
            "destinations": [
                self._extract_fields(item) for item in destinations
            ]
        }
        return self.json_response(ctx)

    async def post(self):
        data = await self.request.post()
        kwargs = {
            "settings": self._get_json_field(data.get("settings", None)),
            "class_name": data.get("class_name"),
            "name": data.get("name"),
            "enabled": str(data.get("enabled")).lower() in {"true", "1"},
        }
        destination = await Destination.db_manager.create(Destination, **kwargs)
        kwargs["id"] = destination.id
        url = "{}/{}".format(settings.REST_URL_PREFIX, "destinations/{}/".format(destination.id))
        return self.created_response(kwargs, url)

class DestinationView(BaseDestinationView):

    async def get(self):
        destination = await self._get_destination()
        ctx = {
            "destination": self._extract_fields(destination),
        }
        return self.json_response(ctx)

    async def put(self):
        destination = await self._get_destination()
        data = await self.request.post()
        destination.settings = self._get_json_field(data.get("settings", None))
        destination.class_name = data.get("class_name")
        destination.name = data.get("name")
        destination.enabled = str(data.get("enabled")).lower() in {"true", "1"}
        await Destination.db_manager.update(destination)

        raise web_exceptions.HTTPNoContent

    async def delete(self):
        destination = await self._get_destination()
        await Destination.db_manager.delete(destination)
        raise web_exceptions.HTTPNoContent

    async def _get_destination(self) -> Destination:
        destination = await Destination.db_manager.get(
            Destination, id=self.requested_destination
        )
        return destination


text:
class UpdateControllersTeammateReview < ActiveRecord::Migration
  def self.up
    perm = Permission.find_by_name("do assignments")
    controller = SiteController.find_or_create_by(name: "teammate_review")
    controller.permission_id = perm.id
    controller.save

    ControllerAction.create(:site_controller_id => controller.id, :name => 'new')

    teammate_review_action = ControllerAction.find_or_create_by(name: 'goto_teammate_reviews')
    teammate_review_action.site_controller_id = controller.id
    teammate_review_action.save

    controller = SiteController.find_by_name("tree_display")
    action = ControllerAction.create(:site_controller_id => controller.id, :name => 'goto_teammate_reviews')

    item = MenuItem.find_by_name('manage/questionnaires')
    maxseq = MenuItem.where(parent_id: item.id).length
    MenuItem.create(:name => 'manage/questionnaires/teammate reviews', :label => 'Teammate Review', :parent_id => item.id, :seq => maxseq+1, :controller_action_id => action.id)

    Role.rebuild_cache
  end

  def self.down
  end
end


text:
package org.aieonf.commons.hex;

import java.io.*;

import org.aieonf.commons.hex.HexConvertor.Convert;

public class HexWriter extends Writer
{
	//The mode hex <=>string
	private Convert mode;

	//Use a string writer for the actual work
	private StringWriter writer;

	/**
	 * Create a writer that converts Strings to hex strings
	 * @param mode int
	 */
	public HexWriter( Convert mode )
	{
		super();
		this.mode = mode;
		this.writer = new StringWriter();
	}

	/**
	 * Create a writer that converts Strings to hex strings.
	 * Use the given lock to synchronise access
	 *
	 * @param mode int
	 * @param lock Object
	 */
	public HexWriter( Convert mode, Object lock )
	{
		super( lock );
		this.mode = mode;
		this.writer = new StringWriter();
	}

	/**
	 * close the writer
	 *
	 * @throws IOException
	 */
	@Override
	public void close() throws IOException
	{
		this.writer.close();
	}

	/**
	 * flush the writer
	 *
	 * @throws IOException
	 */
	@Override
	public void flush() throws IOException
	{
		this.writer.flush();
	}

	/**
	 * write the given char array from the given offset and the given length
	 *
	 * @param charArray char[]
	 * @param offset int
	 * @param length int
	 * @throws IOException
	 */
	@Override
	public void write( char[] charArray, int offset, int length ) throws IOException
	{
		String hex;
		String str = new String( charArray );
		if( Convert.CONVERT_TO_HEX.equals( this.mode ))
			hex = HexConvertor.convertHex( str.getBytes() );
		else
			hex = String.valueOf( HexConvertor.convertBytes( str ));

		this.writer.write( hex, offset, length );
		return;
	}
}


text:
id: 56533eb9ac21ba0edf2244b8
title: Concatenare le stringhe con l'operatore +=
challengeType: 1
videoUrl: 'https://scrimba.com/c/cbQmmC4'
forumTopicId: 16803
dashedName: concatenating-strings-with-the-plus-equals-operator
---

# --description--

Possiamo anche usare l'operatore `+=` per <dfn>concatenare</dfn> una stringa alla fine di una variabile stringa esistente. Questo può essere molto utile per rompere una stringa lunga su diverse righe.

**Nota:** Attenzione agli spazi. La concatenazione non aggiunge spazi tra le stringhe concatenate, quindi dovrai aggiungerli da solo.

Esempio:

```js
let ourStr = "I come first. ";
ourStr += "I come second.";
```

`ourStr` ora ha un valore stringa `I come first. I come second.`.

# --instructions--

Costruisci `myStr` su diverse righe concatenando queste due stringhe: `This is the first sentence.` e `This is the second sentence.` usando l'operatore `+=`. Usa l'operatore `+=` in modo simile a quello mostrato nell'esempio e assicurati di includere uno spazio tra le due stringhe. Inizia assegnando la prima stringa a `myStr`, quindi aggiungi la seconda.

# --hints--

`myStr` dovrebbe avere un valore stringa `This is the first sentence. This is the second sentence.`

```js
assert(myStr === 'This is the first sentence. This is the second sentence.');
```

Dovresti usare l'operatore `+=` per costruire `myStr`.

```js
assert(code.match(/myStr\s*\+=\s*(["']).*\1/g));
```

# --seed--

## --after-user-code--

```js
(function(){
  if(typeof myStr === 'string') {
    return 'myStr = "' + myStr + '"';
  } else {
    return 'myStr is not a string';
  }
})();
```

## --seed-contents--

```js
let myStr;
```

# --solutions--

```js
let myStr = "This is the first sentence. ";
myStr += "This is the second sentence.";
```


text:
<!---

This README is automatically generated from the comments in these files:
paper-styles.html

Edit those files, and our readme bot will duplicate them over here!
Edit this file, and the bot will squash your changes :)

The bot does some handling of markdown. Please file a bug if it does the wrong
thing! https://github.com/PolymerLabs/tedium/issues

-->

[![Build status](https://travis-ci.org/PolymerElements/paper-styles.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-styles)

_[Demo and API docs](https://elements.polymer-project.org/elements/paper-styles)_

## <paper-styles>

The `<paper-styles>` component provides simple ways to use Material Design CSS styles
in your application. The following imports are available:

1. [color.html](https://github.com/PolymerElements/paper-styles/blob/master/color.html):
a complete list of the colors defined in the Material Design [palette](https://www.google.com/design/spec/style/color.html)

1. [default-theme.html](https://github.com/PolymerElements/paper-styles/blob/master/default-theme.html): text,
background and accent colors that match the default Material Design theme

1. [shadow.html](https://github.com/PolymerElements/paper-styles/blob/master/shadow.html): Material Design
[elevation](https://www.google.com/design/spec/what-is-material/elevation-shadows.html) and shadow styles

1. [typography.html](https://github.com/PolymerElements/paper-styles/blob/master/typography.html):
Material Design [font](http://www.google.com/design/spec/style/typography.html#typography-styles) styles and sizes

1. [demo-pages.html](https://github.com/PolymerElements/paper-styles/blob/master/demo-pages.html): generic styles
used in the PolymerElements demo pages

We recommend importing each of these individual files, and using the style mixins
available in each ones, rather than the aggregated `paper-styles.html` as a whole.

## Changes in 2.0
- removed deprecated `/deep/` styles. Files removed: `classes/shadow-layout.html`, `demo.css`.


text:
.contribution-selection-page UL
{
	margin-left: 40px;
	list-style: square;
}

.contribution-selection-page .resumeables
{
	margin-bottom: 3em;
}

.contribution-selection-page DIV.resumeables UL LI
{
	list-style-type:none;
	font-size: 12px;
	line-height: 1.5em;
	width: 600px;
	position: relative;
}

.contribution-selection-page DIV.resumeables UL LI SPAN.removelink
{
	position: absolute;
	right: 3px;
}

.contribution-selection-page DIV.resumeables UL LI SPAN.resumable
{
	display:inline-block;
	width:520px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dialogflow/v2/audio_config.proto

package com.google.cloud.dialogflow.v2;

public interface InputAudioConfigOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.InputAudioConfig)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. Audio encoding of the audio content to process.
   *

   *
   * .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1;
   *
   * @return The enum numeric value on the wire for audioEncoding.
   */
  int getAudioEncodingValue();
  /**
   *
   *
   *

   * Required. Audio encoding of the audio content to process.
   *

   *
   * .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1;
   *
   * @return The audioEncoding.
   */
  com.google.cloud.dialogflow.v2.AudioEncoding getAudioEncoding();

  /**
   *
   *
   *

   * Required. Sample rate (in Hertz) of the audio content sent in the query.
   * Refer to
   * [Cloud Speech API
   * documentation](https://cloud.google.com/speech-to-text/docs/basics) for
   * more details.
   *

   *
   * int32 sample_rate_hertz = 2;
   *
   * @return The sampleRateHertz.
   */
  int getSampleRateHertz();

  /**
   *
   *
   *

   * Required. The language of the supplied audio. Dialogflow does not do
   * translations. See [Language
   * Support](https://cloud.google.com/dialogflow/docs/reference/language)
   * for a list of the currently supported language codes. Note that queries in
   * the same session do not necessarily need to specify the same language.
   *

   *
   * string language_code = 3;
   *
   * @return The languageCode.
   */
  java.lang.String getLanguageCode();
  /**
   *
   *
   *

   * Required. The language of the supplied audio. Dialogflow does not do
   * translations. See [Language
   * Support](https://cloud.google.com/dialogflow/docs/reference/language)
   * for a list of the currently supported language codes. Note that queries in
   * the same session do not necessarily need to specify the same language.
   *

   *
   * string language_code = 3;
   *
   * @return The bytes for languageCode.
   */
  com.google.protobuf.ByteString getLanguageCodeBytes();

  /**
   *
   *
   *

   * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in
   * [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech
   * words, e.g. start and end time offsets. If false or unspecified, Speech
   * doesn't return any word-level information.
   *

   *
   * bool enable_word_info = 13;
   *
   * @return The enableWordInfo.
   */
  boolean getEnableWordInfo();

  /**
   *
   *
   *

   * A list of strings containing words and phrases that the speech
   * recognizer should recognize with higher likelihood.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   * This field is deprecated. Please use [speech_contexts]() instead. If you
   * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will
   * treat the [phrase_hints]() as a single additional [SpeechContext]().
   *

   *
   * repeated string phrase_hints = 4 [deprecated = true];
   *
   * @deprecated google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See
   *     google/cloud/dialogflow/v2/audio_config.proto;l=220
   * @return A list containing the phraseHints.
   */
  @java.lang.Deprecated
  java.util.List<java.lang.String> getPhraseHintsList();
  /**
   *
   *
   *

   * A list of strings containing words and phrases that the speech
   * recognizer should recognize with higher likelihood.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   * This field is deprecated. Please use [speech_contexts]() instead. If you
   * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will
   * treat the [phrase_hints]() as a single additional [SpeechContext]().
   *

   *
   * repeated string phrase_hints = 4 [deprecated = true];
   *
   * @deprecated google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See
   *     google/cloud/dialogflow/v2/audio_config.proto;l=220
   * @return The count of phraseHints.
   */
  @java.lang.Deprecated
  int getPhraseHintsCount();
  /**
   *
   *
   *

   * A list of strings containing words and phrases that the speech
   * recognizer should recognize with higher likelihood.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   * This field is deprecated. Please use [speech_contexts]() instead. If you
   * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will
   * treat the [phrase_hints]() as a single additional [SpeechContext]().
   *

   *
   * repeated string phrase_hints = 4 [deprecated = true];
   *
   * @deprecated google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See
   *     google/cloud/dialogflow/v2/audio_config.proto;l=220
   * @param index The index of the element to return.
   * @return The phraseHints at the given index.
   */
  @java.lang.Deprecated
  java.lang.String getPhraseHints(int index);
  /**
   *
   *
   *

   * A list of strings containing words and phrases that the speech
   * recognizer should recognize with higher likelihood.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   * This field is deprecated. Please use [speech_contexts]() instead. If you
   * specify both [phrase_hints]() and [speech_contexts](), Dialogflow will
   * treat the [phrase_hints]() as a single additional [SpeechContext]().
   *

   *
   * repeated string phrase_hints = 4 [deprecated = true];
   *
   * @deprecated google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See
   *     google/cloud/dialogflow/v2/audio_config.proto;l=220
   * @param index The index of the value to return.
   * @return The bytes of the phraseHints at the given index.
   */
  @java.lang.Deprecated
  com.google.protobuf.ByteString getPhraseHintsBytes(int index);

  /**
   *
   *
   *

   * Context information to assist speech recognition.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   *

   *
   * repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;
   */
  java.util.List<com.google.cloud.dialogflow.v2.SpeechContext> getSpeechContextsList();
  /**
   *
   *
   *

   * Context information to assist speech recognition.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   *

   *
   * repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;
   */
  com.google.cloud.dialogflow.v2.SpeechContext getSpeechContexts(int index);
  /**
   *
   *
   *

   * Context information to assist speech recognition.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   *

   *
   * repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;
   */
  int getSpeechContextsCount();
  /**
   *
   *
   *

   * Context information to assist speech recognition.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   *

   *
   * repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;
   */
  java.util.List<? extends com.google.cloud.dialogflow.v2.SpeechContextOrBuilder>
      getSpeechContextsOrBuilderList();
  /**
   *
   *
   *

   * Context information to assist speech recognition.
   * See [the Cloud Speech
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
   * for more details.
   *

   *
   * repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;
   */
  com.google.cloud.dialogflow.v2.SpeechContextOrBuilder getSpeechContextsOrBuilder(int index);

  /**
   *
   *
   *

   * Which Speech model to select for the given request. Select the
   * model best suited to your domain to get best results. If a model is not
   * explicitly specified, then we auto-select a model based on the parameters
   * in the InputAudioConfig.
   * If enhanced speech model is enabled for the agent and an enhanced
   * version of the specified model for the language does not exist, then the
   * speech is recognized using the standard version of the specified model.
   * Refer to
   * [Cloud Speech API
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
   * for more details.
   *

   *
   * string model = 7;
   *
   * @return The model.
   */
  java.lang.String getModel();
  /**
   *
   *
   *

   * Which Speech model to select for the given request. Select the
   * model best suited to your domain to get best results. If a model is not
   * explicitly specified, then we auto-select a model based on the parameters
   * in the InputAudioConfig.
   * If enhanced speech model is enabled for the agent and an enhanced
   * version of the specified model for the language does not exist, then the
   * speech is recognized using the standard version of the specified model.
   * Refer to
   * [Cloud Speech API
   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
   * for more details.
   *

   *
   * string model = 7;
   *
   * @return The bytes for model.
   */
  com.google.protobuf.ByteString getModelBytes();

  /**
   *
   *
   *

   * Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use.
   *

   *
   * .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10;
   *
   * @return The enum numeric value on the wire for modelVariant.
   */
  int getModelVariantValue();
  /**
   *
   *
   *

   * Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use.
   *

   *
   * .google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10;
   *
   * @return The modelVariant.
   */
  com.google.cloud.dialogflow.v2.SpeechModelVariant getModelVariant();

  /**
   *
   *
   *

   * If `false` (default), recognition does not cease until the
   * client closes the stream.
   * If `true`, the recognizer will detect a single spoken utterance in input
   * audio. Recognition ceases when it detects the audio's voice has
   * stopped or paused. In this case, once a detected intent is received, the
   * client should close the stream and start a new request with a new stream as
   * needed.
   * Note: This setting is relevant only for streaming methods.
   * Note: When specified, InputAudioConfig.single_utterance takes precedence
   * over StreamingDetectIntentRequest.single_utterance.
   *

   *
   * bool single_utterance = 8;
   *
   * @return The singleUtterance.
   */
  boolean getSingleUtterance();

  /**
   *
   *
   *

   * Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and
   * [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent].
   * If `false` and recognition doesn't return any result, trigger
   * `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.
   *

   *
   * bool disable_no_speech_recognized_event = 14;
   *
   * @return The disableNoSpeechRecognizedEvent.
   */
  boolean getDisableNoSpeechRecognizedEvent();
}


text:
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)

# Remote Shell via Telegram Bot

Very dangerous shell via Telegram.

### Make your bot.
  https://core.telegram.org/bots

### Set `.netrc` with Telegram Bot Token.
```
machine api.telegram.org
  login anonymous
  password <YOUR_TOKEN>
```

### Run
```
python telegram-shell.py
```

### Make your command script in `cmd` folder, e.g., `ls.sh`.
```
#!/bin/bash
ls repos
```

### Send `ls` to your bot and get the result.


text:
package org.jboss.pnc.mock.repository;

import org.jboss.pnc.model.BuildConfigurationAudited;
import org.jboss.pnc.model.IdRev;
import org.jboss.pnc.spi.datastore.repositories.BuildConfigurationAuditedRepository;
import org.jboss.pnc.spi.datastore.repositories.api.PageInfo;
import org.jboss.pnc.spi.datastore.repositories.api.Predicate;
import org.jboss.pnc.spi.datastore.repositories.api.SortInfo;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

/**
 * Author: Michal Szynkiewicz, michal.l.szynkiewicz@gmail.com
 * Date: 9/22/16
 * Time: 12:25 PM
 */
public class BuildConfigurationAuditedRepositoryMock implements BuildConfigurationAuditedRepository {

    private final AtomicInteger idSequence = new AtomicInteger(0);
    protected final List<BuildConfigurationAudited> data = new ArrayList<>();

    @Override
    public BuildConfigurationAudited save(BuildConfigurationAudited entity) {
        IdRev id = entity.getId();
        if (id == null) {
            throw new IllegalStateException("auto-setting " + this.getClass().getSimpleName() + " entity id is not supported");
        }
        getOptionalById(id).ifPresent(data::remove);
        data.add(entity);
        return entity;
    }

    @Override
    public List<BuildConfigurationAudited> queryAll() {
        return data;
    }

    @Override
    public List<BuildConfigurationAudited> queryAll(PageInfo pageInfo, SortInfo sortInfo) {
        return null;
    }

    @Override
    public List<BuildConfigurationAudited> queryWithPredicates(PageInfo pageInfo, SortInfo sortInfo, Predicate<BuildConfigurationAudited>... predicates) {
        return null;
    }

    @Override
    public List<BuildConfigurationAudited> queryWithPredicates(Predicate<BuildConfigurationAudited>... predicates) {
        return null;
    }

    @Override
    public int count(Predicate<BuildConfigurationAudited>... predicates) {
        return 0;
    }

    @Override
    public BuildConfigurationAudited queryByPredicates(Predicate<BuildConfigurationAudited>... predicates) {
        return null;
    }

    @Override
    public void delete(IdRev id) {
        data.removeIf(c -> c.getId().equals(id));
    }

    @Override
    public List<BuildConfigurationAudited> findAllByIdOrderByRevDesc(Integer id) {
        return data.stream()
                .filter(c -> c.getId().getId().equals(id))
                .sorted((c1, c2) -> c2.getId().getRev().compareTo(c1.getId().getRev()))
                .collect(Collectors.toList());
    }

    private Optional<BuildConfigurationAudited> getOptionalById(IdRev id) {
        return data.stream()
                .filter(m -> id.equals(m.getId()))
                .findAny();
    }

    @Override
    public BuildConfigurationAudited queryById(IdRev id) {
        return getOptionalById(id).orElseThrow(() -> new RuntimeException("Didn't find entity for id: " + id));
    }
}


text:
using namespace llvm;

//===----------------------------------------------------------------------===//
// MDString implementation.
//

void MDString::anchor() { }

MDString::MDString(LLVMContext &C)
  : Value(Type::getMetadataTy(C), Value::MDStringVal) {}

MDString *MDString::get(LLVMContext &Context, StringRef Str) {
  LLVMContextImpl *pImpl = Context.pImpl;
  StringMapEntry<Value*> &Entry =
    pImpl->MDStringCache.GetOrCreateValue(Str);
  Value *&S = Entry.getValue();
  if (!S) S = new MDString(Context);
  S->setValueName(&Entry);
  return cast<MDString>(S);
}

//===----------------------------------------------------------------------===//
// MDNodeOperand implementation.
//

// Use CallbackVH to hold MDNode operands.
namespace llvm {
class MDNodeOperand : public CallbackVH {
  MDNode *getParent() {
    MDNodeOperand *Cur = this;

    while (Cur->getValPtrInt() != 1)
      --Cur;

    assert(Cur->getValPtrInt() == 1 &&
           "Couldn't find the beginning of the operand list!");
    return reinterpret_cast<MDNode*>(Cur) - 1;
  }

public:
  MDNodeOperand(Value *V) : CallbackVH(V) {}
  virtual ~MDNodeOperand();

  void set(Value *V) {
    unsigned IsFirst = this->getValPtrInt();
    this->setValPtr(V);
    this->setAsFirstOperand(IsFirst);
  }

  /// setAsFirstOperand - Accessor method to mark the operand as the first in
  /// the list.
  void setAsFirstOperand(unsigned V) { this->setValPtrInt(V); }

  virtual void deleted();
  virtual void allUsesReplacedWith(Value *NV);
};
} // end namespace llvm.

// Provide out-of-line definition to prevent weak vtable.
MDNodeOperand::~MDNodeOperand() {}

void MDNodeOperand::deleted() {
  getParent()->replaceOperand(this, 0);
}

void MDNodeOperand::allUsesReplacedWith(Value *NV) {
  getParent()->replaceOperand(this, NV);
}

//===----------------------------------------------------------------------===//
// MDNode implementation.
//

/// getOperandPtr - Helper function to get the MDNodeOperand's coallocated on
/// the end of the MDNode.
static MDNodeOperand *getOperandPtr(MDNode *N, unsigned Op) {
  // Use <= instead of < to permit a one-past-the-end address.
  assert(Op <= N->getNumOperands() && "Invalid operand number");
  return reinterpret_cast<MDNodeOperand*>(N + 1) + Op;
}

void MDNode::replaceOperandWith(unsigned i, Value *Val) {
  MDNodeOperand *Op = getOperandPtr(this, i);
  replaceOperand(Op, Val);
}

MDNode::MDNode(LLVMContext &C, ArrayRef<Value*> Vals, bool isFunctionLocal)
: Value(Type::getMetadataTy(C), Value::MDNodeVal) {
  NumOperands = Vals.size();

  if (isFunctionLocal)
    setValueSubclassData(getSubclassDataFromValue() | FunctionLocalBit);

  // Initialize the operand list, which is co-allocated on the end of the node.
  unsigned i = 0;
  for (MDNodeOperand *Op = getOperandPtr(this, 0), *E = Op+NumOperands;
       Op != E; ++Op, ++i) {
    new (Op) MDNodeOperand(Vals[i]);

    // Mark the first MDNodeOperand as being the first in the list of operands.
    if (i == 0)
      Op->setAsFirstOperand(1);
  }
}

/// ~MDNode - Destroy MDNode.
MDNode::~MDNode() {
  assert((getSubclassDataFromValue() & DestroyFlag) != 0 &&
         "Not being destroyed through destroy()?");
  LLVMContextImpl *pImpl = getType()->getContext().pImpl;
  if (isNotUniqued()) {
    pImpl->NonUniquedMDNodes.erase(this);
  } else {
    pImpl->MDNodeSet.RemoveNode(this);
  }

  // Destroy the operands.
  for (MDNodeOperand *Op = getOperandPtr(this, 0), *E = Op+NumOperands;
       Op != E; ++Op)
    Op->~MDNodeOperand();
}

static const Function *getFunctionForValue(Value *V) {
  if (!V) return NULL;
  if (Instruction *I = dyn_cast<Instruction>(V)) {
    BasicBlock *BB = I->getParent();
    return BB ? BB->getParent() : 0;
  }
  if (Argument *A = dyn_cast<Argument>(V))
    return A->getParent();
  if (BasicBlock *BB = dyn_cast<BasicBlock>(V))
    return BB->getParent();
  if (MDNode *MD = dyn_cast<MDNode>(V))
    return MD->getFunction();
  return NULL;
}

#ifndef NDEBUG
static const Function *assertLocalFunction(const MDNode *N) {
  if (!N->isFunctionLocal()) return 0;

  // FIXME: This does not handle cyclic function local metadata.
  const Function *F = 0, *NewF = 0;
  for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
    if (Value *V = N->getOperand(i)) {
      if (MDNode *MD = dyn_cast<MDNode>(V))
        NewF = assertLocalFunction(MD);
      else
        NewF = getFunctionForValue(V);
    }
    if (F == 0)
      F = NewF;
    else
      assert((NewF == 0 || F == NewF) &&"inconsistent function-local metadata");
  }
  return F;
}
#endif

// getFunction - If this metadata is function-local and recursively has a
// function-local operand, return the first such operand's parent function.
// Otherwise, return null. getFunction() should not be used for performance-
// critical code because it recursively visits all the MDNode's operands.
const Function *MDNode::getFunction() const {
#ifndef NDEBUG
  return assertLocalFunction(this);
#else
  if (!isFunctionLocal()) return NULL;
  for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
    if (const Function *F = getFunctionForValue(getOperand(i)))
      return F;
  return NULL;
#endif
}

// destroy - Delete this node.  Only when there are no uses.
void MDNode::destroy() {
  setValueSubclassData(getSubclassDataFromValue() | DestroyFlag);
  // Placement delete, then free the memory.
  this->~MDNode();
  free(this);
}

/// isFunctionLocalValue - Return true if this is a value that would require a
/// function-local MDNode.
static bool isFunctionLocalValue(Value *V) {
  return isa<Instruction>(V) || isa<Argument>(V) || isa<BasicBlock>(V) ||
         (isa<MDNode>(V) && cast<MDNode>(V)->isFunctionLocal());
}

MDNode *MDNode::getMDNode(LLVMContext &Context, ArrayRef<Value*> Vals,
                          FunctionLocalness FL, bool Insert) {
  LLVMContextImpl *pImpl = Context.pImpl;

  // Add all the operand pointers. Note that we don't have to add the
  // isFunctionLocal bit because that's implied by the operands.
  // Note that if the operands are later nulled out, the node will be
  // removed from the uniquing map.
  FoldingSetNodeID ID;
  for (unsigned i = 0; i != Vals.size(); ++i)
    ID.AddPointer(Vals[i]);

  void *InsertPoint;
  MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);

  if (N || !Insert)
    return N;

  bool isFunctionLocal = false;
  switch (FL) {
  case FL_Unknown:
    for (unsigned i = 0; i != Vals.size(); ++i) {
      Value *V = Vals[i];
      if (!V) continue;
      if (isFunctionLocalValue(V)) {
        isFunctionLocal = true;
        break;
      }
    }
    break;
  case FL_No:
    isFunctionLocal = false;
    break;
  case FL_Yes:
    isFunctionLocal = true;
    break;
  }

  // Coallocate space for the node and Operands together, then placement new.
  void *Ptr = malloc(sizeof(MDNode) + Vals.size() * sizeof(MDNodeOperand));
  N = new (Ptr) MDNode(Context, Vals, isFunctionLocal);

  // Cache the operand hash.
  N->Hash = ID.ComputeHash();

  // InsertPoint will have been set by the FindNodeOrInsertPos call.
  pImpl->MDNodeSet.InsertNode(N, InsertPoint);

  return N;
}

MDNode *MDNode::get(LLVMContext &Context, ArrayRef<Value*> Vals) {
  return getMDNode(Context, Vals, FL_Unknown);
}

MDNode *MDNode::getWhenValsUnresolved(LLVMContext &Context,
                                      ArrayRef<Value*> Vals,
                                      bool isFunctionLocal) {
  return getMDNode(Context, Vals, isFunctionLocal ? FL_Yes : FL_No);
}

MDNode *MDNode::getIfExists(LLVMContext &Context, ArrayRef<Value*> Vals) {
  return getMDNode(Context, Vals, FL_Unknown, false);
}

MDNode *MDNode::getTemporary(LLVMContext &Context, ArrayRef<Value*> Vals) {
  MDNode *N =
    (MDNode *)malloc(sizeof(MDNode) + Vals.size() * sizeof(MDNodeOperand));
  N = new (N) MDNode(Context, Vals, FL_No);
  N->setValueSubclassData(N->getSubclassDataFromValue() |
                          NotUniquedBit);
  LeakDetector::addGarbageObject(N);
  return N;
}

void MDNode::deleteTemporary(MDNode *N) {
  assert(N->use_empty() && "Temporary MDNode has uses!");
  assert(!N->getContext().pImpl->MDNodeSet.RemoveNode(N) &&
         "Deleting a non-temporary uniqued node!");
  assert(!N->getContext().pImpl->NonUniquedMDNodes.erase(N) &&
         "Deleting a non-temporary non-uniqued node!");
  assert((N->getSubclassDataFromValue() & NotUniquedBit) &&
         "Temporary MDNode does not have NotUniquedBit set!");
  assert((N->getSubclassDataFromValue() & DestroyFlag) == 0 &&
         "Temporary MDNode has DestroyFlag set!");
  LeakDetector::removeGarbageObject(N);
  N->destroy();
}

/// getOperand - Return specified operand.
Value *MDNode::getOperand(unsigned i) const {
  assert(i < getNumOperands() && "Invalid operand number");
  return *getOperandPtr(const_cast<MDNode*>(this), i);
}

void MDNode::Profile(FoldingSetNodeID &ID) const {
  // Add all the operand pointers. Note that we don't have to add the
  // isFunctionLocal bit because that's implied by the operands.
  // Note that if the operands are later nulled out, the node will be
  // removed from the uniquing map.
  for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
    ID.AddPointer(getOperand(i));
}

void MDNode::setIsNotUniqued() {
  setValueSubclassData(getSubclassDataFromValue() | NotUniquedBit);
  LLVMContextImpl *pImpl = getType()->getContext().pImpl;
  pImpl->NonUniquedMDNodes.insert(this);
}

// Replace value from this node's operand list.
void MDNode::replaceOperand(MDNodeOperand *Op, Value *To) {
  Value *From = *Op;

  // If is possible that someone did GV->RAUW(inst), replacing a global variable
  // with an instruction or some other function-local object.  If this is a
  // non-function-local MDNode, it can't point to a function-local object.
  // Handle this case by implicitly dropping the MDNode reference to null.
  // Likewise if the MDNode is function-local but for a different function.
  if (To && isFunctionLocalValue(To)) {
    if (!isFunctionLocal())
      To = 0;
    else {
      const Function *F = getFunction();
      const Function *FV = getFunctionForValue(To);
      // Metadata can be function-local without having an associated function.
      // So only consider functions to have changed if non-null.
      if (F && FV && F != FV)
        To = 0;
    }
  }

  if (From == To)
    return;

  // Update the operand.
  Op->set(To);

  // If this node is already not being uniqued (because one of the operands
  // already went to null), then there is nothing else to do here.
  if (isNotUniqued()) return;

  LLVMContextImpl *pImpl = getType()->getContext().pImpl;

  // Remove "this" from the context map.  FoldingSet doesn't have to reprofile
  // this node to remove it, so we don't care what state the operands are in.
  pImpl->MDNodeSet.RemoveNode(this);

  // If we are dropping an argument to null, we choose to not unique the MDNode
  // anymore.  This commonly occurs during destruction, and uniquing these
  // brings little reuse.  Also, this means we don't need to include
  // isFunctionLocal bits in FoldingSetNodeIDs for MDNodes.
  if (To == 0) {
    setIsNotUniqued();
    return;
  }

  // Now that the node is out of the folding set, get ready to reinsert it.
  // First, check to see if another node with the same operands already exists
  // in the set.  If so, then this node is redundant.
  FoldingSetNodeID ID;
  Profile(ID);
  void *InsertPoint;
  if (MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint)) {
    replaceAllUsesWith(N);
    destroy();
    return;
  }

  // Cache the operand hash.
  Hash = ID.ComputeHash();
  // InsertPoint will have been set by the FindNodeOrInsertPos call.
  pImpl->MDNodeSet.InsertNode(this, InsertPoint);

  // If this MDValue was previously function-local but no longer is, clear
  // its function-local flag.
  if (isFunctionLocal() && !isFunctionLocalValue(To)) {
    bool isStillFunctionLocal = false;
    for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
      Value *V = getOperand(i);
      if (!V) continue;
      if (isFunctionLocalValue(V)) {
        isStillFunctionLocal = true;
        break;
      }
    }
    if (!isStillFunctionLocal)
      setValueSubclassData(getSubclassDataFromValue() & ~FunctionLocalBit);
  }
}

MDNode *MDNode::getMostGenericFPMath(MDNode *A, MDNode *B) {
  if (!A || !B)
    return NULL;

  APFloat AVal = cast<ConstantFP>(A->getOperand(0))->getValueAPF();
  APFloat BVal = cast<ConstantFP>(B->getOperand(0))->getValueAPF();
  if (AVal.compare(BVal) == APFloat::cmpLessThan)
    return A;
  return B;
}

static bool isContiguous(const ConstantRange &A, const ConstantRange &B) {
  return A.getUpper() == B.getLower() || A.getLower() == B.getUpper();
}

static bool canBeMerged(const ConstantRange &A, const ConstantRange &B) {
  return !A.intersectWith(B).isEmptySet() || isContiguous(A, B);
}

static bool tryMergeRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low,
                          ConstantInt *High) {
  ConstantRange NewRange(Low->getValue(), High->getValue());
  unsigned Size = EndPoints.size();
  APInt LB = cast<ConstantInt>(EndPoints[Size - 2])->getValue();
  APInt LE = cast<ConstantInt>(EndPoints[Size - 1])->getValue();
  ConstantRange LastRange(LB, LE);
  if (canBeMerged(NewRange, LastRange)) {
    ConstantRange Union = LastRange.unionWith(NewRange);
    Type *Ty = High->getType();
    EndPoints[Size - 2] = ConstantInt::get(Ty, Union.getLower());
    EndPoints[Size - 1] = ConstantInt::get(Ty, Union.getUpper());
    return true;
  }
  return false;
}

static void addRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low,
                     ConstantInt *High) {
  if (!EndPoints.empty())
    if (tryMergeRange(EndPoints, Low, High))
      return;

  EndPoints.push_back(Low);
  EndPoints.push_back(High);
}

MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) {
  // Given two ranges, we want to compute the union of the ranges. This
  // is slightly complitade by having to combine the intervals and merge
  // the ones that overlap.

  if (!A || !B)
    return NULL;

  if (A == B)
    return A;

  // First, walk both lists in older of the lower boundary of each interval.
  // At each step, try to merge the new interval to the last one we adedd.
  SmallVector<Value*, 4> EndPoints;
  int AI = 0;
  int BI = 0;
  int AN = A->getNumOperands() / 2;
  int BN = B->getNumOperands() / 2;
  while (AI < AN && BI < BN) {
    ConstantInt *ALow = cast<ConstantInt>(A->getOperand(2 * AI));
    ConstantInt *BLow = cast<ConstantInt>(B->getOperand(2 * BI));

    if (ALow->getValue().slt(BLow->getValue())) {
      addRange(EndPoints, ALow, cast<ConstantInt>(A->getOperand(2 * AI + 1)));
      ++AI;
    } else {
      addRange(EndPoints, BLow, cast<ConstantInt>(B->getOperand(2 * BI + 1)));
      ++BI;
    }
  }
  while (AI < AN) {
    addRange(EndPoints, cast<ConstantInt>(A->getOperand(2 * AI)),
             cast<ConstantInt>(A->getOperand(2 * AI + 1)));
    ++AI;
  }
  while (BI < BN) {
    addRange(EndPoints, cast<ConstantInt>(B->getOperand(2 * BI)),
             cast<ConstantInt>(B->getOperand(2 * BI + 1)));
    ++BI;
  }

  // If we have more than 2 ranges (4 endpoints) we have to try to merge
  // the last and first ones.
  unsigned Size = EndPoints.size();
  if (Size > 4) {
    ConstantInt *FB = cast<ConstantInt>(EndPoints[0]);
    ConstantInt *FE = cast<ConstantInt>(EndPoints[1]);
    if (tryMergeRange(EndPoints, FB, FE)) {
      for (unsigned i = 0; i < Size - 2; ++i) {
        EndPoints[i] = EndPoints[i + 2];
      }
      EndPoints.resize(Size - 2);
    }
  }

  // If in the end we have a single range, it is possible that it is now the
  // full range. Just drop the metadata in that case.
  if (EndPoints.size() == 2) {
    ConstantRange Range(cast<ConstantInt>(EndPoints[0])->getValue(),
                        cast<ConstantInt>(EndPoints[1])->getValue());
    if (Range.isFullSet())
      return NULL;
  }

  return MDNode::get(A->getContext(), EndPoints);
}

//===----------------------------------------------------------------------===//
// NamedMDNode implementation.
//

static SmallVector<TrackingVH<MDNode>, 4> &getNMDOps(void *Operands) {
  return *(SmallVector<TrackingVH<MDNode>, 4>*)Operands;
}

NamedMDNode::NamedMDNode(const Twine &N)
  : Name(N.str()), Parent(0),
    Operands(new SmallVector<TrackingVH<MDNode>, 4>()) {
}

NamedMDNode::~NamedMDNode() {
  dropAllReferences();
  delete &getNMDOps(Operands);
}

/// getNumOperands - Return number of NamedMDNode operands.
unsigned NamedMDNode::getNumOperands() const {
  return (unsigned)getNMDOps(Operands).size();
}

/// getOperand - Return specified operand.
MDNode *NamedMDNode::getOperand(unsigned i) const {
  assert(i < getNumOperands() && "Invalid Operand number!");
  return dyn_cast<MDNode>(&*getNMDOps(Operands)[i]);
}

/// addOperand - Add metadata Operand.
void NamedMDNode::addOperand(MDNode *M) {
  assert(!M->isFunctionLocal() &&
         "NamedMDNode operands must not be function-local!");
  getNMDOps(Operands).push_back(TrackingVH<MDNode>(M));
}

/// eraseFromParent - Drop all references and remove the node from parent
/// module.
void NamedMDNode::eraseFromParent() {
  getParent()->eraseNamedMetadata(this);
}

/// dropAllReferences - Remove all uses and clear node vector.
void NamedMDNode::dropAllReferences() {
  getNMDOps(Operands).clear();
}

/// getName - Return a constant reference to this named metadata's name.
StringRef NamedMDNode::getName() const {
  return StringRef(Name);
}

//===----------------------------------------------------------------------===//
// Instruction Metadata method implementations.
//

void Instruction::setMetadata(StringRef Kind, MDNode *Node) {
  if (Node == 0 && !hasMetadata()) return;
  setMetadata(getContext().getMDKindID(Kind), Node);
}

MDNode *Instruction::getMetadataImpl(StringRef Kind) const {
  return getMetadataImpl(getContext().getMDKindID(Kind));
}

/// setMetadata - Set the metadata of of the specified kind to the specified
/// node.  This updates/replaces metadata if already present, or removes it if
/// Node is null.
void Instruction::setMetadata(unsigned KindID, MDNode *Node) {
  if (Node == 0 && !hasMetadata()) return;

  // Handle 'dbg' as a special case since it is not stored in the hash table.
  if (KindID == LLVMContext::MD_dbg) {
    DbgLoc = DebugLoc::getFromDILocation(Node);
    return;
  }

  // Handle the case when we're adding/updating metadata on an instruction.
  if (Node) {
    LLVMContextImpl::MDMapTy &Info = getContext().pImpl->MetadataStore[this];
    assert(!Info.empty() == hasMetadataHashEntry() &&
           "HasMetadata bit is wonked");
    if (Info.empty()) {
      setHasMetadataHashEntry(true);
    } else {
      // Handle replacement of an existing value.
      for (unsigned i = 0, e = Info.size(); i != e; ++i)
        if (Info[i].first == KindID) {
          Info[i].second = Node;
          return;
        }
    }

    // No replacement, just add it to the list.
    Info.push_back(std::make_pair(KindID, Node));
    return;
  }

  // Otherwise, we're removing metadata from an instruction.
  assert((hasMetadataHashEntry() ==
          getContext().pImpl->MetadataStore.count(this)) &&
         "HasMetadata bit out of date!");
  if (!hasMetadataHashEntry())
    return;  // Nothing to remove!
  LLVMContextImpl::MDMapTy &Info = getContext().pImpl->MetadataStore[this];

  // Common case is removing the only entry.
  if (Info.size() == 1 && Info[0].first == KindID) {
    getContext().pImpl->MetadataStore.erase(this);
    setHasMetadataHashEntry(false);
    return;
  }

  // Handle removal of an existing value.
  for (unsigned i = 0, e = Info.size(); i != e; ++i)
    if (Info[i].first == KindID) {
      Info[i] = Info.back();
      Info.pop_back();
      assert(!Info.empty() && "Removing last entry should be handled above");
      return;
    }
  // Otherwise, removing an entry that doesn't exist on the instruction.
}

MDNode *Instruction::getMetadataImpl(unsigned KindID) const {
  // Handle 'dbg' as a special case since it is not stored in the hash table.
  if (KindID == LLVMContext::MD_dbg)
    return DbgLoc.getAsMDNode(getContext());

  if (!hasMetadataHashEntry()) return 0;

  LLVMContextImpl::MDMapTy &Info = getContext().pImpl->MetadataStore[this];
  assert(!Info.empty() && "bit out of sync with hash table");

  for (LLVMContextImpl::MDMapTy::iterator I = Info.begin(), E = Info.end();
       I != E; ++I)
    if (I->first == KindID)
      return I->second;
  return 0;
}

void Instruction::getAllMetadataImpl(SmallVectorImpl<std::pair<unsigned,
                                       MDNode*> > &Result) const {
  Result.clear();

  // Handle 'dbg' as a special case since it is not stored in the hash table.
  if (!DbgLoc.isUnknown()) {
    Result.push_back(std::make_pair((unsigned)LLVMContext::MD_dbg,
                                    DbgLoc.getAsMDNode(getContext())));
    if (!hasMetadataHashEntry()) return;
  }

  assert(hasMetadataHashEntry() &&
         getContext().pImpl->MetadataStore.count(this) &&
         "Shouldn't have called this");
  const LLVMContextImpl::MDMapTy &Info =
    getContext().pImpl->MetadataStore.find(this)->second;
  assert(!Info.empty() && "Shouldn't have called this");

  Result.append(Info.begin(), Info.end());

  // Sort the resulting array so it is stable.
  if (Result.size() > 1)
    array_pod_sort(Result.begin(), Result.end());
}

void Instruction::
getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl<std::pair<unsigned,
                                    MDNode*> > &Result) const {
  Result.clear();
  assert(hasMetadataHashEntry() &&
         getContext().pImpl->MetadataStore.count(this) &&
         "Shouldn't have called this");
  const LLVMContextImpl::MDMapTy &Info =
    getContext().pImpl->MetadataStore.find(this)->second;
  assert(!Info.empty() && "Shouldn't have called this");
  Result.append(Info.begin(), Info.end());

  // Sort the resulting array so it is stable.
  if (Result.size() > 1)
    array_pod_sort(Result.begin(), Result.end());
}

/// clearMetadataHashEntries - Clear all hashtable-based metadata from
/// this instruction.
void Instruction::clearMetadataHashEntries() {
  assert(hasMetadataHashEntry() && "Caller should check");
  getContext().pImpl->MetadataStore.erase(this);
  setHasMetadataHashEntry(false);
}


text:
title: Telerik.Web.UI.Calendar.View.RichUITemplateControl
page_title: Telerik.Web.UI.Calendar.View.RichUITemplateControl
description: Telerik.Web.UI.Calendar.View.RichUITemplateControl
---

# Telerik.Web.UI.Calendar.View.RichUITemplateControl

Summary description for RichUITemplateControl.

## Inheritance Hierarchy

* System.Object
* Telerik.Web.UI.Calendar.Persistence.PropertiesObject
* Telerik.Web.UI.Calendar.View.RichUITemplateControl

## Properties

###  TemplateID `String`

Persists the ID of the template used by this instance of RichUITemplateControl if
            any. The TemplateID could be used to index the Templates collection and instantiate
            the required template.

## Methods

###  Reset

Reset all properties to their defaults.

#### Returns

`System.Void`

###  GetClientData

#### Returns

`System.Collections.ArrayList`


text:
package org.bouncycastle.asn1.cmp;

import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;

public class POPODecKeyChallContent
    extends ASN1Object
{
    private ASN1Sequence content;

    private POPODecKeyChallContent(ASN1Sequence seq)
    {
        content = seq;
    }

    public static POPODecKeyChallContent getInstance(Object o)
    {
        if (o instanceof POPODecKeyChallContent)
        {
            return (POPODecKeyChallContent)o;
        }

        if (o != null)
        {
            return new POPODecKeyChallContent(ASN1Sequence.getInstance(o));
        }

        return null;
    }

    public Challenge[] toChallengeArray()
    {
        Challenge[] result = new Challenge[content.size()];

        for (int i = 0; i != result.length; i++)
        {
            result[i] = Challenge.getInstance(content.getObjectAt(i));
        }

        return result;
    }

    /**
     * <pre>
     * POPODecKeyChallContent ::= SEQUENCE OF Challenge
     * </pre>
     * @return a basic ASN.1 object representation.
     */
    public ASN1Primitive toASN1Primitive()
    {
        return content;
    }
}


text: A HTML/CSS demo of a collapsing header


text:
import * as akala from '@akala/core';

function requireIfExists(id: string)
{
    try
    {
        return require(id);
    }
    catch (e)
    {
        if (e.code == 'MODULE_NOT_FOUND')
            return null;
        throw e;
    }
};

akala.defaultInjector.injectWithNameAsync(['$agent.api/@domojs/chat'], (client) =>
{
    var chat = requireIfExists('chat');
    if (chat)
        chat.meta.createServerProxy(client).register({ name: 'rfx', path: require.resolve('./interpreter') })
});


text:
<!DOCTYPE html>

        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

        <title>Javascript - Transitions | Aero Admin</title>
        <meta name="author" content="">

        <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />

        <link href="bower_components/Materialize/dist/css/materialize.css" rel="stylesheet" type="text/css" />
        <link href="bower_components/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css" />
        <link href="bower_components/code-prettify/src/prettify.css" rel="stylesheet" type="text/css" />
        <link href="css/admin.css" rel="stylesheet" type="text/css" />

        <link href="css/themes/light.css" id="ssThemeColor" rel="stylesheet" type="text/css" />
        <link href="css/themes/main/materialize-red.css" id="ssMainColor" rel="stylesheet" type="text/css" />
        <link href="css/themes/alternative/red.css" id="ssAlternativeColor" rel="stylesheet" type="text/css" />

        <link href="css/theme-switcher.css" rel="stylesheet" type="text/css" />

        <link href="css/pages/js_transitions.css" rel="stylesheet" type="text/css" />

        <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">

                                    Aero Admin

Dashboard

Documentation

                                        CSSarrow_drop_down

                                        Componentsarrow_drop_down

                                        Javascriptarrow_drop_down

                                        APPsarrow_drop_down

                                        Pagesarrow_drop_down

                                            John Doe
                                            arrow_drop_down

Color

Grid

Helpers

Media

Sass

Shadow

Table

Typography

Badges

Buttons

Breadcrumbs

Cards

Chips

Collections

Footer

Forms

Icons

Navbar

Pagination

Preloader

Collapsible

Dialogs

Dropdown

Media

Modals

Parallax

Pushpin

ScrollFire

Scrollspy

SideNav

Tabs

Transitions

Waves

CRUD

Pricing Table

DataTables

Maps

Charts

Blank

Login

Register

Forgot Password

Error 400

Error 403

Error 404

Error 500

Profile

Logout

                                menu

                                    Aero Admin

                                Dashboard

                                        CSS

Color

Grid

Helpers

Media

Sass

Shadow

Table

Typography

                                        Components

Badges

Buttons

Breadcrumbs

Cards

Chips

Collections

Footer

Forms

Icons

Navbar

Pagination

Preloader

                                        JavaScript

Collapsible

Dialogs

Dropdown

Media

Modals

Parallax

Pushpin

ScrollFire

Scrollspy

SideNav

Tabs

Transitions

Waves

                                        APPs

CRUD

Pricing Table

Datatables

Maps

Charts

				                transform Transitions

We've made some custom animation functions that will transition your content. It's recommended to use this with our ScrollFire Plugin to make your content transition in as you scroll.

showStaggeredList

Use this to create a staggered reveal effect for any UL Tag with list items. Just make sure the list items in the UL are opacity: 0; to ensure the animation works correctly.

                        	Click Me

<a href="#!" class="btn" onclick="Materialize.showStaggeredList('#staggered-test')">Click Me</a>

List Item

This is a description

List Item

This is a description

List Item

This is a description

List Item

This is a description

List Item

This is a description

fadeInImage

Use this to fade in images. It also animates grayscale and brightness to give it a unique effect.

                        	Click Me

<a href="#!" class="btn" onclick="Materialize.fadeInImage('#image-test')">Click Me</a>

Aero Admin

A Material Design based admin template.

You can use rows and columns here to organize your footer content.

Documentation

Please, in case of doubt read the documentation. If the doubt still remains, don't hesitate to contact me. I'll be glad to help you or even listen to your suggestions. :)

Links

Dashboard

CSS

Components

Javascript

Profile

                    © 2016 Aero Admin, All rights reserved.


text:
package org.hoteia.qalingo.core.jms.syncserveur.producer;

import javax.annotation.Resource;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TextMessage;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.JmsException;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Component;

import com.fasterxml.jackson.core.JsonProcessingException;

import org.hoteia.qalingo.core.mapper.XmlMapper;

@Component(value = "syncServeurStatusMessageProducer")
public class SyncServeurStatusMessageProducer {

    protected final Log logger = LogFactory.getLog(getClass());

    @Resource(name="syncServeurStatusJmsTemplate")
    private JmsTemplate jmsTemplate;

    @Autowired
    protected XmlMapper xmlMapper;

    /**
     * Generates JMS messages
     *
     */
    public void generateAndSendMessages(final SyncServeurMessageJms syncServeurMessageJms) {
        try {
            final String valueJMSMessage = xmlMapper.getXmlMapper().writeValueAsString(syncServeurMessageJms);

            if(StringUtils.isNotEmpty(valueJMSMessage)){
                jmsTemplate.send( new MessageCreator() {
                    public Message createMessage(Session session) throws JMSException {
                        TextMessage message = session.createTextMessage(valueJMSMessage);
                        if (logger.isDebugEnabled()) {
                            logger.info("Sending JMS message: " + valueJMSMessage);
                        }
                        return message;
                    }
                });
            } else {
                logger.warn("SyncServeur Jms Message is empty");
            }

        } catch (JmsException e) {
            logger.error("Exception during create/send message process");
        } catch (JsonProcessingException e) {
            logger.error("Exception during build message process");
        }
    }

}


text:
from config.dev import config
from abc import ABCMeta, abstractmethod

class ResourceType:
    BIGQUERY = 0
    LIVY = 1
    DB = 2

class Resource:

    __resources = {}

    @staticmethod
    def get(resource_id):
        if resource_id not in Resource.__resources:
            if ResourceType.BIGQUERY == int(resource_id):
                from com.sundaytoz.bigshow.resources.bigqueryadapter import BigQueryAdapter
                Resource.__resources[resource_id] = BigQueryAdapter(config=config['bigquery'])
            elif ResourceType.LIVY == int(resource_id):
                from com.sundaytoz.bigshow.resources.livyadapter import LivyAdapter
                Resource.__resources[resource_id] = LivyAdapter()
        return Resource.__resources[resource_id]

class ResourceAdapter(metaclass=ABCMeta):

    @abstractmethod
    def query(self, job_id, query_type, query, query_params=None):
        pass

    @abstractmethod
    def get_result(self, job_id):
        pass


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>de.matrixweb.smaller</groupId>
    <artifactId>server</artifactId>
    <version>0.8.9-SNAPSHOT</version>
  </parent>
  <artifactId>osgi-server</artifactId>
  <packaging>pom</packaging>

  <name>Smaller :: Server :: OSGi Server</name>

  <dependencies>
    <dependency>
      <groupId>de.matrixweb.osgi</groupId>
      <artifactId>osgi-kernel</artifactId>
    </dependency>
    <dependency>
      <groupId>de.matrixweb.osgi</groupId>
      <artifactId>osgi-file</artifactId>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.http.jetty</artifactId>
      <version>2.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <version>${osgi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.configadmin</artifactId>
      <version>1.4.0</version>
    </dependency>

    <dependency>
      <groupId>de.matrixweb.osgi</groupId>
      <artifactId>osgi-telnet</artifactId>
      <version>0.1.0</version>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>osgi-http</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>closure</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>coffeescript</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>cssembed</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>lessjs</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>jshint</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>eslint</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>browserify</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>svgo</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>csso</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>sweetjs</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>merge</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>uglifyjs</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>yuicompressor</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>ycssmin</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <descriptor>src/main/assembly/package.xml</descriptor>
        </configuration>
        <executions>
          <execution>
            <id>package</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>