text:
from __future__ import unicode_literals

from django.contrib.auth import validators
from django.db import migrations, models
from django.utils import six

class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0006_require_contenttypes_0002'),
    ]

    operations = [
        migrations.AlterField(
            model_name='user',
            name='username',
            field=models.CharField(
                error_messages={'unique': 'A user with that username already exists.'},
                help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
                max_length=30,
                unique=True,
                validators=[validators.UnicodeUsernameValidator() if six.PY3 else validators.ASCIIUsernameValidator()],
                verbose_name='username',
            ),
        ),
    ]


text:
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="D:\AndroidStudioProjects\MiracleInsperation\app\src\androidTest\assets"/></dataSet></merger>

redpajama_set_name: RedPajamaGithub


text:
package gov.hhs.onc.dcdt.beans;

public interface ToolCodeIdentifier {
    public int getCode();
}


text:
using namespace std;

#define SAFE_DELETE(p) if (p) { delete p; p = NULL; }

class HolidayRequest
{
public:
     HolidayRequest(int hour) : m_iHour(hour){}
     int GetHour() { return m_iHour; }
private:
     int m_iHour;
};

// The holiday request handler interface
class Manager
{
public:
     virtual bool HandleRequest(HolidayRequest *pRequest) = 0;
};

// Project manager
class PM : public Manager
{
public:
     PM(Manager *handler) : m_pHandler(handler){}
     bool HandleRequest(HolidayRequest *pRequest)
     {
          if (pRequest->GetHour() <= 2 || m_pHandler == NULL)
          {
               cout<<"PM said:OK."<<endl;
               return true;
          }
          return m_pHandler->HandleRequest(pRequest);
     }
private:
     Manager *m_pHandler;
};

// Department manager
class DM : public Manager
{
public:
     DM(Manager *handler) : m_pHandler(handler){}
     bool HandleRequest(HolidayRequest *pRequest)
     {
          cout<<"DM said:OK."<<endl;
          return true;
     }

     // The department manager is in?
     bool IsIn()
     {
          return true;
     }
private:
     Manager *m_pHandler;
};

// Project supervisor
class PS : public Manager
{
public:
     PS(Manager *handler) : m_pHandler(handler){}
     bool HandleRequest(HolidayRequest *pRequest)
     {
          DM *pDM = dynamic_cast<DM *>(m_pHandler);
          if (pDM != NULL)
          {
               if (pDM->IsIn())
               {
                    return pDM->HandleRequest(pRequest);
               }
          }
          cout<<"PS said:OK."<<endl;
          return true;
     }
private:
     Manager *m_pHandler;
};
int main()
{
     DM *pDM = new DM(NULL);
     PS *pPS = new PS(pDM);
     PM *pPM = new PM(pPS);
     HolidayRequest *pHolidayRequest = new HolidayRequest(10);
     pPM->HandleRequest(pHolidayRequest);
     SAFE_DELETE(pHolidayRequest);

     pHolidayRequest = new HolidayRequest(2);
     pPM->HandleRequest(pHolidayRequest);

     SAFE_DELETE(pDM);
     SAFE_DELETE(pPS);
     SAFE_DELETE(pPM);
     SAFE_DELETE(pHolidayRequest);
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace CJia.CheckRegOrder.Presenters
{
    public class QueuePresenter:CJia.Presenter<Views.IQueueView>
    {
        private Models.QueueModel Model
        {
            get;
            set;
        }

        public QueuePresenter(Views.IQueueView view)
            : base(view)
        {
            this.Model = new Models.QueueModel();
        }

        protected override void OnViewSet()
        {
            this.View.OnLoadEvent += View_OnLoadEvent;
            this.View.OnCancleQueueEvent += View_CancleQueue;
            this.View.OnCancleWaitEvent += View_CancleWait;
            this.View.OnFliterClinicEvent += View_FliterClinic;
            this.View.OnAllocateClinicEvent += View_AllocateClinicEvent;
            this.View.OnFreshEvent += View_OnFreshEvent;
        }

        /// <summary>
        /// 分配诊室事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void View_AllocateClinicEvent(object sender, EventArgs e)
        {
            OnBindNotExistQueue();
            OnBindExistQueue();
        }

        /// <summary>
        /// 窗体加载时显示病人队列
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void View_OnLoadEvent(object sender, EventArgs e)
        {
            OnBindNotExistQueue();
            OnBindExistQueue();
            OnBindClinic();
        }

        /// <summary>
        /// 登记未排队病人列表
        /// </summary>
        void OnBindNotExistQueue()
        {
            DataTable dtNotExistQueue = Model.GetPatientByNotExistQueue();
            if (dtNotExistQueue.Rows.Count == 0)
            {
                dtNotExistQueue = null;
            }
            View.ExeBindNotExistQueue(dtNotExistQueue);
        }

        /// <summary>
        ///  排队病人队列
        /// </summary>
        void OnBindExistQueue()
        {
            DataTable dtExistQueue = Model.GetPatientByExistQueue();
            if (dtExistQueue.Rows.Count == 0)
            {
                dtExistQueue = null;
            }
            else
            {
                View.ExeBindExistQueue(dtExistQueue);
            }
        }

        /// <summary>
        /// radioGroup 诊室绑定
        /// </summary>
        void OnBindClinic()
        {
            DataTable dtClinicName = Model.GetClinicName();
            if (dtClinicName != null)
            {
                View.ExeBindClinicName(dtClinicName);
            }
            else
            {
                return;
            }
        }
        /// <summary>
        /// 取消排队
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void View_CancleQueue(object sender, Views.QueueArgs e)
        {
            if (Model.IsSuccessCancleQueue(e.PatientID))
            {
                OnBindExistQueue();
                OnBindNotExistQueue();
            }
            else
            {
                return;
            }
        }

        /// <summary>
        /// 取消等待
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void View_CancleWait(object sender, Views.QueueArgs e)
        {
            if (Model.IsSuccessCancleWait(e.PatientID))
            {
                OnBindNotExistQueue();
            }
            else
            {
                return;
            }
        }

        /// <summary>
        /// radioGroup 筛选诊室
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void View_FliterClinic(object sender, Views.QueueArgs e)
        {
            DataTable dtFilterClinic;
            //    radioGroup 选择"全部"
            if (e.ClinicID == 0)
            {
                dtFilterClinic = Model.GetPatientByExistQueue();
                if (dtFilterClinic.Rows.Count == 0)
                {
                    dtFilterClinic = null;
                }
            }
            else
            {
                dtFilterClinic = Model.GetPatientByFilterClinicId(e.ClinicID);
                if (dtFilterClinic.Rows.Count == 0)
                {
                    dtFilterClinic = null;
                }
            }
            View.ExeBindExistQueue(dtFilterClinic);
        }

        /// <summary>
        /// 刷新按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void View_OnFreshEvent(object sender, EventArgs e)
        {
            OnBindNotExistQueue();
            OnBindExistQueue();
            OnBindClinic();
        }
    }
}


text:
package de.jcup.egradle.eclipse.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;

import de.jcup.egradle.eclipse.api.VariableProvider;

public class VariablesProviderRegistry {

    private static final String VARIABLE_PROVIDER_ID = "de.jcup.egradle.eclipse.extension.variableprovider";
    public static VariablesProviderRegistry INSTANCE = new VariablesProviderRegistry();

    private List<VariableProvider> providers;

    public VariablesProviderRegistry() {

        List<VariableProvider> variableProviders = new ArrayList<>();

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IConfigurationElement[] config = registry.getConfigurationElementsFor(VARIABLE_PROVIDER_ID);
        try {
            for (IConfigurationElement e : config) {
                final Object o = e.createExecutableExtension("class");
                if (o instanceof VariableProvider) {
                    VariableProvider provider = (VariableProvider) o;
                    variableProviders.add(provider);
                }
            }

        } catch (CoreException ex) {
            EclipseUtil.logError("Was not able to initialize variable providers registry", ex);
        }

        providers = Collections.unmodifiableList(variableProviders);

    }

    /**
     * Returns registered providers as an immutable list
     *
     * @return unmodifiable list of providers
     */
    public List<VariableProvider> getProviders() {
        return providers;
    }
}


text:
make clean all

for PLUGIN in mdaAmbience mdaBandisto mdaBeatBox mdaCombo mdaDe-ess mdaDegrade mdaDelay mdaDetune mdaDither mdaDubDelay mdaDX10 mdaDynamics mdaEnvelope mdaEPiano mdaImage mdaJX10 mdaLeslie mdaLimiter mdaLooplex mdaLoudness  mdaMultiBand mdaOverdrive mdaPiano mdaRePsycho! mdaRezFilter mdaRingMod mdaRoundPan mdaShepard mdaSplitter mdaStereo mdaSubSynth mdaTalkBox mdaTestTone mdaThruZero mdaTracker mdaTransient mdaVocInput mdaVocoder
do
  echo Bundling $PLUGIN
  ./makebundle $PLUGIN.vst 1
done

make clean

echo All Done.


text:
module SimpleAuthenticator
  class UserRegistrationsController < ApplicationController

    def new
      @user = User.new
    end

    def create
      @user = User.new(user_registration_params)

      if @user.save
        redirect_to main_app.root_path
      else
        render :new
      end
    end

    private

    def user_registration_params
      params.require(:user).permit(:email, :password, :password_confirmation)
    end
  end
end


text:
import {
  FETCH_POINTS_REQUEST,
  FETCH_POINTS_FAILURE,
  FETCH_POINTS_SUCCESS,

  CREATE_POINTS_REQUEST,
  CREATE_POINTS_FAILURE,
  CREATE_POINTS_SUCCESS,

  UPDATE_POINTS_REQUEST,
  UPDATE_POINTS_FAILURE,
  UPDATE_POINTS_SUCCESS,

  CHANGE_EDIT_POINT,
  SET_EDIT_POINT
} from 'constants/pointsConstants'
import {
  apiFetchPoints,
  apiUpdatePoints
} from 'api/points/points'
import { parsePromiseJson, isEmpty } from 'helpers'

export const changeEditPoint = payload => ({
  type: CHANGE_EDIT_POINT,
  payload
});

export const setEditPoint = payload => ({
  type: SET_EDIT_POINT,
  payload
});

export const fetchPoints = () => dispatch => {
  dispatch({type: FETCH_POINTS_REQUEST});

  apiFetchPoints()
    .then(parsePromiseJson)
    .then(res => {
      if (!res.success) {
        return dispatch({
          type: FETCH_POINTS_FAILURE,
          payload: 'Не удалось загрузить города.'
        });
      }

      return dispatch({
        type: FETCH_POINTS_SUCCESS,
        payload: res.data
      })
    })
    .catch(err => {
      dispatch({
        type: FETCH_POINTS_FAILURE,
        payload: err.message || err
      });
    })
};

export const updatePoints = data => dispatch => {
  dispatch({type: UPDATE_POINTS_REQUEST});

  apiUpdatePoints(data)
    .then(parsePromiseJson)
    .then(res => {
      if (!res.success) {
        return dispatch({
          type: UPDATE_POINTS_FAILURE,
          payload: 'Не удалось обновить пункт(-ы) выдачи.'
        });
      }

      return dispatch({
        type: UPDATE_POINTS_SUCCESS,
        payload: res.data
      })
    })
    .catch(err => {
      dispatch({
        type: UPDATE_POINTS_FAILURE,
        payload: err.message || err
      });
    })
};


text:
<!DOCTYPE html>

  {% include head.html %}

{% include nav.html %}
    {% include header.html %}

        {{ content }}

    {% include footer.html %}
	{% include js.html %}


text:
import { CryptoProvider } from "./crypto_base";
export declare class LocalCryptoTesting implements CryptoProvider {
    ALGORITHM: string;
    INSECURE_IV: Buffer;
    encrypt(plaintext: string): Promise<string>;
    decrypt(ciphertext: string): Promise<string>;
}


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

public class CameraController : MonoBehaviour
{
    [Tooltip("Reference to the player object.")]
    public PlayerController Player;

    [Tooltip("The camera zone that defines the ultimate bounding zone for the main camera.")]
    public CameraZone MainBoundingBox;

    [Tooltip("Changing this will effect how fast we attempt to move the camera's x coord towards the desired position.")]
    public float LerpSpeedX = 0.5f;

    [Tooltip("Changing this will effect how fast we attempt to move the camera's y coord towards the desired position.")]
    public float LerpSpeedY = 0.7f;

    // We get the camera to focus ahead of the player when they are moving so that the player can see where they are going and what is ahead of them.
    // This is accomplished by "tricking" the camera to think that the player is actually ahead of there actual position.  This defines that distance.
    [Tooltip("How far ahead of the player we want our focus point.")]
    public float PlayerLeaderX = 0f;

    [Tooltip("How far we offset the y of the player if we want them lower on the screen")]
    public float PlayerOffsetY = 0f;

    [Tooltip("How fast the player needs to move before we start leading the player.")]
    public float PlayerLeaderXMinSpeed = 0.5f;

    public float PlayerWindowYFromEdge = 1.5f;
    public float PlayerWindowXFromEdge = 2.5f;

    private float _lastSafeY = 0f;

    private float _lastTargetX = 0f;

    // Use this for initialization
    void Start()
    {
        Vector3 playerPosition = Player.gameObject.transform.position;

        // Set camera position to calculated location.
        Camera.main.transform.position = playerPosition;

        playerPosition.y += PlayerOffsetY;

        _lastTargetX = playerPosition.x;
    }

    // LateUpdate is called after Update each frame
    void LateUpdate()
    {
        // Handle orthographic size smoothing (zoom)
        Camera.main.orthographicSize = Mathf.MoveTowards(Camera.main.orthographicSize, MainBoundingBox.screenHeight / 2.0f, Time.deltaTime * MainBoundingBox.screenHeightAdjustSpeed);
        Vector2 cameraSize = new Vector2(Camera.main.orthographicSize * Camera.main.aspect, Camera.main.orthographicSize);

        Vector3 cameraPosition = Camera.main.transform.position;
        Vector3 playerPosition = Player.gameObject.transform.position;

        cameraPosition.z = (Vector3.back * 10f).z;

        if (Player.currentMovementState == PlayerController.ECurrentMovementState.Grounded)
        {
            // Handle x movement
            if (Player.currentVelocity.x > PlayerLeaderXMinSpeed)
            {
                playerPosition.x += PlayerLeaderX;
                _lastTargetX = playerPosition.x;
            }
            else if (Player.currentVelocity.x < -1 * PlayerLeaderXMinSpeed)
            {
                playerPosition.x -= PlayerLeaderX;
                _lastTargetX = playerPosition.x;
            }
            else
            {
                playerPosition.x = _lastTargetX;
            }

            cameraPosition.x = Lerp(cameraPosition.x, playerPosition.x, LerpSpeedX);

            // Handle y movement
            _lastSafeY = playerPosition.y + PlayerOffsetY;

            cameraPosition.y = Lerp(cameraPosition.y, _lastSafeY, LerpSpeedY);
        }
        else
        {
            // Handle x movement
            if (Player.currentVelocity.x > PlayerLeaderXMinSpeed)
            {
                playerPosition.x += PlayerLeaderX;
                _lastTargetX = playerPosition.x;
            }
            else if (Player.currentVelocity.x < -1 * PlayerLeaderXMinSpeed)
            {
                playerPosition.x -= PlayerLeaderX;
                _lastTargetX = playerPosition.x;
            }
            else
            {
                playerPosition.x = _lastTargetX;
            }

            cameraPosition.x = Lerp(cameraPosition.x, playerPosition.x, LerpSpeedX);

            // Handle y movement
            float windowDistance = (.5f * MainBoundingBox.screenHeight - PlayerWindowYFromEdge);
            if (Mathf.Abs(cameraPosition.y - playerPosition.y) >= windowDistance)
            {
                float desiredCameraY = cameraPosition.y;
                if ((playerPosition.y - cameraPosition.y) > 0f && Player.currentVelocity.y > 0f)
                {
                    desiredCameraY = playerPosition.y - windowDistance;
                }
                else if ((playerPosition.y - cameraPosition.y) < 0f && Player.currentVelocity.y < 0f)
                {
                    desiredCameraY = playerPosition.y + windowDistance;
                }

                cameraPosition.y = desiredCameraY;
            }
        }

        // Handle Clamping
        cameraPosition.x = Mathf.Clamp(cameraPosition.x, MainBoundingBox.left + cameraSize.x, MainBoundingBox.right - cameraSize.x);
        cameraPosition.y = Mathf.Clamp(cameraPosition.y, MainBoundingBox.bottom + cameraSize.y, MainBoundingBox.top - cameraSize.y);

        // Set camera position to calculated location.
        Camera.main.transform.position = cameraPosition;
    }

    // This only works if the player is moved to respawn location BEFORE this is called.
    public void TriggerDeath()
    {
        Vector3 playerPosition = Player.gameObject.transform.position;

        playerPosition.y += PlayerOffsetY;

        // Set camera position to calculated location.
        Camera.main.transform.position = playerPosition;

        _lastTargetX = Player.transform.position.x;
    }

    private float Lerp(float a, float b, float speed)
    {
        return a + (Time.deltaTime * speed * (b - a));
    }
}


text:
namespace Cuemon.AspNetCore.Razor.TagHelpers
{
    /// <summary>
    /// Configuration options for <see cref="AppImageTagHelper"/>, <see cref="AppLinkTagHelper"/> and <see cref="AppScriptTagHelper"/>.
    /// </summary>
    public class AppTagHelperOptions : TagHelperOptions
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AppTagHelperOptions"/> class.
        /// </summary>
        /// <remarks>
        /// The following table shows the initial property values for an instance of <see cref="AppTagHelperOptions"/>.
        /// <list type="table">
        ///     <listheader>
        ///         <term>Property</term>
        ///         <description>Initial Value</description>
        ///     </listheader>
        ///     <item>
        ///         <term><see cref="TagHelperOptions.Scheme"/></term>
        ///         <description><see cref="ProtocolUriScheme.Relative"/></description>
        ///     </item>
        ///     <item>
        ///         <term><see cref="TagHelperOptions.BaseUrl"/></term>
        ///         <description><c>null</c></description>
        ///     </item>
        /// </list>
        /// </remarks>
        public AppTagHelperOptions()
        {
        }
    }
}


