text:
var state = {
    resources: [],
    startTime: null,
    onPageOpen: null,
    endTime: null
};

module.exports = {
    onLoadStarted: function () {
        state.startTime = new Date();
    },
    onResourceRequested: function (requestData) {
        if (!requestData) {
            return;
        }
        state.resources[requestData.id-1] = {
            request: requestData,
            startReply: null,
            endReply: null
        };
    },
    onResourceReceived: function (res) {
        state.resources[res.id-1][res.stage + 'Reply'] = res;
    },
    onPageOpen: function () {
        state.onPageOpen = new Date();
    },
    onBeforeExit: function (api) {
        state.endTime = new Date();
        api.set('input', state);
    }
};

redpajama_set_name: RedPajamaGithub


text:
import { TestSuite, Test, BeforeAll } from "jec-juta";
import { expect } from "chai";
import { ContextRootData } from "../../../../../../src/com/onsoft/glasscat/util/contextroot/ContextRootData";

@TestSuite({
  description: "Test the ContextRootData class properties and methods"
})
export class ContextRootDataTest {

  public data:ContextRootData = null;

  @BeforeAll()
  public initTest():void {
    this.data = new ContextRootData();
  }

  @Test({
    description: "should have a 'containsNestedResource' property set to 'false'"
  })
  public containsNestedResourceTest():void {
    expect(this.data).to.have.property("containsNestedResource", false);
  }

  @Test({
    description: "should have a 'needsRedirection' property set to 'false'"
  })
  public needsRedirectionTest():void {
    expect(this.data).to.have.property("needsRedirection", false);
  }

  @Test({
    description: "should have a 'newPath' property set to 'null'"
  })
  public newPathTest():void {
    expect(this.data).to.have.property("newPath", null);
  }

  @Test({
    description: "should have a 'contextRoot' property set to 'null'"
  })
  public contextRootTest():void {
    expect(this.data).to.have.property("contextRoot", null);
  }

  @Test({
    description: "should set all properties to their default values"
  })
  public resetTest():void {
    this.data.containsNestedResource = true;
    this.data.needsRedirection = true;
    this.data.newPath = "foo";
    this.data.contextRoot = "bar";
    this.data.reset();
    expect(this.data.containsNestedResource).to.be.false;
    expect(this.data.needsRedirection).to.be.false;
    expect(this.data.newPath).to.be.null;
    expect(this.data.contextRoot).to.be.null;
  }
}


text:
package com.amazonaws.services.elasticmapreduce.model;

/**
 *
 */
public enum StepState {

    PENDING("PENDING"),
    RUNNING("RUNNING"),
    COMPLETED("COMPLETED"),
    CANCELLED("CANCELLED"),
    FAILED("FAILED"),
    INTERRUPTED("INTERRUPTED");

    private String value;

    private StepState(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * Use this in place of valueOf.
     *
     * @param value
     *        real value
     * @return StepState corresponding to the value
     */
    public static StepState fromValue(String value) {
        if (value == null || "".equals(value)) {
            throw new IllegalArgumentException("Value cannot be null or empty!");
        }

        for (StepState enumEntry : StepState.values()) {
            if (enumEntry.toString().equals(value)) {
                return enumEntry;
            }
        }

        throw new IllegalArgumentException("Cannot create enum from " + value
                + " value!");
    }
}


text:
#pragma once
#include <aws/rds/RDS_EXPORTS.h>
#include <aws/rds/model/DBClusterSnapshotAttributesResult.h>
#include <aws/rds/model/ResponseMetadata.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Xml
{
  class XmlDocument;
} // namespace Xml
} // namespace Utils
namespace RDS
{
namespace Model
{
  class AWS_RDS_API ModifyDBClusterSnapshotAttributeResult
  {
  public:
    ModifyDBClusterSnapshotAttributeResult();
    ModifyDBClusterSnapshotAttributeResult(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
    ModifyDBClusterSnapshotAttributeResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);

    inline const DBClusterSnapshotAttributesResult& GetDBClusterSnapshotAttributesResult() const{ return m_dBClusterSnapshotAttributesResult; }

    inline void SetDBClusterSnapshotAttributesResult(const DBClusterSnapshotAttributesResult& value) { m_dBClusterSnapshotAttributesResult = value; }

    inline void SetDBClusterSnapshotAttributesResult(DBClusterSnapshotAttributesResult&& value) { m_dBClusterSnapshotAttributesResult = std::move(value); }

    inline ModifyDBClusterSnapshotAttributeResult& WithDBClusterSnapshotAttributesResult(const DBClusterSnapshotAttributesResult& value) { SetDBClusterSnapshotAttributesResult(value); return *this;}

    inline ModifyDBClusterSnapshotAttributeResult& WithDBClusterSnapshotAttributesResult(DBClusterSnapshotAttributesResult&& value) { SetDBClusterSnapshotAttributesResult(std::move(value)); return *this;}

    inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }

    inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }

    inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); }

    inline ModifyDBClusterSnapshotAttributeResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}

    inline ModifyDBClusterSnapshotAttributeResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}

  private:

    DBClusterSnapshotAttributesResult m_dBClusterSnapshotAttributesResult;

    ResponseMetadata m_responseMetadata;
  };

} // namespace Model
} // namespace RDS
} // namespace Aws


text:
package com.example.levis.trails.core;

public interface PRunnable<T> {
    public void run(T p);
}


text:
var $ajaxRequest;

$(function(){

    $(".request-text").each(function(){

        $(this).keyup(function(){
            sendRequest();
        });

    });

    $(".request-date").each(function(){

        $(this).change(function(){
            sendRequest();
        });

    });

    $(".request-radio").each(function(){

        $(this).change(function(){
            sendRequest();
        });

    });

    $(".request-select").each(function(){

        $( this ).change(function(){
            sendRequest();
        });

    });

    $(".clear-request").each(function(){

        $(this).click(function(e){

            e.preventDefault();
            var $nameInput = $(this).attr("data-clear");

            $('[name="'+$nameInput+'"]').val("");
        });

    });
});

function sendRequest(page) {
    clearTimeout($ajaxRequest);
    console.log($ajaxRequest)
    form = $("#search-form");

    page = page === undefined ? 1 : page;
    data = form.serialize() + "&page=" + page;
    $ajaxRequest = $.ajax({
        type: 'POST',
        url: form.attr('action'),
        data: data,
        beforeSend: function() {
            //console.log(form.serialize());
            $("#documents-list").fadeTo(200, 0.5);
        },
        success: function(response){
            console.log(response);
            fillTable(response.documents);
            fillPagination(parseInt(response.pages), parseInt(response.pageCurrent));
            $("#documents-list").show("slow");
            $("#documents-list").fadeTo(200, 1);
        },
        dataType: "json"
    });
}

function showList() {
    sendRequest();
}

function fillPagination(pages, pageCurrent) {

    var block = $("#results-pages");
    $(block).empty();

    if (pages > 1 && pageCurrent > 2)
        $(block).append('<');

    var middle = pages / 2;
    var offset = pages;
    if ( middle > 3 ) {
        if ( pageCurrent < middle )
            offset = pageCurrent + 3;
        else
            offset = pageCurrent - 3;
    }

    for (i = 1; i <= pages; i++) {
        row = '';

        if (i === pageCurrent)
            row = '' + i + '';
        else if ( i < offset )
            row = '' + i + '';
        else if ( i === offset )
            row = '...';
        else if ( i > offset )
            row = '' + i + '';

        $(block).append(row);
    }

    if (pages > 1 && pageCurrent < pages)
        $(block).append('>');

}


text:
@extends('venta.content')

@section('ventas')
{{ HTML::style('css/jquery-ui.min.css') }}
{{ Form::open(array('url'=>'ventas', 'id'=>'formVentas')) }}

					Cliente:
					<input type="text" class='noEnterSubmit form-control' placeholder="id|nombre" id="buscarCliente"/>

					Nombre:
					<input disabled type='text' class='form-control' value="Cliente de mostrador" id="datosCliente"/>

					<input type='text' class='form-control' id="idCliente" name="idCliente"/>
					<input type='text' id="tipoCliente"/>

	Cantidad:
	<input type="text" id="cantidadProducto" pattern="\d+" class="noEnterSubmit" autocomplete="off" autofocus/>
	Buscar producto:
	<input type="text" id="buscarProducto" class="noEnterSubmit" autocomplete="off"/>

	    Codigo
	    Nombre
	    Descripcion
	    Categoria
	    Cantidad
	    $/Precio/U
	    $/Subtotal

Tipo de pago

			@foreach($tiposDePago as $id => $tipoDePago)

				{{$tipoDePago}}:
				<input name="cantidadTipoPago[{{$id}}]"type='text' class='noEnterSubmit form-control tipoPago' id="{{$tipoDePago}}" autocomplete="off" pattern="\d+(\.\d{1,2})?" value="00.00"/>

			@endforeach

				Detalles pago
				<input type='text' class='noEnterSubmit form-control' name="detallesVenta" id="detallesVenta" autocomplete="off"/>

			@foreach($reglas as $id => $regla)

				<input id="regla{{$regla->id}}" type='text' class='noEnterSubmit regla' min="{{$regla->minimo}}" max="{{$regla->maximo}}" des="{{$regla->descuento}}" value="{{$regla->id}}" hidden/>

			@endforeach
			@foreach($reglasFitness as $id => $reglaF)

				<input id="regla{{$reglaF->id}}" type='text' class='noEnterSubmit reglaF' min="{{$reglaF->minimo}}" max="{{$reglaF->maximo}}" des="{{$reglaF->descuento}}" value="{{$reglaF->id}}" hidden/>

			@endforeach

{{Form::submit('Realizar Venta', ['class' => 'btn btn-danger btn-lg col-sm-2'])}}

{{ Form::close() }}

@stop