text:
<?php
session_start ();
spl_autoload_register ( function ($class) {
	include 'classes/' . $class . '.php';
} );
$realm = new FamilyRealm ();
$currentUser = new MiradouAuth ( $realm );
$my = new Family ( $currentUser );
$myideas = new GiftIdeas ( $currentUser );
$members = $realm->getMembers ();
if (isset ( $_SESSION ['miUser'] )) {
	$giftUser = unserialize ( $_SESSION ['miUser'] );
	$giftUserFirstname = $giftUser->firstname;
} else {
	$giftUser = "";
	$giftUserFirstname = "";
}
?>

<?php
if (! isset ( $_SERVER ['HTTP_REFERER'] )) {
	?>

<?php
}
?>

<button id="giftLeft" class="jcarousel-control-prev">‹</button>

<?php
$idx = 0;
foreach ( $members as $member ) {
	$idx ++;
	$myideas = new GiftIdeas ( $member );
	?>
<li class="nameList" id="giftList<?=$idx?>"><?=$member->firstname?>

<?php   foreach( $myideas->getIdeas() as $idea ){ ?>

<?=$idea?>
  <?php
		if ($giftUserFirstname == $member->firstname) {
			?>
<button class="delidea">supprimer cette idée</button>
<?php } ?>

<?php
	}
	?>
<?php

	if ($giftUserFirstname == $member->firstname) {
		?>

<textarea id=newgiftidea class="ui-widget"
						placeholder="Nouvelle idée ?"></textarea>
					<button id="addidea">Ajouter cette idée</button>

<?php }?>

<?php
}
?>

<button id="giftRight"
		class="jcarousel-control-next">›</button>


text:
#include <aws/opsworks/model/DescribeElasticLoadBalancersResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::OpsWorks::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

DescribeElasticLoadBalancersResult::DescribeElasticLoadBalancersResult()
{
}

DescribeElasticLoadBalancersResult::DescribeElasticLoadBalancersResult(const AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

DescribeElasticLoadBalancersResult& DescribeElasticLoadBalancersResult::operator =(const AmazonWebServiceResult<JsonValue>& result)
{
  const JsonValue& jsonValue = result.GetPayload();
  if(jsonValue.ValueExists("ElasticLoadBalancers"))
  {
    Array<JsonValue> elasticLoadBalancersJsonList = jsonValue.GetArray("ElasticLoadBalancers");
    for(unsigned elasticLoadBalancersIndex = 0; elasticLoadBalancersIndex < elasticLoadBalancersJsonList.GetLength(); ++elasticLoadBalancersIndex)
    {
      m_elasticLoadBalancers.push_back(elasticLoadBalancersJsonList[elasticLoadBalancersIndex].AsObject());
    }
  }

  return *this;
}

redpajama_set_name: RedPajamaGithub


text:
NSString *const StripePublishableKey = nil; // TODO: replace nil with your own value

// To set this up, check out https://github.com/stripe/example-ios-backend
// This should be in the format https://my-shiny-backend.herokuapp.com
NSString *const BackendBaseURL = nil; // TODO: replace nil with your own value

// To learn how to obtain an Apple Merchant ID, head to https://stripe.com/docs/mobile/apple-pay
NSString *const AppleMerchantId = nil; // TODO: replace nil with your own value


text:
layout: page
permalink: /
title: home
description: code, culture and ambitions
---

{% include home.html %}


text:
<?php

namespace IPS\core\widgets;

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
	exit;
}

/**
 * Stats Widget
 */
class _stats extends \IPS\Widget\StaticCache
{
	/**
	 * @brief	Widget Key
	 */
	public $key = 'stats';

	/**
	 * @brief	App
	 */
	public $app = 'core';

	/**
	 * @brief	Plugin
	 */
	public $plugin = '';

	/**
	 * Specify widget configuration
	 *
	 * @return	null|\IPS\Helpers\Form
	 */
	public function configuration( &$form=null )
 	{
 		if ( $form === null )
 		{
	 		$form = new \IPS\Helpers\Form;
 		}

		$mostOnline = json_decode( \IPS\Settings::i()->most_online, TRUE );
		$form->add( new \IPS\Helpers\Form\Number( 'stats_most_online', $mostOnline['count'], TRUE ) );

		return $form;
 	}

 	/**
 	 * Ran before saving widget configuration
 	 *
 	 * @param	array	$values	Values from form
 	 * @return	array
 	 */
 	public function preConfig( $values )
 	{
 		if ( \IPS\Member::loggedIn()->isAdmin() and \IPS\Member::loggedIn()->hasAcpRestriction( 'core', 'members', 'member_recount_content' ) )
 		{
 			$mostOnline = array( 'count' => $values['stats_most_online'], 'time' => time() );
 			\IPS\Settings::i()->most_online = json_encode( $mostOnline );
			\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => json_encode( $mostOnline ) ), array( 'conf_key=?', 'most_online' ) );

			unset( $values['stats_most_online'] );
			unset( \IPS\Data\Store::i()->settings );

 			\IPS\Widget::deleteCaches( 'stats', 'core' );
 		}

 		return $values;
 	}

	/**
	 * Render a widget
	 *
	 * @return	string
	 */
	public function render()
	{
		$stats = array();
		$mostOnline = json_decode( \IPS\Settings::i()->most_online, TRUE );

		/* fetch only successful registered members ; if this needs to be changed, please review the other areas where we have the name<>? AND email<>? condition */
		$where = array( 'name<>? AND email<>?', '', '' );

		/* Member count */
		$stats['member_count'] = \IPS\Db::i()->select( 'COUNT(*)', 'core_members', $where )->first();

		/* Most online */
		$count = \IPS\Db::i()->select( 'COUNT(*)', 'core_sessions', array( 'login_type<>? and running_time > ?', \IPS\Session\Front::LOGIN_TYPE_SPIDER, \IPS\DateTime::create()->sub( new \DateInterval( 'PT30M' ) )->getTimeStamp() ) )->first();
		if( $count > $mostOnline['count'] )
		{
			$mostOnline = array( 'count' => $count, 'time' => time() );
			\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => json_encode( $mostOnline ) ), array( 'conf_key=?', 'most_online' ) );
			unset( \IPS\Data\Store::i()->settings );
		}
		$stats['most_online'] = $mostOnline;

		/* Last Registered Member */
		$exclude = array();
		$where   = array( 'name IS NOT NULL AND name != \'\' AND temp_ban != -1' );
		foreach( \IPS\Member\Group::groups() as $id => $group )
		{
			if ( $group->g_hide_online_list )
			{
				$exclude[] = $group->g_id;
			}
		}
		if ( count( $exclude ) )
		{
			$where[] = '( ! ( ' . \IPS\Db::i()->in( 'member_group_id', $exclude ) . ' ) )';
		}
		$where[] = '( ! ' . \IPS\Db::i()->bitwiseWhere( \IPS\Member::$bitOptions['members_bitoptions'], 'bw_is_spammer' ) . ' )';
		$where[] = 'core_validating.new_reg IS NULL';
		try
		{
			$stats['last_registered'] = \IPS\Member::constructFromData(
					\IPS\Db::i()->select( 'core_members.*, core_validating.new_reg', 'core_members', array( implode( ' AND ', $where ) ), 'core_members.member_id DESC', array( 0, 1 ) )->join(
							'core_validating',
							"core_validating.member_id=core_members.member_id"
						)->first() );
		}
		catch( \UnderflowException $ex )
		{
			$stats['last_registered'] = NULL;
		}

		/* Display */
		return $this->output( $stats );
	}
}


text:
"""Module containing release engineering related builders."""

from __future__ import print_function

from chromite.lib import parallel

from chromite.cbuildbot.builders import simple_builders
from chromite.cbuildbot.stages import branch_stages
from chromite.cbuildbot.stages import release_stages