text:
title: Use CSS Grid Units to Change the Size of Columns and Rows
localeTitle: Use Unidades de Grade CSS para alterar o tamanho de colunas e linhas
---
## Use unidades de grade CSS para alterar o tamanho das colunas e linhas

Esse desafio exige que você defina a largura das colunas do contêiner para as especificadas na descrição do desafio.

### Sugestão

Altere a propriedade `grid-template-columns` .

### Solução

Como o desafio requer que você defina a largura para `1fr` , `100px` e `2fr` , altere a propriedade `css grid-template-columns` de `.container` para:

```css
grid-template-columns: 1fr 100px 2fr;
```

#### Mais Infomation

*   [Uma introdução à unidade CSS fr - CSS truques](https://css-tricks.com/introduction-fr-css-unit/)


text:
<?php

namespace PM\Tests\Unit\Main\Web\View;

use PM\Main\Abstracts\Unit\TestCase;

/**
 * This script defines class for php unit test case of class \PM\Main\Web\View\Json.
 *
 * @author     Martin Kovar
 * @category   Performance
 * @package    Tests
 */
class JsonTest extends TestCase {

    /**
     * App instance.
     *
     * @var \PM\Main\Web\View\Json
     */
    private $_view;

    /**
     * Init method for create instances and basic setup.
     *
     * @return void
     */
    protected function setUp() {
        parent::setUp();

        $this->_view = $this->getProvider()->get('PM\Main\Web\View\Json');
    }

    /**
     * Success test for method getData.
     *
     * @return void
     */
    public function testGetData() {
        $this->assertNull($this->_view->getData());

        $this->_view->setData(array('data'));
        $this->assertEquals(array('data'), $this->_view->getData());
    }

    /**
     * Success test for method setData.
     *
     * @return void
     */
    public function testSetData() {
        $this->assertInstanceOf('PM\Main\Web\View\Json', $this->_view->setData(array('data')));
        $this->assertEquals(array('data'), $this->_view->getData());
    }

    /**
     * Success test for method getPayload.
     *
     * @return void
     */
    public function testGetPayload() {
        $this->assertNull($this->_view->getPayload());

        $this->_view->setData(array('data'));
        $this->assertEquals(array('data'), $this->_view->getPayload());
    }

    /**
     * Success test for method setTemplate.
     *
     * @return void
     */
    public function testSetTemplate() {
        $template = $this->getProvider()->get('PM\Main\Web\Component\Template\Html');
        $this->assertInstanceOf('PM\Main\Web\View\Json', $this->_view->setTemplate($template));
    }
}


text:
package gov.hhs.fha.nhinc.policyengine.adapter.pip;

import gov.hhs.fha.nhinc.common.nhinccommonadapter.RetrievePtConsentByPtDocIdRequestType;
import gov.hhs.fha.nhinc.common.nhinccommonadapter.RetrievePtConsentByPtDocIdResponseType;
import gov.hhs.fha.nhinc.common.nhinccommonadapter.RetrievePtConsentByPtIdRequestType;
import gov.hhs.fha.nhinc.common.nhinccommonadapter.RetrievePtConsentByPtIdResponseType;
import gov.hhs.fha.nhinc.common.nhinccommonadapter.StorePtConsentRequestType;
import gov.hhs.fha.nhinc.common.nhinccommonadapter.StorePtConsentResponseType;
import javax.xml.ws.WebServiceContext;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.jmock.integration.junit4.JMock;
import org.jmock.integration.junit4.JUnit4Mockery;
import org.jmock.lib.legacy.ClassImposteriser;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;

/**
 *
 * @author Neil Webb
 */
@RunWith(JMock.class)
public class AdapterPIPServiceTest {
    Mockery context = new JUnit4Mockery() {
        {
            setImposteriser(ClassImposteriser.INSTANCE);
        }
    };
    final AdapterPIPServiceImpl mockServiceImpl = context.mock(AdapterPIPServiceImpl.class);
    final WebServiceContext mockWebServiceContext = context.mock(WebServiceContext.class);

    @Test
    public void testGetAdapterPIPServiceImpl() {
        try {
            AdapterPIPService sut = new AdapterPIPService() {
                @Override
                protected AdapterPIPServiceImpl getAdapterPIPServiceImpl() {
                    return mockServiceImpl;
                }
            };

            AdapterPIPServiceImpl serviceImpl = sut.getAdapterPIPServiceImpl();
            assertNotNull("AdapterPIPServiceImpl was null", serviceImpl);
        } catch (Throwable t) {
            System.out.println("Error running testGetAdapterPIPServiceImpl: " + t.getMessage());
            t.printStackTrace();
            fail("Error running testGetAdapterPIPServiceImpl: " + t.getMessage());
        }
    }

    @Test
    public void testGetWebServiceContext() {
        try {
            AdapterPIPService sut = new AdapterPIPService() {
                @Override
                protected WebServiceContext getWebServiceContext() {
                    return mockWebServiceContext;
                }
            };

            WebServiceContext wsContext = sut.getWebServiceContext();
            assertNotNull("WebServiceContext was null", wsContext);
        } catch (Throwable t) {
            System.out.println("Error running testGetWebServiceContext: " + t.getMessage());
            t.printStackTrace();
            fail("Error running testGetWebServiceContext: " + t.getMessage());
        }
    }

    @Test
    public void testRetrievePtConsentByPtId() {
        try {
            AdapterPIPService sut = new AdapterPIPService() {
                @Override
                protected AdapterPIPServiceImpl getAdapterPIPServiceImpl() {
                    return mockServiceImpl;
                }

                @Override
                protected WebServiceContext getWebServiceContext() {
                    return mockWebServiceContext;
                }
            };
            context.checking(new Expectations() {
                {
                    oneOf(mockServiceImpl).retrievePtConsentByPtId(
                            with(aNonNull(RetrievePtConsentByPtIdRequestType.class)),
                            with(aNonNull(WebServiceContext.class)));
                }
            });

            RetrievePtConsentByPtIdRequestType request = new RetrievePtConsentByPtIdRequestType();

            RetrievePtConsentByPtIdResponseType response = sut.retrievePtConsentByPtId(request);
            assertNotNull("RetrievePtConsentByPtIdResponseType was null", response);
        } catch (Throwable t) {
            System.out.println("Error running testRetrievePtConsentByPtId: " + t.getMessage());
            t.printStackTrace();
            fail("Error running testRetrievePtConsentByPtId: " + t.getMessage());
        }
    }

    @Test
    public void testRetrievePtConsentByPtDocId() {
        try {
            AdapterPIPService sut = new AdapterPIPService() {
                @Override
                protected AdapterPIPServiceImpl getAdapterPIPServiceImpl() {
                    return mockServiceImpl;
                }

                @Override
                protected WebServiceContext getWebServiceContext() {
                    return mockWebServiceContext;
                }
            };
            context.checking(new Expectations() {
                {
                    oneOf(mockServiceImpl).retrievePtConsentByPtDocId(
                            with(aNonNull(RetrievePtConsentByPtDocIdRequestType.class)),
                            with(aNonNull(WebServiceContext.class)));
                }
            });

            RetrievePtConsentByPtDocIdRequestType request = new RetrievePtConsentByPtDocIdRequestType();

            RetrievePtConsentByPtDocIdResponseType response = sut.retrievePtConsentByPtDocId(request);
            assertNotNull("RetrievePtConsentByPtDocIdResponseType was null", response);
        } catch (Throwable t) {
            System.out.println("Error running testRetrievePtConsentByPtDocId: " + t.getMessage());
            t.printStackTrace();
            fail("Error running testRetrievePtConsentByPtDocId: " + t.getMessage());
        }
    }

    @Test
    public void testStorePtConsent() {
        try {
            AdapterPIPService sut = new AdapterPIPService() {
                @Override
                protected AdapterPIPServiceImpl getAdapterPIPServiceImpl() {
                    return mockServiceImpl;
                }

                @Override
                protected WebServiceContext getWebServiceContext() {
                    return mockWebServiceContext;
                }
            };
            context.checking(new Expectations() {
                {
                    oneOf(mockServiceImpl).storePtConsent(with(aNonNull(StorePtConsentRequestType.class)),
                            with(aNonNull(WebServiceContext.class)));
                }
            });

            StorePtConsentRequestType request = new StorePtConsentRequestType();

            StorePtConsentResponseType response = sut.storePtConsent(request);
            assertNotNull("StorePtConsentResponseType was null", response);
        } catch (Throwable t) {
            System.out.println("Error running testStorePtConsent: " + t.getMessage());
            t.printStackTrace();
            fail("Error running testStorePtConsent: " + t.getMessage());
        }
    }

}


text:
require 'spec_helper'

describe 'sensu::handler', :type => :define do
  let(:pre_condition) do
    <<-'ENDofPUPPETcode'
    include ::sensu
    ENDofPUPPETcode
  end
  let(:title) { 'myhandler' }

  context 'default (present)' do

    let(:params) { {
      :type     => 'pipe',
      :command  => '/etc/sensu/handlers/mycommand.rb',
      :source   => 'puppet:///somewhere/mycommand.rb'
    } }
    it { should contain_file('/etc/sensu/handlers/mycommand.rb').with_source('puppet:///somewhere/mycommand.rb')}
    it { should contain_sensu_handler('myhandler').with(
      :ensure      => 'present',
      :type        => 'pipe',
      :command     => '/etc/sensu/handlers/mycommand.rb',
      :filters     => [],
      :severities  => ['ok', 'warning', 'critical', 'unknown']
    ) }
    it do
      should contain_file("/etc/sensu/conf.d/handlers/#{title}.json").with(
        :ensure => 'file',
        :owner  => 'sensu',
        :group  => 'sensu',
        :mode   => '0440'
      )
    end
  end

  context 'absent' do
    let(:facts) { { 'Class[sensu::service::server]' => true } }
    let(:params) { {
      :type => 'pipe',
      :ensure => 'absent',
      :source => 'puppet:///somewhere/mycommand.rb'
    } }
    it { should contain_sensu_handler('myhandler').with_ensure('absent') }
    it do
      should contain_file("/etc/sensu/conf.d/handlers/#{title}.json").
        with_ensure('absent')
    end
  end

  context 'install path' do
    let(:params) { {
      :install_path => '/etc',
      :source       => 'puppet:///mycommand.rb'
    } }
    it { should contain_file('/etc/mycommand.rb') }
  end

  context 'command' do
    let(:params) { {
      :command => '/somewhere/file/script.sh'
    } }

    it { should contain_sensu_handler('myhandler').with_command('/somewhere/file/script.sh') }
  end

  context 'source' do
    let(:params) { { :source => 'puppet:///sensu/handler/script.sh' } }

    it { should contain_file('/etc/sensu/handlers/script.sh').with_ensure('file')}
    it { should contain_sensu_handler('myhandler').with_command('/etc/sensu/handlers/script.sh') }
  end

  context 'source and command' do
    let(:params) { {
      :command => 'script.sh',
      :source  => 'puppet:///sensu/handler/script.sh'
    } }

    it { should contain_file('/etc/sensu/handlers/script.sh').with_ensure('file') }
    it { should contain_sensu_handler('myhandler').with_command('script.sh') }
  end

  context 'handlers' do
    let(:params) { { :type => 'set', :handlers => ['mailer', 'hipchat'] } }
    it { should contain_sensu_handler('myhandler').with(
      :ensure      => 'present',
      :type        => 'set',
      :handlers    => ['mailer', 'hipchat'],
      :severities  => ['ok', 'warning', 'critical', 'unknown']
    ) }
  end

  context 'exchange' do
    let(:params) { { :type => 'amqp', :exchange => { 'type' => 'topic' } } }

    it { should contain_sensu_handler('myhandler').with_exchange({'type' => 'topic'}) }
  end

  context 'tcp' do
    let(:params) {
      {
        :type => 'tcp',
        :socket => {
          'host' => '192.168.23.23',
          'port' => '2003'
        }
      }
    }
    it { should contain_sensu_handler('myhandler').with_socket({'host' => '192.168.23.23', 'port' => '2003'}) }
  end

  context 'transport' do
    let(:params) {
      {
        :type       => 'transport',
        :pipe       => {
          'type'    => 'topic',
          'name'    => 'events',
          'options' => {
            'passive' => 'true',
            'durable' => 'true'
          }
        }
      }
    }
    it { should contain_sensu_handler('myhandler').with_pipe({
      'type'    => 'topic',
      'name'    => 'events',
      'options' => {
        'passive' => 'true',
        'durable' => 'true'
      }
    }) }
  end

  context 'mutator' do
    let(:params) { { :mutator => 'only_check_output' } }

    it { should contain_sensu_handler('myhandler').with_mutator('only_check_output') }
  end

  context 'config' do
    let(:params) { { :command => 'mycommand.rb', :config => {'param' => 'value'} } }

    it { should contain_sensu_handler('myhandler').with_config( {'param' => 'value' } ) }
  end

  context 'subdue' do
    let(:params) {
      {
        :command => 'mycommand.rb',
        :type    => 'pipe',
        :subdue  => {
          'begin' => '09PM CEST',
          'end'   => '10PM CEST'
        }
      }
    }

    it { should raise_error(Puppet::Error, /Subdue at handler is deprecated since sensu 0.26/) }
  end

  context 'timeout' do
    let(:params) {
      {
          :command => 'mycommand.rb',
          :type    => 'pipe',
          :timeout => 10,
      }
    }

    it { should contain_sensu_handler('myhandler').with_timeout( 10 ) }
  end

  context 'handle_flapping' do
    let(:params) { { :command => 'mycommand.rb', :type => 'pipe', :handle_flapping => true } }
    it { should contain_sensu_handler('myhandler').with_handle_flapping( true ) }
  end

  context 'handle_silenced' do
    let(:params) { { :command => 'mycommand.rb', :type => 'pipe', :handle_silenced => true } }
    it { should contain_sensu_handler('myhandler').with_handle_silenced( true ) }
  end

  context 'handle_silenced set to false' do
    let(:params) { { :command => 'mycommand.rb', :type => 'pipe', :handle_silenced => false } }
    it { should contain_sensu_handler('myhandler').with_handle_silenced( false ) }
  end

  context 'handle_silenced set to default' do
    let(:params) { { :command => 'mycommand.rb', :type => 'pipe' } }
    it { should contain_sensu_handler('myhandler').with_handle_silenced( false ) }
  end

end


text:
class SetTradeRequestCurrencyNullFalse < ActiveRecord::Migration[5.0]
  def change
    change_column_null :trade_requests, :currency, false
  end
end


text:
<?php

namespace Structr\Test;

use Structr\Structr;

class PreTest extends \PHPUnit_Framework_TestCase
{
    public function testSimplePreProcessing()
    {
        $value = 1;

        $expected = 2;

        $result = Structr::ize($value)
            ->pre(function ($x) {
                return $x + 1;
            })
            ->isInteger()
            ->end()
            ->run();

        $this->assertSame($expected, $result);
    }

    public function testObjectToArray()
    {
        $value = new \stdClass;
        $value->foo = 'bar';

        $expected = array('foo' => 'bar');

        $result = Structr::ize($value)
            ->pre(function ($o) {
                return get_object_vars($o);
            })
            ->isMap()
            ->key('foo')->isString()->end()->endKey()
            ->run();
        $this->assertSame($expected, $result);
    }
}


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 io.trino.spi.predicate;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.google.common.collect.ImmutableMap;
import io.airlift.json.ObjectMapperProvider;
import io.trino.spi.block.Block;
import io.trino.spi.block.TestingBlockEncodingSerde;
import io.trino.spi.block.TestingBlockJsonSerde;
import io.trino.spi.connector.ColumnHandle;
import io.trino.spi.connector.TestingColumnHandle;
import io.trino.spi.type.TestingTypeDeserializer;
import io.trino.spi.type.TestingTypeManager;
import io.trino.spi.type.Type;
import org.testng.annotations.Test;

import java.io.IOException;
import java.util.Map;
import java.util.function.Function;

import static io.airlift.slice.Slices.utf8Slice;
import static io.trino.spi.predicate.TupleDomain.columnWiseUnion;
import static io.trino.spi.type.BigintType.BIGINT;
import static io.trino.spi.type.BooleanType.BOOLEAN;
import static io.trino.spi.type.DoubleType.DOUBLE;
import static io.trino.spi.type.VarcharType.VARCHAR;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;

public class TestTupleDomain
{
    private static final ColumnHandle A = new TestingColumnHandle("a");
    private static final ColumnHandle B = new TestingColumnHandle("b");
    private static final ColumnHandle C = new TestingColumnHandle("c");
    private static final ColumnHandle D = new TestingColumnHandle("d");
    private static final ColumnHandle E = new TestingColumnHandle("e");

    @Test
    public void testNone()
    {
        assertTrue(TupleDomain.none().isNone());
        assertEquals(TupleDomain.<ColumnHandle>none(),
                TupleDomain.withColumnDomains(ImmutableMap.of(
                        A, Domain.none(BIGINT))));
        assertEquals(TupleDomain.<ColumnHandle>none(),
                TupleDomain.withColumnDomains(ImmutableMap.of(
                        A, Domain.all(BIGINT),
                        B, Domain.none(VARCHAR))));
    }

    @Test
    public void testAll()
    {
        assertTrue(TupleDomain.all().isAll());
        assertEquals(TupleDomain.<ColumnHandle>all(),
                TupleDomain.withColumnDomains(ImmutableMap.of(
                        A, Domain.all(BIGINT))));
        assertEquals(TupleDomain.<ColumnHandle>all(),
                TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of()));
    }

    @Test
    public void testIntersection()
    {
        TupleDomain<ColumnHandle> tupleDomain1 = TupleDomain.withColumnDomains(
                ImmutableMap.<ColumnHandle, Domain>builder()
                        .put(A, Domain.all(VARCHAR))
                        .put(B, Domain.notNull(DOUBLE))
                        .put(C, Domain.singleValue(BIGINT, 1L))
                        .put(D, Domain.create(ValueSet.ofRanges(Range.greaterThanOrEqual(DOUBLE, 0.0)), true))
                        .build());

        TupleDomain<ColumnHandle> tupleDomain2 = TupleDomain.withColumnDomains(
                ImmutableMap.<ColumnHandle, Domain>builder()
                        .put(A, Domain.singleValue(VARCHAR, utf8Slice("value")))
                        .put(B, Domain.singleValue(DOUBLE, 0.0))
                        .put(C, Domain.singleValue(BIGINT, 1L))
                        .put(D, Domain.create(ValueSet.ofRanges(Range.lessThan(DOUBLE, 10.0)), false))
                        .build());

        TupleDomain<ColumnHandle> expectedTupleDomain = TupleDomain.withColumnDomains(
                ImmutableMap.<ColumnHandle, Domain>builder()
                        .put(A, Domain.singleValue(VARCHAR, utf8Slice("value")))
                        .put(B, Domain.singleValue(DOUBLE, 0.0))
                        .put(C, Domain.singleValue(BIGINT, 1L))
                        .put(D, Domain.create(ValueSet.ofRanges(Range.range(DOUBLE, 0.0, true, 10.0, false)), false))
                        .build());

        assertEquals(tupleDomain1.intersect(tupleDomain2), expectedTupleDomain);
        assertEquals(tupleDomain2.intersect(tupleDomain1), expectedTupleDomain);
    }

    @Test
    public void testNoneIntersection()
    {
        assertEquals(TupleDomain.none().intersect(TupleDomain.all()), TupleDomain.none());
        assertEquals(TupleDomain.all().intersect(TupleDomain.none()), TupleDomain.none());
        assertEquals(TupleDomain.none().intersect(TupleDomain.none()), TupleDomain.none());
        assertEquals(
                TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.onlyNull(BIGINT)))
                        .intersect(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.notNull(BIGINT)))),
                TupleDomain.<ColumnHandle>none());
    }

    @Test
    public void testMismatchedColumnIntersection()
    {
        TupleDomain<ColumnHandle> tupleDomain1 = TupleDomain.withColumnDomains(
                ImmutableMap.of(
                        A, Domain.all(DOUBLE),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))));

        TupleDomain<ColumnHandle> tupleDomain2 = TupleDomain.withColumnDomains(
                ImmutableMap.of(
                        A, Domain.create(ValueSet.ofRanges(Range.greaterThanOrEqual(DOUBLE, 0.0)), true),
                        C, Domain.singleValue(BIGINT, 1L)));

        TupleDomain<ColumnHandle> expectedTupleDomain = TupleDomain.withColumnDomains(ImmutableMap.of(
                A, Domain.create(ValueSet.ofRanges(Range.greaterThanOrEqual(DOUBLE, 0.0)), true),
                B, Domain.singleValue(VARCHAR, utf8Slice("value")),
                C, Domain.singleValue(BIGINT, 1L)));

        assertEquals(tupleDomain1.intersect(tupleDomain2), expectedTupleDomain);
    }

    @Test
    public void testColumnWiseUnion()
    {
        TupleDomain<ColumnHandle> tupleDomain1 = TupleDomain.withColumnDomains(
                ImmutableMap.<ColumnHandle, Domain>builder()
                        .put(A, Domain.all(VARCHAR))
                        .put(B, Domain.notNull(DOUBLE))
                        .put(C, Domain.onlyNull(BIGINT))
                        .put(D, Domain.singleValue(BIGINT, 1L))
                        .put(E, Domain.create(ValueSet.ofRanges(Range.greaterThanOrEqual(DOUBLE, 0.0)), true))
                        .build());

        TupleDomain<ColumnHandle> tupleDomain2 = TupleDomain.withColumnDomains(
                ImmutableMap.<ColumnHandle, Domain>builder()
                        .put(A, Domain.singleValue(VARCHAR, utf8Slice("value")))
                        .put(B, Domain.singleValue(DOUBLE, 0.0))
                        .put(C, Domain.notNull(BIGINT))
                        .put(D, Domain.singleValue(BIGINT, 1L))
                        .put(E, Domain.create(ValueSet.ofRanges(Range.lessThan(DOUBLE, 10.0)), false))
                        .build());

        TupleDomain<ColumnHandle> expectedTupleDomain = TupleDomain.withColumnDomains(
                ImmutableMap.<ColumnHandle, Domain>builder()
                        .put(A, Domain.all(VARCHAR))
                        .put(B, Domain.notNull(DOUBLE))
                        .put(C, Domain.all(BIGINT))
                        .put(D, Domain.singleValue(BIGINT, 1L))
                        .put(E, Domain.all(DOUBLE))
                        .build());

        assertEquals(columnWiseUnion(tupleDomain1, tupleDomain2), expectedTupleDomain);
    }

    @Test
    public void testNoneColumnWiseUnion()
    {
        assertEquals(columnWiseUnion(TupleDomain.none(), TupleDomain.all()), TupleDomain.all());
        assertEquals(columnWiseUnion(TupleDomain.all(), TupleDomain.none()), TupleDomain.all());
        assertEquals(columnWiseUnion(TupleDomain.none(), TupleDomain.none()), TupleDomain.none());
        assertEquals(
                columnWiseUnion(
                        TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.onlyNull(BIGINT))),
                        TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.notNull(BIGINT)))),
                TupleDomain.<ColumnHandle>all());
    }

    @Test
    public void testMismatchedColumnWiseUnion()
    {
        TupleDomain<ColumnHandle> tupleDomain1 = TupleDomain.withColumnDomains(
                ImmutableMap.of(
                        A, Domain.all(DOUBLE),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))));

        TupleDomain<ColumnHandle> tupleDomain2 = TupleDomain.withColumnDomains(
                ImmutableMap.of(
                        A, Domain.create(ValueSet.ofRanges(Range.greaterThanOrEqual(DOUBLE, 0.0)), true),
                        C, Domain.singleValue(BIGINT, 1L)));

        TupleDomain<ColumnHandle> expectedTupleDomain = TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.all(DOUBLE)));

        assertEquals(columnWiseUnion(tupleDomain1, tupleDomain2), expectedTupleDomain);
    }

    @Test
    public void testOverlaps()
    {
        assertTrue(overlaps(
                ImmutableMap.of(),
                ImmutableMap.of()));

        assertTrue(overlaps(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertFalse(overlaps(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertFalse(overlaps(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertTrue(overlaps(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertTrue(overlaps(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 1L)),
                ImmutableMap.of(B, Domain.singleValue(VARCHAR, utf8Slice("value")))));

        assertTrue(overlaps(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 1L)),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertFalse(overlaps(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 1L)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 2L))));

        assertFalse(overlaps(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L),
                        B, Domain.singleValue(BIGINT, 1L)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L),
                        B, Domain.singleValue(BIGINT, 2L))));

        assertTrue(overlaps(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L),
                        B, Domain.all(BIGINT)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L),
                        B, Domain.singleValue(BIGINT, 2L))));
    }

    @Test
    public void testContains()
    {
        assertTrue(contains(
                ImmutableMap.of(),
                ImmutableMap.of()));

        assertTrue(contains(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertTrue(contains(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertTrue(contains(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.singleValue(DOUBLE, 0.0))));

        assertFalse(contains(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of()));

        assertTrue(contains(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertFalse(contains(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertFalse(contains(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertTrue(contains(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of()));

        assertTrue(contains(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertTrue(contains(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertTrue(contains(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertFalse(contains(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of()));

        assertTrue(contains(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertFalse(contains(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertTrue(contains(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertFalse(contains(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of(B, Domain.singleValue(VARCHAR, utf8Slice("value")))));

        assertFalse(contains(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))),
                ImmutableMap.of(B, Domain.singleValue(VARCHAR, utf8Slice("value")))));

        assertTrue(contains(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))),
                ImmutableMap.of(B, Domain.none(VARCHAR))));

        assertTrue(contains(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L),
                        B, Domain.none(VARCHAR))));

        assertTrue(contains(
                ImmutableMap.of(
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value")))));

        assertTrue(contains(
                ImmutableMap.of(
                        A, Domain.all(BIGINT),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value")))));

        assertFalse(contains(
                ImmutableMap.of(
                        A, Domain.all(BIGINT),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value2")))));

        assertTrue(contains(
                ImmutableMap.of(
                        A, Domain.all(BIGINT),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value"))),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value2")),
                        C, Domain.none(VARCHAR))));

        assertFalse(contains(
                ImmutableMap.of(
                        A, Domain.all(BIGINT),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value")),
                        C, Domain.none(VARCHAR)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value2")))));

        assertTrue(contains(
                ImmutableMap.of(
                        A, Domain.all(BIGINT),
                        B, Domain.singleValue(VARCHAR, utf8Slice("value")),
                        C, Domain.none(VARCHAR)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.none(VARCHAR))));
    }

    @Test
    public void testEquals()
    {
        assertTrue(equals(
                ImmutableMap.of(),
                ImmutableMap.of()));

        assertTrue(equals(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertFalse(equals(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertFalse(equals(
                ImmutableMap.of(),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertTrue(equals(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(A, Domain.all(BIGINT))));

        assertFalse(equals(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertFalse(equals(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertTrue(equals(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(A, Domain.none(BIGINT))));

        assertFalse(equals(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertTrue(equals(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));

        assertFalse(equals(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of(B, Domain.singleValue(BIGINT, 0L))));

        assertFalse(equals(
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L)),
                ImmutableMap.of(A, Domain.singleValue(BIGINT, 1L))));

        assertTrue(equals(
                ImmutableMap.of(A, Domain.all(BIGINT)),
                ImmutableMap.of(B, Domain.all(VARCHAR))));

        assertTrue(equals(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(B, Domain.none(VARCHAR))));

        assertTrue(equals(
                ImmutableMap.of(A, Domain.none(BIGINT)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.none(VARCHAR))));

        assertFalse(equals(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.none(VARCHAR))));

        assertTrue(equals(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L),
                        C, Domain.none(DOUBLE)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.none(VARCHAR))));

        assertTrue(equals(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.all(DOUBLE)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.all(DOUBLE))));

        assertTrue(equals(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.all(VARCHAR)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        C, Domain.all(DOUBLE))));

        assertFalse(equals(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.all(VARCHAR)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 1L),
                        C, Domain.all(DOUBLE))));

        assertFalse(equals(
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        B, Domain.all(VARCHAR)),
                ImmutableMap.of(
                        A, Domain.singleValue(BIGINT, 0L),
                        C, Domain.singleValue(DOUBLE, 0.0))));
    }

    @Test
    public void testIsNone()
    {
        assertFalse(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of()).isNone());
        assertFalse(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))).isNone());
        assertTrue(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.none(BIGINT))).isNone());
        assertFalse(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.all(BIGINT))).isNone());
        assertTrue(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.all(BIGINT), B, Domain.none(BIGINT))).isNone());
    }

    @Test
    public void testIsAll()
    {
        assertTrue(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of()).isAll());
        assertFalse(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))).isAll());
        assertTrue(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.all(BIGINT))).isAll());
        assertFalse(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L), B, Domain.all(BIGINT))).isAll());
    }

    @Test
    public void testExtractFixedValues()
    {
        assertEquals(
                TupleDomain.extractFixedValues(TupleDomain.withColumnDomains(
                        ImmutableMap.<ColumnHandle, Domain>builder()
                                .put(A, Domain.all(DOUBLE))
                                .put(B, Domain.singleValue(VARCHAR, utf8Slice("value")))
                                .put(C, Domain.onlyNull(BIGINT))
                                .put(D, Domain.create(ValueSet.ofRanges(Range.equal(BIGINT, 1L)), true))
                                .build())).get(),
                ImmutableMap.of(
                        B, NullableValue.of(VARCHAR, utf8Slice("value")),
                        C, NullableValue.asNull(BIGINT)));
    }

    @Test
    public void testExtractFixedValuesFromNone()
    {
        assertFalse(TupleDomain.extractFixedValues(TupleDomain.none()).isPresent());
    }

    @Test
    public void testExtractFixedValuesFromAll()
    {
        assertEquals(TupleDomain.extractFixedValues(TupleDomain.all()).get(), ImmutableMap.of());
    }

    @Test
    public void testSingleValuesMapToDomain()
    {
        assertEquals(
                TupleDomain.fromFixedValues(
                        ImmutableMap.<ColumnHandle, NullableValue>builder()
                                .put(A, NullableValue.of(BIGINT, 1L))
                                .put(B, NullableValue.of(VARCHAR, utf8Slice("value")))
                                .put(C, NullableValue.of(DOUBLE, 0.01))
                                .put(D, NullableValue.asNull(BOOLEAN))
                                .build()),
                TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>builder()
                        .put(A, Domain.singleValue(BIGINT, 1L))
                        .put(B, Domain.singleValue(VARCHAR, utf8Slice("value")))
                        .put(C, Domain.singleValue(DOUBLE, 0.01))
                        .put(D, Domain.onlyNull(BOOLEAN))
                        .build()));
    }

    @Test
    public void testEmptySingleValuesMapToDomain()
    {
        assertEquals(TupleDomain.fromFixedValues(ImmutableMap.of()), TupleDomain.all());
    }

    @Test
    public void testJsonSerialization()
            throws Exception
    {
        TestingTypeManager typeManager = new TestingTypeManager();
        TestingBlockEncodingSerde blockEncodingSerde = new TestingBlockEncodingSerde();

        ObjectMapper mapper = new ObjectMapperProvider().get()
                .registerModule(new SimpleModule()
                        .addDeserializer(ColumnHandle.class, new JsonDeserializer<>()
                        {
                            @Override
                            public ColumnHandle deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
                                    throws IOException
                            {
                                return new ObjectMapperProvider().get().readValue(jsonParser, TestingColumnHandle.class);
                            }
                        })
                        .addDeserializer(Type.class, new TestingTypeDeserializer(typeManager))
                        .addSerializer(Block.class, new TestingBlockJsonSerde.Serializer(blockEncodingSerde))
                        .addDeserializer(Block.class, new TestingBlockJsonSerde.Deserializer(blockEncodingSerde)));

        TupleDomain<ColumnHandle> tupleDomain = TupleDomain.all();
        assertEquals(tupleDomain, mapper.readValue(mapper.writeValueAsString(tupleDomain), new TypeReference<TupleDomain<ColumnHandle>>() {}));

        tupleDomain = TupleDomain.none();
        assertEquals(tupleDomain, mapper.readValue(mapper.writeValueAsString(tupleDomain), new TypeReference<TupleDomain<ColumnHandle>>() {}));

        tupleDomain = TupleDomain.fromFixedValues(ImmutableMap.of(A, NullableValue.of(BIGINT, 1L), B, NullableValue.asNull(VARCHAR)));
        assertEquals(tupleDomain, mapper.readValue(mapper.writeValueAsString(tupleDomain), new TypeReference<TupleDomain<ColumnHandle>>() {}));
    }

    @Test
    public void testTransformKeys()
    {
        Map<Integer, Domain> domains = ImmutableMap.<Integer, Domain>builder()
                .put(1, Domain.singleValue(BIGINT, 1L))
                .put(2, Domain.singleValue(BIGINT, 2L))
                .put(3, Domain.singleValue(BIGINT, 3L))
                .build();

        TupleDomain<Integer> domain = TupleDomain.withColumnDomains(domains);
        TupleDomain<String> transformed = domain.transformKeys(Object::toString);

        Map<String, Domain> expected = ImmutableMap.<String, Domain>builder()
                .put("1", Domain.singleValue(BIGINT, 1L))
                .put("2", Domain.singleValue(BIGINT, 2L))
                .put("3", Domain.singleValue(BIGINT, 3L))
                .build();

        assertEquals(transformed.getDomains().get(), expected);
    }

    @Test
    public void testTransformKeysFailsWithNonUniqueMapping()
    {
        Map<Integer, Domain> domains = ImmutableMap.<Integer, Domain>builder()
                .put(1, Domain.singleValue(BIGINT, 1L))
                .put(2, Domain.singleValue(BIGINT, 2L))
                .put(3, Domain.singleValue(BIGINT, 3L))
                .build();

        TupleDomain<Integer> domain = TupleDomain.withColumnDomains(domains);

        assertThatThrownBy(() -> domain.transformKeys(input -> "x"))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessage("Every argument must have a unique mapping. 2 maps to [ SortedRangeSet[type=bigint, ranges=1, {[2]}] ] and [ SortedRangeSet[type=bigint, ranges=1, {[1]}] ]");
    }

    /**
     * Ensure {@link TupleDomain#transformKeys(Function)} fails when the function returns {@code null}.
     * {@code null}-friendliness could be a source of potential bugs. For example code like
     * <pre>{@code
     * TupleDomain<Symbol> tupleDomain = ...;
     * TupleDomain<ColumnHandle> converted = tupleDomain.transform(tableScan.getAssignments()::get);
     * }</pre>
     * would silently drops information about correlated symbols.
     */
    @Test
    public void testTransformKeysRejectsNull()
    {
        Map<Integer, Domain> domains = ImmutableMap.<Integer, Domain>builder()
                .put(1, Domain.singleValue(BIGINT, 1L))
                .put(2, Domain.singleValue(BIGINT, 2L))
                .put(3, Domain.singleValue(BIGINT, 3L))
                .build();

        TupleDomain<Integer> domain = TupleDomain.withColumnDomains(domains);

        assertThatThrownBy(() -> domain.transformKeys(input -> input == 2 ? null : input))
                .isInstanceOf(NullPointerException.class)
                .hasMessageMatching("mapping function \\S+ returned null for 2");
    }

    private boolean overlaps(Map<ColumnHandle, Domain> domains1, Map<ColumnHandle, Domain> domains2)
    {
        TupleDomain<ColumnHandle> tupleDomain1 = TupleDomain.withColumnDomains(domains1);
        TupleDomain<ColumnHandle> tupleDomain2 = TupleDomain.withColumnDomains(domains2);
        return tupleDomain1.overlaps(tupleDomain2);
    }

    private boolean contains(Map<ColumnHandle, Domain> superSet, Map<ColumnHandle, Domain> subSet)
    {
        TupleDomain<ColumnHandle> superSetTupleDomain = TupleDomain.withColumnDomains(superSet);
        TupleDomain<ColumnHandle> subSetTupleDomain = TupleDomain.withColumnDomains(subSet);
        return superSetTupleDomain.contains(subSetTupleDomain);
    }

    private boolean equals(Map<ColumnHandle, Domain> domains1, Map<ColumnHandle, Domain> domains2)
    {
        TupleDomain<ColumnHandle> tupleDomain1 = TupleDomain.withColumnDomains(domains1);
        TupleDomain<ColumnHandle> tupleDOmain2 = TupleDomain.withColumnDomains(domains2);
        return tupleDomain1.equals(tupleDOmain2);
    }
}


text:
.class public interface abstract Lcom/upsight/android/analytics/internal/session/Clock;
.super Ljava/lang/Object;
.source "Clock.java"

# virtual methods
.method public abstract currentTimeMillis()J
.end method

.method public abstract currentTimeSeconds()J
.end method


text:
/*
 * Changes for GemFireXD distributed data platform (some marked by "GemStone changes")
 *
 * Portions Copyright (c) 2010-2015 Pivotal Software, Inc. All rights reserved.
 *
 * 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. See accompanying
 * LICENSE file.
 */

package com.pivotal.gemfirexd.internal.iapi.sql.compile;

/**
 * The purpose of this interface is to hold the constant definitions
 * of the different node type identifiers, for use with NodeFactory.
 * The reason this class exists is that it is not shipped with the
 * product, so it saves footprint to have all these constant definitions
 * here instead of in NodeFactory.
 */
public interface C_NodeTypes
{
	/** Node types, for use with getNode methods */
	static final int TEST_CONSTRAINT_NODE = 1;
	static final int CURRENT_ROW_LOCATION_NODE = 2;
	static final int GROUP_BY_LIST = 3;
    static final int CURRENT_ISOLATION_NODE = 4;
	static final int IDENTITY_VAL_NODE = 5;
	static final int CURRENT_SCHEMA_NODE = 6;
	static final int ORDER_BY_LIST = 7;
	static final int PREDICATE_LIST = 8;
	static final int RESULT_COLUMN_LIST = 9;
	// 10 available
	static final int SUBQUERY_LIST = 11;
	static final int TABLE_ELEMENT_LIST = 12;
	static final int UNTYPED_NULL_CONSTANT_NODE = 13;
	static final int TABLE_ELEMENT_NODE = 14;
	static final int VALUE_NODE_LIST = 15;
	static final int ALL_RESULT_COLUMN = 16;
	// 17 is available
	static final int GET_CURRENT_CONNECTION_NODE = 18;
	static final int NOP_STATEMENT_NODE = 19;
	static final int DB2_LENGTH_OPERATOR_NODE = 20;
	static final int SET_TRANSACTION_ISOLATION_NODE = 21;
	// 22 is available
	static final int CHAR_LENGTH_OPERATOR_NODE = 23;
	static final int IS_NOT_NULL_NODE = 24;
	static final int IS_NULL_NODE = 25;
	static final int NOT_NODE = 26;
	// 27 is available
	static final int SQL_TO_JAVA_VALUE_NODE = 28;
	static final int UNARY_MINUS_OPERATOR_NODE = 29;
	static final int UNARY_PLUS_OPERATOR_NODE = 30;
	static final int SQL_BOOLEAN_CONSTANT_NODE = 31;
	static final int UNARY_DATE_TIMESTAMP_OPERATOR_NODE = 32;
	static final int TIMESTAMP_OPERATOR_NODE = 33;
	static final int TABLE_NAME = 34;
	static final int GROUP_BY_COLUMN = 35;
	static final int JAVA_TO_SQL_VALUE_NODE = 36;
	static final int FROM_LIST = 37;
	static final int BOOLEAN_CONSTANT_NODE = 38;
	static final int AND_NODE = 39;
	static final int BINARY_DIVIDE_OPERATOR_NODE = 40;
	static final int BINARY_EQUALS_OPERATOR_NODE = 41;
	static final int BINARY_GREATER_EQUALS_OPERATOR_NODE = 42;
	static final int BINARY_GREATER_THAN_OPERATOR_NODE = 43;
	static final int BINARY_LESS_EQUALS_OPERATOR_NODE = 44;
	static final int BINARY_LESS_THAN_OPERATOR_NODE = 45;
	static final int BINARY_MINUS_OPERATOR_NODE = 46;
	static final int BINARY_NOT_EQUALS_OPERATOR_NODE = 47;
	static final int BINARY_PLUS_OPERATOR_NODE = 48;
	static final int BINARY_TIMES_OPERATOR_NODE = 49;
	static final int CONCATENATION_OPERATOR_NODE = 50;
	static final int LIKE_OPERATOR_NODE = 51;
	static final int OR_NODE = 52;
	static final int BETWEEN_OPERATOR_NODE = 53;
	static final int CONDITIONAL_NODE = 54;
	static final int IN_LIST_OPERATOR_NODE = 55;
	static final int NOT_BETWEEN_OPERATOR_NODE = 56;
	static final int NOT_IN_LIST_OPERATOR_NODE = 57;
	static final int BIT_CONSTANT_NODE = 58;
	static final int VARBIT_CONSTANT_NODE = 59;
	static final int CAST_NODE = 60;
	static final int CHAR_CONSTANT_NODE = 61;
	static final int COLUMN_REFERENCE = 62;
	static final int DROP_INDEX_NODE = 63;
	// 64 available;
	static final int DROP_TRIGGER_NODE = 65;
	// 66 available;
	static final int DECIMAL_CONSTANT_NODE = 67;
	static final int DOUBLE_CONSTANT_NODE = 68;
	static final int FLOAT_CONSTANT_NODE = 69;
	static final int INT_CONSTANT_NODE = 70;
	static final int LONGINT_CONSTANT_NODE = 71;
	static final int LONGVARBIT_CONSTANT_NODE = 72;
	static final int LONGVARCHAR_CONSTANT_NODE = 73;
	static final int SMALLINT_CONSTANT_NODE = 74;
	static final int TINYINT_CONSTANT_NODE = 75;
	static final int USERTYPE_CONSTANT_NODE = 76;
	static final int VARCHAR_CONSTANT_NODE = 77;
	static final int PREDICATE = 78;

//GemStone changes BEGIN
        /* originally // 79 available */
	static final int PARAMETERIZED_CONSTANT_NODE = 79;
//GemStone changes END

	static final int RESULT_COLUMN = 80;
	static final int SET_SCHEMA_NODE = 81;
	static final int UPDATE_COLUMN = 82;
	static final int SIMPLE_STRING_OPERATOR_NODE = 83;
	static final int STATIC_CLASS_FIELD_REFERENCE_NODE = 84;
	static final int STATIC_METHOD_CALL_NODE = 85;
	static final int REVOKE_NODE = 86;
	static final int EXTRACT_OPERATOR_NODE = 87;
	static final int PARAMETER_NODE = 88;
	static final int GRANT_NODE = 89;
	static final int DROP_SCHEMA_NODE = 90;
	static final int DROP_TABLE_NODE = 91;
	static final int DROP_VIEW_NODE = 92;
	static final int SUBQUERY_NODE = 93;
	static final int BASE_COLUMN_NODE = 94;
	static final int CALL_STATEMENT_NODE = 95;
	static final int MODIFY_COLUMN_DEFAULT_NODE = 97;
	static final int NON_STATIC_METHOD_CALL_NODE = 98;
	static final int CURRENT_OF_NODE = 99;
	static final int DEFAULT_NODE = 100;
	static final int DELETE_NODE = 101;
	static final int UPDATE_NODE = 102;
	static final int PRIVILEGE_NODE = 103;
	static final int ORDER_BY_COLUMN = 104;
	static final int ROW_RESULT_SET_NODE = 105;
	static final int TABLE_PRIVILEGES_NODE = 106;
	static final int VIRTUAL_COLUMN_NODE = 107;
	static final int CURRENT_DATETIME_OPERATOR_NODE = 108;
	static final int CURRENT_USER_NODE = 109; // special function CURRENT_USER
	static final int USER_NODE = 110; // // special function USER
	static final int IS_NODE = 111;
	static final int LOCK_TABLE_NODE = 112;
	static final int DROP_COLUMN_NODE = 113;
	static final int ALTER_TABLE_NODE = 114;
	static final int AGGREGATE_NODE = 115;
	static final int COLUMN_DEFINITION_NODE = 116;
//GemStone changes BEGIN
        /*originally // 117 is available */
	static final int DISTRIBUTION_DEFINTION_NODE=117;
//GemStone changes END
	static final int EXEC_SPS_NODE = 118;
	static final int FK_CONSTRAINT_DEFINITION_NODE = 119;
	static final int FROM_VTI = 120;
	static final int MATERIALIZE_RESULT_SET_NODE = 121;
	static final int NORMALIZE_RESULT_SET_NODE = 122;
	static final int SCROLL_INSENSITIVE_RESULT_SET_NODE = 123;
	static final int DISTINCT_NODE = 124;
	static final int SESSION_USER_NODE = 125; // // special function SESSION_USER
	static final int SYSTEM_USER_NODE = 126; // // special function SYSTEM_USER
	static final int TRIM_OPERATOR_NODE = 127;
//GemStone changes BEGIN
	/*originally 128 is available */
	static final int EXPLAIN_NODE = 128;
//GemStone changes BEGIN
	static final int SELECT_NODE = 129;
	static final int CREATE_VIEW_NODE = 130;
	static final int CONSTRAINT_DEFINITION_NODE = 131;
	// 132 available;
	static final int NEW_INVOCATION_NODE = 133;
	static final int CREATE_SCHEMA_NODE = 134;
	static final int FROM_BASE_TABLE = 135;
	static final int FROM_SUBQUERY = 136;
	static final int GROUP_BY_NODE = 137;
	static final int INSERT_NODE = 138;
	static final int JOIN_NODE = 139;
	static final int ORDER_BY_NODE = 140;
	static final int CREATE_TABLE_NODE = 141;
	static final int UNION_NODE = 142;
	static final int CREATE_TRIGGER_NODE = 143;
	static final int HALF_OUTER_JOIN_NODE = 144;
	static final int NCJ_PULL_NODE = 145;
	static final int CREATE_INDEX_NODE = 146;
	static final int CURSOR_NODE = 147;
	static final int HASH_TABLE_NODE = 148;
	static final int INDEX_TO_BASE_ROW_NODE = 149;
	static final int CREATE_ALIAS_NODE = 150;
	static final int PROJECT_RESTRICT_NODE = 151;
// GemStone changes BEGIN
	static final int DISTRIBUTED_PROCEDURE_CALL_NODE = 152;
	static final int PROCEDURE_PROCESSOR_NODE = 153;
// GemStone changes END
	// UNUSED static final int BOOLEAN_TRUE_NODE = 152;
	// UNUSED static final int BOOLEAN_FALSE_NODE = 153;
	static final int SUBSTRING_OPERATOR_NODE = 154;
	// UNUSED static final int BOOLEAN_NODE = 155;
	static final int DROP_ALIAS_NODE = 156;
    static final int INTERSECT_OR_EXCEPT_NODE = 157;
 // GemStone changes BEGIN
    static final int OR_LIST_NODE = 158;
    // 159 - 183 available
    /* (original code)
	// 158 - 183 available
    */
// GemStone changes END
    static final int TIMESTAMP_ADD_FN_NODE = 184;
    static final int TIMESTAMP_DIFF_FN_NODE = 185;
	static final int MODIFY_COLUMN_TYPE_NODE = 186;
	static final int MODIFY_COLUMN_CONSTRAINT_NODE = 187;
    static final int ABSOLUTE_OPERATOR_NODE = 188;
    static final int SQRT_OPERATOR_NODE = 189;
    static final int LOCATE_FUNCTION_NODE = 190;
  //for rename table/column/index
	static final int RENAME_NODE = 191;

	static final int COALESCE_FUNCTION_NODE = 192;

	static final int MODIFY_COLUMN_CONSTRAINT_NOT_NULL_NODE = 193;

	static final int MOD_OPERATOR_NODE = 194;
    // LOB
    static final int BLOB_CONSTANT_NODE = 195;
    static final int CLOB_CONSTANT_NODE = 196;
    //static final int NCLOB_CONSTANT_NODE = 197;
    // for SAVEPOINT sql
    static final int SAVEPOINT_NODE = 198;

    // XML
    static final int XML_CONSTANT_NODE = 199;
    static final int XML_PARSE_OPERATOR_NODE = 200;
    static final int XML_SERIALIZE_OPERATOR_NODE = 201;
    static final int XML_EXISTS_OPERATOR_NODE = 202;
    static final int XML_QUERY_OPERATOR_NODE = 203;

    static final int JSON_CONSTANT_NODE = 204;

    // Roles
    static final int CURRENT_ROLE_NODE = 210;
    static final int CREATE_ROLE_NODE = 211;
    static final int SET_ROLE_NODE = 212;
    static final int SET_ROLE_DYNAMIC = 213;
    static final int DROP_ROLE_NODE = 214;
    static final int GRANT_ROLE_NODE = 215;
    static final int REVOKE_ROLE_NODE = 216;

    // OLAP Window functions
    static final int WINDOW_NODE = 220;
    static final int ROW_NUMBER_COLUMN_NODE = 221;
// GemStone changes BEGIN
    static final int CREATE_DISK_STORE_NODE= 222;
    static final int DROP_DISK_STORE_NODE= 223;
    static final int CREATE_GATEWAY_SENDER_NODE= 224;
    static final int CREATE_ASYNC_EVENT_LISTENER_NODE= 225;
    static final int CREATE_GATEWAY_RECEIVER_NODE= 226;
    static final int DROP_GATEWAY_SENDER_NODE= 227;
    static final int DROP_ASYNC_EVENT_LISTENER_NODE= 228;
    static final int DROP_GATEWAY_RECEIVER_NODE= 229;
    static final int CREATE_HDFS_STORE_NODE= 231;
    static final int DROP_HDFS_STORE_NODE= 232;
    static final int ALTER_HDFS_STORE_NODE= 233;
// GemStone changes END
	// OFFSET, FETCH FIRST node
	static final int ROW_COUNT_NODE = 230;

	// Final value in set, keep up to date!
    //static final int FINAL_VALUE =  ROW_COUNT_NODE;
    static final int FINAL_VALUE = ALTER_HDFS_STORE_NODE;

    /**
     * Extensions to this interface can use nodetypes > MAX_NODE_TYPE with out fear of collision
     * with C_NodeTypes
     */
    static final int MAX_NODE_TYPE = 999;
}


text:
#ifndef INCLUDES_TARANTOOL_LUA_CRYPTO_H
#define INCLUDES_TARANTOOL_LUA_CRYPTO_H

#include <openssl/evp.h>

#if defined(__cplusplus)
extern "C" {
#endif

int tnt_EVP_CIPHER_key_length(const EVP_CIPHER *cipher);
int tnt_EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);

#if defined(__cplusplus)
}
#endif

#endif /* INCLUDES_TARANTOOL_LUA_CRYPTO_H */


text:
#ifndef ALINOUS_BTREEMEMORY_MBTREEMAXLEAFCONTAINER_H_
#define ALINOUS_BTREEMEMORY_MBTREEMAXLEAFCONTAINER_H_
namespace alinous{namespace annotation{
class OneSource;
}}
namespace alinous {namespace btree {
class IBTreeNode;}}

namespace alinous {namespace btree {
class IBTreeKey;}}

namespace alinous {namespace btree {
class BTreeException;}}

namespace java {namespace lang {
class StringBuffer;}}

namespace alinous {namespace btree {
class IBTreeValue;}}

namespace alinous {namespace buffer {namespace storage {
class FileStorage;}}}

namespace alinous {namespace btreememory {
class AbstractMemoryBTreeLeafContainer;}}

namespace java {namespace io {
class IOException;}}

namespace alinous {namespace runtime {namespace dom {
class VariableException;}}}

namespace alinous {namespace system {
class AlinousException;}}

namespace alinous {namespace util {
class Builtin;}}

namespace alinous {
class ThreadContext;
}

namespace alinous {namespace btreememory {

using namespace ::alinous;
using namespace ::java::lang;
using ::java::util::Iterator;
using ::java::io::IOException;
using ::java::util::ArrayList;
using ::alinous::btree::BTreeException;
using ::alinous::btree::IBTreeKey;
using ::alinous::btree::IBTreeNode;
using ::alinous::btree::IBTreeValue;
using ::alinous::buffer::storage::FileStorage;
using ::alinous::runtime::dom::VariableException;
using ::alinous::system::AlinousException;
using ::alinous::util::Builtin;

class MBTreeMaxLeafContainer final : public AbstractMemoryBTreeLeafContainer {
public:
	MBTreeMaxLeafContainer(const MBTreeMaxLeafContainer& base) = default;
public:
	MBTreeMaxLeafContainer(int numNodes, IArrayObject<IBTreeNode>* nodes, ThreadContext* ctx) throw() ;
	void __construct_impl(int numNodes, IArrayObject<IBTreeNode>* nodes, ThreadContext* ctx) throw() ;
	virtual ~MBTreeMaxLeafContainer() throw();
	virtual void __releaseRegerences(bool prepare, ThreadContext* ctx) throw();
public:
	IBTreeKey* getKey(ThreadContext* ctx) throw()  final;
	void addNode(IBTreeNode* newNode, ThreadContext* ctx) final;
	char getNodeType(ThreadContext* ctx) throw()  final;
	bool removeChild(IBTreeKey* key, ThreadContext* ctx) final;
	IBTreeNode* removeNode(IBTreeKey* key, ThreadContext* ctx);
	int indexOf(IBTreeKey* value, ThreadContext* ctx) throw() ;
	void removeNode(int index, int count, ThreadContext* ctx) final;
	void printNode(StringBuffer* buff, int level, ThreadContext* ctx) final;
	bool isEmpty(ThreadContext* ctx) throw()  final;
	void setKey(IBTreeKey* key, ThreadContext* ctx) final;
	bool hasMaxNode(ThreadContext* ctx) throw()  final;
	void loadChildren(ThreadContext* ctx) final;
	ArrayList<IBTreeValue>* getValues(ThreadContext* ctx) throw()  final;
	void unloadChildren(ThreadContext* ctx) final;
	FileStorage* getStorage(ThreadContext* ctx) throw()  final;
	void setStorage(FileStorage* storage, ThreadContext* ctx) throw()  final;
	void save(ThreadContext* ctx) throw()  final;
public:
	static bool __init_done;
	static bool __init_static_variables();
public:
	static void __cleanUp(ThreadContext* ctx);
};

}}

#endif /* end of ALINOUS_BTREEMEMORY_MBTREEMAXLEAFCONTAINER_H_ */


text:
package org.pentaho.di.core.listeners;

/**
 * This listener will be called by the parent object when its content changes.
 *
 * @author matt
 *
 */
public interface ContentChangedListener {

  /**
   * This method will be called when the parent object to which this listener is added, has been changed.
   *
   * @param parentObject The changed object.
   */
  public void contentChanged(Object parentObject);

  /**
   * This method will be called when the parent object has been declared safe (or saved, persisted, ...)
   *
   * @param parentObject The safe object.
   */
  public void contentSafe(Object parentObject);
}


text:
EXPORT_SYMBOL_GPL(kvm_cpu_has_interrupt);
EXPORT_SYMBOL_GPL(kvm_cpu_get_interrupt);
EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs);
\n
int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
static int pending_userspace_extint(struct kvm_vcpu *v)
static int kvm_cpu_has_extint(struct kvm_vcpu *v)
int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v)
int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
static int kvm_cpu_get_extint(struct kvm_vcpu *v)
int kvm_cpu_get_interrupt(struct kvm_vcpu *v)
void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu)
void __kvm_migrate_timers(struct kvm_vcpu *vcpu)
\n
      6 struct kvm_vcpu *v
      3 struct kvm_vcpu *vcpu
      1 kvm_inject_pending_timer_irqs
      1 kvm_cpu_has_interrupt
      1 kvm_cpu_get_interrupt


