text:
function login({state, services, output}) {
  const email = state.get('home.loginForm.email');
  const password = state.get('home.loginForm.password');

  services.http.post(`/API/login`, {
    email: email,
    password: password
  })
    .then(() => {
      output.success();
    }).catch(() => {
      output.error();
    });
}

login.async = true;

export default login;


text:
"""
wikipedia text fetcher
Fred Zimmerman
fred@pagekicker.com
(c) PageKicker 2014

"""

import argparse
import codecs
import sys
import time
import wikipedia

parser = argparse.ArgumentParser()
parser.add_argument("--infile", help = "seed file", default = 'test')
parser.add_argument("--lang", help="wiki language bigram", default = 'en')
parser.add_argument("--request_type", help="request type", default = 'sum')
parser.add_argument("--outfile", help = "path to outfile", default = 'outfile')
parser.add_argument("--summary", help = "true or false", action = "store_true")
parser.add_argument("--pagehits", help = "path to list of page hits", default = 'pagehits')
parser.add_argument("--mediawiki_api_url", help = "true or false", default = 'http://en.wikipedia.org/w/api.php')
args = parser.parse_args()

input_file = args.infile
output_file = args.outfile
pagehits = args.pagehits
lang = args.lang
summary = args.summary
request_type = args.request_type
mediawiki_api_url = args.mediawiki_api_url
wikipedia.set_lang(lang)

test = 'mw url is ' + mediawiki_api_url
print(test)

file1 = open(input_file, 'r')
file3 = codecs.open(pagehits,'w','utf-8')
for line in file1:
    print(line)
    try:
        seedhits = wikipedia.search(line)

    except:
        wikipedia.exceptions.DisambiguationError
        wikipedia.exceptions.WikipediaException
        continue

    for i in seedhits:
        file3.write(i+'\n')
    file3.close

redpajama_set_name: RedPajamaGithub


text:
using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

	class Program

	{

		/// Generate river 1
		/// Generate river 3
		/// Generate river 9
		/// Index them all into a boolean array, checking if it is in any of the arrays
		/// Get river n
		/// after every term, check the term against the index
		/// If it is found in the index - check against each array to find which river the number is in (this would return the lowest value of river if it meets multiple simultaneously)
		static int[] riverOne = new int[100000];
		static int[] riverThree = new int[100000];
		static int[] riverNine = new int[100000];
		static bool[] index;
		static int checkWhichRiver (int input)
		{
			for (int i = 0; i < riverOne.Length; i++) {
				if (riverOne [i] == input) {
					return 1;
				}
			}
			for (int i = 0; i < riverThree.Length; i++) {
				if (riverThree [i] == input) {
					return 3;
				}
			}
			for (int i = 0; i < riverNine.Length; i++) {
				if (riverNine [i] == input) {
					return 9;
				}
			}
			return 0;
		}

		static bool checkIndex(int input)

		{

			if (index[input] == true) { return true; }

			else { return false; }

		}

		static int findRiver(int input)

		{

			input = input + findSum(input);

			return input;

		}

		static int findSum(int input)

		{

			int total = 0;

			while(input!=0)
			{

				total += input % 10;
				input /= 10;

			}
			return total;

		}

		static void findRiverOne()

		{

			int counter = 1;

			riverOne[0] = 1;

			while (counter < riverOne.Length)

			{

				riverOne[counter] = riverOne[counter - 1] + findSum(riverOne[counter - 1]);

				counter++;

			}

		}

		static void findRiverThree()

		{

			int counter = 1;

			riverThree[0] = 3;

			while (counter < riverThree.Length)

			{

				riverThree[counter] = riverThree[counter - 1] + findSum(riverThree[counter - 1]);

				counter++;

			}

		}

		static void findRiverNine()

		{

			int counter = 1;

			riverNine[0] = 9;

			while (counter < riverNine.Length)

			{

				riverNine[counter] = riverNine[counter - 1] + findSum(riverNine[counter - 1]);

				counter++;

			}

		}

		static void indexAll()

		{

			int[] max = new int[3];

			max[0] = riverOne.Max();

			max[1] = riverThree.Max();

			max[2] = riverNine.Max();

			int actualMax = max.Max();

			index = new bool[actualMax];

			for (int i = 0; i < riverOne.Length-1; i++)

			{

				index[riverOne[i]] = true;

			}

			for (int i = 0; i < riverThree.Length-1; i++)

			{

				index[riverThree[i]] = true;

			}

			for (int i = 0; i < riverNine.Length-1; i++)

			{

				index[riverNine[i]] = true;

			}

		}

		static void Main(string[] args)

		{

			findRiverOne(); findRiverThree(); findRiverNine(); indexAll();

			Console.WriteLine("Enter input");

			int input = Convert.ToInt32(Console.ReadLine());

			while (!checkIndex(input))

			{

				input = findRiver(input);

			}
			int whichRiver = checkWhichRiver (input);

			Console.WriteLine("It meets river " + whichRiver + " at: " + input);
			Console.ReadLine ();
		}

	}

}


text:
Events

        <form class="form-inline">

                Since:
                <input id="since" type="datetime-local" ng-model="model.since" class="form-control" step="any"/>

                Until:
                <input id="until" type="datetime-local" ng-model="model.until" class="form-control" step="any"/>

            <button ng-click="updateEvents()" class="btn btn-primary">Update</button>
        </form>

                Event
                From
                ID
                Time


text:
int main(int argc, char* argv[]) {
  std::cout << "CAUTION: only works correctly if intent of top and extent of bot are empty" << std::endl;

  fca::lattice l; //downward map
  std::priority_queue<fca::concept> coatoms;
  fca::chain_map chains;

  fca::arc_visitor_ptr v(new fca::depchain_visitor(l,coatoms,chains));
  fca::readDotLattice(std::cin,v);

  fca::findAltChains(std::cout,coatoms,chains,l);

}


text:
import React, { useState } from 'react';

import {
  Box,
  Button,
  CheckBox,
  Form,
  FormField,
  Grommet,
  MaskedInput,
  RadioButtonGroup,
  RangeInput,
  Select,
  TextArea,
  TextInput,
} from 'grommet';
import { grommet } from 'grommet/themes';

export const ControlledInput = () => {
  const [name, setName] = useState('');
  const [email, setEmail] = useState('');
  const [subscribe, setSubscribe] = useState(false);
  const [ampm, setAmpm] = useState('');
  const [size, setSize] = useState('');
  const [comments, setComments] = useState('');
  const [age, setAge] = useState('');
  return (
    <Grommet full theme={grommet}>
      <Box fill align="center" justify="center">
        <Box width="medium">
          <Form
            onChange={value => console.log('Change', value)}
            onReset={() => {
              setName('');
              setEmail('');
              setSubscribe(false);
              setAmpm('');
              setSize('');
              setComments('');
              setAge('');
            }}
            onSubmit={event =>
              console.log('Submit', event.value, event.touched)
            }
          >
            <FormField label="Name" name="name">
              <TextInput
                name="name"
                value={name}
                onChange={event => setName(event.target.value)}
              />
            </FormField>
            <FormField label="Email" name="email" required>
              <MaskedInput
                name="email"
                mask={[
                  { regexp: /^[\w\-_.]+$/, placeholder: 'example' },
                  { fixed: '@' },
                  { regexp: /^[\w]+$/, placeholder: 'my' },
                  { fixed: '.' },
                  { regexp: /^[\w]+$/, placeholder: 'com' },
                ]}
                value={email}
                onChange={event => setEmail(event.target.value)}
              />
            </FormField>
            <FormField name="subscribe">
              <CheckBox
                name="subscribe"
                label="Subscribe?"
                checked={subscribe}
                onChange={event => setSubscribe(event.target.checked)}
              />
            </FormField>
            <FormField name="ampm">
              <RadioButtonGroup
                name="ampm"
                options={['morning', 'evening']}
                value={ampm}
                onChange={event => setAmpm(event.target.value)}
              />
            </FormField>
            <FormField label="Size" name="size">
              <Select
                name="size"
                options={['small', 'medium', 'large']}
                value={size}
                onChange={event => setSize(event.option)}
              />
            </FormField>
            <FormField label="Comments" name="comments">
              <TextArea
                name="comments"
                value={comments}
                onChange={event => setComments(event.target.value)}
              />
            </FormField>
            <FormField label="Age" name="age" pad>
              <RangeInput
                name="age"
                min={15}
                max={75}
                value={age}
                onChange={event => setAge(event.target.value)}
              />
            </FormField>
            <Box direction="row" justify="between" margin={{ top: 'medium' }}>
              <Button label="Cancel" />
              <Button type="reset" label="Reset" />
              <Button type="submit" label="Update" primary />
            </Box>
          </Form>
        </Box>
      </Box>
    </Grommet>
  );
};

ControlledInput.storyName = 'Controlled input';

ControlledInput.parameters = {
  // chromatic disabled because snapshot is the same as ControlledInputLazy
  chromatic: { disable: true },
};

export default {
  title: 'Input/Form/Controlled input',
};


text:
package api

import (
	"fmt"

	"github.com/golang/glog"
	"github.com/opentracing/opentracing-go/log"
	"golang.org/x/net/context"

	"github.com/nlamirault/abraracourcix/io"
	"github.com/nlamirault/abraracourcix/messaging"
	"github.com/nlamirault/abraracourcix/pb/v2beta"
	"github.com/nlamirault/abraracourcix/storage"
	"github.com/nlamirault/abraracourcix/tracing"
)

const (
	UrlServiceName = "UrlService"
)

type UrlService struct {
	Storage storage.Storage
}

func NewUrlService(storage storage.Storage) *UrlService {
	glog.V(2).Infof("Create the Url service using %v", storage)
	service := &UrlService{
		Storage: storage,
	}
	service.Register()
	return service
}

func (service *UrlService) Register() {
	Services = append(Services, UrlServiceName)
}

func (ls *UrlService) List(ctx context.Context, request *v2beta.GetUrlsRequest) (*v2beta.GetUrlsResponse, error) {
	glog.V(1).Info("[url] List all urls")
	span := tracing.GetParentSpan(ctx, messaging.ListUrlsEvent)
	defer span.Finish()

	urlKeys, err := ls.Storage.List()
	if err != nil {
		return nil, tracing.GrpcError(span, err)
	}
	span.LogFields(log.Object("storage response", urlKeys))
	keys := []string{}
	for _, key := range urlKeys {
		keys = append(keys, string(key))
	}

	return &v2beta.GetUrlsResponse{
		Keys: keys,
	}, nil
}

func (ls *UrlService) Create(ctx context.Context, request *v2beta.CreateUrlRequest) (*v2beta.CreateUrlResponse, error) {
	glog.V(1).Info("[url] Create a new url")
	span := tracing.GetParentSpan(ctx, messaging.CreateUrlEvent)
	defer span.Finish()

	key, err := io.GenerateKey()
	if err != nil {
		return nil, tracing.GrpcError(span, err)
	}

	url := &storage.URL{
		LongURL:      request.Link,
		Key:          key,
		CreationDate: io.GetCreationDate(),
	}

	content, err := defaultMarshaler.Marshal(url)
	if err != nil {
		return nil, tracing.GrpcError(span, err)
	}
	if err := ls.Storage.Put([]byte(key), content); err != nil {
		return nil, tracing.GrpcError(span, err)
	}
	return &v2beta.CreateUrlResponse{
		Url: &v2beta.Url{
			Key:      url.Key,
			Link:     url.LongURL,
			Creation: fmt.Sprintf("%s", url.CreationDate),
		},
	}, nil
}

