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

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Jerry
 */
@Entity
@Table(name = "message")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Message.findAll", query = "SELECT m FROM Message m")
    , @NamedQuery(name = "Message.findByIdmessage", query = "SELECT m FROM Message m WHERE m.idmessage = :idmessage")
    , @NamedQuery(name = "Message.findByIduser", query = "SELECT m FROM Message m WHERE m.iduser = :iduser")
    , @NamedQuery(name = "Message.findByIdevent", query = "SELECT m FROM Message m WHERE m.idevent = :idevent")
    , @NamedQuery(name = "Message.findByTimesent", query = "SELECT m FROM Message m WHERE m.timesent = :timesent")})
public class Message implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "idmessage")
    private Integer idmessage;
    @Lob
    @Size(max = 2147483647)
    @Column(name = "content")
    private String content;
    @Column(name = "iduser")
    private Integer iduser;
    @Column(name = "idevent")
    private Integer idevent;
    @Column(name = "timesent")
    @Temporal(TemporalType.TIMESTAMP)
    private Date timesent;

    public Message() {
    }

    public Message(Integer idmessage) {
        this.idmessage = idmessage;
    }

    public Integer getIdmessage() {
        return idmessage;
    }

    public void setIdmessage(Integer idmessage) {
        this.idmessage = idmessage;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getIduser() {
        return iduser;
    }

    public void setIduser(Integer iduser) {
        this.iduser = iduser;
    }

    public Integer getIdevent() {
        return idevent;
    }

    public void setIdevent(Integer idevent) {
        this.idevent = idevent;
    }

    public Date getTimesent() {
        return timesent;
    }

    public void setTimesent(Date timesent) {
        this.timesent = timesent;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idmessage != null ? idmessage.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Message)) {
            return false;
        }
        Message other = (Message) object;
        if ((this.idmessage == null && other.idmessage != null) || (this.idmessage != null && !this.idmessage.equals(other.idmessage))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "GoHost.Message[ idmessage=" + idmessage + " ]";
    }

}


text:
namespace flex
{
	Timer::Timer(sec duration) :
		duration(duration)
	{}

	Timer::Timer(sec duration, sec initialRemaining) :
		duration(duration),
		remaining(initialRemaining)
	{}

	bool Timer::Update()
	{
		if (remaining > 0.0f)
		{
			remaining -= bUseUnpausedDeltaTime ? g_UnpausedDeltaTime : g_DeltaTime;
			if (remaining <= 0.0f)
			{
				remaining = 0.0f;
				return true;
			}
		}

		return (remaining == 0.0f);
	}

	void Timer::Restart()
	{
		remaining = duration;
	}

	void Timer::Complete()
	{
		remaining = 0.0f;
	}
} // namespace flex

redpajama_set_name: RedPajamaGithub


text:
package jwt_test

import (
	"encoding/json"
	"testing"
	"time"

	"github.com/lestrrat/go-jwx/jwt"
	"github.com/stretchr/testify/assert"
)

func TestClaimSet(t *testing.T) {
	c1 := jwt.NewClaimSet()
	if !assert.NoError(t, c1.Set("jti", "AbCdEfG"), "setting jti should work") {
		return
	}
	if !assert.NoError(t, c1.Set("sub", "foobar@example.com"), "setting sub should work") {
		return
	}

	// Silly fix to remove monotonic element from time.Time obatained
	// from time.Now(). Without this, the equality comparison goes
	// ga-ga for golang tip (1.9)
	now := time.Unix(time.Now().Unix(), 0)
	if !assert.NoError(t, c1.Set("iat", now.Unix()), "setting iat to now should work") {
		return
	}
	if !assert.NoError(t, c1.Set("nbf", now.Add(5*time.Second)), "setting nbf should work") {
		return
	}
	if !assert.NoError(t, c1.Set("exp", now.Add(10*time.Second).Unix()), "setting exp should work") {
		return
	}
	if !assert.NoError(t, c1.Set("custom", "MyValue"), "setting custom should work") {
		return
	}

	jsonbuf1, err := json.MarshalIndent(c1, "", "  ")
	if !assert.NoError(t, err, "JSON marshal should succeed") {
		return
	}
	t.Logf("%s", jsonbuf1)

	c2 := jwt.NewClaimSet()
	if !assert.NoError(t, json.Unmarshal(jsonbuf1, c2), "JSON unmarshal should succeed") {
		return
	}

	jsonbuf2, err := json.MarshalIndent(c2, "", "  ")
	if !assert.NoError(t, err, "JSON marshal should succeed") {
		return
	}
	t.Logf("%s", jsonbuf2)

	if !assert.Equal(t, c1, c2, "Claim sets match") {
		return
	}
}

func TestGHIssue10_iss(t *testing.T) {
	c := jwt.NewClaimSet()
	c.Issuer = "github.com/lestrrat/go-jwx"

	// This should succeed, because WithIssuer is not provided in the
	// optinal parameters
	if !assert.NoError(t, c.Verify(), "claimset.Verify should succeed") {
		return
	}

	// This should succeed, because WithIssuer is provided with same value
	if !assert.NoError(t, c.Verify(jwt.WithIssuer(c.Issuer)), "claimset.Verify should succeed") {
		return
	}

	if !assert.Error(t, c.Verify(jwt.WithIssuer("poop")), "claimset.Verify should fail") {
		return
	}
}

func TestGHIssue10_aud(t *testing.T) {
	c := jwt.NewClaimSet()
	c.Audience = []string{
		"foo",
		"bar",
		"baz",
	}

	// This should succeed, because WithAudience is not provided in the
	// optinal parameters
	if !assert.NoError(t, c.Verify(), "claimset.Verify should succeed") {
		return
	}

	// This should succeed, because WithAudience is provided, and its
	// value matches one of the audience values
	if !assert.NoError(t, c.Verify(jwt.WithAudience("baz")), "claimset.Verify should succeed") {
		return
	}

	if !assert.Error(t, c.Verify(jwt.WithAudience("poop")), "claimset.Verify should fail") {
		return
	}
}

func TestGHIssue10_sub(t *testing.T) {
	c := jwt.NewClaimSet()
	c.Subject = "github.com/lestrrat/go-jwx"

	// This should succeed, because WithSubject is not provided in the
	// optinal parameters
	if !assert.NoError(t, c.Verify(), "claimset.Verify should succeed") {
		return
	}

	// This should succeed, because WithSubject is provided with same value
	if !assert.NoError(t, c.Verify(jwt.WithSubject(c.Subject)), "claimset.Verify should succeed") {
		return
	}

	if !assert.Error(t, c.Verify(jwt.WithSubject("poop")), "claimset.Verify should fail") {
		return
	}
}

func TestGHIssue10_nbf(t *testing.T) {
	c := jwt.NewClaimSet()

	// NotBefore is set to future date
	tm := time.Now().Add(72 * time.Hour)
	c.NotBefore = &jwt.NumericDate{tm}

	// This should fail, because nbf is the future
	if !assert.Error(t, c.Verify(), "claimset.Verify should fail") {
		return
	}

	// This should succeed, because we have given reaaaaaaly big skew
	// that is well enough to get us accepted
	if !assert.NoError(t, c.Verify(jwt.WithAcceptableSkew(73*time.Hour)), "claimset.Verify should succeed") {
		return
	}

	// This should succeed, because we have given a time
	// that is well enough into the future
	if !assert.NoError(t, c.Verify(jwt.WithClock(jwt.ClockFunc(func() time.Time { return tm.Add(time.Hour) }))), "claimset.Verify should succeed") {
		return
	}
}

func TestGHIssue10_exp(t *testing.T) {
	c := jwt.NewClaimSet()

	// issuedat = 1 Hr before current time
	tm := time.Now()
	c.IssuedAt = tm.Unix() - 3600

	// valid for 2 minutes only from IssuedAt
	c.Expiration = c.IssuedAt + 120

	// This should fail, because exp is set in the past
	if !assert.Error(t, c.Verify(), "claimset.Verify should fail") {
		return
	}

	// This should succeed, because we have given big skew
	// that is well enough to get us accepted
	if !assert.NoError(t, c.Verify(jwt.WithAcceptableSkew(time.Hour)), "claimset.Verify should succeed") {
		return
	}

	// This should succeed, because we have given a time
	// that is well enough into the past
	if !assert.NoError(t, c.Verify(jwt.WithClock(jwt.ClockFunc(func() time.Time { return tm.Add(-3500 * time.Second) }))), "claimset.Verify should succeed") {
		return
	}
}


text:
from syncless.util import Queue
from syncless import coio

import paths
paths.setup()

from socketless.channel import Channel, DisconnectedException
from socketless.channelserver import ChannelServer
import rawsocket_echoserver_core

class EchoServer(ChannelServer):
    """docstring for Handler"""
    def __init__(self, listener):
        super(EchoServer, self).__init__(listener)
        print 'started'

    def handle_connection(self, c, address):
        print 'New connection from %s:%s' % address
        try:
            rawsocket_echoserver_core.receiver(c)
            c.close()
        except DisconnectedException:
            print 'Client disconnected'

def main():
    EchoServer(('127.0.0.1', 5555))

if __name__ == '__main__':
    main()


text:
package me.adaptive.arp.api;

import java.io.Serializable;

/**
   Interface for Managing the Linkedin operations

   @author Carlos Lozano Diez
   @since v2.0
   @version 1.0
*/
public interface ILinkedIn extends IBaseSocial, Serializable {
}

/**
------------------------------------| Engineered with ♥ in Barcelona, Catalonia |--------------------------------------
*/


text:
/**
 */
package gluemodel.substationStandard.LNNodes.LNGroupX.impl;

import gluemodel.substationStandard.Enumerations.SwitchTypeKind;
import gluemodel.substationStandard.Enumerations.SwitchingCapabilityKind;

import gluemodel.substationStandard.LNNodes.LNGroupC.CSWI;