class CreateBranchBuilder(simple_builders.SimpleBuilder):
  """Create release branches in the manifest."""

  def RunStages(self):
    """Runs through build process."""
    self._RunStage(branch_stages.BranchUtilStage)

class GeneratePayloadsBuilder(simple_builders.SimpleBuilder):
  """Run the PaygenStage once for each board."""

  def RunStages(self):
    """Runs through build process."""
    def _RunStageWrapper(board):
      self._RunStage(release_stages.PaygenStage, board=board,
                     channels=self._run.options.channels, archive_stage=None)

    with parallel.BackgroundTaskRunner(_RunStageWrapper) as queue:
      for board in self._run.config.boards:
        queue.put([board])


text:
<?xml version="1.0"?>
<allocations>
  <queueMaxAMShareDefault>0.8</queueMaxAMShareDefault>
</allocations>


text:
import React, { Component } from 'react';
import { shell } from 'electron';
import reactDom from 'react-dom';
import './webview.scss';

export default class Webview extends Component {
    constructor(props){
        super(props);
    }

    componentDidMount(){
        const container = reactDom.findDOMNode(this.container);
        const excludes = ['display', 'className'];
        const single = ['autosize', 'allowpopups'];
        let propStr = "";
        Object.keys(this.props).forEach(prop => {
            if (!excludes.includes(prop)){
                if(single.includes(prop)){
                    this.props[prop] && (propStr += `${prop} `);
                }else {
                    propStr += `${prop}=${JSON.stringify(this.props[prop].toString())} `;
                }
            }
        });
        if(this.props.className){
            propStr += `class=${this.props.className} `;
        }
        container.innerHTML = `<webview ${propStr}/>`
        this.webview = container.firstChild;
        this.webview.addEventListener('new-window', e => {
            if(e.url !== this.props.src){
                shell.openExternal(e.url);
            }
        })
    }

    render(){
        const containerClass = `web-view ${this.props.display? '': 'hide-view'}`;
        return<div ref={(container) => this.container = container} className={containerClass}>
        </div>
    }
}


