text:
function DetalleWindow(Window, day) {

	var network = require('lib/network');

	var usuario = '';

	var db = Ti.Database.open('anadicDB');
	var id = db.execute('SELECT name FROM users WHERE userId = 1;');

	if (id.isValidRow()) {
		usuario = id.fieldByName('name');

		if (usuario === 'undefined' || usuario == 'null') {
			usuario = '';
		}
	} else {
		usuario = '';
	}

	id.close();
	db.close();

	var citas;
	var contenedor;
	var totalCitas;
	var citaActual = 0;

	var herramientas =  require('tools');
	var pantallaCompleta = herramientas.isiOS7Plus();

	faceDetWdw = Titanium.UI.createWindow({
		tabBarHidden : true,
		backgroundImage : '/images/background.png',
		width : '100%',
		height : '100%',
		layout : 'composite',
		fullscreen: pantallaCompleta,
		navBarHidden: true
	});

	faceDetWdw.addEventListener('load', function(){
		textFieldEntrevista.blur();
	});

	scrollView = Titanium.UI.createView({
		id : "scrollView",
		backGroundColor : 'transparent',
		height : Ti.UI.SIZE,
		width : '100%',
		layout : 'vertical',
		top: '80'
	});

	function cerrarDetalleWdw()
	{
		Ti.Media.vibrate();
		faceDetWdw.close();
	}

	var templates = require('templates');
	var topBar = templates.getTopBar(L('facetoface'),'/images/iconfacetoface.png', cerrarDetalleWdw);

	bottomBar = Titanium.UI.createView({
		id : "bottomBar",
		backgroundColor : "transparent",
		height : Ti.UI.SIZE,
		width : '100%',
		bottom: '5'
	});

	buttonFirst = Titanium.UI.createImageView({
		id : "buttonFirst",
		image : "/images/buttonfirst.png",
		width : 48,
		height : 48,
		top : "0%",
		left : "10px"
	});

	/*viewSlide = Titanium.UI.createImageView({
		id : "buttonMiddle",
		image : "/images/swipefinger.png",
		width : 48,
		height : 48,
		center : {
			x : '50%',
			y : '50%'
		}
	});*/

	buttonLast = Titanium.UI.createImageView({
		id : "buttonLast",
		image : "/images/buttonfinal.png",
		width : 48,
		height : 48,
		top : "0%",
		right : "10px"
	});

	contenedor = Titanium.UI.createView({
		backgroundColor : "transparent",
		width : '100%',
		height : Ti.UI.SIZE,
		layout : 'vertical'
			});

	labelCuentaCitas = Titanium.UI.createLabel({
		id : "labelCuentaCitas",
		height : 'auto',
		width : 'auto',
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : '#2c2c2c',
		right : '5%'
	});

	labelSocioTitulo = Titanium.UI.createLabel({
		id : "labelSocioTitulo",
		height : 'auto',
		width : 'auto',
		text : L('partner'),
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : 'black',
		textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER
	});

	labelSocio = Titanium.UI.createLabel({
		id : "labelSocio",
		height : 'auto',
		width : 'auto',
		text : usuario,
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : '#798d8d',
		textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER
	});

	line = Ti.UI.createView({
		width : '90%',
		height : 1,
		backgroundColor : 'black',
		anchorPoint : {
			x : 0,
			y : 0
		},
		top : 3,
		bottom : 3
	});

	labelEntrevistaTitulo = Titanium.UI.createLabel({
		id : "labelEntrevistaTitulo",
		height : 'auto',
		width : 'auto',
		text : L('interview'),
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : 'black'
	});

	textFieldEntrevista = Titanium.UI.createTextField({
		id : "textFieldEntrevista",
		width : '90%',
		enabled : false,
		font : {
			fontWeight : 'bold',
			fontSize : '18dp'
		},
		color : '#798d8d',
		borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
	});

	labelEmpresaTitulo = Titanium.UI.createLabel({
		id : "labelEmpresaTitulo",
		height : 'auto',
		width : 'auto',
		text : L('enterprise'),
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : 'black'
	});

	textFieldEmpresa = Titanium.UI.createTextField({
		id : "textFieldEmpresa",
		width : '90%',
		enabled : false,
		font : {
			fontWeight : 'bold',
			fontSize : '18dp'
		},
		color : '#798d8d',
		borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
	});

	labelEmailTitulo = Titanium.UI.createLabel({
		id : "labelEmailTitulo",
		height : 'auto',
		width : 'auto',
		text : L('email'),
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : 'black'
	});

	textFieldEmail = Titanium.UI.createTextField({
		id : "textFieldEmail",
		width : '90%',
		enabled : false,
		font : {
			fontWeight : 'bold',
			fontSize : '18dp'
		},
		color : '#798d8d'
	});

	labelTelefonoTitulo = Titanium.UI.createLabel({
		id : "labelTelefonoTitulo",
		height : 'auto',
		width : 'auto',
		text : L('telephone'),
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : 'black'
	});

	textFieldTelefono = Titanium.UI.createTextField({
		id : "textFieldPhone",
		width : '90%',
		enabled : false,
		font : {
			fontWeight : 'bold',
			fontSize : '18dp'
		},
		color : '#798d8d',
		borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
	});

	labelFechaInicio = Titanium.UI.createLabel({
		id : "labelFechaInicio",
		height : 'auto',
		width : 'auto',
		text : L('start_time'),
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : 'black'
	});

	textFieldFechaInicio = Titanium.UI.createTextField({
		id : "textFieldFechaInicio",
		width : '90%',
		enabled : false,
		font : {
			fontWeight : 'bold',
			fontSize : '18dp'
		},
		color : '#798d8d',
		borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
	});

	labelFechaTermino = Titanium.UI.createLabel({
		id : "labelFechaTermino",
		height : 'auto',
		width : 'auto',
		text : L('end_time'),
		font : {
			fontWeight : 'bold',
			fontSize : '20dp'
		},
		color : 'black'
	});

	textFieldFechaTermino = Titanium.UI.createTextField({
		id : "textFieldFechaTermino",
		width : '90%',
		enabled : false,
		font : {
			fontWeight : 'bold',
			fontSize : '18dp'
		},
		color : '#798d8d',
		borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
	});

	buttonPrev = Titanium.UI.createImageView({
		id : "buttonPrev",
		image : "/images/previous.png",
		width : 48,
		height : 48,
		top : "0%",
		left : "68"
	});

	buttonNext = Titanium.UI.createImageView({
		id : "buttonNext",
		image : "/images/next.png",
		width : 48,
		height : 48,
		top : "0%",
		right : "68"
	});

	contenedor.add(labelCuentaCitas);
	contenedor.add(labelSocioTitulo);
	contenedor.add(labelSocio);
	contenedor.add(line);
	contenedor.add(labelEntrevistaTitulo);
	contenedor.add(textFieldEntrevista);
	contenedor.add(labelEmpresaTitulo);
	contenedor.add(textFieldEmpresa);
	contenedor.add(labelTelefonoTitulo);
	contenedor.add(textFieldTelefono);
	contenedor.add(labelFechaInicio);
	contenedor.add(textFieldFechaInicio);
	contenedor.add(labelFechaTermino);
	contenedor.add(textFieldFechaTermino);

	scrollView.add(contenedor);

	var alert = Titanium.UI.createAlertDialog({
		title : L('nodates'),
		message : L("schedule_appointment"),
		buttonNames : [L('ok')]
	});

	function populateViews() {
		if (totalCitas > 0) {

			labelCuentaCitas.text = citaActual + 1 + " " + L('of') + " " + totalCitas;
			textFieldEntrevista.value = citas[citaActual].int_name;
			textFieldEmpresa.value = citas[citaActual].int_social_reason;
			//textFieldEmail.value = citas[citaActual].app_email;
			textFieldTelefono.value = citas[citaActual].attendee_phone;
			textFieldFechaInicio.value = formatDate(citas[citaActual].start_date);
			textFieldFechaTermino.value = formatDate(citas[citaActual].end_date);

		} else {
			alert.show();
		}
	}

	network.getFacetoFace(day, function(response) {
		citas = response;
		totalCitas = citas.length;
		populateViews();
	});

	faceDetWdw.add(topBar);
	faceDetWdw.add(scrollView);

	bottomBar.add(buttonFirst);
	bottomBar.add(buttonPrev);
	bottomBar.add(buttonNext);
	bottomBar.add(buttonLast);

	faceDetWdw.add(bottomBar);

	alert.addEventListener('click', function(e) {
		if (e.index == 0) {
			var Window;
			var mainWindow = require("ui/handheld/FaceToFaceWindow");
			new mainWindow(Window).open();
		}
	});

	buttonFirst.addEventListener('click', function(e) {
		Ti.Media.vibrate();
		citaActual = 0;
		populateViews();
	});

	buttonLast.addEventListener('click', function(e) {
		Ti.Media.vibrate();
		citaActual = totalCitas - 1;
		populateViews();
	});

	buttonPrev.addEventListener('click', function(e) {
		Ti.Media.vibrate();
		if (citaActual > 0)
		{
			citaActual--;
			populateViews();
		}
	});

	buttonNext.addEventListener('click', function(e) {
		Ti.Media.vibrate();
		if (citaActual < totalCitas - 1)
		{
			citaActual++;
			populateViews();
		}
	});

	function formatDate(date) {
		var arrayDate = date.substring(0, 10).split("-");
		var hora = date.substring(11, 16).split("-");
		var formattedDate = arrayDate[2] + "-" + arrayDate[1] + "-" + arrayDate[0] + "  "+hora;
		return formattedDate;
	}

	faceDetWdw.addEventListener('android:back', function() {
		Ti.Media.vibrate();
		faceDetWdw.close();
	});

	return faceDetWdw;
}

