text:
/* Generated code */
import GetExtensionGrantListResponse from '../definitions/GetExtensionGrantListResponse';
import PathSegment from '../PathSegment';

export default class Grant extends PathSegment {
	constructor(prv: PathSegment, id?: string, service?) {
		super('grant', id, prv, service);
	}

	/**
	 *

Returns the list of extension grants.

Required Permissions

Permission	Description

ReadAccounts	Viewing user account info (including name, business name, address and phone number/account number)

Usage Plan Group

Light

	 */
	list(query?: ListQuery): Promise<GetExtensionGrantListResponse> {
		return this.getRest().call(this.getEndpoint(false), query, {
			body: undefined,
			method: 'get'
		}).then<any>((res) => {
				return res.json();
		});
	}

}

export interface ListQuery {

	/**
	 * Indicates the page number to retrieve. Only positive number values are allowed. Default value is '1'
	 */
	page?: number;

	/**
	 * Indicates the page size (number of items). If not specified, the value is '100' by default
	 */
	perPage?: number;
}


text:
//
//  ========================================================================
//  Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
//  ------------------------------------------------------------------------
//  All rights reserved. This program and the accompanying materials
//  are made available under the terms of the Eclipse Public License v1.0
//  and Apache License v2.0 which accompanies this distribution.
//
//      The Eclipse Public License is available at
//      http://www.eclipse.org/legal/epl-v10.html
//
//      The Apache License v2.0 is available at
//      http://www.opensource.org/licenses/apache2.0.php
//
//  You may elect to redistribute this code under either of these licenses.
//  ========================================================================
//

package org.eclipse.jetty.client;

import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.concurrent.atomic.AtomicBoolean;

import org.eclipse.jetty.client.security.Authentication;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpGenerator;
import org.eclipse.jetty.http.HttpHeaderValues;
import org.eclipse.jetty.http.HttpHeaders;
import org.eclipse.jetty.http.HttpMethods;
import org.eclipse.jetty.http.HttpParser;
import org.eclipse.jetty.http.HttpSchemes;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersions;
import org.eclipse.jetty.io.AbstractConnection;
import org.eclipse.jetty.io.Buffer;
import org.eclipse.jetty.io.Buffers;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.EofException;
import org.eclipse.jetty.io.View;
import org.eclipse.jetty.util.component.AggregateLifeCycle;
import org.eclipse.jetty.util.component.Dumpable;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.thread.Timeout;

/**
 *
 * @version $Revision: 879 $ $Date: 2009-09-11 16:13:28 +0200 (Fri, 11 Sep 2009) $
 */
public abstract class AbstractHttpConnection extends AbstractConnection implements Dumpable
{
    private static final Logger LOG = Log.getLogger(AbstractHttpConnection.class);

    protected HttpDestination _destination;
    protected HttpGenerator _generator;
    protected HttpParser _parser;
    protected boolean _http11 = true;
    protected int _status;
    protected Buffer _connectionHeader;
    protected boolean _reserved;

    // The current exchange waiting for a response
    protected volatile HttpExchange _exchange;
    protected HttpExchange _pipeline;
    private final Timeout.Task _idleTimeout = new ConnectionIdleTask();
    private AtomicBoolean _idle = new AtomicBoolean(false);

    AbstractHttpConnection(Buffers requestBuffers, Buffers responseBuffers, EndPoint endp)
    {
        super(endp);

        _generator = new HttpGenerator(requestBuffers,endp);
        _parser = new HttpParser(responseBuffers,endp,new Handler());
    }

    public void setReserved (boolean reserved)
    {
        _reserved = reserved;
    }

    public boolean isReserved()
    {
        return _reserved;
    }

    public HttpDestination getDestination()
    {
        return _destination;
    }

    public void setDestination(HttpDestination destination)
    {
        _destination = destination;
    }

    public boolean send(HttpExchange ex) throws IOException
    {
        LOG.debug("Send {} on {}",ex,this);
        synchronized (this)
        {
            if (_exchange != null)
            {
                if (_pipeline != null)
                    throw new IllegalStateException(this + " PIPELINED!!!  _exchange=" + _exchange);
                _pipeline = ex;
                return true;
            }

            _exchange = ex;
            _exchange.associate(this);

            // The call to associate() may have closed the connection, check if it's the case
            if (!_endp.isOpen())
            {
                _exchange.disassociate();
                _exchange = null;
                return false;
            }

            _exchange.setStatus(HttpExchange.STATUS_WAITING_FOR_COMMIT);

            adjustIdleTimeout();

            return true;
        }
    }

    private void adjustIdleTimeout() throws IOException
    {
        // Adjusts the idle timeout in case the default or exchange timeout
        // are greater. This is needed for long polls, where one wants an
        // aggressive releasing of idle connections (so idle timeout is small)
        // but still allow long polls to complete normally

        long timeout = _exchange.getTimeout();
        if (timeout <= 0)
            timeout = _destination.getHttpClient().getTimeout();

        long endPointTimeout = _endp.getMaxIdleTime();

        if (timeout > 0 && timeout > endPointTimeout)
        {
            // Make it larger than the exchange timeout so that there are
            // no races between the idle timeout and the exchange timeout
            // when trying to close the endpoint
            _endp.setMaxIdleTime(2 * (int)timeout);
        }
    }

    public abstract Connection handle() throws IOException;

    public boolean isIdle()
    {
        synchronized (this)
        {
            return _exchange == null;
        }
    }

    public boolean isSuspended()
    {
        return false;
    }

    public void onClose()
    {
    }

    /**
     * @throws IOException
     */
    protected void commitRequest() throws IOException
    {
        synchronized (this)
        {
            _status=0;
            if (_exchange.getStatus() != HttpExchange.STATUS_WAITING_FOR_COMMIT)
                throw new IllegalStateException();

            _exchange.setStatus(HttpExchange.STATUS_SENDING_REQUEST);
            _generator.setVersion(_exchange.getVersion());

            String method=_exchange.getMethod();
            String uri = _exchange.getRequestURI();
            if (_destination.isProxied())
            {
                if (!HttpMethods.CONNECT.equals(method) && uri.startsWith("/"))
                {
                    boolean secure = _destination.isSecure();
                    String host = _destination.getAddress().getHost();
                    int port = _destination.getAddress().getPort();
                    StringBuilder absoluteURI = new StringBuilder();
                    absoluteURI.append(secure ? HttpSchemes.HTTPS : HttpSchemes.HTTP);
                    absoluteURI.append("://");
                    absoluteURI.append(host);
                    // Avoid adding default ports
                    if (!(secure && port == 443 || !secure && port == 80))
                        absoluteURI.append(":").append(port);
                    absoluteURI.append(uri);
                    uri = absoluteURI.toString();
                }
                Authentication auth = _destination.getProxyAuthentication();
                if (auth != null)
                    auth.setCredentials(_exchange);
            }

            _generator.setRequest(method, uri);
            _parser.setHeadResponse(HttpMethods.HEAD.equalsIgnoreCase(method));

            HttpFields requestHeaders = _exchange.getRequestFields();
            if (_exchange.getVersion() >= HttpVersions.HTTP_1_1_ORDINAL)
            {
                if (!requestHeaders.containsKey(HttpHeaders.HOST_BUFFER))
                    requestHeaders.add(HttpHeaders.HOST_BUFFER,_destination.getHostHeader());
            }

            Buffer requestContent = _exchange.getRequestContent();
            if (requestContent != null)
            {
                requestHeaders.putLongField(HttpHeaders.CONTENT_LENGTH, requestContent.length());
                _generator.completeHeader(requestHeaders,false);
                _generator.addContent(new View(requestContent),true);
                _exchange.setStatus(HttpExchange.STATUS_WAITING_FOR_RESPONSE);
            }
            else
            {
                InputStream requestContentStream = _exchange.getRequestContentSource();
                if (requestContentStream != null)
                {
                    _generator.completeHeader(requestHeaders, false);
                }
                else
                {
                    requestHeaders.remove(HttpHeaders.CONTENT_LENGTH);
                    _generator.completeHeader(requestHeaders, true);
                    _exchange.setStatus(HttpExchange.STATUS_WAITING_FOR_RESPONSE);
                }
            }
        }
    }

    protected void reset() throws IOException
    {
        _connectionHeader = null;
        _parser.reset();
        _generator.reset();
        _http11 = true;
    }

    private class Handler extends HttpParser.EventHandler
    {
        @Override
        public void startRequest(Buffer method, Buffer url, Buffer version) throws IOException
        {
            // System.out.println( method.toString() + "///" + url.toString() +
            // "///" + version.toString() );
            // TODO validate this is acceptable, the <!DOCTYPE goop was coming
            // out here
            // throw new IllegalStateException();
        }

        @Override
        public void startResponse(Buffer version, int status, Buffer reason) throws IOException
        {
            HttpExchange exchange = _exchange;
            if (exchange==null)
            {
                LOG.warn("No exchange for response");
                _endp.close();
                return;
            }

            switch(status)
            {
                case HttpStatus.CONTINUE_100:
                case HttpStatus.PROCESSING_102:
                    // TODO check if appropriate expect was sent in the request.
                    exchange.setEventListener(new NonFinalResponseListener(exchange));
                    break;

                case HttpStatus.OK_200:
                    // handle special case for CONNECT 200 responses
                    if (HttpMethods.CONNECT.equalsIgnoreCase(exchange.getMethod()))
                        _parser.setHeadResponse(true);
                    break;
            }

            _http11 = HttpVersions.HTTP_1_1_BUFFER.equals(version);
            _status=status;
            exchange.getEventListener().onResponseStatus(version,status,reason);
            exchange.setStatus(HttpExchange.STATUS_PARSING_HEADERS);

        }

        @Override
        public void parsedHeader(Buffer name, Buffer value) throws IOException
        {
            HttpExchange exchange = _exchange;
            if (exchange!=null)
            {
                if (HttpHeaders.CACHE.getOrdinal(name) == HttpHeaders.CONNECTION_ORDINAL)
                {
                    _connectionHeader = HttpHeaderValues.CACHE.lookup(value);
                }
                exchange.getEventListener().onResponseHeader(name,value);
            }
        }

        @Override
        public void headerComplete() throws IOException
        {
            HttpExchange exchange = _exchange;
            if (exchange!=null)
            {
                exchange.setStatus(HttpExchange.STATUS_PARSING_CONTENT);
                if (HttpMethods.CONNECT.equalsIgnoreCase(exchange.getMethod()))
                    _parser.setPersistent(true);
            }
        }

        @Override
        public void content(Buffer ref) throws IOException
        {
            HttpExchange exchange = _exchange;
            if (exchange!=null)
                exchange.getEventListener().onResponseContent(ref);
        }

        @Override
        public void messageComplete(long contextLength) throws IOException
        {
            HttpExchange exchange = _exchange;
            if (exchange!=null)
                exchange.setStatus(HttpExchange.STATUS_COMPLETED);
        }

        @Override
        public void earlyEOF()
        {
            HttpExchange exchange = _exchange;
            if (exchange!=null)
            {
                if (!exchange.isDone())
                {
                    if (exchange.setStatus(HttpExchange.STATUS_EXCEPTED))
                        exchange.getEventListener().onException(new EofException("early EOF"));
                }
            }
        }
    }

    @Override
    public String toString()
    {
        return String.format("%s %s g=%s p=%s",
                super.toString(),
                _destination == null ? "?.?.?.?:??" : _destination.getAddress(),
                _generator,
                _parser);
    }

    public String toDetailString()
    {
        return toString() + " ex=" + _exchange + " idle for " + _idleTimeout.getAge();
    }

