text:
 Materias en la que esta matriculado

 Aqui se muestran las Materias en las que esta actualmente matriculado.
    Puede añadir mas usando haciendo click en el boton o eliminar alguna Materia usando esta tabla

    <input autocomplete=off class="form-control buscatit2" placeholder="Filtrar" type="text" name="name">

<form action="../controllers/delmat.php" class="header box-main" method="post">
  <?php foreach ($misMaterias as $key): ?>

       <?php echo $key->getMat_name(); ?> (<?php echo $key->nombreTitulacion(); ?>)
      <button type="submit" class="btn btn-danger" type="submit" name="<?php echo $key->getMat_id(); ?>">Eliminar</button>

  <?php endforeach; ?>
</form>

 Todas las Materias por titulacion

 se muestran todas las materias de las titulaciones a las que se ha subscrito. Si no se lista ninguna materia tiene que subscribirse a una titulacion en "mis titulaciones"

  <input autocomplete=off class="form-control buscatit2" placeholder="Filtrar" type="text" name="name">

<form action="../controllers/addmateria.php" class="header box-main" method="post">
  <?php foreach ($misTitulaciones as $titulacion): ?>

<?php echo $titulacion->getTit_name(); ?>

    <?php foreach ($titulacion->materias() as $materia): ?>

       <?php echo $materia->getMat_name(); ?>
      <button type="submit" class="btn btn-success" type="submit" name="<?php echo $materia->getMat_id(); ?>">Añadir</button>

    <?php endforeach; ?>
  <?php endforeach; ?>
</form>


text:
DOCBUILD=../doctools/webdocs/docbuild

VERBOSE=--verbose

FETCHTS=.fetch.ts
LOCALFETCH=.LocalFetch.ts

all: help

help:
	@echo "Usage:"
	@echo "- make clean: clean all generated files"
	@echo "- make fetch: fetch the site if necessary"
	@echo "- make localFetch: fetch the site if necessary but use local file."
	@echo "- make build: build the site"
	@echo "- make push: push the built site"
	@echo "- make serve: serve the site"

.PHONY: clean
clean:
	$(DOCBUILD) $(VERBOSE) --clean
	rm -f $(FETCHTS)
	rm -f $(LOCALFETCH)

$(LOCALFETCH): $(wildcard content/toc/*/fetched_files.yml)
	$(DOCBUILD) $(VERBOSE) --localFetch --fetch --force
	touch $(FETCHTS)
	touch $@

$(FETCHTS): $(wildcard content/toc/*/fetched_files.yml)
	$(DOCBUILD) $(VERBOSE) $(LOCAL_FETCHTS) --fetch --force
	touch $@

.PHONY: fetch
fetch: $(FETCHTS)
	@echo "Fetched files up to date."

.PHONY: localFetch
localFetch: $(LOCALFETCH) $(FETCHTS)
	@echo "Fetched files up to date and copy local file."

.PHONY: build
build: $(FETCHTS)
	$(DOCBUILD) $(VERBOSE) --build

.PHONY: push
push: $(FETCHTS)
	$(DOCBUILD) $(VERBOSE) --build --push

.PHONY: serve
serve: $(FETCHTS)
	$(DOCBUILD) $(VERBOSE) --build --serve

redpajama_set_name: RedPajamaGithub


text:
<?php
namespace lukisongroup\purchasing\models\salesmanorder;

use Yii;
use yii\base\Model;
use lukisongroup\hrd\models\Employe;
use lukisongroup\purchasing\models\rqt\Requestterm;
use lukisongroup\purchasing\models\rqt\Rtdetail;
use lukisongroup\purchasing\models\rqt\Requesttermstatus;
use common\components\Notification;
use common\models\MessageNotify;
use lukisongroup\purchasing\models\data_term\Termdetail;
/**
 * @author ptrnov  <piter@lukison.com>
 * @since 1.1
 *
 * SignatureForm | Static Model get form Employe Model
 * Check Oldpassword -> field [Employe->SIGPASSWORD]
 * set Oldpassword -> field [Employe->SIGPASSWORD]
 * Identity -> field [Employe->EMP_ID] | Session Yii::$app->user->identity->EMP_ID
 * depends [lukisongroup\hrd\models\Employe] | setPassword_signature() | validateOldPasswordCheck()
 * depends [lukisongroup\sistem\controllers\UserProfileController] | actionPasswordSignatureForm() | actionPasswordSignatureSaved()
 */
class Auth3Model extends Model
{
    public $empNm;
    public $kdso;
  	public $status;
  	public $password;

  	//public $findPasswords; // @property Digunakan jika Form Attribute di gunakan
  	private $_empid = false;
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
			[['password'], 'required'],
			['password', 'number','numberPattern' => '/^[0-9]*$/i'],
			['password', 'string', 'min' => 8,  'message'=> 'Please enter 8 digit'],
			['password', 'findPasswords'],
			['status', 'required'],
			['status', 'integer'],
			[['kdso','empNm'], 'string']
        ];
    }

	/**
     * Password Find Oldpassword for validation
	 * @author ptrnov  <piter@lukison.com>
	 * @since 1.1
     */
	public function findPasswords($attribute, $params)
    {
		/*
		 * @author ptrnov  <piter@lukison.com>
		 * @since 1.1
		*/
		if (!$this->hasErrors()) {
			 $empid = $this->getEmpid();
			if (!$empid || !$empid->validateOldPasswordCheck($this->password)) {
                $this->addError($attribute, 'Incorrect password.');
            }
       }
    }

	/**
     * Finds record by EMP_ID
     * @return EMP_ID|null
	 * Also can use | $model = Employe::find()->where(['EMP_ID' => Yii::$app->user->identity->EMP_ID])->one();
	 * @author ptrnov  <piter@lukison.com>
	 * @since 1.1
     */
    public function getEmpid()
    {
        if ($this->_empid === false) {
            $this->_empid = Employe::find()->where(['EMP_ID' => Yii::$app->user->identity->EMP_ID])->one();
        }
        return $this->_empid;
    }

	public function getProfile(){
		$profile=Yii::$app->getUserOpt->Profile_user();
		return $profile->emp;
	}
}


text:
require "lib.json"

PORT = 49160

function P8INT:SETUP()
end

function P8INT:SEND_KEY(code)
    if (code == -1) then
	   return
    end
    local ip = Properties["Device IP Address"] or ""
    local splice = 12
    local skyClient = C4:CreateTCPClient()
	   :OnConnect(function(client)
		 client:ReadAtLeast(1)
	   end)
	   :OnRead(function (client, data)
		  if (string.len(data) < 24) then
			 client:Write(string.sub(data, 0, splice))
			 client:ReadAtLeast(1)
			 splice = 1
		  else
			 client:Write(string.char(4,1,0,0,0,0,math.floor(224 + (code/16)), code % 16))
			 client:Write(string.char(4,0,0,0,0,0,math.floor(224 + (code/16)), code % 16))
		  end
	   end)
	   :Connect(ip, PORT)
end

function P8INT:TURN_ON()
   LogInfo("Powering Sky+ HD On")
   P8INT:SEND_KEY(0)
end


text:
<?php
/**
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 * @since 1.23
 */

/**
 * Recent changes feed.
 *
 * @ingroup API
 */
class ApiFeedRecentChanges extends ApiBase {

	/**
	 * This module uses a custom feed wrapper printer.
	 *
	 * @return ApiFormatFeedWrapper
	 */
	public function getCustomPrinter() {
		return new ApiFormatFeedWrapper( $this->getMain() );
	}

	/**
	 * Format the rows (generated by SpecialRecentchanges or SpecialRecentchangeslinked)
	 * as an RSS/Atom feed.
	 */
	public function execute() {
		$config = $this->getConfig();

		$this->params = $this->extractRequestParams();

		if ( !$config->get( 'Feed' ) ) {
			$this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' );
		}

		$feedClasses = $config->get( 'FeedClasses' );
		if ( !isset( $feedClasses[$this->params['feedformat']] ) ) {
			$this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' );
		}

		$this->getMain()->setCacheMode( 'public' );
		if ( !$this->getMain()->getParameter( 'smaxage' ) ) {
			// bug 63249: This page gets hit a lot, cache at least 15 seconds.
			$this->getMain()->setCacheMaxAge( 15 );
		}

		$feedFormat = $this->params['feedformat'];
		$specialClass = $this->params['target'] !== null
			? 'SpecialRecentchangeslinked'
			: 'SpecialRecentchanges';

		$formatter = $this->getFeedObject( $feedFormat, $specialClass );

		// Parameters are passed via the request in the context… :(
		$context = new DerivativeContext( $this );
		$context->setRequest( new DerivativeRequest(
			$this->getRequest(),
			$this->params,
			$this->getRequest()->wasPosted()
		) );

		// The row-getting functionality should be factored out of ChangesListSpecialPage too…
		$rc = new $specialClass();
		$rc->setContext( $context );
		$rows = $rc->getRows();

		$feedItems = $rows ? ChangesFeed::buildItems( $rows ) : array();

		ApiFormatFeedWrapper::setResult( $this->getResult(), $formatter, $feedItems );
	}

	/**
	 * Return a ChannelFeed object.
	 *
	 * @param string $feedFormat Feed's format (either 'rss' or 'atom')
	 * @param string $specialClass Relevant special page name (either 'SpecialRecentchanges' or
	 *     'SpecialRecentchangeslinked')
	 * @return ChannelFeed
	 */
	public function getFeedObject( $feedFormat, $specialClass ) {
		if ( $specialClass === 'SpecialRecentchangeslinked' ) {
			$title = Title::newFromText( $this->params['target'] );
			if ( !$title ) {
				$this->dieUsageMsg( array( 'invalidtitle', $this->params['target'] ) );
			}

			$feed = new ChangesFeed( $feedFormat, false );
			$feedObj = $feed->getFeedObject(
				$this->msg( 'recentchangeslinked-title', $title->getPrefixedText() )
					->inContentLanguage()->text(),
				$this->msg( 'recentchangeslinked-feed' )->inContentLanguage()->text(),
				SpecialPage::getTitleFor( 'Recentchangeslinked' )->getFullURL()
			);
		} else {
			$feed = new ChangesFeed( $feedFormat, 'rcfeed' );
			$feedObj = $feed->getFeedObject(
				$this->msg( 'recentchanges' )->inContentLanguage()->text(),
				$this->msg( 'recentchanges-feed-description' )->inContentLanguage()->text(),
				SpecialPage::getTitleFor( 'Recentchanges' )->getFullURL()
			);
		}

		return $feedObj;
	}

	public function getAllowedParams() {
		$config = $this->getConfig();
		$feedFormatNames = array_keys( $config->get( 'FeedClasses' ) );

		$ret = array(
			'feedformat' => array(
				ApiBase::PARAM_DFLT => 'rss',
				ApiBase::PARAM_TYPE => $feedFormatNames,
			),

			'namespace' => array(
				ApiBase::PARAM_TYPE => 'namespace',
			),
			'invert' => false,
			'associated' => false,

			'days' => array(
				ApiBase::PARAM_DFLT => 7,
				ApiBase::PARAM_MIN => 1,
				ApiBase::PARAM_TYPE => 'integer',
			),
			'limit' => array(
				ApiBase::PARAM_DFLT => 50,
				ApiBase::PARAM_MIN => 1,
				ApiBase::PARAM_MAX => $config->get( 'FeedLimit' ),
				ApiBase::PARAM_TYPE => 'integer',
			),
			'from' => array(
				ApiBase::PARAM_TYPE => 'timestamp',
			),

			'hideminor' => false,
			'hidebots' => false,
			'hideanons' => false,
			'hideliu' => false,
			'hidepatrolled' => false,
			'hidemyself' => false,

			'tagfilter' => array(
				ApiBase::PARAM_TYPE => 'string',
			),

			'target' => array(
				ApiBase::PARAM_TYPE => 'string',
			),
			'showlinkedto' => false,
		);

		if ( $config->get( 'AllowCategorizedRecentChanges' ) ) {
			$ret += array(
				'categories' => array(
					ApiBase::PARAM_TYPE => 'string',
					ApiBase::PARAM_ISMULTI => true,
				),
				'categories_any' => false,
			);
		}

		return $ret;
	}