text:
/*
 * Open Payments Cloud Application API
 * Open Payments Cloud API
 *
 * OpenAPI spec version: 1.0.0
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.ixaris.ope.applications.client.api;

import com.ixaris.ope.applications.client.ApiCallback;
import com.ixaris.ope.applications.client.ApiClient;
import com.ixaris.ope.applications.client.ApiException;
import com.ixaris.ope.applications.client.ApiResponse;
import com.ixaris.ope.applications.client.Configuration;
import com.ixaris.ope.applications.client.Pair;
import com.ixaris.ope.applications.client.ProgressRequestBody;
import com.ixaris.ope.applications.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;

import com.ixaris.ope.applications.client.model.CreateTransferConflict;
import com.ixaris.ope.applications.client.model.CreateTransferParams;
import com.ixaris.ope.applications.client.model.DefaultClientInvalidRequest;
import com.ixaris.ope.applications.client.model.DefaultErrorModel;
import com.ixaris.ope.applications.client.model.Transfer;
import com.ixaris.ope.applications.client.model.TransferFilter;
import com.ixaris.ope.applications.client.model.TransferProfile;
import com.ixaris.ope.applications.client.model.TransferProfiles;
import com.ixaris.ope.applications.client.model.TransferProfilesFilter;
import com.ixaris.ope.applications.client.model.Transfers;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TransfersApi {
    private ApiClient apiClient;

    public TransfersApi() {
        this(Configuration.getDefaultApiClient());
    }

    public TransfersApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /* Build call for transfersGet */
    private com.squareup.okhttp.Call transfersGetCall(String xProgrammeKey, String authorization, TransferFilter request, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = request;

        // create path and map variables
        String localVarPath = "/transfers/get".replaceAll("\\{format\\}","json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        if (xCallref != null)
        localVarHeaderParams.put("X-callref", apiClient.parameterToString(xCallref));
        if (xProgrammeKey != null)
        localVarHeaderParams.put("X-programmeKey", apiClient.parameterToString(xProgrammeKey));
        if (authorization != null)
        localVarHeaderParams.put("Authorization", apiClient.parameterToString(authorization));

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {  };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call transfersGetValidateBeforeCall(String xProgrammeKey, String authorization, TransferFilter request, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        // verify the required parameter 'xProgrammeKey' is set
        if (xProgrammeKey == null) {
            throw new ApiException("Missing the required parameter 'xProgrammeKey' when calling transfersGet(Async)");
        }

        // verify the required parameter 'authorization' is set
        if (authorization == null) {
            throw new ApiException("Missing the required parameter 'authorization' when calling transfersGet(Async)");
        }

        // verify the required parameter 'request' is set
        if (request == null) {
            throw new ApiException("Missing the required parameter 'request' when calling transfersGet(Async)");
        }

        com.squareup.okhttp.Call call = transfersGetCall(xProgrammeKey, authorization, request, xCallref, progressListener, progressRequestListener);
        return call;

    }

    /**
     *
     * Retrieve a list of transfer transactions which match the given criteria.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return Transfers
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public Transfers transfersGet(String xProgrammeKey, String authorization, TransferFilter request, String xCallref) throws ApiException {
        ApiResponse<Transfers> resp = transfersGetWithHttpInfo(xProgrammeKey, authorization, request, xCallref);
        return resp.getData();
    }

    /**
     *
     * Retrieve a list of transfer transactions which match the given criteria.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return ApiResponse<Transfers>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Transfers> transfersGetWithHttpInfo(String xProgrammeKey, String authorization, TransferFilter request, String xCallref) throws ApiException {
        com.squareup.okhttp.Call call = transfersGetValidateBeforeCall(xProgrammeKey, authorization, request, xCallref, null, null);
        Type localVarReturnType = new TypeToken<Transfers>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Retrieve a list of transfer transactions which match the given criteria.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call transfersGetAsync(String xProgrammeKey, String authorization, TransferFilter request, String xCallref, final ApiCallback<Transfers> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = transfersGetValidateBeforeCall(xProgrammeKey, authorization, request, xCallref, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<Transfers>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /* Build call for transfersIdCreate */
    private com.squareup.okhttp.Call transfersIdCreateCall(String xProgrammeKey, String authorization, CreateTransferParams request, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = request;

        // create path and map variables
        String localVarPath = "/transfers/_/create".replaceAll("\\{format\\}","json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        if (xCallref != null)
        localVarHeaderParams.put("X-callref", apiClient.parameterToString(xCallref));
        if (xProgrammeKey != null)
        localVarHeaderParams.put("X-programmeKey", apiClient.parameterToString(xProgrammeKey));
        if (authorization != null)
        localVarHeaderParams.put("Authorization", apiClient.parameterToString(authorization));

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {  };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call transfersIdCreateValidateBeforeCall(String xProgrammeKey, String authorization, CreateTransferParams request, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        // verify the required parameter 'xProgrammeKey' is set
        if (xProgrammeKey == null) {
            throw new ApiException("Missing the required parameter 'xProgrammeKey' when calling transfersIdCreate(Async)");
        }

        // verify the required parameter 'authorization' is set
        if (authorization == null) {
            throw new ApiException("Missing the required parameter 'authorization' when calling transfersIdCreate(Async)");
        }

        // verify the required parameter 'request' is set
        if (request == null) {
            throw new ApiException("Missing the required parameter 'request' when calling transfersIdCreate(Async)");
        }

        com.squareup.okhttp.Call call = transfersIdCreateCall(xProgrammeKey, authorization, request, xCallref, progressListener, progressRequestListener);
        return call;

    }

    /**
     *
     * Create a transfer transaction with the given ID and details.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return Transfer
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public Transfer transfersIdCreate(String xProgrammeKey, String authorization, CreateTransferParams request, String xCallref) throws ApiException {
        ApiResponse<Transfer> resp = transfersIdCreateWithHttpInfo(xProgrammeKey, authorization, request, xCallref);
        return resp.getData();
    }

    /**
     *
     * Create a transfer transaction with the given ID and details.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return ApiResponse<Transfer>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Transfer> transfersIdCreateWithHttpInfo(String xProgrammeKey, String authorization, CreateTransferParams request, String xCallref) throws ApiException {
        com.squareup.okhttp.Call call = transfersIdCreateValidateBeforeCall(xProgrammeKey, authorization, request, xCallref, null, null);
        Type localVarReturnType = new TypeToken<Transfer>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Create a transfer transaction with the given ID and details.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call transfersIdCreateAsync(String xProgrammeKey, String authorization, CreateTransferParams request, String xCallref, final ApiCallback<Transfer> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = transfersIdCreateValidateBeforeCall(xProgrammeKey, authorization, request, xCallref, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<Transfer>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /* Build call for transfersIdGet */
    private com.squareup.okhttp.Call transfersIdGetCall(Long id, String xProgrammeKey, String authorization, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/transfers/{id}/get".replaceAll("\\{format\\}","json")
        .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        if (xCallref != null)
        localVarHeaderParams.put("X-callref", apiClient.parameterToString(xCallref));
        if (xProgrammeKey != null)
        localVarHeaderParams.put("X-programmeKey", apiClient.parameterToString(xProgrammeKey));
        if (authorization != null)
        localVarHeaderParams.put("Authorization", apiClient.parameterToString(authorization));

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {  };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call transfersIdGetValidateBeforeCall(Long id, String xProgrammeKey, String authorization, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        // verify the required parameter 'id' is set
        if (id == null) {
            throw new ApiException("Missing the required parameter 'id' when calling transfersIdGet(Async)");
        }

        // verify the required parameter 'xProgrammeKey' is set
        if (xProgrammeKey == null) {
            throw new ApiException("Missing the required parameter 'xProgrammeKey' when calling transfersIdGet(Async)");
        }

        // verify the required parameter 'authorization' is set
        if (authorization == null) {
            throw new ApiException("Missing the required parameter 'authorization' when calling transfersIdGet(Async)");
        }

        com.squareup.okhttp.Call call = transfersIdGetCall(id, xProgrammeKey, authorization, xCallref, progressListener, progressRequestListener);
        return call;

    }

    /**
     *
     * Retrieve the transfer transaction identified by the given ID.
     * @param id The transfer transaction identified by the given ID. (required)
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return Transfer
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public Transfer transfersIdGet(Long id, String xProgrammeKey, String authorization, String xCallref) throws ApiException {
        ApiResponse<Transfer> resp = transfersIdGetWithHttpInfo(id, xProgrammeKey, authorization, xCallref);
        return resp.getData();
    }

    /**
     *
     * Retrieve the transfer transaction identified by the given ID.
     * @param id The transfer transaction identified by the given ID. (required)
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return ApiResponse<Transfer>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<Transfer> transfersIdGetWithHttpInfo(Long id, String xProgrammeKey, String authorization, String xCallref) throws ApiException {
        com.squareup.okhttp.Call call = transfersIdGetValidateBeforeCall(id, xProgrammeKey, authorization, xCallref, null, null);
        Type localVarReturnType = new TypeToken<Transfer>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Retrieve the transfer transaction identified by the given ID.
     * @param id The transfer transaction identified by the given ID. (required)
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call transfersIdGetAsync(Long id, String xProgrammeKey, String authorization, String xCallref, final ApiCallback<Transfer> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = transfersIdGetValidateBeforeCall(id, xProgrammeKey, authorization, xCallref, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<Transfer>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /* Build call for transfersProfilesGet */
    private com.squareup.okhttp.Call transfersProfilesGetCall(String xProgrammeKey, String authorization, TransferProfilesFilter request, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = request;

        // create path and map variables
        String localVarPath = "/transfers/profiles/get".replaceAll("\\{format\\}","json");

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        if (xCallref != null)
        localVarHeaderParams.put("X-callref", apiClient.parameterToString(xCallref));
        if (xProgrammeKey != null)
        localVarHeaderParams.put("X-programmeKey", apiClient.parameterToString(xProgrammeKey));
        if (authorization != null)
        localVarHeaderParams.put("Authorization", apiClient.parameterToString(authorization));

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {  };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call transfersProfilesGetValidateBeforeCall(String xProgrammeKey, String authorization, TransferProfilesFilter request, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        // verify the required parameter 'xProgrammeKey' is set
        if (xProgrammeKey == null) {
            throw new ApiException("Missing the required parameter 'xProgrammeKey' when calling transfersProfilesGet(Async)");
        }

        // verify the required parameter 'authorization' is set
        if (authorization == null) {
            throw new ApiException("Missing the required parameter 'authorization' when calling transfersProfilesGet(Async)");
        }

        // verify the required parameter 'request' is set
        if (request == null) {
            throw new ApiException("Missing the required parameter 'request' when calling transfersProfilesGet(Async)");
        }

        com.squareup.okhttp.Call call = transfersProfilesGetCall(xProgrammeKey, authorization, request, xCallref, progressListener, progressRequestListener);
        return call;

    }

    /**
     *
     * Retrieves the transfer profiles which match all of the criteria specified in the given filter.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return TransferProfiles
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TransferProfiles transfersProfilesGet(String xProgrammeKey, String authorization, TransferProfilesFilter request, String xCallref) throws ApiException {
        ApiResponse<TransferProfiles> resp = transfersProfilesGetWithHttpInfo(xProgrammeKey, authorization, request, xCallref);
        return resp.getData();
    }

    /**
     *
     * Retrieves the transfer profiles which match all of the criteria specified in the given filter.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return ApiResponse<TransferProfiles>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<TransferProfiles> transfersProfilesGetWithHttpInfo(String xProgrammeKey, String authorization, TransferProfilesFilter request, String xCallref) throws ApiException {
        com.squareup.okhttp.Call call = transfersProfilesGetValidateBeforeCall(xProgrammeKey, authorization, request, xCallref, null, null);
        Type localVarReturnType = new TypeToken<TransferProfiles>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Retrieves the transfer profiles which match all of the criteria specified in the given filter.
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param request  (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call transfersProfilesGetAsync(String xProgrammeKey, String authorization, TransferProfilesFilter request, String xCallref, final ApiCallback<TransferProfiles> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = transfersProfilesGetValidateBeforeCall(xProgrammeKey, authorization, request, xCallref, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<TransferProfiles>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /* Build call for transfersProfilesIdGet */
    private com.squareup.okhttp.Call transfersProfilesIdGetCall(Long id, String xProgrammeKey, String authorization, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/transfers/profiles/{id}/get".replaceAll("\\{format\\}","json")
        .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        if (xCallref != null)
        localVarHeaderParams.put("X-callref", apiClient.parameterToString(xCallref));
        if (xProgrammeKey != null)
        localVarHeaderParams.put("X-programmeKey", apiClient.parameterToString(xProgrammeKey));
        if (authorization != null)
        localVarHeaderParams.put("Authorization", apiClient.parameterToString(authorization));

        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] {  };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }

    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call transfersProfilesIdGetValidateBeforeCall(Long id, String xProgrammeKey, String authorization, String xCallref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {

        // verify the required parameter 'id' is set
        if (id == null) {
            throw new ApiException("Missing the required parameter 'id' when calling transfersProfilesIdGet(Async)");
        }

        // verify the required parameter 'xProgrammeKey' is set
        if (xProgrammeKey == null) {
            throw new ApiException("Missing the required parameter 'xProgrammeKey' when calling transfersProfilesIdGet(Async)");
        }

        // verify the required parameter 'authorization' is set
        if (authorization == null) {
            throw new ApiException("Missing the required parameter 'authorization' when calling transfersProfilesIdGet(Async)");
        }

        com.squareup.okhttp.Call call = transfersProfilesIdGetCall(id, xProgrammeKey, authorization, xCallref, progressListener, progressRequestListener);
        return call;

    }

    /**
     *
     * Retrieves the latest version of the profile identified by the ID parameter.
     * @param id This sub resource represents a specific profile, as identified by the ID parameter, and allows this specific profile to be managed. (required)
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return TransferProfile
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TransferProfile transfersProfilesIdGet(Long id, String xProgrammeKey, String authorization, String xCallref) throws ApiException {
        ApiResponse<TransferProfile> resp = transfersProfilesIdGetWithHttpInfo(id, xProgrammeKey, authorization, xCallref);
        return resp.getData();
    }

    /**
     *
     * Retrieves the latest version of the profile identified by the ID parameter.
     * @param id This sub resource represents a specific profile, as identified by the ID parameter, and allows this specific profile to be managed. (required)
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @return ApiResponse<TransferProfile>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse<TransferProfile> transfersProfilesIdGetWithHttpInfo(Long id, String xProgrammeKey, String authorization, String xCallref) throws ApiException {
        com.squareup.okhttp.Call call = transfersProfilesIdGetValidateBeforeCall(id, xProgrammeKey, authorization, xCallref, null, null);
        Type localVarReturnType = new TypeToken<TransferProfile>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     *  (asynchronously)
     * Retrieves the latest version of the profile identified by the ID parameter.
     * @param id This sub resource represents a specific profile, as identified by the ID parameter, and allows this specific profile to be managed. (required)
     * @param xProgrammeKey This identifies your tenant and programme within OPE. The typical format is `tenantId|programmeId`, for example `team-01|3749203750`. (required)
     * @param authorization This is the authorisation token that you receive after logging into the API with your credentials. To login, you need to perform a `POST` call on `/auth/login` with your credentials. (required)
     * @param xCallref A unique call reference to provide correlation between application and system. This can be generated by your application. (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call transfersProfilesIdGetAsync(Long id, String xProgrammeKey, String authorization, String xCallref, final ApiCallback<TransferProfile> callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = transfersProfilesIdGetValidateBeforeCall(id, xProgrammeKey, authorization, xCallref, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken<TransferProfile>(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
}


text:
import Stack from './main';

declare function require(name: string): any;
const assert = require('assert');

const stack = new Stack<number>((a, b) => a - b);

assert.strictEqual(stack.pop(), undefined);

stack.push(10);
assert.strictEqual(stack.max(), 10);

stack.push(10);
stack.push(6);
stack.push(13);
stack.push(15);
stack.push(15);
stack.push(14);
assert.strictEqual(stack.max(), 15);

assert.strictEqual(stack.pop(), 14);
assert.strictEqual(stack.max(), 15);

assert.strictEqual(stack.pop(), 15);
assert.strictEqual(stack.max(), 15);

assert.strictEqual(stack.pop(), 15);
assert.strictEqual(stack.max(), 13);

stack.push(20);
assert.strictEqual(stack.max(), 20);

assert.strictEqual(stack.pop(), 20);
assert.strictEqual(stack.max(), 13);

assert.strictEqual(stack.pop(), 13);
assert.strictEqual(stack.max(), 10);

assert.strictEqual(stack.pop(), 6);
assert.strictEqual(stack.max(), 10);

assert.strictEqual(stack.pop(), 10);
assert.strictEqual(stack.max(), 10);

assert.strictEqual(stack.pop(), 10);
assert.strictEqual(stack.pop(), undefined);


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

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Angel of Death Cheese Spread</title>
      <categories>
        <cat>Cheese/eggs</cat>
        <cat>Spreads</cat>
        <cat>Appetizers</cat></categories>
      <yield>6</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>pound</unit></amt>
        <item>Gorganzola or Bleu Cheese</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>pound</unit></amt>
        <item>Ricotta cheese</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit/></amt>
        <item>Cloves chopped garlic</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>cup</unit></amt>
        <item>Chopped walnuts</item></ing>
      <ing>
        <amt>
          <qty>4</qty>
          <unit/></amt>
        <item>Fresh sage leaves</item></ing></ingredients>
    <directions>
      <step>  salt to taste cheese cloth

  Chop garlic.  Add to 1/4 C of water in a small saucepan. Reduce to 2
  tablespoons.

  Beat cheeses together.  Add garlic mixture and salt, if desired.

  In a double layer of cheesecloth - put sage leaves in a pattern in the
  center.  Sprinkle nuts on top.  Put cheese mixture on top of nuts. Gather
  cheesecloth and form into a ball. Tie together.

  Put the cheeseball in a strainer over a dish and let sit in the fridge
  overnight to drain.

  Unwrap and serve!

  From Gemini's MASSIVE MealMaster collection at www.synapse.com/~gemini

</step></directions></recipe></recipeml>


text:
require "fast_spec_helper"
require "asylum_support_decision"

RSpec.describe AsylumSupportDecision do

  it "is a DocumentMetadataDecorator" do
    doc = double(:document)
    expect(AsylumSupportDecision.new(doc)).to be_a(DocumentMetadataDecorator)
  end

end


text:
/* global describe, it, expect, beforeEach */
import React from "react";
import {shallow} from "enzyme";

import RuleGroup from "./RuleGroup";
import {ActionElement, ValueSelector} from "./controls/index";

describe("<RuleGroup />", () => {
  let controls;
  let classNames;
  let schema;
  let props;
  beforeEach(() => {
    // set defaults
    controls = {
      combinatorSelector: React.Component,
      addRuleAction: React.Component,
      addGroupAction: React.Component,
      removeGroupAction: React.Component,
    };
    classNames = {
      combinators: "custom-combinators-class",
      addRule: "custom-addRule-class",
      addGroup: "custom-addGroup-class",
      removeGroup: "custom-removeGroup-class",
    };
    schema = {
      combinators: [],
      controls: controls,
      classNames: classNames,
      isRuleGroup: (rule) => {
        return false;
      },
      onPropChange: (prop, value, id) => {},
      onRuleAdd: (rule, parentId) => {},
      onGroupAdd: (ruleGroup, id) => {},
      createRule: () => {
        return _createRule(1);
      },
      createRuleGroup: () => {
        return _createRuleGroup(1, "any_parent_id", []);
      },
    };
    props = {
      id: "id",
      parentId: "parentId",
      rules: [],
      combinator: "and",
      schema: schema,
    };
  });

  it("should exist", () => {
    expect(RuleGroup).to.exist;
  });

  it("should have a className of \"ruleGroup\"", () => {
    const dom = shallow(<RuleGroup {...props} />);

    expect(dom.find("div").hasClass("ruleGroup")).to.be.true;
  });

  describe("combinator selector as <ValueSelector />", () => {
    beforeEach(() => {
      controls.combinatorSelector = ValueSelector;
    });

    it("should have options set to expected combinators", () => {
      const expectedCombinators = [
        {
          name: "and",
          label: "AND",
        }, {
          name: "or",
          label: "OR",
        },
      ];
      schema.combinators = expectedCombinators;
      const dom = shallow(<RuleGroup {...props} />);

      expect(dom.find("ValueSelector").props().options)
        .to
        .equal(expectedCombinators);
    });

    it("should have the default selected value set to \"and\"", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find("ValueSelector").props().value)
        .to
        .equal("and");
    });

    it("should have the onChange method handler", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find("ValueSelector").props().handleOnChange)
        .to
        .be
        .a("function");
    });

    behavesLikeAnElementWithClassNames("ValueSelector", "ruleGroup-combinators", "custom-combinators-class");
  });

  describe("add rule action as an <ActionElement />", () => {
    beforeEach(() => {
      controls.addRuleAction = ActionElement;
    });

    behavesLikeAnActionElement("+Rule", "ruleGroup-addRule", "custom-addRule-class");
  });

  describe("add group action as an <ActionElement />", () => {
    beforeEach(() => {
      controls.addGroupAction = ActionElement;
    });

    behavesLikeAnActionElement("+Group", "ruleGroup-addGroup", "custom-addGroup-class");
  });

  describe("remove group action as an <ActionElement />", () => {
    beforeEach(() => {
      controls.removeGroupAction = ActionElement;
    });

    it("does not exist if it does not have a parent", () => {
      props.parentId = null;
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find("ActionElement"))
        .to
        .have
        .length(0);
    });

    behavesLikeAnActionElement("x", "ruleGroup-remove", "custom-removeGroup-class");
  });

  describe("when 2 rules exist", () => {
    beforeEach(() => {
      props.rules = [_createRule(1), _createRule(2)];
    });

    it("has 2 <Rule /> elements", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find("Rule"))
        .to
        .have
        .length(2);
    });

    it("has the first rule with the correct values", () => {
      const dom = shallow(<RuleGroup {...props} />);
      const ruleProps = dom
        .find("Rule")
        .first()
        .props();
      expect(ruleProps.id)
        .to
        .equal("rule_id_1");
      expect(ruleProps.field)
        .to
        .equal("field_1");
      expect(ruleProps.operator)
        .to
        .equal("operator_1");
      expect(ruleProps.value)
        .to
        .equal("value_1");
    });
  });

  describe("when 1 rule group exists", () => {
    beforeEach(() => {
      props.rules = [
        _createRuleGroup(1, props.id, []),
      ];
      schema.isRuleGroup = (rule) => {
        return true;
      };
    });

    it("has 1 <RuleGroup /> element", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find("RuleGroup"))
        .to
        .have
        .length(1);
    });

    it("has 1 <RuleGroup /> with expected properties", () => {
      const dom = shallow(<RuleGroup {...props} />);
      const groupProps = dom
        .find("RuleGroup")
        .props();
      expect(groupProps.id)
        .to
        .equal("rule_group_id_1");
      expect(groupProps.parentId)
        .to
        .equal("id");
      expect(groupProps.rules)
        .to
        .be
        .an("array");
      expect(groupProps.combinator)
        .to
        .equal("and");
    });
  });

  describe("#hasParentGroup", () => {
    describe("when it has a parentId", () => {
      beforeEach(() => {
        props.parentId = "any_parent_id";
      });

      it("returns truthy", () => {
        const instance = shallow(<RuleGroup {...props} />).instance();
        expect(instance.hasParentGroup()).isOk;
      });
    });

    describe("when it does not have a parentId", () => {
      beforeEach(() => {
        props.parentId = null;
      });

      it("returns falsey", () => {
        const instance = shallow(<RuleGroup {...props} />).instance();
        expect(instance.hasParentGroup()).isNotOk;
      });
    });
  });

  describe("#onCombinatorChange", () => {
    it("calls the #onPropChange from the schema with expected values", () => {
      let actualProperty;
      let actualValue;
      let actualId;
      schema.onPropChange = (prop, value, id) => {
        actualProperty = prop;
        actualValue = value;
        actualId = id;
      };
      const instance = shallow(<RuleGroup {...props} />).instance();
      instance.onCombinatorChange("any_combinator_value");

      expect(actualProperty)
        .to
        .equal("combinator");
      expect(actualValue)
        .to
        .equal("any_combinator_value");
      expect(actualId)
        .to
        .equal("id");
    });
  });

  describe("#addRule", () => {
    it("calls the #onRuleAdd from the schema with expected values", () => {
      let actualRule;
      let actualId;
      schema.onRuleAdd = (rule, id) => {
        actualRule = rule;
        actualId = id;
      };
      const instance = shallow(<RuleGroup {...props} />).instance();
      instance.addRule(_mockEvent());

      expect(actualRule)
        .to
        .include
        .keys("id", "field", "operator", "value");
      expect(actualId)
        .to
        .equal("id");
    });
  });

  describe("#addGroup", () => {
    it("calls the #onGroupAdd from the schema with expected values", () => {
      let actualRuleGroup;
      let actualId;
      schema.onGroupAdd = (ruleGroup, id) => {
        actualRuleGroup = ruleGroup;
        actualId = id;
      };
      const instance = shallow(<RuleGroup {...props} />).instance();
      instance.addGroup(_mockEvent());

      expect(actualRuleGroup)
        .to
        .include
        .keys("id", "parentId", "rules");
      expect(actualId)
        .to
        .equal("id");
    });
  });

  describe("#removeGroup", () => {
    it("calls the #onGroupRemove from the schema with expected values", () => {
      let actualId;
      let actualParentId;
      schema.onGroupRemove = (id, parentId) => {
        actualId = id;
        actualParentId = parentId;
      };
      const instance = shallow(<RuleGroup {...props} />).instance();
      instance.removeGroup(_mockEvent());

      expect(actualId)
        .to
        .equal("id");
      expect(actualParentId)
        .to
        .equal("parentId");
    });
  });

  // shared examples
  function behavesLikeAnActionElement(label, defaultClassName, customClassName) {
    it("should have the correct label", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find("ActionElement").props().label)
        .to
        .equal(label);
    });

    it("should have the onClick method handler", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find("ActionElement").props().handleOnClick)
        .to
        .be
        .a("function");
    });

    behavesLikeAnElementWithClassNames("ActionElement", defaultClassName, customClassName);
  }

  function behavesLikeAnElementWithClassNames(element, defaultClassName, customClassName) {
    it("should have the default className", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find(element).props().className)
        .to
        .contain(defaultClassName);
    });

    it("should have the custom className", () => {
      const dom = shallow(<RuleGroup {...props} />);
      expect(dom.find(element).props().className)
        .to
        .contain(customClassName);
    });
  }

  // helper functions
  function _createRule(index) {
    return {
      id: "rule_id_" + index,
      field: "field_" + index,
      operator: "operator_" + index,
      value: "value_" + index,
    };
  }

  function _createRuleGroup(index, parentId, rules) {
    return {
      id: "rule_group_id_" + index,
      parentId: parentId,
      rules: rules,
    };
  }

  function _mockEvent() {
    return {
      preventDefault: () => {},
      stopPropagation: () => {},
    };
  }
});