text:
package info.jtrac.wicket;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.link.Link;

public class IssueTrackingReportRenderer extends BasePage {

	private WebMarkupContainer reportViewer;
	private ExternalLink reportLink;

	public IssueTrackingReportRenderer(PageParameters params) {
		addComponents();

	}

	private void addComponents() {

		reportViewer = new WebMarkupContainer("reportViewer");
		reportLink = new ExternalLink("issueTracking", "http://localhost:8081/birt/frameset?__report=report\\IssueTracking.rptdesign");

		add(reportViewer);
		add(new Link("back") {
            public void onClick() {
            	setResponsePage(new DashboardPage());
            }
        });
		add(reportLink);

	}
}


text:
namespace v8 {
namespace internal {

// The HeapNumber class describes heap allocated numbers that cannot be
// represented in a Smi (small integer). MutableHeapNumber is the same, but its
// number value can change over time (it is used only as property storage).
// HeapNumberBase merely exists to avoid code duplication.
class HeapNumberBase : public HeapObject {
 public:
  // [value]: number value.
  inline double value() const;
  inline void set_value(double value);

  inline uint64_t value_as_bits() const;
  inline void set_value_as_bits(uint64_t bits);

  inline int get_exponent();
  inline int get_sign();

  // Layout description.
  static const int kValueOffset = HeapObject::kHeaderSize;
  // IEEE doubles are two 32 bit words.  The first is just mantissa, the second
  // is a mixture of sign, exponent and mantissa. The offsets of two 32 bit
  // words within double numbers are endian dependent and they are set
  // accordingly.
#if defined(V8_TARGET_LITTLE_ENDIAN)
  static const int kMantissaOffset = kValueOffset;
  static const int kExponentOffset = kValueOffset + 4;
#elif defined(V8_TARGET_BIG_ENDIAN)
  static const int kMantissaOffset = kValueOffset + 4;
  static const int kExponentOffset = kValueOffset;
#else
#error Unknown byte ordering
#endif