module.exports = DetalleWindow;


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2014-2016 CyberVision, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:security="http://www.springframework.org/schema/security"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:task="http://www.springframework.org/schema/task" xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="
            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
            http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
            http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">

    <aop:aspectj-autoproxy />
    <context:component-scan base-package="org.kaaproject.kaa.server.node, org.kaaproject.kaa.server.control" />

    <import resource="classpath:/dao/mongo-dao-test-context.xml" />

    <util:properties id="properties"
        location="classpath:/control/control-server-test.properties" />

    <bean id="kaaNodeServerConfig" class="org.kaaproject.kaa.server.node.service.config.KaaNodeServerConfig">
        <property name="controlServiceEnabled" value="#{properties[control_service_enabled]}" />
        <property name="bootstrapServiceEnabled" value="#{properties[bootstrap_service_enabled]}" />
        <property name="operationsServiceEnabled" value="#{properties[operations_service_enabled]}" />
        <property name="thriftHost" value="#{properties[thrift_host]}" />
        <property name="thriftPort" value="#{properties[thrift_port]}" />
        <property name="zkEnabled" value="#{properties[zk_enabled]}" />
        <property name="zkHostPortList" value="#{properties[zk_host_port_list]}" />
        <property name="zkWaitConnectionTime" value="#{properties[zk_wait_connection_time]}" />
        <property name="zkMaxRetryTime" value="#{properties[zk_max_retry_time]}" />
        <property name="zkSleepTime" value="#{properties[zk_sleep_time]}" />
        <property name="zkIgnoreErrors" value="#{properties[zk_ignore_errors]}" />
    </bean>

    <!--Zookeeper client configuration-->

    <bean id="zkRetryPolicy" class="org.apache.curator.retry.RetryUntilElapsed">
        <constructor-arg name="maxElapsedTimeMs" value="#{properties[zk_max_retry_time]}"/>
        <constructor-arg name="sleepMsBetweenRetries" value="#{properties[zk_sleep_time]}"/>
    </bean>

    <bean id="zkClient" class="org.apache.curator.framework.CuratorFrameworkFactory" factory-method="newClient">
        <constructor-arg name="connectString" value="#{properties[zk_host_port_list]}"/>
        <constructor-arg name="sessionTimeoutMs" value="60000"/>
        <constructor-arg name="connectionTimeoutMs" value="3000"/>
        <constructor-arg name="retryPolicy" ref="zkRetryPolicy"/>
    </bean>

    <!-- Kaa Node Service -->

    <bean id="kaaNodeInitializationService"
        class="org.kaaproject.kaa.server.node.service.initialization.KaaNodeInitializationService" />

    <bean id="controlInitializationService"
        class="org.kaaproject.kaa.server.control.service.initialization.ControlInitializationService" />
    <bean id="controlService" class="org.kaaproject.kaa.server.control.service.DefaultControlService" />

    <!-- EHCACHE -->

    <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="ehcache.xml" />

    <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cache-manager-ref="ehcache" />