	protected function getExamplesMessages() {
		return array(
			'action=feedrecentchanges'
				=> 'apihelp-feedrecentchanges-example-simple',
			'action=feedrecentchanges&days=30'
				=> 'apihelp-feedrecentchanges-example-30days',
		);
	}
}


text:
set -euo pipefail
source $(dirname $0)/../utils.sh

TEST_ID=$(generate_test_id)
echo "TEST_ID = $TEST_ID"

ROOT=$(dirname $0)/../..

env=nodejs-$TEST_ID
relativeUrl="/itest-$TEST_ID"
functionName="hellotest-$TEST_ID"
hostName="test-$TEST_ID.com"
routeName="ingress-$TEST_ID"

cleanup() {
    log "Cleaning up..."
    clean_resource_by_id $TEST_ID
}

checkIngress() {
    local route=$1
    local host=$2
    local path=$3
    local annotations=$4
    local tls=$5

    log "Ingresses matching this trigger:"
    kubectl get ing -l 'functionName='$functionName',triggerName='$route --all-namespaces -o=json

    log "Verifying to route value in ingress"
    actual_path=$(kubectl get ing -l "functionName=$functionName,triggerName=$route" --all-namespaces -o=jsonpath='{.items[0].spec.rules[0].http.paths[0].path}')

    if [ "$path" != "$actual_path" ]
    then
        log "Provided route ($path) and route ($actual_path) in ingress don't match"
        exit 1
    fi

    actual_host=$(kubectl get ing -l "functionName=$functionName,triggerName=$route" --all-namespaces -o=jsonpath='{.items[0].spec.rules[0].host}')

    if [ "$host" != "$actual_host" ]
    then
        log "Provided host ($host) and host ($actual_host) in ingress don't match"
        exit 1
    fi

    actual_ann=$(kubectl get ing -l "functionName=$functionName,triggerName=$route" --all-namespaces -o jsonpath="{.items[0].metadata.annotations}")
    if [ "$annotations" != "$actual_ann" ]
    then
        log "Provided annotations ($annotations) and annotations ($actual_ann) in ingress don't match"
        exit 1
    fi

    actual_tls_secret=$(kubectl get ing -l "functionName=$functionName,triggerName=$route" --all-namespaces -o=jsonpath='{.items[0].spec.tls[0].secretName}')

    if [ "$tls" != "$actual_tls_secret" ]
    then
        log "Provided tls secret ($tls) and tls secret ($actual_tls_secret) in ingress don't match"
        exit 1
    fi

    actual_tls_host=$(kubectl get ing -l "functionName=$functionName,triggerName=$route" --all-namespaces -o=jsonpath='{.items[0].spec.tls[0].hosts[0]}')

    if [ "$host" != "$actual_tls_host" ]
    then
        log "Provided tls host ($host) and tls host ($actual_tls_host) in ingress don't match"
        exit 1
    fi
}

createFn() {
    # Create a hello world function in nodejs, test it with an http trigger
    log "Creating nodejs env"
    fission env create --name $env --image $NODE_RUNTIME_IMAGE

    log "Creating function"
    fission fn create --name $functionName --env $env --code $ROOT/examples/nodejs/hello.js
    sleep 3

    log "Doing an HTTP GET on the function's route"
    response=$(fission fn test --name $functionName)
    echo $response

    log "Checking for valid response"
    echo $response | grep -i hello
}

if [ -z "${TEST_NOCLEANUP:-}" ]; then
    trap cleanup EXIT
else
    log "TEST_NOCLEANUP is set; not cleaning up test artifacts afterwards."
fi

createFn

log "Creating route for URL $relativeUrl"
fission route create --name $routeName --url $relativeUrl --function $functionName --createingress

sleep 3
checkIngress $routeName "" $relativeUrl "" ""

log "Modifying the route by adding host, path, annotations, tls"
fission route update --name $routeName --function $functionName --ingressannotation "foo=bar" --ingressrule "$hostName=/foo/bar" --ingresstls "dummy"

sleep 3
checkIngress $routeName $hostName "/foo/bar" '{"foo":"bar"}' "dummy"

log "Remove ingress annotations, host, rule and tls"
fission route update --name $routeName --function $functionName --ingressannotation "-" --ingressrule "-" --ingresstls "-"

sleep 3
checkIngress $routeName "" $relativeUrl "" ""

fission route delete --name $routeName

TEST_ID=$(generate_test_id)

routeName="ingress-$TEST_ID"
relativeUrl="/itest-$TEST_ID/{url}"
wildcardPath="/itest-$TEST_ID/*"
realPath="itest-$TEST_ID/test"

log "Creating route for wildcard URL $relativeUrl"
fission route create --name $routeName --url $relativeUrl --function $functionName --createingress \
    --ingressannotation "nginx.ingress.kubernetes.io/ssl-redirect=false" \
    --ingressannotation "nginx.ingress.kubernetes.io/use-regex=true" \
    --ingressrule "*=$wildcardPath"

sleep 3
checkIngress $routeName "" $wildcardPath '{"nginx.ingress.kubernetes.io/ssl-redirect":"false","nginx.ingress.kubernetes.io/use-regex":"true"}' ""
timeout 10 bash -c "test_ingress $realPath 'hello, world!'"

log "Test PASSED"


text:
function [tf, msg] = verify_datatype(var, datatypes, var_name)
% verify_datatype -- Verify the datatype(s) of a variable.
%
%****f* wmtsa.utils/verify_datatype
%
% NAME
%   verify_datatype -- Verify the datatype(s) of a variable.
%
% SYNOPSIS
%   [tf, msg] = verify_datatype(var, datatypes, var_name)
%
% INPUTS
%   * var        -- variable to verify (object)
%   * datatypes  -- expected data type(s) of the arg.
%                   See verify_datatypes function for possibles datatypes
%                   to check (string or cell array of strings).
%   * var_name   -- (optional) alternative name of variable to use in
%                   error message (string).
%
% OUTPUTS
%   * tf         -- flag indicating whether object as specified datatype(s).
%                   (Boolean).
%   * msg     -- diagnostic error message (string).
%
% SIDE EFFECTS
%   Function call requires a mininum of two input arguments; otherwise error.
%
% DESCRIPTION
%   verify_datatypes checks whether the specified object has the specified
%   data type(s). If the datatypes argument is a cell array of strings, then the
%   function checks whether the variable datatype matches each and all of the
%   datatypes.  The function returns a logical true if the object's datatypes
%   match those specified by the 'datatypes' argument; otherwise a logical false
%   is returned.
%
%   Possible datatypes to check include:
%   * 'posint'              -- All are positive integers --> integer value(s) > 0.
%   * 'int0'                -- All are positive integers plus zero --> integer value(s) >= 0.
%   * 'int','integer'       -- All are integers --> any integer value(s).
%   * 'real'                -- All are real numbers.
%   * 'num','numeric'       -- All are numeric.
%   * 'struct','structure'  -- Is a structure.
%   * 'char','character','string' - Is a character string.
%   * 'scalar               -- Is a point (size of all dimensions = 1).
%   * 'vec','vector'        -- Is a vector (i.e. MxN, with M and/or N = 1).
%   * 'matrix'              -- Is a matrix (i.e. dim = 2).
%   * 'nonsingleton', 'truevector' -- Is a vector (i.e. MxN with M *or* N = 1).
%   * 'row','rowvector'     -- Is a row vector (i.e. M x 1).
%   * 'col','columnvector'  -- Is a column vector (i.e. 1 x N).
%   * 'finite'              -- All are finite.
%   * 'nonsparse'           -- Is a non-sparse matrix.
%
% EXAMPLE
%
%
% ERRORS
%  WMTSA:InvalidNumArguments, WMTSA:InvalidArgumentType, WMTSA:InvalidArgumentValue
%
% NOTES
%
%
% SEE ALSO
%   argterr
%
% TOOLBOX
%   wmtsa/utils
%
% CATEGORY
%   WMTSA Utilities
%

% AUTHOR
%   Charlie Cornish
%
% CREATION DATE
%    2005-02-17
%
% COPYRIGHT
%   (c) 2005 Charles R. Cornish
%
% MATLAB VERSION
%   7.0
%
% CREDITS
%
%
% REVISION
%   $Revision: 612 $
%
%***

%   $Id: verify_datatype.m 612 2005-10-28 21:42:24Z ccornish $

usage_str = ['Usage:  [tf, msg] = ', mfilename, ...
             '(var, datatypes, [var_name])'];

%% Check arguments
error(nargerr(mfilename, nargin, [2:3], nargout, [0:2], 1, usage_str, 'struct'));

if (iscellstr(datatypes))
  % OK - do nothing
elseif (ischar(datatypes))
  % Convert to character cell array.
  datatypes = {datatypes};
else
  error('WMTSA:verify_datatype:invalidArgumentType', ...
        ['Argument ''datatypes'' must be a charcter string or cell ' ...
         'array of strings.']);
end

if (~exist('var_name', 'var') || isempty(var_name))
  var_name = inputname(1);
end

%% Initialize output arguments.
tf = 1;
msg = [];