    public void close() throws IOException
    {
        //if there is a live, unfinished exchange, set its status to be
        //excepted and wake up anyone waiting on waitForDone()

        HttpExchange exchange = _exchange;
        if (exchange != null && !exchange.isDone())
        {
            switch (exchange.getStatus())
            {
                case HttpExchange.STATUS_CANCELLED:
                case HttpExchange.STATUS_CANCELLING:
                case HttpExchange.STATUS_COMPLETED:
                case HttpExchange.STATUS_EXCEPTED:
                case HttpExchange.STATUS_EXPIRED:
                    break;
                case HttpExchange.STATUS_PARSING_CONTENT:
                    if (_endp.isInputShutdown() && _parser.isState(HttpParser.STATE_EOF_CONTENT))
                        break;
                default:
                    String exch= exchange.toString();
                    String reason = _endp.isOpen()?(_endp.isInputShutdown()?"half closed: ":"local close: "):"closed: ";
                    if (exchange.setStatus(HttpExchange.STATUS_EXCEPTED))
                        exchange.getEventListener().onException(new EofException(reason+exch));
            }
        }

        if (_endp.isOpen())
        {
            _endp.close();
            _destination.returnConnection(this, true);
        }
    }

    public void setIdleTimeout()
    {
        synchronized (this)
        {
            if (_idle.compareAndSet(false, true))
                _destination.getHttpClient().scheduleIdle(_idleTimeout);
            else
                throw new IllegalStateException();
        }
    }

    public boolean cancelIdleTimeout()
    {
        synchronized (this)
        {
            if (_idle.compareAndSet(true, false))
            {
                _destination.getHttpClient().cancel(_idleTimeout);
                return true;
            }
        }

        return false;
    }

    protected void exchangeExpired(HttpExchange exchange)
    {
        synchronized (this)
        {
            // We are expiring an exchange, but the exchange is pending
            // Cannot reuse the connection because the reply may arrive, so close it
            if (_exchange == exchange)
            {
                try
                {
                    _destination.returnConnection(this, true);
                }
                catch (IOException x)
                {
                    LOG.ignore(x);
                }
            }
        }
    }

    /* ------------------------------------------------------------ */
    /**
     * @see org.eclipse.jetty.util.component.Dumpable#dump()
     */
    public String dump()
    {
        return AggregateLifeCycle.dump(this);
    }

    /* ------------------------------------------------------------ */
    /**
     * @see org.eclipse.jetty.util.component.Dumpable#dump(java.lang.Appendable, java.lang.String)
     */
    public void dump(Appendable out, String indent) throws IOException
    {
        synchronized (this)
        {
            out.append(String.valueOf(this)).append("\n");
            AggregateLifeCycle.dump(out,indent,Collections.singletonList(_endp));
        }
    }

    /* ------------------------------------------------------------ */
    private class ConnectionIdleTask extends Timeout.Task
    {
        /* ------------------------------------------------------------ */
        @Override
        public void expired()
        {
            // Connection idle, close it
            if (_idle.compareAndSet(true, false))
            {
                _destination.returnIdleConnection(AbstractHttpConnection.this);
            }
        }
    }

    /* ------------------------------------------------------------ */
    private class NonFinalResponseListener implements HttpEventListener
    {
        final HttpExchange _exchange;
        final HttpEventListener _next;

        /* ------------------------------------------------------------ */
        public NonFinalResponseListener(HttpExchange exchange)
        {
            _exchange=exchange;
            _next=exchange.getEventListener();
        }

        /* ------------------------------------------------------------ */
        public void onRequestCommitted() throws IOException
        {
        }

        /* ------------------------------------------------------------ */
        public void onRequestComplete() throws IOException
        {
        }

        /* ------------------------------------------------------------ */
        public void onResponseStatus(Buffer version, int status, Buffer reason) throws IOException
        {
        }

        /* ------------------------------------------------------------ */
        public void onResponseHeader(Buffer name, Buffer value) throws IOException
        {
            _next.onResponseHeader(name,value);
        }

        /* ------------------------------------------------------------ */
        public void onResponseHeaderComplete() throws IOException
        {
            _next.onResponseHeaderComplete();
        }

        /* ------------------------------------------------------------ */
        public void onResponseContent(Buffer content) throws IOException
        {
        }

        /* ------------------------------------------------------------ */
        public void onResponseComplete() throws IOException
        {
            _exchange.setEventListener(_next);
            _exchange.setStatus(HttpExchange.STATUS_WAITING_FOR_RESPONSE);
            _parser.reset();
        }

        /* ------------------------------------------------------------ */
        public void onConnectionFailed(Throwable ex)
        {
            _exchange.setEventListener(_next);
            _next.onConnectionFailed(ex);
        }

        /* ------------------------------------------------------------ */
        public void onException(Throwable ex)
        {
            _exchange.setEventListener(_next);
            _next.onException(ex);
        }

        /* ------------------------------------------------------------ */
        public void onExpire()
        {
            _exchange.setEventListener(_next);
            _next.onExpire();
        }

