text:
<?php

namespace Manishyadav\LaravelApplicationLogs;

use Manishyadav\LaravelApplicationLogs\handler\EloquentHandler;
use Manishyadav\LaravelApplicationLogs\Processor\RequestProcessor;

/**
 * This class is used to configure the monolog instance
 * to save the logs in database
 *
 * @author manishyadav <manishyadav0012@gmail.com>
 *
 */
class ConfigureMonolog{

    /**
     * This funtion is used to configure the monolog
     * logger instance here.
     *
     * @param \Monolog\Logger $monolog
     * @return \Monolog\Logger
     */
    public function getLogger(\Monolog\Logger $monolog)
    {
        //creating the instance of our EloquentHandler which
        // saves the error log in database
        $handler = new EloquentHandler();
        $handler->setFormatter(new \Monolog\Formatter\LineFormatter(null, null, true, true));

        //attatching our RequestProcessor class object to the monolog instance
        $monolog->pushProcessor(new RequestProcessor());

        //attatacing our handler to monolog instance
        $monolog->pushHandler($handler);

        return $monolog;
    }
}


text:
<!doctype html>

  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>httprequest.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <meta charset="utf8">

      Closure Library API Documentation

        Go to class or file:
        <input type="text" id="ac">

httprequest.js

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

// Copyright 2007 Google Inc. All Rights Reserved.

/**
 * @fileoverview This file contains functions for setting up the standard
 * goog.net.XmlHttp factory (and, therefore, goog.net.XhrIo) to work using
 * the HttpRequest object Gears provides.
 *
 */

goog.provide('goog.gears.HttpRequest');

goog.require('goog.Timer');
goog.require('goog.gears');
goog.require('goog.net.XmlHttp');

/**
 * Sets up the Gears HttpRequest's to be the default HttpRequest's used via
 * the goog.net.XmlHttp factory.
 */
goog.gears.HttpRequest.setup = function() {
  // Set the XmlHttp factory.
  goog.net.XmlHttp.setFactory(
      goog.gears.HttpRequest.factory_, goog.gears.HttpRequest.optionsFactory_);

  // Use the Gears timer as the default timer object to ensure that the XhrIo
  // timeouts function in the Workers.
  goog.Timer.defaultTimerObject = goog.gears.getFactory().create(
      'beta.timer', '1.0');
};

/**
 * The factory for creating Gears HttpRequest's.
 * @return {XMLHttpRequest} The request object.
 * @private
 */
goog.gears.HttpRequest.factory_ = function() {
  return goog.gears.getFactory().create('beta.httprequest', '1.0');
};

/**
 * The options object for the Gears HttpRequest.
 * @type {Object}
 * @private
 */
goog.gears.HttpRequest.options_ = {};

// As of Gears API v.2 (build version 0.1.56.0), setting onreadystatechange to
// null in FF will cause the browser to crash.
goog.gears.HttpRequest.options_[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION] =
    true;

/**
 * The factory for creating the options object for Gears HttpRequest's.
 * @return {Object} The options.
 * @private
 */
goog.gears.HttpRequest.optionsFactory_ = function() {
  return goog.gears.HttpRequest.options_;
};

redpajama_set_name: RedPajamaGithub


text:
// Class header file.
#include "DOMSupportException.hpp"

XALAN_CPP_NAMESPACE_BEGIN

DOMSupportException::DOMSupportException(
            const XalanDOMString&   theMessage,
            MemoryManager&          theManager,
            const Locator*          theLocator) :
    XSLException(
        theMessage,
        theManager,
        theLocator)
{
}

DOMSupportException::DOMSupportException(
            const XalanDOMString&   theMessage,
            MemoryManager&          theManager) :
    XSLException(
        theMessage,
        theManager)
{
}

DOMSupportException::~DOMSupportException()
{
}

static const XalanDOMChar   s_type[] =
{
    XalanUnicode::charLetter_D,
    XalanUnicode::charLetter_O,
    XalanUnicode::charLetter_M,
    XalanUnicode::charLetter_S,
    XalanUnicode::charLetter_u,
    XalanUnicode::charLetter_p,
    XalanUnicode::charLetter_p,
    XalanUnicode::charLetter_o,
    XalanUnicode::charLetter_r,
    XalanUnicode::charLetter_t,
    XalanUnicode::charLetter_E,
    XalanUnicode::charLetter_x,
    XalanUnicode::charLetter_c,
    XalanUnicode::charLetter_e,
    XalanUnicode::charLetter_p,
    XalanUnicode::charLetter_t,
    XalanUnicode::charLetter_i,
    XalanUnicode::charLetter_o,
    XalanUnicode::charLetter_n,
    0
};

const XalanDOMChar*
DOMSupportException::getType() const
{
    return s_type;
}

XALAN_CPP_NAMESPACE_END


text:
<?php
/* @var $this PersonaController */
/* @var $model Persona */
/* @var $form CActiveForm */
?>

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'persona-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>true,
)); ?>