func (ls *UrlService) Get(ctx context.Context, request *v2beta.GetUrlRequest) (*v2beta.GetUrlResponse, error) {
	glog.V(1).Info("[url] Retrieve a url")
	span := tracing.GetParentSpan(ctx, messaging.GetUrlEvent)
	defer span.Finish()

	content, err := ls.Storage.Get([]byte(request.Key))
	if err != nil {
		return nil, tracing.GrpcError(span, err)
	}
	span.LogFields(log.Object("storage response", string(content)))

	var url *storage.URL
	if err := defaultMarshaler.Unmarshal(content, &url); err != nil {
		return nil, tracing.GrpcError(span, err)
	}

	return &v2beta.GetUrlResponse{
		Url: &v2beta.Url{
			Key:      url.Key,
			Link:     url.LongURL,
			Creation: fmt.Sprintf("%s", url.CreationDate),
		},
	}, nil
}


text:
define(['lib/news_special/bootstrap', 'mediator/countriesAutocompleteMediator'], function (news, CountriesAutocompleteMediator) {

    /* Constants */
    var INPUT_AUTOCOMPLETE = 'autocomplete';
    var INPUT_DROPDOWN = 'dropdown';

    /* Vars */
    var currentInputType;
    var autocompleteSelectedCountry;
    var dropdownSelectedCountry;
    var autocompleteSelected;
    var dropdownSelected;
    var countriesAutocomplete;
    var toggleInputIstats;

    /* Elements */
    var $autocompleteddInput;
    var $autocompleteEl;
    var $dropdownInput;
    var $userInputWrapperEl;
    var $submitButton;

    var init = function (countriesData) {
        /* Set defaults */
        currentInputType = INPUT_AUTOCOMPLETE;
        autocompleteSelectedCountry = null;
        dropdownSelectedCountry = null;
        autocompleteSelected = false;
        dropdownSelected = false;
        toggleInputIstats = false;

        /* Element selectors */
        $autocompleteInput = news.$('#country-search--text-input');
        $autocompleteEl = news.$('.country-search--autocomplete');
        $dropdownEl = news.$('.country-search--dropdown');
        $dropdownInput = news.$('.country-search--dropdown-input');
        $userInputWrapperEl = news.$('.country-search--inputs');
        $submitButton = news.$('.country-search--submit');

        /* Populate the inputs */
        populateInputs(countriesData);

        /* LISTENERS */
        news.$('.country-search--toggle').on('click', toggleInputMethod);
        $dropdownInput.on('change', dropdownInputChanged);
        $autocompleteInput.keypress(autocompleteInputKeypress);
        $submitButton.on('click', submit);

        $('input[type=radio][name=user-gender]').change(genderSelectionUpdate);
    };

    var populateInputs = function (countriesData) {

        //populate the dropdown
        var countryNamesArr = [];
        for (var countryKey in countriesData) {
            // countryNamesArr.push(countryKey);
            countryNamesArr.push({
                countryTranslated: countriesData[countryKey].countryNameTranslation,
                countryName: countryKey
            });
        }
        // countryNamesArr.sort();
        countryNamesArr.sort(function (a, b) {
            if ( a.countryTranslated < b.countryTranslated ) {
                return -1;
            }
            if ( a.countryTranslated > b.countryTranslated ) {
                return 1;
            }
            return 0;
        });

        var i, countriesLength = countryNamesArr.length;
        for (i = 0; i < countriesLength; i++) {
            var countryName = countryNamesArr[i].countryName;
            var countryObj = countriesData[countryName];
            var $countryOption = $('<option>' + countryNamesArr[i].countryTranslated + '</option>');
            $countryOption.data('country', countryObj);
            $dropdownInput.append($countryOption);
        }

        //populate/init the input
        countriesAutocomplete = new CountriesAutocompleteMediator($autocompleteInput, updateButtonState, countriesData);

    };

    var updateButtonState = function () {
        var disabled = true;
        if (currentInputType === INPUT_AUTOCOMPLETE && countriesAutocomplete.getSelectedCountry() !== null) {
            if ($('input[name=user-gender]:checked').length > 0) {
                disabled = false;
            }
        }
        if (currentInputType === INPUT_DROPDOWN && dropdownSelected === true) {
            if ($('input[name=user-gender]:checked').length > 0) {
                disabled = false;
            }
        }

        if (disabled) {
            $submitButton.addClass('disabled');
        } else {
            $submitButton.removeClass('disabled');
            // $submitButton.focus();
        }
    };

    var autocompleteInputKeypress = function (e) {
        var inputText = (e.target.value + String.fromCharCode(e.charCode)).toLowerCase();
        var $suggestionsHolder = news.$('.autocomplete-suggestions');
        var $autoCompletSuggestions = $suggestionsHolder.find('.autocomplete-suggestion');

        var keyCode = (window.event) ? e.which : e.keyCode;

        if (keyCode == 13 && !$submitButton.hasClass('disabled')) {
            //we've got a match and we've hit the enter key!
            if ($suggestionsHolder.css('display') == 'none') {
                $submitButton.trigger("click");
                $autocompleteInput.blur();
            }
            return;
        }

        if ($autoCompletSuggestions.length) {
            if (news.$($autoCompletSuggestions[0]).text().toLowerCase() == inputText) {
                if ($('input[name=user-gender]:checked').length > 0) {
                    $submitButton.removeClass('disabled');
                }
            }
            else {
                $submitButton.addClass('disabled');
            }
        }
    };

    var genderSelectionUpdate = function () {
        updateButtonState();
    };

    var dropdownInputChanged = function () {

        dropdownSelected = (news.$(this).val() !== 'default');
        dropdownSelectedCountry = news.$(this).find(':selected').data('country');
        updateButtonState();
    };

    var toggleInputMethod = function () {
        var $toCollapse = (currentInputType === INPUT_AUTOCOMPLETE) ? $autocompleteEl : $dropdownEl;
        var $toOpen = (currentInputType === INPUT_AUTOCOMPLETE) ? $dropdownEl : $autocompleteEl;

        /* Static height whilst animating */
        $userInputWrapperEl.css('height', $userInputWrapperEl.outerHeight());

        $toCollapse.slideUp(400, function showToOpen() {
            $toOpen.slideDown(400, function animationFinsihed() {
                $userInputWrapperEl.css('height', 'auto');
            });
        });

        currentInputType = (currentInputType === INPUT_AUTOCOMPLETE) ? INPUT_DROPDOWN : INPUT_AUTOCOMPLETE;
        updateButtonState();

        if (!toggleInputIstats) {
            news.pubsub.emit('istats', ['ns12522-change-to-dropdown', 'newsspec-interaction']);
            toggleInputIstats = false;
        }

        return false;
    };

    var getUserCountry = function () {
        return (currentInputType === INPUT_AUTOCOMPLETE) ? countriesAutocomplete.getSelectedCountry() : dropdownSelectedCountry;
    };

    var submit = function () {
        news.pubsub.emit('istats', ['ns12522-how-equal-am-I-btn-clicked', 'newsspec-interaction', currentInputType]);

        news.pubsub.emit('user-submitted-country', [getUserCountry(), (news.$('#ns_genderRadioBtnMale').is(':checked')) ? 'male' : 'female']);
    };

    var publicApi = {
        init: init,
        getUserCountry: getUserCountry,
        populateInputs: populateInputs
    };

    return publicApi;

});


text:
package lifx.java.android.light;

import java.util.ArrayList;

import lifx.java.android.entities.LFXHSBKColor;
import lifx.java.android.entities.LFXLightTarget;
import lifx.java.android.entities.LFXTypes.LFXFuzzyPowerState;
import lifx.java.android.entities.LFXTypes.LFXPowerState;
import lifx.java.android.entities.internal.LFXMessage;
import lifx.java.android.entities.internal.LFXTarget;
import lifx.java.android.entities.internal.LFXTarget.LFXTargetType;
import lifx.java.android.light.LFXLight.LFXLightListener;
import lifx.java.android.network_context.LFXNetworkContext;

public abstract class LFXLightCollection extends LFXLightTarget implements LFXLightListener
{
	public interface LFXLightCollectionListener
	{
		public void lightCollectionDidAddLight( LFXLightCollection lightCollection, LFXLight light);
		public void lightCollectionDidRemoveLight( LFXLightCollection lightCollection,  LFXLight light);

		public void lightCollectionDidChangeLabel( LFXLightCollection lightCollection, String label);
		public void lightCollectionDidChangeColor( LFXLightCollection lightCollection, LFXHSBKColor color);
		public void lightCollectionDidChangeFuzzyPowerState( LFXLightCollection lightCollection, LFXFuzzyPowerState fuzzyPowerState);
	}

	protected LFXNetworkContext networkContext;

	private ArrayList<LFXLightCollectionListener> listeners = new ArrayList<LFXLightCollectionListener>();

	protected ArrayList<LFXLight> lights;

	// Light State
	public String label;
	public LFXHSBKColor color;
	public LFXFuzzyPowerState fuzzyPowerState;

	public LFXTarget getTarget()
	{
		return null;
	}

	public LFXTargetType getTargetType()
	{
		return LFXTargetType.TAG;
	}

	public LFXLight getLightWithDeviceID( String deviceID)
	{
		for( LFXLight aLight : lights)
		{
			if( aLight.getDeviceID().equals( deviceID))
			{
				return aLight;
			}
		}
		return null;
	}

	@SuppressWarnings( "unchecked")
	public ArrayList<LFXLight> getLights()
	{
		return (ArrayList<LFXLight>) lights.clone();
	}

	// Light State
	public String getLabel()
	{
		return null;
	}

	public LFXHSBKColor getColor()
	{
		LFXHSBKColor[] lightColors = new LFXHSBKColor[lights.size()];

		for( int lightIndex = 0; lightIndex < lights.size(); lightIndex++)
		{
			lightColors[lightIndex] = lights.get( lightIndex).getColor();
		}

		return LFXHSBKColor.averageOfColors( lightColors);
	}

	public LFXFuzzyPowerState getFuzzyPowerState()
	{
		boolean isOn = false;
		boolean isOff = false;
		for( LFXLight aLight : lights)
		{
			if( aLight.getPowerState() == LFXPowerState.OFF)
			{
				isOff = true;
			}

			if( aLight.getPowerState() == LFXPowerState.ON)
			{
				isOn = true;
			}
		}

		if( isOn && isOff)
		{
			return LFXFuzzyPowerState.MIXED;
		}

		if( isOn)
		{
			return LFXFuzzyPowerState.ON;
		}

		if( isOff)
		{
			return LFXFuzzyPowerState.OFF;
		}

		return LFXFuzzyPowerState.OFF;
	}