text:
import { Version } from '@microsoft/sp-core-library';
import {
  IPropertyPaneConfiguration,
  PropertyPaneTextField
} from '@microsoft/sp-property-pane';
import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';
import { escape } from '@microsoft/sp-lodash-subset';

import styles from './MyFirstTeamsMeetingAppWebPart.module.scss';
import * as strings from 'MyFirstTeamsMeetingAppWebPartStrings';

export interface IMyFirstTeamsMeetingAppWebPartProps {
  description: string;
}

export default class MyFirstTeamsMeetingAppWebPart extends BaseClientSideWebPart<IMyFirstTeamsMeetingAppWebPartProps> {

  public render(): void {

    let title: string = 'ERR: not in Microsoft Teams';
    let subTitle: string = 'ERR: not in Microsoft Teams';

    if (this.context.sdks.microsoftTeams) {
      if (this.context.sdks.microsoftTeams.context.meetingId) {
        title = "Welcome to Microsoft Teams!";
        subTitle = "We are in the context of following meeting: " + this.context.sdks.microsoftTeams.context.meetingId;
      } else {
        title = "Welcome to Microsoft Teams!";
        subTitle = "We are in the context of following team: " + this.context.sdks.microsoftTeams.context.teamName;
      }
    }

    this.domElement.innerHTML = `

              ${title}

${subTitle}

`;
  }