</beans>

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace App\Api\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Component\DependencyInjection\EnvironmentConfigurationTrait;

class ApiExtension extends Extension
{
    use EnvironmentConfigurationTrait;

    public function load(array $configs, ContainerBuilder $container)
    {
        $this->loadFromDirectory(__DIR__.'/../Resources/config', $configs, $container);
    }
}


text:
module Azure::Web::Mgmt::V2020_09_01
  module Models
    #
    # Private Endpoint Connection Approval ARM resource.
    #
    class PrivateLinkConnectionApprovalRequestResource < ProxyOnlyResource

      include MsRestAzure

      # @return [PrivateLinkConnectionState]
      attr_accessor :private_link_service_connection_state

      #
      # Mapper for PrivateLinkConnectionApprovalRequestResource class as Ruby
      # Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'PrivateLinkConnectionApprovalRequestResource',
          type: {
            name: 'Composite',
            class_name: 'PrivateLinkConnectionApprovalRequestResource',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              kind: {
                client_side_validation: true,
                required: false,
                serialized_name: 'kind',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              system_data: {
                client_side_validation: true,
                required: false,
                serialized_name: 'systemData',
                type: {
                  name: 'Composite',
                  class_name: 'SystemData'
                }
              },
              private_link_service_connection_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.privateLinkServiceConnectionState',
                type: {
                  name: 'Composite',
                  class_name: 'PrivateLinkConnectionState'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.PooledObjects;
using Microsoft.CodeAnalysis.Structure;
using Microsoft.CodeAnalysis.Text;

namespace Microsoft.CodeAnalysis.CSharp.Structure
{
    internal class SwitchStatementStructureProvider : AbstractSyntaxNodeStructureProvider<SwitchStatementSyntax>
    {
        protected override void CollectBlockSpans(
            SwitchStatementSyntax node,
            ArrayBuilder<BlockSpan> spans,
            OptionSet options,
            CancellationToken cancellationToken)
        {
            spans.Add(new BlockSpan(
                isCollapsible: true,
                textSpan: TextSpan.FromBounds(node.CloseParenToken.Span.End, node.CloseBraceToken.Span.End),
                hintSpan: node.Span,
                type: BlockTypes.Conditional));
        }
    }
}


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

	<title>PostgreSQL JDBC License</title>
	<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
	<meta name="description" content="The official site for the PostgreSQL JDBC Driver" />
	<meta name="copyright" content="The PostgreSQL Global Development Group" />

	<link rel="shortcut icon" href="../media/favicon.ico" />

			Skip site navigation (1)
			Skip section navigation (2)

					<form action="https://www.google.com/search" method="get">
						<input value="jdbc.postgresql.org" name="sitesearch" type="hidden" />
						<input id="q" name="q" type="text" size="20" maxlength="255" onfocus="if( this.value==this.defaultValue ) this.value='';" value="Google Search" accesskey="s" />

                    				<input name="Search" value="Search" type="submit" />
					</form>

						<map name="maplinks">
							<area shape="rect" coords="0,0,231,80" alt="PostgreSQL" href="https://postgresql.org" />
							<area shape="rect" coords="232,0,390,80" alt="PostgreSQL JDBC Driver" href="https://jdbc.postgresql.org" />
						</map>

Home

About

Download

Documentation

Community

Development

About

License

BSD 2-clause "Simplified" License

						The PostgreSQL JDBC Driver is distributed under the BSD-2-Clause License.
						The simplest explanation of the licensing terms is that
						you can do whatever you want with the product and source code as long
						as you don't claim you wrote it or sue us.  You should give it a read
						though, it's only half a page.

Copyright (c) 1997, PostgreSQL Global Development Group
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

				Privacy Policy |
				About PostgreSQL

				Copyright © 1996-2022 The PostgreSQL Global Development Group


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/login_bg"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scaleType="centerCrop"
        android:src="@drawable/login_bg3"/>

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:stretchColumns="0">

        <TableRow>
            <EditText
                android:layout_marginTop="20dp"
                android:id="@+id/account"
                android:layout_height="wrap_content"
                android:hint=" 手机/邮箱/用户名"
                android:textSize="21sp"/>
        </TableRow>

        <TableRow>
            <EditText
                android:id="@+id/password"
                android:layout_height="wrap_content"
                android:inputType="textPassword"
                android:hint="密码"
                android:textSize="21sp"/>

        </TableRow>

        <TableRow>
            <CheckBox
                android:id="@+id/checkbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="记住密码"
                android:textSize="18sp"/>
        </TableRow>

        <TableRow>
            <Button
                android:id="@+id/login"
                android:layout_height="wrap_content"
                android:layout_span="2"
                android:text="登   陆"
                android:layout_marginTop="20dp"
                android:background="#27F5F2"
                android:textSize="21sp"/>
        </TableRow>

    </TableLayout>

</FrameLayout>


text: export * from './clients-list.component';


text:
class AddIndexForProjectDocs < ActiveRecord::Migration[4.2]
  def up
    add_index :docs, :denotations_num
    add_index :project_docs, :doc_id
    add_index :project_docs, :project_id
    add_index :project_docs, :denotations_num
  end

  def down
    remove_index :docs, :denotations_num
    remove_index :project_docs, :doc_id
    remove_index :project_docs, :project_id
    remove_index :project_docs, :denotations_num
  end
end


text:
<?php

namespace Acme\Work6Bundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * Plane
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class Plane
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=100)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="img", type="string", length=100)
     */
    private $img;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="text")
     */
    private $description;

    /**
     * @var array
     *
     * @ORM\Column(name="tth", type="json_array")
     */
    private $tth;

    /**
     * @var integer
     * @ORM\ManyToOne(targetEntity="Engine", inversedBy="planes")
     * @ORM\JoinColumn(name="engine_id", referencedColumnName="id")
     */
    private $engine_id;

    /**
    * @ORM\ManyToMany(targetEntity="Weapons", inversedBy="plane")
    * @ORM\JoinTable(name="planes_weapons")
    **/
    private $weapons;

    public function __construct() {
//        $this->$weapons = new ArrayCollection();
        $this->engine_id = new ArrayCollection();
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Plane
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Plane
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set tth
     *
     * @param array $tth
     * @return Plane
     */
    public function setTth($tth)
    {
        $this->tth = $tth;

        return $this;
    }

    /**
     * Get tth
     *
     * @return array
     */
    public function getTth()
    {
        return $this->tth;
    }

    /**
     * Set engine_id
     *
     * @param \Acme\Work6Bundle\Entity\Engine $engineId
     * @return Plane
     */
    public function setEngineId(\Acme\Work6Bundle\Entity\Engine $engineId = null)
    {
        $this->engine_id = $engineId;

        return $this;
    }

    /**
     * Get engine_id
     *
     * @return \Acme\Work6Bundle\Entity\Engine
     */
    public function getEngineId()
    {
        return $this->engine_id;
    }

    /**
     * Add weapons
     *
     * @param \Acme\Work6Bundle\Entity\Weapons $weapons
     * @return Plane
     */
    public function addWeapon(\Acme\Work6Bundle\Entity\Weapons $weapons)
    {
        $this->weapons[] = $weapons;

        return $this;
    }

    /**
     * Remove weapons
     *
     * @param \Acme\Work6Bundle\Entity\Weapons $weapons
     */
    public function removeWeapon(\Acme\Work6Bundle\Entity\Weapons $weapons)
    {
        $this->weapons->removeElement($weapons);
    }

    /**
     * Get weapons
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getWeapons()
    {
        return $this->weapons;
    }

    /**
     * Set img
     *
     * @param string $img
     * @return Plane
     */
    public function setImg($img)
    {
        $this->img = $img;

        return $this;
    }

    /**
     * Get img
     *
     * @return string
     */
    public function getImg()
    {
        return $this->img;
    }
}