	public LFXLight getFirstLightForLabel( String label)
	{
		for( LFXLight aLight : getLights())
		{
			if( aLight.getLabel() != null && aLight.getLabel().equals( label))
			{
				return aLight;
			}
		}

		return null;
	}

	public ArrayList<LFXLight> getLightsForLabel( String label)
	{
		ArrayList<LFXLight> lights = new ArrayList<LFXLight>();

		for( LFXLight aLight : getLights())
		{
			if( aLight.getLabel() != null && aLight.getLabel().equals( label))
			{
				lights.add( aLight);
			}
		}

		return lights;
	}

	// Light Control
	public void setLabel( String label)
	{
		for( LFXLightCollectionListener aListener : listeners)
		{
			aListener.lightCollectionDidChangeLabel( this, label);
		}
	}

	public void setColor( LFXHSBKColor color)
	{
	}

	public void setColorOverDuration( LFXHSBKColor color, long duration)
	{
		for( LFXLightCollectionListener aListener : listeners)
		{
			aListener.lightCollectionDidChangeColor( this, color);
		}
	}

	public abstract void handleMessage( LFXMessage message);

	public void addLight( LFXLight light)
	{
		lights.add( light);

		for( LFXLightCollectionListener aListener : listeners)
		{
			aListener.lightCollectionDidAddLight( this, light);
		}
	}

	public void removeLight( LFXLight light)
	{
		lights.remove( light);

		for( LFXLightCollectionListener aListener : listeners)
		{
			aListener.lightCollectionDidRemoveLight( this, light);
		}
	}

	public void removeAllLights()
	{
		for( LFXLight aLight : lights)
		{
			for( LFXLightCollectionListener aListener : listeners)
			{
				aListener.lightCollectionDidRemoveLight( this, aLight);
			}
		}

		lights.clear();
	}

	public void addLightCollectionListener( LFXLightCollectionListener listener)
	{
		if( !listeners.contains( listener))
		{
			listeners.add( listener);
		}
	}

	public void removeAllLightCollectionListeners( LFXLightCollection lightCollection )
	{
		listeners.clear();
	}

	public void removeLightCollectionListener( LFXLightCollectionListener listener)
	{
		listeners.remove( listener);
	}

	@Override
	public void lightDidChangeLabel( LFXLight light, String label)
	{

	}

	@Override
	public void lightDidChangeColor( LFXLight light, LFXHSBKColor color)
	{

	}

	@Override
	public void lightDidChangePowerState( LFXLight light, LFXPowerState powerState)
	{

	}
}


text:
<?php

namespace Google\Service\AndroidProvisioningPartner;

class ListVendorsResponse extends \Google\Collection
{
  protected $collection_key = 'vendors';
  /**
   * @var string
   */
  public $nextPageToken;
  /**
   * @var int
   */
  public $totalSize;
  protected $vendorsType = Company::class;
  protected $vendorsDataType = 'array';

  /**
   * @param string
   */
  public function setNextPageToken($nextPageToken)
  {
    $this->nextPageToken = $nextPageToken;
  }
  /**
   * @return string
   */
  public function getNextPageToken()
  {
    return $this->nextPageToken;
  }
  /**
   * @param int
   */
  public function setTotalSize($totalSize)
  {
    $this->totalSize = $totalSize;
  }
  /**
   * @return int
   */
  public function getTotalSize()
  {
    return $this->totalSize;
  }
  /**
   * @param Company[]
   */
  public function setVendors($vendors)
  {
    $this->vendors = $vendors;
  }
  /**
   * @return Company[]
   */
  public function getVendors()
  {
    return $this->vendors;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListVendorsResponse::class, 'Google_Service_AndroidProvisioningPartner_ListVendorsResponse');


text:
<?php

/* The general layout of the classes is as follows:
 *
 *      Subspace   Directory (i/f)
 *           \     /       \
 *            \   /         \
 *     DirectorySubspace    DirectoryLayer
 *              |
 *              |
 *     DirectoryPartition
 */
namespace FDB\Directory;

require_once("fdb.subspace.php");

class HighContentionAllocator {
	private $counters;
	private $recent;

	public function __construct($subspace) {
		$this->counters = $subspace[0];
		$this->recent = $subspace[1];
	}

	public function allocate( $db_or_tr ) {
		return $db_or_tr->transact( function($tr) {
			$range = $tr->snapshot->get_range(
				$this->counters->range()[0],
				$this->counters->range()[1], 1, True)->to_array();
			if(count($range) == 0) {
				$start = 0;
				$count = 0;
			} else {
				// We know that there will only be one entry, is there another way to get key and value?
				foreach ($range as $k => $v) {
					$start = $this->counters->unpack($k)[0];
					$count = \unpack("V2int", $v)["int1"];
				}
			}

			$window = $this->window_size($start);
			if(($count + 1) * 2 >= $window) {
				# advance the window
				unset( $tr[ array( $this->counters, $this->counters[$start]->key() . "\x00" ) ] );
				$start += $window;
				unset( $tr[ array( $this->recent, $this->recent[$start] )] );
				$window = $this->window_size($start);
			}

			# Increment the allocation count for the current window
			$tr->add($this->counters[$start], \pack("V", 1) . "\x00\x00\x00\x00");

			while(True) {
				# As of the snapshot being read from, the window is less than half
				# full, so this should be expected to take 2 tries.  Under high
				# contention (and when the window advances), there is an additional
				# subsequent risk of conflict for this transaction.
				$candidate = \rand($start, ($start + $window) - 1);
				if( $tr[ $this->recent[ $candidate ] ]->wait() === null ) {
					$tr[ $this->recent[ $candidate ] ] = "";
					return \FDB\Tuple\pack( array($candidate) );
				}
			}
		});
	}

	private function window_size($start) {
		if($start < 255)
			return 64;
		if($start < 65535)
			return 1024;
		return 8192;
	}
}

function starts_with( $a, $b ) {
	if( is_array($a) || is_array($b) ) {
		if( !is_array($a) || !is_array($b) )
			throw new \Exception("Array-based invocations must both be arrays");
		if( count($a) < count($b) )
			return False;
		for( $i = 0; $i < count($b); $i++) {
			if( $a[$i] != $b[$i] )
				return False;
		}
		return True;
	}
	return substr($a, 0, strlen($b)) === $b;
}

interface Directory {
	public function create_or_open($db_or_tr, $path, $layer=null);

	public function open($db_or_tr, $path, $layer=null);

	public function create($db_or_tr, $path, $layer=null, $prefix=null);

	public function list_children($db_or_tr, $path=array());

	public function move($db_or_tr, $old_path, $new_path);

	public function move_to($db_or_tr, $new_absolute_path);

	public function remove($db_or_tr, $path=array());

	public function remove_if_exists($db_or_tr, $path=array());

	public function exists($db_or_tr, $path=array());

	public function get_layer();

	public function get_path();
}

function tuplify_path($path) {
	if(!is_array($path))
		$path = array($path);
	return $path;
}

function to_unicode_path( $path ) {
	if( $path instanceof \FDB\Tuple\UnicodeString )
		return array( $path );
	if( is_string($path) )
		return array( new \FDB\Tuple\UnicodeString($path) );

	if( is_array($path) ) {
		$fixed = array();
		foreach( $path as $i => $v ) {
			if( $v instanceof \FDB\Tuple\UnicodeString )
				$fixed[] = $v;
			elseif( is_string($v) )
				$fixed[] = new \FDB\Tuple\UnicodeString($v);
			else
				throw new \Exception("Path elements must be strings (" . get_class( $v ) . " at " . $i . ")");
		}
		return $fixed;
	}

	throw new \Exception("Invalid path: must be a string or an array of strings");
}

class DirectoryLayer implements Directory {
	private $content_subspace;
	private $node_subspace;
	private $root_node;
	private $allocator;
	private $path;

	# Transactional methods
	private $create_or_open;
	private $move;
	private $remove;
	private $remove_if_exists;
	private $list;
	private $exists;

	private static $SUBDIRS = 0;
	private static $VERSION = array(1,0,0);

	public function __construct( $node_subspace = null, $content_subspace = null, $allow_manual_prefixes = false ) {
		if( $node_subspace === null )
			$node_subspace = new \FDB\Subspace\Subspace( array(), "\xfe");
		if( $content_subspace === null )
			$content_subspace = new \FDB\Subspace\Subspace();

		# If specified, new automatically allocated prefixes will all fall within content_subspace
		$this->content_subspace = $content_subspace;
		$this->node_subspace = $node_subspace;
		$this->allow_manual_prefixes = $allow_manual_prefixes;

		# The root node is the one whose contents are the node subspace
		$this->root_node = $node_subspace[ $node_subspace->key() ];
		$this->allocator = new HighContentionAllocator( $this->root_node[ 'hca' ] );
		$this->layer = '';
		$this->path = array();
	}

	public function create_or_open( $db_or_tr, $path, $layer = null ) {
		return $this->create_or_open_internal( $db_or_tr, $path, $layer, null, True, True );
	}

	public function open( $db_or_tr, $path, $layer = null ) {
		return $this->create_or_open_internal($db_or_tr, $path, $layer, null, False, True);
	}

	public function create( $db_or_tr, $path, $layer = null, $prefix = null ) {
		return $this->create_or_open_internal($db_or_tr, $path, $layer, $prefix, True, False);
	}

	public function move_to( $db_or_tr, $new_absolute_path ) {
        throw new \Exception('The root directory cannot be moved.');
    }

   	public function move( $db_or_tr, $old_path, $new_path ) {
		return $db_or_tr->transact( function( $tr ) use( $old_path, $new_path ) {
			$this->check_version( $tr );

			$old_path = to_unicode_path( $old_path );
			$new_path = to_unicode_path( $new_path );

			if( starts_with( $new_path, $old_path ) )
				throw new \Exception("The destination directory cannot be a subdirectory of the source directory.");

			$old_node = $this->find($tr, $old_path)->prefetch_metadata( $tr );
			$new_node = $this->find($tr, $new_path)->prefetch_metadata( $tr );

			if( !$old_node->exists() )
				throw new \Exception("The source directory does not exist.");

			$old_in_part = $old_node->is_in_partition();
			$new_in_part = $new_node->is_in_partition();
			if( $old_in_part or $new_in_part ) {
				if( !$old_in_part or !$new_in_part or $old_node->path != $new_node->path )
					throw new \Exception("Cannot move between partitions.");

				return $new_node->get_contents($this)->move($tr,
					$old_node->get_partition_subpath(), $new_node->get_partition_subpath());
			}

			if( $new_node->exists() )
				throw new \Exception("The destination directory already exists. It must be removed.");

			$parent_node = $this->find($tr, array_slice($new_path, 0, -1) );
			if( !$parent_node->exists() )
				throw new \Exception("The parent of the destination directory does not exist. Create it first.");
			$tr[ $parent_node->subspace[ \FDB\Directory\DirectoryLayer::$SUBDIRS ][$new_path[ count( $new_path ) - 1 ]]] =
				$this->node_subspace->unpack($old_node->subspace->key())[0];
			$this->remove_from_parent($tr, $old_path);
			return $this->contents_of_node( $old_node->subspace, $new_path, $old_node->layer());
		});
	}