        /* ------------------------------------------------------------ */
        public void onRetry()
        {
            _exchange.setEventListener(_next);
            _next.onRetry();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Slime : MonoBehaviour
{
    [Header("Game Elements")]
    MoveMaster moveM;
    AudioMaster audioM;

    [Header("Player Fields")]
    Transform player;
    Vector3 playerPos;
    Player playerScript;

    [Header("Slime Prefab")]
    [SerializeField] GameObject slimePrefab;
    [SerializeField] GameObject slimeMediumPrefab;
    [SerializeField] GameObject slimeSmallPrefab;

    public AudioPlayer audioP;

    [Header("Slime Fields")]
    [SerializeField]
    int phase;
    int life = 30;
    float detectionRadius = 4;
    float speed = 1;
    float attackCooldown;
    int damage = 3;
    Vector3 slimePos;
    float patrolMoveCounter;
    float velocityX;
    bool isFacingRight;
    float attackCounter;
    float stunnedTime = 0.7f;
    float stunnedCounter;
    float IdleCounter;
    float IdleTime;
    float deadTime = 0.5f;
    float randomScale;
    Animator myAnim;
    Rigidbody rb;

    [SerializeField]
    SlimeState currentSlimeState;
    enum SlimeState
    {
        Idle,
        Chasing,
        Dead
    }

    private void Start()
    {
        moveM = GameObject.FindGameObjectWithTag("MoveMaster").GetComponent<MoveMaster>();
        player = GameObject.FindGameObjectWithTag("Player").transform;
        playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
        myAnim = GetComponentInChildren<Animator>();
        rb = GetComponent<Rigidbody>();
        //audioM = GameObject.FindGameObjectWithTag("SoundMaster").GetComponent<AudioMaster>();

    }

    void Update ()
    {
        playerPos = player.transform.position;
        slimePos = this.transform.position;
        attackCooldown -= Time.deltaTime;

        switch(currentSlimeState)
        {
            case SlimeState.Idle:
                Idle();
                break;

            case SlimeState.Chasing:
                Chasing();
                break;

            case SlimeState.Dead:
                Dead();
                break;

            default:
                break;
        }
    }

    #region UPDATE METHODS

    void Idle()
    {
        if(Vector2.Distance(playerPos,slimePos) < detectionRadius)
        {
            audioP.PlayAmbient(0);
            ChasingState();
        }
    }

    void Chasing()
    {
        if(Vector2.Distance(playerPos, slimePos) > 2)
        {
            moveM.Move(this.gameObject, playerPos, speed);

            float posZ;
            posZ = this.transform.position.z;

            if (this.gameObject.transform.position.z < playerPos.z)
            {
                posZ += speed/2 * Time.deltaTime;
                this.transform.position = new Vector3(this.transform.position.x, this.transform.position.y, posZ);
            }
            if (this.gameObject.transform.position.z > playerPos.z)
            {
                posZ -= speed/2 * Time.deltaTime;
                this.transform.position = new Vector3(this.transform.position.x, this.transform.position.y, posZ);
            }
        }

        if(this.gameObject.transform.position.x - playerPos.x > 0 && isFacingRight)
        {
            Flip();
        }
        if(this.gameObject.transform.position.x - playerPos.x < 0 && !isFacingRight)
        {
            Flip();
        }
    }

    void Dead()
    {
        deadTime -= Time.deltaTime;
        myAnim.SetTrigger("Dead");

        if (deadTime <= 0)
        {
            Destroy(this.gameObject);
        }
    }

    #endregion

    #region STATE METHODS

    void IdleState()
    {
        currentSlimeState = SlimeState.Idle;
    }

    void ChasingState()
    {
        currentSlimeState = SlimeState.Chasing;
    }

    void DeadState()
    {
        currentSlimeState = SlimeState.Dead;
    }

    #endregion

    #region COLLISION METHODS

    private void OnTriggerStay(Collider other)
    {
        if(other.tag == ("Player") && currentSlimeState == SlimeState.Chasing && attackCooldown <= 0)
        {
            myAnim.SetTrigger("Attack");
            audioP.Play2DSFX(11);
            playerScript.RecieveDamage();
            attackCooldown = 2;
        }
    }

    #endregion

    #region MECHANICS METHODS

    void Flip()
    {
        this.gameObject.transform.localScale = new Vector3((this.gameObject.transform.localScale.x * -1), this.gameObject.transform.localScale.y, this.gameObject.transform.localScale.z);
        isFacingRight = !isFacingRight;
    }

    public void RecieveDamage()
    {
        audioP.StopAmbient();
        audioP.Play2DSFX(1);
        DeadState();
    }

    private void OnDrawGizmos()
    {
        Gizmos.color = Color.red;
        Gizmos.DrawWireSphere(slimePos, detectionRadius);
    }

    #endregion

}


text:
package org.deeplearning4j.clustering.strategy;

import org.deeplearning4j.clustering.algorithm.Distance;
import org.deeplearning4j.clustering.condition.ClusteringAlgorithmCondition;
import org.deeplearning4j.clustering.condition.ConvergenceCondition;
import org.deeplearning4j.clustering.condition.FixedIterationCountCondition;
import org.deeplearning4j.clustering.iteration.IterationHistory;
import org.deeplearning4j.clustering.optimisation.ClusteringOptimization;
import org.deeplearning4j.clustering.optimisation.ClusteringOptimizationType;

public class OptimisationStrategy extends BaseClusteringStrategy {
    public static int defaultIterationCount = 100;

    private ClusteringOptimization clusteringOptimisation;
    private ClusteringAlgorithmCondition clusteringOptimisationApplicationCondition;

    protected OptimisationStrategy() {
        super();
    }

    protected OptimisationStrategy(int initialClusterCount, Distance distanceFunction) {
        super(ClusteringStrategyType.OPTIMIZATION, initialClusterCount, distanceFunction, false);
    }

    public static OptimisationStrategy setup(int initialClusterCount, Distance distanceFunction) {
        return new OptimisationStrategy(initialClusterCount, distanceFunction);
    }

    public OptimisationStrategy optimize(ClusteringOptimizationType type, double value) {
        clusteringOptimisation = new ClusteringOptimization(type, value);
        return this;
    }

    public OptimisationStrategy optimizeWhenIterationCountMultipleOf(int value) {
        clusteringOptimisationApplicationCondition = FixedIterationCountCondition.iterationCountGreaterThan(value);
        return this;
    }

    public OptimisationStrategy optimizeWhenPointDistributionVariationRateLessThan(double rate) {
        clusteringOptimisationApplicationCondition = ConvergenceCondition.distributionVariationRateLessThan(rate);
        return this;
    }

    public double getClusteringOptimizationValue() {
        return clusteringOptimisation.getValue();
    }

    public boolean isClusteringOptimizationType(ClusteringOptimizationType type) {
        return clusteringOptimisation != null && clusteringOptimisation.getType().equals(type);
    }

    public boolean isOptimizationDefined() {
        return clusteringOptimisation != null;
    }

    public boolean isOptimizationApplicableNow(IterationHistory iterationHistory) {
        return clusteringOptimisationApplicationCondition != null
                        && clusteringOptimisationApplicationCondition.isSatisfied(iterationHistory);
    }

}


text:
<!DOCTYPE html>

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

<title>Object.html - RDoc Documentation</title>

<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">

    Home
    Classes
    Methods

  <form action="#" method="get" accept-charset="utf-8">

      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">

  </form>

Pages

Gemfile

Gemfile.lock

Guardfile

LICENSE

Rakefile

Fraccion.html

Gemfile.html

Guardfile.html

LICENSE_txt.html

Matriz.html

Matrizdispersascp.html

MatrizDensa.html

MatrizDispersa.html

Object.html

Rakefile.html

created.rid

Fraccion_html.html

Gemfile_html.html

Guardfile_html.html

LICENSE_txt_html.html

Matriz_html.html

MatrizDensa_html.html

MatrizDispersa_html.html

Matrizdispersascp_html.html

Object_html.html

Rakefile_html.html

created_rid.html

created_rid_html.html

index_html.html

darkfish_js.html

jquery_js.html

navigation_js.html

search_index_js.html

search_js.html

searcher_js.html

fraccion_rb~_html.html

matriz_rb~_html.html

matrizdispersascp_rb~_html.html

mcd_rb~_html.html

matrizdispersascp_gemspec_html.html

rdoc_css.html

matrizdispersascp_spec_rb~_html.html

table_of_contents_html.html

index.html

darkfish.js

jquery.js

navigation.js

search.js

search_index.js

searcher.js

fraccion_rb~.html

matriz_rb~.html

matrizdispersa_rb~.html

version_rb~.html

matrizdispersascp_rb~.html

mcd_rb~.html

matrizdispersascp_gemspec.html

rdoc.css

matrizdispersascp_spec_rb~.html

table_of_contents.html

fraccion.rb~

matriz.rb~

matriz_DSL.rb~

matrizdispersa.rb~

matrizdispersascp.rb~

version.rb~

mcd.rb~

matrizdispersascp.gemspec

matrizdispersascp.gemspec~

readme

matrizdispersascp_spec.rb~

Class and Module Index

Fraccion

Matriz

MatrizDSL

Matrizdispersascp

Matrizdispersascp::MatrizDensa

Matrizdispersascp::MatrizDispersa

Object

<!DOCTYPE html>

<html> <head> <meta content="text/html; charset=UTF-8"
http-equiv="Content-Type">

<title>class Object - RDoc
Documentation</title>

<link type="text/css" media="screen" href="./rdoc.css"
rel="stylesheet">

<script type="text/javascript">

var rdoc_rel_prefix = "./";

</script>

<script type="text/javascript" charset="utf-8"
src="./js/jquery.js"></script> <script
type="text/javascript" charset="utf-8"
src="./js/navigation.js"></script> <script
type="text/javascript" charset="utf-8"
src="./js/search_index.js"></script> <script
type="text/javascript" charset="utf-8"
src="./js/search.js"></script> <script
type="text/javascript" charset="utf-8"
src="./js/searcher.js"></script> <script
type="text/javascript" charset="utf-8"
src="./js/darkfish.js"></script>

<body id="top" class="class"> <nav id="metadata">

<nav id="home-section" class="section">
<h3 class="section-header">
  <a href="./index.html">Home</a>
  <a href="./table_of_contents.html#classes">Classes</a>
  <a href="./table_of_contents.html#methods">Methods</a>
</h3>

</nav>

<nav id="search-section" class="section project-section" class="initially-hidden">
<form action="#" method="get" accept-charset="utf-8">
  <h3 class="section-header">
    <input type="text" name="search" placeholder="Search" id="search-field"
           title="Type to search, Up and Down to navigate, Enter to load">
  </h3>
</form>

<ul id="search-results" class="initially-hidden"></ul>

</nav>

<div id="file-metadata">
  <nav id="file-list-section" class="section">
<h3 class="section-header">Defined In</h3>
<ul>
  <li>lib/mcd.rb
  <li>spec/matrizdispersascp_spec.rb
</ul>

</nav>

</div>

<div id="class-metadata">

  <nav id="parent-class-section" class="section">
<h3 class="section-header">Parent</h3>

<p class="link">BasicObject

</nav>

<!-- Included Modules -->

<nav id="includes-section" class="section">

<h3 class="section-header">Included Modules</h3>

<ul class="link-list">

  <li><a class="include" href="Matrizdispersascp.html">Matrizdispersascp</a>

</ul>

</nav>

<!-- Method Quickref -->

<nav id="method-list-section" class="section">

<h3 class="section-header">Methods</h3>

<ul class="link-list">

  <li ><a href="#method-i-Mcd">#Mcd</a>

</ul>

</nav>

</div>

<div id="project-metadata">
  <nav id="fileindex-section" class="section project-section">
<h3 class="section-header">Pages</h3>

<ul>

  <li class="file"><a href="./Gemfile.html">Gemfile</a>

  <li class="file"><a href="./Guardfile.html">Guardfile</a>

  <li class="file"><a href="./LICENSE_txt.html">LICENSE</a>

  <li class="file"><a href="./Rakefile.html">Rakefile</a>

  <li class="file"><a href="./doc/Fraccion_html.html">Fraccion.html</a>

  <li class="file"><a href="./doc/Gemfile_html.html">Gemfile.html</a>

  <li class="file"><a href="./doc/Guardfile_html.html">Guardfile.html</a>

  <li class="file"><a href="./doc/LICENSE_txt_html.html">LICENSE_txt.html</a>

  <li class="file"><a href="./doc/Matriz_html.html">Matriz.html</a>

  <li class="file"><a href="./doc/Matrizdispersascp_html.html">Matrizdispersascp.html</a>

  <li class="file"><a href="./doc/Matrizdispersascp/MatrizDensa_html.html">MatrizDensa.html</a>

  <li class="file"><a href="./doc/Matrizdispersascp/MatrizDispersa_html.html">MatrizDispersa.html</a>

  <li class="file"><a href="./doc/Object_html.html">Object.html</a>

  <li class="file"><a href="./doc/Rakefile_html.html">Rakefile.html</a>

  <li class="file"><a href="./doc/created_rid.html">created.rid</a>

  <li class="file"><a href="./doc/doc/created_rid_html.html">created_rid.html</a>

  <li class="file"><a href="./doc/index_html.html">index.html</a>

  <li class="file"><a href="./doc/js/darkfish_js.html">darkfish.js</a>

  <li class="file"><a href="./doc/js/jquery_js.html">jquery.js</a>

  <li class="file"><a href="./doc/js/navigation_js.html">navigation.js</a>

  <li class="file"><a href="./doc/js/search_js.html">search.js</a>

  <li class="file"><a href="./doc/js/search_index_js.html">search_index.js</a>

  <li class="file"><a href="./doc/js/searcher_js.html">searcher.js</a>

  <li class="file"><a href="./doc/lib/fraccion_rb~_html.html">fraccion_rb~.html</a>

  <li class="file"><a href="./doc/lib/matriz_rb~_html.html">matriz_rb~.html</a>

  <li class="file"><a href="./doc/lib/matrizdispersascp_rb~_html.html">matrizdispersascp_rb~.html</a>

  <li class="file"><a href="./doc/lib/mcd_rb~_html.html">mcd_rb~.html</a>

  <li class="file"><a href="./doc/matrizdispersascp_gemspec_html.html">matrizdispersascp_gemspec.html</a>

  <li class="file"><a href="./doc/rdoc_css.html">rdoc.css</a>

  <li class="file"><a href="./doc/spec/matrizdispersascp_spec_rb~_html.html">matrizdispersascp_spec_rb~.html</a>

  <li class="file"><a href="./doc/table_of_contents_html.html">table_of_contents.html</a>

  <li class="file"><a href="./lib/fraccion_rb~.html">fraccion.rb~</a>

  <li class="file"><a href="./lib/matriz_rb~.html">matriz.rb~</a>

  <li class="file"><a href="./lib/matrizdispersascp_rb~.html">matrizdispersascp.rb~</a>

  <li class="file"><a href="./lib/mcd_rb~.html">mcd.rb~</a>

  <li class="file"><a href="./matrizdispersascp_gemspec.html">matrizdispersascp.gemspec</a>

  <li class="file"><a href="./spec/matrizdispersascp_spec_rb~.html">matrizdispersascp_spec.rb~</a>

</ul>

</nav>

  <nav id="classindex-section" class="section project-section">
<h3 class="section-header">Class and Module Index</h3>

<ul class="link-list">

  <li><a href="./Fraccion.html">Fraccion</a>

  <li><a href="./Matriz.html">Matriz</a>

  <li><a href="./Matrizdispersascp.html">Matrizdispersascp</a>

  <li><a href="./Matrizdispersascp/MatrizDensa.html">Matrizdispersascp::MatrizDensa</a>

  <li><a href="./Matrizdispersascp/MatrizDispersa.html">Matrizdispersascp::MatrizDispersa</a>

  <li><a href="./Object.html">Object</a>

</ul>

</nav>

</div>

</nav>

<div id="documentation">

<h1 class="class">class Object</h1>

<div id="description" class="description">

</div><!-- description -->

<section id="5Buntitled-5D" class="documentation-section">

  <!-- Methods -->

   <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
    <h3 class="section-header">Public Instance Methods</h3>

    <div id="method-i-Mcd" class="method-detail ">

      <div class="method-heading">
        <span class="method-name">Mcd</pan><span
          class="method-args">(u,v)</span>

        <span class="method-click-advice">click to toggle source</pan>

      </div>

      <div class="method-description">

        <h1 id="method-i-Mcd-label-mcd.rb">mcd.rb<span><a href="#method-i-Mcd-label-mcd.rb">&para;</a> <a href="#documentation">&uarr;</a></pan></h1>

<p>Autor::Pedro Javier Núñez Rodríguez y Constanza Leon
Baritussio</p>

<h2 id="method-i-Mcd-label-Maximo+Comun+Divisor">Maximo Comun
Divisor<span><a
href="#method-i-Mcd-label-Maximo+Comun+Divisor">&para;</a>
<a
href="#documentation">&uarr;</a></span></h2>
<ul><li> <p>Programar un metodo para calcular el maximo
comun divisor de dos valores</p> </li></ul>

<h3 id="method-i-Mcd-label-Metodo+Mcd">Metodo <a
href="Object.html#method-i-Mcd">#Mcd</a><span><a
href="#method-i-Mcd-label-Metodo+Mcd">&para;</a> <a
href="#documentation">&uarr;</a></span></h3>

<p>Se le pasa por parametro dos parametros numericos El procedimiento
es el siguiente, se calcula primero el valor absoluto de los dos valores y
entra en un bucle que va dividiendo los dos numeros por un valor k que
aumenta mientras sea menor que  cualquiera de los dos parametros, cuando
sale del bucle ya tendra en mcd y lo devuelve en max</p>

<div class="method-source-code" id="Mcd-source">
  <pre><span class="ruby-comment"># File lib/mcd.rb, line 12</span>

<span class="ruby-keyword">def</span> <span
class="ruby-constant">Mcd</span>(<span
class="ruby-identifier">u</span>,<span
class="ruby-identifier">v</span>)

<span class="ruby-identifier">u</span> = <span class="ruby-identifier">u</span>.<span class="ruby-identifier">abs</span>                            <span class="ruby-comment"># Ponemos en valor absoluto ambos valores</span>
<span class="ruby-identifier">v</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">abs</span>
<span class="ruby-identifier">k</span> = <span class="ruby-value">1</span>                                <span class="ruby-comment"># Inicializamos el valor en el que guardaremos el mcd</span>
<span class="ruby-identifier">max</span> = <span class="ruby-value">1</span>
<span class="ruby-keyword">while</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">u</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">v</span>              <span class="ruby-comment"># Iteramos mientras que k no sea mayor que ninguno de los dos números</span>
   <span class="ruby-keyword">if</span> ((<span class="ruby-identifier">u</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">k</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>) <span class="ruby-keyword">and</span> ((<span class="ruby-identifier">v</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">k</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>)
      <span class="ruby-identifier">max</span> = <span class="ruby-identifier">k</span>                        <span class="ruby-comment"># Cuando encontramos un k que es divisor de los dos numeros lo guardamos</span>
   <span class="ruby-keyword">end</span>
   <span class="ruby-identifier">k</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">return</span> <span class="ruby-identifier">max</span>                           <span class="ruby-comment"># Retornamos el valor encontrado</span>

<span class="ruby-keyword">end</span></pre>

        </div><!-- Mcd-source -->

      </div>

    </div><!-- Mcd-method -->

  </section><!-- public-instance-method-details -->

</section><!-- 5Buntitled-5D -->

</div><!– documentation –>

<footer id="validator-badges">

<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.

</footer>

[Validate]

Generated by RDoc 4.0.1.

Generated with the Darkfish Rdoc Generator 3.


text:
{% extends "share_base.html" %}
{% block head %}
{{ super() }}

{% endblock%}
{% block title %}
<title>木犀分享-编辑分享</title>
{% endblock %}
{% block content %}

        <form method="post">
            {{ form.hidden_tag() }}
            {{ form.title(class="send_title" ) }}

                {% for tag in tags %}

                    <input type="radio" id="option-{{ loop.index }}" class="mdl-radio__button" name="tag" value="{{ tag }}">
                    {{ tag | capitalize }}

                {% endfor %}

                {{ form.share }}

                <button  type="submit" class="send_submit_btn mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--raised">
                    EDIT
                </button>

        </form>

{% endblock %}


text:
extern "Java"
{
  namespace java
  {
    namespace awt
    {
        class GraphicsDevice;
        class Point;
        class PointerInfo;
    }
  }
}

class java::awt::PointerInfo : public ::java::lang::Object
{

public: // actually package-private
  PointerInfo(::java::awt::GraphicsDevice *, ::java::awt::Point *);
public:
  virtual ::java::awt::GraphicsDevice * getDevice();
  virtual ::java::awt::Point * getLocation();
private:
  ::java::awt::GraphicsDevice * __attribute__((aligned(__alignof__( ::java::lang::Object)))) gd;
  ::java::awt::Point * p;
public:
  static ::java::lang::Class class$;
};

#endif // __java_awt_PointerInfo__


text:
Template.postItem.helpers({
	domain : function () {
		var a = document.createElement('a');
		a.href = this.url;
		return a.hostname;
	}
});


text:
. $CORE_PATH/hw/scripts/common.sh

GDB=arm-none-eabi-gdb

#
# FILE_NAME must contain the name of the file to load
# FLASH_OFFSET must contain the offset in flash where to place it
#
stlink_load () {
    if [ -z $FILE_NAME ]; then
        echo "Missing filename"
        exit 1
    fi
    if [ ! -f "$FILE_NAME" ]; then
        # tries stripping current path for readability
        FILE=${FILE_NAME##$(pwd)/}
        echo "Cannot find file" $FILE
        exit 1
    fi
    if [ -z $FLASH_OFFSET ]; then
        echo "Missing flash offset"
        exit 1
    fi

    echo "Downloading" $FILE_NAME "to" $FLASH_OFFSET

    st-flash --reset write $FILE_NAME $FLASH_OFFSET
    if [ $? -ne 0 ]; then
        exit 1
    fi
    return 0
}

#
# NO_GDB should be set if gdb should not be started
# FILE_NAME should point to elf-file being debugged
#
stlink_debug () {
    windows_detect
    PORT=3333

    if [ -z "$NO_GDB" ]; then
        if [ -z $FILE_NAME ]; then
            echo "Missing filename"
            exit 1
        fi
        if [ ! -f "$FILE_NAME" ]; then
            echo "Cannot find file" $FILE_NAME
            exit 1
        fi

        if [ $WINDOWS -eq 1 ]; then
            #
            # Launch openocd in a separate command interpreter, to make sure
            # it doesn't get killed by Ctrl-C signal from bash.
            #

            $COMSPEC /C "start $COMSPEC /C st-util -p $PORT"
        else
            #
            # Block Ctrl-C from getting passed to openocd.
            #
            set -m
            st-util -p $PORT >stlink.log 2>&1 &
            stpid=$!
            set +m
        fi

        GDB_CMD_FILE=.gdb_cmds

        echo "target remote localhost:$PORT" > $GDB_CMD_FILE
        if [ ! -z "$RESET" ]; then
            echo "mon reset halt" >> $GDB_CMD_FILE
        fi

        echo "$EXTRA_GDB_CMDS" >> $GDB_CMD_FILE

        if [ $WINDOWS -eq 1 ]; then
            FILE_NAME=`echo $FILE_NAME | sed 's/\//\\\\/g'`
            $COMSPEC /C "start $COMSPEC /C $GDB -x $GDB_CMD_FILE $FILE_NAME"
        else
            set -m
            $GDB -x $GDB_CMD_FILE $FILE_NAME
            set +m
            rm $GDB_CMD_FILE
            sleep 1
            if [ -d /proc/$stpid ] ; then
                kill -9 $stpid
            fi
        fi
    else
        # No GDB, wait for openocd to exit
        st-util -p $PORT
        return $?
    fi

    return 0
}


text:
require 'rest_client'
require 'active_support/core_ext/hash/conversions'

module WxPay
  module Service
    GATEWAY_URL = 'https://api.mch.weixin.qq.com'

    INVOKE_UNIFIEDORDER_REQUIRED_FIELDS = %i(body out_trade_no total_fee spbill_create_ip notify_url trade_type)
    def self.invoke_unifiedorder(params)
      params = {
        appid: WxPay.appid,
        mch_id: WxPay.mch_id,
        nonce_str: SecureRandom.uuid.tr('-', '')
      }.merge(params)

      check_required_options(params, INVOKE_UNIFIEDORDER_REQUIRED_FIELDS)

      r = invoke_remote("#{GATEWAY_URL}/pay/unifiedorder", make_payload(params))

      yield r if block_given?

      r
    end

    GENERATE_APP_PAY_REQ_REQUIRED_FIELDS = %i(prepayid noncestr)
    def self.generate_app_pay_req(params)
      params = {
        appid: WxPay.appid,
        partnerid: WxPay.mch_id,
        package: 'Sign=WXPay',
        timestamp: Time.now.to_i.to_s
      }.merge(params)

      check_required_options(params, GENERATE_APP_PAY_REQ_REQUIRED_FIELDS)

      params[:sign] = WxPay::Sign.generate(params)

      params
    end

    INVOKE_REFUND_REQUIRED_FIELDS = %i(out_refund_no total_fee refund_fee)
    def self.invoke_refund(params)
      params = {
        appid: WxPay.appid,
        mch_id: WxPay.mch_id,
        nonce_str: SecureRandom.uuid.tr('-', ''),
        op_user_id: WxPay.mch_id
      }.merge(params)

      check_required_options(params, INVOKE_REFUND_REQUIRED_FIELDS)

      r = invoke_remote_with_cert("#{GATEWAY_URL}/secapi/pay/refund", make_payload(params))

      yield(r) if block_given?

      r
    end

    INVOKE_TRANSFER_REQUIRED_FIELDS = %i(partner_trade_no openid check_name amount desc spbill_create_ip)
    def self.invoke_transfer params
      params = {
        mch_appid: WxPay.appid,
        mchid: WxPay.mch_id,
        nonce_str: SecureRandom.uuid.tr('-', '')
      }.merge(params)

      check_required_options(params, INVOKE_TRANSFER_REQUIRED_FIELDS)

      r = invoke_remote_with_cert("#{GATEWAY_URL}/mmpaymkttransfers/promotion/transfers", make_payload(params))

      yield r if block_given?

      r
    end

    private

    def self.check_required_options(options, names)
      names.each do |name|
        warn("WxPay Warn: missing required option: #{name}") unless options.has_key?(name)
      end
    end

    def self.make_payload(params)
      sign = WxPay::Sign.generate(params)
      params.delete(:key) if params[:key]
      "<xml>#{params.map { |k, v| "<#{k}>#{v}</#{k}>" }.join}<sign>#{sign}</sign></xml>"
    end

    def self.invoke_remote_with_cert(url, payload)
      # 微信退款、企业付款等需要双向证书
      # https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4
      # https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=4_3

      invoke_remote(url, payload, {
        ssl_client_cert: WxPay.apiclient_cert.certificate,
        ssl_client_key: WxPay.apiclient_cert.key,
        verify_ssl: OpenSSL::SSL::VERIFY_NONE
      })
    end

    def self.invoke_remote(url, payload, extra_rest_client_options = {})
      r = RestClient::Request.execute(
        {
          method: :post,
          url: url,
          payload: payload,
          headers: { content_type: 'application/xml' }
        }.merge(WxPay.extra_rest_client_options).merge(extra_rest_client_options)
      )

      if r
        WxPay::Result.new Hash.from_xml(r)
      else
        nil
      end
    end
  end
end


text:
package debop4s.timeperiod.utils

import java.util.Locale

import debop4s.core.conversions.jodatime._
import debop4s.timeperiod.TimeSpec._
import debop4s.timeperiod.tests.AbstractTimeFunSuite
import debop4s.timeperiod.{Halfyear, Quarter}
import org.joda.time.Duration

/**
 * debop4s.timeperiod.tests.debop4s.redis.base.DurationsTest
 *
 * @author 배성혁 sunghyouk.bae@gmail.com
 * @since 2014. 2. 17. 오전 11:15
 */
class DurationsFunSuite extends AbstractTimeFunSuite {

  val currentYear = Times.currentYear.getYear
  val currentLocale = Locale.getDefault()
  val range = (-100 to 100)

  test("year duartion") {
    Durations.year(currentYear) should equal(new Duration(Times.startTimeOfYear(currentYear), Times.startTimeOfYear(currentYear + 1)))
    Durations.year(currentYear + 1) should equal(new Duration(Times.startTimeOfYear(currentYear + 1), Times.startTimeOfYear(currentYear + 2)))
    Durations.year(currentYear - 1) should equal(new Duration(Times.startTimeOfYear(currentYear - 1), Times.startTimeOfYear(currentYear)))

    Durations.year(currentYear) should equal(Durations.days(Times.daysOfYear(currentYear)))
    Durations.year(currentYear + 1) should equal(Durations.days(Times.daysOfYear(currentYear + 1)))
    Durations.year(currentYear - 1) should equal(Durations.days(Times.daysOfYear(currentYear - 1)))
  }

  test("halfyear duration") {
    Halfyear.values.par.foreach {
      hy =>
        val months = Times.monthsOfHalfyear(hy)
        var duration = Durations.Zero

        months.foreach {
          m =>
            val daysInMonth = Times.daysInMonth(currentYear, m)
            duration = duration + (daysInMonth * MillisPerDay)
        }
        Durations.halfyear(currentYear, hy) should equal(duration)
    }
  }

  test("quarter duration") {
    Quarter.values.par.foreach {
      q =>
        val months = Times.monthsOfQuarter(q)
        var duration = Durations.Zero

        months.foreach {
          m =>
            val daysInMonth = Times.daysInMonth(currentYear, m)
            duration = duration + (daysInMonth * MillisPerDay)
        }
        Durations.quarter(currentYear, q) should equal(duration)
    }
  }

  test("month duration") {
    (1 to MonthsPerYear).par.foreach {
      m =>
        Durations.month(currentYear, m) should equal(Duration.millis(Times.daysInMonth(currentYear, m) * MillisPerDay))
    }
  }

  test("week duration") {
    Durations.Week should equal(Duration.millis(DaysPerWeek * MillisPerDay))

    range.par.foreach {
      w =>
        Durations.weeks(w) should equal(Duration.standardDays(w * DaysPerWeek))
    }
  }

  test("day duration") {
    Durations.Day.getMillis should equal(MillisPerDay)

    range.par.foreach {
      d =>
        Durations.days(d) should equal(Duration.standardDays(d))
    }
  }

  test("hour duration") {
    Durations.Hour should equal(Duration.standardHours(1))

    range.par.foreach {
      h =>
        Durations.hours(h) should equal(Duration.standardHours(h))
    }
  }

  test("minute duration") {
    Durations.Minute should equal(Duration.standardMinutes(1))

    range.par.foreach {
      m =>
        Durations.minutes(m) should equal(Duration.standardMinutes(m))
    }
  }

  test("second duration") {
    Durations.Second should equal(Duration.standardSeconds(1))

    range.par.foreach {
      s =>
        Durations.seconds(s) should equal(Duration.standardSeconds(s))
    }
  }

  test("millis duration") {
    Durations.Millisecond.getMillis should equal(1)

    range.par.foreach {
      ms =>
        Durations.millis(ms).getMillis should equal(ms)
    }
  }
}


text:
package org.ebayopensource.fido.uaf.crypto;

import static org.junit.Assert.*;

import java.security.InvalidParameterException;

import org.junit.Test;

public class HMACTest {

	@Test
	public void testSignNotNullNotEqual()
	{
		try
		{
			byte[] Signature = HMAC.sign("Some_String", "Password");
			assertNotNull(Signature);
			assertTrue(!Signature.toString().equals("SOME_STRING"));
		}
		catch (Exception e)
		{
			assertTrue(e instanceof Exception);
		}
	}

	@Test
	public void nullPassword()
	{
		String result="";
		try
		{
			result = HMAC.sign("Some_String", null).toString();
		}
		catch (Exception e)
		{
			assertTrue(e instanceof InvalidParameterException);
		}
	}

	@Test
	public void nullInputString()
	{
		String result="";
		try
		{
			result = HMAC.sign(null, "Password").toString();
		}
		catch (Exception e)
		{
			e.printStackTrace();
			assertTrue(e instanceof InvalidParameterException);
		}
	}
}


text:
<?php
namespace AsimovExpress\AdobeConnect;
use Illuminate\Support\Facades\Facade;
/**
 * Facade class
 */
class Connect extends Facade
{
    protected static function getFacadeAccessor()
    {
        return 'adobe-connect'
    }
}


text:
*  RTM client should be an eventemitter that emits a well-defined set of lifecycle events.
   How does this interact with emitting slack events?

*  Web client should also be an eventemitter but it only emits lifecycle events. These events should
   allow developers to hook more deeply into the client and modify the requests as well as process
   the response.


text:
using Xamarin.Forms;

namespace Demo.Views
{
    public partial class CentralPage : ContentPage
    {
        public CentralPage()
        {
            InitializeComponent();
        }
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Deep Learning Based Object Detector: Class Hierarchy</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

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

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

Deep Learning Based Object Detector
    1.0

Class Hierarchy

Go to the textual class hierarchy

<map name="_module" id="_module">
<area shape="rect" id="node1" href="class_module.html" title="Virtual Class for detection module. " alt="" coords="5,5,69,32"/>
<area shape="rect" id="node2" href="class_detection.html" title="Class for object detection. " alt="" coords="117,5,196,32"/>
</map>

<map name="_robot" id="_robot">
<area shape="rect" id="node1" href="class_robot.html" title="Class for robot. " alt="" coords="5,5,63,32"/>
</map>

<map name="_sensor_3_01cv_1_1_mat_01_4" id="_sensor_3_01cv_1_1_mat_01_4">
<area shape="rect" id="node1" href="class_sensor.html" title="Sensor\< cv::Mat \>" alt="" coords="5,5,136,32"/>
<area shape="rect" id="node2" href="class_camera.html" title="Class for camera inherited from sensor. " alt="" coords="184,5,252,32"/>
</map>

<map name="_sensor_3_01_t_01_4" id="_sensor_3_01_t_01_4">
<area shape="rect" id="node1" href="class_sensor.html" title="Virtual Class for every sensor. " alt="" coords="5,5,100,32"/>
</map>

Generated by

     1.8.14


text:
namespace aft {
namespace ui {

class DumbTtyElementDelegate : public ElementDelegate {
public:
    DumbTtyElementDelegate();
    ~DumbTtyElementDelegate() = default;

    virtual void flush(const Element* element) override;
    virtual const std::string& getValue(const Element* element) const override;
    virtual void setValue(Element* element, const std::string& value) override;
    virtual bool getFocus(Element* element) const override;
    virtual bool setFocus(Element* element, bool hasFocus = true) override;
    virtual bool getFacet(Element* element, const std::string& name, UIFacetCategory category,
                          UIFacet& facet) const override;
    virtual bool setFacet(Element* element, const UIFacet& facet) override;

    virtual bool input(Element* element, std::string& value) override;
    virtual bool output(const Element* element, bool showValue = false) override;
};

} // namespace ui
} // namespace aft


text:
require File.expand_path("./helper", File.dirname(__FILE__))
require "redis/distributed"

setup do
  log = StringIO.new
  init Redis::Distributed.new(NODES, :logger => ::Logger.new(log))
end

test "SUBSCRIBE and UNSUBSCRIBE" do |r|
  assert_raise Redis::Distributed::CannotDistribute do
    r.subscribe("foo", "bar") { }
  end

  assert_raise Redis::Distributed::CannotDistribute do
    r.subscribe("{qux}foo", "bar") { }
  end
end

test "SUBSCRIBE and UNSUBSCRIBE with tags" do |r|
  listening = false

  wire = Wire.new do
    r.subscribe("foo") do |on|
      on.subscribe do |channel, total|
        @subscribed = true
        @t1 = total
      end

      on.message do |channel, message|
        if message == "s1"
          r.unsubscribe
          @message = message
        end
      end

      on.unsubscribe do |channel, total|
        @unsubscribed = true
        @t2 = total
      end

      listening = true
    end
  end

  Wire.pass while !listening

  Redis::Distributed.new(NODES).publish("foo", "s1")

  wire.join

  assert @subscribed
  assert 1 == @t1
  assert @unsubscribed
  assert 0 == @t2
  assert "s1" == @message
end

test "SUBSCRIBE within SUBSCRIBE" do |r|
  listening = false
  @channels = []

  wire = Wire.new do
    r.subscribe("foo") do |on|
      on.subscribe do |channel, total|
        @channels << channel

        r.subscribe("bar") if channel == "foo"
        r.unsubscribe if channel == "bar"
      end

      listening = true
    end
  end

  Wire.pass while !listening

  Redis::Distributed.new(NODES).publish("foo", "s1")

  wire.join

  assert ["foo", "bar"] == @channels
end

test "other commands within a SUBSCRIBE" do |r|
  assert_raise RuntimeError do
    r.subscribe("foo") do |on|
      on.subscribe do |channel, total|
        r.set("bar", "s2")
      end
    end
  end
end

test "SUBSCRIBE without a block" do |r|
  assert_raise LocalJumpError do
    r.subscribe("foo")
  end
end


text:
"""Tests for deprecation tools."""
#
# (C) Pywikibot team, 2014
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals

__version__ = '$Id$'

from pywikibot.tools import (
    deprecated, deprecate_arg, deprecated_args, add_full_name, remove_last_args
)
from tests.aspects import unittest, DeprecationTestCase

@add_full_name
def noop(foo=None):
    """Dummy decorator."""
    def decorator(obj):
        def wrapper(*args, **kwargs):
            raise Exception(obj.__full_name__)
            return obj(*args, **kwargs)
        return wrapper
    return decorator

@add_full_name
def noop2():
    """Dummy decorator."""
    def decorator(obj):
        def wrapper(*args, **kwargs):
            raise Exception(obj.__full_name__)
            return obj(*args, **kwargs)
        return wrapper
    return decorator

@noop()
def decorated_func():
    """Test dummy decorator."""
    pass

@noop(foo='bar')
def decorated_func2():
    """Test dummy decorator."""
    pass

@noop('baz')
def decorated_func3():
    """Test dummy decorator."""
    pass

class DecoratorFullNameTestCase(DeprecationTestCase):

    """Class with methods deprecated."""

    net = False

    def test_add_full_name_decorator(self):
        self.assertRaisesRegex(
            Exception,
            __name__ + '.decorated_func',
            decorated_func)
        self.assertRaisesRegex(
            Exception,
            __name__ + '.decorated_func2',
            decorated_func2)
        self.assertRaisesRegex(
            Exception,
            __name__ + '.decorated_func3',
            decorated_func3)

@deprecated()
def deprecated_func(foo=None):
    """Deprecated function."""
    return foo

@deprecated
def deprecated_func2(foo=None):
    """Deprecated function."""
    return foo

@deprecated(instead='baz')
def deprecated_func_instead(foo=None):
    """Deprecated function."""
    return foo

@deprecated()
def deprecated_func_bad_args(self):
    """Deprecated function with arg 'self'."""
    return self

@deprecate_arg('bah', 'foo')
def deprecated_func_arg(foo=None):
    """Deprecated arg 'bah'."""
    return foo

@deprecated_args(bah='foo')
def deprecated_func_arg2(foo=None):
    """Test deprecated_args with one rename."""
    return foo

@deprecated_args(bah='foo', silent=False, loud=True, old=None)
def deprecated_func_arg3(foo=None):
    """Test deprecated_args with three drops and one rename."""
    return foo

@remove_last_args(['foo', 'bar'])
def deprecated_all():
    return None

@remove_last_args(['bar'])
def deprecated_all2(foo):
    return foo

class DeprecatedMethodClass(object):

    """Class with methods deprecated."""

    @classmethod
    @deprecated()
    def class_method(cls, foo=None):
        return foo

    @staticmethod
    @deprecated()
    def static_method(foo=None):
        return foo

    @deprecated()
    def instance_method(self, foo=None):
        self.foo = foo
        return foo

    @deprecated
    def instance_method2(self, foo=None):
        self.foo = foo
        return foo

    def undecorated_method(self, foo=None):
        return foo

    @deprecate_arg('bah', 'foo')
    def deprecated_instance_method_arg(self, foo=None):
        self.foo = foo
        return foo

    @deprecate_arg('bah', 'foo')
    @deprecate_arg('bah2', 'foo2')
    @deprecate_arg('bah3', 'foo3')
    @deprecate_arg('bah4', 'foo4')
    def deprecated_instance_method_args(self, foo, foo2, foo3=None, foo4=None):
        """Method with many decorators to verify wrapping depth formula."""
        self.foo = foo
        self.foo2 = foo2
        return (foo, foo2)

    @deprecated_args(bah='foo', bah2='foo2')
    def deprecated_instance_method_args_multi(self, foo, foo2):
        self.foo = foo
        self.foo2 = foo2
        return (foo, foo2)

    @deprecated()
    @deprecate_arg('bah', 'foo')
    def deprecated_instance_method_and_arg(self, foo):
        self.foo = foo
        return foo

    @deprecate_arg('bah', 'foo')
    @deprecated()
    def deprecated_instance_method_and_arg2(self, foo):
        self.foo = foo
        return foo

    @remove_last_args(['foo', 'bar'])
    def deprecated_all(self):
        return None

    @remove_last_args(['bar'])
    def deprecated_all2(self, foo):
        return foo

@deprecated()
class DeprecatedClassNoInit(object):

    """Deprecated class."""

    pass

@deprecated()
class DeprecatedClass(object):

    """Deprecated class."""

    def __init__(self, foo=None):
        self.foo = foo

class DeprecatorTestCase(DeprecationTestCase):

    """Test cases for deprecation tools."""

    net = False

    def test_deprecated_function_zero_arg(self):
        """Test @deprecated with functions, with zero arguments."""
        rv = deprecated_func()
        self.assertEqual(rv, None)
        self.assertOneDeprecationParts(__name__ + '.deprecated_func')

    def test_deprecated_function(self):
        """Test @deprecated with functions."""
        rv = deprecated_func('a')
        self.assertEqual(rv, 'a')
        self.assertOneDeprecationParts(__name__ + '.deprecated_func')

        rv = deprecated_func(1)
        self.assertEqual(rv, 1)
        self.assertOneDeprecationParts(__name__ + '.deprecated_func')

    def test_deprecated_function2(self):
        """Test @deprecated with functions."""
        rv = deprecated_func2('a')
        self.assertEqual(rv, 'a')
        self.assertOneDeprecationParts(__name__ + '.deprecated_func2')

        rv = deprecated_func2(1)
        self.assertEqual(rv, 1)
        self.assertOneDeprecationParts(__name__ + '.deprecated_func2')

    def test_deprecated_function_instead(self):
        """Test @deprecated with functions, using instead."""
        rv = deprecated_func_instead('a')
        self.assertEqual(rv, 'a')
        self.assertOneDeprecationParts(__name__ + '.deprecated_func_instead',
                                       'baz')

    def test_deprecated_function_bad_args(self):
        rv = deprecated_func_bad_args(None)
        self.assertEqual(rv, None)
        self.assertOneDeprecationParts(__name__ + '.deprecated_func_bad_args')

        rv = deprecated_func_bad_args('a')
        self.assertEqual(rv, 'a')
        self.assertOneDeprecationParts(__name__ + '.deprecated_func_bad_args')

        rv = deprecated_func_bad_args(1)
        self.assertEqual(rv, 1)
        self.assertOneDeprecationParts(__name__ + '.deprecated_func_bad_args')

        f = DeprecatedMethodClass()
        rv = deprecated_func_bad_args(f)
        self.assertEqual(rv, f)
        self.assertOneDeprecationParts(__name__ + '.deprecated_func_bad_args')

    def test_deprecated_instance_method(self):
        f = DeprecatedMethodClass()

        rv = f.instance_method()
        self.assertEqual(rv, None)
        self.assertEqual(f.foo, None)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.instance_method')

        rv = f.instance_method('a')
        self.assertEqual(rv, 'a')
        self.assertEqual(f.foo, 'a')
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.instance_method')

        rv = f.instance_method(1)
        self.assertEqual(rv, 1)
        self.assertEqual(f.foo, 1)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.instance_method')

    def test_deprecated_instance_method2(self):
        f = DeprecatedMethodClass()

        rv = f.instance_method2()
        self.assertEqual(rv, None)
        self.assertEqual(f.foo, None)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.instance_method2')

    def test_deprecated_class_method(self):
        """Test @deprecated with class methods."""
        rv = DeprecatedMethodClass.class_method()
        self.assertEqual(rv, None)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.class_method')

        rv = DeprecatedMethodClass.class_method('a')
        self.assertEqual(rv, 'a')
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.class_method')

        rv = DeprecatedMethodClass.class_method(1)
        self.assertEqual(rv, 1)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.class_method')

    def test_deprecated_static_method_zero_args(self):
        """Test @deprecated with static methods, with zero arguments."""
        rv = DeprecatedMethodClass.static_method()
        self.assertEqual(rv, None)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.static_method')

    def test_deprecated_static_method(self):
        """Test @deprecated with static methods."""
        rv = DeprecatedMethodClass.static_method('a')
        self.assertEqual(rv, 'a')
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.static_method')

        rv = DeprecatedMethodClass.static_method(1)
        self.assertEqual(rv, 1)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.static_method')

    def test_deprecate_class_zero_arg(self):
        """Test @deprecated with classes, without arguments."""
        df = DeprecatedClassNoInit()
        self.assertEqual(df.__doc__, 'Deprecated class.')
        self.assertOneDeprecationParts(__name__ + '.DeprecatedClassNoInit')

        df = DeprecatedClass()
        self.assertEqual(df.foo, None)
        self.assertOneDeprecationParts(__name__ + '.DeprecatedClass')

    def test_deprecate_class(self):
        """Test @deprecated with classes."""
        df = DeprecatedClass('a')
        self.assertEqual(df.foo, 'a')
        self.assertOneDeprecationParts(__name__ + '.DeprecatedClass')

    def test_deprecate_function_arg(self):
        def tests(func):
            rv = func()
            self.assertEqual(rv, None)
            self.assertNoDeprecation()

            rv = func('a')
            self.assertEqual(rv, 'a')
            self.assertNoDeprecation()

            rv = func(bah='b')
            self.assertEqual(rv, 'b')
            self.assertOneDeprecationParts(
                'bah argument of ' + __name__ + '.' + func.__name__, 'foo')

            self._reset_messages()

            rv = func(foo=1)
            self.assertEqual(rv, 1)
            self.assertNoDeprecation()

            self.assertRaisesRegex(
                TypeError,
                r"deprecated_func_arg2?\(\) got multiple values for (keyword )?argument 'foo'",
                func,
                'a', bah='b'
            )
            self._reset_messages()

        tests(deprecated_func_arg)
        tests(deprecated_func_arg2)

    def test_deprecate_and_remove_function_args(self):
        rv = deprecated_func_arg3()
        self.assertEqual(rv, None)
        self.assertNoDeprecation()

        rv = deprecated_func_arg3(2)
        self.assertEqual(rv, 2)
        self.assertNoDeprecation()

        rv = deprecated_func_arg3(foo=1, silent=42)
        self.assertEqual(rv, 1)
        self.assertDeprecationClass(PendingDeprecationWarning)
        self.assertOneDeprecationParts(
            'silent argument of ' + __name__ + '.deprecated_func_arg3')

        rv = deprecated_func_arg3(3, loud='3')
        self.assertEqual(rv, 3)
        self.assertOneDeprecationParts(
            'loud argument of ' + __name__ + '.deprecated_func_arg3')

        rv = deprecated_func_arg3(4, old='4')
        self.assertEqual(rv, 4)
        self.assertOneDeprecationParts(
            'old argument of ' + __name__ + '.deprecated_func_arg3')

    def test_function_remove_last_args(self):
        """Test @remove_last_args on functions."""
        rv = deprecated_all()
        self.assertEqual(rv, None)
        self.assertNoDeprecation()

        rv = deprecated_all(foo=42)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of %s.deprecated_all are "
            "deprecated. The value(s) provided for 'foo' have been "
            "dropped." % __name__)

        self._reset_messages()

        rv = deprecated_all(42)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of %s.deprecated_all are "
            "deprecated. The value(s) provided for 'foo' have been "
            "dropped." % __name__)

        self._reset_messages()

        rv = deprecated_all(foo=42, bar=47)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of %s.deprecated_all are "
            "deprecated. The value(s) provided for 'foo', 'bar' have been "
            "dropped." % __name__)

        self._reset_messages()

        rv = deprecated_all(42, 47)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of %s.deprecated_all are "
            "deprecated. The value(s) provided for 'foo', 'bar' have been "
            "dropped." % __name__)

        self._reset_messages()

        rv = deprecated_all2(foo=42)
        self.assertEqual(rv, 42)
        self.assertNoDeprecation()

        rv = deprecated_all2(42)
        self.assertEqual(rv, 42)
        self.assertNoDeprecation()

        rv = deprecated_all2(42, bar=47)
        self.assertEqual(rv, 42)
        self.assertDeprecation(
            "The trailing arguments ('bar') of %s.deprecated_all2 are "
            "deprecated. The value(s) provided for 'bar' have been "
            "dropped." % __name__)

        self._reset_messages()

    def test_method_remove_last_args(self):
        """Test @remove_last_args on functions."""
        f = DeprecatedMethodClass()

        rv = f.deprecated_all()
        self.assertEqual(rv, None)
        self.assertNoDeprecation()

        rv = f.deprecated_all(foo=42)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of "
            "%s.DeprecatedMethodClass.deprecated_all are deprecated. "
            "The value(s) provided for 'foo' have been dropped." % __name__)