  static const int kSize = kValueOffset + kDoubleSize;
  static const uint32_t kSignMask = 0x80000000u;
  static const uint32_t kExponentMask = 0x7ff00000u;
  static const uint32_t kMantissaMask = 0xfffffu;
  static const int kMantissaBits = 52;
  static const int kExponentBits = 11;
  static const int kExponentBias = 1023;
  static const int kExponentShift = 20;
  static const int kInfinityOrNanExponent =
      (kExponentMask >> kExponentShift) - kExponentBias;
  static const int kMantissaBitsInTopWord = 20;
  static const int kNonMantissaBitsInTopWord = 12;

  // Just to make the macro-generated constructor happy. Subclasses should
  // perform their own proper type checking.
  inline bool IsHeapNumberBase() const { return true; }

  OBJECT_CONSTRUCTORS(HeapNumberBase, HeapObject);
};

class HeapNumber : public HeapNumberBase {
 public:
  DECL_CAST(HeapNumber)
  V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os);

  OBJECT_CONSTRUCTORS(HeapNumber, HeapNumberBase);
};

class MutableHeapNumber : public HeapNumberBase {
 public:
  DECL_CAST(MutableHeapNumber)
  V8_EXPORT_PRIVATE void MutableHeapNumberPrint(std::ostream& os);