text:
/*
 * Custom
 */

$( document ).ready(function() {
  $(document).on('click', function(event) {
    if($(event.target).hasClass('menu-icon')) {
      if($('.menu-icon').hasClass('menu-icon-active')) {
        $('.menu-icon').removeClass('menu-icon-active');
        $('.main-menu').hide();
      } else {
        $('.menu-icon').addClass('menu-icon-active');
        $('.main-menu').show();
      }
    } else {
      $('.main-menu').hide();
      $('.menu-icon').removeClass('menu-icon-active');
    }
  });
});


text:
package uk.co.bluegecko.core.builder;

import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.sameInstance;
import static org.junit.Assert.assertThat;
import static uk.co.bluegecko.core.test.exception.ThrowableCaptor.capture;
import static uk.co.bluegecko.core.test.exception.ThrowableCaptor.caught;
import static uk.co.bluegecko.core.test.matcher.map.EntryMatcher.entry;
import static uk.co.bluegecko.core.test.matcher.map.MapContains.contains;
import static uk.co.bluegecko.core.test.matcher.map.MapHasEntries.hasEntries;
import static uk.co.bluegecko.core.test.matcher.map.MapSize.hasMapSize;

import java.util.Arrays;
import java.util.Map;
import java.util.TreeMap;

import org.junit.Test;

public class MapBuilderTest
{