import gluemodel.substationStandard.LNNodes.LNGroupX.LNGroupXPackage;
import gluemodel.substationStandard.LNNodes.LNGroupX.XSWI;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 *
 * An implementation of the model object 'XSWI'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link gluemodel.substationStandard.LNNodes.LNGroupX.impl.XSWIImpl#getSwOpCap Sw Op Cap}

 *
{@link gluemodel.substationStandard.LNNodes.LNGroupX.impl.XSWIImpl#getMaxOpCap Max Op Cap}

 *
{@link gluemodel.substationStandard.LNNodes.LNGroupX.impl.XSWIImpl#getSwTyp Sw Typ}

 *
{@link gluemodel.substationStandard.LNNodes.LNGroupX.impl.XSWIImpl#getSwitchControl Switch Control}

 *

 *
 * @generated
 */
public class XSWIImpl extends GroupXImpl implements XSWI {
	/**
	 * The default value of the '{@link #getSwOpCap() Sw Op Cap}' attribute.
	 *
	 *
	 * @see #getSwOpCap()
	 * @generated
	 * @ordered
	 */
	protected static final SwitchingCapabilityKind SW_OP_CAP_EDEFAULT = SwitchingCapabilityKind.NONE;

	/**
	 * The cached value of the '{@link #getSwOpCap() Sw Op Cap}' attribute.
	 *
	 *
	 * @see #getSwOpCap()
	 * @generated
	 * @ordered
	 */
	protected SwitchingCapabilityKind swOpCap = SW_OP_CAP_EDEFAULT;

	/**
	 * The default value of the '{@link #getMaxOpCap() Max Op Cap}' attribute.
	 *
	 *
	 * @see #getMaxOpCap()
	 * @generated
	 * @ordered
	 */
	protected static final SwitchingCapabilityKind MAX_OP_CAP_EDEFAULT = SwitchingCapabilityKind.NONE;

	/**
	 * The cached value of the '{@link #getMaxOpCap() Max Op Cap}' attribute.
	 *
	 *
	 * @see #getMaxOpCap()
	 * @generated
	 * @ordered
	 */
	protected SwitchingCapabilityKind maxOpCap = MAX_OP_CAP_EDEFAULT;

	/**
	 * The default value of the '{@link #getSwTyp() Sw Typ}' attribute.
	 *
	 *
	 * @see #getSwTyp()
	 * @generated
	 * @ordered
	 */
	protected static final SwitchTypeKind SW_TYP_EDEFAULT = SwitchTypeKind.LOAD_BREAK;

	/**
	 * The cached value of the '{@link #getSwTyp() Sw Typ}' attribute.
	 *
	 *
	 * @see #getSwTyp()
	 * @generated
	 * @ordered
	 */
	protected SwitchTypeKind swTyp = SW_TYP_EDEFAULT;

	/**
	 * The cached value of the '{@link #getSwitchControl() Switch Control}' reference.
	 *
	 *
	 * @see #getSwitchControl()
	 * @generated
	 * @ordered
	 */
	protected CSWI switchControl;

	/**
	 *
	 *
	 * @generated
	 */
	protected XSWIImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return LNGroupXPackage.Literals.XSWI;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public SwitchingCapabilityKind getSwOpCap() {
		return swOpCap;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setSwOpCap(SwitchingCapabilityKind newSwOpCap) {
		SwitchingCapabilityKind oldSwOpCap = swOpCap;
		swOpCap = newSwOpCap == null ? SW_OP_CAP_EDEFAULT : newSwOpCap;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LNGroupXPackage.XSWI__SW_OP_CAP, oldSwOpCap, swOpCap));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public SwitchingCapabilityKind getMaxOpCap() {
		return maxOpCap;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setMaxOpCap(SwitchingCapabilityKind newMaxOpCap) {
		SwitchingCapabilityKind oldMaxOpCap = maxOpCap;
		maxOpCap = newMaxOpCap == null ? MAX_OP_CAP_EDEFAULT : newMaxOpCap;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LNGroupXPackage.XSWI__MAX_OP_CAP, oldMaxOpCap, maxOpCap));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public SwitchTypeKind getSwTyp() {
		return swTyp;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setSwTyp(SwitchTypeKind newSwTyp) {
		SwitchTypeKind oldSwTyp = swTyp;
		swTyp = newSwTyp == null ? SW_TYP_EDEFAULT : newSwTyp;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LNGroupXPackage.XSWI__SW_TYP, oldSwTyp, swTyp));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public CSWI getSwitchControl() {
		if (switchControl != null && switchControl.eIsProxy()) {
			InternalEObject oldSwitchControl = (InternalEObject)switchControl;
			switchControl = (CSWI)eResolveProxy(oldSwitchControl);
			if (switchControl != oldSwitchControl) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, LNGroupXPackage.XSWI__SWITCH_CONTROL, oldSwitchControl, switchControl));
			}
		}
		return switchControl;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public CSWI basicGetSwitchControl() {
		return switchControl;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setSwitchControl(CSWI newSwitchControl) {
		CSWI oldSwitchControl = switchControl;
		switchControl = newSwitchControl;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LNGroupXPackage.XSWI__SWITCH_CONTROL, oldSwitchControl, switchControl));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case LNGroupXPackage.XSWI__SW_OP_CAP:
				return getSwOpCap();
			case LNGroupXPackage.XSWI__MAX_OP_CAP:
				return getMaxOpCap();
			case LNGroupXPackage.XSWI__SW_TYP:
				return getSwTyp();
			case LNGroupXPackage.XSWI__SWITCH_CONTROL:
				if (resolve) return getSwitchControl();
				return basicGetSwitchControl();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case LNGroupXPackage.XSWI__SW_OP_CAP:
				setSwOpCap((SwitchingCapabilityKind)newValue);
				return;
			case LNGroupXPackage.XSWI__MAX_OP_CAP:
				setMaxOpCap((SwitchingCapabilityKind)newValue);
				return;
			case LNGroupXPackage.XSWI__SW_TYP:
				setSwTyp((SwitchTypeKind)newValue);
				return;
			case LNGroupXPackage.XSWI__SWITCH_CONTROL:
				setSwitchControl((CSWI)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case LNGroupXPackage.XSWI__SW_OP_CAP:
				setSwOpCap(SW_OP_CAP_EDEFAULT);
				return;
			case LNGroupXPackage.XSWI__MAX_OP_CAP:
				setMaxOpCap(MAX_OP_CAP_EDEFAULT);
				return;
			case LNGroupXPackage.XSWI__SW_TYP:
				setSwTyp(SW_TYP_EDEFAULT);
				return;
			case LNGroupXPackage.XSWI__SWITCH_CONTROL:
				setSwitchControl((CSWI)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case LNGroupXPackage.XSWI__SW_OP_CAP:
				return swOpCap != SW_OP_CAP_EDEFAULT;
			case LNGroupXPackage.XSWI__MAX_OP_CAP:
				return maxOpCap != MAX_OP_CAP_EDEFAULT;
			case LNGroupXPackage.XSWI__SW_TYP:
				return swTyp != SW_TYP_EDEFAULT;
			case LNGroupXPackage.XSWI__SWITCH_CONTROL:
				return switchControl != null;
		}
		return super.eIsSet(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (SwOpCap: ");
		result.append(swOpCap);
		result.append(", MaxOpCap: ");
		result.append(maxOpCap);
		result.append(", SwTyp: ");
		result.append(swTyp);
		result.append(')');
		return result.toString();
	}

} //XSWIImpl


text:
/**
 * Compiler for riot custom tags
 * @version WIP
 */
//#if 0
/*eslint-env es6 */
/*global compile, compileHTML, compileCSS, compileJS, parsers */
/*eslint no-unused-vars: [2, {args: "after-used", varsIgnorePattern: "^brackets$"}] */
//#endif

import { brackets } from 'riot-tmpl'

//#include parsers_br

/**
 * @module compiler
 */
//#include core.js

var version = 'WIP'

export default {
  compile,
  compileHTML,
  compileCSS,
  compileJS,
  parsers,
  version
}


text:
<?php

/**
 * @file
 * Contains \Drupal\book\Controller\BookController.
 */

namespace Drupal\book\Controller;

use Drupal\book\BookExport;
use Drupal\book\BookManagerInterface;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Url;
use Drupal\node\Entity\Node;
use Drupal\node\NodeInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

/**
 * Controller routines for book routes.
 */
class BookController extends ControllerBase {

  /**
   * The book manager.
   *
   * @var \Drupal\book\BookManagerInterface
   */
  protected $bookManager;

  /**
   * The book export service.
   *
   * @var \Drupal\book\BookExport
   */
  protected $bookExport;

  /**
   * Constructs a BookController object.
   *
   * @param \Drupal\book\BookManagerInterface $bookManager
   *   The book manager.
   * @param \Drupal\book\BookExport $bookExport
   *   The book export service.
   */
  public function __construct(BookManagerInterface $bookManager, BookExport $bookExport) {
    $this->bookManager = $bookManager;
    $this->bookExport = $bookExport;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('book.manager'),
      $container->get('book.export')
    );
  }

  /**
   * Returns an administrative overview of all books.
   *
   * @return array
   *   A render array representing the administrative page content.
   *
   */
  public function adminOverview() {
    $rows = array();

    $headers = array(t('Book'), t('Operations'));
    // Add any recognized books to the table list.
    foreach ($this->bookManager->getAllBooks() as $book) {
      /** @var \Drupal\Core\Url $url */
      $url = $book['url'];
      if (isset($book['options'])) {
        $url->setOptions($book['options']);
      }
      $row = array(
        $this->l($book['title'], $url),
      );
      $links = array();
      $links['edit'] = array(
        'title' => t('Edit order and titles'),
        'url' => Url::fromRoute('book.admin_edit', ['node' => $book['nid']]),
      );
      $row[] = array(
        'data' => array(
          '#type' => 'operations',
          '#links' => $links,
        ),
      );
      $rows[] = $row;
    }
    return array(
      '#type' => 'table',
      '#header' => $headers,
      '#rows' => $rows,
      '#empty' => t('No books available.'),
    );
  }

  /**
   * Prints a listing of all books.
   *
   * @return array
   *   A render array representing the listing of all books content.
   */
  public function bookRender() {
    $book_list = array();
    foreach ($this->bookManager->getAllBooks() as $book) {
      $book_list[] = $this->l($book['title'], $book['url']);
    }
    return array(
      '#theme' => 'item_list',
      '#items' => $book_list,
      '#cache' => [
        'tags' => \Drupal::entityManager()->getDefinition('node')->getListCacheTags(),
      ],
    );
  }

  /**
   * Generates representations of a book page and its children.
   *
   * The method delegates the generation of output to helper methods. The method
   * name is derived by prepending 'bookExport' to the camelized form of given
   * output type. For example, a type of 'html' results in a call to the method
   * bookExportHtml().
   *
   * @param string $type
   *   A string encoding the type of output requested. The following types are
   *   currently supported in book module:
   *   - html: Printer-friendly HTML.
   *   Other types may be supported in contributed modules.
   * @param \Drupal\node\NodeInterface $node
   *   The node to export.
   *
   * @return array
   *   A render array representing the node and its children in the book
   *   hierarchy in a format determined by the $type parameter.
   *
   * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
   */
  public function bookExport($type, NodeInterface $node) {
    $method = 'bookExport' . Container::camelize($type);

    // @todo Convert the custom export functionality to serializer.
    if (!method_exists($this->bookExport, $method)) {
      drupal_set_message(t('Unknown export format.'));
      throw new NotFoundHttpException();
    }

    $exported_book = $this->bookExport->{$method}($node);
    return new Response(drupal_render($exported_book));
  }

}


text:
class QueryResult
{
public:
    QueryResult();
};

#endif // QUERYRESULT_H


text:
package com.vaadin.shared.ui.progressindicator;

import com.vaadin.shared.AbstractFieldState;
import com.vaadin.shared.annotations.NoLayout;
import com.vaadin.shared.communication.SharedState;

/**
 * {@link SharedState} for {@link com.vaadin.ui.ProgressBar}
 *
 * @since 7.1
 * @author Vaadin Ltd
 */
public class ProgressBarState extends AbstractFieldState {
    public static final String PRIMARY_STYLE_NAME = "v-progressbar";

    {
        primaryStyleName = PRIMARY_STYLE_NAME;
    }
    public boolean indeterminate = false;
    @NoLayout
    public float state = 0.0f;

}


text:
import gql from 'graphql-tag'
import gameParticipantsFragment from './gameParticipants'
import type { GameParticipantsType } from './gameParticipants'

export type GameInfoType = {
  id: string,
  name: string,
  owner: string,
  participants: Array<{
    ...$Exact<GameParticipantsType>
  }>
}

export default gql`
  fragment gameInfo on Game {
    id
    name
    owner
    ...gameParticipants
  }

  ${gameParticipantsFragment}
`


text:
#ifndef SRC_INCLUDE_UTIL_DEBUG_UTILS_H_
#define SRC_INCLUDE_UTIL_DEBUG_UTILS_H_

#include "include/common.h"

namespace tsnecuda {
namespace debug {

/**
 * @brief Print the NxM device matrix
 *
 * @tparam T The type of the device matrix
 * @param d_matrix The NxM matrix to print
 * @param N The number of rows in the matrix
 * @param M The number of columns in the matrix
 */
template <typename T>
void PrintArray(const thrust::device_vector<T> &d_matrix,
    const int N, const int M);

}  // namespace debug
}  // namespace tsnecuda

#endif  // SRC_INCLUDE_UTIL_DEBUG_UTILS_H_


text:
import shogun as sg

traindat = '../data/fm_train_real.dat'
testdat = '../data/fm_test_real.dat'
parameter_list=[[traindat,testdat, 2.0],[traindat,testdat, 3.0]]

def kernel_power (train_fname=traindat,test_fname=testdat, degree=2.0):
	from shogun import kernel, distance, CSVFile

	feats_train=sg.features(CSVFile(train_fname))
	feats_test=sg.features(CSVFile(test_fname))

	distance = sg.distance('EuclideanDistance')

	kernel = sg.kernel('PowerKernel', degree=degree, distance=distance)
	kernel.init(feats_train, feats_train)
	km_train=kernel.get_kernel_matrix()

	kernel.init(feats_train, feats_test)
	km_test=kernel.get_kernel_matrix()
	return km_train,km_test,kernel

if __name__=='__main__':
	print('Power')
	kernel_power(*parameter_list[0])


text:
require 'spec/spec_helper'

module MysqlSlaver
  describe MasterChanger do
    let(:executor) { double(Executor, :execute => true) }

    let(:status) { {:file => 'mysql-bin.001555', :position => 18426246} }
    let(:params) {
      {
        :master_host          => 'my.db.host',
        :port                 => 3306,
        :mysql_root_password  => 'supersekrit',
        :replication_user     => 'repluser',
        :replication_password => 'replpassword',
        :executor             => executor
      }
    }
    subject(:changer) { described_class.new(params) }

    describe "#change!" do
      it "executes multi-part mysql command" do
        change_cmd = %[mysql  -u root -p supersekrit -e "stop slave; CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.001555', MASTER_LOG_POS=18426246, MASTER_HOST='my.db.host', MASTER_PORT=3306, MASTER_USER='repluser', MASTER_PASSWORD='replpassword'; start slave"]
        changer.change!(status)
        expect(executor).to have_received(:execute).with(change_cmd)
      end
    end

    context "with a non-standard mysql port" do
      let(:params) { super().merge(:port => 3307) }

      it "executes multi-part mysql command" do
        change_cmd = %[mysql  -u root -p supersekrit -e "stop slave; CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.001555', MASTER_LOG_POS=18426246, MASTER_HOST='my.db.host', MASTER_PORT=3307, MASTER_USER='repluser', MASTER_PASSWORD='replpassword'; start slave"]
        changer.change!(status)
        expect(executor).to have_received(:execute).with(change_cmd)
      end
    end

    context "with a mysql socket file" do
      let(:params) { super().merge(:socket_file => "/tmp/mysql.sock") }

      it "executes multi-part mysql command" do
        change_cmd = %[mysql -S /tmp/mysql.sock -u root -p supersekrit -e "stop slave; CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.001555', MASTER_LOG_POS=18426246, MASTER_HOST='my.db.host', MASTER_PORT=3306, MASTER_USER='repluser', MASTER_PASSWORD='replpassword'; start slave"]
        changer.change!(status)
        expect(executor).to have_received(:execute).with(change_cmd)
      end
    end
  end
end


text:
using Oldmansoft.ClassicDomain;
using Oldmansoft.Identity.Domain;
using System;
using System.Collections.Generic;

namespace Oldmansoft.Identity.Infrastructure
{
    /// <summary>
    /// 角色仓储
    /// </summary>
    public interface IRoleRepository : IRepository<Role, Guid>
    {
        /// <summary>
        /// 根据分区资源列出角色
        /// </summary>
        /// <param name="partitionResourceId"></param>
        /// <returns></returns>
        IList<Role> ListByPartitionResourceId(Guid partitionResourceId);

        /// <summary>
        /// 根据分区资源分页列出角色
        /// </summary>
        /// <param name="partitionResourceId"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        IPagingOrdered<Role> PagingByPartitionResourceId(Guid partitionResourceId, string key);
    }
}


text:
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)

package org.xbill.DNS;

import java.io.IOException;

/**
 * Start of Authority - describes properties of a zone.
 *
 * @author Brian Wellington
 */

public class SOARecord extends Record {

private static final long serialVersionUID = 1049740098229303931L;

private Name host, admin;
private long serial, refresh, retry, expire, minimum;

SOARecord() {}

Record
getObject() {
	return new SOARecord();
}

/**
 * Creates an SOA Record from the given data
 * @param host The primary name server for the zone
 * @param admin The zone administrator's address
 * @param serial The zone's serial number
 * @param refresh The amount of time until a secondary checks for a new serial
 * number
 * @param retry The amount of time between a secondary's checks for a new
 * serial number
 * @param expire The amount of time until a secondary expires a zone
 * @param minimum The minimum TTL for records in the zone
*/
public
SOARecord(Name name, int dclass, long ttl, Name host, Name admin,
	  long serial, long refresh, long retry, long expire, long minimum)
{
	super(name, Type.SOA, dclass, ttl);
	this.host = checkName("host", host);
	this.admin = checkName("admin", admin);
	this.serial = checkU32("serial", serial);
	this.refresh = checkU32("refresh", refresh);
	this.retry = checkU32("retry", retry);
	this.expire = checkU32("expire", expire);
	this.minimum = checkU32("minimum", minimum);
}

void
rrFromWire(DNSInput in) throws IOException {
	host = new Name(in);
	admin = new Name(in);
	serial = in.readU32();
	refresh = in.readU32();
	retry = in.readU32();
	expire = in.readU32();
	minimum = in.readU32();
}

void
rdataFromString(Tokenizer st, Name origin) throws IOException {
	host = st.getName(origin);
	admin = st.getName(origin);
	serial = st.getUInt32();
	refresh = st.getTTLLike();
	retry = st.getTTLLike();
	expire = st.getTTLLike();
	minimum = st.getTTLLike();
}

/** Convert to a String */
String
rrToString() {
	StringBuffer sb = new StringBuffer();
	sb.append(host);
	sb.append(" ");
	sb.append(admin);
	if (Options.check("multiline")) {
		sb.append(" (\n\t\t\t\t\t");
		sb.append(serial);
		sb.append("\t; serial\n\t\t\t\t\t");
		sb.append(refresh);
		sb.append("\t; refresh\n\t\t\t\t\t");
		sb.append(retry);
		sb.append("\t; retry\n\t\t\t\t\t");
		sb.append(expire);
		sb.append("\t; expire\n\t\t\t\t\t");
		sb.append(minimum);
		sb.append(" )\t; minimum");
	} else {
		sb.append(" ");
		sb.append(serial);
		sb.append(" ");
		sb.append(refresh);
		sb.append(" ");
		sb.append(retry);
		sb.append(" ");
		sb.append(expire);
		sb.append(" ");
		sb.append(minimum);
	}
	return sb.toString();
}

/** Returns the primary name server */
public Name
getHost() {
	return host;
}

/** Returns the zone administrator's address */
public Name
getAdmin() {
	return admin;
}

/** Returns the zone's serial number */
public long
getSerial() {
	return serial;
}

/** Returns the zone refresh interval */
public long
getRefresh() {
	return refresh;
}

/** Returns the zone retry interval */
public long
getRetry() {
	return retry;
}

/** Returns the time until a secondary expires a zone */
public long
getExpire() {
	return expire;
}

/** Returns the minimum TTL for records in the zone */
public long
getMinimum() {
	return minimum;
}

void
rrToWire(DNSOutput out, Compression c, boolean canonical) {
	host.toWire(out, c, canonical);
	admin.toWire(out, c, canonical);
	out.writeU32(serial);
	out.writeU32(refresh);
	out.writeU32(retry);
	out.writeU32(expire);
	out.writeU32(minimum);
}

}


text:
/**
 * Created with JetBrains WebStorm.
 * User: NBE01
 * Date: 14-3-8
 * Time: 下午2:28
 * To change this template use File | Settings | File Templates.
 */

module.exports = BaseDao;
var ObjectId = require('mongodb').ObjectID;
/**
 *
 * @param pool 数据库连接池
 * db 当前连接的 clientDB
 * @constructor
 */
function BaseDao(pool){
    this.pool = pool;
    this.ObjectId = ObjectId;
}
BaseDao.prototype.collectionName = {
    CATEGORY : 'category',
    POST : 'post',
    USER : 'users'
};
BaseDao.prototype.open = function(callback){
    var tThis = this;
    this.pool.acquire(function(err,db){
        callback(err,db);
    });
};
BaseDao.prototype.close = function(db){
    this.pool.release(db);
    db = null;
};
BaseDao.prototype.getObjectId = function(id){
    return ObjectId(id);
};

BaseDao.prototype.getNewId = function(){
    var objectId = new ObjectId();
    return objectId.id.toString();
};


text:
{% extends 'restricted.html' %}
{% block warning %}

Restricted

    You're now entering a restricted area.
{% endblock %}


text:
namespace Serialization.Dcs
{
    using System.Collections.Generic;
    using System.Runtime.Serialization;

    [DataContract(Name = "Child", Namespace = "")]
    public class Child
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public Parent Parent { get; set; }
    }

    [DataContract(Name = "Parent", Namespace = "")]
    public class Parent
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public List<Child> Children { get; set; }
    }
}