  OBJECT_CONSTRUCTORS(MutableHeapNumber, HeapNumberBase);
};

}  // namespace internal
}  // namespace v8

#include "src/objects/object-macros-undef.h"

#endif  // V8_OBJECTS_HEAP_NUMBER_H_


text:
name             'rehost-nagios'
maintainer       'ReHost - Nicolas Ledez'
maintainer_email 'chef-cookbook@ledez.net'
license          'Apache v2.0'
description      'Installs/Configures nagios nrpe 4 rehost infra'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version          '1.0.11'


text:
var $ = require('jquery');
var Class = require('classjs');
var Helpers = require('./cms.base').API.Helpers;
var Modal = require('./cms.modal');

/**
 * Handles copy & paste in the structureboard.
 *
 * @class Clipboard
 * @namespace CMS
 * @uses CMS.API.Helpers
 */
var Clipboard = new Class({

    implement: [Helpers],

    initialize: function () {
        this._setupUI();

        // states
        this.click = 'click.cms.clipboard';

        // setup events
        this._events();
    },

    /**
     * Caches all the jQuery element queries.
     *
     * @method _setupUI
     * @private
     */
    _setupUI: function _setupUI() {
        var clipboard = $('.cms-clipboard');

        this.ui = {
            clipboard: clipboard,
            triggers: $('.cms-clipboard-trigger a'),
            triggerRemove: $('.cms-clipboard-empty a'),
            pluginsList: clipboard.find('.cms-clipboard-containers'),
            document: $(document)
        };
    },

    /**
     * Sets up event handlers for clipboard ui.
     *
     * @method _events
     * @private
     */
    _events: function () {
        var that = this;

        var MIN_WIDTH = 400;
        // FIXME kind of a magic number for 1 item in clipboard
        var MIN_HEIGHT = 117;

        that.modal = new Modal({
            minWidth: MIN_WIDTH,
            minHeight: MIN_HEIGHT,
            minimizable: false,
            maximizable: false,
            resizable: false,
            closeOnEsc: false
        });

        that.modal.on('cms.modal.loaded cms.modal.closed', function removePlaceholder() {
            // cannot be cached
            $('.cms-add-plugin-placeholder').remove();
        }).on('cms.modal.closed cms.modal.load', function () {
            that.ui.pluginsList.prependTo(that.ui.clipboard);
        }).ui.modal.on('cms.modal.load', function () {
            that.ui.pluginsList.prependTo(that.ui.clipboard);
        });

        that.ui.triggers.on(that.click, function (e) {
            e.preventDefault();
            e.stopPropagation();
            if ($(this).parent().hasClass('cms-toolbar-item-navigation-disabled')) {
                return false;
            }

            that.modal.open({
                html: that.ui.pluginsList,
                title: that.ui.clipboard.data('title'),
                width: MIN_WIDTH,
                height: MIN_HEIGHT
            });
            that.ui.document.trigger('click.cms.toolbar');
        });

        // add remove event
        that.ui.triggerRemove.on(that.click, function (e) {
            e.preventDefault();
            e.stopPropagation();
            if ($(this).parent().hasClass('cms-toolbar-item-navigation-disabled')) {
                return false;
            }
            that.clear(function () {
                // remove element on success
                if (that._isClipboardModalOpen()) {
                    that.modal.close();
                }

                that.ui.triggers.parent().addClass('cms-toolbar-item-navigation-disabled');
                that.ui.triggerRemove.parent().addClass('cms-toolbar-item-navigation-disabled');
                that.ui.document.trigger('click.cms.toolbar');
            });
        });
    },

    /**
     * @method _isClipboardModalOpen
     * @private
     * @returns {Boolean}
     */
    _isClipboardModalOpen: function _isClipboardModalOpen() {
        return !!this.modal.ui.modalBody.find('.cms-clipboard-containers').length;
    },

    /**
     * Clears the clipboard by quering the server.
     * Callback is optional, but if provided - it's called
     * no matter what outcome was of the ajax call.
     *
     * @method clear
     * @param {Function} [callback]
     */
    clear: function (callback) {
        // post needs to be a string, it will be converted using JSON.parse
        var post = '{ "csrfmiddlewaretoken": "' + CMS.config.csrf + '" }';
        var pasteItems = $('.cms-submenu-item [data-rel=paste]').parent()
            .addClass('cms-submenu-item-disabled');

        pasteItems.find('.cms-submenu-item-paste-tooltip').css('display', 'none');
        pasteItems.find('.cms-submenu-item-paste-tooltip-empty').css('display', 'block');

        // redirect to ajax
        CMS.API.Toolbar.openAjax({
            url: CMS.config.clipboard.url,
            post: post,
            callback: callback
        });
    }

});

module.exports = Clipboard;


text:
module Refinery
  module Redactor
    VERSION = "0.0.2"
  end
end


text:
class CreateBookStatuses < ActiveRecord::Migration
  def change
    create_table :book_statuses do |t|
      t.string :status_code
      t.timestamps null: false
    end
  end
end