        self._reset_messages()

        rv = f.deprecated_all(42)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of "
            "%s.DeprecatedMethodClass.deprecated_all are deprecated. "
            "The value(s) provided for 'foo' have been dropped." % __name__)

        self._reset_messages()

        rv = f.deprecated_all(foo=42, bar=47)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of "
            "%s.DeprecatedMethodClass.deprecated_all are deprecated. The "
            "value(s) provided for 'foo', 'bar' have been dropped." % __name__)

        self._reset_messages()

        rv = f.deprecated_all(42, 47)
        self.assertEqual(rv, None)
        self.assertDeprecation(
            "The trailing arguments ('foo', 'bar') of "
            "%s.DeprecatedMethodClass.deprecated_all are deprecated. The "
            "value(s) provided for 'foo', 'bar' have been dropped." % __name__)

        self._reset_messages()

        rv = f.deprecated_all2(foo=42)
        self.assertEqual(rv, 42)
        self.assertNoDeprecation()

        rv = f.deprecated_all2(42)
        self.assertEqual(rv, 42)
        self.assertNoDeprecation()

        rv = f.deprecated_all2(42, bar=47)
        self.assertEqual(rv, 42)
        self.assertDeprecation(
            "The trailing arguments ('bar') of "
            "%s.DeprecatedMethodClass.deprecated_all2 are deprecated. "
            "The value(s) provided for 'bar' have been dropped." % __name__)

    def test_remove_last_args_invalid(self):
        self.assertRaisesRegex(
            TypeError,
            r"(deprecated_all2\(\) missing 1 required positional argument: 'foo'|"  # Python 3
            "deprecated_all2\(\) takes exactly 1 argument \(0 given\))",  # Python 2
            deprecated_all2)

        self.assertRaisesRegex(
            TypeError,
            r"deprecated_all2\(\) got an unexpected keyword argument 'hello'",
            deprecated_all2,
            hello='world')

        self.assertRaisesRegex(
            TypeError,
            r'deprecated_all2\(\) takes (exactly )?1 (positional )?argument'
            ' (but 2 were given|\(2 given\))',
            deprecated_all2,
            1, 2, 3)

        f = DeprecatedMethodClass()

        self.assertRaisesRegex(
            TypeError,
            r"(deprecated_all2\(\) missing 1 required positional argument: 'foo'|"  # Python 3
            "deprecated_all2\(\) takes exactly 2 arguments \(1 given\))",  # Python 2
            f.deprecated_all2)

        self.assertRaisesRegex(
            TypeError,
            r"deprecated_all2\(\) got an unexpected keyword argument 'hello'",
            f.deprecated_all2,
            hello='world')

        self.assertRaisesRegex(
            TypeError,
            r'deprecated_all2\(\) takes (exactly )?2 (positional )?arguments '
            '(but 3 were given|\(3 given\))',
            f.deprecated_all2,
            1, 2, 3)

    def test_deprecated_instance_method_zero_arg(self):
        """Test @deprecate_arg with classes, without arguments."""
        f = DeprecatedMethodClass()

        rv = f.deprecated_instance_method_arg()
        self.assertEqual(rv, None)
        self.assertEqual(f.foo, None)
        self.assertNoDeprecation()

    def test_deprecated_instance_method_arg(self):
        """Test @deprecate_arg with instance methods."""
        f = DeprecatedMethodClass()

        rv = f.deprecated_instance_method_arg('a')
        self.assertEqual(rv, 'a')
        self.assertEqual(f.foo, 'a')
        self.assertNoDeprecation()

        rv = f.deprecated_instance_method_arg(bah='b')
        self.assertEqual(rv, 'b')
        self.assertEqual(f.foo, 'b')
        self.assertOneDeprecationParts(
            'bah argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_arg', 'foo')

        self._reset_messages()

        rv = f.deprecated_instance_method_arg(foo=1)
        self.assertEqual(rv, 1)
        self.assertEqual(f.foo, 1)
        self.assertNoDeprecation()

    def test_deprecated_instance_method_args(self):
        """Test @deprecate_arg with instance methods and two args."""
        f = DeprecatedMethodClass()

        rv = f.deprecated_instance_method_args('a', 'b')
        self.assertEqual(rv, ('a', 'b'))
        self.assertNoDeprecation()

        rv = f.deprecated_instance_method_args(bah='b', bah2='c')
        self.assertEqual(rv, ('b', 'c'))
        self.assertDeprecationParts(
            'bah argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args', 'foo')
        self.assertDeprecationParts(
            'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args', 'foo2')

        self._reset_messages()

        rv = f.deprecated_instance_method_args(foo='b', bah2='c')
        self.assertEqual(rv, ('b', 'c'))
        self.assertOneDeprecationParts(
            'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args', 'foo2')

        rv = f.deprecated_instance_method_args(foo2='c', bah='b')
        self.assertEqual(rv, ('b', 'c'))
        self.assertOneDeprecationParts(
            'bah argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args', 'foo')

        rv = f.deprecated_instance_method_args(foo=1, foo2=2)
        self.assertEqual(rv, (1, 2))
        self.assertNoDeprecation()

    def test_deprecated_instance_method_args_multi(self):
        """Test @deprecated_args with instance methods and two args."""
        f = DeprecatedMethodClass()

        rv = f.deprecated_instance_method_args_multi('a', 'b')
        self.assertEqual(rv, ('a', 'b'))
        self.assertNoDeprecation()

        rv = f.deprecated_instance_method_args_multi(bah='b', bah2='c')
        self.assertEqual(rv, ('b', 'c'))
        self.assertDeprecationParts(
            'bah argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args_multi', 'foo')
        self.assertDeprecationParts(
            'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args_multi', 'foo2')

        self._reset_messages()

        rv = f.deprecated_instance_method_args_multi(foo='b', bah2='c')
        self.assertEqual(rv, ('b', 'c'))
        self.assertOneDeprecationParts(
            'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args_multi', 'foo2')

        rv = f.deprecated_instance_method_args_multi(foo2='c', bah='b')
        self.assertEqual(rv, ('b', 'c'))
        self.assertOneDeprecationParts(
            'bah argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_args_multi', 'foo')

        rv = f.deprecated_instance_method_args_multi(foo=1, foo2=2)
        self.assertEqual(rv, (1, 2))
        self.assertNoDeprecation()

    def test_deprecated_instance_method_and_arg(self):
        """Test @deprecate_arg and @deprecated with instance methods."""
        f = DeprecatedMethodClass()

        rv = f.deprecated_instance_method_and_arg('a')
        self.assertEqual(rv, 'a')
        self.assertEqual(f.foo, 'a')
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg')

        rv = f.deprecated_instance_method_and_arg(bah='b')
        self.assertEqual(rv, 'b')
        self.assertEqual(f.foo, 'b')
        self.assertDeprecationParts(
            __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg')
        self.assertDeprecationParts(
            'bah argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_and_arg', 'foo')

        self._reset_messages()

        rv = f.deprecated_instance_method_and_arg(foo=1)
        self.assertEqual(rv, 1)
        self.assertEqual(f.foo, 1)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg')

    def test_deprecated_instance_method_and_arg2(self):
        """Test @deprecated and @deprecate_arg with instance methods."""
        f = DeprecatedMethodClass()

        rv = f.deprecated_instance_method_and_arg2('a')
        self.assertEqual(rv, 'a')
        self.assertEqual(f.foo, 'a')
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2')

        rv = f.deprecated_instance_method_and_arg2(bah='b')
        self.assertEqual(rv, 'b')
        self.assertEqual(f.foo, 'b')
        self.assertDeprecationParts(
            __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2')
        self.assertDeprecationParts(
            'bah argument of ' + __name__ + '.DeprecatedMethodClass.'
            'deprecated_instance_method_and_arg2', 'foo')

        self._reset_messages()

        rv = f.deprecated_instance_method_and_arg2(foo=1)
        self.assertEqual(rv, 1)
        self.assertEqual(f.foo, 1)
        self.assertOneDeprecationParts(
            __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2')

if __name__ == '__main__':
    try:
        unittest.main()
    except SystemExit:
        pass


text:
namespace v8 {
namespace internal {

#if defined(V8_TARGET_ARCH_PPC)

ConstantPoolBuilder::ConstantPoolBuilder(int ptr_reach_bits,
                                         int double_reach_bits) {
  info_[ConstantPoolEntry::INTPTR].entries.reserve(64);
  info_[ConstantPoolEntry::INTPTR].regular_reach_bits = ptr_reach_bits;
  info_[ConstantPoolEntry::DOUBLE].regular_reach_bits = double_reach_bits;
}

ConstantPoolEntry::Access ConstantPoolBuilder::NextAccess(
    ConstantPoolEntry::Type type) const {
  const PerTypeEntryInfo& info = info_[type];

  if (info.overflow()) return ConstantPoolEntry::OVERFLOWED;

  int dbl_count = info_[ConstantPoolEntry::DOUBLE].regular_count;
  int dbl_offset = dbl_count * kDoubleSize;
  int ptr_count = info_[ConstantPoolEntry::INTPTR].regular_count;
  int ptr_offset = ptr_count * kSystemPointerSize + dbl_offset;

  if (type == ConstantPoolEntry::DOUBLE) {
    // Double overflow detection must take into account the reach for both types
    int ptr_reach_bits = info_[ConstantPoolEntry::INTPTR].regular_reach_bits;
    if (!is_uintn(dbl_offset, info.regular_reach_bits) ||
        (ptr_count > 0 &&
         !is_uintn(ptr_offset + kDoubleSize - kSystemPointerSize,
                   ptr_reach_bits))) {
      return ConstantPoolEntry::OVERFLOWED;
    }
  } else {
    DCHECK(type == ConstantPoolEntry::INTPTR);
    if (!is_uintn(ptr_offset, info.regular_reach_bits)) {
      return ConstantPoolEntry::OVERFLOWED;
    }
  }

  return ConstantPoolEntry::REGULAR;
}

ConstantPoolEntry::Access ConstantPoolBuilder::AddEntry(
    ConstantPoolEntry& entry, ConstantPoolEntry::Type type) {
  DCHECK(!emitted_label_.is_bound());
  PerTypeEntryInfo& info = info_[type];
  const int entry_size = ConstantPoolEntry::size(type);
  bool merged = false;

  if (entry.sharing_ok()) {
    // Try to merge entries
    std::vector<ConstantPoolEntry>::iterator it = info.shared_entries.begin();
    int end = static_cast<int>(info.shared_entries.size());
    for (int i = 0; i < end; i++, it++) {
      if ((entry_size == kSystemPointerSize)
              ? entry.value() == it->value()
              : entry.value64() == it->value64()) {
        // Merge with found entry.
        entry.set_merged_index(i);
        merged = true;
        break;
      }
    }
  }

  // By definition, merged entries have regular access.
  DCHECK(!merged || entry.merged_index() < info.regular_count);
  ConstantPoolEntry::Access access =
      (merged ? ConstantPoolEntry::REGULAR : NextAccess(type));

  // Enforce an upper bound on search time by limiting the search to
  // unique sharable entries which fit in the regular section.
  if (entry.sharing_ok() && !merged && access == ConstantPoolEntry::REGULAR) {
    info.shared_entries.push_back(entry);
  } else {
    info.entries.push_back(entry);
  }

  // We're done if we found a match or have already triggered the
  // overflow state.
  if (merged || info.overflow()) return access;

  if (access == ConstantPoolEntry::REGULAR) {
    info.regular_count++;
  } else {
    info.overflow_start = static_cast<int>(info.entries.size()) - 1;
  }

  return access;
}

void ConstantPoolBuilder::EmitSharedEntries(Assembler* assm,
                                            ConstantPoolEntry::Type type) {
  PerTypeEntryInfo& info = info_[type];
  std::vector<ConstantPoolEntry>& shared_entries = info.shared_entries;
  const int entry_size = ConstantPoolEntry::size(type);
  int base = emitted_label_.pos();
  DCHECK_GT(base, 0);
  int shared_end = static_cast<int>(shared_entries.size());
  std::vector<ConstantPoolEntry>::iterator shared_it = shared_entries.begin();
  for (int i = 0; i < shared_end; i++, shared_it++) {
    int offset = assm->pc_offset() - base;
    shared_it->set_offset(offset);  // Save offset for merged entries.
    if (entry_size == kSystemPointerSize) {
      assm->dp(shared_it->value());
    } else {
      assm->dq(shared_it->value64());
    }
    DCHECK(is_uintn(offset, info.regular_reach_bits));

    // Patch load sequence with correct offset.
    assm->PatchConstantPoolAccessInstruction(shared_it->position(), offset,
                                             ConstantPoolEntry::REGULAR, type);
  }
}

void ConstantPoolBuilder::EmitGroup(Assembler* assm,
                                    ConstantPoolEntry::Access access,
                                    ConstantPoolEntry::Type type) {
  PerTypeEntryInfo& info = info_[type];
  const bool overflow = info.overflow();
  std::vector<ConstantPoolEntry>& entries = info.entries;
  std::vector<ConstantPoolEntry>& shared_entries = info.shared_entries;
  const int entry_size = ConstantPoolEntry::size(type);
  int base = emitted_label_.pos();
  DCHECK_GT(base, 0);
  int begin;
  int end;

  if (access == ConstantPoolEntry::REGULAR) {
    // Emit any shared entries first
    EmitSharedEntries(assm, type);
  }

  if (access == ConstantPoolEntry::REGULAR) {
    begin = 0;
    end = overflow ? info.overflow_start : static_cast<int>(entries.size());
  } else {
    DCHECK(access == ConstantPoolEntry::OVERFLOWED);
    if (!overflow) return;
    begin = info.overflow_start;
    end = static_cast<int>(entries.size());
  }

  std::vector<ConstantPoolEntry>::iterator it = entries.begin();
  if (begin > 0) std::advance(it, begin);
  for (int i = begin; i < end; i++, it++) {
    // Update constant pool if necessary and get the entry's offset.
    int offset;
    ConstantPoolEntry::Access entry_access;
    if (!it->is_merged()) {
      // Emit new entry
      offset = assm->pc_offset() - base;
      entry_access = access;
      if (entry_size == kSystemPointerSize) {
        assm->dp(it->value());
      } else {
        assm->dq(it->value64());
      }
    } else {
      // Retrieve offset from shared entry.
      offset = shared_entries[it->merged_index()].offset();
      entry_access = ConstantPoolEntry::REGULAR;
    }

    DCHECK(entry_access == ConstantPoolEntry::OVERFLOWED ||
           is_uintn(offset, info.regular_reach_bits));

    // Patch load sequence with correct offset.
    assm->PatchConstantPoolAccessInstruction(it->position(), offset,
                                             entry_access, type);
  }
}

// Emit and return size of pool.
int ConstantPoolBuilder::Emit(Assembler* assm) {
  bool emitted = emitted_label_.is_bound();
  bool empty = IsEmpty();

  if (!emitted) {
    // Mark start of constant pool.  Align if necessary.
    if (!empty) assm->DataAlign(kDoubleSize);
    assm->bind(&emitted_label_);
    if (!empty) {
      // Emit in groups based on access and type.
      // Emit doubles first for alignment purposes.
      EmitGroup(assm, ConstantPoolEntry::REGULAR, ConstantPoolEntry::DOUBLE);
      EmitGroup(assm, ConstantPoolEntry::REGULAR, ConstantPoolEntry::INTPTR);
      if (info_[ConstantPoolEntry::DOUBLE].overflow()) {
        assm->DataAlign(kDoubleSize);
        EmitGroup(assm, ConstantPoolEntry::OVERFLOWED,
                  ConstantPoolEntry::DOUBLE);
      }
      if (info_[ConstantPoolEntry::INTPTR].overflow()) {
        EmitGroup(assm, ConstantPoolEntry::OVERFLOWED,
                  ConstantPoolEntry::INTPTR);
      }
    }
  }

  return !empty ? (assm->pc_offset() - emitted_label_.pos()) : 0;
}

#endif  // defined(V8_TARGET_ARCH_PPC)

#if defined(V8_TARGET_ARCH_ARM64)

// Constant Pool.

ConstantPool::ConstantPool(Assembler* assm) : assm_(assm) {}
ConstantPool::~ConstantPool() { DCHECK_EQ(blocked_nesting_, 0); }

RelocInfoStatus ConstantPool::RecordEntry(uint32_t data,
                                          RelocInfo::Mode rmode) {
  ConstantPoolKey key(data, rmode);
  CHECK(key.is_value32());
  return RecordKey(std::move(key), assm_->pc_offset());
}

RelocInfoStatus ConstantPool::RecordEntry(uint64_t data,
                                          RelocInfo::Mode rmode) {
  ConstantPoolKey key(data, rmode);
  CHECK(!key.is_value32());
  return RecordKey(std::move(key), assm_->pc_offset());
}

RelocInfoStatus ConstantPool::RecordKey(ConstantPoolKey key, int offset) {
  RelocInfoStatus write_reloc_info = GetRelocInfoStatusFor(key);
  if (write_reloc_info == RelocInfoStatus::kMustRecord) {
    if (key.is_value32()) {
      if (entry32_count_ == 0) first_use_32_ = offset;
      ++entry32_count_;
    } else {
      if (entry64_count_ == 0) first_use_64_ = offset;
      ++entry64_count_;
    }
  }
  entries_.insert(std::make_pair(key, offset));

  if (Entry32Count() + Entry64Count() > ConstantPool::kApproxMaxEntryCount) {
    // Request constant pool emission after the next instruction.
    SetNextCheckIn(1);
  }

  return write_reloc_info;
}

RelocInfoStatus ConstantPool::GetRelocInfoStatusFor(
    const ConstantPoolKey& key) {
  if (key.AllowsDeduplication()) {
    auto existing = entries_.find(key);
    if (existing != entries_.end()) {
      return RelocInfoStatus::kMustOmitForDuplicate;
    }
  }
  return RelocInfoStatus::kMustRecord;
}

void ConstantPool::EmitAndClear(Jump require_jump) {
  DCHECK(!IsBlocked());
  // Prevent recursive pool emission.
  Assembler::BlockPoolsScope block_pools(assm_, PoolEmissionCheck::kSkip);
  Alignment require_alignment =
      IsAlignmentRequiredIfEmittedAt(require_jump, assm_->pc_offset());
  int size = ComputeSize(require_jump, require_alignment);
  Label size_check;
  assm_->bind(&size_check);
  assm_->RecordConstPool(size);

  // Emit the constant pool. It is preceded by an optional branch if
  // {require_jump} and a header which will:
  //  1) Encode the size of the constant pool, for use by the disassembler.
  //  2) Terminate the program, to try to prevent execution from accidentally
  //     flowing into the constant pool.
  //  3) align the 64bit pool entries to 64-bit.
  // TODO(all): Make the alignment part less fragile. Currently code is
  // allocated as a byte array so there are no guarantees the alignment will
  // be preserved on compaction. Currently it works as allocation seems to be
  // 64-bit aligned.

  Label after_pool;
  if (require_jump == Jump::kRequired) assm_->b(&after_pool);

  assm_->RecordComment("[ Constant Pool");
  EmitPrologue(require_alignment);
  if (require_alignment == Alignment::kRequired) assm_->Align(kInt64Size);
  EmitEntries();
  assm_->RecordComment("]");

  if (after_pool.is_linked()) assm_->bind(&after_pool);

  DCHECK_EQ(assm_->SizeOfCodeGeneratedSince(&size_check), size);
  Clear();
}

void ConstantPool::Clear() {
  entries_.clear();
  first_use_32_ = -1;
  first_use_64_ = -1;
  entry32_count_ = 0;
  entry64_count_ = 0;
  next_check_ = 0;
}

void ConstantPool::StartBlock() {
  if (blocked_nesting_ == 0) {
    // Prevent constant pool checks from happening by setting the next check to
    // the biggest possible offset.
    next_check_ = kMaxInt;
  }
  ++blocked_nesting_;
}

void ConstantPool::EndBlock() {
  --blocked_nesting_;
  if (blocked_nesting_ == 0) {
    DCHECK(IsInImmRangeIfEmittedAt(assm_->pc_offset()));
    // Make sure a check happens quickly after getting unblocked.
    next_check_ = 0;
  }
}

bool ConstantPool::IsBlocked() const { return blocked_nesting_ > 0; }

void ConstantPool::SetNextCheckIn(size_t instructions) {
  next_check_ =
      assm_->pc_offset() + static_cast<int>(instructions * kInstrSize);
}

void ConstantPool::EmitEntries() {
  for (auto iter = entries_.begin(); iter != entries_.end();) {
    DCHECK(iter->first.is_value32() || IsAligned(assm_->pc_offset(), 8));
    auto range = entries_.equal_range(iter->first);
    bool shared = iter->first.AllowsDeduplication();
    for (auto it = range.first; it != range.second; ++it) {
      SetLoadOffsetToConstPoolEntry(it->second, assm_->pc(), it->first);
      if (!shared) Emit(it->first);
    }
    if (shared) Emit(iter->first);
    iter = range.second;
  }
}

void ConstantPool::Emit(const ConstantPoolKey& key) {
  if (key.is_value32()) {
    assm_->dd(key.value32());
  } else {
    assm_->dq(key.value64());
  }
}

bool ConstantPool::ShouldEmitNow(Jump require_jump, size_t margin) const {
  if (IsEmpty()) return false;
  if (Entry32Count() + Entry64Count() > ConstantPool::kApproxMaxEntryCount) {
    return true;
  }
  // We compute {dist32/64}, i.e. the distance from the first instruction
  // accessing a 32bit/64bit entry in the constant pool to any of the
  // 32bit/64bit constant pool entries, respectively. This is required because
  // we do not guarantee that entries are emitted in order of reference, i.e. it
  // is possible that the entry with the earliest reference is emitted last.
  // The constant pool should be emitted if either of the following is true:
  // (A) {dist32/64} will be out of range at the next check in.
  // (B) Emission can be done behind an unconditional branch and {dist32/64}
  // exceeds {kOpportunityDist*}.
  // (C) {dist32/64} exceeds the desired approximate distance to the pool.
  int worst_case_size = ComputeSize(Jump::kRequired, Alignment::kRequired);
  size_t pool_end_32 = assm_->pc_offset() + margin + worst_case_size;
  size_t pool_end_64 = pool_end_32 - Entry32Count() * kInt32Size;
  if (Entry64Count() != 0) {
    // The 64-bit constants are always emitted before the 32-bit constants, so
    // we subtract the size of the 32-bit constants from {size}.
    size_t dist64 = pool_end_64 - first_use_64_;
    bool next_check_too_late = dist64 + 2 * kCheckInterval >= kMaxDistToPool64;
    bool opportune_emission_without_jump =
        require_jump == Jump::kOmitted && (dist64 >= kOpportunityDistToPool64);
    bool approximate_distance_exceeded = dist64 >= kApproxDistToPool64;
    if (next_check_too_late || opportune_emission_without_jump ||
        approximate_distance_exceeded) {
      return true;
    }
  }
  if (Entry32Count() != 0) {
    size_t dist32 = pool_end_32 - first_use_32_;
    bool next_check_too_late = dist32 + 2 * kCheckInterval >= kMaxDistToPool32;
    bool opportune_emission_without_jump =
        require_jump == Jump::kOmitted && (dist32 >= kOpportunityDistToPool32);
    bool approximate_distance_exceeded = dist32 >= kApproxDistToPool32;
    if (next_check_too_late || opportune_emission_without_jump ||
        approximate_distance_exceeded) {
      return true;
    }
  }
  return false;
}

int ConstantPool::ComputeSize(Jump require_jump,
                              Alignment require_alignment) const {
  int size_up_to_marker = PrologueSize(require_jump);
  int alignment = require_alignment == Alignment::kRequired ? kInstrSize : 0;
  size_t size_after_marker =
      Entry32Count() * kInt32Size + alignment + Entry64Count() * kInt64Size;
  return size_up_to_marker + static_cast<int>(size_after_marker);
}

Alignment ConstantPool::IsAlignmentRequiredIfEmittedAt(Jump require_jump,
                                                       int pc_offset) const {
  int size_up_to_marker = PrologueSize(require_jump);
  if (Entry64Count() != 0 &&
      !IsAligned(pc_offset + size_up_to_marker, kInt64Size)) {
    return Alignment::kRequired;
  }
  return Alignment::kOmitted;
}

bool ConstantPool::IsInImmRangeIfEmittedAt(int pc_offset) {
  // Check that all entries are in range if the pool is emitted at {pc_offset}.
  // This ignores kPcLoadDelta (conservatively, since all offsets are positive),
  // and over-estimates the last entry's address with the pool's end.
  Alignment require_alignment =
      IsAlignmentRequiredIfEmittedAt(Jump::kRequired, pc_offset);
  size_t pool_end_32 =
      pc_offset + ComputeSize(Jump::kRequired, require_alignment);
  size_t pool_end_64 = pool_end_32 - Entry32Count() * kInt32Size;
  bool entries_in_range_32 =
      Entry32Count() == 0 || (pool_end_32 < first_use_32_ + kMaxDistToPool32);
  bool entries_in_range_64 =
      Entry64Count() == 0 || (pool_end_64 < first_use_64_ + kMaxDistToPool64);
  return entries_in_range_32 && entries_in_range_64;
}

ConstantPool::BlockScope::BlockScope(Assembler* assm, size_t margin)
    : pool_(&assm->constpool_) {
  pool_->assm_->EmitConstPoolWithJumpIfNeeded(margin);
  pool_->StartBlock();
}

ConstantPool::BlockScope::BlockScope(Assembler* assm, PoolEmissionCheck check)
    : pool_(&assm->constpool_) {
  DCHECK_EQ(check, PoolEmissionCheck::kSkip);
  pool_->StartBlock();
}

ConstantPool::BlockScope::~BlockScope() { pool_->EndBlock(); }

void ConstantPool::MaybeCheck() {
  if (assm_->pc_offset() >= next_check_) {
    Check(Emission::kIfNeeded, Jump::kRequired);
  }
}

#endif  // defined(V8_TARGET_ARCH_ARM64)

}  // namespace internal
}  // namespace v8


text:
(function() {
  var Configurator, Pbx, Trunk;

  Configurator = require('nafnaf').Configurator;

  Trunk = require('./trunk');

  Pbx = (function() {
    function Pbx(dirname) {
      this.trunks = [];
      this.configurator = new Configurator(dirname);
    }

    Pbx.prototype.init = function(callback) {
      return this.configurator.loadFiles(callback);
    };

    Pbx.prototype.addTrunk = function(obj) {
      var trunk;
      trunk = new Trunk(this.configurator, obj);
      trunk.save(function() {
        return console.log('saved');
      });
      return this.trunks.push(trunk);
    };

    Pbx.prototype.getTrunks = function() {
      return this.trunks;
    };

    Pbx.prototype.loadTrunks = function(callback) {
      var key, object, result;
      result = {};
      object = this.configurator.files['users.conf'];
      for (key in object) {
        if (object.hasOwnProperty(key) && key.substr(0, 6) === 'trunk_') {
          result[key] = object[key];
        }
      }
      return callback(result);
    };

    return Pbx;

  })();

  module.exports = Pbx;

}).call(this);