	@Test
	public void testMap()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		builder.with( 10, "Int" )
				.with( 10L, "Long" )
				.with( 10.01F, "Float" )
				.with( 10.01D, "Double" );
		final Map< Number, String > map = builder.build();
		assertThat( map, hasMapSize( 4 ) );
		assertThat( map, hasEntries( entry( 10, "Int" ), entry( 10L, "Long" ), entry( 10.01F, "Float" ),
				entry( 10.01D, "Double" ) ) );
	}

	@Test
	public void testWithArray()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		builder.with( new Integer[]
			{ 10, 11, 12, 13 }, new String[]
			{ "10", "11", "12", "13" } );
		final Map< Number, String > map = builder.build();
		assertThat( map, hasMapSize( 4 ) );
		assertThat( map, contains( entry( 10, "10" ), entry( 11, "11" ), entry( 12, "12" ), entry( 13, "13" ) ) );
	}

	@Test
	public void testWithArrayMisMatch()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		capture( () -> builder.with( new Integer[]
			{ 10, 11, 12, 13 }, new String[]
			{ "10", "11", "12" } ) );
		final Map< Number, String > map = builder.build();
		assertThat( map, hasMapSize( 0 ) );

		assertThat( caught(), is( instanceOf( IllegalArgumentException.class ) ) );
	}

	@Test
	public void testWithList()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		builder.with( Arrays.asList( 10, 11, 12, 13 ), Arrays.asList( "10", "11", "12", "13" ) );
		final Map< Number, String > map = builder.build();
		assertThat( map, hasMapSize( 4 ) );
		assertThat( map, contains( entry( 10, "10" ), entry( 11, "11" ), entry( 12, "12" ), entry( 13, "13" ) ) );
	}

	@Test
	public void testWithListMisMatch()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		capture( () -> builder.with( Arrays.asList( 10, 11, 12 ), Arrays.asList( "10", "11", "12", "13" ) ) );
		final Map< Number, String > map = builder.build();
		assertThat( map, hasMapSize( 0 ) );

		assertThat( caught(), is( instanceOf( IllegalArgumentException.class ) ) );
	}

	@Test
	public void testCopy()
	{
		final Map< Number, String > map2 = new TreeMap<>();
		final MapBuilder< Number, String > builder = MapBuilder.map( map2 );

		builder.with( 10, "10" )
				.with( 11, "11" );

		final MapBuilder< Number, String > builder2 = builder.copy();
		builder2.with( 12, "12" )
				.with( 13, "13" );

		final Map< Number, String > map = builder2.build();
		assertThat( builder.build(), is( not( sameInstance( map ) ) ) );
		assertThat( map, is( instanceOf( TreeMap.class ) ) );
		assertThat( map, hasMapSize( 4 ) );
		assertThat( map, contains( entry( 10, "10" ), entry( 11, "11" ), entry( 12, "12" ), entry( 13, "13" ) ) );
	}

	@Test
	public void testCopyWith()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		builder.with( 10, "10" )
				.with( 11, "11" );

		final Map< Number, String > map2 = new TreeMap<>();
		final MapBuilder< Number, String > builder2 = builder.copy( map2 );
		builder2.with( 12, "12" )
				.with( 13, "13" );

		final Map< Number, String > map = builder2.build();
		assertThat( map, is( sameInstance( map ) ) );
		assertThat( map, is( instanceOf( TreeMap.class ) ) );
		assertThat( map, hasMapSize( 4 ) );
		assertThat( map, contains( entry( 10, "10" ), entry( 11, "11" ), entry( 12, "12" ), entry( 13, "13" ) ) );
	}

	@Test
	public void testReset()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		builder.with( 10, "Int" )
				.with( 10L, "Long" )
				.with( 10.01F, "Float" )
				.with( 10.01D, "Double" );
		builder.reset();

		final Map< Number, String > map = builder.build();
		assertThat( map, hasMapSize( 0 ) );
	}

	@Test
	public void testBuildWith()
	{
		final MapBuilder< Number, String > builder = MapBuilder.map();

		builder.with( 10, "10" )
				.with( 11, "11" )
				.with( 12, "12" )
				.with( 13, "13" );

		final Map< Number, String > map = builder.build( new TreeMap<>() );
		assertThat( map, is( instanceOf( TreeMap.class ) ) );
		assertThat( map, hasMapSize( 4 ) );
		assertThat( map, contains( entry( 10, "10" ), entry( 11, "11" ), entry( 12, "12" ), entry( 13, "13" ) ) );
	}

}


text:
<?php

namespace Notadd\Foundation\Image\Imagick\Commands;

use Notadd\Foundation\Image\Commands\AbstractCommand;
use Notadd\Foundation\Image\Exceptions\NotReadableException;
use Notadd\Foundation\Image\Image;
use Notadd\Foundation\Image\Imagick\Color;
use Notadd\Foundation\Image\Imagick\Decoder;

/**
 * Class FillCommand.
 */
class FillCommand extends AbstractCommand
{
    /**
     * Fills image with color or pattern.
     *
     * @param \Notadd\Foundation\Image\Image $image
     *
     * @return bool
     */
    public function execute($image)
    {
        $filling = $this->argument(0)->value();
        $x = $this->argument(1)->type('digit')->value();
        $y = $this->argument(2)->type('digit')->value();
        $imagick = $image->getCore();
        try {
            $source = new Decoder();
            $filling = $source->init($filling);
        } catch (NotReadableException $e) {
            $filling = new Color($filling);
        }
        if (is_int($x) && is_int($y)) {
            if ($filling instanceof Image) {
                $tile = clone $image->getCore();
                $tile->transparentPaintImage($tile->getImagePixelColor($x, $y), 0, 0, false);
                $canvas = clone $image->getCore();
                $canvas = $canvas->textureImage($filling->getCore());
                $canvas->compositeImage($tile, \Imagick::COMPOSITE_DEFAULT, 0, 0);
                $image->setCore($canvas);
            } elseif ($filling instanceof Color) {
                $canvas = new \Imagick();
                $canvas->newImage($image->getWidth(), $image->getHeight(), $filling->getPixel(), 'png');
                $tile = clone $image->getCore();
                $tile->transparentPaintImage($tile->getImagePixelColor($x, $y), 0, 0, false);
                $alpha = clone $image->getCore();
                $image->getCore()->compositeImage($canvas, \Imagick::COMPOSITE_DEFAULT, 0, 0);
                $image->getCore()->compositeImage($tile, \Imagick::COMPOSITE_DEFAULT, 0, 0);
                $image->getCore()->compositeImage($alpha, \Imagick::COMPOSITE_COPYOPACITY, 0, 0);
            }
        } else {
            if ($filling instanceof Image) {
                $image->setCore($image->getCore()->textureImage($filling->getCore()));
            } elseif ($filling instanceof Color) {
                $draw = new \ImagickDraw();
                $draw->setFillColor($filling->getPixel());
                $draw->rectangle(0, 0, $image->getWidth(), $image->getHeight());
                $image->getCore()->drawImage($draw);
            }
        }

        return true;
    }
}


text:
package org.elasticsearch.action.admin.indices.refresh;

import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.support.broadcast.BroadcastResponse;

import java.util.List;

/**
 * The response of a refresh action.
 */
public class RefreshResponse extends BroadcastResponse {

    RefreshResponse() {
    }

    RefreshResponse(int totalShards, int successfulShards, int failedShards, List<ShardOperationFailedException> shardFailures) {
        super(totalShards, successfulShards, failedShards, shardFailures);
    }
}