Los campos con * son requeridos.

 Datos personales

				<?php echo $form->labelEx($model,'nombrePersona'); ?>
				<?php echo $form->textField($model,'nombrePersona',array('size'=>50,'maxlength'=>50,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
				<?php echo $form->error($model,'nombrePersona'); ?>

				<?php echo $form->labelEx($model,'nombreCitasBliblioPersona'); ?>
				<?php echo $form->textField($model,'nombreCitasBliblioPersona',array('size'=>60,'maxlength'=>80,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
				<?php echo $form->error($model,'nombreCitasBliblioPersona'); ?>

				<?php echo $form->labelEx($model,'tipoDocumentoPersona'); ?>
				<?php echo $form->dropDownList($model,'tipoDocumentoPersona',array('Cédula de Ciudadanía'=>'Cédula de Ciudadanía','Cédula de Extranjería'=>'Cédula de Extranjería', 'Tarjeta de Identidad'=>'Tarjeta de Identidad','Pasaporte'=>'Pasaporte'));?>

				<?php echo $form->error($model,'tipoDocumentoPersona'); ?>

				<?php echo $form->labelEx($model,'fechaExpedicionDoc'); ?>
				 <?php
				  $this->widget('zii.widgets.jui.CJuiDatePicker', array(
				   'model'=>$model,
				   'attribute'=>'fechaExpedicionDoc',
				   'value'=>$model->fechaExpedicionDoc,
				   'language' => 'es',
				   'htmlOptions' => array('readonly'=>"readonly",'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);'),
				   'options'=>array(
				    'autoSize'=>true,
				    'defaultDate'=>$model->fechaExpedicionDoc,
				    'dateFormat'=>'yy-mm-dd',
				    'buttonImage'=>Yii::app()->baseUrl.'/images/calendario.png',
				    'buttonImageOnly'=>true,
				    'buttonText'=>'Fecha',
				    'selectOtherMonths'=>true,
				    'showAnim'=>'slide',
				    'showButtonPanel'=>true,
				    'showOn'=>'button',
				    'showOtherMonths'=>true,
				    'changeMonth' => 'true',
				    'changeYear' => 'true',
				    'minDate'=>$model->fechaNacimientoPersona,
				    'maxDate'=> '0',
				    ),
				  ));
				 ?>
				 <?php echo $form->error($model,'fechaExpedicionDoc'); ?>

				<?php echo $form->labelEx($model,'fechaNacimientoPersona'); ?>
				<?php
				  $this->widget('zii.widgets.jui.CJuiDatePicker', array(
				   'model'=>$model,
				   'attribute'=>'fechaNacimientoPersona',
				   'value'=>$model->fechaNacimientoPersona,
				   'language' => 'es',
				   'htmlOptions' => array('readonly'=>"readonly",'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);'),
				   'options'=>array(
				    'autoSize'=>true,
				    'defaultDate'=>$model->fechaNacimientoPersona,
				    'dateFormat'=>'yy-mm-dd',
				    'buttonImage'=>Yii::app()->baseUrl.'/images/calendario.png',
				    'buttonImageOnly'=>true,
				    'buttonText'=>'Fecha',
				    'selectOtherMonths'=>true,
				    'showAnim'=>'slide',
				    'showButtonPanel'=>true,
				    'showOn'=>'button',
				    'showOtherMonths'=>true,
				    'changeMonth' => 'true',
				    'changeYear' => 'true',
				    'minDate'=>'1900-01-01',
				    'maxDate'=> '0',
				    ),
				  ));
				 ?>

				<?php echo $form->error($model,'fechaNacimientoPersona'); ?>

				<?php echo $form->labelEx($model,'nacimientoPais_idPais'); ?>
				<?php
					$datos = CHtml::listData(Pais::model()->findAll(),'idPais','nombrePais');
					echo $form->DropDownList($model,'nacimientoPais_idPais',$datos, array('empty'=>'--Seleccione una opción--',
									'ajax'=> array(
											'type'=>'POST',
											'url'=>CController::createUrl('Persona/Selectdepartamentos'),
											'update'=>'#'.CHtml::activeId($model,'nacimientoDepartamento_idDepartamento'))
								)); ?>

				<?php echo $form->error($model,'nacimientoPais_idPais'); ?>

				<?php echo $form->labelEx($model,'primerApellidoPersona'); ?>
				<?php echo $form->textField($model,'primerApellidoPersona',array('size'=>25,'maxlength'=>25,'style'=>'border-
				radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
				<?php echo $form->error($model,'primerApellidoPersona'); ?>

				<?php echo $form->labelEx($model,'cedulaPersona'); ?>
				<?php echo $form->textField($model,'cedulaPersona',array('size'=>25,'maxlength'=>16,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
				<?php echo $form->error($model,'cedulaPersona'); ?>

				<?php echo $form->labelEx($model,'sexoPersona'); ?>
				<?php echo $form->dropDownList($model,'sexoPersona',array('Masculino'=>'Masculino','Femenino'=>'Femenino'));?>

				<?php echo $form->error($model,'sexoPersona'); ?>

				<?php echo $form->labelEx($model,'nacimientoDepartamento_idDepartamento'); ?>
				<?php
					$datos = CHtml::listData(Departamento::model()->findAll(),'idDepartamento','nombreDepartamento');
					echo $form->DropDownList($model,'nacimientoDepartamento_idDepartamento',$datos, array('empty'=>'--Seleccione una opción--',
								'ajax'=> array(
											'type'=>'POST',
											'url'=>CController::createUrl('Persona/Selectciudades'),
											'update'=>'#'.CHtml::activeId($model,'nacimientoCiudad_idCiudad')),
								));?>

				<?php echo $form->error($model,'nacimientoDepartamento_idDepartamento'); ?>

				<?php echo $form->labelEx($model,'segundoApellidoPersona'); ?>
				<?php echo $form->textField($model,'segundoApellidoPersona',array('size'=>25,'maxlength'=>25,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
				<?php echo $form->error($model,'segundoApellidoPersona'); ?>

				<?php echo $form->labelEx($model,'nacionalidadPais_idPais'); ?>
				<?php
					$datos = CHtml::listData(Pais::model()->findAll(),'idPais','nombrePais');
					echo $form->DropDownList($model,'nacionalidadPais_idPais',$datos, array('empty'=>'--Seleccione una opción--')); ?>

				<?php echo $form->error($model,'nacionalidadPais_idPais'); ?>

				<?php echo $form->labelEx($model,'expediciónPais_idPais'); ?>
				<?php
					$datos = CHtml::listData(Pais::model()->findAll(),'idPais','nombrePais');
					echo $form->DropDownList($model,'expediciónPais_idPais',$datos, array('empty'=>'--Seleccione una opción--')); ?>

				<?php echo $form->error($model,'expediciónPais_idPais'); ?>

				<?php echo $form->labelEx($model,'estadoCivilPersona'); ?>
				<?php echo $form->dropDownList($model,'estadoCivilPersona',array('Soltero'=>'Soltero','Casado'=>'Casado', 'Viudo'=>'Viudo','Union Libre'=>'Union Libre'));?>

				<?php echo $form->error($model,'estadoCivilPersona'); ?>

				<?php echo $form->labelEx($model,'nacimientoCiudad_idCiudad'); ?>
				<?php
					$datos = CHtml::listData(Ciudad::model()->findAll(),'idCiudad','nombreCiudad');
					echo $form->DropDownList($model,'nacimientoCiudad_idCiudad',$datos, array('empty'=>'--Seleccione una opción--')); ?>

				<?php echo $form->error($model,'nacimientoCiudad_idCiudad'); ?>

		<?php
				echo  CHtml::button('Borrar', array('id' => 'borrarDatosPersonales','class'=> 'button'));
		?>

 Dirección Personal

			<?php echo $form->labelEx($model,'dirPerPais_idPais'); ?>
			<?php
				$datos = CHtml::listData(Pais::model()->findAll(),'idPais','nombrePais');
				echo $form->DropDownList($model,'dirPerPais_idPais',$datos, array('empty'=>'--Seleccione una opción--',
									'ajax'=> array(
											'type'=>'POST',
											'url'=>CController::createUrl('Persona/Selectdepartamentospersonal'),
											'update'=>'#'.CHtml::activeId($model,'dirPerDepartamento_idDepartamento'))
									)); ?>

			<?php echo $form->error($model,'dirPerPais_idPais'); ?>

			<?php echo $form->labelEx($model,'dirPerDireccion'); ?>
			<?php echo $form->textField($model,'dirPerDireccion',array('size'=>35,'maxlength'=>35,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerDireccion'); ?>

			<?php echo $form->labelEx($model,'dirPerTelefonoFijo'); ?>
			<?php echo $form->textField($model,'dirPerTelefonoFijo', array('maxlength'=>10,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerTelefonoFijo'); ?>

			<?php echo $form->labelEx($model,'dirPerApartadoPostal'); ?>
			<?php echo $form->textField($model,'dirPerApartadoPostal', array('maxlength'=>10,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerApartadoPostal'); ?>

			<?php echo $form->labelEx($model,'dirPerSitioWeb'); ?>
			<?php echo $form->textField($model,'dirPerSitioWeb',array('size'=>60,'maxlength'=>100,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerSitioWeb'); ?>

			<?php echo $form->labelEx($model,'dirPerDepartamento_idDepartamento'); ?>
			<?php
				$datos = CHtml::listData(Departamento::model()->findAll(),'idDepartamento','nombreDepartamento');
				echo $form->DropDownList($model,'dirPerDepartamento_idDepartamento',$datos, array('empty'=>'--Seleccione una opción--',
								'ajax'=> array(
											'type'=>'POST',
											'url'=>CController::createUrl('Persona/Selectciudadespersonal'),
											'update'=>'#'.CHtml::activeId($model,'dirPerCiudad_idCiudad'))
								)); ?>

			<?php echo $form->error($model,'dirPerDepartamento_idDepartamento'); ?>

			<?php echo $form->labelEx($model,'dirPerTelefonoMovil'); ?>
			<?php echo $form->textField($model,'dirPerTelefonoMovil', array('maxlength'=>12,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerTelefonoMovil'); ?>

			<?php echo $form->labelEx($model,'dirPerBarrio'); ?>
			<?php echo $form->textField($model,'dirPerBarrio',array('size'=>25,'maxlength'=>50,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerBarrio'); ?>

			<?php echo $form->labelEx($model,'dirPerCodigoPostal'); ?>
			<?php echo $form->textField($model,'dirPerCodigoPostal', array('maxlength'=>10,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerCodigoPostal'); ?>

			<?php echo $form->labelEx($model,'dirPerCiudad_idCiudad'); ?>
			<?php
				$datos = CHtml::listData(Ciudad::model()->findAll(),'idCiudad','nombreCiudad');
				echo $form->DropDownList($model,'dirPerCiudad_idCiudad',$datos, array('empty'=>'--Seleccione una opción--')); ?>

			<?php echo $form->error($model,'dirPerCiudad_idCiudad'); ?>

			<?php echo $form->labelEx($model,'dirPerEmail'); ?>
			<?php echo $form->textField($model,'dirPerEmail',array('size'=>30,'maxlength'=>100,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirPerEmail'); ?>

		<?php
				echo  CHtml::button('Borrar', array('id' => 'borrarDatosDireccionPersonal','class'=> 'button'));
		?>

Dirección profesional

			<?php echo $form->labelEx($model,'dirProPais_idPais'); ?>
			<?php
				$datos = CHtml::listData(Pais::model()->findAll(),'idPais','nombrePais');
				echo $form->DropDownList($model,'dirProPais_idPais',$datos, array('empty'=>'--Seleccione una opción--',
									'ajax'=> array(
											'type'=>'POST',
											'url'=>CController::createUrl('Persona/Selectdepartamentosprofesional'),
											'update'=>'#'.CHtml::activeId($model,'dirProDepartamento_idDepartamento'))
									)); ?>

			<?php echo $form->error($model,'dirProPais_idPais'); ?>

			<?php echo $form->labelEx($model,'dirProInstitucion'); ?>
			<?php echo $form->textField($model,'dirProInstitucion',array('size'=>60,'maxlength'=>100,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProInstitucion'); ?>

			<?php echo $form->labelEx($model,'dirProTelefonoFijo'); ?>
			<?php echo $form->textField($model,'dirProTelefonoFijo', array('maxlength'=>7,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProTelefonoFijo'); ?>

			<?php echo $form->labelEx($model,'dirProExtension'); ?>
			<?php echo $form->textField($model,'dirProExtension', array('maxlength'=>10,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProExtension'); ?>

			<?php echo $form->labelEx($model,'dirProEmailInstitucional'); ?>
			<?php echo $form->textField($model,'dirProEmailInstitucional',array('size'=>60,'maxlength'=>100,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProEmailInstitucional'); ?>

			<?php echo $form->labelEx($model,'dirProDepartamento_idDepartamento'); ?>
			<?php
				$datos = CHtml::listData(Departamento::model()->findAll(),'idDepartamento','nombreDepartamento');
				echo $form->DropDownList($model,'dirProDepartamento_idDepartamento',$datos, array('empty'=>'--Seleccione una opción--',
								'ajax'=> array(
											'type'=>'POST',
											'url'=>CController::createUrl('Persona/Selectciudadesprofesional'),
											'update'=>'#'.CHtml::activeId($model,'dirProCiudad_idCiudad'))
								)); ?>

			<?php echo $form->error($model,'dirProDepartamento_idDepartamento'); ?>

			<?php echo $form->labelEx($model,'dirProDireccionInstitucion'); ?>
			<?php echo $form->textField($model,'dirProDireccionInstitucion',array('size'=>25,'maxlength'=>35,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProDireccionInstitucion'); ?>

			<?php echo $form->labelEx($model,'dirProApartadoPostal'); ?>
			<?php echo $form->textField($model,'dirProApartadoPostal', array('maxlength'=>10,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProApartadoPostal'); ?>

			<?php echo $form->labelEx($model,'dirProPaginaInstitucional'); ?>
			<?php echo $form->textField($model,'dirProPaginaInstitucional',array('size'=>25,'maxlength'=>100,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProPaginaInstitucional'); ?>

			<?php echo $form->labelEx($model,'dirProCiudad_idCiudad'); ?>
			<?php
				$datos = CHtml::listData(Ciudad::model()->findAll(),'idCiudad','nombreCiudad');
				echo $form->DropDownList($model,'dirProCiudad_idCiudad',$datos, array('empty'=>'--Seleccione una opción--')); ?>

			<?php echo $form->error($model,'dirProCiudad_idCiudad'); ?>

			<?php echo $form->labelEx($model,'dirProBarrio'); ?>
			<?php echo $form->textField($model,'dirProBarrio',array('size'=>30,'maxlength'=>50,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProBarrio'); ?>

			<?php echo $form->labelEx($model,'dirProCodigoPostal'); ?>
			<?php echo $form->textField($model,'dirProCodigoPostal', array('maxlength'=>10,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
			<?php echo $form->error($model,'dirProCodigoPostal'); ?>

 Datos para ingresar a la comunidad

		<?php echo $form->labelEx($model,'usuarioSIICPersona'); ?>
		<?php echo $form->textField($model,'usuarioSIICPersona',array('size'=>60,'maxlength'=>50,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
		<?php echo $form->error($model,'usuarioSIICPersona'); ?>

		<?php echo $form->labelEx($model,'contraseñaSIICPersona'); ?>
		<?php echo $form->passwordField($model,'contraseñaSIICPersona',array('size'=>25,'maxlength'=>50,'style'=>'border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);')); ?>
		<?php echo $form->error($model,'contraseñaSIICPersona'); ?>

		 Confirmar clave SIIC *
		<input type="password"  id="Persona_confirmarClave" style="border-radius: 7px;  border-style: dotted; border-color: rgb(211,211,211);" value="<?php echo $model->contraseñaSIICPersona; ?>">

		<?php
			echo CHtml::button('Borrar', array('id' => 'borrarDatosDireccionProfesional','class'=> 'button'));
		?>

		<?php echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar'); ?>

<?php $this->endWidget(); ?>


text:
<?php

namespace SMTC\MainBundle\Tests\Service;

use SMTC\MainBundle\Service\GitHubLocator;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class GitHubLocatorTest extends WebTestCase
{
    /**
     * @var \PHPUnit_Framework_MockObject_MockObject
     */
    private $parser;

    /**
     * @var \PHPUnit_Framework_MockObject_MockObject
     */
    private $locator;

    /**
     * @var GitHubLocator
     */
    private $githubLocator;

    /**
     * @var string
     */
    private $githubRepository;

    /**
     * @var string
     */
    private $rootdir;

    protected function setUp()
    {
        $this->parser = $this->getMock('Symfony\Component\Templating\TemplateNameParserInterface');
        $this->locator = $this->getMock('Symfony\Component\Config\FileLocatorInterface');
        $this->repository = "https://github.com/showmethecodeteam/showmethecode";
        static::$kernel = static::createKernel();
        static::$kernel->boot();

        $this->rootdir = static::$kernel->getContainer()->getParameter('kernel.root_dir');

        $this->githubLocator = new GitHubLocator($this->parser, $this->locator, $this->repository, $this->rootdir);
    }

    public function testGetTemplateLink()
    {
        $templateName = 'SMTCMainBundle:Default:index.html.twig';

        $this->parser
            ->expects($this->once())
            ->method('parse')
            ->with($templateName)
        ;

        $templateDir = dirname($this->rootdir)."/src/SMTC/MainBundle/Resources/views/Default/index.html.twig";

        $this->locator
            ->expects($this->once())
            ->method('locate')
            ->will($this->returnValue($templateDir));

        $templateLink = sprintf('%s/blob/master/src/SMTC/MainBundle/Resources/views/Default/index.html.twig', $this->repository);

        $this->assertEquals($templateLink, $this->githubLocator->getTemplateLink($templateName));
    }

    public function testGetMethodClassLink()
    {
        $className = "SMTC\MainBundle\Tests\Service\Fixtures\Foo";
        $methodName = "bar";
        $lineAnchor = "#L7-10";

        $classLink = sprintf('%s/blob/master/src/SMTC/MainBundle/Tests/Service/Fixtures/Foo.php%s', $this->repository, $lineAnchor);

        $this->assertEquals($classLink, $this->githubLocator->getMethodClassLink($className, $methodName));
    }
}


text:
export default {
    setupFiles: ["./auto"],
    testMatch: ["<rootDir>/test/jest.js"],
};


text:
package org.drools.core.util.debug;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

import org.mvel2.compiler.AbstractParser;
import org.mvel2.integration.impl.MapVariableResolverFactory;
import org.mvel2.optimizers.OptimizerFactory;
import org.mvel2.templates.SimpleTemplateRegistry;
import org.mvel2.templates.TemplateCompiler;
import org.mvel2.templates.TemplateRegistry;
import org.mvel2.templates.TemplateRuntime;
import org.mvel2.templates.res.Node;

public class SessionReporter {

    protected static final TemplateRegistry REPORT_REGISTRY = new SimpleTemplateRegistry();

    static {
        OptimizerFactory.setDefaultOptimizer( "reflective" );

        REPORT_REGISTRY.addNamedTemplate( "simple",
                                          TemplateCompiler.compileTemplate( SessionReporter.class.getResourceAsStream( "reports.mvel" ),
                                                                            (Map<String, Class<? extends Node>>) null ) );

        /**
         * Process these templates
         */
        TemplateRuntime.execute( REPORT_REGISTRY.getNamedTemplate( "simple" ),
                                 null,
                                 REPORT_REGISTRY );
    }

    public static String generateReport(final String ruleTemplate,
                                        final StatefulKnowledgeSessionInfo session,
                                        final Map<String, Object> vars) {
        Map<String, Object> context = new HashMap<String, Object>();
        if ( vars != null ) {
            context.putAll( vars );
        }
        context.put( "session",
                     session );

        return (String) TemplateRuntime.execute( REPORT_REGISTRY.getNamedTemplate( ruleTemplate ),
                                                 null,
                                                 new MapVariableResolverFactory( context ),
                                                 REPORT_REGISTRY );
    }

    public static void addNamedTemplate(String name,
                                        InputStream template) {
        REPORT_REGISTRY.addNamedTemplate( name,
                                          TemplateCompiler.compileTemplate( template,
                                                                            (Map<String, Class<? extends Node>>) null ) );
        /*
         * Process these templates
         */
        TemplateRuntime.execute( REPORT_REGISTRY.getNamedTemplate( name ),
                                 null,
                                 REPORT_REGISTRY );
    }

}


text:
using namespace NN;

// -----------------------------------------------------------------------------
// Class: Vote
// -----------------------------------------------------------------------------

Vote::Vote(
    const uint32_t version,
    const uint256 poll_txid,
    std::vector<uint8_t> responses,
    VoteWeightClaim claim)
    : m_version(version)
    , m_poll_txid(poll_txid)
    , m_responses(std::move(responses))
    , m_claim(std::move(claim))
{
}

bool Vote::ResponseExists(const uint8_t offset) const
{
    return std::any_of(
        m_responses.begin(),
        m_responses.end(),
        [&](const uint8_t response) { return response == offset; });
}

// -----------------------------------------------------------------------------
// Class: LegacyVote
// -----------------------------------------------------------------------------

LegacyVote::LegacyVote(
    std::string key,
    MiningId mining_id,
    double amount,
    double magnitude,
    std::string responses)
    : m_key(std::move(key))
    , m_mining_id(mining_id)
    , m_amount(amount)
    , m_magnitude(magnitude)
    , m_responses(std::move(responses))
{
}

LegacyVote LegacyVote::Parse(const std::string& key, const std::string& value)
{
    const auto parse_double = [](const std::string& value, const double places) {
        const double scale = std::pow(10, places);
        return std::nearbyint(strtod(value.c_str(), nullptr) * scale) / scale;
    };

    return LegacyVote(
        key,
        MiningId::Parse(ExtractXML(value, "<CPID>", "</CPID>")),
        parse_double(ExtractXML(value, "<BALANCE>", "</BALANCE>"), 0),
        parse_double(ExtractXML(value, "<MAGNITUDE>", "</MAGNITUDE>"), 2),
        ExtractXML(value, "<ANSWER>", "</ANSWER>"));
}

std::vector<std::pair<uint8_t, uint64_t>>
LegacyVote::ParseResponses(const std::map<std::string, uint8_t>& choice_map) const
{
    std::vector<std::string> answers = split(m_responses, ";");
    std::vector<std::pair<uint8_t, uint64_t>> responses;

    for (auto& answer : answers) {
        boost::to_lower(answer);

        auto iter = choice_map.find(answer);

        if (iter != choice_map.end()) {
            responses.emplace_back(iter->second, 0);
        }
    }

    return responses;
}

std::string LegacyVote::ToString() const
{
    const auto round_to_string = [](const double value) {
        return std::to_string(std::nearbyint(value));
    };

    const std::vector<std::string> parts = split(m_key, ";");
    const std::string title = parts.size() >= 1 ? parts[0] : "";
    const std::string address = parts.size() >= 2 ? parts[1] : "";

    return "<TITLE>"     + title                        + "</TITLE>"
        + "<ANSWER>"     + m_responses                  + "</ANSWER>"
        + "<CPID>"       + m_mining_id.ToString()       + "</CPID>"
        + "<GRCADDRESS>" + address                      + "</GRCADDRESS>"
        + "<BALANCE>"    + round_to_string(m_amount)    + "</BALANCE>"
        + "<MAGNITUDE>"  + round_to_string(m_magnitude) + "</MAGNITUDE>";
}


text:
**:warning: You probably want to use [http-easy](https://docs.racket-lang.org/http-easy/index.html) instead.**

Make simple HTTP requests with Racket

```racket
 (require simple-http) package: simple-http
```

Very small library for making HTTP requests. Attempts to handle the
server response and convert into the correct data type based on
Content-Type headers. Heavily inspired and influenced by
[racket-request](https://github.com/jackfirth/racket-request).

The general use case for this is when you want to make repeated requests
to an API. You can setup a requester with the relevant auth headers and
base URL, then make requests using the available procedures, `get`,
`put`, etc.

Responses are parsed into `jsexpr?`, `xexpr?`, or `string?` depending on
which `requester?` is used.

**Example JSON request and response:**

```racket
; Setup a json-request using SSL and pointed at httpbin.org
(define httpbin-org
  (update-headers
    (update-ssl
      (update-host json-requester "httpbin.org") #t)
   '("Authorization: 8675309")))

; Query params for the request
(define params '((foo . "12") (bar . "hello")))

; Make a GET to https://httpbin.org/get?foo=12&bar=hello
(define response (get httpbin-org "/get" #:params params))
```

Example:

```racket
> response
(json-response
 "HTTP/1.1 200 OK"
 '#hasheq((X-Powered-By . ("Flask"))
          (Access-Control-Allow-Credentials . ("true"))
          (Connection . ("close"))
          (Content-Type . ("application/json"))
          (Via . ("1.1 vegur"))
          (Date . ("Sun, 14 May 2017 00:34:47 GMT"))
          (X-Processed-Time . ("0.000745058059692"))
          (Access-Control-Allow-Origin . ("*"))
          (Server . ("meinheld/0.6.1"))
          (Content-Length . ("408")))
 '#hasheq((url . "https://httpbin.org/get?foo=12&bar=hello")
          (headers
           .
           #hasheq((Authorization . "8675309")
                   (Host . "httpbin.org")
                   (Connection . "close")
                   (Content-Type . "application/json")
                   (Accept . "application/json")
                   (Accept-Encoding . "gzip")
                   (User-Agent . "Racket/6.8 (net/http-client)")))
          (origin . "255.255.255.255")
          (args . #hasheq((bar . "hello") (foo . "12")))))
```

## 1. Requesters

Requests are made by creating requesters and using functions to update
them with relevant data such as base url, use SSL, etc.

```racket
(struct requester (host headers ssl type)
    #:extra-constructor-name make-requester
    #:transparent)
  host : string?
  headers : hash?
  ssl : boolean?
  type : symbol?
```

Stores information about the types of requests to make \(headers\). You
usually don't need to use this directly, pre-loaded requesters are
provided for you.

```racket
html-requester
json-requester
text-requester
xml-requester
```

Pre-made requesters for requesting specific formats. Requests made with
these will send the appropriate Accept and Content-Type headers.
Responses will also be parsed according to their request type.

```racket
(update-host requester host) -> requester?
  requester : requester?
  host : string?
```

Change the host string in a requester. Returns the updated requester.

```racket
(update-ssl requester ssl) -> requester?
  requester : requester?
  ssl : boolean?
```

Change whether the requester should make SSL requests or not. When set
to \#t requests will be changed to https. Returns the updated requester.

```racket
(update-headers requester headers) -> requester?
  requester : requester?
  headers : (listof string?)
```

Merges `headers` into the existing headers in the requester and returns
the requester. Any headers passed to the function will overwrite any
existing headers in the `requester?` with the same header key.

`(update-headers req '("Authorization: 8675309" "x-foo: oof"))`

## 2. Making requests

Requests are made using requesters to determine how data should be sent
and received. Responses are returned as structs with their data encoded
based on the requester used. If the server returns an error code a
`exn:fail:network:http:error?` will be raised. If the data returned from
the server is in a different format than requested or cannot be properly
parsed then a `exn:fail:network:http:read?` will be raised.

```racket
(get requester uri [#:params params])
 -> (or/c html-response? json-response? text-response? xml-response?)
  requester : requester?
  uri : string?
  params : (listof pair?) = '()
```

Makes a `GET` request using the provided `requester`. `#:params` will be
combined onto the URL as query parameters. Responses are structs.

```racket
(get
 (update-host json-requester "httpbin.org")
 "/get" #:params '((foo . "12") (bar . "quux")))
```

```racket
(post  requester
       uri
      [#:data data
       #:params params])
 -> (or/c html-response? json-response? text-response? xml-response?)
  requester : requester?
  uri : string?
  data : any/c = #f
  params : (listof pair?) = '()
```

Makes a `POST` request using the provided `requester`. `#:params` will
be combined onto the URL as query parameters. `#:data` is sent to the
server in the body of the request. Responses are structs.

```racket
(post
 (update-host json-requester "httpbin.org")
 "/post"
 #:data (jsexpr->string (hasheq 'colossal-squid "drumbones"))
 #:params '((sort . "asc") (filter . "hits")))
```

```racket
(put  requester
      uri
     [#:data data
      #:params params])
 -> (or/c html-response? json-response? text-response? xml-response?)
  requester : requester?
  uri : string?
  data : any/c = #f
  params : (listof pair?) = '()
```

Makes a `PUT` request using the provided `requester`. `#:params` will be
combined onto the URL as query parameters. `#:data` is sent to the
server in the body of the request. Responses are structs.

```racket
(put
 (update-host json-requester "httpbin.org")
 "/put"
 #:data (jsexpr->string (hasheq 'white-zombie "thunderkiss"))
 #:params '((sort . "asc")))
```

```racket
(patch  requester
        uri
       [#:data data
        #:params params])
 -> (or/c html-response? json-response? text-response? xml-response?)
  requester : requester?
  uri : string?
  data : any/c = #f
  params : (listof pair?) = '()
```

Makes a `PATCH` request using the provided `requester`. `#:params` will
be combined onto the URL as query parameters. `#:data` is sent to the
server in the body of the request. Responses are structs.

```racket
(patch
 (update-host json-requester "httpbin.org")
 "/patch"
 #:data (jsexpr->string (hasheq 'white-zombie "thunderkiss"))
 #:params '((sort . "asc")))
```

```racket
(delete requester uri [#:params params])
 -> (or/c html-response? json-response? text-response? xml-response?)
  requester : requester?
  uri : string?
  params : (listof pair?) = '()
```

Makes a `DELETE` request using the provided `requester`. `#:params` will
be combined onto the URL as query parameters. Responses are structs.

```racket
(delete
 (update-host json-requester "httpbin.org")
 "/delete"
 #:params '((sort . "asc")))
```

## 3. Responses

```racket
(struct html-response (status headers body)
    #:extra-constructor-name make-html-response
    #:transparent)
  status : string?
  headers : hash?
  body : xexpr?
(struct json-response (status headers body)
    #:extra-constructor-name make-json-response
    #:transparent)
  status : string?
  headers : hash?
  body : jsexpr?
(struct text-response (status headers body)
    #:extra-constructor-name make-text-response
    #:transparent)
  status : string?
  headers : hash?
  body : string?
(struct xml-response (status headers body)
    #:extra-constructor-name make-xml-response
    #:transparent)
  status : string?
  headers : hash?
  body : xexpr?
```

Response bodies are decoded into a form determined by the requester used
to make requests. If the response comes back in a form that can't be
processed or throws an error duing processing then a
`exn:fail:network:http:read?` exception will be raised.

`status` is a `string?` such as `"HTTP/1.1 200 OK"`. `headers` are a key
value representation of the response headers:

```racket
#hasheq((Host . "httpbin.org")
        (Connection . "close")
        (Content-Type . "application/json")
        (Accept . "application/json"))
```

## 4. Exceptions

```racket
(struct exn:fail:network:http:read (message
                                    continuation-marks
                                    type)
    #:extra-constructor-name make-exn:fail:network:http:read
    #:transparent)
  message : string?
  continuation-marks : continuation-mark-set?
  type : symbol?
```

Raised when a response is either the wrong format \(ex: HTML returned
for a JSON request\) or malformed and cannot be parsed by the relevant
reader. `type` is a symbol to let you know which requester made the
request, such as `'json`, etc.

```racket
(struct exn:fail:network:http:error (message
                                     continuation-marks
                                     code
                                     type)
    #:extra-constructor-name make-exn:fail:network:http:error
    #:transparent)
  message : string?
  continuation-marks : continuation-mark-set?
  code : number?
  type : symbol?
```

Raised when the server responds with an error code. `code` is the
numeric error code returned by the server. `type` is a `symbol?` letting
you know which requester made the request \(ex: `'json`\).

---


text:
package com.all.core.common.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class UltraPeerInfo {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	private String ip;
	private int port;

	public UltraPeerInfo() {
	}

	public UltraPeerInfo(String ip, int port) {
		super();
		this.ip = ip;
		this.port = port;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

}


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

import com.google.gwt.dom.client.UListElement;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 *
 * @author cbopp
 *
 */
public class TagsPanel extends HTMLPanel {
    public TagsPanel( String html ) {
        super( UListElement.TAG, null );
        getElement().setInnerHTML( html );
    }

    @Override
    public void add( Widget widget ) {
        Element liWrapper = DOM.createElement( "li" );
        //First widget is the input TextBox, add new widgets between the last tag and the input TextBox
        DOM.insertChild( this.getElement(), liWrapper, this.getWidgetCount() - 1 );
        add( widget, liWrapper );
    }

    @Override
    public boolean remove( Widget widget ) {
        // Get the LI to be removed, before calling super.remove(), because
        // super.remove() will detach the child widget's element from its parent.
        Element li = DOM.getParent( widget.getElement() );
        boolean removed = super.remove( widget );
        if( removed )
            this.getElement().removeChild( li );

        return removed;
    }
}


text:
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))

const asyncValidate = (values/*, dispatch */) => {
  return sleep(1000) // simulate server latency
    .then(() => {
      if ([ 'foo@foo.com', 'bar@bar.com' ].includes(values.email)) {
        throw { email: 'Email already Exists' }
      }
    })
}

export default asyncValidate