	public function remove( $db_or_tr, $path = array() ) {
		return $db_or_tr->transact( function( $tr ) use( $path ) {
			return $this->remove_internal( $tr, $path, True );
		});
	}

	public function remove_if_exists( $db_or_tr, $path = array() ) {
		return $db_or_tr->transact( function( $tr ) use( $path ) {
			return $this->remove_internal( $tr, $path, False );
		});
	}

	public function list_children( $db_or_tr, $path = array() ) {
		return $db_or_tr->transact(  function( $tr ) use( $path ) {
			$this->check_version( $tr, False );

			$path = to_unicode_path( $path );
			$node = $this->find($tr, $path)->prefetch_metadata($tr);

			if( !$node->exists() )
				throw new \Exception("The given directory does not exist.");

			if( $node->is_in_partition( $tr, True ) )
				return $node->get_contents($this)->list_children($tr, $node->get_partition_subpath());

			$children = array();
			foreach($this->subdir_names_and_nodes($tr, $node->subspace) as $name => $cnode) {
				$children[] = $name;
			}
			return $children;
		});
	}

	public function exists( $db_or_tr, $path = array() ) {
		return $db_or_tr->transact( function( $tr ) use( $path ) {
			$this->check_version( $tr, False );

			$path = to_unicode_path( $path );
			$node = $this->find($tr, $path)->prefetch_metadata($tr);

			if( !$node->exists() )
				return False;

			if( $node->is_in_partition() )
				return $node->get_contents($this)->exists($tr, $node->get_partition_subpath());

			return True;
		});
	}

	public function get_layer() {
		return $this->layer;
	}

	public function get_path() {
		return $this->path;
	}

	public function set_path( $path ) {
		if(!is_array($path))
			throw new \Exception("path can only be set to an array");

		$this->path = $path;
	}

	########################################
	## Private methods for implementation ##
	########################################

	private function create_or_open_internal( $db_or_tr, $path, $layer = null, $prefix = null, $allow_create = True, $allow_open = True ) {
		return $db_or_tr->transact( function( $tr ) use( $path, $layer, $prefix, $allow_create, $allow_open ) {
			$this->check_version( $tr, False );

			if($prefix !== null and !$this->allow_manual_prefixes) {
				if(count($path) === 0)
					throw new \Exception("Cannot specify a prefix unless manual prefixes are enabled.");
				else
					throw new \Exception("Cannot specify a prefix in a partition.");
			}

			$path = to_unicode_path( $path );

			if($path === null || count( $path ) == 0)
				throw new \Exception("The root directory may not be opened");

			$existing_node = $this->find( $tr, $path )->prefetch_metadata( $tr );

			if($existing_node->exists()) {
				if($existing_node->is_in_partition()) {
					$subpath = $existing_node->get_partition_subpath();
					$contents = $existing_node->get_contents($this);
					$sublayer = $contents->get_dir_layer();
					return $sublayer->create_or_open_internal(
						$tr, $subpath, $layer, $prefix, $allow_create, $allow_open);
				}

				if( !$allow_open )
					throw new \Exception("The directory already exists");

				if( $layer !== null && strlen($layer) > 0 && $existing_node->layer() != $layer )
					throw new \Exception("The directory exists but was created with an incompatible layer.");

				return $existing_node->get_contents($this);
			}

			if( !$allow_create )
				throw new \Exception("The directory does not exist.");

			$this->check_version($tr);

			if( $prefix === null ) {
				$prefix = $this->content_subspace->key() . $this->allocator->allocate( $tr );

				if( count( $tr->get_range_startswith($prefix, 1)->to_array() ) > 0) {
					throw new \Exception("The database has keys stored at the prefix chosen by the automatic prefix allocator: " .
											\FDB\printable($prefix) . ".");
				}

				if( !$this->is_prefix_free($tr->snapshot, $prefix) ) {
					throw new \Exception("The directory layer has manually allocated prefixes that conflict with the " .
											"automatic prefix allocator.");
				}
			}
			else if( !$this->is_prefix_free( $tr, $prefix ) )
				throw new \Exception("The given prefix is already in use.");

			if( count($path) > 1 )
				$parent_node = $this->node_with_prefix( $tr, $this->create_or_open_internal($tr, array_slice($path, 0, -1))->key() );
			else
				$parent_node = $this->root_node;

			if( $parent_node === null )
				throw new \Exception("The parent directory doesn't exist.");

			$node = $this->node_with_prefix($tr, $prefix);
			$leaf = array_slice($path, -1);
			$key = $parent_node[ \FDB\Directory\DirectoryLayer::$SUBDIRS ][ $leaf ];
			$tr[ $key ] = $prefix;
			if( $layer === null )
				$layer = '';

			$tr[$node['layer']] = $layer;

			return $this->contents_of_node( $node, $path, $layer);
		});
	}

	# This will be called only from inside a "transactional" function
	private function remove_internal( $tr, $path, $fail_on_nonexistent ) {
		$this->check_version( $tr );

		$path = to_unicode_path($path);

		if( $path === null || count( $path ) == 0 )
			throw new \Exception("The root directory may not be removed.");

		$node = $this->find($tr, $path)->prefetch_metadata($tr);

		if( !$node->exists() ) {
			if( $fail_on_nonexistent )
				throw new \Exception("The directory doesn't exist.");
			return False;
		}

		if( $node->is_in_partition() ) {
			$contents = $node->get_contents($this);
			$sublayer = $contents->get_dir_layer();
			$subpath = $node->get_partition_subpath();
			return $sublayer->remove_internal($tr, $subpath, $fail_on_nonexistent);
		}

		$this->remove_recursive($tr, $node->subspace);
		$this->remove_from_parent($tr, $path);
		return True;
	}

	private function check_version( $tr, $write_access = True ) {
		$version = $tr[ $this->root_node[ 'version' ]];

		if( $version->wait() === null ) {
			if( $write_access ) {
				$this->initialize_directory( $tr );
			}

			return;
		}

		$version = \unpack( "V3int", $version->wait() );
		if( $version['int1'] > \FDB\Directory\DirectoryLayer::$VERSION[0] )
			throw new \Exception("Cannot load directory with version");// %d.%d.%d using directory layer %d.%d.%d" % (version + self.VERSION));
		if( $version['int2'] > \FDB\Directory\DirectoryLayer::$VERSION[1] && $write_access )
			throw new \Exception("Directory with later version is read only");
	}

	private function initialize_directory( $tr ) {
		$v = \FDB\Directory\DirectoryLayer::$VERSION;
		$tr[ $this->root_node[ 'version' ]] = \pack( "VVV", $v[0], $v[1], $v[2] );
	}

	private function node_containing_key( $tr, $key ) {
		# Right now this is only used for _is_prefix_free(), but if we add
		# parent pointers to directory nodes, it could also be used to find a
		# path based on a key.
		if( starts_with( $key, $this->node_subspace->key() ) ) {
			return $this->root_node;
		}

		$range = $tr->get_range(
			$this->node_subspace->range( array() )[0],
			$this->node_subspace->pack( array( $key ) ) . "\x00",
			1, True);
		foreach( $range as $k => $value ) {
			$prev_prefix = $this->node_subspace->unpack( $k )[0];
			if( starts_with( $key, $prev_prefix ) )
				return new \FDB\Subspace\Subspace( array(), $k );
		}
		return null;
	}

	private function node_with_prefix( $tr, $prefix ) {
		if( $prefix === null )
			return null;
		return $this->node_subspace[ $prefix ];
	}

	function contents_of_node( $node, $path, $layer = "" ) {
		$prefix = $this->node_subspace->unpack( $node->key() )[0];

		if( $layer == 'partition' ) {
			return new DirectoryPartition( array_merge($this->path, $path), $prefix, $this );
		}
		return new DirectorySubspace( array_merge($this->path, $path), $prefix, $this, $layer );
	}

	private function find( $tr, $path ) {
		$n = new Node( $this->root_node, array(), $path );
		foreach( $path as $i => $name ) {
			$n = new Node(
				$this->node_with_prefix( $tr, $tr[ $n->subspace[\FDB\Directory\DirectoryLayer::$SUBDIRS][ $name ]]->wait() ),
				\array_slice( $path, 0, $i + 1 ), $path );
			if( !$n->exists() or $n->layer( $tr ) == 'partition' )
				return $n;
		}
		return $n;
	}

	private function subdir_names_and_nodes( $tr, $node ) {
		$sd = $node[ \FDB\Directory\DirectoryLayer::$SUBDIRS ];
		$out = array();
		foreach( $tr[ $sd->range( array() )] as $k => $v ) {
			$off = $sd->unpack( $k )[0];
			$out[ $off->__toString() ] = $this->node_with_prefix( $tr, $v );
		}
		return $out;
	}

	private function remove_from_parent( $tr, $path ) {
		$parent = $this->find( $tr, array_slice( $path, 0, -1 ) );
		unset( $tr[ $parent->subspace[ \FDB\Directory\DirectoryLayer::$SUBDIRS ][ array_slice( $path, -1 )[0] ]] );
	}

	private function remove_recursive( $tr, $node ) {
		foreach( $this->subdir_names_and_nodes( $tr, $node ) as $name => $sn ) {
			$this->remove_recursive( $tr, $sn );
		}
		$tr->clear_range_startswith( $this->node_subspace->unpack( $node->key() )[0] );
		unset( $tr[ $node->range( array() )] );
	}

	private function is_prefix_free( $tr, $prefix ) {
		# Returns true if the given prefix does not "intersect" any currently
		# allocated prefix (including the root node). This means that it neither
		# contains any other prefix nor is contained by any other prefix.
		if( $prefix === null || strlen( $prefix ) == 0 )
			return False;
		if( $this->node_containing_key( $tr, $prefix ) !== null )
			return False;
		$nodes_with_prefix = $tr->get_range( $this->node_subspace->pack( array( $prefix ) ),
											 $this->node_subspace->pack( array( \FDB\strinc( $prefix ) ) ),
								   			1 )->to_array();
		return count( $nodes_with_prefix ) == 0;
	}

	public static $Directory;
}

DirectoryLayer::$Directory = new DirectoryLayer();

class DirectorySubspace extends \FDB\Subspace\Subspace implements Directory {
	protected $directory_layer; // Accessed by DirectoryPartition
	private $path;
	private $layer;

	public function __construct( $path, $prefix, $directory_layer = DirectoryLayer::Directory, $layer = null) {
		parent::__construct( array(), $prefix );
		$this->path = $path;
		$this->directory_layer = $directory_layer;
		$this->layer = $layer;
	}

	public function get_layer() {
		return $this->layer;
	}

	public function get_path() {
		return $this->path;
	}

	public function get_dir_layer() {
		return $this->directory_layer;
	}

	public function create_or_open($db_or_tr, $path, $layer=null) {
		$path = tuplify_path($path);
		$subpath = $this->partition_subpath($path);
		return $this->directory_layer->create_or_open($db_or_tr, $subpath, $layer);
	}

	public function open($db_or_tr, $path, $layer=null) {
		$path = tuplify_path($path);
		$subpath = $this->partition_subpath($path);
		return $this->directory_layer->open($db_or_tr, $subpath, $layer);
	}