  protected get dataVersion(): Version {
    return Version.parse('1.0');
  }

  protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
    return {
      pages: [
        {
          header: {
            description: strings.PropertyPaneDescription
          },
          groups: [
            {
              groupName: strings.BasicGroupName,
              groupFields: [
                PropertyPaneTextField('description', {
                  label: strings.DescriptionFieldLabel
                })
              ]
            }
          ]
        }
      ]
    };
  }
}


text:
data MyEither a b = MyLeft a | MyRight b

myshow :: MyEither Int Int -> String
myshow (MyRight x) = "MyRight " ++ show x
myshow (MyLeft x)  = "MyLeft " ++ show x

main = putStrLn $ myshow (MyLeft 10)


text:
layout: "docs"
page_title: "PostgreSQL Secret Backend"
sidebar_current: "docs-secrets-postgresql"
description: |-
  The PostgreSQL secret backend for Vault generates database credentials to access PostgreSQL.
---

# PostgreSQL Secret Backend

Name: `postgresql`

~> **Deprecation Note:** This backend is deprecated in favor of the
combined databases backend added in v0.7.1. See the documentation for
the new implementation of this backend at
[PostgreSQL Database Plugin](/docs/secrets/databases/postgresql.html).

The PostgreSQL secret backend for Vault generates database credentials
dynamically based on configured roles. This means that services that need
to access a database no longer need to hardcode credentials: they can request
them from Vault, and use Vault's leasing mechanism to more easily roll keys.