text:
package com.google.cloud.datacatalog.v1beta1.stub;

import static com.google.cloud.datacatalog.v1beta1.PolicyTagManagerClient.ListPolicyTagsPagedResponse;
import static com.google.cloud.datacatalog.v1beta1.PolicyTagManagerClient.ListTaxonomiesPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest;
import com.google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest;
import com.google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest;
import com.google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest;
import com.google.cloud.datacatalog.v1beta1.GetPolicyTagRequest;
import com.google.cloud.datacatalog.v1beta1.GetTaxonomyRequest;
import com.google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest;
import com.google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse;
import com.google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest;
import com.google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse;
import com.google.cloud.datacatalog.v1beta1.PolicyTag;
import com.google.cloud.datacatalog.v1beta1.Taxonomy;
import com.google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest;
import com.google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest;
import com.google.common.collect.ImmutableMap;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * gRPC stub implementation for the PolicyTagManager service API.
 *
 * <p>This class is for advanced usage and reflects the underlying API directly.
 */
@BetaApi
@Generated("by gapic-generator-java")
public class GrpcPolicyTagManagerStub extends PolicyTagManagerStub {
  private static final MethodDescriptor<CreateTaxonomyRequest, Taxonomy>
      createTaxonomyMethodDescriptor =
          MethodDescriptor.<CreateTaxonomyRequest, Taxonomy>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/CreateTaxonomy")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(CreateTaxonomyRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(Taxonomy.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<DeleteTaxonomyRequest, Empty>
      deleteTaxonomyMethodDescriptor =
          MethodDescriptor.<DeleteTaxonomyRequest, Empty>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/DeleteTaxonomy")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(DeleteTaxonomyRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<UpdateTaxonomyRequest, Taxonomy>
      updateTaxonomyMethodDescriptor =
          MethodDescriptor.<UpdateTaxonomyRequest, Taxonomy>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/UpdateTaxonomy")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(UpdateTaxonomyRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(Taxonomy.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<ListTaxonomiesRequest, ListTaxonomiesResponse>
      listTaxonomiesMethodDescriptor =
          MethodDescriptor.<ListTaxonomiesRequest, ListTaxonomiesResponse>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/ListTaxonomies")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(ListTaxonomiesRequest.getDefaultInstance()))
              .setResponseMarshaller(
                  ProtoUtils.marshaller(ListTaxonomiesResponse.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<GetTaxonomyRequest, Taxonomy> getTaxonomyMethodDescriptor =
      MethodDescriptor.<GetTaxonomyRequest, Taxonomy>newBuilder()
          .setType(MethodDescriptor.MethodType.UNARY)
          .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/GetTaxonomy")
          .setRequestMarshaller(ProtoUtils.marshaller(GetTaxonomyRequest.getDefaultInstance()))
          .setResponseMarshaller(ProtoUtils.marshaller(Taxonomy.getDefaultInstance()))
          .build();

  private static final MethodDescriptor<CreatePolicyTagRequest, PolicyTag>
      createPolicyTagMethodDescriptor =
          MethodDescriptor.<CreatePolicyTagRequest, PolicyTag>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(
                  "google.cloud.datacatalog.v1beta1.PolicyTagManager/CreatePolicyTag")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(CreatePolicyTagRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(PolicyTag.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<DeletePolicyTagRequest, Empty>
      deletePolicyTagMethodDescriptor =
          MethodDescriptor.<DeletePolicyTagRequest, Empty>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(
                  "google.cloud.datacatalog.v1beta1.PolicyTagManager/DeletePolicyTag")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(DeletePolicyTagRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<UpdatePolicyTagRequest, PolicyTag>
      updatePolicyTagMethodDescriptor =
          MethodDescriptor.<UpdatePolicyTagRequest, PolicyTag>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(
                  "google.cloud.datacatalog.v1beta1.PolicyTagManager/UpdatePolicyTag")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(UpdatePolicyTagRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(PolicyTag.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<ListPolicyTagsRequest, ListPolicyTagsResponse>
      listPolicyTagsMethodDescriptor =
          MethodDescriptor.<ListPolicyTagsRequest, ListPolicyTagsResponse>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/ListPolicyTags")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(ListPolicyTagsRequest.getDefaultInstance()))
              .setResponseMarshaller(
                  ProtoUtils.marshaller(ListPolicyTagsResponse.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<GetPolicyTagRequest, PolicyTag>
      getPolicyTagMethodDescriptor =
          MethodDescriptor.<GetPolicyTagRequest, PolicyTag>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/GetPolicyTag")
              .setRequestMarshaller(ProtoUtils.marshaller(GetPolicyTagRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(PolicyTag.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<GetIamPolicyRequest, Policy> getIamPolicyMethodDescriptor =
      MethodDescriptor.<GetIamPolicyRequest, Policy>newBuilder()
          .setType(MethodDescriptor.MethodType.UNARY)
          .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/GetIamPolicy")
          .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
          .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
          .build();

  private static final MethodDescriptor<SetIamPolicyRequest, Policy> setIamPolicyMethodDescriptor =
      MethodDescriptor.<SetIamPolicyRequest, Policy>newBuilder()
          .setType(MethodDescriptor.MethodType.UNARY)
          .setFullMethodName("google.cloud.datacatalog.v1beta1.PolicyTagManager/SetIamPolicy")
          .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
          .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
          .build();

  private static final MethodDescriptor<TestIamPermissionsRequest, TestIamPermissionsResponse>
      testIamPermissionsMethodDescriptor =
          MethodDescriptor.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(
                  "google.cloud.datacatalog.v1beta1.PolicyTagManager/TestIamPermissions")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
              .setResponseMarshaller(
                  ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
              .build();

  private final UnaryCallable<CreateTaxonomyRequest, Taxonomy> createTaxonomyCallable;
  private final UnaryCallable<DeleteTaxonomyRequest, Empty> deleteTaxonomyCallable;
  private final UnaryCallable<UpdateTaxonomyRequest, Taxonomy> updateTaxonomyCallable;
  private final UnaryCallable<ListTaxonomiesRequest, ListTaxonomiesResponse> listTaxonomiesCallable;
  private final UnaryCallable<ListTaxonomiesRequest, ListTaxonomiesPagedResponse>
      listTaxonomiesPagedCallable;
  private final UnaryCallable<GetTaxonomyRequest, Taxonomy> getTaxonomyCallable;
  private final UnaryCallable<CreatePolicyTagRequest, PolicyTag> createPolicyTagCallable;
  private final UnaryCallable<DeletePolicyTagRequest, Empty> deletePolicyTagCallable;
  private final UnaryCallable<UpdatePolicyTagRequest, PolicyTag> updatePolicyTagCallable;
  private final UnaryCallable<ListPolicyTagsRequest, ListPolicyTagsResponse> listPolicyTagsCallable;
  private final UnaryCallable<ListPolicyTagsRequest, ListPolicyTagsPagedResponse>
      listPolicyTagsPagedCallable;
  private final UnaryCallable<GetPolicyTagRequest, PolicyTag> getPolicyTagCallable;
  private final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable;
  private final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable;
  private final UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
      testIamPermissionsCallable;

  private final BackgroundResource backgroundResources;
  private final GrpcOperationsStub operationsStub;
  private final GrpcStubCallableFactory callableFactory;

  public static final GrpcPolicyTagManagerStub create(PolicyTagManagerStubSettings settings)
      throws IOException {
    return new GrpcPolicyTagManagerStub(settings, ClientContext.create(settings));
  }

  public static final GrpcPolicyTagManagerStub create(ClientContext clientContext)
      throws IOException {
    return new GrpcPolicyTagManagerStub(
        PolicyTagManagerStubSettings.newBuilder().build(), clientContext);
  }

  public static final GrpcPolicyTagManagerStub create(
      ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
    return new GrpcPolicyTagManagerStub(
        PolicyTagManagerStubSettings.newBuilder().build(), clientContext, callableFactory);
  }

  /**
   * Constructs an instance of GrpcPolicyTagManagerStub, using the given settings. This is protected
   * so that it is easy to make a subclass, but otherwise, the static factory methods should be
   * preferred.
   */
  protected GrpcPolicyTagManagerStub(
      PolicyTagManagerStubSettings settings, ClientContext clientContext) throws IOException {
    this(settings, clientContext, new GrpcPolicyTagManagerCallableFactory());
  }

  /**
   * Constructs an instance of GrpcPolicyTagManagerStub, using the given settings. This is protected
   * so that it is easy to make a subclass, but otherwise, the static factory methods should be
   * preferred.
   */
  protected GrpcPolicyTagManagerStub(
      PolicyTagManagerStubSettings settings,
      ClientContext clientContext,
      GrpcStubCallableFactory callableFactory)
      throws IOException {
    this.callableFactory = callableFactory;
    this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);

    GrpcCallSettings<CreateTaxonomyRequest, Taxonomy> createTaxonomyTransportSettings =
        GrpcCallSettings.<CreateTaxonomyRequest, Taxonomy>newBuilder()
            .setMethodDescriptor(createTaxonomyMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("parent", String.valueOf(request.getParent()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<DeleteTaxonomyRequest, Empty> deleteTaxonomyTransportSettings =
        GrpcCallSettings.<DeleteTaxonomyRequest, Empty>newBuilder()
            .setMethodDescriptor(deleteTaxonomyMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<UpdateTaxonomyRequest, Taxonomy> updateTaxonomyTransportSettings =
        GrpcCallSettings.<UpdateTaxonomyRequest, Taxonomy>newBuilder()
            .setMethodDescriptor(updateTaxonomyMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("taxonomy.name", String.valueOf(request.getTaxonomy().getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<ListTaxonomiesRequest, ListTaxonomiesResponse>
        listTaxonomiesTransportSettings =
            GrpcCallSettings.<ListTaxonomiesRequest, ListTaxonomiesResponse>newBuilder()
                .setMethodDescriptor(listTaxonomiesMethodDescriptor)
                .setParamsExtractor(
                    request -> {
                      ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                      params.put("parent", String.valueOf(request.getParent()));
                      return params.build();
                    })
                .build();
    GrpcCallSettings<GetTaxonomyRequest, Taxonomy> getTaxonomyTransportSettings =
        GrpcCallSettings.<GetTaxonomyRequest, Taxonomy>newBuilder()
            .setMethodDescriptor(getTaxonomyMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<CreatePolicyTagRequest, PolicyTag> createPolicyTagTransportSettings =
        GrpcCallSettings.<CreatePolicyTagRequest, PolicyTag>newBuilder()
            .setMethodDescriptor(createPolicyTagMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("parent", String.valueOf(request.getParent()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<DeletePolicyTagRequest, Empty> deletePolicyTagTransportSettings =
        GrpcCallSettings.<DeletePolicyTagRequest, Empty>newBuilder()
            .setMethodDescriptor(deletePolicyTagMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<UpdatePolicyTagRequest, PolicyTag> updatePolicyTagTransportSettings =
        GrpcCallSettings.<UpdatePolicyTagRequest, PolicyTag>newBuilder()
            .setMethodDescriptor(updatePolicyTagMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("policy_tag.name", String.valueOf(request.getPolicyTag().getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<ListPolicyTagsRequest, ListPolicyTagsResponse>
        listPolicyTagsTransportSettings =
            GrpcCallSettings.<ListPolicyTagsRequest, ListPolicyTagsResponse>newBuilder()
                .setMethodDescriptor(listPolicyTagsMethodDescriptor)
                .setParamsExtractor(
                    request -> {
                      ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                      params.put("parent", String.valueOf(request.getParent()));
                      return params.build();
                    })
                .build();
    GrpcCallSettings<GetPolicyTagRequest, PolicyTag> getPolicyTagTransportSettings =
        GrpcCallSettings.<GetPolicyTagRequest, PolicyTag>newBuilder()
            .setMethodDescriptor(getPolicyTagMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =
        GrpcCallSettings.<GetIamPolicyRequest, Policy>newBuilder()
            .setMethodDescriptor(getIamPolicyMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("resource", String.valueOf(request.getResource()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =
        GrpcCallSettings.<SetIamPolicyRequest, Policy>newBuilder()
            .setMethodDescriptor(setIamPolicyMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("resource", String.valueOf(request.getResource()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
        testIamPermissionsTransportSettings =
            GrpcCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()
                .setMethodDescriptor(testIamPermissionsMethodDescriptor)
                .setParamsExtractor(
                    request -> {
                      ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                      params.put("resource", String.valueOf(request.getResource()));
                      return params.build();
                    })
                .build();

    this.createTaxonomyCallable =
        callableFactory.createUnaryCallable(
            createTaxonomyTransportSettings, settings.createTaxonomySettings(), clientContext);
    this.deleteTaxonomyCallable =
        callableFactory.createUnaryCallable(
            deleteTaxonomyTransportSettings, settings.deleteTaxonomySettings(), clientContext);
    this.updateTaxonomyCallable =
        callableFactory.createUnaryCallable(
            updateTaxonomyTransportSettings, settings.updateTaxonomySettings(), clientContext);
    this.listTaxonomiesCallable =
        callableFactory.createUnaryCallable(
            listTaxonomiesTransportSettings, settings.listTaxonomiesSettings(), clientContext);
    this.listTaxonomiesPagedCallable =
        callableFactory.createPagedCallable(
            listTaxonomiesTransportSettings, settings.listTaxonomiesSettings(), clientContext);
    this.getTaxonomyCallable =
        callableFactory.createUnaryCallable(
            getTaxonomyTransportSettings, settings.getTaxonomySettings(), clientContext);
    this.createPolicyTagCallable =
        callableFactory.createUnaryCallable(
            createPolicyTagTransportSettings, settings.createPolicyTagSettings(), clientContext);
    this.deletePolicyTagCallable =
        callableFactory.createUnaryCallable(
            deletePolicyTagTransportSettings, settings.deletePolicyTagSettings(), clientContext);
    this.updatePolicyTagCallable =
        callableFactory.createUnaryCallable(
            updatePolicyTagTransportSettings, settings.updatePolicyTagSettings(), clientContext);
    this.listPolicyTagsCallable =
        callableFactory.createUnaryCallable(
            listPolicyTagsTransportSettings, settings.listPolicyTagsSettings(), clientContext);
    this.listPolicyTagsPagedCallable =
        callableFactory.createPagedCallable(
            listPolicyTagsTransportSettings, settings.listPolicyTagsSettings(), clientContext);
    this.getPolicyTagCallable =
        callableFactory.createUnaryCallable(
            getPolicyTagTransportSettings, settings.getPolicyTagSettings(), clientContext);
    this.getIamPolicyCallable =
        callableFactory.createUnaryCallable(
            getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
    this.setIamPolicyCallable =
        callableFactory.createUnaryCallable(
            setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
    this.testIamPermissionsCallable =
        callableFactory.createUnaryCallable(
            testIamPermissionsTransportSettings,
            settings.testIamPermissionsSettings(),
            clientContext);

    this.backgroundResources =
        new BackgroundResourceAggregation(clientContext.getBackgroundResources());
  }

  public GrpcOperationsStub getOperationsStub() {
    return operationsStub;
  }

  @Override
  public UnaryCallable<CreateTaxonomyRequest, Taxonomy> createTaxonomyCallable() {
    return createTaxonomyCallable;
  }

  @Override
  public UnaryCallable<DeleteTaxonomyRequest, Empty> deleteTaxonomyCallable() {
    return deleteTaxonomyCallable;
  }

  @Override
  public UnaryCallable<UpdateTaxonomyRequest, Taxonomy> updateTaxonomyCallable() {
    return updateTaxonomyCallable;
  }

  @Override
  public UnaryCallable<ListTaxonomiesRequest, ListTaxonomiesResponse> listTaxonomiesCallable() {
    return listTaxonomiesCallable;
  }

  @Override
  public UnaryCallable<ListTaxonomiesRequest, ListTaxonomiesPagedResponse>
      listTaxonomiesPagedCallable() {
    return listTaxonomiesPagedCallable;
  }

  @Override
  public UnaryCallable<GetTaxonomyRequest, Taxonomy> getTaxonomyCallable() {
    return getTaxonomyCallable;
  }

  @Override
  public UnaryCallable<CreatePolicyTagRequest, PolicyTag> createPolicyTagCallable() {
    return createPolicyTagCallable;
  }

  @Override
  public UnaryCallable<DeletePolicyTagRequest, Empty> deletePolicyTagCallable() {
    return deletePolicyTagCallable;
  }

  @Override
  public UnaryCallable<UpdatePolicyTagRequest, PolicyTag> updatePolicyTagCallable() {
    return updatePolicyTagCallable;
  }

  @Override
  public UnaryCallable<ListPolicyTagsRequest, ListPolicyTagsResponse> listPolicyTagsCallable() {
    return listPolicyTagsCallable;
  }

  @Override
  public UnaryCallable<ListPolicyTagsRequest, ListPolicyTagsPagedResponse>
      listPolicyTagsPagedCallable() {
    return listPolicyTagsPagedCallable;
  }

  @Override
  public UnaryCallable<GetPolicyTagRequest, PolicyTag> getPolicyTagCallable() {
    return getPolicyTagCallable;
  }

  @Override
  public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
    return getIamPolicyCallable;
  }

  @Override
  public UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
    return setIamPolicyCallable;
  }

  @Override
  public UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
      testIamPermissionsCallable() {
    return testIamPermissionsCallable;
  }

  @Override
  public final void close() {
    try {
      backgroundResources.close();
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new IllegalStateException("Failed to close resource", e);
    }
  }

  @Override
  public void shutdown() {
    backgroundResources.shutdown();
  }

  @Override
  public boolean isShutdown() {
    return backgroundResources.isShutdown();
  }

  @Override
  public boolean isTerminated() {
    return backgroundResources.isTerminated();
  }

  @Override
  public void shutdownNow() {
    backgroundResources.shutdownNow();
  }

  @Override
  public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
    return backgroundResources.awaitTermination(duration, unit);
  }
}


text:
* Every feature added
* Every bug fixed


text:
#pragma once
#include <aws/gamelift/GameLift_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace GameLift
{
namespace Model
{
  enum class PolicyType
  {
    NOT_SET,
    RuleBased,
    TargetBased
  };

namespace PolicyTypeMapper
{
AWS_GAMELIFT_API PolicyType GetPolicyTypeForName(const Aws::String& name);

AWS_GAMELIFT_API Aws::String GetNameForPolicyType(PolicyType value);
} // namespace PolicyTypeMapper
} // namespace Model
} // namespace GameLift
} // namespace Aws


text:
<?php if($this->session->flashdata('list_created')) : ?>

<?php echo $this->session->flashdata('list_created'); ?>

<?php endif; ?>

<?php if($this->session->flashdata('list_updated')) : ?>

<?php echo $this->session->flashdata('list_updated'); ?>

<?php endif; ?>

<?php if($this->session->flashdata('list_deleted')) : ?>

<?php echo $this->session->flashdata('list_deleted'); ?>

<?php endif; ?>

<?php foreach ($lists as $list) : ?>

	<a href="<?php echo base_url();?>lists/show/<?php echo $list->id; ?>">
	   <?php echo $list->list_name; ?>

<?php echo $list->list_body; ?>

<?php endforeach; ?>

Create a List

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

Create New List

                    <form>

                            <input type="text" class="form-control" id="list_name" name="list_name" placeholder="List Name">

                            <textarea class="form-control" name="list_body" id="list_body" rows="4" placeholder="List Body..."></textarea>

                    </form>

                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                    <button type="button" class="btn btn-primary" id="list-create">Create</button>


text:
'''
test_requirements = {'devices':         [VE],
                     'openstack_infra': []}

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

from pprint import pprint as pp
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning

requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from f5_openstack_agent.lbaasv2.drivers.bigip.cluster_manager import\
    ClusterManager

cm = ClusterManager()

def test_device_name(mgmt_root):
    device_name = mgmt_root._meta_data['device_name']
    assert cm.get_device_name(mgmt_root) == device_name

def test_devices(mgmt_root, symbols):
    devices = cm.devices(mgmt_root)
    assert len(devices) == 1
    for k, v in symbols.__dict__.items():
        print('key: {}'.format(k))
        print('value: {}'.format(v))
    # for 13.0.0, mgmt IP will always be 192.168.1.245
    assert (devices[0].managementIp == symbols.bigip_mgmt_ips[0] or
            devices[0].managementIp == '192.168.1.245')

def test_get_sync_status(mgmt_root):
    # expect Standalone
    assert cm.get_sync_status(mgmt_root) == 'Standalone'

def test_auto_sync(mgmt_root):
    # create device group test-group on BIGIP
    device_group = 'test-group'
    dg = mgmt_root.tm.cm.device_groups.device_group.create(name=device_group,
                                                           partition='Common')
    cm.disable_auto_sync(device_group, mgmt_root)
    assert dg.autoSync == 'disabled'

    cm.enable_auto_sync(device_group, mgmt_root)
    dg.refresh()
    assert dg.autoSync == 'enabled'

    # delete the device group created
    dg.delete()

def test_get_traffic_groups(mgmt_root):
    # assume 'traffic-group-local-only' already created
    traffic_groups = cm.get_traffic_groups(mgmt_root)
    assert 'traffic-group-local-only' in traffic_groups

def test_get_device_group():
    device_group = cm.get_device_group
    assert device_group is not None

def test_get_mgmt_addr_by_device(symbols, mgmt_root):
    pp(dir(symbols))
    device_name = mgmt_root._meta_data['device_name']
    addr = cm.get_mgmt_addr_by_device(mgmt_root, device_name)
    # for 13.0.0, mgmt IP will always be 192.168.1.245
    assert (addr == symbols.bigip_mgmt_ips[0] or
            addr == '192.168.1.245')


text:
<?php

namespace ZendTest\Di\TestAsset;

interface DummyInterface
{
    public function __construct();
}


text:
package com.sibvisions.swarm.url;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;

public class ByteURLConnection extends URLConnection
{
	/** the content. */
    private final byte[] byContent;

    public ByteURLConnection(URL pUrl, byte[] pContent)
    {
        super(pUrl);

        byContent = pContent;
        setUseCaches(false);
    }

    @Override
    public void connect()
    {
    }

    @Override
    public InputStream getInputStream()
    {
    	if (byContent == null)
    	{
    		return null;
    	}
    	else
    	{
    		return new ByteArrayInputStream(byContent);
    	}
    }

}	// ByteURLConnection


text:
import os
import logging
import fnmatch
import sys
import re

import classfile

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

class Module:
    """Struct-like class for holding information about a Maven module.

    disttest Modules have a notion of hierarchy via the root_module and submodules.
    These are only a loose approximation of an actual Maven multi-module project,
    since the hierarchy is based on the folder structure rather than parent poms."""

    def __init__(self, root):
        self.root = root
        self.root_module = None
        self.pom = os.path.join(root, "pom.xml")
        self.test_classes = []
        self.source_artifacts = []
        self.test_artifacts = []
        self.name = os.path.basename(self.root)
        self.submodules = []

class NotMavenProjectException(Exception):
    pass

class ModuleNotFoundException(Exception):
    pass

class MavenProject:
    """Represents the contents of a Maven project.

    On initialization, a MavenProject walks the provided path looking for Maven
    modules, artifacts, and test classes.

    Test case enumeration is not guaranteed to match with Surefire.
    MavenProject uses the default Surefire include pattern to detect files
    look like test cases (e.g. TestFoo), and parses the classfile to do some
    basic verification. Inconsistencies arise when there are custom Surefire
    include and exclude patterns in the pom, or if a class does not actually
    have any tests in it.

    MavenProject also looks for built jars within the target folders of each module.
    These are used later when packaging the dependencies to run unit tests.
    """

    def __init__(self, project_root, include_modules=None, exclude_modules=None, include_patterns=None, exclude_patterns=None):
        # Normalize the path
        if not project_root.endswith("/"):
            project_root += "/"
        # Validate some basic expectations
        if not os.path.isdir(project_root):
            raise NotMavenProjectException("Path " + project_root + "is not a directory!")
        if not os.path.isfile(os.path.join(project_root, "pom.xml")):
            raise NotMavenProjectException("No pom.xml file found in %s, is this a Maven project?" % project_root)
        self.project_root = project_root
        self.modules = [] # All modules in the project
        self.included_modules = set() # Modules that match the include_modules filter
        self.excluded_modules = exclude_modules
        self.__include_modules = include_modules
        # Default filters to find test classes
        self.__filters = [PotentialTestClassNameFilter(), NoAbstractClassFilter()]
        # Additional user-specified include and exclude patterns
        # Prepend because these are likely more selective than the default filters
        if include_patterns is not None:
            include_filter = IncludePatternsFilter(include_patterns)
            self.__filters.insert(0, include_filter)
        if exclude_patterns is not None:
            exclude_filter = ExcludePatternsFilter(exclude_patterns)
            self.__filters.insert(0, exclude_filter)
        self._walk()

    def _construct_parent_child_relationships(self):
        """Construct the parent->child relationship for submodules based on
        the directory hierarchy. Note that this is different from the Maven
        notion of parent poms, which are specified in the pom.xml."""
        # Sort the modules based on path length, this guarantees we find parents before children
        path_to_module = {}
        for module in self.modules:
            path_to_module[module.root] = module
        assert len(path_to_module) > 0
        sorted_mod_paths = sorted(path_to_module.keys())
        # Trim off the first, it's the root
        self.root_module = path_to_module[sorted_mod_paths[0]]
        sorted_mod_paths = sorted_mod_paths[1:]
        for mod_path in sorted_mod_paths:
            # Chop path components off the tail until we find a matching parent module
            found = False
            parent_path = mod_path
            while not found:
                parent_path = os.path.dirname(parent_path)
                if parent_path == "/":
                    break
                if parent_path in path_to_module.keys():
                    found = True
                    break
            if not found:
                raise Exception("Could not find a parent of Maven submodule at %s, have you run mvn package?" % mod_path)
            # Append self to parent's list of children
            parent_module = path_to_module[parent_path]
            parent_module.submodules.append(path_to_module[mod_path])

    def _filter_excluded_modules(self):
        if self.excluded_modules is not None:
            excluded = [m for m in self.included_modules if m.name in self.excluded_modules]
            for m in excluded:
                self._exclude_module_tree(m)

    def _exclude_module_tree(self, module):
        self.included_modules.remove(module)
        for submodule in module.submodules:
            self._exclude_module_tree(submodule)

    def _filter_included_modules(self):
        """Determine which of the modules are included (if specified)"""
        # If no modules were specified, they're all included
        if self.__include_modules is None:
            self.included_modules = set(self.modules)
            return

        # If include_modules was specified, filter the found module list and check for missing modules
        # Filter to just the specified modules
        included = [m for m in self.modules if m.name in self.__include_modules]
        # Mismatch in length means we're missing some
        if len(included) != len(self.__include_modules):
            for m in included:
                self.__include_modules.remove(m.name)
            assert len(self.__include_modules) > 0
            raise ModuleNotFoundException("Could not find specified modules: " + " ".join(self.__include_modules))
        # Add modules to member set, including submodules
        for m in included:
            self._include_module_tree(m)

    def _include_module_tree(self, module):
        self.included_modules.add(module)
        for submodule in module.submodules:
            self._include_module_tree(submodule)

    def _find_all_modules(self):
        # Modules are directories that have a pom.xml and a target dir
        for root, dirs, files in os.walk(self.project_root):
            if "pom.xml" in files:
                self.modules.append(Module(os.path.normpath(root)))

    def _walk(self):
        """Walk the project directory to enumerate the modules, test classes,
        and project artifacts within a MavenProject."""

        # Find the modules first, directories that have a pom.xml and a target dir
        self._find_all_modules()

        if len(self.modules) == 0:
            logger.error("No modules with target directories found. Did you forget to build the project?")
            sys.exit(1)

        self._construct_parent_child_relationships()

        self._filter_included_modules()
        self._filter_excluded_modules()

        # For each included module, look for test classes within target dir
        for module in self.included_modules:
            logger.debug("Traversing module %s", module.root)
            for root, dirs, files in os.walk(os.path.join(module.root, "target")):
                abs_files = [os.path.join(root, f) for f in files]
                # Make classfile objects for everything that's a valid class
                classfiles = self.__get_classfiles(abs_files)
                # Apply classfile filters
                for fil in self.__filters:
                    classfiles = [c for c in classfiles if fil.accept(c)]
                # Set module's classes to the filtered classfiles
                module.test_classes += classfiles

        # For each module, look for test-sources jars
        # These will later be extracted
        for module in self.modules:
            target_root = os.path.join(module.root, "target")
            if not os.path.exists(target_root):
                continue
            for entry in os.listdir(target_root):
                abs_path = os.path.join(target_root, entry)
                if os.path.isfile(abs_path):
                    # Skip "original-*.jar", which are unshaded artifacts
                    if entry.startswith("original-") and entry.endswith(".jar"):
                        continue
                    if entry.endswith("-test-sources.jar") or entry.endswith("-tests.jar"):
                        # Do not need test jars from a module if we're not running its tests
                        if module in self.included_modules:
                            module.test_artifacts.append(abs_path)
                    elif entry.endswith(".jar") and not entry.endswith("-sources.jar") and not entry.endswith("-javadoc.jar"):
                        module.source_artifacts.append(abs_path)

        num_classes = reduce(lambda x,y: x+y,\
                             [0] + [len(m.test_classes) for m in self.included_modules])
        logging.info("Found %s included modules out of %s total modules with %s test classes within project %s",\
                     len(self.included_modules), len(self.modules), num_classes, self.project_root)

    @staticmethod
    def __get_classfiles(files):
        classfiles = []
        for f in files:
            # Must be a file
            if not os.path.isfile(f):
                continue
            name = os.path.basename(f)
            # Only class files
            if not name.endswith(".class"):
                continue
            clazz = classfile.Classfile(f)
            classfiles.append(clazz)
        return classfiles

class ClassfileFilter:
    @staticmethod
    def accept(clazz):
        return True

class PotentialTestClassNameFilter(ClassfileFilter):
    @staticmethod
    def accept(clazz):
        f = os.path.basename(clazz.classfile)
        # No nested classes
        if "$" in f:
            return False
        # Must end in ".class". This is checked earlier, but be paranoid.
        if not f.endswith(".class"):
            return False
        # Match against default Surefire pattern
        name = f[:-len(".class")]
        if not name.startswith("Test") and \
        not name.endswith("Test") and \
        not name.endswith("TestCase"):
            return False
        return True

class NoAbstractClassFilter(ClassfileFilter):
    @staticmethod
    def accept(clazz):
        return not (clazz.is_interface() or clazz.is_abstract())

class IncludePatternsFilter(ClassfileFilter):
    def __init__(self, patterns = None):
        self.patterns = []
        self.__reobjs = []
        if patterns is not None:
            self.patterns = patterns
            regexes = [fnmatch.translate(p) for p in patterns]
            self.__reobjs = [re.compile(r) for r in regexes]

    def accept(self, clazz):
        matched = False
        for reobj in self.__reobjs:
            if reobj.match(clazz.classname) is not None:
                matched = True
                break
        return matched

class ExcludePatternsFilter(IncludePatternsFilter):
    def accept(self, clazz):
        """Exclude is the opposite of the include filter."""
        return not IncludePatternsFilter.accept(self, clazz)


text:
<!DOCTYPE HTML>

	<meta charset="UTF-8">
	<title>Mostrar texto oculto - JavaScript_001</title>
	<meta name="description" content="Ejercicios del Curso CMF">
	<meta name="author" content="Alejandro">
    <link rel="shortcut icon" href="fav_icon.png">
	<link rel="apple-touch-icon" href="/apple-touch-icon.png">
  	<link rel="stylesheet" href="css/javascript_001.css">

Trilogía del Spawl

     			Si lees este mensaje es que tu navegador no
					ejecuta guiones JavaScript

Neuromante

Un futuro invadido por microprocesadores, en el que la información es la materia prima. Vaqueros como Henry Dorrett Case se ganan la vida hurtando información, traspasando defensas electrónicas, bloques tangibles y luminosos, como rascacielos geométricos. En este espeluznante y sombrío futuro la mayor parte del este de Norteamérica es una única y gigantesca ciudad, casi toda Europa un vertedero atómico y Japón una jungla de neón, corruptora y brillante, donde una persona es la suma de sus vicios.  En palabras de Sterling, otro de los autores de referencia de esta corriente: <q>Despídete de todos los futuros rancios. He aquí un mundo enteramente nuevo, intenso como una sacudida eléctrica. La prosa de William Gibson, asombrosa por su claridad y oficio, se convierte en poesía eléctrico-tecnológica... Una fascinante historia de aventuras, brillante y coherente como un láser.</q>

		Seguir leyendo

Conde Cero

Siete años después de los acontecimientos de Neuromante, el Conde Cero, pirata de sistemas de información, consigue una rara pieza de software, se conecta a la matriz, y casi pierde la cabeza. La Matriz de Ciberespacio, una base sinérgica que abarca todo el planeta, se ha transformado en una red sensitiva. Pero la humanidad no se ha dado cuenta. La muchacha cuyo sistema nervioso ha sido alterado para que pueda tener acceso a la Matriz, tampoco entiende lo que ocurre. Mientras, en Francia, la encargada de una galería trata de encontrar al misterioso y desconocido creador de ciertos objetos de arte, poderosos y únicos.

         Seguir leyendo

Mona Lisa Acelerada

En el universo alucinatorio del cyberespacio, a la vez lírico y mecánico, erótico y violento, la vida de la joven Mona se cruza inevitablemente con la vida de la famosa Angie Mitchell. Angie ha sido capaz desde niña de entrar en el cyberespacio sin necesidad de una computadora. Dentro de la matriz una entidad fantasmal -que ha acumulado vastas cantidades de información para obtener lo que quiere- pretende utilizar a Angie en una trama que ella misma no puede controlar, ni siquiera entender. Mientras tanto, detrás de todo, se mueve la sombría Yakuza, la despiadada y poderosa internacional japonesa que manipula -o cree manipular-gentes y acontecimientos.

         Seguir leyendo

			© Copyright  by Alejandro L. Cerezo


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

package com.google.api.ads.adwords.jaxws.v201809.cm;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import com.google.api.ads.adwords.jaxws.v201809.billing.BudgetOrderOperation;
import com.google.api.ads.adwords.jaxws.v201809.mcm.AccountLabelOperation;
import com.google.api.ads.adwords.jaxws.v201809.mcm.LinkOperation;
import com.google.api.ads.adwords.jaxws.v201809.mcm.ManagedCustomerLabelOperation;
import com.google.api.ads.adwords.jaxws.v201809.mcm.ManagedCustomerOperation;
import com.google.api.ads.adwords.jaxws.v201809.mcm.MoveOperation;
import com.google.api.ads.adwords.jaxws.v201809.mcm.ServiceLinkOperation;
import com.google.api.ads.adwords.jaxws.v201809.rm.CustomAffinityOperation;
import com.google.api.ads.adwords.jaxws.v201809.rm.CustomAffinityTokenOperation;
import com.google.api.ads.adwords.jaxws.v201809.rm.MutateMembersOperation;
import com.google.api.ads.adwords.jaxws.v201809.rm.OfflineDataUploadOperation;
import com.google.api.ads.adwords.jaxws.v201809.rm.UserListOperation;

/**
 *
 *             This represents an operation that includes an operator and an operand
 *             specified type.
 *
 *
 *
Java class for Operation complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="Operation">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="operator" type="{https://adwords.google.com/api/adwords/cm/v201809}Operator" minOccurs="0"/>
 *         <element name="Operation.Type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Operation", propOrder = {
    "operator",
    "operationType"
})
@XmlSeeAlso({
    ManagedCustomerLabelOperation.class,
    AccountLabelOperation.class,
    ServiceLinkOperation.class,
    MoveOperation.class,
    LinkOperation.class,
    ManagedCustomerOperation.class,
    BudgetOrderOperation.class,
    CustomerFeedOperation.class,
    AdCampaignAdSubProductTypeOperation.class,
    AdGroupAdOperation.class,
    ConversionTrackerOperation.class,
    CampaignSharedSetOperation.class,
    AdGroupBidModifierOperation.class,
    BiddingStrategyOperation.class,
    SharedSetOperation.class,
    AdGroupCriterionOperation.class,
    BudgetOperation.class,
    CampaignGroupPerformanceTargetOperation.class,
    AssetOperation.class,
    CampaignExtensionSettingOperation.class,
    FeedMappingOperation.class,
    AdGroupLabelOperation.class,
    DraftOperation.class,
    BatchJobOperation.class,
    OfflineConversionFeedOperation.class,
    FeedItemTargetOperation.class,
    LabelOperation.class,
    CampaignFeedOperation.class,
    CustomerNegativeCriterionOperation.class,
    AdParamOperation.class,
    TrialOperation.class,
    AdGroupCriterionLabelOperation.class,
    CustomerExtensionSettingOperation.class,
    AdOperation.class,
    FeedItemOperation.class,
    CampaignLabelOperation.class,
    SharedCriterionOperation.class,
    OfflineCallConversionFeedOperation.class,
    CampaignCriterionOperation.class,
    CampaignGroupOperation.class,
    AdCustomizerFeedOperation.class,
    OfflineConversionAdjustmentFeedOperation.class,
    AdGroupOperation.class,
    FeedOperation.class,
    AdGroupExtensionSettingOperation.class,
    AdGroupFeedOperation.class,
    CampaignBidModifierOperation.class,
    AdGroupAdLabelOperation.class,
    CampaignOperation.class,
    CustomAffinityTokenOperation.class,
    UserListOperation.class,
    OfflineDataUploadOperation.class,
    CustomAffinityOperation.class,
    MutateMembersOperation.class
})
public abstract class Operation {

    @XmlSchemaType(name = "string")
    protected Operator operator;
    @XmlElement(name = "Operation.Type")
    protected String operationType;

    /**
     * Gets the value of the operator property.
     *
     * @return
     *     possible object is
     *     {@link Operator }
     *
     */
    public Operator getOperator() {
        return operator;
    }

    /**
     * Sets the value of the operator property.
     *
     * @param value
     *     allowed object is
     *     {@link Operator }
     *
     */
    public void setOperator(Operator value) {
        this.operator = value;
    }

    /**
     * Gets the value of the operationType property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getOperationType() {
        return operationType;
    }

    /**
     * Sets the value of the operationType property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setOperationType(String value) {
        this.operationType = value;
    }

}


text:
package org.devdom.commons;

import java.text.ParseException;
import java.util.List;

import org.devdom.commons.exceptions.MalformedJSONException;
import org.devdom.commons.exceptions.RequesterInformationException;
import org.json.JSONArray;
import org.json.JSONException;

public abstract class Listable<T> extends JsonGetter<T> {

    public Listable(String baseUri, String charset) {
        super(baseUri, charset);
    }

    public abstract List<T> getList() throws RequesterInformationException, ParseException;

    /**
     *
Obtener un JSONArray a partir de la llamada al API de http://data.developers.do
     *
     *
Aun así, el método puede ser utilizado para llamar recursos desde otros
     * recursos siempre que retornen un JSON.
     *
     * @param response
     * @return Objeto JSONArray
     * @throws RequesterInformationException si hubo error en la recepción de información
     * @throws MalformedJSONException si hubo error en el formato o validación del JSON
     */
    public JSONArray getJSONArrayResponse(String response)
            throws RequesterInformationException{

        if(!isValidJSONArrayString(response)){
            throw new MalformedJSONException("La respuesta no es un objeto JSON válido");
        }

        return parseJSONArray(response);
    }

    /**
     * Convertir a objeto JSONAray un string
     * @param response
     * @return objeto JSONArray
     * @see JSONArray
     * @throws MalformedJSONException
     */
    public JSONArray parseJSONArray(String response) {
        try {
            return (new JSONArray(response));
        } catch (JSONException ex) {
            throw new MalformedJSONException(ex.getMessage(),ex);
        }
    }
    /**
     * Validar si el string suplido puede ser un JSONArray válido
     *
     * @param response
     * @return boolean
     */
    public boolean isValidJSONArrayString(String response){
        return (response.startsWith("[{"));
    }

}


text:
The `EchoCommandPlugin` is an example plugin that introduces the concepts around the BladeRunnerJS `CommandPlugin`.

For more information see: http://bladerunnerjs.org/docs/extend/command_plugin_tutorial/


text:
[![Latest Stable Version](https://poser.pugx.org/eso/ireflection/v/stable.png)](https://packagist.org/packages/eso/ireflection)
[![Build Status](https://travis-ci.org/entering/ireflection.png?branch=master)](https://travis-ci.org/entering/ireflection)
[![Coverage Status](https://coveralls.io/repos/github/entering/ireflection/badge.svg?branch=master)](https://coveralls.io/github/entering/ireflection?branch=master)

Wrapper around PHP Reflection to make it easier to use.

## Requirements ##

* PHP >= 5.4

## Installation ##

The recommended way to install is through composer.

Just create a `composer.json` file for your project:

```json
{
    "require": {
        "eso/ireflection": "@stable"
    }
}
```

**Tip:** browse [`eso/ireflection`](https://packagist.org/packages/eso/ireflection) page to choose a stable version to use, avoid the `@stable` meta constraint.

And run these two commands to install it:

```bash
$ curl -sS https://getcomposer.org/installer | php
$ composer install
```

Now you can add the autoloader, and you will have access to the library:

```php
<?php

require 'vendor/autoload.php';
```

## Usage ##

Get/set some properties using Reflection:

```php
class A { protected $a = 5; protected $b = 10; }
$a = new A();
$refClass = new \ReflectionClass($a);
$propA = $refClass->getProperty('a');
$propB = $refClass->getProperty('b');

$propA->setAccessible(true);
$propB->setAccessible(true);

echo $propA->getValue($a) . "\n"; // prints 5
echo $propB->getValue($a) . "\n"; // prints 10

$propA->setValue($a, 10);
$propB->setValue($a, 20);

echo $propA->getValue($a) . "\n"; // prints 10
echo $propB->getValue($a) . "\n"; // prints 20
```

Get/set the same properties using ReflClass:

```php
class A { protected $a = 5; protected $b = 10; }
$a = new A();
$refClass = ReflClass::create($a);

echo $refClass->getAnyPropertyValue('a') . "\n"; // prints 5
echo $refClass->getAnyPropertyValue('b') . "\n"; // prints 10

$refClass->setAnyPropertiesValues(array('a' => 10, 'b' => 20));

echo $refClass->getAnyPropertyValue('a') . "\n"; // prints 10
echo $refClass->getAnyPropertyValue('b') . "\n"; // prints 20
```

Other example, invoke a method:

```php
class A { function sum($a, $b) { return $a + $b; } }
$a = new A();

$method = (new \ReflectionClass($a))->getMethod('sum');
$method->setAccessible(true);
echo $method->invokeArgs($a, array(5, 3)) . "\n"; // prints 8
```

Using ReflClass:

```php
class A { function sum($a, $b) { return $a + $b; } }
$a = new A();

echo ReflClass::create($a)->invokeAnyMethod('sum', array(10, 3)); // prints 8
```

## Contributing ##

[All contributors](https://github.com/entering/ireflection/contributors)

See CONTRIBUTING file.

## License ##

IReflection library is released under the MIT License. See the bundled LICENSE file for details.


text:
module Sooner
  mattr_accessor :name_validations
  @@name_validations = true

  mattr_accessor :db_store
  @@db_store = true

  mattr_accessor :csv_store
  @@csv_store = true

  mattr_accessor :csv_file
  @@csv_file = 'subscribers.csv'

  mattr_accessor :mailer_sender
  @@mailer_sender = nil

  # Messages
  mattr_accessor :subscribed
  @@subscribed = 'Subscribed Successfully.'

  mattr_accessor :already_subscribed
  @@already_subscribed = 'Already Subscribed.'

  mattr_accessor :error_subscribed
  @@error_subscribed = 'Please Try to subscribe again.'

  # Default way to setup Sooner. Run rails generate sooner_install to create
  # a fresh initializer with all configuration values.
  def self.setup
    yield self
  end

end

require 'sooner/rails'


text:
package utilities;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;

import model.ListItem;

/**
 * Created by csacanam on 28/09/15.
 */
public class JSONParserListItem
{

    public JSONParserListItem()
    {
    }

    public ArrayList<ListItem> getData(String url)
    {
        ArrayList<ListItem> listItems = new ArrayList<>();
        try
        {
            URL listItemsURL = new URL(url);

            URLConnection tc = listItemsURL.openConnection();
            BufferedReader in = new BufferedReader(new InputStreamReader(tc.getInputStream()));

            String line;
            while ((line = in.readLine()) != null)
            {
                JSONArray array = new JSONArray(line);

                for (int i = 0; i < array.length(); i++)
                {

                    JSONObject jo = (JSONObject) array.get(i);
                    ListItem listItem = new ListItem(jo.getString("content"));
                    listItems.add(listItem);
                }

            }

        } catch (MalformedURLException e)
        {

        } catch (IOException e)
        {

        } catch (JSONException e)
        {
        }

        return listItems;

    }

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
 (c) Sergei Shilko <contact@sshilko.com>

 MIT License

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

 @license https://opensource.org/licenses/mit-license.php MIT
-->
<phpdocumentor configVersion="3.0" xmlns="https://www.phpdoc.org">
    <!-- https://docs.phpdoc.org/guide/references/configuration.html -->
    <title>phpDocumentor</title>
    <paths>
        <output>tmp/phpdoc-output</output>
        <cache>tmp/phpdoc-cache</cache>
    </paths>
    <version number="latest">
        <folder>latest</folder>
        <api format="php">
            <source dsn="/app">
                <path>src</path>
            </source>
            <default-package-name>Application</default-package-name>
            <markers>
                <marker>TODO</marker>
                <marker>FIXME</marker>
            </markers>
        </api>
    </version>
</phpdocumentor>


text:
<component name="InspectionProjectProfileManager">
  <profile version="1.0" is_locked="false">
    <option name="myName" value="Project Default" />
    <option name="myLocal" value="false" />
    <inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="myValues">
        <value>
          <list size="7">
            <item index="0" class="java.lang.String" itemvalue="nobr" />
            <item index="1" class="java.lang.String" itemvalue="noembed" />
            <item index="2" class="java.lang.String" itemvalue="comment" />
            <item index="3" class="java.lang.String" itemvalue="noscript" />
            <item index="4" class="java.lang.String" itemvalue="embed" />
            <item index="5" class="java.lang.String" itemvalue="script" />
            <item index="6" class="java.lang.String" itemvalue="content-icon" />
          </list>
        </value>
      </option>
      <option name="myCustomValuesEnabled" value="true" />
    </inspection_tool>
    <inspection_tool class="W3CssValidation" enabled="false" level="WARNING" enabled_by_default="false">
      <option name="myCssVersion" value="css3" />
      <option name="myIgnoreVendorSpecificProperties" value="false" />
    </inspection_tool>
  </profile>
</component>


text:
package com.saasovation.identityaccess.resources.view;

import com.saasovation.identityaccess.application.AccessService;
import com.saasovation.identityaccess.domain.model.identity.User;
import com.saasovation.identityaccess.resources.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

@RequestMapping(path="/tenants/{tenantId}/users")
@Controller
public class UserResource {

	@Autowired
	private AccessService accessService;

	@RequestMapping(path="/{username}/inRole/{role}",method=RequestMethod.GET)
	@ResponseBody
	public Object getUserInRole(@PathVariable("tenantId")String tenantId,
								@PathVariable("username")String username,
								@PathVariable("role")String role){
		User user = null;
		user = accessService.userInRole(tenantId, username, role);
		Response resp = new Response();
		if(user != null){
			resp.setData((Object)user);
		}
		resp.setErrorCode("000000");
		resp.setErrorMsg("success");
		resp.setRespDate(new Date());
		return resp;
	}

}


text:
Glass GDK Progressbar
=====================

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.prt2121/ProgressBar/badge.png)](https://maven-badges.herokuapp.com/maven-central/cz.jirutka.rsql/rsql-parser)

[![Build Status](https://travis-ci.org/prt2121/glass-gdk-progressbar.svg?branch=master)](https://travis-ci.org/prt2121/glass-gdk-progressbar)

Painless ProgressBar for Glass GDK!

###Including In Your Project

#####Gradle
```
compile 'com.github.prt2121:ProgressBar:1.0@aar'
```

###Usage

```java
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);
        mSliderView = (SliderView) findViewById(R.id.slider);
        mSliderView.startProgress(5 * 1000, animatorListener); // 5 seconds with listener
        // mSliderView.startProgress(5 * 1000); // 5 seconds without listener
        // mSliderView.startIndeterminate();
    }
```

**Changing the color in xml**

![gif 02](https://raw.githubusercontent.com/prt2121/glass-gdk-progressbar/master/screenshot/video2.gif)

```
    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_top"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        app:progress_color="@android:color/holo_blue_bright" />

    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_bottom"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        app:progress_color="@android:color/holo_blue_bright" />
```

![gif 02](https://github.com/prt2121/glass-gdk-progressbar/blob/master/screenshot/video.gif)

```
    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_top"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true" />

    <com.prt2121.glass.widget.SliderView
        android:id="@+id/slider_bottom"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" />
```