	public function create($db_or_tr, $path, $layer=null, $prefix=null) {
		$path = tuplify_path($path);
		$subpath = $this->partition_subpath($path);
		return $this->directory_layer->create($db_or_tr, $subpath, $layer, $prefix);
	}

	public function list_children($db_or_tr, $path=array()) {
		$path = tuplify_path($path);
		$subpath = $this->partition_subpath($path);
		return $this->directory_layer->list_children($db_or_tr, $subpath);
	}

	public function move($db_or_tr, $old_path, $new_path) {
		$oldpath = tuplify_path($old_path);
		$oldsubpath = $this->partition_subpath($oldpath);
		$newpath = tuplify_path($new_path);
		$newsubpath = $this->partition_subpath($newpath);
		return $this->directory_layer->move($db_or_tr, $oldsubpath, $newsubpath);
	}

	public function move_to($db_or_tr, $new_absolute_path) {
        $directory_layer = $this->get_layer_for_path(array());
        $new_absolute_path = to_unicode_path($new_absolute_path);
        $partition_len = count($directory_layer->get_path());
        $partition_path = array_slice($new_absolute_path, 0, $partition_len);
        if( $partition_path != $directory_layer->get_path() )
            throw new \Exception("Cannot move between partitions.");

        return $directory_layer->move($db_or_tr,
        	array_slice($this->path, $partition_len),
        	array_slice($new_absolute_path, $partition_len));
	}

	public function remove($db_or_tr, $path=array()) {
		$path = tuplify_path($path);
		$directory_layer = $this->get_layer_for_path($path);
		$subpath = $this->partition_subpath($path, $directory_layer);
		return $directory_layer->remove($db_or_tr, $subpath);
	}

	public function remove_if_exists($db_or_tr, $path=array()) {
		$path = tuplify_path($path);
		$directory_layer = $this->get_layer_for_path($path);
		$subpath = $this->partition_subpath($path, $directory_layer);
		return $directory_layer->remove_if_exists($db_or_tr, $subpath);
	}

	public function exists($db_or_tr, $path=array()) {
		$path = tuplify_path($path);
		$directory_layer = $this->get_layer_for_path($path);
		$subpath = $this->partition_subpath($path, $directory_layer);
		return $directory_layer->exists($db_or_tr, $subpath);
	}

	private function partition_subpath($path, $directory_layer = null) {
		if($directory_layer === null)
			$directory_layer = $this->directory_layer;

		$slice = array_slice($this->path, count($directory_layer->get_path()));
		$result = array_merge($slice, $path);
		return $result;
	}

    # Called by all functions that could operate on this subspace directly (move_to, remove, remove_if_exists, exists)
    # Subclasses can choose to return a different directory layer to use for the operation if path is in fact empty
    protected function get_layer_for_path($path) {
        return $this->directory_layer;
    }
}

class DirectoryPartition extends DirectorySubspace {
	private $parent_directory_layer;

	public function __construct($path, $prefix, $parent_directory_layer) {
		$directory_layer = new DirectoryLayer(
			new \FDB\Subspace\Subspace(array(), $prefix . "\xfe"),
			new \FDB\Subspace\Subspace(array(), $prefix));
		$directory_layer->set_path( $path );
		parent::__construct( $path, $prefix, $directory_layer, 'partition' );

		$this->parent_directory_layer = $parent_directory_layer;
	}

	public function key() {
		throw new \Exception("Cannot get key for the root of a directory partition.");
	}

	public function pack( $t = array() ) {
		throw new \Exception("Cannot pack keys using the root of a directory partition.");
	}

	public function unpack( $key ) {
		throw new \Exception("Cannot unpack keys using the root of a directory partition.");
	}

	public function range( $t = array() ) {
		throw new \Exception("Cannot get range for the root of a directory partition.");
	}

	public function contains( $key ) {
		throw new \Exception("Cannot check whether a key belongs to the root of a directory partition.");
	}

	public function as_foundationdb_key() {
		throw new \Exception("Cannot use the root of a directory partition as a key.");
	}

	public function subspace($tuple) {
		throw new \Exception("Cannot open subspace in the root of a directory partition.");
	}

	protected function get_layer_for_path($path) {
		if( count( $path ) == 0 )
			return $this->parent_directory_layer;
		return $this->directory_layer;
	}
}

class Node {
	public $path;
	public $subspace;
	public $target_path;
	public $layer;

	public function __construct( $subspace, $path, $target_path ) {
		$this->subspace = $subspace;
		$this->path = $path;
		$this->target_path = $target_path;
		$this->layer = -1;
	}

	public function exists() {
		return $this->subspace !== null;
	}

	public function prefetch_metadata( $tr ) {
		if( $this->exists() )
			$this->layer( $tr );

		return $this;
	}

	public function layer( $tr = null ) {
		if( $tr !== null ) {
			if( !($tr instanceof \FDB\ReadTransaction) && !($tr instanceof \FDB\Transaction)) {
				throw new \Exception("Parameter tr must be a Transaction!");
			}

			$val = $tr[ $this->subspace['layer'] ];
			$this->layer = $val->wait();
		}
		else if( $this->layer == -1 ) {
			throw new \Exception("Layer has not been read");
		}

		return $this->layer;
	}

	public function is_in_partition( $tr = null, $include_empty_subpath = False ) {
		return $this->exists() &&
			$this->layer( $tr ) == 'partition' &&
			($include_empty_subpath || count( $this->target_path ) > count( $this->path ));
	}

	public function get_partition_subpath() {
		return array_slice( $this->target_path, count( $this->path ) );
	}

	public function get_contents( $directory_layer, $tr = null ) {
		return $directory_layer->contents_of_node( $this->subspace, $this->path, $this->layer( $tr ));
	}
}

?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="97">
  <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
    <logicalFolder name="SourceFiles"
                   displayName="Source Files"
                   projectFiles="true">
      <itemPath>src/clients.cpp</itemPath>
      <itemPath>src/clients.h</itemPath>
      <itemPath>src/db.cpp</itemPath>
      <itemPath>src/db.h</itemPath>
      <itemPath>src/epg.cpp</itemPath>
      <itemPath>src/epg.h</itemPath>
      <itemPath>src/event_info.h</itemPath>
      <itemPath>src/recordings.cpp</itemPath>
      <itemPath>src/recordings.h</itemPath>
      <itemPath>src/session.cpp</itemPath>
      <itemPath>src/session.h</itemPath>
      <itemPath>src/source.cpp</itemPath>
      <itemPath>src/source.h</itemPath>
      <itemPath>src/sources.cpp</itemPath>
      <itemPath>src/sources.h</itemPath>
      <itemPath>src/tv-service.cpp</itemPath>
      <itemPath>src/tv-service.h</itemPath>
      <itemPath>src/tv.cpp</itemPath>
    </logicalFolder>
    <logicalFolder name="TestFiles"
                   displayName="Test Files"
                   projectFiles="false"
                   kind="TEST_LOGICAL_FOLDER">
    </logicalFolder>
    <logicalFolder name="ExternalFiles"
                   displayName="Important Files"
                   projectFiles="false"
                   kind="IMPORTANT_FILES_FOLDER">
      <itemPath>Makefile</itemPath>
    </logicalFolder>
  </logicalFolder>
  <projectmakefile>Makefile</projectmakefile>
  <confs>
    <conf name="Debug" type="1">
      <toolsSet>
        <compilerSet>default</compilerSet>
        <dependencyChecking>true</dependencyChecking>
        <rebuildPropChanged>false</rebuildPropChanged>
      </toolsSet>
      <compileType>
        <ccTool>
          <standard>8</standard>
          <incDir>
            <pElem>../common/common/src</pElem>
            <pElem>../common/yami4/include</pElem>
            <pElem>../common/easyloggingpp/src</pElem>
          </incDir>
          <preprocessorList>
            <Elem>_DEBUG</Elem>
          </preprocessorList>
          <warningLevel>2</warningLevel>
        </ccTool>
        <linkerTool>
          <output>../bin/${CND_CONF}/tv</output>
          <linkerAddLib>
            <pElem>../common/yami4/lib</pElem>
          </linkerAddLib>
          <linkerLibItems>
            <linkerLibLibItem>PocoData</linkerLibLibItem>
            <linkerLibLibItem>PocoFoundation</linkerLibLibItem>
            <linkerLibLibItem>PocoNet</linkerLibLibItem>
            <linkerLibLibItem>PocoDataSQLite</linkerLibLibItem>
            <linkerLibLibItem>boost_program_options</linkerLibLibItem>
            <linkerLibLibItem>boost_system</linkerLibLibItem>
            <linkerLibLibItem>boost_filesystem</linkerLibLibItem>
            <linkerLibLibItem>boost_thread</linkerLibLibItem>
            <linkerLibLibItem>pthread</linkerLibLibItem>
            <linkerLibProjectItem>
              <makeArtifact PL="../common/common"
                            CT="3"
                            CN="Debug"
                            AC="false"
                            BL="true"
                            WD="../common/common"
                            BC="${MAKE}  -f Makefile CONF=Debug"
                            CC="${MAKE}  -f Makefile CONF=Debug clean"
                            OP="../bin/${CND_CONF}/libcommon.a">
              </makeArtifact>
            </linkerLibProjectItem>
            <linkerLibLibItem>yamicpp</linkerLibLibItem>
            <linkerLibLibItem>yamicore</linkerLibLibItem>
          </linkerLibItems>
        </linkerTool>
      </compileType>
      <item path="src/clients.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/clients.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/db.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/db.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/epg.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/epg.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/event_info.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/recordings.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/recordings.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/session.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/session.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/source.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/source.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/sources.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/sources.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/tv-service.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/tv-service.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/tv.cpp" ex="false" tool="1" flavor2="0">
      </item>
    </conf>
    <conf name="Release" type="1">
      <toolsSet>
        <compilerSet>default</compilerSet>
        <dependencyChecking>true</dependencyChecking>
        <rebuildPropChanged>false</rebuildPropChanged>
      </toolsSet>
      <compileType>
        <cTool>
          <developmentMode>5</developmentMode>
        </cTool>
        <ccTool>
          <developmentMode>5</developmentMode>
          <stripSymbols>true</stripSymbols>
          <standard>8</standard>
          <incDir>
            <pElem>../common/common/src</pElem>
            <pElem>../common/yami4/include</pElem>
          </incDir>
          <warningLevel>2</warningLevel>
        </ccTool>
        <fortranCompilerTool>
          <developmentMode>5</developmentMode>
        </fortranCompilerTool>
        <asmTool>
          <developmentMode>5</developmentMode>
        </asmTool>
        <linkerTool>
          <output>../bin/${CND_CONF}/tv</output>
          <linkerAddLib>
            <pElem>../common/yami4/lib</pElem>
          </linkerAddLib>
          <linkerLibItems>
            <linkerLibLibItem>PocoData</linkerLibLibItem>
            <linkerLibLibItem>PocoFoundation</linkerLibLibItem>
            <linkerLibLibItem>PocoSQLite</linkerLibLibItem>
            <linkerLibLibItem>PocoNet</linkerLibLibItem>
            <linkerLibLibItem>boost_program_options</linkerLibLibItem>
            <linkerLibLibItem>boost_system</linkerLibLibItem>
            <linkerLibLibItem>boost_thread</linkerLibLibItem>
            <linkerLibLibItem>pthread</linkerLibLibItem>
            <linkerLibProjectItem>
              <makeArtifact PL="../common/common"
                            CT="3"
                            CN="Release"
                            AC="false"
                            BL="true"
                            WD="../common/common"
                            BC="${MAKE}  -f Makefile CONF=Release"
                            CC="${MAKE}  -f Makefile CONF=Release clean"
                            OP="../bin/${CND_CONF}/libcommon.a">
              </makeArtifact>
            </linkerLibProjectItem>
            <linkerLibLibItem>yamicpp</linkerLibLibItem>
            <linkerLibLibItem>yamicore</linkerLibLibItem>
          </linkerLibItems>
        </linkerTool>
      </compileType>
      <item path="src/clients.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/clients.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/db.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/db.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/epg.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/epg.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/event_info.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/recordings.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/recordings.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/session.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/session.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/source.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/source.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/sources.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/sources.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/tv-service.cpp" ex="false" tool="1" flavor2="0">
      </item>
      <item path="src/tv-service.h" ex="false" tool="3" flavor2="0">
      </item>
      <item path="src/tv.cpp" ex="false" tool="1" flavor2="0">
      </item>
    </conf>
  </confs>
</configurationDescriptor>


text:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.vertx</groupId>
    <artifactId>integration-tests</artifactId>
    <version>3.5.0</version>
  </parent>