Additionally, it introduces a new ability: with every service accessing
the database with unique credentials, it makes auditing much easier when
questionable data access is discovered: you can track it down to the specific
instance of a service based on the SQL username.

Vault makes use both of its own internal revocation system as well as the
`VALID UNTIL` setting when creating PostgreSQL users to ensure that users
become invalid within a reasonable time of the lease expiring.

This page will show a quick start for this backend. For detailed documentation
on every path, use `vault path-help` after mounting the backend.

## Quick Start

The first step to using the PostgreSQL backend is to mount it.
Unlike the `generic` backend, the `postgresql` backend is not mounted by default.

```text
$ vault mount postgresql
Successfully mounted 'postgresql' at 'postgresql'!
```

Next, Vault must be configured to connect to the PostgreSQL. This is done by
writing either a PostgreSQL URL or PG connection string:

```text
$ vault write postgresql/config/connection \
    connection_url="postgresql://root:vaulttest@vaulttest.ciuvljjni7uo.us-west-1.rds.amazonaws.com:5432/postgres"
```

In this case, we've configured Vault with the user "root" and password "vaulttest",
connecting to a PostgreSQL instance in AWS RDS. The "postgres" database name is being used.
It is important that the Vault user have the `GRANT OPTION` privilege to manage users.

Optionally, we can configure the lease settings for credentials generated
by Vault. This is done by writing to the `config/lease` key:

```
$ vault write postgresql/config/lease lease=1h lease_max=24h
Success! Data written to: postgresql/config/lease
```

This restricts each credential to being valid or leased for 1 hour
at a time, with a maximum use period of 24 hours. This forces an
application to renew their credentials at least hourly, and to recycle
them once per day.

The next step is to configure a role. A role is a logical name that maps
to a policy used to generated those credentials. For example, lets create
a "readonly" role:

```text
$ vault write postgresql/roles/readonly \
    sql="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}';
    GRANT SELECT ON ALL TABLES IN SCHEMA public TO \"{{name}}\";"
Success! Data written to: postgresql/roles/readonly
```