text:
MovingCircle = function (x,y,radius){

	var pos = this.pos = new Vector2(x,y);
	var vel = this.vel = new Vector2(0,0);
	this.radius = radius;
	this.enabled = true;
	this.colour = 'white';

	// temp vector to calculate distance from circle in hitTest
	var diff = new Vector2(0,0);

	this.update = function(canvas) {

		pos.plusEq(vel);

		if(pos.x+this.radius < 0) pos.x = canvas.width+this.radius;
		else if (pos.x-this.radius > canvas.width) pos.x = -this.radius;

		if(pos.y+this.radius < 0) pos.y = canvas.height+this.radius;
		else if (pos.y-this.radius > canvas.height) pos.y = -this.radius;

	};

	this.draw = function(ctx) {

		ctx.strokeStyle = this.colour;
		ctx.beginPath();
		ctx.arc(this.pos.x,this.pos.y,this.radius, 0, Math.PI*2, true);
		ctx.stroke();

	};

	this.hitTest = function(x,y) {

		diff.copyFrom(pos);
		diff.x-=x;
		diff.y-=y;

		var distanceSquared =  (diff.x * diff.x) + (diff.y * diff.y);

		var distance = Math.sqrt(distanceSquared);

		return distance < this.radius;

		// now check built in vector function
		// then use optimised version

	};

};


text:
using UnityEngine;
using System.Collections;

enum AxisDirection
{
    x, y
}

[RequireComponent(typeof(SliderJoint2D))]
public class AxisLock : MonoBehaviour
{
    [SerializeField]
    AxisDirection lockAxis;

    void Awake()
    {
        SliderJoint2D slider = GetComponent<SliderJoint2D>();

        slider.connectedAnchor = new Vector2(transform.position.x, transform.position.y);
        slider.collideConnected = true;

        if (lockAxis == AxisDirection.x)
        {
            slider.angle = 90;
        }
        else
        {
            slider.angle = 0;
        }
    }
}


text:
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';

import { AboutComponent } from './about/about.component';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BannerComponent } from './banner/banner.component';
import { DashboardModule } from './dashboard/dashboard.module';
import { InMemoryDataService } from './in-memory-data.service';
import { HeroService } from './model/hero.service';
import { UserService } from './model/user.service';
import { SharedModule } from './shared/shared.module';
import { TwainComponent } from './twain/twain.component';
import { TwainService } from './twain/twain.service';
import { WelcomeComponent } from './welcome/welcome.component';

@NgModule({
  imports: [
    BrowserModule,
    DashboardModule,
    AppRoutingModule,
    SharedModule,
    HttpClientModule,
    HttpClientInMemoryWebApiModule.forRoot(InMemoryDataService, { dataEncapsulation: false }),
  ],
  providers: [HeroService, TwainService, UserService],
  declarations: [AppComponent, AboutComponent, BannerComponent, TwainComponent, WelcomeComponent],
  bootstrap: [AppComponent],
})
export class AppModule {}


text:
var url = "https://github.com/toggl-open-source/toggldesktop/releases/download/v",
apiUrl = "https://api.github.com/repos/toggl-open-source/toggldesktop/releases/tags/v",
releases = {},
ghReleases = {},
defaultPath = "/toggldesktop/installers",
downloadPath = "/toggldesktop/download",
releasesPath = "/assets/releases/releases.json",
osUrl = "https://toggl-open-source.github.io/toggldesktop/",
links = {
  "windows": "win",
  "windows_enterprise": "win-enterprise",
  "linux_tar.gz": "linux",
  "linux_deb64": "linux-deb64"
};

//We need a function which handles requests and send response
function load(){
  var location = window.location.pathname.replace(defaultPath, ""),
    hash = window.location.hash;
  try {
    if (location == "/") {
      fillHtml();
      if (!!hash) {
        hash = hash.replace("#", "/");
        findRedirect(hash);
      }
    } else {
      msg = "
Unknown path
Url: " + window.location.href + "
Path: " + location + "
";
      showMessage(msg);
    }
  } catch (e) {
    msg = "
Error occurred on url: " + window.location.href + "

Error message:
" + e + "
";
    showMessage(msg);
  }
}

function findRedirect(location) {
  var channel, ver, ok, msg;
  if (location.match("/win/")) {
      channel = location.match(/win\/(.*)/)[1].replace("/", "");
      ver = releases["win"][channel];
      ver = ver[ver.length-1];
      redirect(url + ver.version + "/" + ver.filename[0].name);
    } else if (location.match("/linux/")) {
      channel = location.match(/linux\/(.*)/)[1].replace("/");
      ver = releases["linux"][channel];
      ver = ver[ver.length-1];
      redirect(url + ver.version + "/" + ver.filename[0].name);
    } else if (location.match("/macos")) {
      channel = location.match(/macos\/(.*)/)[1].replace("/", "");
      ver = releases["osx"][channel];
      ver = ver[ver.length-1];
      redirect(url + ver.version + "/" + ver.filename[0].name);
    } else if (location.match("/win-enterprise")) {
      channel = location.match(/win-enterprise\/(.*)/)[1].replace("/", "");
      ver = releases["win"][channel];
      ver = ver[ver.length-1];
      redirect(url + ver.version + "/" + ver.filename[1].name);
    } else if (location.match("/linux-deb64")) {
      channel = location.match(/linux-deb64\/(.*)/)[1].replace("/", "");
      ver = releases["linux"][channel];
      ver = ver[ver.length-1];
      redirect(url + ver.version + "/" + ver.filename[1].name);
    } else if (location.match("/status")) {
      ok = !!releases;
      if (ok) {
        console.log("OK");
        msg = "OK";
        showMessage(msg);
      } else {
        msg = "
Error: Something is wrong (releases data not loaded)
";
        showMessage(msg);
      }
    }
}

function redirect(url) {
  window.location.assign(url);
}