  <artifactId>vertx-metrics-examples-it</artifactId>

  <properties>
    <fastbuild>false</fastbuild>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.klieber</groupId>
        <artifactId>phantomjs-maven-plugin</artifactId>
        <version>0.7</version>
        <executions>
          <execution>
            <goals>
              <goal>install</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <version>2.1.1</version>
        </configuration>
      </plugin>

      <plugin>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-integration-test-maven-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>clone-vertx-examples</id>
            <goals>
              <goal>clone</goal>
            </goals>
            <phase>process-sources</phase>
            <configuration>
              <url>https://github.com/vert-x3/vertx-examples/archive/${vertx.examples.branch}.zip</url>
              <prefix>vertx-examples-${vertx.examples.branch}</prefix>
              <includes>
                <include>**/metrics-examples/**/*</include>
                <include>vertx-examples-${vertx.examples.branch}/pom.xml</include>
                <include>**/examples-utils/**/*</include>
              </includes>
              <excludes>
                <exclude>**/README.adoc</exclude>
              </excludes>
              <skip>${fastbuild}</skip>
            </configuration>
          </execution>

          <execution>
            <id>run-it</id>
            <goals>
              <goal>run-it</goal>
            </goals>
            <phase>integration-test</phase>
            <configuration>
              <vertxHome>${project.build.directory}/vert.x-${vertx.version}/vertx</vertxHome>
              <inputDirectory>${project.basedir}/src/it</inputDirectory>
              <outputDirectory>${project.build.directory}/it</outputDirectory>
              <additionalProperties>
                <base>${project.build.directory}/it/metrics-examples</base>
                <dependencies>${project.build.directory}/dependencies</dependencies>
                <phantomjs.binary.path>${phantomjs.binary}</phantomjs.binary.path>
              </additionalProperties>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.10</version>
        <executions>
          <execution>
            <id>unpack-vertx-stack</id>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <phase>process-resources</phase>
            <configuration>
              <includeArtifactIds>vertx-stack-manager</includeArtifactIds>
              <outputDirectory>${project.build.directory}/vert.x-${vertx.version}</outputDirectory>
              <skip>${fastbuild}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.2</version>
        <executions>
          <execution>
            <id>install-examples-parent</id>
            <phase>package</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <file>${project.build.directory}/tmp/unzip/vertx-examples-${vertx.examples.branch}/pom.xml</file>
              <pomFile>${project.build.directory}/tmp/unzip/vertx-examples-${vertx.examples.branch}/pom.xml</pomFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>1.10</version>
        <executions>
          <execution>
            <id>build-examples-utils</id>
            <goals>
              <goal>run</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <invokerTest>examples-utils</invokerTest>
              <goals>
                <goal>clean</goal>
                <goal>install</goal>
              </goals>
              <skipInvocation>${fastbuild}</skipInvocation>
              <profiles>
                <profile>staging</profile>
              </profiles>
            </configuration>
          </execution>

          <execution>
            <id>build-examples</id>
            <goals>
              <goal>run</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <invokerTest>metrics-examples</invokerTest>
              <goals>
                <goal>clean</goal>
                <goal>package</goal>
                <goal>org.apache.maven.plugins:maven-dependency-plugin:copy-dependencies</goal>
              </goals>
              <skipInvocation>${fastbuild}</skipInvocation>
              <properties>
                <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
              </properties>
              <profiles>
                <profile>staging</profile>
              </profiles>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>


text:
//
//  SecondViewController.m
//  SdkDemo
//
//  Created by sangfor on 2016/11/16.
//  Copyright © 2016年 sangfor. All rights reserved.
//

#import "SecondViewController.h"
#import "SFNetworkingManager.h"
#import "AuthHelper.h"

@interface SecondViewController ()

@end

#define UIPickerView_Width      ([UIScreen mainScreen].bounds.size.width/2)
#define UIPickerView_Row_Height 30

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    UITapGestureRecognizer *tapAction = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewTapped:)];
    tapAction.cancelsTouchesInView = NO;
    [self.view addGestureRecognizer:tapAction];

    [mPickView setDelegate:self];
    [mPickView setDataSource:self];
    [mWebView setDelegate:self];

    SFNetworkingManager *mgr = [SFNetworkingManager sharedInstance];
    mgr.webview = mWebView;
    [mgr setCompletionHandler:^(NSURLResponse *response, id responseObj, NSError *error) {
        if (error) {
            [self logResponse:response withObject:error];
        } else {
            [self logResponse:response withObject:responseObj];
        }
    }];

    // Do any additional setup after loading the view from its nib.

    mLogView.layer.borderWidth = 1;
    mWebView.layer.borderWidth = 1;

//    mUrlTf.text = @"http://10.136.6.53:8080";
    mUrlTf.text = @"http://100.100.139.20";
}

/**
 *  收起键盘
 *
 *  @param tapRecognizer <#tapRecognizer description#>
 */
-(void)viewTapped:(UITapGestureRecognizer*)tapRecognizer
{
    [self.view endEditing:YES];
}

- (IBAction)logoutAction:(id)sender {
    [[AuthHelper getInstance] logoutVpn];

    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)logResponse:(NSURLResponse *)response withObject:(id)obj {
    if ([obj isKindOfClass:NSData.class]) {
        obj = [[NSString alloc] initWithData:obj encoding:NSUTF8StringEncoding];
    }

    dispatch_async(dispatch_get_main_queue(), ^{
        [mLogView scrollsToTop];
        NSString *log = [NSString stringWithFormat:@"===================header==================\n%@\n==================response=================\n%@", response, obj];
        if (response == nil) {
            log = [NSString stringWithFormat:@"===================header==================\nignore header(%@)\n==================response=================\n%@", [NSDate date], obj];
        }
        mLogView.text = log;
        mWebView.hidden = YES;
    });
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)requestAction:(id)sender {
    NSString *urlStr = [mUrlTf text];

    if (!urlStr || urlStr.length == 0) {
        return;
    }

    SFNetworkingManager *mgr = [SFNetworkingManager sharedInstance];
    [mgr setUrlString:urlStr];

    NSInteger row = [mPickView selectedRowInComponent:0];
    id classString = mgr.registedClasses[row];
    row = [mPickView selectedRowInComponent:1];
    NSArray *selectors = [mgr registedMethodsForClass:classString];
    NSString *selectorString = selectors[row];
    SEL selector = NSSelectorFromString(selectorString);
    if (selector) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
        [mgr performSelectorInBackground:selector withObject:nil];
#pragma clang diagnostic pop
    }
}

#pragma mark -
#pragma mark UIPickerViewDataSource
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
    return 2;
}

- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
    NSInteger count = 0;
    SFNetworkingManager *mgr = [SFNetworkingManager sharedInstance];

    if (component == 0) {
        count = mgr.registedClasses.count;
    } else if (component == 1) {
        NSInteger selectedRow = [pickerView selectedRowInComponent:0];
        id key = mgr.registedClasses[selectedRow];
        NSArray *selectors = [mgr registedMethodsForClass:key];
        count = selectors.count;
    }
    return count;
}

#pragma mark -
#pragma mark UIPickerViewDelegate
- (nullable NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
    NSString *title;
    SFNetworkingManager *mgr = [SFNetworkingManager sharedInstance];
    if (component == 0) {
        title = mgr.registedClasses[row];
    } else if (component == 1) {
        NSInteger selectedRow = [pickerView selectedRowInComponent:0];
        id key = mgr.registedClasses[selectedRow];
        NSArray *selectors = [mgr registedMethodsForClass:key];
        title = selectors[row];
    }

    return title;
}

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
    if (component == 0) {
        [pickerView reloadComponent:1];
    }
}