By writing to the `roles/readonly` path we are defining the `readonly` role.
This role will be created by evaluating the given `sql` statements. By
default, the `{{name}}`, `{{password}}` and `{{expiration}}` fields will be populated by
Vault with dynamically generated values. This SQL statement is creating
the named user, and then granting it `SELECT` or read-only privileges
to tables in the database. More complex `GRANT` queries can be used to
customize the privileges of the role. See the [PostgreSQL manual](http://www.postgresql.org/docs/9.4/static/sql-grant.html)
for more information.

To generate a new set of credentials, we simply read from that role:
Vault is now configured to create and manage credentials for Postgres!

```text
$ vault read postgresql/creds/readonly
Key           	Value
lease_id      	postgresql/creds/readonly/c888a097-b0e2-26a8-b306-fc7c84b98f07
lease_duration	3600
password      	34205e88-0de1-68b7-6267-72d8e32c5d3d
username      	root-1430162075-7887
```

By reading from the `creds/readonly` path, Vault has generated a new
set of credentials using the `readonly` role configuration. Here we
see the dynamically generated username and password, along with a one
hour lease.

Using ACLs, it is possible to restrict using the postgresql backend such
that trusted operators can manage the role definitions, and both
users and applications are restricted in the credentials they are
allowed to read.

If you get stuck at any time, simply run `vault path-help postgresql` or with a
subpath for interactive help output.

## API

The PostgreSQL secret backend has a full HTTP API. Please see the
[PostgreSQL secret backend API](/api/secret/postgresql/index.html) for more
details.


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.onelogin</groupId>
		<artifactId>java-saml-tookit-samples</artifactId>
		<version>2.0.1-SNAPSHOT</version>
	</parent>

	<artifactId>java-saml-tookit-jspsample</artifactId>
	<packaging>war</packaging>
	<name>OneLogin java-saml Toolkit Sample Webapp</name>

	<dependencies>
		<dependency>
			<groupId>com.onelogin</groupId>
			<artifactId>java-saml</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>

</project>


text:
package org.bsworks.x2.resource.validation.constraints;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * Character sequence map value length constraint.
 *
 * @author Lev Himmelfarb
 */
@Constraint(validatedBy=MapValueLengthValidator.class)
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MapValueLength {

	/**
	 * Minimum value length.
	 *
	 * @return Minimum value length.
	 */
	int min() default 0;

	/**
	 * Maximum value length.
	 *
	 * @return Maximum value length.
	 */
	int max() default Integer.MAX_VALUE;

	/**
	 * Constraint violation message.
	 *
	 * @return Constraint violation message.
	 */
	String message() default "Invalid map value length.";

	/**
	 * Constraint groups.
	 *
	 * @return Constraint groups.
	 */
	Class<?>[] groups() default {};

	/**
	 * Constraint payload.
	 *
	 * @return Constraint payload.
	 */
	Class<? extends Payload>[] payload() default {};
}


text:
package io.druid.server.coordinator.rules;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableMap;
import com.metamx.common.IAE;
import io.druid.client.DruidServer;
import io.druid.jackson.DefaultObjectMapper;
import org.junit.Assert;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

public class ForeverLoadRuleTest
{
  @Test
  public void testSerdeNullTieredReplicants() throws Exception
  {
    ForeverLoadRule rule = new ForeverLoadRule(
        null
    );

    ObjectMapper jsonMapper = new DefaultObjectMapper();
    Rule reread = jsonMapper.readValue(jsonMapper.writeValueAsString(rule), Rule.class);

    Assert.assertEquals(rule.getTieredReplicants(), ((ForeverLoadRule)reread).getTieredReplicants());
    Assert.assertEquals(ImmutableMap.of(DruidServer.DEFAULT_TIER, DruidServer.DEFAULT_NUM_REPLICANTS), rule.getTieredReplicants());
  }

  @Test
  public void testMappingNullTieredReplicants() throws Exception{
    String inputJson = "{\n"
                      + " \"type\": \"loadForever\"\n"
                      + "}";
    String expectedJson = "    {\n"
                          + "      \"tieredReplicants\": {\n"
                          + "        \""+ DruidServer.DEFAULT_TIER +"\": "+ DruidServer.DEFAULT_NUM_REPLICANTS +"\n"
                          + "      },\n"
                          + "      \"type\": \"loadForever\"\n"
                          + "    }";
    ObjectMapper jsonMapper = new DefaultObjectMapper();
    ForeverLoadRule inputForeverLoadRule = jsonMapper.readValue(inputJson, ForeverLoadRule.class);
    ForeverLoadRule expectedForeverLoadRule = jsonMapper.readValue(expectedJson, ForeverLoadRule.class);
    Assert.assertEquals(expectedForeverLoadRule.getTieredReplicants(), inputForeverLoadRule.getTieredReplicants());
  }

  @Test(expected = IAE.class)
  public void testEmptyTieredReplicants() throws Exception
  {
    ForeverLoadRule rule = new ForeverLoadRule(
        ImmutableMap.<String, Integer>of()
    );

    ObjectMapper jsonMapper = new DefaultObjectMapper();
    Rule reread = jsonMapper.readValue(jsonMapper.writeValueAsString(rule), Rule.class);
  }

  @Test(expected = IAE.class)
  public void testEmptyReplicantValue() throws Exception
  {
    // Immutable map does not allow null values
    Map<String, Integer> tieredReplicants= new HashMap<>();
    tieredReplicants.put("tier", null);
    ForeverLoadRule rule = new ForeverLoadRule(
        tieredReplicants
    );

    ObjectMapper jsonMapper = new DefaultObjectMapper();
    Rule reread = jsonMapper.readValue(jsonMapper.writeValueAsString(rule), Rule.class);
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/rc_ic_extend_selected" android:state_selected="true"/>
    <item android:drawable="@drawable/rc_ic_extend_normal"/>
</selector>


text:
@implementation MathProblem

-(id) initMathProblem{
    self.answer = 0;
    self.isCorrectAnswer = false;

    return self;
}
@end


text:
// Copyright 2018 The Bazel Authors. 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.
package com.google.devtools.build.remote.client;

import build.bazel.remote.execution.v2.RequestMetadata;
import com.google.common.annotations.VisibleForTesting;
import io.grpc.ClientInterceptor;
import io.grpc.Context;
import io.grpc.Metadata;
import io.grpc.protobuf.ProtoUtils;
import io.grpc.stub.MetadataUtils;

/** Utility functions to handle Metadata for remote Grpc calls. */
public class TracingMetadataUtils {

  private TracingMetadataUtils() {}

  private static final Context.Key<RequestMetadata> CONTEXT_KEY =
      Context.key("remote-grpc-metadata");

  @VisibleForTesting
  public static final Metadata.Key<RequestMetadata> METADATA_KEY =
      ProtoUtils.keyForProto(RequestMetadata.getDefaultInstance());

  /**
   * Returns a new gRPC context derived from the current context, with {@link RequestMetadata}
   * accessible by the {@link fromCurrentContext()} method.
   */
  public static Context contextWithMetadata(RequestMetadata metadata) {
    return Context.current().withValue(CONTEXT_KEY, metadata);
  }

  /**
   * Fetches a {@link RequestMetadata} defined on the current context.
   *
   * @throws {@link IllegalStateException} when the metadata is not defined in the current context.
   */
  public static RequestMetadata fromCurrentContext() {
    RequestMetadata metadata = CONTEXT_KEY.get();
    if (metadata == null) {
      throw new IllegalStateException("RequestMetadata not set in current context.");
    }
    return metadata;
  }

  /**
   * Creates a {@link Metadata} containing the {@link RequestMetadata} defined on the current
   * context.
   *
   * @throws {@link IllegalStateException} when the metadata is not defined in the current context.
   */
  public static Metadata headersFromCurrentContext() {
    Metadata headers = new Metadata();
    headers.put(METADATA_KEY, fromCurrentContext());
    return headers;
  }

  public static ClientInterceptor attachMetadataFromContextInterceptor() {
    return MetadataUtils.newAttachHeadersInterceptor(headersFromCurrentContext());
  }
}


text:
package com.zooz.common.client.ecomm.beans.responses;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zooz.common.client.ecomm.beans.Risk;
import com.zooz.common.client.ecomm.beans.server.response.ZoozServerResponse;

/**
 * The CreditResponse includes any of the response parameter returns for the corresponding requests.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class CreditResponse extends ZooZProcessingResponseObject {
    /**
     * Raw authorization code as received from the acquirer.
     */
    @JsonProperty
    private String authorizationCode;
    /**
     * Reference id for the request, received from the processor.
     */
    @JsonProperty
    private String processorReferenceId;
    /**
     * The MID (Merchant ID) associated to the payment.
     */
    @JsonProperty
    private String merchantId;
    /**
     * The processor response result code
     */
    @JsonProperty
    private Integer processorResultCode;
    /**
     * Unique ID used to reconcile transactions, Received from processor
     */
    @JsonProperty
    private String reconciliationId;
    /**
     * The processor slip Number
     */
    @JsonProperty
    private String slipNumber;
    /**
     * In case we get "duplicate" error - this object will contain the original credit response
     */
    @JsonProperty
    private ZoozServerResponse<CreditResponse> originalResponse;

    /**
     * The risk that was returned by ZooZ Risk Engine
     */
    @JsonProperty
    private Risk risk;

    /**
     * The name of the processor that processes the transaction
     */
    @JsonProperty
    private String processorName;

    /**
     * Instantiates a new Credit response.
     */
    public CreditResponse() {
    }

    /**
     * Gets the authorization code.
     *
     * @return the authorization code
     */
    public String getAuthorizationCode() {
        return authorizationCode;
    }

    /**
     * Sets the authorization code.
     *
     * @param authorizationCode the authorization code
     */
    public void setAuthorizationCode(String authorizationCode) {
        this.authorizationCode = authorizationCode;
    }

    /**
     * Gets the processor reference id.
     *
     * @return the processor reference id
     */
    public String getProcessorReferenceId() {
        return processorReferenceId;
    }

    /**
     * Sets the processor reference id.
     *
     * @param processorReferenceId the processor reference id
     */
    public void setProcessorReferenceId(String processorReferenceId) {
        this.processorReferenceId = processorReferenceId;
    }

    /**
     * Gets the merchant id.
     *
     * @return the merchant id
     */
    public String getMerchantId() {
        return merchantId;
    }

    /**
     * Sets the merchant id.
     *
     * @param merchantId the merchant id
     */
    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    /**
     * Gets processor result code
     *
     * @return processor result code
     */
    public Integer getProcessorResultCode() {
        return processorResultCode;
    }

    /**
     * set processor result code
     *
     * @param processorResultCode the processor result code
     */
    public void setProcessorResultCode(Integer processorResultCode) {
        this.processorResultCode = processorResultCode;
    }

    /**
     * Gets the reconciliation id.
     *
     * @return the reconciliation id
     */
    public String getReconciliationId() {
        return reconciliationId;
    }

    /**
     * Sets the reconciliation id.
     *
     * @param reconciliationId the reconciliation id
     */
    public void setReconciliationId(String reconciliationId) {
        this.reconciliationId = reconciliationId;
    }

    /**
     * gets the original credit response
     *
     * @return the original credit response
     */
    public ZoozServerResponse<CreditResponse> getOriginalResponse() {
        return originalResponse;
    }

    /**
     * sets the original credit response
     *
     * @param originalResponse the original response
     */
    public void setOriginalResponse(ZoozServerResponse<CreditResponse> originalResponse) {
        this.originalResponse = originalResponse;
    }

    /**
     * gets the processor slip number
     *
     * @return slipNumber slip number
     */
    public String getSlipNumber() {
        return slipNumber;
    }

    /**
     * sets the processor slip number
     *
     * @param slipNumber the slip number
     */
    public void setSlipNumber(String slipNumber) {
        this.slipNumber = slipNumber;
    }

    /**
     * gets the risk
     *
     * @return risk risk
     */
    public Risk getRisk() {
        return risk;
    }

    /**
     * Sets the risk
     *
     * @param risk the risk
     */
    public void setRisk(Risk risk) {
        this.risk = risk;
    }

    /**
     * Gets The name of the processor that processes the transaction
     *
     * @return processorName processor name
     */
    public String getProcessorName() {
        return processorName;
    }

    /**
     * Sets the name of the processor that processes the transaction
     *
     * @param processorName the processor name
     */
    public void setProcessorName(String processorName) {
        this.processorName = processorName;
    }
}


text:
audio_pro = node[:apps][:audio_pro]

# fast, cross-platform audio editor
install_app "audacity" do
  profile audio_pro['profiles']['audacity']
end


text:
require 'sinatra'
require 'json/ext'

configure do

end

helpers do
  def response_json(req)
    r = Hash.new()
    req.body.rewind
    r['body'] = req.body.read                       # request body sent by the client (see below)
    r['scheme'] = req.scheme                        # "http"
    r['script_name'] = req.script_name              # "/example"
    r['path_info'] = request.path_info              # "/foo"
    r['port'] = request.port                        # 80
    r['request_method'] = request.request_method    # "GET"
    r['query_string'] = request.query_string        # ""
    r['content_length'] = request.content_length    # length of request.body
    r['media_type'] = request.media_type            # media type of request.body
    r['host'] = request.host                        # "example.com"
    r['referer'] = request.referer                  # the referer of the client or '/'
    r['user_agent'] = request.user_agent            # user agent (used by :agent condition)
    r['cookies'] = request.cookies                  # hash of browser cookies
    r['url'] = request.url                          # "http://example.com/example/foo"
    r['path'] = request.path                        # "/example/foo"
    r['ip'] = request.ip                            # client IP address
    r['secure'] = request.secure?                   # false
    return r.to_json
  end
end

get '/ping/?' do
  "Pong"
end

get '/*' do
	status 200
  response_json(request)
end

post '/*' do
  status 200
  response_json(request)
end

put '/*' do
  status 200
  response_json(request)
end

patch '/*' do
  status 200
  response_json(request)
end

delete '/*' do
  status 200
  response_json(request)
end

options '/*' do
  status 200
  response_json(request)
end

link '/*' do
  status 200
  response_json(request)
end

unlink '/*' do
  status 200
  response_json(request)
end

head '/*' do
  status 200
  response_json(request)
end


text:
namespace boost { namespace xpressive { namespace detail
{

    ///////////////////////////////////////////////////////////////////////////////
    // modifier
    template<typename Modifier>
    struct modifier_op
    {
        typedef regex_constants::syntax_option_type opt_type;

        template<typename Expr>
        struct apply
        {
            typedef typename proto::binary_expr<
                modifier_tag
              , typename proto::terminal<Modifier>::type
              , typename proto::result_of::as_child<Expr const>::type
            >::type type;
        };

        template<typename Expr>
        typename apply<Expr>::type const
        operator ()(Expr const &expr) const
        {
            typename apply<Expr>::type that = {{this->mod_}, proto::as_child(expr)};
            return that;
        }

        operator opt_type() const
        {
            return this->opt_;
        }

        Modifier mod_;
        opt_type opt_;
    };

}}}

#if defined(_MSC_VER)
# pragma warning(pop)
#endif

#endif


text:
package com.example.android.sunshine.app;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;

public class DetailActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        /*if(savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction().add(R.id.container,
                    new DetailActivityFragment()).commit();
        }*/
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_detail, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if(id == R.id.action_settings){
            Intent settingsIntent = new Intent(this, SettingsActivity.class);
            startActivity(settingsIntent);
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}


text:
package se.l4.silo.engine.index;

import java.nio.file.Path;

import org.h2.mvstore.MVStore;

import reactor.core.scheduler.Scheduler;
import se.l4.silo.engine.MVStoreManager;

/**
 * Encounter for when a {@link Index} is being constructed.
 *
 */
public interface IndexEngineCreationEncounter
{
	/**
	 * Get the name of the engine being created.
	 *
	 * @return
	 */
	String getName();

	/**
	 * Get the name of this engine unique to the system.
	 *
	 * @return
	 */
	String getUniqueName();

	/**
	 * Resolve a name against the data directory of the collection the query
	 * engine will belong to.
	 *
	 * @param name
	 * @return
	 */
	Path resolveDataFile(String name);

	/**
	 * Resolve a path against the data directory of the collection the query
	 * engine will belong to.
	 *
	 * @param path
	 * @return
	 */
	Path resolveDataFile(Path path);

	/**
	 * Get the data directory for this query engine. This will create the
	 * directory if it does not exist.
	 *
	 * @return
	 */
	Path getDataDirectory();

	/**
	 * Open a new MVStore with the given name. The name will be passed to
	 * {@link #resolveDataFile(String)} to find where the data should be
	 * stored.
	 *
	 * @param name
	 * @return
	 */
	MVStoreManager openMVStore(String name);

	/**
	 * Open a new shared MVStore for the entire storage. Any caller of this
	 * method with the same name will receive an {@link MVStoreManager}
	 * pointing to the same {@link MVStore}.
	 *
	 * <p>
	 * Any users of this store are required to close the {@link MVStoreManager}
	 * when they are done using it.
	 *
	 * @param name
	 * @return
	 */
	MVStoreManager openStorageWideMVStore(String name);

	/**
	 * Get a {@link Scheduler} that can be used to schedule background tasks.
	 * Any background tasks should be stopped when the index closes.
	 *
	 * @return
	 */
	Scheduler getScheduler();
}


text:
require 'resources/virtual/virtual_sync_resource'

module OneProvision

    # Image
    class Image < VirtualSyncResource

        # Class constructor
        def initialize
            super

            @pool = OpenNebula::ImagePool.new(@client)
            @type = 'image'
        end

        # Creates a new object in OpenNebula
        #
        # @param template     [Hash]   Object attributes
        # @param provision_id [String] Provision ID
        #
        # @return [Integer] Resource ID
        def create(template, provision_id)
            meta = template['meta']

            wait, timeout = OneProvision::ObjectOptions.get_wait(meta)
            info          = { 'provision_id' => provision_id,
                              'wait'         => wait,
                              'wait_timeout' => timeout }

            check_wait(wait)

            add_provision_info(template, info)

            # create ONE object
            new_object

            rc = @one.allocate(format_template(template),
                               template['ds_id'].to_i)
            Utils.exception(rc)
            rc = @one.info
            Utils.exception(rc)

            OneProvisionLogger.debug(
                "#{@type} created with ID: #{@one.id}"
            )

            return @one.id.to_i unless wait

            ready?(template, provision_id)
        end

        # Info an specific object
        #
        # @param id [String] Object ID
        def info(id)
            @one = OpenNebula::Image.new_with_id(id, @client)
            @one.info
        end

        private

        # Create new object
        def new_object
            @one = OpenNebula::Image.new(OpenNebula::Image.build_xml, @client)
        end

        # Wait until the image is ready, retry if fail
        #
        # @param template     [Hash]   Object attributes
        # @param provision_id [String] Provision ID
        #
        # @return [Integer] Resource ID
        def ready?(template, provision_id)
            Driver.retry_loop 'Fail to create image' do
                wait_state('READY', template['timeout'])

                # check state after existing wait loop
                @one.info

                case @one.state_str
                when 'LOCKED'
                    # if locked, keep waiting
                    ready?(template, provision_id)
                when 'ERROR'
                    # if error, delete the image and try to create it again
                    raise OneProvisionLoopException
                else
                    # if everything is ready, return the ID
                    @one.id.to_i
                end
            end
        end

    end

end


text:
namespace AppStudio.Menu.BackEnd.DataObjects
{
    /// <summary>
    /// Implementation of the DessertsSchema class.
    /// </summary>
    public class DessertsSchema : DtoBase
    {
    }
}