function fillHtml() {
  var lines = [], os, ch, cur, prev, tmp, link;
  for (var k in releases) {
    // win, linux, mac
    os = releases[k];
    for (var ka in os) {
      // dev, beta, stable
      ch = os[ka];
      if (!ch.length) {
        continue;
      }
      // 7.3.0 ...
      cur = ch[ch.length-1];
      if (!ghReleases[cur.version]) ghReleases[cur.version] = {};

      for (var kb in cur.filename) {
        prev = ch[ch.length-2];
        if (!prev || !prev.filename[kb]) {
          prev = cur;
        }
        if (!ghReleases[prev.version]) ghReleases[prev.version] = {};

        link = downloadPath + "/" + cur.filename[kb].type + "-" + ka + "/";
        ghReleases[cur.version][cur.filename[kb].name] = 1;
        ghReleases[prev.version][prev.filename[kb].name] = 1;
        tmp = "
" +
          "" + cur.filename[kb].type + "	" +
          "" + ka + "	" +
          "" + cur.version + "	" +
          "	" +
          "" + prev.version + "	" +
          "	" +
          "link
";

        lines.push(tmp);
      }
    }
  }

  document.querySelector("tbody").innerHTML = lines.join("");
  for (let version in ghReleases) {
    let files = ghReleases[version];
    let request = new XMLHttpRequest();
    request.open('GET', apiUrl + version, true);
    request.responseType = 'json';
    request.onload = onReqLoad(version, files);
    request.send();
  }
  return;
}
function onReqLoad(ver, fls){
  return function(){
    if (this.status == 200){
      let release = this.response;
      for (let file in fls) {
        let asset = release.assets.find(a => a.name == file);
        setDownloadCount(ver, file, !!asset ? asset.download_count : '-');
      }
      loadSorttable();
    }
  }
}
function setDownloadCount(ver, file, downloadCount){
  var els = document.getElementsByClassName(ver+"_"+file);
  for (var i = 0; i < els.length; i++){
    els[i].innerHTML = downloadCount;
  }
}

function showMessage(msg) {
  document.querySelector(".message").innerHTML = msg;
}

function loadSorttable() {
  let fileref = document.createElement('script');
  fileref.setAttribute("type","text/javascript");
  fileref.setAttribute("src", "sorttable.js");
  document.getElementsByTagName("head")[0].appendChild(fileref)
}

function readJSON(path) {
    var xhr = new XMLHttpRequest();
    xhr.open('GET', osUrl + path, true);
    xhr.responseType = 'blob';
    xhr.onload = function(e) {
      if (this.status == 200) {
          var file = new File([this.response], 'temp');
          var fileReader = new FileReader();
          fileReader.addEventListener('load', function(){
               releases = JSON.parse(fileReader.result);
               load();
          });
          fileReader.readAsText(file);
      } else {
        showError()
      }
    }
    xhr.send();
}

readJSON(releasesPath);


text:
package org.jamesframework.core.exceptions;

import org.jamesframework.core.problems.sol.Solution;

/**
 * Exception thrown when trying to apply an invalid modification to a solution.
 *
 * @author Herman De Beukelaer
 */
public class SolutionModificationException extends JamesRuntimeException {

    // solution that was being modified
    private final Solution solution;

    /**
     * Creates a new instance without detail message.
     *
     * @param solution solution that was being modified
     */
    public SolutionModificationException(Solution solution) {
        this.solution = solution;
    }

    /**
     * Constructs an instance with the specified detail message.
     *
     * @param msg the detail message
     * @param solution solution that was being modified
     */
    public SolutionModificationException(String msg, Solution solution) {
        super(msg);
        this.solution = solution;
    }

    /**
     * Constructs an instance with the specified cause.
     *
     * @param cause other exception that caused this exception
     * @param solution solution that was being modified
     */
    public SolutionModificationException(Throwable cause, Solution solution) {
        super(cause);
        this.solution = solution;
    }

    /**
     * Constructs an instance with the specified detail message and cause.
     *
     * @param msg the detail message
     * @param cause other exception that caused this exception
     * @param solution solution that was being modified
     */
    public SolutionModificationException(String msg, Throwable cause, Solution solution) {
        super(msg, cause);
        this.solution = solution;
    }

    /**
     * Returns the solution that was being modified when this exception occurred.
     *
     * @return solution under modification
     */
    public Solution getSolution(){
        return solution;
    }

    /**
     * Extend string representation to include solution that was being modified.
     *
     * @return string representation including modified solution
     */
    @Override
    public String toString(){
        String s = super.toString();
        return s + " -- modified solution: " + solution;
    }

}


text:
<?xml version="1.0" encoding="utf-8" ?>
<litepal>
    <dbname value="hualuo_weather" />

    <version value="1" />

    <list>
        <mapping class="com.example.hualuoweather.db.Province" />
        <mapping class="com.example.hualuoweather.db.City" />
        <mapping class="com.example.hualuoweather.db.County" />
    </list>
</litepal>


text:
#ifndef DOMXPathEvaluator_HEADER_GUARD_
#define DOMXPathEvaluator_HEADER_GUARD_

#include <xercesc/util/XercesDefs.hpp>

XERCES_CPP_NAMESPACE_BEGIN

class DOMXPathNSResolver;
class DOMXPathExpression;
class DOMNode;

/**
 * The evaluation of XPath expressions is provided by DOMXPathEvaluator.
 * In a DOM implementation which supports the XPath 3.0 feature, the DOMXPathEvaluator
 * interface will be implemented on the same object which implements the Document interface permitting
 * it to be obtained by casting or by using the DOM Level 3 getInterface method. In this case the
 * implementation obtained from the Document supports the XPath DOM module and is compatible
 * with the XPath 1.0 specification.
 * Evaluation of expressions with specialized extension functions or variables may not
 * work in all implementations and is, therefore, not portable. XPathEvaluator implementations
 * may be available from other sources that could provide specific support for specialized extension
 * functions or variables as would be defined by other specifications.
 * @since DOM Level 3
 */
class CDOM_EXPORT DOMXPathEvaluator
{

protected:
    // -----------------------------------------------------------------------
    //  Hidden constructors
    // -----------------------------------------------------------------------
    /** @name Hidden constructors */
    //@{
    DOMXPathEvaluator() {};
    //@}

private:
    // -----------------------------------------------------------------------
    // Unimplemented constructors and operators
    // -----------------------------------------------------------------------
    /** @name Unimplemented constructors and operators */
    //@{
    DOMXPathEvaluator(const DOMXPathEvaluator &);
    DOMXPathEvaluator& operator = (const  DOMXPathEvaluator&);
    //@}

public:
    // -----------------------------------------------------------------------
    //  All constructors are hidden, just the destructor is available
    // -----------------------------------------------------------------------
    /** @name Destructor */
    //@{
    /**
     * Destructor
     *
     */
    virtual ~DOMXPathEvaluator() {};
    //@}