- (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component {
    return UIPickerView_Width;
}

- (CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component {
    return UIPickerView_Row_Height;
}

- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {
    UILabel* pickerLabel = (UILabel*)view;
    if (!pickerLabel) {
        pickerLabel = [[UILabel alloc] init];
        CGFloat width = [self pickerView:pickerView widthForComponent:component];
        CGFloat height = [self pickerView:pickerView rowHeightForComponent:component];
        pickerLabel.frame = CGRectMake(0, 0, width, height);
        pickerLabel.adjustsFontSizeToFitWidth = YES;
        [pickerLabel setTextAlignment:NSTextAlignmentCenter];
        [pickerLabel setBackgroundColor:[UIColor clearColor]];
        [pickerLabel setFont:[UIFont boldSystemFontOfSize:20]];
    }

    pickerLabel.text= [self pickerView:pickerView titleForRow:row forComponent:component];
    return pickerLabel;
}

@end


text:
         @span
         Span (NISO JATS table model)

The number of columns that will share the <col> or <colgroup> element's attributes. (This attribute is based on and
intended to be converted easily to the XHMTL span attribute.)


text:
//   Copyright 2012-2013 Fraunhofer FOKUS
//
//   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 de.fraunhofer.fokus.fuzzing.fuzzino.heuristics.generators.number;

import java.util.List;

import de.fraunhofer.fokus.fuzzing.fuzzino.exceptions.NoMatchingValuesException;
import de.fraunhofer.fokus.fuzzing.fuzzino.heuristics.ComposedFuzzingHeuristic;
import de.fraunhofer.fokus.fuzzing.fuzzino.heuristics.FuzzingHeuristic;
import de.fraunhofer.fokus.fuzzing.fuzzino.heuristics.generators.NumberGenerator;
import de.fraunhofer.fokus.fuzzing.fuzzino.request.IntegerSpecification;
import de.fraunhofer.fokus.fuzzing.fuzzino.request.RequestFactory;
import de.fraunhofer.fokus.fuzzing.fuzzino.util.LongFromRangesBuilder;
import de.fraunhofer.fokus.fuzzing.fuzzino.util.LongRange;

/**
 * This class returns all numbers from several ranges that aren't connected.
 * For this purpose the class {@link AscendingLongList} is used.
 *
 * @author Martin Schneider (martin.schneider@fokus.fraunhofer.de)
 */
public class LongFromRanges extends ComposedFuzzingHeuristic<Long> implements NumberGenerator<Long> {

	private static final long serialVersionUID = 5755165007328149946L;
	protected IntegerSpecification numberSpec;

	public static class Builder extends LongFromRangesBuilder {

		public Builder(long start, long end) {
			super(start, end);
		}

		public Builder(LongRange range) {
			super(range);
		}
	}

	public LongFromRanges(IntegerSpecification numberSpec, List<FuzzingHeuristic> owners, long seed, LongFromRangesBuilder builder) {
		super(seed, owners);
		this.owners.add(this);
		if (numberSpec == null) {
			this.numberSpec = RequestFactory.INSTANCE.createNumberSpecification();
		}
		else {
			this.numberSpec = numberSpec;
		}
		for (LongRange range : builder.allRanges()) {
			AscendingLongList intList;
			try {
				intList = new AscendingLongList(numberSpec, owners, seed, new AscendingLongList.Builder(range.start(), range.size()));
				heuristics.add(intList);
			} catch (NoMatchingValuesException e) {
			}
		}
	}

	@Override
	public String getName() {
		return "LongFromRanges";
	}

	@Override
	public boolean canCreateValuesFor(IntegerSpecification numberSpec) {
		return true;
	}

}


text:
using namespace luabind;

const CGameGraph *get_game_graph		()
{
	return				(&ai().game_graph());
}

const CGameGraph::CHeader *get_header	(const CGameGraph *self)
{
	return				(&self->header());
}

bool get_accessible1					(const CGameGraph *self, const u32 &vertex_id)
{
	return				(self->accessible(vertex_id));
}

void get_accessible2					(const CGameGraph *self, const u32 &vertex_id, bool value)
{
	self->accessible	(vertex_id,value);
}

Fvector CVertex__level_point			(const CGameGraph::CVertex *vertex)
{
	THROW				(vertex);
	return				(vertex->level_point());
}

Fvector CVertex__game_point				(const CGameGraph::CVertex *vertex)
{
	THROW				(vertex);
	return				(vertex->game_point());
}

#pragma optimize("s",on)
void CGameGraph::script_register		(lua_State *L)
{
	module(L)
	[
		def("game_graph",	&get_game_graph),

		class_<CGameGraph>("CGameGraph")
			.def("accessible",		&get_accessible1)
			.def("accessible",		&get_accessible2)
			.def("valid_vertex_id",	&CGameGraph::valid_vertex_id)
			.def("vertex",			&CGameGraph::vertex)
			.def("vertex_id",		&CGameGraph::vertex_id),

		class_<CVertex>("GameGraph__CVertex")
			.def("level_point",		&CVertex__level_point)
			.def("game_point",		&CVertex__game_point)
			.def("level_id",		&CVertex::level_id)
			.def("level_vertex_id",	&CVertex::level_vertex_id)
	];
}


text:
using System;

namespace Mapsui.Styles.Thematics
{
    public class ThemeStyle : Style, IThemeStyle
    {
        private readonly Func<IFeature, IStyle?> _method;

        public ThemeStyle(Func<IFeature, IStyle?> method)
        {
            _method = method;
        }

        public IStyle? GetStyle(IFeature attribute)
        {
            return _method(attribute);
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
	<dimen name="title_text_size">19sp</dimen>
	<dimen name="main_content_text_size">17sp</dimen>
	<dimen name="sub_content_text_size">14sp</dimen>
	<dimen name="bottom_customer_text_size">19sp</dimen>
	<dimen name="chat_nick_text_size">13sp</dimen>
	<dimen name="new_leave_text_size">16sp</dimen>
</resources>


text:
module Compass::Core::SassExtensions::Functions::Selectors
  COMMA_SEPARATOR = /\s*,\s*/

  # Permute multiple selectors each of which may be comma delimited, the end result is
  # a new selector that is the equivalent of nesting each under the previous selector.
  # To illustrate, the following mixins are equivalent:
  #
  #     @include mixin-a($selector1, $selector2, $selector3) {
  #       #{$selector1} {
  #         #{$selector2} {
  #           #{$selector3} {
  #             width: 2px
  #           }
  #         }
  #       }
  #     }
  #     @include mixin-b($selector1, $selector2, $selector3) {
  #       #{nest($selector, $selector2, $selector3)} {
  #         width: 2px
  #       }
  #     }
  def nest(*arguments)
    nested = arguments.map{|a| a.value}.inject do |memo,arg|
      ancestors = memo.split(COMMA_SEPARATOR)
      descendants = arg.split(COMMA_SEPARATOR)
      ancestors.map{|a| descendants.map{|d| "#{a} #{d}"}.join(", ")}.join(", ")
    end
    unquoted_string(nested)
  end

  # Permute two selectors, the first may be comma delimited.
  # The end result is a new selector that is the equivalent of nesting the second
  # selector under the first one in a sass file and preceding it with an &.
  # To illustrate, the following mixins are equivalent, except the second
  # mixin handles:
  #
  #     @include mixin-a($selector, $to-append) {
  #       #{$selector} {
  #         &#{$to-append} {
  #           width: 2px
  #         }
  #       }
  #     }
  #
  #     @include mixin-b($selector, $to-append) {
  #       #{append_selector($selector, $to-append)} {
  #         width: 2px
  #       }
  #     }
  def append_selector(selector, to_append)
    ancestors = selector.value.split(COMMA_SEPARATOR)
    descendants = to_append.value.split(COMMA_SEPARATOR)
    nested = ancestors.map{|a| descendants.map{|d| "#{a}#{d}"}.join(", ")}.join(", ")
    unquoted_string(nested)
  end

  # Return the header selectors for the levels indicated
  # Defaults to all headers h1 through h6
  # For example:
  # headers(all) => h1, h2, h3, h4, h5, h6
  # headers(4) => h1, h2, h3, h4
  # headers(2,4) => h2, h3, h4
  def headers(from = nil, to = nil)
    if from && !to
      if from.is_a?(Sass::Script::Value::String) && from.value == "all"
        from = number(1)
        to = number(6)
      else
        to = from
        from = number(1)
      end
    else
      from ||= number(1)
      to ||= number(6)
    end
    list((from.value..to.value).map{|n| identifier("h#{n}")}, :comma)
  end
  alias headings headers
end


text:
namespace ui {

namespace {
constexpr uint32_t kMaxCompositorVersion = 4;
constexpr uint32_t kMaxGtkPrimarySelectionDeviceManagerVersion = 1;
constexpr uint32_t kMaxLinuxDmabufVersion = 3;
constexpr uint32_t kMaxSeatVersion = 4;
constexpr uint32_t kMaxShmVersion = 1;
constexpr uint32_t kMaxXdgShellVersion = 1;
constexpr uint32_t kMaxDeviceManagerVersion = 3;
constexpr uint32_t kMaxWpPresentationVersion = 1;
constexpr uint32_t kMaxTextInputManagerVersion = 1;
constexpr uint32_t kMinWlDrmVersion = 2;
constexpr uint32_t kMinWlOutputVersion = 2;
}  // namespace

WaylandConnection::WaylandConnection() = default;

WaylandConnection::~WaylandConnection() = default;

bool WaylandConnection::Initialize() {
  static const wl_registry_listener registry_listener = {
      &WaylandConnection::Global,
      &WaylandConnection::GlobalRemove,
  };

  display_.reset(wl_display_connect(nullptr));
  if (!display_) {
    LOG(ERROR) << "Failed to connect to Wayland display";
    return false;
  }

  registry_.reset(wl_display_get_registry(display_.get()));
  if (!registry_) {
    LOG(ERROR) << "Failed to get Wayland registry";
    return false;
  }

  // Now that the connection with the display server has been properly
  // estabilished, initialize the event source and input objects.
  DCHECK(!event_source_);
  event_source_ =
      std::make_unique<WaylandEventSource>(display(), wayland_window_manager());

  wl_registry_add_listener(registry_.get(), &registry_listener, this);
  while (!wayland_output_manager_ ||
         !wayland_output_manager_->IsOutputReady()) {
    wl_display_roundtrip(display_.get());
  }

  buffer_manager_host_ = std::make_unique<WaylandBufferManagerHost>(this);

  if (!compositor_) {
    LOG(ERROR) << "No wl_compositor object";
    return false;
  }
  if (!shm_) {
    LOG(ERROR) << "No wl_shm object";
    return false;
  }
  if (!shell_v6_ && !shell_) {
    LOG(ERROR) << "No Wayland shell found";
    return false;
  }

  // When we are running tests with weston in headless mode, the seat is not
  // announced.
  if (!seat_)
    LOG(WARNING) << "No wl_seat object. The functionality may suffer.";

  return true;
}

void WaylandConnection::ScheduleFlush() {
  // When we are in tests, the message loop is set later when the
  // initialization of the OzonePlatform complete. Thus, just
  // flush directly. This doesn't happen in normal run.
  if (!base::MessageLoopCurrentForUI::IsSet()) {
    Flush();
  } else if (!scheduled_flush_) {
    base::ThreadTaskRunnerHandle::Get()->PostTask(
        FROM_HERE,
        base::BindOnce(&WaylandConnection::Flush, base::Unretained(this)));
    scheduled_flush_ = true;
  }
}

void WaylandConnection::SetCursorBitmap(const std::vector<SkBitmap>& bitmaps,
                                        const gfx::Point& location) {
  if (!cursor_)
    return;
  cursor_->UpdateBitmap(bitmaps, location, serial_);
}

void WaylandConnection::StartDrag(const ui::OSExchangeData& data,
                                  int operation) {
  if (!dragdrop_data_source_)
    dragdrop_data_source_ = data_device_manager_->CreateSource();
  dragdrop_data_source_->Offer(data);
  dragdrop_data_source_->SetAction(operation);
  data_device_->StartDrag(dragdrop_data_source_->data_source(), data);
}

void WaylandConnection::FinishDragSession(uint32_t dnd_action,
                                          WaylandWindow* source_window) {
  if (source_window)
    source_window->OnDragSessionClose(dnd_action);
  data_device_->ResetSourceData();
  dragdrop_data_source_.reset();
}

void WaylandConnection::DeliverDragData(const std::string& mime_type,
                                        std::string* buffer) {
  data_device_->DeliverDragData(mime_type, buffer);
}

void WaylandConnection::RequestDragData(
    const std::string& mime_type,
    base::OnceCallback<void(const std::vector<uint8_t>&)> callback) {
  data_device_->RequestDragData(mime_type, std::move(callback));
}

bool WaylandConnection::IsDragInProgress() {
  // |data_device_| can be null when running on headless weston.
  if (!data_device_)
    return false;
  return data_device_->IsDragEntered() || drag_data_source();
}

void WaylandConnection::Flush() {
  wl_display_flush(display_.get());
  scheduled_flush_ = false;
}

void WaylandConnection::UpdateInputDevices(wl_seat* seat,
                                           uint32_t capabilities) {
  DCHECK(seat);
  DCHECK(event_source_);
  auto has_pointer = capabilities & WL_SEAT_CAPABILITY_POINTER;
  auto has_keyboard = capabilities & WL_SEAT_CAPABILITY_KEYBOARD;
  auto has_touch = capabilities & WL_SEAT_CAPABILITY_TOUCH;

  if (!has_pointer) {
    pointer_.reset();
    cursor_.reset();
    wayland_cursor_position_.reset();
  } else if (wl_pointer* pointer = wl_seat_get_pointer(seat)) {
    pointer_ = std::make_unique<WaylandPointer>(pointer, this, event_source());
    cursor_ = std::make_unique<WaylandCursor>(pointer_.get(), this);
    wayland_cursor_position_ = std::make_unique<WaylandCursorPosition>();
  } else {
    LOG(ERROR) << "Failed to get wl_pointer from seat";
  }

  if (!has_keyboard) {
    keyboard_.reset();
  } else if (wl_keyboard* keyboard = wl_seat_get_keyboard(seat)) {
    auto* layout_engine =
        KeyboardLayoutEngineManager::GetKeyboardLayoutEngine();
    keyboard_ = std::make_unique<WaylandKeyboard>(keyboard, this, layout_engine,
                                                  event_source());
  } else {
    LOG(ERROR) << "Failed to get wl_keyboard from seat";
  }

  if (!has_touch) {
    touch_.reset();
  } else if (wl_touch* touch = wl_seat_get_touch(seat)) {
    touch_ = std::make_unique<WaylandTouch>(touch, this, event_source());
  } else {
    LOG(ERROR) << "Failed to get wl_touch from seat";
  }
}

void WaylandConnection::EnsureDataDevice() {
  if (!data_device_manager_ || !seat_)
    return;
  DCHECK(!data_device_);
  wl_data_device* data_device = data_device_manager_->GetDevice();
  data_device_ = std::make_unique<WaylandDataDevice>(this, data_device);

  if (primary_selection_device_manager_) {
    primary_selection_device_ = std::make_unique<GtkPrimarySelectionDevice>(
        this, primary_selection_device_manager_->GetDevice());
  }

  clipboard_ = std::make_unique<WaylandClipboard>(
      data_device_manager_.get(), data_device_.get(),
      primary_selection_device_manager_.get(), primary_selection_device_.get());
}

// static
void WaylandConnection::Global(void* data,
                               wl_registry* registry,
                               uint32_t name,
                               const char* interface,
                               uint32_t version) {
  static const wl_seat_listener seat_listener = {
      &WaylandConnection::Capabilities,
      &WaylandConnection::Name,
  };
  static const xdg_wm_base_listener shell_listener = {
      &WaylandConnection::Ping,
  };
  static const zxdg_shell_v6_listener shell_v6_listener = {
      &WaylandConnection::PingV6,
  };

  WaylandConnection* connection = static_cast<WaylandConnection*>(data);
  if (!connection->compositor_ && strcmp(interface, "wl_compositor") == 0) {
    connection->compositor_ = wl::Bind<wl_compositor>(
        registry, name, std::min(version, kMaxCompositorVersion));
    connection->compositor_version_ = version;
    if (!connection->compositor_)
      LOG(ERROR) << "Failed to bind to wl_compositor global";
  } else if (!connection->subcompositor_ &&
             strcmp(interface, "wl_subcompositor") == 0) {
    connection->subcompositor_ = wl::Bind<wl_subcompositor>(registry, name, 1);
    if (!connection->subcompositor_)
      LOG(ERROR) << "Failed to bind to wl_subcompositor global";
  } else if (!connection->shm_ && strcmp(interface, "wl_shm") == 0) {
    wl::Object<wl_shm> shm =
        wl::Bind<wl_shm>(registry, name, std::min(version, kMaxShmVersion));
    connection->shm_ = std::make_unique<WaylandShm>(shm.release(), connection);
    if (!connection->shm_)
      LOG(ERROR) << "Failed to bind to wl_shm global";
  } else if (!connection->seat_ && strcmp(interface, "wl_seat") == 0) {
    connection->seat_ =
        wl::Bind<wl_seat>(registry, name, std::min(version, kMaxSeatVersion));
    if (!connection->seat_) {
      LOG(ERROR) << "Failed to bind to wl_seat global";
      return;
    }
    wl_seat_add_listener(connection->seat_.get(), &seat_listener, connection);
    connection->EnsureDataDevice();
  } else if (!connection->shell_v6_ &&
             strcmp(interface, "zxdg_shell_v6") == 0) {
    // Check for zxdg_shell_v6 first.
    connection->shell_v6_ = wl::Bind<zxdg_shell_v6>(
        registry, name, std::min(version, kMaxXdgShellVersion));
    if (!connection->shell_v6_) {
      LOG(ERROR) << "Failed to bind to zxdg_shell_v6 global";
      return;
    }
    zxdg_shell_v6_add_listener(connection->shell_v6_.get(), &shell_v6_listener,
                               connection);
  } else if (!connection->shell_v6_ && !connection->shell_ &&
             strcmp(interface, "xdg_wm_base") == 0) {
    connection->shell_ = wl::Bind<xdg_wm_base>(
        registry, name, std::min(version, kMaxXdgShellVersion));
    if (!connection->shell_) {
      LOG(ERROR) << "Failed to bind to xdg_wm_base global";
      return;
    }
    xdg_wm_base_add_listener(connection->shell_.get(), &shell_listener,
                             connection);
  } else if (base::EqualsCaseInsensitiveASCII(interface, "wl_output")) {
    if (version < kMinWlOutputVersion) {
      LOG(ERROR)
          << "Unable to bind to the unsupported wl_output object with version= "
          << version << ". Minimum supported version is "
          << kMinWlOutputVersion;
      return;
    }

    wl::Object<wl_output> output = wl::Bind<wl_output>(registry, name, version);
    if (!output) {
      LOG(ERROR) << "Failed to bind to wl_output global";
      return;
    }

    if (!connection->wayland_output_manager_) {
      connection->wayland_output_manager_ =
          std::make_unique<WaylandOutputManager>();
    }
    connection->wayland_output_manager_->AddWaylandOutput(name,
                                                          output.release());
  } else if (!connection->data_device_manager_ &&
             strcmp(interface, "wl_data_device_manager") == 0) {
    wl::Object<wl_data_device_manager> data_device_manager =
        wl::Bind<wl_data_device_manager>(
            registry, name, std::min(version, kMaxDeviceManagerVersion));
    if (!data_device_manager) {
      LOG(ERROR) << "Failed to bind to wl_data_device_manager global";
      return;
    }
    connection->data_device_manager_ =
        std::make_unique<WaylandDataDeviceManager>(
            data_device_manager.release(), connection);
    connection->EnsureDataDevice();
  } else if (!connection->primary_selection_device_manager_ &&
             strcmp(interface, "gtk_primary_selection_device_manager") == 0) {
    wl::Object<gtk_primary_selection_device_manager> manager =
        wl::Bind<gtk_primary_selection_device_manager>(
            registry, name, kMaxGtkPrimarySelectionDeviceManagerVersion);
    connection->primary_selection_device_manager_ =
        std::make_unique<GtkPrimarySelectionDeviceManager>(manager.release(),
                                                           connection);
  } else if (!connection->zwp_dmabuf_ &&
             (strcmp(interface, "zwp_linux_dmabuf_v1") == 0)) {
    wl::Object<zwp_linux_dmabuf_v1> zwp_linux_dmabuf =
        wl::Bind<zwp_linux_dmabuf_v1>(
            registry, name, std::min(version, kMaxLinuxDmabufVersion));
    connection->zwp_dmabuf_ = std::make_unique<WaylandZwpLinuxDmabuf>(
        zwp_linux_dmabuf.release(), connection);
  } else if (!connection->presentation_ &&
             (strcmp(interface, "wp_presentation") == 0)) {
    connection->presentation_ =
        wl::Bind<wp_presentation>(registry, name, kMaxWpPresentationVersion);
  } else if (!connection->text_input_manager_v1_ &&
             strcmp(interface, "zwp_text_input_manager_v1") == 0) {
    connection->text_input_manager_v1_ = wl::Bind<zwp_text_input_manager_v1>(
        registry, name, std::min(version, kMaxTextInputManagerVersion));
    if (!connection->text_input_manager_v1_) {
      LOG(ERROR) << "Failed to bind to zwp_text_input_manager_v1 global";
      return;
    }
  } else if (!connection->drm_ && (strcmp(interface, "wl_drm") == 0) &&
             version >= kMinWlDrmVersion) {
    auto wayland_drm = wl::Bind<struct wl_drm>(registry, name, version);
    connection->drm_ =
        std::make_unique<WaylandDrm>(wayland_drm.release(), connection);
  }

  connection->ScheduleFlush();
}

// static
void WaylandConnection::GlobalRemove(void* data,
                                     wl_registry* registry,
                                     uint32_t name) {
  WaylandConnection* connection = static_cast<WaylandConnection*>(data);
  // The Wayland protocol distinguishes global objects by unique numeric names,
  // which the WaylandOutputManager uses as unique output ids. But, it is only
  // possible to figure out, what global object is going to be removed on the
  // WaylandConnection::GlobalRemove call. Thus, whatever unique |name| comes,
  // it's forwarded to the WaylandOutputManager, which checks if such a global
  // output object exists and removes it.
  if (connection->wayland_output_manager_)
    connection->wayland_output_manager_->RemoveWaylandOutput(name);
}

// static
void WaylandConnection::Capabilities(void* data,
                                     wl_seat* seat,
                                     uint32_t capabilities) {
  WaylandConnection* self = static_cast<WaylandConnection*>(data);
  DCHECK(self);
  self->UpdateInputDevices(seat, capabilities);
  self->ScheduleFlush();
}

// static
void WaylandConnection::Name(void* data, wl_seat* seat, const char* name) {}

// static
void WaylandConnection::PingV6(void* data,
                               zxdg_shell_v6* shell_v6,
                               uint32_t serial) {
  WaylandConnection* connection = static_cast<WaylandConnection*>(data);
  zxdg_shell_v6_pong(shell_v6, serial);
  connection->ScheduleFlush();
}

// static
void WaylandConnection::Ping(void* data, xdg_wm_base* shell, uint32_t serial) {
  WaylandConnection* connection = static_cast<WaylandConnection*>(data);
  xdg_wm_base_pong(shell, serial);
  connection->ScheduleFlush();
}

}  // namespace ui


text:
using System.Collections.Generic;
using PortableLeagueApi.Interfaces.Core;

namespace PortableLeagueApi.Interfaces.Static.Mastery
{
    public interface IMastery : IApiModel
    {
        int Id { get; set; }
        IList<string> Description { get; set; }
        IImage Image { get; set; }
        string Name { get; set; }
        string Prereq { get; set; }
        int Ranks { get; set; }
        IList<string> SanitizedDescription { get; set; }
    }
}