%% Check datatypes against specified list.
for (ii = 1:length(datatypes))
  type = lower(datatypes{ii});
  switch type

   %%%
   %%% Integers
   %%%

   case {'int', 'integer'}
    % Any integer
    if (~isnumeric(var) | any(var ~= fix(var)))
      msg = ['Expected ''', var_name, ''' to be an integer.'];
      break;
    end

   case 'int0'
    % Positive integers plus zero (integers >= 0)
    if (~isnumeric(var) | any(var < 0) | any(var ~= fix(var)))
      msg = ['Expected ''', var_name, ''' to be an integer with value(s) >= 0.'];
      break;
    end

   case 'posint'
    % Positive integers (integers > 0)
    if (~isnumeric(var) | any(var < 1) | any(var ~= fix(var)))
      msg = ['Expected ''', var_name, ''' to be an integer with value(s) > 0.'];
      break;
    end

   %%%
   %%% Numbers
   %%%

    case {'real'}
    % Any real number
    if (~isreal(var))
      msg = ['Expected ''', var_name, ''' to be numeric.'];
      break;
    end

   case {'num', 'numeric'}
    % Any number
    if (~isnumeric(var))
      msg = ['Expected ''', var_name, ''' to be numeric.'];
      break;
    end

   %%%
   %%% Characters/Strings
   %%%

   case {'char', 'character', 'string'}
    % A string or character array
    if (~ischar(var))
      msg = ['Expected ''', var_name, ''' to be a string or character array.'];
      break;
    end

   case {'scalar'}
    % A scalar
    if (~wmtsa_isscalar(var))
      msg = ['Expected ''', var_name, ''' to be a scalar.'];
      break;
    end

   %%%
   %%% Vectors
   %%%

   case {'col', 'columnvector'}
    % A col vector of any datatype
    if (~wmtsa_isvector(var, 'col'))
      msg = ['Expected ''', var_name, ''' to be a column vector.'];
      break;
    end

   case {'row', 'rowvector'}
    % A row vector of any datatype
    if (~wmtsa_isvector(var, 'row'))
      msg = ['Expected ''', var_name, ''' to be a row vector.'];
      break;
    end

   case {'truevector'}
    % A true vector (i.e. not a point)
    if (~wmtsa_isvector(var, 'vector'))
      msg = ['Expected ''', var_name, ''' to be a true vector.'];
      break;
    end

   case {'vec', 'vector'}
    % A vector of any data type
    if (~wmtsa_isvector(var))
      msg = ['Expected ''', var_name, ''' to be a vector.'];
      break;
    end

   %%%
   %%% Matrices/Arrays
   %%%

   case {'mat', 'matrix'}
    % A matrix of any data type
    if (~wmtsa_ismatrix(var))
      msg = ['Expected ''', var_name, ''' to be a matrix.'];
      break;
    end

   case {'nonsparse'}
    % A nonsparse matrix
    if (~issparse(var))
      msg = ['Expected ''', var_name, ''' to be non-sparse.'];
      break;
    end

   case {'finite'}
    % All elements are finite
    if (~isfinite(var))
      msg = ['Expected ''', var_name, ''' to be finite.'];
      break;
    end

   %%%
   %%% Structs
   %%%

   case {'struct', 'structure'}
    % A structure
    if (~isstruct(var))
      msg = ['Expected ''', var_name, ''' to be a structure.'];
      break;
    end

   otherwise
    error('WMTSA:verify_data_type:unknownDataTypeValue', ...
          ['Unrecognzied value for datatype (', type, ').']);

  end

end

if (~isempty(msg))
  tf = 0;
end

return


text:
from batchq.core.errors import CommunicationTimeout
from batchq.pipelines.shell import BashTerminal as LocalMachine
from batchq.pipelines.shell import SSHTerminal as RemoteMachine
from batchq.pipelines.shell.ssh import BaseSecureTerminalHostVerification
from batchq.pipelines.shell import SFTPTerminal as SFTP
import logging
import copy
from colorlogging import ColorizingStreamHandler
import time
import re
import sys

class TestModule(object):

    def __init__(self, filename):
        self._logger =  logging.getLogger('Virtual Machine Test: %s'%filename) #logging
        self._logger.setLevel(logging.INFO)
        ch = ColorizingStreamHandler()
        formatter = logging.Formatter('[%(levelname)s] - %(asctime)s - %(name)s - %(message)s')
        ch.setFormatter(formatter)
        ch.setLevel(logging.INFO)
        self._logger.addHandler(ch)

        self._lmachine = LocalMachine()
        self._sshconnection = None
        self._sftpconnection = None
        self._ssh_time_wait = 3
        self._port = 3022

        ## Parsing the script
        file = open(filename)
        self._filename =filename
        script = file.read()
        file.close()
        lines = script.split("\n")
        lines = [(i, lines[i-1].strip()) for i in range(1,len(lines)+1)]
        self._lines = [y for y in filter(lambda x: x[1]!="" and ( x[1].startswith("#:") or not x[1].startswith("#")),  lines)]

        ## Defining the running environment
        def timeout(to):
            self._start_ssh_if_none()
            self._logger.info("Setting expect timeout to %d."%int(to))
            self._sshconnection.set_timeout(int(to))

        def respond(token, answer):
            self._start_ssh_if_none()
            self._expect_token += "|"+token
            self._answers.append( (token, answer, re.compile(token)) )

        def allow_fail():
            self._start_ssh_if_none()
            self._nofail = False

        def has_vm(name):
            return self.has_vm(name)

        def clone(name):
            return self.clone(name)

        def isdir(name):
            self._start_ssh_if_none()
            return self._sshconnection.isdir(name)

        def send_command(cmd):
            self._start_ssh_if_none()
            return self._sshconnection.send_command(cmd)

        def isfile(name):
            self._start_ssh_if_none()
            return self._sshconnection.isfile(name)

        def exists(name):
            self._start_ssh_if_none()
            return self._sshconnection.exists(name)

        def runif(condition):
            self._run_next = bool(condition)

        def sendfile(f,t):
            self._start_ssh_if_none()
            self._logger.info("Transfering '%s' -> '%s'" %(f,t))
            self._sftpconnection.sendfile(f,t)

        def getfile(f,t):
            self._start_ssh_if_none()
            self._logger.info("Transfering '%s' <- '%s'" %(f,t))
            self._sftpconnection.getfile(f,t)

        def export(name, *values):
            newarr = []
            for oldconf in self._exports:
                for a in  values:
                    n = copy.deepcopy(oldconf)
                    n[name] = a
                    newarr.append(n)
            self._exports = newarr

        self._locals = {'send_command':send_command, 'export': export, 'sendfile':sendfile, 'getfile':getfile, 'runif':runif,'isdir':isdir, 'isfile':isfile, 'exists':exists, 'clone': clone, 'has_vm':has_vm, 'allow_fail':allow_fail, 'respond':respond, 'timeout': timeout, '__file__': filename}
        self._globals = {}

        self._reset()

    def _reset(self):
        self._bash_token= "#-->"
        self._expect_token=self._bash_token
        self._answers = []
        self._nofail = True
        self._run_next  = True
        self._exports = [{'dummy':'dummy'}]

    def start_virtual_machine(self):
        self._image =self._get_variable("image")
        self.network_interface()
        self.port_forwarding()

        self._logger.info( "Booting up virtual machine.")
        cmd = "VBoxManage startvm %s #--type=headless" % self._image
        out = self._lmachine.send_command(cmd)
        job = self._lmachine.last_exitcode()
        if job != 0:
            self._logger.info( "Failed to start virtual machine. Machine already running?")

        user = self._get_variable("user")
        password = self._get_variable("password")

        cont = True
        self._sshconnection = None
        while cont:
            self._logger.info( "Waiting for SSH to open on port %d ..." %self._port )
            try:
                self._sshconnection = RemoteMachine("localhost", user,password, self._port, additional_arguments = "-o ConnectTimeout=2", accept_fingerprint=True, debug_level=0)
                cont = False
            except BaseSecureTerminalHostVerification as e:
                self._logger.error("SSH host verification failure:\n\n%s\n" % e.ssh_message)

                self._logger.info("Deleting line %d in %s." % (e.ssh_line, e.ssh_filename))
                f = open(e.ssh_filename, "r")
                cont = f.read().split("\n")
                f.close()

                cont = cont[0:(e.ssh_line-1)] + cont[e.ssh_line:]

                f = open(e.ssh_filename, "w")
                f.write("\n".join(cont))
                f.close()
#                raise
            except:
                time.sleep( self._ssh_time_wait )

        self._sftpconnection = SFTP("localhost", user,password, self._port,  accept_fingerprint=True, debug_level=0)

        self._logger.info("SSH to virtual machine successfully running.")

    def shutdown(self):
        self._logger.info("Shutting down.")
        self._image = self._get_variable("image")
        cmd = "VBoxManage acpipowerbutton %s" % self._image
        self._logger.debug(cmd + " (via send_command)")
        self._lmachine.send_command(cmd)
        job = self._lmachine.last_exitcode()
        if job != 0:
            self._logger.error("Failed to shut down virtual machine " + image_name)

    def network_interface(self):
        self._logger.info( "Setting up network interface to NAT for the virtual machine.")
        cmd = "VBoxManage modifyvm %s --nic1 nat" % self._image
        self._lmachine.send_command(cmd)
        job = self._lmachine.last_exitcode()
        if job != 0:
            self._logger.error("Failed to network interface to NAT. Maybe the machine is already running?")

    def port_forwarding(self):
        self._logger.info( "Setting port fowarding up.")
        cmd = "VBoxManage modifyvm %s --natpf1 \"ssh,tcp,,3022,,22\"" % self._image
        out = self._lmachine.send_command(cmd)
        job = self._lmachine.last_exitcode()
        if job != 0:
            self._logger.error("Failed to setup port forwarding: \n\n%s\n" % out )

    def _start_ssh_if_none(self):
        if self._sshconnection is None:
            self.start_virtual_machine()
            if self._sshconnection is None:
                raise BaseException("No SSH connection available.")

    def delete(self, name):
#        VBoxManage unregistervm     <uuid>|<name> [--delete]
        pass

    def has_vm(self, name):
        self._logger.info( "Checking whether '%s' exists." % name)
        cmd = "VBoxManage list vms"
        vms = [x.rsplit(" ",1)[0][1:-1] for x in  self._lmachine.send_command(cmd).split("\n")]
        return name in vms

    def _get_variable(self, name):
        if name in self._locals:
            return self._locals[name]
        if name in self._globals:
            return self._globals[name]
        raise BaseException("Variable '%s' not set." % name)

    def _set_variable(self, name, val):
        if name in self._locals:
            self._locals[name] = val
            return
        if name in self._globals:
            self._globals[name] = val
            return

    def clone(self, new_name):
        self._image =  self._get_variable("image")

        if self.has_vm(new_name):
            self._set_variable("image", new_name)
            self._image = new_name
            self._logger.info( "Using existing clone.")
            return

        self._logger.info( "Cloning VM: %s -> %s." %(self._image, new_name))
        cmd = "VBoxManage clonevm  %s --mode machine --name \"%s\" --register" % (self._image, new_name)
        out = self._lmachine.send_command(cmd)
        job = self._lmachine.last_exitcode()
        if job != 0:
#            print self._lmachine.buffer
            self._logger.critical("Failed to clone VM:\n\n%s\n" %out  )
            sys.exit(-1)

        self._set_variable("image", new_name)
        self._image = new_name
        return True

    def __call__(self):

        for n, l in self._lines:
            if l.startswith("#:"):
                exec compile("\n"*(n-1) + l[2:].strip(),self._filename,'single') in self._locals, self._globals
            else:
                self._start_ssh_if_none()
                if not self._run_next :
                    self._logger.info("Skipping $ %s (line %d)" % (l,n))
                    self._reset()
                    continue

                for environ in self._exports:
                    if len(environ) > 1:
                        self._logger.info("Setting environment.")
                        for name, val in environ.items():
                            out = self._sshconnection.send_command("export %s=\"%s\""%(name, val))

                    if self._expect_token==self._bash_token:
                        self._logger.info("$ "+l+" (via send_command)")
                        out = self._sshconnection.send_command(l)
                        code = self._sshconnection.last_exitcode()

                        if code !=0 and self._nofail:
                            self._logger.critical("Non-zero exitcode not allowed. Type # allow_fail() before command to allow failure. Output reads:\n\n%s\n"%out.strip())
## TODO: enable                            break
                        if code!=0:
                            self._logger.info("Returned: "+str(code))
                    else:
                        self._logger.info("$ "+l+" (via write, expects: '%s')"%self._expect_token)
                        self._sshconnection.write(l+"\n")
                        self._sshconnection.consume_output(consume_until="\n")
                        cont = True
                        while cont:
                            if not self._sshconnection.isalive():
                                cont = False
                                break
                            try:
                                exp = self._sshconnection.expect(re.compile(self._expect_token))
                                if exp.endswith(self._bash_token):
                                    cont = False
                                    break
                                self._logger.info("Program asks:\n\n%s\n" % exp.split("\n")[-1])
                            except CommunicationTimeout:
                                self._logger.error("Communication timeout recieved.")
                                cont = False
                                break
                            self._logger.info("Looking for answer.")
                            cont = False
                            for tok,ans,pat in self._answers:
                                self._logger.debug("Testing: '%s'" % tok)
                                if pat.search(exp):
                                    cont = True
                                    self._logger.info("Answer: '%s'" % ans)
                                    self._sshconnection.write(ans+"\n")
                                    self._sshconnection.consume_output(consume_until="\n")
                                    break
                            if not cont:
                                self._logger.critical("No answer found.")

                self._reset()

        x._sshconnection.flush_pipe()
        self._logger.info("SSH session: \n\n%s\n" % self._sshconnection.buffer.replace(self._bash_token,"$ "))
        x._sftpconnection.flush_pipe()
        self._logger.info("SFTP session: \n\n%s\n" % self._sftpconnection.buffer)
        x._lmachine.flush_pipe()
        self._logger.info("Local bash session: \n\n%s\n" % self._lmachine.buffer.replace(self._bash_token,"$ "))

x = TestModule("ubuntu32")
try:
    x()
except:
    if not x._sshconnection is None:
        x._sshconnection.flush_pipe()
        print x._sshconnection.buffer

    raise
#print
#print


text:
import { SyntaxKind } from "@ts-morph/common";
import { expect } from "chai";
import { BreakStatement } from "../../../../compiler";
import { getInfoFromTextWithDescendant } from "../../testHelpers";

function getBreakStatement(text: string) {
    return getInfoFromTextWithDescendant<BreakStatement>(text, SyntaxKind.BreakStatement).descendant;
}

describe(nameof(BreakStatement), () => {
    const label = "foo";
    const statement = `break ${label};`;
    const emptyStatement = "break;";
    describe(nameof<BreakStatement>(n => n.getLabel), () => {
        function doTest(text: string, expectedText?: string) {
            const breakStatement = getBreakStatement(text);
            const value = breakStatement.getLabel();
            expect(value == null ? value : value.getText()).to.equal(expectedText);
        }

        it("should get the correct label", () => {
            doTest(statement, label);
        });

        it("should get the correct undefined label", () => {
            doTest(emptyStatement, undefined);
        });
    });

    describe(nameof<BreakStatement>(n => n.getLabelOrThrow), () => {
        function doTest(text: string, expectedText?: string) {
            const breakStatement = getBreakStatement(text);
            if (expectedText == null)
                expect(() => breakStatement.getLabelOrThrow()).to.throw();
            else
                expect(breakStatement.getLabelOrThrow().getText()).to.equal(expectedText);
        }

        it("should get the correct label", () => {
            doTest(statement, label);
        });

        it("should throw if label does not exist", () => {
            doTest(emptyStatement, undefined);
        });
    });
});


text:
var Extract = require('./extract');
var Inject  = require('./inject');

module.exports = function(selector) {
  var targetFiles = {};
  return {
    extract: new Extract(targetFiles, selector),
    inject: new Inject(targetFiles, selector)
  }
};


text:
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (c) 2017, Linaro Limited
 */

#ifndef __TEE_FS_DIRFILE_H
#define __TEE_FS_DIRFILE_H

#include <tee/tee_fs.h>
#include <tee/fs_htree.h>

struct tee_fs_dirfile_dirh;

/**
 * struct tee_fs_dirfile_fileh - file handle
 * @file_number:	sequence number of a file
 * @hash:		hash of file, to be supplied to tee_fs_htree_open()
 * @idx:		index of the file handle in the dirfile
 */
struct tee_fs_dirfile_fileh {
	uint32_t file_number;
	uint8_t hash[TEE_FS_HTREE_HASH_SIZE];
	int idx;
};

/**
 * struct tee_fs_dirfile_operations - file interface supplied by user of this
 * interface
 * @open:		opens a file
 * @close:		closes a file, changes are discarded unless
 *			@commit_writes is called before
 * @read:		reads from an open file
 * @write:		writes to an open file
 * @commit_writes:	commits changes since the file was opened
 */
struct tee_fs_dirfile_operations {
	TEE_Result (*open)(bool create, uint8_t *hash, const TEE_UUID *uuid,
			   struct tee_fs_dirfile_fileh *dfh,
			   struct tee_file_handle **fh);
	void (*close)(struct tee_file_handle *fh);
	TEE_Result (*read)(struct tee_file_handle *fh, size_t pos,
			   void *buf, size_t *len);
	TEE_Result (*write)(struct tee_file_handle *fh, size_t pos,
			    const void *buf, size_t len);
	TEE_Result (*commit_writes)(struct tee_file_handle *fh, uint8_t *hash);
};

/**
 * tee_fs_dirfile_open() - opens a dirfile handle
 * @create:	true if a new dirfile is to be created, else the dirfile
 *		is read opened and verified
 * @hash:	hash of underlying file
 * @fops:	file interface
 * @dirh:	returned dirfile handle
 */
TEE_Result tee_fs_dirfile_open(bool create, uint8_t *hash,
			       const struct tee_fs_dirfile_operations *fops,
			       struct tee_fs_dirfile_dirh **dirh);
/**
 * tee_fs_dirfile_close() - closes a dirfile handle
 * @dirh:	dirfile handle
 *
 * All changes since last call to tee_fs_dirfile_commit_writes() are
 * discarded.
 */
void tee_fs_dirfile_close(struct tee_fs_dirfile_dirh *dirh);

/**
 * tee_fs_dirfile_commit_writes() - commit updates of dirfile
 * @dirh:	dirfile handle
 * @hash:	hash of underlying file is copied here if not NULL
 */
TEE_Result tee_fs_dirfile_commit_writes(struct tee_fs_dirfile_dirh *dirh,
					uint8_t *hash);

/**
 * tee_fs_dirfile_get_tmp() - get a temporary file handle
 * @dirh:	dirfile handle
 * @dfh:	returned temporary file handle
 *
 * Note, nothing is queued up as changes to the dirfile with this function.
 */
TEE_Result tee_fs_dirfile_get_tmp(struct tee_fs_dirfile_dirh *dirh,
				  struct tee_fs_dirfile_fileh *dfh);

/**
 * tee_fs_dirfile_find() - find a file handle
 * @dirh:	dirfile handle
 * @uuid:	uuid of requesting TA
 * @oid:	object id
 * @oidlen:	length of object id
 * @dfh:	returned file handle
 */
TEE_Result tee_fs_dirfile_find(struct tee_fs_dirfile_dirh *dirh,
			       const TEE_UUID *uuid, const void *oid,
			       size_t oidlen, struct tee_fs_dirfile_fileh *dfh);

/**
 * tee_fs_dirfile_fileh_to_fname() - get string representation of file handle
 * @dfh:	file handle
 * @fname:	buffer
 * @fnlen:	length of buffer, updated to used length
 */
TEE_Result tee_fs_dirfile_fileh_to_fname(const struct tee_fs_dirfile_fileh *dfh,
					 char *fname, size_t *fnlen);

/**
 * tee_fs_dirfile_rename() - changes/supplies file handle object id
 * @dirh:	dirfile handle
 * @uuid:	uuid of requesting TA
 * @dfh:	file handle
 * @oid:	object id
 * @oidlen:	length of object id
 *
 * If the supplied object id already is used by another file is that file
 * removed from the dirfile.
 */
TEE_Result tee_fs_dirfile_rename(struct tee_fs_dirfile_dirh *dirh,
				 const TEE_UUID *uuid,
				 struct tee_fs_dirfile_fileh *dfh,
				 const void *oid, size_t oidlen);

/**
 * tee_fs_dirfile_remove() - remove file
 * @dirh:	dirfile handle
 * @dfh:	file handle
 */
TEE_Result tee_fs_dirfile_remove(struct tee_fs_dirfile_dirh *dirh,
				 const struct tee_fs_dirfile_fileh *dfh);

/**
 * tee_fs_dirfile_update_hash() - update hash of file handle
 * @dirh:	filefile handle
 * @dfh:	file handle
 */
TEE_Result tee_fs_dirfile_update_hash(struct tee_fs_dirfile_dirh *dirh,
				      const struct tee_fs_dirfile_fileh *dfh);

/**
 * tee_fs_dirfile_get_next() - get object id of next file
 * @dirh:	dirfile handle
 * @uuid:	uuid of requesting TA
 * @idx:	pointer to index
 * @oid:	object id
 * @oidlen:	length of object id
 *
 * If @idx contains -1 the first object id is returned, *@idx is updated
 * with the index of the file.
 */
TEE_Result tee_fs_dirfile_get_next(struct tee_fs_dirfile_dirh *dirh,
				   const TEE_UUID *uuid, int *idx, void *oid,
				   size_t *oidlen);

#endif /*__TEE_FS_DIRFILE_H*/


text:
<?php

declare(strict_types=1);

namespace GraphQL\Doctrine\Factory;

use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping\ClassMetadata;
use GraphQL\Doctrine\Annotation\AbstractAnnotation;
use GraphQL\Doctrine\Annotation\Exclude;
use GraphQL\Doctrine\Exception;
use GraphQL\Type\Definition\InputType;
use GraphQL\Type\Definition\NonNull;
use GraphQL\Type\Definition\Type;
use GraphQL\Type\Definition\WrappingType;
use ReflectionClass;
use ReflectionMethod;
use ReflectionNamedType;
use ReflectionParameter;

/**
 * A factory to create a configuration for all fields of an entity.
 */
abstract class AbstractFieldsConfigurationFactory extends AbstractFactory
{
    /**
     * Doctrine metadata for the entity.
     */
    private ClassMetadata $metadata;

    /**
     * The identity field name, eg: "id".
     */
    private string $identityField;

    /**
     * Returns the regexp pattern to filter method names.
     */
    abstract protected function getMethodPattern(): string;

    /**
     * Get the entire configuration for a method.
     */
    abstract protected function methodToConfiguration(ReflectionMethod $method): ?array;

    /**
     * Create a configuration for all fields of Doctrine entity.
     *
     * @param class-string $className
     */
    public function create(string $className): array
    {
        $this->findIdentityField($className);

        $class = $this->metadata->getReflectionClass();
        $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
        $fieldConfigurations = [];
        foreach ($methods as $method) {
            // Skip non-callable or non-instance
            if ($method->isAbstract() || $method->isStatic()) {
                continue;
            }

            // Skip non-getter methods
            $name = $method->getName();
            if (!preg_match($this->getMethodPattern(), $name)) {
                continue;
            }

            // Skip exclusion specified by user
            if ($this->isExcluded($method)) {
                continue;
            }

            $configuration = $this->methodToConfiguration($method);
            if ($configuration) {
                $fieldConfigurations[] = $configuration;
            }
        }

        return $fieldConfigurations;
    }

    /**
     * Returns whether the getter is excluded.
     */
    private function isExcluded(ReflectionMethod $method): bool
    {
        $exclude = $this->getAnnotationReader()->getMethodAnnotation($method, Exclude::class);

        return $exclude !== null;
    }

    /**
     * Get a GraphQL type instance from PHP type hinted type, possibly looking up the content of collections.
     */
    final protected function getTypeFromReturnTypeHint(ReflectionMethod $method, string $fieldName): ?Type
    {
        $returnType = $method->getReturnType();
        if (!$returnType instanceof ReflectionNamedType) {
            return null;
        }

        $returnTypeName = $returnType->getName();
        if (is_a($returnTypeName, Collection::class, true) || $returnTypeName === 'array') {
            $targetEntity = $this->getTargetEntity($fieldName);
            if (!$targetEntity) {
                throw new Exception('The method ' . $this->getMethodFullName($method) . ' is type hinted with a return type of `' . $returnTypeName . '`, but the entity contained in that collection could not be automatically detected. Either fix the type hint, fix the doctrine mapping, or specify the type with `@API\Field` annotation.');
            }

            $type = Type::listOf(Type::nonNull($this->getTypeFromRegistry($targetEntity, false)));
            if (!$returnType->allowsNull()) {
                $type = Type::nonNull($type);
            }

            return $type;
        }

        return $this->reflectionTypeToType($returnType);
    }

    /**
     * Convert a reflected type to GraphQL Type.
     */
    final protected function reflectionTypeToType(ReflectionNamedType $reflectionType, bool $isEntityId = false): Type
    {
        $name = $reflectionType->getName();
        if ($name === 'self') {
            $name = $this->metadata->name;
        }

        $type = $this->getTypeFromRegistry($name, $isEntityId);
        if (!$reflectionType->allowsNull()) {
            $type = Type::nonNull($type);
        }

        return $type;
    }

    /**
     * Look up which field is the ID.
     *
     * @param class-string $className
     */
    private function findIdentityField(string $className): void
    {
        $this->metadata = $this->entityManager->getClassMetadata($className);
        foreach ($this->metadata->fieldMappings as $meta) {
            if ($meta['id'] ?? false) {
                $this->identityField = $meta['fieldName'];
            }
        }
    }

    /**
     * Returns the fully qualified method name.
     */
    final protected function getMethodFullName(ReflectionMethod $method): string
    {
        return '`' . $method->getDeclaringClass()->getName() . '::' . $method->getName() . '()`';
    }

    /**
     * Throws exception if type is an array.
     */
    final protected function throwIfArray(ReflectionParameter $param, ?string $type): void
    {
        if ($type === 'array') {
            throw new Exception('The parameter `$' . $param->getName() . '` on method ' . $this->getMethodFullName($param->getDeclaringFunction()) . ' is type hinted as `array` and is not overridden via `@API\Argument` annotation. Either change the type hint or specify the type with `@API\Argument` annotation.');
        }
    }

    /**
     * Returns whether the given field name is the identity for the entity.
     */
    final protected function isIdentityField(string $fieldName): bool
    {
        return $this->identityField === $fieldName;
    }

    /**
     * Finds the target entity in the given association.
     */
    private function getTargetEntity(string $fieldName): ?string
    {
        return $this->metadata->associationMappings[$fieldName]['targetEntity'] ?? null;
    }

    /**
     * Return the default value, if any, of the property for the current entity.
     *
     * It does take into account that the property might be defined on a parent class
     * of entity. And it will find it if that is the case.
     */
    final protected function getPropertyDefaultValue(string $fieldName): mixed
    {
        $property = $this->metadata->getReflectionProperties()[$fieldName] ?? null;
        if (!$property) {
            return null;
        }

        return $property->getDeclaringClass()->getDefaultProperties()[$fieldName] ?? null;
    }

    /**
     * Input with default values cannot be non-null.
     */
    final protected function nonNullIfHasDefault(AbstractAnnotation $annotation): void
    {
        $type = $annotation->getTypeInstance();
        if ($type instanceof NonNull && $annotation->hasDefaultValue()) {
            $annotation->setTypeInstance($type->getWrappedType());
        }
    }

    /**
     * Throws exception if argument type is invalid.
     */
    final protected function throwIfNotInputType(ReflectionParameter $param, AbstractAnnotation $annotation): void
    {
        $type = $annotation->getTypeInstance();
        $class = new ReflectionClass($annotation);
        $annotationName = $class->getShortName();

        if (!$type) {
            throw new Exception('Could not find type for parameter `$' . $param->name . '` for method ' . $this->getMethodFullName($param->getDeclaringFunction()) . '. Either type hint the parameter, or specify the type with `@API\\' . $annotationName . '` annotation.');
        }

        if ($type instanceof WrappingType) {
            $type = $type->getWrappedType(true);
        }

        if (!($type instanceof InputType)) {
            throw new Exception('Type for parameter `$' . $param->name . '` for method ' . $this->getMethodFullName($param->getDeclaringFunction()) . ' must be an instance of `' . InputType::class . '`, but was `' . $type::class . '`. Use `@API\\' . $annotationName . '` annotation to specify a custom InputType.');
        }
    }
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

/*++

Module Name:

    include/pal/perftrace.h

Abstract:
    Header file for PAL Performance trace utilities.

--*/

/*
Overview of PAL Performance utilities

 */

#ifndef _PAL_PERFTRACE_H_
#define _PAL_PERFTRACE_H_

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus

#if PAL_PERF
#define PERF_ENTRY(x)  \
	ULONGLONG pal_perf_start_tick = 0;\
    PERFLogFunctionEntry( PAL_PERF_##x, &pal_perf_start_tick )
#define PERF_EXIT(x) \
	PERFLogFunctionExit( PAL_PERF_##x, &pal_perf_start_tick )
#define PERF_ENTRY_ONLY(x)  \
	PERFNoLatencyProfileEntry( PAL_PERF_##x )

BOOL PERFInitialize(LPWSTR command_line, LPWSTR exe_path) ;
void PERFTerminate( );
BOOL PERFAllocThreadInfo( );
void PERFLogFunctionExit(unsigned int pal_api_id, ULONGLONG *pal_perf_start_tick);
void PERFLogFunctionEntry(unsigned int pal_api_id, ULONGLONG *pal_perf_start_tick);
void PERFEnableThreadProfile(BOOL isInternal);
void PERFDisableThreadProfile(BOOL isInternal);
void PERFEnableProcessProfile( );
void PERFDisableProcessProfile( );
BOOL PERFIsProcessProfileEnabled( );
void PERFNoLatencyProfileEntry(unsigned int pal_api_id );
void PERFCalibrate(const char* msg);

#else  /* PAL_PERF */

#define PERF_ENTRY(x)
#define PERF_ENTRY_ONLY(x)
#define PERF_EXIT(x)

#endif /* PAL_PERF */

#ifdef __cplusplus
}
#endif // __cplusplus

#endif /* _PAL_PERFTRACE_H_ */


text:
using Abp.Localization;
using Abp.NHibernate.EntityMappings;

namespace Abp.Zero.NHibernate.EntityMappings
{
    public class ApplicationLanguageTextMap : EntityMap<ApplicationLanguageText, long>
    {
        public ApplicationLanguageTextMap()
            : base("AbpLanguageTexts")
        {
            Map(x => x.TenantId);
            Map(x => x.LanguageName);
            Map(x => x.Source);
            Map(x => x.Key);
            Map(x => x.Value);

            this.MapAudited();
        }
    }
}


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap - Prebuilt Layout</title>

<link href="../../css/bootstrap.css" rel="stylesheet">

      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#defaultNavbar1">Toggle navigation</button>
      Brand

Link(current)

Link

Dropdown

Action

Another action

Something else here

Separated link

One more separated link

      <form class="navbar-form navbar-left" role="search">

          <input type="text" class="form-control" placeholder="Search">

        <button type="submit" class="btn btn-default">Submit</button>
      </form>

Link

Dropdown

Action

Another action

Something else here

Separated link

Bootstrap with Dreamweaver

Click outside the blue container to select this row. Columns are always contained within a row. Rows are indicated by a dashed grey line and rounded corners.

 Click here to select this column. Always place your content within a column. Columns are indicated by a dashed blue line.

 You can resize a column using the handle on the right. Drag it to increase or reduce the number of columns.

 You can offset a column using the handle on the left. Drag it to increase or reduce the offset.

 Easily build your page using the Bootstrap components from the Insert panel.

Adding Buttons

Quickly add buttons to your page by using the button component in the insert panel.

      <button type="button" class="btn btn-info btn-sm">Info Button</button>
      <button type="button" class="btn btn-success btn-sm">Success Button</button>

Adding Labels

Using the insert panel, add labels to your page by using the label component.

      Info LabelDanger Label

Adding Glyphicons

You can also add glyphicons to your page from within the insert panel.

Footer

Copyright © 2015 · All Rights Reserved · My Website


text:
package scriptism;

import org.junit.Test;
import scriptism.interpreter.Options;

import java.io.File;
import java.io.IOException;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.*;

public class CommandLineOptionsTest {

    @Test
    public void testNoParameters() {
        Options options = CommandLineOptions.parse();

        assertThat(options.getWriteClassfile(), is(equalTo(false)));
        assertThat(options.getScript(), is(nullValue()));
        assertThat(options.getShouldExit(), is(equalTo(true)));
        assertThat(options.getExitStatus(), is(equalTo(0)));
        assertThat(options.getArgs().length, is(equalTo(0)));
    }

    @Test
    public void testHelp() {
        Options options = CommandLineOptions.parse("--help");

        assertThat(options.getWriteClassfile(), is(equalTo(false)));
        assertThat(options.getScript(), is(nullValue()));
        assertThat(options.getShouldExit(), is(equalTo(true)));
        assertThat(options.getExitStatus(), is(equalTo(0)));
        assertThat(options.getArgs().length, is(equalTo(0)));
    }

    @Test
    public void testScriptNameWithParameters() throws IOException {
        File scriptFile = File.createTempFile("mock-test-file", ".txt");
        scriptFile.deleteOnExit();

        Options options = CommandLineOptions.parse(scriptFile.getAbsolutePath(), "arg1", "-arg2", "arg3");

        assertThat(options.getWriteClassfile(), is(equalTo(false)));
        assertThat(options.getScript(), is(equalTo(scriptFile)));
        assertThat(options.getShouldExit(), is(equalTo(false)));
        assertThat(options.getExitStatus(), is(equalTo(0)));
        assertThat(options.getArgs().length, is(equalTo(3)));
        assertThat(options.getArgs(), is(equalTo(new String[] {"arg1", "-arg2", "arg3"})));
    }

    @Test
    public void testScriptOutputClassfile() throws IOException {
        File scriptFile = File.createTempFile("mock-test-file", ".txt");
        scriptFile.deleteOnExit();

        Options options = CommandLineOptions.parse("--classfile", scriptFile.getAbsolutePath(), "arg1", "-arg2", "arg3");

        assertThat(options.getWriteClassfile(), is(equalTo(true)));
        assertThat(options.getScript(), is(equalTo(scriptFile)));
        assertThat(options.getShouldExit(), is(equalTo(false)));
        assertThat(options.getExitStatus(), is(equalTo(0)));
        assertThat(options.getArgs().length, is(equalTo(3)));
        assertThat(options.getArgs(), is(equalTo(new String[]{"arg1", "-arg2", "arg3"})));
    }
}


text:
namespace Google.Cloud.ContactCenterInsights.V1.Snippets
{
    // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_sync_flattened]
    using Google.Cloud.ContactCenterInsights.V1;

    public sealed partial class GeneratedContactCenterInsightsClientSnippets
    {
        /// <summary>Snippet for CreateConversation</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void CreateConversation()
        {
            // Create client
            ContactCenterInsightsClient contactCenterInsightsClient = ContactCenterInsightsClient.Create();
            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/locations/[LOCATION]";
            Conversation conversation = new Conversation();
            string conversationId = "";
            // Make the request
            Conversation response = contactCenterInsightsClient.CreateConversation(parent, conversation, conversationId);
        }
    }
    // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_sync_flattened]
}


text:
package org.wso2.siddhi.core.config;

import org.wso2.siddhi.core.function.EvalScript;
import org.wso2.siddhi.core.util.SiddhiConstants;
import org.wso2.siddhi.core.util.SiddhiExtensionLoader;
import org.wso2.siddhi.core.util.persistence.PersistenceStore;

import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class SiddhiContext {

    private int eventBufferSize;
    private Map<String, Class> siddhiExtensions;
    private PersistenceStore persistenceStore = null;
    private Map<String, EvalScript> scriptFunctionMap;
    private ConcurrentHashMap<String, DataSource> siddhiDataSources;

    public SiddhiContext() {
        setSiddhiExtensions(SiddhiExtensionLoader.loadSiddhiExtensions());
        eventBufferSize = SiddhiConstants.DEFAULT_EVENT_BUFFER_SIZE;
        this.scriptFunctionMap = new HashMap<String, EvalScript>();
        this.siddhiDataSources = new ConcurrentHashMap<String, DataSource>();
    }

    public int getEventBufferSize() {
        return eventBufferSize;
    }

    public Map<String, Class> getSiddhiExtensions() {
        return siddhiExtensions;
    }

    public void setSiddhiExtensions(Map<String, Class> siddhiExtensions) {
        this.siddhiExtensions = siddhiExtensions;
    }

    public void setEventBufferSize(int eventBufferSize) {
        this.eventBufferSize = eventBufferSize;
    }

    public PersistenceStore getPersistenceStore() {
        return persistenceStore;
    }

    public void setPersistenceStore(PersistenceStore persistenceStore) {
        this.persistenceStore = persistenceStore;
    }

    public EvalScript getEvalScript(String name) {
        return scriptFunctionMap.get(name);
    }

    public boolean isFunctionExist(String name) {
        return scriptFunctionMap.get(name) != null;
    }

    public Map<String, EvalScript> getScriptFunctionMap() {
        return scriptFunctionMap;
    }

    public DataSource getSiddhiDataSource(String dataSourceName) {
        return siddhiDataSources.get(dataSourceName);
    }

    public void addSiddhiDataSource(String dataSourceName, DataSource dataSource) {
        this.siddhiDataSources.put(dataSourceName,dataSource);
    }
}


text:
package org.smartloli.kafka.eagle.common.domain;

import com.google.gson.Gson;

/**
 * Definition Kafka metadata information.
 *
 * @author smartloli.
 *
 *         Created by Aug 15, 2016
 */
public class MetadataDomain {

	private int partitionId;
	private int leader;
	private String isr;
	private String replicas;

	public int getPartitionId() {
		return partitionId;
	}

	public void setPartitionId(int partitionId) {
		this.partitionId = partitionId;
	}

	public int getLeader() {
		return leader;
	}

	public void setLeader(int leader) {
		this.leader = leader;
	}

	public String getIsr() {
		return isr;
	}

	public void setIsr(String isr) {
		this.isr = isr;
	}

	public String getReplicas() {
		return replicas;
	}

	public void setReplicas(String replicas) {
		this.replicas = replicas;
	}

	@Override
	public String toString() {
		return new Gson().toJson(this);
	}

}


text:
namespace app {
namespace Outracks {
namespace Simulator {
namespace Runtime {

struct UxProperty__Fuse_Layouts_Orientation;

struct UxProperty__Fuse_Layouts_Orientation__uType : ::app::Uno::UX::Property__Fuse_Layouts_Orientation__uType
{
};

UxProperty__Fuse_Layouts_Orientation__uType* UxProperty__Fuse_Layouts_Orientation__typeof();

void UxProperty__Fuse_Layouts_Orientation___ObjInit_1(UxProperty__Fuse_Layouts_Orientation* __this, ::uDelegate* setter, ::uDelegate* getter, ::uDelegate* adder, ::uDelegate* remover);
UxProperty__Fuse_Layouts_Orientation* UxProperty__Fuse_Layouts_Orientation__New_1(::uStatic* __this, ::uDelegate* setter, ::uDelegate* getter, ::uDelegate* adder, ::uDelegate* remover);
void UxProperty__Fuse_Layouts_Orientation__OnAddListener(UxProperty__Fuse_Layouts_Orientation* __this, ::uDelegate* listener);
int UxProperty__Fuse_Layouts_Orientation__OnGet(UxProperty__Fuse_Layouts_Orientation* __this);
void UxProperty__Fuse_Layouts_Orientation__OnRemoveListener(UxProperty__Fuse_Layouts_Orientation* __this, ::uDelegate* listener);
void UxProperty__Fuse_Layouts_Orientation__OnSet(UxProperty__Fuse_Layouts_Orientation* __this, int value, ::uObject* origin);

struct UxProperty__Fuse_Layouts_Orientation : ::app::Uno::UX::Property__Fuse_Layouts_Orientation
{
    ::uStrong< ::uDelegate*> _setter;
    ::uStrong< ::uDelegate*> _getter;
    ::uStrong< ::uDelegate*> _adder;
    ::uStrong< ::uDelegate*> _remover;

    void _ObjInit_1(::uDelegate* setter, ::uDelegate* getter, ::uDelegate* adder, ::uDelegate* remover) { UxProperty__Fuse_Layouts_Orientation___ObjInit_1(this, setter, getter, adder, remover); }
};

}}}}

#endif


text:
package org.apache.hadoop.mapreduce.lib.map;

import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

/** A {@link Mapper} that extracts text matching a regular expression. */
@InterfaceAudience.Public
@InterfaceStability.Stable
public class RegexMapper<K> extends Mapper<K, Text, Text, LongWritable> {

  public static String PATTERN = "mapreduce.mapper.regex";
  public static String GROUP = "mapreduce.mapper.regexmapper..group";
  private Pattern pattern;
  private int group;

  public void setup(Context context) {
    Configuration conf = context.getConfiguration();
    pattern = Pattern.compile(conf.get(PATTERN));
    group = conf.getInt(GROUP, 0);
  }

  public void map(K key, Text value,
                  Context context)
    throws IOException, InterruptedException {
    String text = value.toString();
    Matcher matcher = pattern.matcher(text);
    while (matcher.find()) {
      context.write(new Text(matcher.group(group)), new LongWritable(1));
    }
  }
}


text:
(function () {

    var pathRoot = "";

    var useDebug = window["gliEmbedDebug"];

    // Find self in the <script> tags
    var scripts = document.getElementsByTagName("script");
    for (var n = 0; n < scripts.length; n++) {
        var scriptTag = scripts[n];
        var src = scriptTag.src.toLowerCase();
        if (/core\/embed.js$/.test(src)) {
            // Found ourself - strip our name and set the root
            var index = src.lastIndexOf("embed.js");
            pathRoot = scriptTag.src.substring(0, index);
            break;
        }
    }

    function insertHeaderNode(node) {
        var targets = [document.body, document.head, document.documentElement];
        for (var n = 0; n < targets.length; n++) {
            var target = targets[n];
            if (target) {
                if (target.firstElementChild) {
                    target.insertBefore(node, target.firstElementChild);
                } else {
                    target.appendChild(node);
                }
                break;
            }
        }
    };

    function insertStylesheet(url) {
        var link = document.createElement("link");
        link.rel = "stylesheet";
        link.href = url;
        insertHeaderNode(link);
        return link;
    };

    function insertScript(url) {
        var script = document.createElement("script");
        script.type = "text/javascript";
        script.src = url;
        insertHeaderNode(script);
        return script;
    };

    if (useDebug) {
        // Fall through below and use the loader to get things
    } else {
        var jsurl = pathRoot + "lib/gli.all.js";
        var cssurl = pathRoot + "lib/gli.all.css";

        window.gliCssUrl = cssurl;

        insertStylesheet(cssurl);
        insertScript(jsurl);
    }

    // Always load the loader
    if (useDebug) {
        var script = insertScript(pathRoot + "loader.js");
        function scriptLoaded() {
            gliloader.pathRoot = pathRoot;
            if (useDebug) {
                // In debug mode load all the scripts
                gliloader.load(["host", "replay", "ui"]);
            }
        };
        script.onreadystatechange = function () {
            if (("loaded" === script.readyState || "complete" === script.readyState) && !script.loadCalled) {
                this.loadCalled = true;
                scriptLoaded();
            }
        };
        script.onload = function () {
            if (!script.loadCalled) {
                this.loadCalled = true;
                scriptLoaded();
            }
        };
    }

    // Hook canvas.getContext
    var originalGetContext = HTMLCanvasElement.prototype.getContext;
    if (!HTMLCanvasElement.prototype.getContextRaw) {
        HTMLCanvasElement.prototype.getContextRaw = originalGetContext;
    }
    HTMLCanvasElement.prototype.getContext = function () {
        var ignoreCanvas = this.internalInspectorSurface;
        if (ignoreCanvas) {
            return originalGetContext.apply(this, arguments);
        }

        var contextNames = ["moz-webgl", "webkit-3d", "experimental-webgl", "webgl"];
        var requestingWebGL = contextNames.indexOf(arguments[0]) != -1;

        if (requestingWebGL) {
            // Page is requesting a WebGL context!
            // TODO: something
        }

        var result = originalGetContext.apply(this, arguments);
        if (result == null) {
            return null;
        }

        if (requestingWebGL) {
            // TODO: pull options from somewhere?
            result = gli.host.inspectContext(this, result);
            var hostUI = new gli.host.HostUI(result);
            result.hostUI = hostUI; // just so we can access it later for debugging
        }

        return result;
    };

})();


text: Clazz.declareInterface (java.io, "DataOutput");


text:
package org.apache.hadoop.util;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.JobConfigurable;

import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

/**
 * Test for the JobConf-related parts of common's ReflectionUtils
 * class.
 */
public class TestMRCJCReflectionUtils {
  @Before
  public void setUp() {
    ReflectionUtils.clearCache();
  }

  /**
   * This is to test backward compatibility of ReflectionUtils for
   * JobConfigurable objects.
   * This should be made deprecated along with the mapred package HADOOP-1230.
   * Should be removed when mapred package is removed.
   */
  @Test
  public void testSetConf() {
    JobConfigurableOb ob = new JobConfigurableOb();
    ReflectionUtils.setConf(ob, new Configuration());
    assertFalse(ob.configured);
    ReflectionUtils.setConf(ob, new JobConf());
    assertTrue(ob.configured);
  }

  private static class JobConfigurableOb implements JobConfigurable {
    boolean configured;
    public void configure(JobConf job) {
      configured = true;
    }
  }
}


text:
using WitsWay.TempTests.DiagramTest.Models.Configs;

namespace WitsWay.TempTests.DiagramTest.Models.Nodes
{

    /// <summary>
    /// 流程节点
    /// </summary>
    public class FlowNode
    {
        /// <summary>
        /// 节点键
        /// </summary>
        public string NodeKey { get; set; }
        /// <summary>
        /// 节点类型
        /// </summary>
        public FlowNodeKinds NodeKind { get; set; }

        public string NodeName { get; set; }

        public string NodeCode { get; set; }

        public string NodeSummary { get; set; }

        public  string NodeRemark { get; set; }

        public FlowNodeConfig NodeConfig { get; set; }

        /// <summary>
        /// 流程键
        /// </summary>
        public string FlowKey{ get; set; }
        /// <summary>
        /// 节点状态
        /// </summary>
        public FlowNodeStates Status { get; set; }

    }

}


text:
import Route from '@ember/routing/route';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
import Ember from 'ember'; // type import, no emit

export default class extends Route.extend(AuthenticatedRouteMixin) {
  afterModel(_model: any, transition: Ember.Transition & { params: any }) {
    // Extract the entity being viewed from the transition state
    const { params: { 'browse.entity': { entity = 'datasets' } = {} } } = transition;

    // transition to entity specific sub route
    this.transitionTo('browse.entity', entity);
  }
}


text:
<?php
/**
 * This is a helper class for applications
 */
class Applications {

	public static function get_all()
	{

		// get all the currently active app instances
		$portfolios = ORM::factory('portfolio')->all();
		$blogs = ORM::factory('blog')->all();

		return array(
			'portfolio' => $portfolios,
			'blog'		=> $blogs,
		);

	}

}

?>


text:
[pixeltenchi](http://pixeltenchi.com/) is jneslen's portfolio site.

Released under a BSD license, use what you will as I am an open source kind of guy.


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:security="http://www.springframework.org/schema/security"
	xmlns:p="http://www.springframework.org/schema/p"
	xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd" default-autowire="byName">
	<context:component-scan base-package="com.jasmine.family.db.mysql" />
	<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" />

	<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
		<!-- 指定连接数据库的驱动 -->
		<property name="driverClass" value="${jdbc.driverClassName}" />
		<!--指定连接数据库的URL -->
		<property name="jdbcUrl" value="${jdbc.url}" />
		<!--指定连接数据库的用户名 -->
		<property name="user" value="${jdbc.username}" />
		<!--指定连接数据库的密码 -->
		<property name="password" value="${jdbc.password}" />
		<!--指定连接数据库连接池的最大连接数 -->
		<property name="maxPoolSize" value="${pool.maxPoolSize}" />
		<!--指定连接数据库连接池的最小连接数 -->
		<property name="minPoolSize" value="${pool.minPoolSize}" />
		<!--指定连接数据库连接池的初始化连接数 -->
		<property name="initialPoolSize" value="${pool.initialPoolSize}" />
		<!--指定连接数据库连接池的连接的最大空闲时间 时间为秒 -->
		<property name="maxIdleTime" value="${pool.maxIdleTime}" />
		<!-- 当连接池中的连接耗尽的时候C3P0一次同时获取的连接数 -->
		<property name="acquireIncrement" value="${pool.acquireIncrement}" />
	</bean>
	<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
		<property name="packagesToScan">
			<list>
				<value>com.nagao.db.*.po</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop>
				<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
				<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
				<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
				<prop key="hibernate.use_sql_comments">${hibernate.use_sql_comments}</prop><!-- 如果设置为true,Hiberante将为SQL产生注释,这样更利于调试。默认值为false -->
				<prop key="hibernate.jdbc.batch_size">20</prop><!--指定Hibernate如何使用JDBC2批量更新。取值,推荐5到30 -->
				<prop key="hibernate.order_inserts">true</prop>
				<prop key="hibernate.order_updates">true</prop>
				<prop key="hibernate.connection.release_mode">auto</prop>
				<prop key="jdbc.use_scrollable_resultset">false</prop>
				<prop key=" hibernate.current_session_context_class ">org.springframework.orm.hibernate4.SpringSessionContext</prop>
			</props>
		</property>
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
	</bean>
	<bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
	<bean id="txTemplate" class="org.springframework.transaction.support.TransactionTemplate">
		<property name="transactionManager" ref="transactionManager" />
	</bean>
	<bean id="hibernateTemplate" class="org.springframework.orm.hibernate4.HibernateTemplate">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
		<property name="dataSource" ref="dataSource" />
	</bean>
</beans>


text:
package org.opennaas.extensions.network.model.validation;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.ws.rs.Consumes;
import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import com.sun.jersey.core.header.FormDataContentDisposition;
import com.sun.jersey.multipart.FormDataParam;
//import com.sun.jersey.multipart.FormDataParam;
//import com.wordnik.swagger.annotations.ApiParam;

/**
 * Created by mohamed on 06/10/14.
 */
@Path("/file")
public class FileUploadService {

    @POST
    @Path("/upload")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public Response uploadFile(
            @FormDataParam("file1") InputStream uploadedInputStream,
            @FormDataParam("file") FormDataContentDisposition fileDetail) {

        String uploadedFileLocation = "/tmp/" + fileDetail.getFileName();

        // save it
        writeToFile(uploadedInputStream, uploadedFileLocation);

        String output = "File uploaded to : " + uploadedFileLocation;

        return Response.status(200).entity(output).build();

    }

    // save uploaded file to new location
    private void writeToFile(InputStream uploadedInputStream,
                             String uploadedFileLocation) {

        try {
            OutputStream out = new FileOutputStream(new File(
                    uploadedFileLocation));
            int read = 0;
            byte[] bytes = new byte[1024];

            out = new FileOutputStream(new File(uploadedFileLocation));
            while ((read = uploadedInputStream.read(bytes)) != -1) {
                out.write(bytes, 0, read);
            }
            out.flush();
            out.close();
        } catch (IOException e) {

            e.printStackTrace();
        }

    }
}


text:
'use strict';
var path = require('path');
var arrify = require('arrify');
var gutil = require('gulp-util');
var through = require('through2');
var Jasmine = require('jasmine');
var Reporter = require('jasmine-terminal-reporter');

function deleteRequireCache(id) {
	if (!id || id.indexOf('node_modules') !== -1) {
		return;
	}

	var files = require.cache[id];

	if (files !== undefined) {
		Object.keys(files.children).forEach(function (file) {
			deleteRequireCache(files.children[file].id);
		});

		delete require.cache[id];
	}
}

module.exports = function (opts) {
	opts = opts || {};

	var jasmine = new Jasmine();

	if (opts.timeout) {
		jasmine.jasmine.DEFAULT_TIMEOUT_INTERVAL = opts.timeout;
	}

	if (opts.config) {
		jasmine.loadConfig(opts.config);
	}

	var errorOnFail = opts.errorOnFail === undefined ? true : opts.errorOnFail;
	var color = process.argv.indexOf('--no-color') === -1;
	var reporter = opts.reporter;

	// default reporter behavior changed in 2.5.2
	if (jasmine.env.clearReporters) {
		jasmine.env.clearReporters();
	}

	if (reporter) {
		arrify(reporter).forEach(function (el) {
			jasmine.addReporter(el);
		});
	} else {
		jasmine.addReporter(new Reporter({
			isVerbose: opts.verbose,
			showColors: color,
			includeStackTrace: opts.includeStackTrace
		}));
	}

	return through.obj(function (file, enc, cb) {
		if (file.isNull()) {
			cb(null, file);
			return;
		}

		if (file.isStream()) {
			cb(new gutil.PluginError('gulp-jasmine', 'Streaming not supported'));
			return;
		}

		// get the cache object of the specs.js file,
		// delete it and its children recursively from cache
		var resolvedPath = path.resolve(file.path);
		var modId = require.resolve(resolvedPath);
		deleteRequireCache(modId);

		jasmine.addSpecFile(resolvedPath);

		cb(null, file);
	}, function (cb) {
		var self = this;

		try {
			if (jasmine.helperFiles) {
				jasmine.helperFiles.forEach(function (helper) {
					var resolvedPath = path.resolve(helper);
					var modId = require.resolve(resolvedPath);
					deleteRequireCache(modId);
				});
			}

			jasmine.onComplete(function (passed) {
				if (errorOnFail && !passed) {
					cb(new gutil.PluginError('gulp-jasmine', 'Tests failed', {
						showStack: false
					}));
				} else {
					self.emit('jasmineDone', passed);
					cb();
				}
			});

			jasmine.execute();
		} catch (err) {
			cb(new gutil.PluginError('gulp-jasmine', err, {showStack: true}));
		}
	});
};


text:
import React, { Component } from 'react';
import { Paper, AppBar, Tabs, Tab } from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';

import AdvancedPull from './advanced-pull';
import BasicPull from './basic-pull';

const styles = theme => ({
  root: {
    display: 'flex'
  }
});

const StyledTabs = withStyles({
  indicator: {
    display: 'flex',
    justifyContent: 'center',
    backgroundColor: 'transparent',
    '& > div': {
      width: '100%',
      backgroundColor: '#ffffff',
    },
  },
})(props => <Tabs {...props} TabIndicatorProps={{ children:
 }} />);

const defaultTab = 0;

class PullTabs extends Component {
  constructor(props) {
    super(props);

    this.state = {
      tab: defaultTab
    };

    this.handleChange = this.handleChange.bind(this);
  }

  handleChange(event, newValue) {
    this.setState({ tab: newValue });
  }

  render() {
    const { onPull, onRegister } = this.props;

    return (

        <Paper>
          <AppBar style={{backgroundColor:"#37474F"}} position="static">

          </AppBar>

            <BasicPull
              onPull={onPull}
              onRegister={onRegister}
            />

            <AdvancedPull
              onPull={onPull}
              onRegister={onRegister}
            />

        </Paper>

    );
  };
}

export default withStyles(styles)(PullTabs);


text:
import { combineReducers } from 'redux';
import { titleReducer } from 'redux-title'
import todos from './todos';
import visibilityFilter from './visibilityFilter';
import counter from './counter';
import intl from './intl';
import navigation from './navigation';
import filterNav from './filterNav';
import appStyle from './appStyle';
import dashboard from './dashboard';
import auth from './auth';
import user from './user';
import signIn from './signIn';
import todoDialog from './todoDialog';
import {usersByPage, selectedUsersPage, usersQuery } from './gitUsers';
import {selectedReposPage, reposByPage, reposQuery } from './repos';
import { routerReducer } from 'react-router-redux';

import {responsiveStateReducer} from 'redux-responsive';

const reducers = combineReducers({
  todos,
  title: titleReducer,
  visibilityFilter,
  counter,
  browser: responsiveStateReducer,
  intl,
  navigation,
  filterNav,
  appStyle,
  todoDialog,
  dashboard,
  usersByPage,
  selectedUsersPage,
  usersQuery,
  selectedReposPage,
  reposByPage,
  reposQuery,
  auth,
  user,
  signIn,
  routing: routerReducer,

})

export default reducers;


text:
package org.duracloud.snapshot.dto.bridge;

import static org.junit.Assert.assertThat;
import static org.junit.matchers.JUnitMatchers.containsString;

import org.junit.Test;

/**
 * @author Bill Branan
 * Date: 7/28/14
 */
public class CreateSnapshotBridgeParametersTest {

    private String host = "dc-host";
    private String port = "dc-port";
    private String storeId = "store-id";
    private String spaceId = "space-id";
    private String userEmail = "user-email";
    private String memberId = "member-id";

    @Test
    public void testSerialize() {
        String description = "description";

        CreateSnapshotBridgeParameters params =
            new CreateSnapshotBridgeParameters(host, port, storeId, spaceId,
                                               description, userEmail, memberId);
        String result = params.serialize();
        String cleanResult = result.replaceAll("\\s+", "");

        assertThat(cleanResult, containsString("\"host\":\"" + host + "\""));
        assertThat(cleanResult, containsString("\"port\":\"" + port + "\""));
        assertThat(cleanResult, containsString("\"storeId\":\"" + storeId + "\""));
        assertThat(cleanResult, containsString("\"spaceId\":\"" + spaceId + "\""));
        assertThat(cleanResult, containsString("\"description\":\"" + description + "\""));
        assertThat(cleanResult, containsString("\"userEmail\":\"" + userEmail + "\""));
        assertThat(cleanResult, containsString("\"memberId\":\"" + memberId + "\""));

    }

    @Test
    public void testEmptyDescription() {
        String description = "";
        CreateSnapshotBridgeParameters params =
            new CreateSnapshotBridgeParameters(host, port, storeId, spaceId,
                                               description, userEmail, memberId);
        String result = params.serialize();
        String cleanResult = result.replaceAll("\\s+", "");
        assertThat(cleanResult, containsString("\"description\":\"" + description + "\""));

    }

    @Test
    public void testNullDescription() {
        String description = null;
        CreateSnapshotBridgeParameters params =
            new CreateSnapshotBridgeParameters(host, port, storeId, spaceId,
                                               description, userEmail, memberId);
        String result = params.serialize();
        String cleanResult = result.replaceAll("\\s+", "");
        assertThat(cleanResult, containsString("\"description\":null"));
    }

}


text:
package commands

import (
	"fmt"

	"github.com/urfave/cli"

	"github.com/yuuki/grabeni/log"
)

var Commands = []cli.Command{
	CommandStatus,
	CommandList,
	CommandAttach,
	CommandDetach,
	CommandGrab,
}

func fatalOnError(command func(context *cli.Context) error) func(context *cli.Context) {
	return func(context *cli.Context) {
		if err := command(context); err != nil {
			log.Error(fmt.Sprintf("error: %s", err.Error()))
		}
	}
}


text:
"""The 1-Wire component."""
import asyncio

from homeassistant.config_entries import ConfigEntry
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.typing import HomeAssistantType

from .const import DOMAIN, SUPPORTED_PLATFORMS
from .onewirehub import CannotConnect, OneWireHub

async def async_setup(hass, config):
    """Set up 1-Wire integrations."""
    return True

async def async_setup_entry(hass: HomeAssistantType, config_entry: ConfigEntry):
    """Set up a 1-Wire proxy for a config entry."""
    hass.data.setdefault(DOMAIN, {})

    onewirehub = OneWireHub(hass)
    try:
        await onewirehub.initialize(config_entry)
    except CannotConnect as exc:
        raise ConfigEntryNotReady() from exc

    hass.data[DOMAIN][config_entry.unique_id] = onewirehub

    for component in SUPPORTED_PLATFORMS:
        hass.async_create_task(
            hass.config_entries.async_forward_entry_setup(config_entry, component)
        )
    return True

async def async_unload_entry(hass: HomeAssistantType, config_entry: ConfigEntry):
    """Unload a config entry."""
    unload_ok = all(
        await asyncio.gather(
            *[
                hass.config_entries.async_forward_entry_unload(config_entry, component)
                for component in SUPPORTED_PLATFORMS
            ]
        )
    )
    if unload_ok:
        hass.data[DOMAIN].pop(config_entry.unique_id)
    return unload_ok


text:
@interface CDMShadowTableView : NSTableView
@end


text:
<?php

namespace Cipen\InternacionBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

use Cipen\InternacionBundle\Form\IngresoType;

class IngresoController extends Controller
{

    public function editarAction($id, Request $request)
    {
        $em = $this->getDoctrine()->getEntityManager();
        $entity = $em->getRepository ('CipenInternacionBundle:Internacion')->find ($id) ;

        if (!$entity) {
            $this->createNotFoundException("No se encontro registro");
        }

        $form   = $this->createForm(new IngresoType(), $entity,array(
            'urlPersonal' => $this->generateUrl ('personal_autocomplete_ajax'),
            'urlDiagnostico' => $this->generateUrl ('diagnostico_autocomplete_ajax'),
            'urlPaciente' => $this->generateUrl ('paciente_autocomplete_ajax'),
        ));

        if ($request->isMethod ("POST")) {

            $form->bind($request);

            if ($form->isValid ()) {

                $em->persist($entity);
                $em->flush();
            }

        }

        $datos["entity"] = $entity;
        $datos["form"] = $form->createView ();

        return $this->render('CipenInternacionBundle:InternacionIngreso:editar.html.twig', $datos);

    }

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="net.afnf.blog.mapper.CommentMapperCustomized">

	<resultMap id="BaseResultMap" type="net.afnf.blog.domain.Comment">
		<id column="id" jdbcType="INTEGER" property="id" />
		<result column="entryid" jdbcType="INTEGER" property="entryid" />
		<result column="replyto" jdbcType="INTEGER" property="replyto" />
		<result column="name" jdbcType="VARCHAR" property="name" />
		<result column="content" jdbcType="VARCHAR" property="content" />
		<result column="postdate" jdbcType="TIMESTAMP" property="postdate" />
		<result column="clientinfo" jdbcType="VARCHAR" property="clientinfo" />
		<result column="state" jdbcType="SMALLINT" property="state" />
	</resultMap>

	<select id="selectWithOffset" resultMap="BaseResultMap" parameterType="net.afnf.blog.bean.PageParam">
		select
			id, entryid, replyto, name, content, postdate, clientinfo, state
		from
			comments
		order by
			id desc
		limit #{limit,jdbcType=INTEGER}
			offset #{offset,jdbcType=INTEGER}
	</select>
</mapper>


text:
var canvas = document.getElementById('main'),
right = document.getElementById('right'),
left = document.getElementById('left'),
horizontal = document.getElementById('horizontal'),
vertical = document.getElementById('vertical'),
scissor = document.getElementById('scissor'),
highlight = document.getElementById('highlight');
var ctx = canvas.getContext("2d");

function clear(ctx){
  ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
}
//draws a solid polygon
function fill(ctx, poly){
  ctx.fillStyle = poly.color;
  ctx.beginPath();
  ctx.moveTo(poly.points[0].x,poly.points[0].y);
  for(var i = 1; i < poly.points.length;i++){
    ctx.lineTo(poly.points[i].x,poly.points[i].y);
  }
  ctx.closePath();
  ctx.fill();
}

//outlines a polygon
function outline(ctx, poly){
  ctx.strokeStyle = "#555";
  ctx.lineWidth = 3;
  ctx.beginPath();
  ctx.moveTo(poly.points[0].x,poly.points[0].y);
  for(var i = 1; i < poly.points.length;i++){
    ctx.lineTo(poly.points[i].x,poly.points[i].y);
  }
  ctx.closePath();
  ctx.stroke();
}

function drawGrid(ctx){
  var horizontal = ctx.canvas.height/size, vertical = ctx.canvas.width/size;
  ctx.strokeStyle = "#888";
  ctx.lineWidth = 1;
  ctx.beginPath();
  for(var i = 0; i <= horizontal;i++){
    ctx.moveTo(4*size,i*size);
    ctx.lineTo(ctx.canvas.width,i*size);
  }
  for(i = 4; i <= vertical;i++){
    ctx.moveTo(i*size,0);
    ctx.lineTo(i*size,ctx.canvas.height);
  }
  ctx.stroke();
}
function draw(){
  clear(ctx);
  drawGrid(ctx);
  for(var i = 0;i < shapes.length;i++){
    if(shapes.selected === i){
      translate(shapes[i],x-point.x,y-point.y);
      fill(ctx,shapes[i]);
      outline(ctx,shapes[i]);
    }else{
      fill(ctx,shapes[i]);
    }
  }
  ctx.drawImage(right,5,5,size*4-10,size*4-10);
  ctx.drawImage(left,5,size*4-5,size*4-10,size*4-10);
  ctx.drawImage(horizontal,5,size*8-5,size*4-10,size*4-10);
  ctx.drawImage(vertical,5,size*12-5,size*4-10,size*4-10);
  if(cutmode){
    ctx.drawImage(highlight,5,size*16-5,size*4-10,size*4-10);
    if(incision){
      ctx.strokeStyle = '#333';
      ctx.beginPath();
      ctx.moveTo(incision.x,incision.y);
      ctx.lineTo(point.x,point.y);
      ctx.stroke();
    }
  }else{
    ctx.drawImage(scissor,5,size*16-5,size*4-10,size*4-10);
  }

}


text:
<!DOCTYPE HTML>

<object th:include="/fragment/header.html :: meta-fragment" th:remove="tag"></object>

<link rel="stylesheet" href="../css/navi.css" />

<title></title>

位置情報が利用できません.設定を確認して下さい

                端末のホーム画面で,[設定]>[プライバシー]>[位置情報サービス] をタップし,[位置情報]をオンにします.
                つづいて,[Safariのサイト]または[Chrome]をタップし,位置情報を[許可しない]から[使用中のみ許可]に変更して下さい.
                (  さらに位置情報サービスの設定方法を見ますか?
                )

端末のホーム画面で,[設定]> [ユーザー設定]をタップし,上部の [ON/OFFスイッチ] をタップします.

            (  このメッセージを二度と表示しない
            )

          Get location information...

          Current location/direction is
          unavailable
          /

        <button id="btn-checkin-log" class="btn btn-sm btn-success" role="button" disabled>0
          user cheked in</button>

          チェックイン

          残り およそ

コンパスは目的地の大まかな方向を指します.電波が届きにくい場所では正常に動作しません.


text:
/*
 * ParameterBindingTest.java
 * JUnit based test
 *
 * Created on March 10, 2005, 2:42 PM
 */

package com.gemstone.gemfire.cache.query.functional;

import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import junit.framework.*;

/**
 *
 * @author vaibhav
 */
public class ParameterBindingTest extends TestCase {

  public ParameterBindingTest(String testName) {
    super(testName);
  }

  protected void setUp() throws java.lang.Exception {
    CacheUtils.startCache();
    Region region = CacheUtils.createRegion("Portfolios", Portfolio.class);
    region.put("0",new Portfolio(0));
    region.put("1",new Portfolio(1));
    region.put("2",new Portfolio(2));
    region.put("3",new Portfolio(3));
  }

  protected void tearDown() throws java.lang.Exception {
    CacheUtils.closeCache();
  }

  public void testBindCollectionInFromClause() throws Exception {
    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
    Object params[] = new Object[1];
    Region region = CacheUtils.getRegion("/Portfolios");
    params[0] = region.values();
    Object result = query.execute(params);
    if(result instanceof Collection){
      int resultSize = ((Collection)result).size();
      if( resultSize != region.values().size())
        fail("Results not as expected");
    }else
      fail("Invalid result");
  }

  public void testBindArrayInFromClause() throws Exception {
    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
    Object params[] = new Object[1];
    Region region = CacheUtils.getRegion("/Portfolios");
    params[0] = region.values().toArray();
    Object result = query.execute(params);
    if(result instanceof Collection){
      int resultSize = ((Collection)result).size();
      if( resultSize != region.values().size())
        fail("Results not as expected");
    }else
      fail("Invalid result");
  }

  public void testBindMapInFromClause() throws Exception {
    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
    Object params[] = new Object[1];
    Map map = new HashMap();
    Region region = CacheUtils.getRegion("/Portfolios");
    Iterator iter = region.entries(false).iterator();
    while(iter.hasNext()){
      Region.Entry entry = (Region.Entry)iter.next();
      map.put(entry.getKey(), entry.getValue());
    }
    params[0] = map;
    Object result = query.execute(params);
    if(result instanceof Collection){
      int resultSize = ((Collection)result).size();
      if( resultSize != region.values().size())
        fail("Results not as expected");
    }else
      fail("Invalid result");
  }

  public void testBindRegionInFromClause() throws Exception {
    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM $1 ");
    Object params[] = new Object[1];
    Region region = CacheUtils.getRegion("/Portfolios");
    params[0] = region;
    Object result = query.execute(params);
    if(result instanceof Collection){
      int resultSize = ((Collection)result).size();
      if( resultSize != region.values().size())
        fail("Results not as expected");
    }else
      fail("Invalid result");
  }

  public void testBindValueAsMethodParamter() throws Exception {
    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM /Portfolios where status.equals($1)");
    Object params[] = new Object[1];
    params[0] = "active";
    Object result = query.execute(params);
    if(result instanceof Collection){
      int resultSize = ((Collection)result).size();
      if( resultSize != 2)
        fail("Results not as expected");
    }else
      fail("Invalid result");
  }

  public void testBindString() throws Exception {
    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM /Portfolios where status = $1");
    Object params[] = new Object[1];
    params[0] = "active";
    Object result = query.execute(params);
    if(result instanceof Collection){
      int resultSize = ((Collection)result).size();
      if( resultSize != 2)
        fail("Results not as expected");
    }else
      fail("Invalid result");
  }

  public void testBindInt() throws Exception {
    Query query = CacheUtils.getQueryService().newQuery("SELECT DISTINCT * FROM /Portfolios where ID = $1");
    Object params[] = new Object[1];
    params[0] = new Integer(1);
    Object result = query.execute(params);
    if(result instanceof Collection){
      int resultSize = ((Collection)result).size();
      if( resultSize != 1)
        fail("Results not as expected");
    }else
      fail("Invalid result");
  }

}


text:
import com.bitbreeds.webrtc.sctp.model.SCTPOrderFlag;
import org.junit.Test;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class SCTPFlagsTest {

    @Test
    public void testSctpFlagsOrdered() {

        assertFalse(SCTPOrderFlag.UNORDERED_END_FRAGMENT.isOrdered());
        assertFalse(SCTPOrderFlag.UNORDERED_MIDDLE_FRAGMENT.isOrdered());
        assertFalse(SCTPOrderFlag.UNORDERED_START_FRAGMENT.isOrdered());
        assertFalse(SCTPOrderFlag.UNORDERED_UNFRAGMENTED.isOrdered());

        assertTrue(SCTPOrderFlag.ORDERED_END_FRAGMENT.isOrdered());
        assertTrue(SCTPOrderFlag.ORDERED_MIDDLE_FRAGMENT.isOrdered());
        assertTrue(SCTPOrderFlag.ORDERED_START_FRAGMENT.isOrdered());
        assertTrue(SCTPOrderFlag.ORDERED_UNFRAGMENTED.isOrdered());

    }

}


text:
package org.avantssar.aslan.xml.client;

import org.avantssar.commons.XMLCommandLineOptions;
import org.kohsuke.args4j.Option;

public class ClientXMLCommandLineOptions extends XMLCommandLineOptions {

	public ClientXMLCommandLineOptions(Class<?> clz) {
		super(clz);
	}

	@Override
	protected String getDefaultJarName() {
		return "aslan-xml-wsclient.jar";
	}

	@Option(name = "-s", aliases = "--host", usage = "Server where the web service is hosted. Defaults to avantssar.ieat.ro.")
	private String host = "avantssar.ieat.ro";

	@Option(name = "-p", aliases = "--port", usage = "Port number where the web service is running. Defaults to 80.")
	private int port = 80;

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public int getPort() {
		return port;
	}

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

}


text:
<?php

require dirname(__DIR__) . '/../vendor/autoload.php';

use keika299\ConohaAPI\Conoha;

$client = new Conoha(array(
    'username'=>'ConoHa',
    'password'=>'paSSword123456#$%',
    'tenantId'=>'487727e3921d44e3bfe7ebb337bf085e'
));

$mailService = $client->mailService();

echo json_encode($mailService->postService('Service name', 'default sub domain'));