    // -----------------------------------------------------------------------
    // Virtual DOMDocument interface
    // -----------------------------------------------------------------------
    /** @name Functions introduced in DOM Level 3 */
    //@{

    /**
     * Creates a parsed XPath expression with resolved namespaces. This is useful
     * when an expression will be reused in an application since it makes it
     * possible to compile the expression string into a more efficient internal
     * form and preresolve all namespace prefixes which occur within the expression.
     * @param expression of type XMLCh - The XPath expression string to be parsed.
     * @param resolver of type XPathNSResolver - The resolver permits
     * translation of all prefixes, including the xml namespace prefix, within the XPath expression
     * into appropriate namespace URIs. If this is specified as null, any namespace
     * prefix within the expression will result in DOMException being thrown with the
     * code NAMESPACE_ERR.
     * @return XPathExpression The compiled form of the XPath expression.
     * @exception XPathException
     * INVALID_EXPRESSION_ERR: Raised if the expression is not legal according to the
     * rules of the DOMXPathEvaluator.
     * @exception DOMException
     * NAMESPACE_ERR: Raised if the expression contains namespace prefixes which cannot
     * be resolved by the specified XPathNSResolver.
     * @since DOM Level 3
     */
    virtual const DOMXPathExpression*    createExpression(const XMLCh *expression, const DOMXPathNSResolver *resolver) = 0;

    /** Adapts any DOM node to resolve namespaces so that an XPath expression can be
     * easily evaluated relative to the context of the node where it appeared within
     * the document. This adapter works like the DOM Level 3 method lookupNamespaceURI
     * on nodes in resolving the namespaceURI from a given prefix using the current
     * information available in the node's hierarchy at the time lookupNamespaceURI
     * is called. also correctly resolving the implicit xml prefix.
     * @param nodeResolver of type DOMNode The node to be used as a context
     * for namespace resolution.
     * @return XPathNSResolver XPathNSResolver which resolves namespaces
     * with respect to the definitions in scope for a specified node.
     */
    virtual const DOMXPathNSResolver*    createNSResolver(DOMNode *nodeResolver) = 0;

    /**
     * Evaluates an XPath expression string and returns a result of the specified
     * type if possible.
     * @param expression of type XMLCh The XPath expression string to be parsed
     * and evaluated.
     * @param contextNode of type DOMNode The context is context node
     * for the evaluation
     * of this XPath expression. If the DOMXPathEvaluator was obtained by
     * casting the DOMDocument then this must be owned by the same
     * document and must be a DOMDocument, DOMElement,
     * DOMAttribute, DOMText, DOMCDATASection,
     * DOMComment, DOMProcessingInstruction, or
     * XPathNamespace node. If the context node is a DOMText or
     * a DOMCDATASection, then the context is interpreted as the whole
     * logical text node as seen by XPath, unless the node is empty in which case it
     * may not serve as the XPath context.
     * @param resolver of type XPathNSResolver The resolver permits
     * translation of all prefixes, including the xml namespace prefix, within
     * the XPath expression into appropriate namespace URIs. If this is specified
     * as null, any namespace prefix within the expression will result in
     * DOMException being thrown with the code NAMESPACE_ERR.
     * @param type of type unsigned short - If a specific type is specified, then
     * the result will be returned as the corresponding type.
     * For XPath 1.0 results, this must be one of the codes of the XPathResult
     * interface.
     * @param result of type void* - The result specifies a specific result object
     * which may be reused and returned by this method. If this is specified as
     * null or the implementation does not reuse the specified result, a new result
     * object will be constructed and returned.
     * For XPath 1.0 results, this object will be of type XPathResult.
     * @return void* The result of the evaluation of the XPath expression.
     * For XPath 1.0 results, this object will be of type XPathResult.
     * @exception XPathException
     * INVALID_EXPRESSION_ERR: Raised if the expression is not legal
     * according to the rules of the DOMXPathEvaluator
     * TYPE_ERR: Raised if the result cannot be converted to return the specified type.
     * @exception DOMException
     * NAMESPACE_ERR: Raised if the expression contains namespace prefixes
     * which cannot be resolved by the specified XPathNSResolver.
     * WRONG_DOCUMENT_ERR: The Node is from a document that is not supported
     * by this DOMXPathEvaluator.
     * NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath context
     * node or the request type is not permitted by this DOMXPathEvaluator.
     */
    virtual void* evaluate(const XMLCh *expression, DOMNode *contextNode, const DOMXPathNSResolver *resolver,
                           unsigned short type, void* result) = 0;

    //@}
};

XERCES_CPP_NAMESPACE_END

#endif


text:
module.exports = function(grunt) {

	grunt.initConfig({
		'shell': {
			'options': {
				'stdout': true,
				'stderr': true,
				'failOnError': true
			},
			'cover-html': {
				'command': 'istanbul cover --report "html" --verbose --dir "coverage" "tests/tests.js"; istanbul report --root "coverage" --format "html"'
			},
			'cover-coveralls': {
				'command': 'istanbul cover --verbose --dir "coverage" "tests/tests.js" && coveralls < coverage/lcov.info; rm -rf coverage/lcov*'
			},
			'test-node': {
				'command': 'echo "Testing in Node..."; node "tests/tests.js"'
			},
			'test-node-extended': {
				'command': 'echo "Testing in Node..."; node "tests/tests.js" --extended'
			},
			'test-browser': {
				'command': 'echo "Testing in a browser..."; open "tests/index.html"'
			}
		}
	});

	grunt.loadNpmTasks('grunt-shell');

	grunt.registerTask('cover', 'shell:cover-html');
	grunt.registerTask('ci', [
		'shell:generate-test-data',
		'shell:test-node',
	]);
	grunt.registerTask('test', [
		'shell:generate-test-data',
		'ci',
		'shell:test-node-extended',
		'shell:test-browser'
	]);

	grunt.registerTask('default', [
		'shell:test-node-extended',
		'cover'
	]);

};