text:
package org.hl7.v3;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for AcknowledgementDetailNotSupportedCode.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="AcknowledgementDetailNotSupportedCode">
 *   <restriction base="{urn:hl7-org:v3}cs">
 *     <enumeration value="NS260"/>
 *     <enumeration value="NS261"/>
 *     <enumeration value="NS200"/>
 *     <enumeration value="NS250"/>
 *     <enumeration value="NS202"/>
 *     <enumeration value="NS203"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "AcknowledgementDetailNotSupportedCode")
@XmlEnum
public enum AcknowledgementDetailNotSupportedCode {

    @XmlEnumValue("NS260")
    NS_260("NS260"),
    @XmlEnumValue("NS261")
    NS_261("NS261"),
    @XmlEnumValue("NS200")
    NS_200("NS200"),
    @XmlEnumValue("NS250")
    NS_250("NS250"),
    @XmlEnumValue("NS202")
    NS_202("NS202"),
    @XmlEnumValue("NS203")
    NS_203("NS203");
    private final String value;

    AcknowledgementDetailNotSupportedCode(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static AcknowledgementDetailNotSupportedCode fromValue(String v) {
        for (AcknowledgementDetailNotSupportedCode c: AcknowledgementDetailNotSupportedCode.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}


text:
from flask_cache import Cache
from flask_debugtoolbar import DebugToolbarExtension
from flask_bcrypt import Bcrypt
from flask_sqlalchemy import SQLAlchemy

__author__ = 'Bernardo Martínez Garrido'
__license__ = 'MIT'
__status__ = 'Development'

cache = Cache()

debug_toolbar = DebugToolbarExtension()

bcrypt = Bcrypt()

db = SQLAlchemy()

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <base href="/">
  <title>Researched Tools</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="content/css/app.css">

view1

view2


text:
<?php

namespace Sonata\DoctrinePHPCRAdminBundle\Tree;

use Doctrine\ODM\PHPCR\Document\Generic;
use PHPCR\Util\NodeHelper;

use PHPCR\Util\PathHelper;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Templating\Helper\CoreAssetsHelper;
use Symfony\Cmf\Bundle\TreeBrowserBundle\Tree\TreeInterface;

use Doctrine\ODM\PHPCR\DocumentManager;
use Doctrine\Common\Util\ClassUtils;

use Sonata\AdminBundle\Admin\Pool;
use Sonata\DoctrinePHPCRAdminBundle\Model\ModelManager;

/**
 * A tree implementation to work with Doctrine PHPCR-ODM
 *
 * Your documents need to map all children with an Children mapping for the
 * tree to see its children. Not having the Children annotation is a
 * possibility to not show children you do not want to show.
 *
 * @author David Buchmann <david@liip.ch>
 * @author Uwe Jäger <uwej711@googlemail.com>
 */
class PhpcrOdmTree implements TreeInterface
{
    const VALID_CLASS_ALL = 'all';

    /**
     * @var ModelManager
     */
    private $defaultModelManager;

    /**
     * @var DocumentManager
     */
    private $dm;

    /**
     * @var Pool
     */
    private $pool;

    /**
     * @var TranslatorInterface
     */
    private $translator;

    /**
     * @var CoreAssetsHelper
     */
    private $assetHelper;

    /**
     * Array of cached admin services indexed by class name
     * @var array
     */
    private $admins = array();

    /**
     * List of the valid class names that may be used as tree "ref" fields
     * @var array
     */
    private $validClasses;

    /**
     * @param DocumentManager $dm
     * @param ModelManager $defaultModelManager to use with documents that
     *      have no manager
     * @param Pool $pool to get admin classes for documents from
     * @param TranslatorInterface $translator
     * @param $assetHelper
     * @param array $validClasses list of the valid class names that may be
     *      used as tree "ref" fields
     */
    public function __construct(DocumentManager $dm, ModelManager $defaultModelManager, Pool $pool, TranslatorInterface $translator, CoreAssetsHelper $assetHelper, array $validClasses)
    {
        $this->dm = $dm;
        $this->defaultModelManager = $defaultModelManager;
        $this->pool = $pool;
        $this->translator = $translator;
        $this->assetHelper = $assetHelper;
        $this->validClasses = $validClasses;
    }

    /**
     * {@inheritDoc}
     *
     * Get the children of the document at this path by looking at the Child and Children mappings.
     */
    public function getChildren($path)
    {
        $root = $this->dm->find(null, $path);

        $children = array();

        if ($root) {
            $rootManager = $this->getModelManager($root);
            foreach ($this->getDocumentChildren($rootManager, $root) as $document) {
                if ($document instanceof Generic &&
                    (NodeHelper::isSystemItem($document->getNode())
                        || !strncmp('phpcr_locale:', $document->getNode()->getName(), 13)
                    )
                ) {
                    continue;
                }
                $manager = $this->getModelManager($document);

                $child = $this->documentToArray($manager, $document);

                foreach ($this->getDocumentChildren($manager, $document) as $grandchild) {
                    $child['children'][] = $this->documentToArray($manager, $grandchild);
                }

                $children[] = $child;
            }
        }

        return $children;
    }

    /**
     * {@inheritDoc}
     */
    public function move($moved_path, $target_path)
    {
        $resulting_path = $target_path.'/'.basename($moved_path);

        $document = $this->dm->find(null, $moved_path);
        if (null === $document) {
            return "No document found at $moved_path";
        }

        $this->dm->move($document, $resulting_path);
        $this->dm->flush();

        return $resulting_path;
    }

    /**
     * Returns an array representation of the document
     *
     * @param ModelManager $manager the manager to use with this document
     * @param object       $document
     *
     * @return array
     */
    private function documentToArray(ModelManager $manager, $document)
    {
        $className = ClassUtils::getClass($document);

        $rel = (in_array($className, array_keys($this->validClasses))) ? $className : 'undefined';
        $rel = $this->normalizeClassname($rel);

        $admin = $this->getAdmin($document);
        if (null !== $admin) {
            $label = $admin->toString($document);
            $id = $admin->getNormalizedIdentifier($document);
            $urlSafeId = $admin->getUrlsafeIdentifier($document);
        } else {
            $label = method_exists($document, '__toString') ? (string) $document : ClassUtils::getClass($document);
            $id = $manager->getNormalizedIdentifier($document);
            $urlSafeId = $manager->getUrlsafeIdentifier($document);
        }

        if (substr($label, 0, 1) === '/') {
            $label = PathHelper::getNodeName($label);
        }

        // TODO: this is really the responsibility of the UI
        if (strlen($label) > 18) {
            $label = substr($label, 0, 17) . '...';
        }

        // TODO: ideally the tree should simply not make the node clickable
        $label .= $admin ? '' : ' (not editable)';

        // as long as we filter out invalid documents, we need to pass through this logic as a PHPCR node might have children but only invalid ones.
        // this is quite costly, using the PHPCR node would be a lot more efficient
        $hasChildren = (bool)count($this->getDocumentChildren($manager, $document));

        return array(
            'data'  => $label,
            'attr'  => array(
                'id' => $id,
                'url_safe_id' => $urlSafeId,
                'rel' => $rel
            ),
            'state' => $hasChildren ? 'closed' : null,
        );
    }

    /**
     * @param object $document the PHPCR-ODM document to get the sonata admin for
     *
     * @return \Sonata\AdminBundle\Admin\AdminInterface
     */
    private function getAdmin($document)
    {
        $className = ClassUtils::getClass($document);
        return $this->getAdminByClass($className);
    }

    /**
     * @param string $className
     *
     * @return \Sonata\AdminBundle\Admin\AdminInterface
     */
    private function getAdminByClass($className)
    {
        if (!isset($this->admins[$className])) {
            // will return null if not defined
            $this->admins[$className] = $this->pool->getAdminByClass($className);
        }
        return $this->admins[$className];
    }

    /**
     * @param ModelManager $manager the manager to use with this document
     * @param object $document      the PHPCR-ODM document to get the children of
     *
     * @return array of children indexed by child nodename pointing to the child documents
     */
    private function getDocumentChildren(ModelManager $manager, $document)
    {
        $accessor = PropertyAccess::getPropertyAccessor(); // use deprecated BC method to support symfony 2.2

        /** @var $meta \Doctrine\ODM\PHPCR\Mapping\ClassMetadata */
        $meta = $manager->getMetadata(ClassUtils::getClass($document));

        $children = array();
        foreach ($meta->childrenMappings as $fieldName) {
            $prop = $accessor->getValue($document, $fieldName);
            if (null === $prop) {
                // if there was no method, try reflection as a last resort
                $prop = $meta->getReflectionProperty($fieldName)->getValue($document);
            }
            if (null === $prop) {
                continue;
            }
            if (!is_array($prop)) {
                $prop = $prop->toArray();
            }

            $children = array_merge($children, $this->filterDocumentChildren($document, $prop));
        }

        foreach ($meta->childMappings as $fieldName) {
            $prop = $accessor->getValue($document, $fieldName);
            if (null === $prop) {
                // if there was no method, try reflection as a last resort
                $prop = $meta->getReflectionProperty($fieldName)->getValue($document);
            }
            if (null !== $prop && $this->isValidDocumentChild($document, $prop)) {
                $children[$fieldName] = $prop;
            }
        }

        return $children;
    }

    /**
     * @param $document
     * @param array $children
     *
     * @return array of valid children for the document
     */
    protected function filterDocumentChildren($document, array $children)
    {
        $me = $this;

        return array_filter($children, function ($child) use ($me, $document) {
            return $me->isValidDocumentChild($document, $child);
        });
    }

    /**
     * @param $document
     * @param $child
     *
     * @return bool TRUE if valid, FALSE if not vaild
     */
    public function isValidDocumentChild($document, $child)
    {
        $className = ClassUtils::getClass($document);
        $childClassName = ClassUtils::getClass($child);

        if (!isset($this->validClasses[$className])) {
            // no mapping means no valid children
            return false;
        }

        if (isset($this->validClasses[$className]['valid_children'][0])
            && $this->validClasses[$className]['valid_children'][0] === self::VALID_CLASS_ALL
        ) {
            return true;
        }

        return in_array($childClassName, $this->validClasses[$className]['valid_children']);
    }

    /**
     * {@inheritDoc}
     */
    public function reorder($parent, $moved, $target, $before)
    {
        $parentDocument = $this->dm->find(null, $parent);
        $this->dm->reorder($parentDocument, basename($moved), basename($target), $before);
        $this->dm->flush();
    }

    /**
     * {@inheritDoc}
     */
    public function getAlias()
    {
        return 'phpcr_odm_tree';
    }

    /**
     * {@inheritDoc}
     */
    public function getNodeTypes()
    {
        $result = array('undefined' => array(
            'icon' => array('image' => $this->assetHelper->getUrl('bundles/cmftreebrowser/images/folder.png')),
            'valid_children' => 'all',
            'routes' => array()
        ));

        foreach ($this->validClasses as $className => $children) {
            $rel = $this->normalizeClassname($className);
            $admin = $this->getAdminByClass($className);
            $validChildren = array();
            foreach ($children['valid_children'] as $child) {
                $validChildren[] = $this->normalizeClassname($child);
            }
            $icon = 'bundles/cmftreebrowser/images/folder.png';
            if (!empty($children['image'])) {
                $icon = $children['image'];
            }
            $routes = array();
            if (null !== $admin) {
                foreach ($admin->getRoutes()->getElements() as $code => $route) {
                    $action = explode('.', $code);
                    $key = $this->mapAction(end($action));
                    if (null !== $key) {
                        $routes[$key] = sprintf('%s_%s', $admin->getBaseRouteName(), end($action));
                    }
                }
            }
            $result[$rel] = array(
                'icon' => array('image' => $this->assetHelper->getUrl($icon)),
                'label' => (null !== $admin) ? $admin->trans($admin->getLabel()) : $className,
                'valid_children' => $validChildren,
                'routes' => $routes
            );
        }

        return $result;
    }

    /**
     * {@inheritDoc}
     */
    public function getLabels()
    {
        return array(
            'createItem' => $this->translator->trans('create_item', array(), 'SonataDoctrinePHPCRAdmin'),
            'deleteItem' => $this->translator->trans('delete_item', array(), 'SonataDoctrinePHPCRAdmin'),
        );
    }

    /**
     * @param string $className
     *
     * @return string
     */
    private function normalizeClassname($className)
    {
        return str_replace('\\', '_', $className);
    }

    /**
     * @param string $action
     *
     * @return string|null
     */
    private function mapAction($action)
    {
        switch ($action) {
            case 'edit': return 'select_route';
            case 'create': return 'create_route';
            case 'delete': return 'delete_route';
        }

        return null;
    }

    /**
     * @param object $document
     *
     * @return ModelManager the modelmanager for $document or the default manager
     */
    private function getModelManager($document)
    {
        $admin = $this->getAdmin($document);

        return $admin ? $admin->getModelManager() : $this->defaultModelManager;
    }
}


text:
<?php

/**
 * Authorize Context
 *
 * @package    fpPayment
 * @subpackage Authorize
 * @author		 Ton Sharp <Forma-PRO@66ton99.org.ua>
 */
class fpPaymentAuthorizeContext extends fpPaymentMethodContext
{

  const NAME = 'Authorize';

  /**
   * Model
   *
   * @var fpPaymentAuthorize
   */
  protected $model;

  /**
   * Constructor
   *
   * @return void
   */
  public function __construct()
  {
    $this->getContext()->getDispatcher()->connect('fp_payment_order.after_create', array($this, 'afterOrderCreate'));
    $this->getContext()->getDispatcher()->connect('fp_payment_order.after_create',
      array(fpPaymentAuthorizeTable::getInstance(), 'afterOrderCreate'));
    $this->getContext()->getDispatcher()->connect('fp_payment.after_process', array($this, 'afterProcess'));
    parent::__construct();
  }

	/**
   * (non-PHPdoc)
   * @see fpPaymentMethodContext::renderInfoPage()
   */
  public function renderInfoPage(sfAction &$action, sfRequest $request) {
    $action->forward(sfConfig::get('fp_payment_authorize_page_info_module', 'fpPaymentAuthorize'),
                     sfConfig::get('fp_payment_authorize_page_info_action', 'info'));
  }

  /**
   * Set model
   *
   * @param fpPaymentAuthorize $model
   *
   * @return fpAuthorizeContext
   */
  public function setModel(fpPaymentAuthorize $model)
  {
    $this->model = $model;
    return $this;
  }

  /**
   * Get model
   *
   * @return fpPaymentAuthorize
   */
  public function getModel()
  {
    return $this->model;
  }

  /**
   * After order create
   *
   * @param sfEvent $event - Keys: user, user, values, context
   *
   * @return viod
   */
  public function afterOrderCreate(sfEvent $event)
  {
    $order = $event['context']->getOrderModel();
    $event['values']['x_customer_ip'] = $_SERVER['REMOTE_ADDR'];
    $event['values']['x_invoice_num'] = $order->getId();
    $event['values']['x_amount'] = $order->getSum();
    $order->setType(static::NAME);
    $order->setStatus(fpPaymentOrderStatusEnum::IN_PROCESS);
    $order->save();
  }

  /**
   * After procces
   *
   * @param sfEvent $event - Key: context
   *
   * @return void
   */
  public function afterProcess(sfEvent $event)
  {
    $ipn = $event['context']->getAuthorize()->getIpn();
    $event['context']->getAuthorize()->getModel()->addResponce(implode('|', $ipn->getResponse()));
    $order = $event['context']->getOrderModel();
    if ($ipn->hasErrors()) {
      $order->setStatus(fpPaymentOrderStatusEnum::FAIL);
    } else {
      $order->setStatus(fpPaymentOrderStatusEnum::SUCCESS);
    }
    $order->setType(static::NAME);
    $order->save();
  }

  /**
   * (non-PHPdoc)
   * @see fpPaymentMethodContext::renderSuccessPage()
   */
  public function renderSuccessPage(sfAction &$action, sfRequest $request) {

    if ($this->getIpn()->hasErrors()) {
      return $action->redirect('@fpPaymentPlugin_error?method=' . $request->getParameter('method'));
    }
    $action->forward(sfConfig::get('fp_payment_authorize_page_success_module', 'fpPaymentAuthorize'),
                     sfConfig::get('fp_payment_authorize_page_success_action', 'success'));
  }

  /**
   * (non-PHPdoc)
   * @see fpPaymentMethodContext::renderErrorPage()
   */
  public function renderErrorPage(sfAction &$action, sfRequest $request) {
    $action->forward(sfConfig::get('fp_payment_authorize_page_error_module', 'fpPaymentAuthorize'),
                     sfConfig::get('fp_payment_authorize_page_error_action', 'error'));
  }

}


text:
set -x #echo on
set -e #exit on error

CORDOVA_VERSION=$1
PLATFORM=$2
PLATFORM_VERSION=$3
PLUGIN=$4

FOLDER=".build-$PLATFORM"
cd $FOLDER

CORDOVA_MAJOR_VERSION=$(echo $CORDOVA_VERSION | cut -c 1-1)

if [[ "$CORDOVA_MAJOR_VERSION" == "6" ]]; then
  FETCH_COMMAND="--fetch"
else
  FETCH_COMMAND=""
fi

if [[ "$PLUGIN" == "cordova-android-play-services-gradle-release" ]]; then
  ../node_modules/.bin/cordova plugin add $PLUGIN --variable PLAY_SERVICES_VERSION=+ $FETCH_COMMAND --save
elif [[ "$PLUGIN" == "cordova-android-firebase-gradle-release" ]]; then
  ../node_modules/.bin/cordova plugin add $PLUGIN --variable FIREBASE_VERSION=+ $FETCH_COMMAND --save
else
  ../node_modules/.bin/cordova plugin add $PLUGIN $FETCH_COMMAND
fi


text:
import re
import collections

from enum import Enum

from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLIST,     REFERENCE_IDENTITY_CLASS, REFERENCE_ENUM_CLASS, REFERENCE_BITS, REFERENCE_UNION, ANYXML_CLASS

from ydk.errors import YPYError, YPYModelError
from ydk.providers._importer import _yang_ns

_meta_table = {
    'RadiusAuthenticationTypeIdentity' : {
        'meta_info' : _MetaInfoClass('RadiusAuthenticationTypeIdentity',
            False,
            [
            ],
            'ietf-system',
            'radius-authentication-type',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'AuthenticationMethodIdentity' : {
        'meta_info' : _MetaInfoClass('AuthenticationMethodIdentity',
            False,
            [
            ],
            'ietf-system',
            'authentication-method',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Clock' : {
        'meta_info' : _MetaInfoClass('System.Clock',
            False,
            [
            _MetaInfoClassMember('timezone-name', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The TZ database name to use for the system, such
                as 'Europe/Stockholm'.
                ''',
                'timezone_name',
                'ietf-system', False),
            _MetaInfoClassMember('timezone-utc-offset', ATTRIBUTE, 'int' , None, None,
                [(-1500, 1500)], [],
                '''                The number of minutes to add to UTC time to
                identify the time zone for this system.  For example,
                'UTC - 8:00 hours' would be represented as '-480'.
                Note that automatic daylight saving time adjustment
                is not provided if this object is used.
                ''',
                'timezone_utc_offset',
                'ietf-system', False),
            ],
            'ietf-system',
            'clock',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Ntp.Server.Udp' : {
        'meta_info' : _MetaInfoClass('System.Ntp.Server.Udp',
            False,
            [
            _MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
                [], [],
                '''                The address of the NTP server.
                ''',
                'address',
                'ietf-system', False, [
                    _MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
                        [], [],
                        '''                        The address of the NTP server.
                        ''',
                        'address',
                        'ietf-system', False, [
                            _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                                [], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
                                '''                                The address of the NTP server.
                                ''',
                                'address',
                                'ietf-system', False),
                            _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                                [], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
                                '''                                The address of the NTP server.
                                ''',
                                'address',
                                'ietf-system', False),
                        ]),
                    _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                        [], ['((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.'],
                        '''                        The address of the NTP server.
                        ''',
                        'address',
                        'ietf-system', False),
                ]),
            _MetaInfoClassMember('port', ATTRIBUTE, 'int' , None, None,
                [(0, 65535)], [],
                '''                The port number of the NTP server.
                ''',
                'port',
                'ietf-system', False),
            ],
            'ietf-system',
            'udp',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Ntp.Server.AssociationTypeEnum' : _MetaInfoEnum('AssociationTypeEnum', 'ydk.models.ietf.ietf_system',
        {
            'server':'SERVER',
            'peer':'PEER',
            'pool':'POOL',
        }, 'ietf-system', _yang_ns._namespaces['ietf-system']),
    'System.Ntp.Server' : {
        'meta_info' : _MetaInfoClass('System.Ntp.Server',
            False,
            [
            _MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                An arbitrary name for the NTP server.
                ''',
                'name',
                'ietf-system', True),
            _MetaInfoClassMember('association-type', REFERENCE_ENUM_CLASS, 'AssociationTypeEnum' , 'ydk.models.ietf.ietf_system', 'System.Ntp.Server.AssociationTypeEnum',
                [], [],
                '''                The desired association type for this NTP server.
                ''',
                'association_type',
                'ietf-system', False),
            _MetaInfoClassMember('iburst', ATTRIBUTE, 'bool' , None, None,
                [], [],
                '''                Indicates whether this server should enable burst
                synchronization or not.
                ''',
                'iburst',
                'ietf-system', False),
            _MetaInfoClassMember('prefer', ATTRIBUTE, 'bool' , None, None,
                [], [],
                '''                Indicates whether this server should be preferred
                or not.
                ''',
                'prefer',
                'ietf-system', False),
            _MetaInfoClassMember('udp', REFERENCE_CLASS, 'Udp' , 'ydk.models.ietf.ietf_system', 'System.Ntp.Server.Udp',
                [], [],
                '''                Contains UDP-specific configuration parameters
                for NTP.
                ''',
                'udp',
                'ietf-system', False),
            ],
            'ietf-system',
            'server',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Ntp' : {
        'meta_info' : _MetaInfoClass('System.Ntp',
            False,
            [
            _MetaInfoClassMember('enabled', ATTRIBUTE, 'bool' , None, None,
                [], [],
                '''                Indicates that the system should attempt to
                synchronize the system clock with an NTP server
                from the 'ntp/server' list.
                ''',
                'enabled',
                'ietf-system', False),
            _MetaInfoClassMember('server', REFERENCE_LIST, 'Server' , 'ydk.models.ietf.ietf_system', 'System.Ntp.Server',
                [], [],
                '''                List of NTP servers to use for system clock
                synchronization.  If '/system/ntp/enabled'
                is 'true', then the system will attempt to
                contact and utilize the specified NTP servers.
                ''',
                'server',
                'ietf-system', False),
            ],
            'ietf-system',
            'ntp',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.DnsResolver.Server.UdpAndTcp' : {
        'meta_info' : _MetaInfoClass('System.DnsResolver.Server.UdpAndTcp',
            False,
            [
            _MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
                [], [],
                '''                The address of the DNS server.
                ''',
                'address',
                'ietf-system', False, [
                    _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                        [], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
                        '''                        The address of the DNS server.
                        ''',
                        'address',
                        'ietf-system', False),
                    _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                        [], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
                        '''                        The address of the DNS server.
                        ''',
                        'address',
                        'ietf-system', False),
                ]),
            _MetaInfoClassMember('port', ATTRIBUTE, 'int' , None, None,
                [(0, 65535)], [],
                '''                The UDP and TCP port number of the DNS server.
                ''',
                'port',
                'ietf-system', False),
            ],
            'ietf-system',
            'udp-and-tcp',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.DnsResolver.Server' : {
        'meta_info' : _MetaInfoClass('System.DnsResolver.Server',
            False,
            [
            _MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                An arbitrary name for the DNS server.
                ''',
                'name',
                'ietf-system', True),
            _MetaInfoClassMember('udp-and-tcp', REFERENCE_CLASS, 'UdpAndTcp' , 'ydk.models.ietf.ietf_system', 'System.DnsResolver.Server.UdpAndTcp',
                [], [],
                '''                Contains UDP- and TCP-specific configuration
                parameters for DNS.
                ''',
                'udp_and_tcp',
                'ietf-system', False),
            ],
            'ietf-system',
            'server',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.DnsResolver.Options' : {
        'meta_info' : _MetaInfoClass('System.DnsResolver.Options',
            False,
            [
            _MetaInfoClassMember('attempts', ATTRIBUTE, 'int' , None, None,
                [(1, 255)], [],
                '''                The number of times the resolver will send a query to
                all of its name servers before giving up and returning
                an error to the calling application.
                ''',
                'attempts',
                'ietf-system', False),
            _MetaInfoClassMember('timeout', ATTRIBUTE, 'int' , None, None,
                [(1, 255)], [],
                '''                The amount of time the resolver will wait for a
                response from each remote name server before
                retrying the query via a different name server.
                ''',
                'timeout',
                'ietf-system', False),
            ],
            'ietf-system',
            'options',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.DnsResolver' : {
        'meta_info' : _MetaInfoClass('System.DnsResolver',
            False,
            [
            _MetaInfoClassMember('options', REFERENCE_CLASS, 'Options' , 'ydk.models.ietf.ietf_system', 'System.DnsResolver.Options',
                [], [],
                '''                Resolver options.  The set of available options has been
                limited to those that are generally available across
                different resolver implementations and generally useful.
                ''',
                'options',
                'ietf-system', False),
            _MetaInfoClassMember('search', REFERENCE_LEAFLIST, 'str' , None, None,
                [], ['((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.'],
                '''                An ordered list of domains to search when resolving
                a host name.
                ''',
                'search',
                'ietf-system', False),
            _MetaInfoClassMember('server', REFERENCE_LIST, 'Server' , 'ydk.models.ietf.ietf_system', 'System.DnsResolver.Server',
                [], [],
                '''                List of the DNS servers that the resolver should query.
                When the resolver is invoked by a calling application, it
                sends the query to the first name server in this list.  If
                no response has been received within 'timeout' seconds,
                the resolver continues with the next server in the list.
                If no response is received from any server, the resolver
                continues with the first server again.  When the resolver
                has traversed the list 'attempts' times without receiving
                any response, it gives up and returns an error to the
                calling application.
                Implementations MAY limit the number of entries in this
                list.
                ''',
                'server',
                'ietf-system', False),
            ],
            'ietf-system',
            'dns-resolver',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Radius.Server.Udp' : {
        'meta_info' : _MetaInfoClass('System.Radius.Server.Udp',
            False,
            [
            _MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
                [], [],
                '''                The address of the RADIUS server.
                ''',
                'address',
                'ietf-system', False, [
                    _MetaInfoClassMember('address', REFERENCE_UNION, 'str' , None, None,
                        [], [],
                        '''                        The address of the RADIUS server.
                        ''',
                        'address',
                        'ietf-system', False, [
                            _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                                [], ['(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'],
                                '''                                The address of the RADIUS server.
                                ''',
                                'address',
                                'ietf-system', False),
                            _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                                [], ['((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'],
                                '''                                The address of the RADIUS server.
                                ''',
                                'address',
                                'ietf-system', False),
                        ]),
                    _MetaInfoClassMember('address', ATTRIBUTE, 'str' , None, None,
                        [], ['((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.'],
                        '''                        The address of the RADIUS server.
                        ''',
                        'address',
                        'ietf-system', False),
                ]),
            _MetaInfoClassMember('authentication-port', ATTRIBUTE, 'int' , None, None,
                [(0, 65535)], [],
                '''                The port number of the RADIUS server.
                ''',
                'authentication_port',
                'ietf-system', False),
            _MetaInfoClassMember('shared-secret', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The shared secret, which is known to both the
                RADIUS client and server.
                ''',
                'shared_secret',
                'ietf-system', False),
            ],
            'ietf-system',
            'udp',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Radius.Server' : {
        'meta_info' : _MetaInfoClass('System.Radius.Server',
            False,
            [
            _MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                An arbitrary name for the RADIUS server.
                ''',
                'name',
                'ietf-system', True),
            _MetaInfoClassMember('authentication-type', REFERENCE_IDENTITY_CLASS, 'RadiusAuthenticationTypeIdentity' , 'ydk.models.ietf.ietf_system', 'RadiusAuthenticationTypeIdentity',
                [], [],
                '''                The authentication type requested from the RADIUS
                server.
                ''',
                'authentication_type',
                'ietf-system', False),
            _MetaInfoClassMember('udp', REFERENCE_CLASS, 'Udp' , 'ydk.models.ietf.ietf_system', 'System.Radius.Server.Udp',
                [], [],
                '''                Contains UDP-specific configuration parameters
                for RADIUS.
                ''',
                'udp',
                'ietf-system', False),
            ],
            'ietf-system',
            'server',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Radius.Options' : {
        'meta_info' : _MetaInfoClass('System.Radius.Options',
            False,
            [
            _MetaInfoClassMember('attempts', ATTRIBUTE, 'int' , None, None,
                [(1, 255)], [],
                '''                The number of times the device will send a query to
                all of its RADIUS servers before giving up.
                ''',
                'attempts',
                'ietf-system', False),
            _MetaInfoClassMember('timeout', ATTRIBUTE, 'int' , None, None,
                [(1, 255)], [],
                '''                The number of seconds the device will wait for a
                response from each RADIUS server before trying with a
                different server.
                ''',
                'timeout',
                'ietf-system', False),
            ],
            'ietf-system',
            'options',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Radius' : {
        'meta_info' : _MetaInfoClass('System.Radius',
            False,
            [
            _MetaInfoClassMember('options', REFERENCE_CLASS, 'Options' , 'ydk.models.ietf.ietf_system', 'System.Radius.Options',
                [], [],
                '''                RADIUS client options.
                ''',
                'options',
                'ietf-system', False),
            _MetaInfoClassMember('server', REFERENCE_LIST, 'Server' , 'ydk.models.ietf.ietf_system', 'System.Radius.Server',
                [], [],
                '''                List of RADIUS servers used by the device.
                When the RADIUS client is invoked by a calling
                application, it sends the query to the first server in
                this list.  If no response has been received within
                'timeout' seconds, the client continues with the next
                server in the list.  If no response is received from any
                server, the client continues with the first server again.
                When the client has traversed the list 'attempts' times
                without receiving any response, it gives up and returns an
                error to the calling application.
                ''',
                'server',
                'ietf-system', False),
            ],
            'ietf-system',
            'radius',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Authentication.User.AuthorizedKey' : {
        'meta_info' : _MetaInfoClass('System.Authentication.User.AuthorizedKey',
            False,
            [
            _MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                An arbitrary name for the SSH key.
                ''',
                'name',
                'ietf-system', True),
            _MetaInfoClassMember('algorithm', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The public key algorithm name for this SSH key.
                Valid values are the values in the IANA 'Secure Shell
                (SSH) Protocol Parameters' registry, Public Key
                Algorithm Names.
                ''',
                'algorithm',
                'ietf-system', False),
            _MetaInfoClassMember('key-data', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The binary public key data for this SSH key, as
                specified by RFC 4253, Section 6.6, i.e.:
                  string    certificate or public key format
                            identifier
                  byte[n]   key/certificate data.
                ''',
                'key_data',
                'ietf-system', False),
            ],
            'ietf-system',
            'authorized-key',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Authentication.User' : {
        'meta_info' : _MetaInfoClass('System.Authentication.User',
            False,
            [
            _MetaInfoClassMember('name', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The user name string identifying this entry.
                ''',
                'name',
                'ietf-system', True),
            _MetaInfoClassMember('authorized-key', REFERENCE_LIST, 'AuthorizedKey' , 'ydk.models.ietf.ietf_system', 'System.Authentication.User.AuthorizedKey',
                [], [],
                '''                A list of public SSH keys for this user.  These keys
                are allowed for SSH authentication, as described in
                RFC 4253.
                ''',
                'authorized_key',
                'ietf-system', False),
            _MetaInfoClassMember('password', ATTRIBUTE, 'str' , None, None,
                [], ['$0$.*|$1$[a-zA-Z0-9./]{1,8}$[a-zA-Z0-9./]{22}|$5$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}|$6$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}'],
                '''                The password for this entry.
                ''',
                'password',
                'ietf-system', False),
            ],
            'ietf-system',
            'user',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System.Authentication' : {
        'meta_info' : _MetaInfoClass('System.Authentication',
            False,
            [
            _MetaInfoClassMember('user', REFERENCE_LIST, 'User' , 'ydk.models.ietf.ietf_system', 'System.Authentication.User',
                [], [],
                '''                The list of local users configured on this device.
                ''',
                'user',
                'ietf-system', False),
            _MetaInfoClassMember('user-authentication-order', REFERENCE_LEAFLIST, 'AuthenticationMethodIdentity' , 'ydk.models.ietf.ietf_system', 'AuthenticationMethodIdentity',
                [], [],
                '''                When the device authenticates a user with a password,
                it tries the authentication methods in this leaf-list in
                order.  If authentication with one method fails, the next
                method is used.  If no method succeeds, the user is
                denied access.
                An empty user-authentication-order leaf-list still allows
                authentication of users using mechanisms that do not
                involve a password.
                If the 'radius-authentication' feature is advertised by
                the NETCONF server, the 'radius' identity can be added to
                this list.
                If the 'local-users' feature is advertised by the
                NETCONF server, the 'local-users' identity can be
                added to this list.
                ''',
                'user_authentication_order',
                'ietf-system', False),
            ],
            'ietf-system',
            'authentication',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'System' : {
        'meta_info' : _MetaInfoClass('System',
            False,
            [
            _MetaInfoClassMember('authentication', REFERENCE_CLASS, 'Authentication' , 'ydk.models.ietf.ietf_system', 'System.Authentication',
                [], [],
                '''                The authentication configuration subtree.
                ''',
                'authentication',
                'ietf-system', False),
            _MetaInfoClassMember('clock', REFERENCE_CLASS, 'Clock' , 'ydk.models.ietf.ietf_system', 'System.Clock',
                [], [],
                '''                Configuration of the system date and time properties.
                ''',
                'clock',
                'ietf-system', False),
            _MetaInfoClassMember('contact', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The administrator contact information for the system.
                A server implementation MAY map this leaf to the sysContact
                MIB object.  Such an implementation needs to use some
                mechanism to handle the differences in size and characters
                allowed between this leaf and sysContact.  The definition of
                such a mechanism is outside the scope of this document.
                ''',
                'contact',
                'ietf-system', False),
            _MetaInfoClassMember('dns-resolver', REFERENCE_CLASS, 'DnsResolver' , 'ydk.models.ietf.ietf_system', 'System.DnsResolver',
                [], [],
                '''                Configuration of the DNS resolver.
                ''',
                'dns_resolver',
                'ietf-system', False),
            _MetaInfoClassMember('hostname', ATTRIBUTE, 'str' , None, None,
                [], ['((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.'],
                '''                The name of the host.  This name can be a single domain
                label or the fully qualified domain name of the host.
                ''',
                'hostname',
                'ietf-system', False),
            _MetaInfoClassMember('location', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The system location.
                A server implementation MAY map this leaf to the sysLocation
                MIB object.  Such an implementation needs to use some
                mechanism to handle the differences in size and characters
                allowed between this leaf and sysLocation.  The definition
                of such a mechanism is outside the scope of this document.
                ''',
                'location',
                'ietf-system', False),
            _MetaInfoClassMember('ntp', REFERENCE_CLASS, 'Ntp' , 'ydk.models.ietf.ietf_system', 'System.Ntp',
                [], [],
                '''                Configuration of the NTP client.
                ''',
                'ntp',
                'ietf-system', False),
            _MetaInfoClassMember('radius', REFERENCE_CLASS, 'Radius' , 'ydk.models.ietf.ietf_system', 'System.Radius',
                [], [],
                '''                Configuration of the RADIUS client.
                ''',
                'radius',
                'ietf-system', False),
            ],
            'ietf-system',
            'system',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'SystemState.Platform' : {
        'meta_info' : _MetaInfoClass('SystemState.Platform',
            False,
            [
            _MetaInfoClassMember('machine', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                A vendor-specific identifier string representing
                the hardware in use.
                ''',
                'machine',
                'ietf-system', False),
            _MetaInfoClassMember('os-name', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The name of the operating system in use -
                for example, 'Linux'.
                ''',
                'os_name',
                'ietf-system', False),
            _MetaInfoClassMember('os-release', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The current release level of the operating
                system in use.  This string MAY indicate
                the OS source code revision.
                ''',
                'os_release',
                'ietf-system', False),
            _MetaInfoClassMember('os-version', ATTRIBUTE, 'str' , None, None,
                [], [],
                '''                The current version level of the operating
                system in use.  This string MAY indicate
                the specific OS build date and target variant
                information.
                ''',
                'os_version',
                'ietf-system', False),
            ],
            'ietf-system',
            'platform',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'SystemState.Clock' : {
        'meta_info' : _MetaInfoClass('SystemState.Clock',
            False,
            [
            _MetaInfoClassMember('boot-datetime', ATTRIBUTE, 'str' , None, None,
                [], ['\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'],
                '''                The system date and time when the system last restarted.
                ''',
                'boot_datetime',
                'ietf-system', False),
            _MetaInfoClassMember('current-datetime', ATTRIBUTE, 'str' , None, None,
                [], ['\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'],
                '''                The current system date and time.
                ''',
                'current_datetime',
                'ietf-system', False),
            ],
            'ietf-system',
            'clock',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'SystemState' : {
        'meta_info' : _MetaInfoClass('SystemState',
            False,
            [
            _MetaInfoClassMember('clock', REFERENCE_CLASS, 'Clock' , 'ydk.models.ietf.ietf_system', 'SystemState.Clock',
                [], [],
                '''                Monitoring of the system date and time properties.
                ''',
                'clock',
                'ietf-system', False),
            _MetaInfoClassMember('platform', REFERENCE_CLASS, 'Platform' , 'ydk.models.ietf.ietf_system', 'SystemState.Platform',
                [], [],
                '''                Contains vendor-specific information for
                identifying the system platform and operating system.
                ''',
                'platform',
                'ietf-system', False),
            ],
            'ietf-system',
            'system-state',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'SetCurrentDatetimeRpc.Input' : {
        'meta_info' : _MetaInfoClass('SetCurrentDatetimeRpc.Input',
            False,
            [
            _MetaInfoClassMember('current-datetime', ATTRIBUTE, 'str' , None, None,
                [], ['\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'],
                '''                The current system date and time.
                ''',
                'current_datetime',
                'ietf-system', False),
            ],
            'ietf-system',
            'input',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'SetCurrentDatetimeRpc' : {
        'meta_info' : _MetaInfoClass('SetCurrentDatetimeRpc',
            False,
            [
            _MetaInfoClassMember('input', REFERENCE_CLASS, 'Input' , 'ydk.models.ietf.ietf_system', 'SetCurrentDatetimeRpc.Input',
                [], [],
                '''                ''',
                'input',
                'ietf-system', False),
            ],
            'ietf-system',
            'set-current-datetime',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'SystemRestartRpc' : {
        'meta_info' : _MetaInfoClass('SystemRestartRpc',
            False,
            [
            ],
            'ietf-system',
            'system-restart',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'SystemShutdownRpc' : {
        'meta_info' : _MetaInfoClass('SystemShutdownRpc',
            False,
            [
            ],
            'ietf-system',
            'system-shutdown',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'RadiusChapIdentity' : {
        'meta_info' : _MetaInfoClass('RadiusChapIdentity',
            False,
            [
            ],
            'ietf-system',
            'radius-chap',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'RadiusIdentity' : {
        'meta_info' : _MetaInfoClass('RadiusIdentity',
            False,
            [
            ],
            'ietf-system',
            'radius',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'RadiusPapIdentity' : {
        'meta_info' : _MetaInfoClass('RadiusPapIdentity',
            False,
            [
            ],
            'ietf-system',
            'radius-pap',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
    'LocalUsersIdentity' : {
        'meta_info' : _MetaInfoClass('LocalUsersIdentity',
            False,
            [
            ],
            'ietf-system',
            'local-users',
            _yang_ns._namespaces['ietf-system'],
        'ydk.models.ietf.ietf_system'
        ),
    },
}
_meta_table['System.Ntp.Server.Udp']['meta_info'].parent =_meta_table['System.Ntp.Server']['meta_info']
_meta_table['System.Ntp.Server']['meta_info'].parent =_meta_table['System.Ntp']['meta_info']
_meta_table['System.DnsResolver.Server.UdpAndTcp']['meta_info'].parent =_meta_table['System.DnsResolver.Server']['meta_info']
_meta_table['System.DnsResolver.Server']['meta_info'].parent =_meta_table['System.DnsResolver']['meta_info']
_meta_table['System.DnsResolver.Options']['meta_info'].parent =_meta_table['System.DnsResolver']['meta_info']
_meta_table['System.Radius.Server.Udp']['meta_info'].parent =_meta_table['System.Radius.Server']['meta_info']
_meta_table['System.Radius.Server']['meta_info'].parent =_meta_table['System.Radius']['meta_info']
_meta_table['System.Radius.Options']['meta_info'].parent =_meta_table['System.Radius']['meta_info']
_meta_table['System.Authentication.User.AuthorizedKey']['meta_info'].parent =_meta_table['System.Authentication.User']['meta_info']
_meta_table['System.Authentication.User']['meta_info'].parent =_meta_table['System.Authentication']['meta_info']
_meta_table['System.Clock']['meta_info'].parent =_meta_table['System']['meta_info']
_meta_table['System.Ntp']['meta_info'].parent =_meta_table['System']['meta_info']
_meta_table['System.DnsResolver']['meta_info'].parent =_meta_table['System']['meta_info']
_meta_table['System.Radius']['meta_info'].parent =_meta_table['System']['meta_info']
_meta_table['System.Authentication']['meta_info'].parent =_meta_table['System']['meta_info']
_meta_table['SystemState.Platform']['meta_info'].parent =_meta_table['SystemState']['meta_info']
_meta_table['SystemState.Clock']['meta_info'].parent =_meta_table['SystemState']['meta_info']
_meta_table['SetCurrentDatetimeRpc.Input']['meta_info'].parent =_meta_table['SetCurrentDatetimeRpc']['meta_info']


text:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<m:GetOrderByPartnerOrderIDResponse xmlns:m="http://api.geotrust.com/webtrust/query">
    <m:GetOrderByPartnerOrderIDResult>
        <m:QueryResponseHeader>
            <m:SuccessCode>0</m:SuccessCode>
            <m:Timestamp>2014-12-01T23:14:01.332+00:00</m:Timestamp>
            <m:ReturnCount>1</m:ReturnCount>
        </m:QueryResponseHeader>
        <m:OrderDetail>
            <m:OrderInfo>
                <m:PartnerOrderID>131000-00000</m:PartnerOrderID>
                <m:GeoTrustOrderID>10630000</m:GeoTrustOrderID>
                <m:DomainName>www.example.com</m:DomainName>
                <m:OrderDate>2013-12-27T16:01:32+00:00</m:OrderDate>
        <m:OrderCompleteDate>2013-12-27T18:02:54+00:00</m:OrderCompleteDate>
                <m:Price>000.0</m:Price>
                <m:Method>RESELLER</m:Method>
                <m:OrderStatusMajor>COMPLETE</m:OrderStatusMajor>
                <m:ValidityPeriod>3</m:ValidityPeriod>
                <m:ServerCount>1</m:ServerCount>
                <m:RenewalInd>Y</m:RenewalInd>
                <m:ProductCode>SECURESITEEV</m:ProductCode>
                <m:OrderState>COMPLETED</m:OrderState>
                <m:SealPreference>IN_TS_IN_MS</m:SealPreference>
                <m:SealStatus>TRUST_SEAL</m:SealStatus>
                <m:VulnerabilityScanInfo>
                    <m:ServiceStatus>INACTIVE</m:ServiceStatus>
                    <m:OnDemandScanInProgress>false</m:OnDemandScanInProgress>
                </m:VulnerabilityScanInfo>
            </m:OrderInfo>
            <m:QuickOrderDetail>
                <m:OrderStatusMinor>
            <m:OrderStatusMinorCode>ORDER_COMPLETE</m:OrderStatusMinorCode>
             <m:OrderStatusMinorName>Order Complete</m:OrderStatusMinorName>
                </m:OrderStatusMinor>
                <m:OrganizationInfo>
                    <m:OrganizationName>Org</m:OrganizationName>
                    <m:Division>none</m:Division>
                    <m:RegistrationNumber>S1480000</m:RegistrationNumber>
                    <m:JurisdictionRegion>Region</m:JurisdictionRegion>
                    <m:JurisdictionCountry>Country</m:JurisdictionCountry>
                    <m:OrganizationAddress>
                        <m:City>City</m:City>
                        <m:Region>Region</m:Region>
                        <m:Country>US</m:Country>
                    </m:OrganizationAddress>
                </m:OrganizationInfo>
    <m:ApproverNotifiedDate>2013-12-27T16:01:32+00:00</m:ApproverNotifiedDate>
            </m:QuickOrderDetail>
            <m:OrderContacts>
                <m:AdminContact>
                    <m:FirstName>The First</m:FirstName>
                    <m:LastName>The Last</m:LastName>
                    <m:Phone>0000000000</m:Phone>
                    <m:Email>administrator@example.com</m:Email>
                    <m:Title>Some Title</m:Title>
                    <m:OrganizationName>Some Org</m:OrganizationName>
                    <m:AddressLine1>Some Address</m:AddressLine1>
                    <m:City>Some City</m:City>
                    <m:Region>Some Region</m:Region>
                    <m:PostalCode>00000</m:PostalCode>
                    <m:Country>US</m:Country>
                </m:AdminContact>
                <m:TechContact>
                    <m:FirstName>The First</m:FirstName>
                    <m:LastName>The Last</m:LastName>
                    <m:Phone>8000000000</m:Phone>
                    <m:Email>ssl@example.com</m:Email>
                    <m:Title>SSL Ops</m:Title>
                    <m:OrganizationName>Some Org</m:OrganizationName>
                    <m:AddressLine1>Some Address</m:AddressLine1>
                    <m:City>Some City</m:City>
                    <m:Region>Some Region</m:Region>
                    <m:PostalCode>00000</m:PostalCode>
                    <m:Country>US</m:Country>
                </m:TechContact>
                <m:BillingContact>
                    <m:FirstName>Person</m:FirstName>
                    <m:LastName>Last</m:LastName>
                    <m:Phone>0000000000</m:Phone>
                    <m:Email>billing@example.com</m:Email>
                    <m:Title>Random Title</m:Title>
                    <m:OrganizationName>Nope</m:OrganizationName>
                    <m:AddressLine1>Address goes here</m:AddressLine1>
                    <m:City>A City</m:City>
                    <m:Region>A Region</m:Region>
                    <m:PostalCode>00000-0000</m:PostalCode>
                    <m:Country>US</m:Country>
                </m:BillingContact>
            </m:OrderContacts>
            <m:CertificateInfo>
                <m:CertificateStatus>ACTIVE</m:CertificateStatus>
                <m:StartDate>2014-10-21T00:00:00+00:00</m:StartDate>
                <m:EndDate>2014-12-30T23:59:59+00:00</m:EndDate>
                <m:CommonName>www.example.com</m:CommonName>
                <m:SerialNumber>A5E411</m:SerialNumber>
                <m:Locality>A Location</m:Locality>
                <m:State>Some state</m:State>
                <m:Organization>Nope</m:Organization>
                <m:Country>US</m:Country>
                <m:OrganizationalUnit>none</m:OrganizationalUnit>
                <m:RegistrationNumber>S1480000</m:RegistrationNumber>
                <m:JurisdictionRegion>Region</m:JurisdictionRegion>
                <m:JurisdictionCountry>US</m:JurisdictionCountry>
                <m:WebServerType>other</m:WebServerType>
                <m:AlgorithmInfo>
            <m:SignatureHashAlgorithm>SHA2-256</m:SignatureHashAlgorithm>
        <m:SignatureEncryptionAlgorithm>RSA</m:SignatureEncryptionAlgorithm>
                </m:AlgorithmInfo>
            </m:CertificateInfo>
            <m:Fulfillment>
                <m:CACertificates>
                    <m:CACertificate>
                        <m:Type>INTERMEDIATE</m:Type>
                        <m:CACert>-----BEGIN CERTIFICATE-----
                       ...
                        -----END CERTIFICATE-----</m:CACert>
                    </m:CACertificate>
                    <m:CACertificate>
                        <m:Type>INTERMEDIATE</m:Type>
                        <m:CACert>-----BEGIN CERTIFICATE-----
                        ...
                        -----END CERTIFICATE-----</m:CACert>
                    </m:CACertificate>
                    <m:CACertificate>
                        <m:Type>ROOT</m:Type>
                        <m:CACert>-----BEGIN CERTIFICATE-----
                        ...
                        -----END CERTIFICATE-----</m:CACert>
                    </m:CACertificate>
                </m:CACertificates>
                <m:ServerCertificate>-----BEGIN CERTIFICATE-----
               ...
                -----END CERTIFICATE-----
            </m:ServerCertificate>
        </m:Fulfillment>
        <m:AuthenticationComments/>
        <m:AuthenticationStatuses>
            <m:AuthenticationStatus>
        <m:AuthenticationStep>DOMAIN_VERIFICATION</m:AuthenticationStep>
                <m:Status>COMPLETED</m:Status>
                <m:LastUpdated>2014-10-21T15:05:05+00:00</m:LastUpdated>
            </m:AuthenticationStatus>
            <m:AuthenticationStatus>
        <m:AuthenticationStep>ORGANIZATION_VERIFICATION</m:AuthenticationStep>
                <m:Status>COMPLETED</m:Status>
                <m:LastUpdated>2014-10-21T15:05:05+00:00</m:LastUpdated>
            </m:AuthenticationStatus>
            <m:AuthenticationStatus>
                <m:AuthenticationStep>VERIFICATION_CALL</m:AuthenticationStep>
                <m:Status>COMPLETED</m:Status>
                <m:LastUpdated>2014-10-21T15:05:05+00:00</m:LastUpdated>
            </m:AuthenticationStatus>
        </m:AuthenticationStatuses>
        <m:TrustServicesDetails/>
        <m:TrialDetails>
            <m:OrderPlacedAsTrial>false</m:OrderPlacedAsTrial>
        </m:TrialDetails>
    </m:OrderDetail>
</m:GetOrderByPartnerOrderIDResult>
</m:GetOrderByPartnerOrderIDResponse>
</env:Body>
</env:Envelope>


text:
<?php

namespace Zotlabs\Lib;

/**
 * MarkdownSoap
 * Purify Markdown for storage
 *   $x = new MarkdownSoap($string_to_be_cleansed);
 *   $text = $x->clean();
 *
 * What this does:
 * 1. extracts code blocks and privately escapes them from processing
 * 2. Run html purifier on the content
 * 3. put back the code blocks
 * 4. run htmlspecialchars on the entire content for safe storage
 *
 * At render time:
 *    $markdown = \Zotlabs\Lib\MarkdownSoap::unescape($text);
 *    $html = \Michelf\MarkdownExtra::DefaultTransform($markdown);
 */

class MarkdownSoap {

	private $token;

	private $str;

	function __construct($s) {
		$this->str  = $s;
		$this->token = random_string(20);
	}

	function clean() {

		$x = $this->extract_code($this->str);

		$x = $this->purify($x);

		$x = $this->putback_code($x);

		$x = $this->escape($x);

		return $x;
	}

	function extract_code($s) {

		$text = preg_replace_callback('{
					(?:\n\n|\A\n?)
					(	            # $1 = the code block -- one or more lines, starting with a space/tab
					  (?>
						[ ]{'.'4'.'}  # Lines must start with a tab or a tab-width of spaces
						.*\n+
					  )+
					)
					((?=^[ ]{0,'.'4'.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
				}xm',
				[ $this , 'encode_code' ], $s);

		return $text;
	}

	function encode_code($matches) {
		return $this->token . ';' . base64_encode($matches[0]) . ';' ;
	}

	function decode_code($matches) {
		return base64_decode($matches[1]);
	}

	function putback_code($s) {
		$text = preg_replace_callback('{' . $this->token . '\;(.*?)\;}xm',[ $this, 'decode_code' ], $s);
		return $text;
	}

	function purify($s) {
		$s = $this->protect_autolinks($s);
		$s = purify_html($s);
		$s = $this->unprotect_autolinks($s);
		return $s;
	}

	function protect_autolinks($s) {
		$s = preg_replace('/\<(https?\:\/\/)(.*?)\>/','[$1$2]($1$2)',$s);
		return $s;
	}

	function unprotect_autolinks($s) {
		return $s;

	}

	function escape($s) {
		return htmlspecialchars($s,ENT_QUOTES,'UTF-8',false);
	}

	static public function unescape($s) {
		return htmlspecialchars_decode($s,ENT_QUOTES);
	}
}


text:
class UartBridge : public UartBridgeIndicationWrapper {
  public:
    UartBridge(unsigned int indicationId, unsigned int requestId);
    ~UartBridge();

    // these are called by the main thread
    void put(const uint8_t character);
    void setDivisor(const uint16_t divisor);
    void get(const uint8_t character);
    void setDivisorDone();

  private:
    sem_t responseSem;
    uint32_t responseData;

    UartBridgeRequestProxy *uartBridgeRequest;
};
#endif


text:
package ai.nitro.bot4j.middle.domain.receive.payload;

public class ReadNotificationReceivePayload extends AbstractReceivePayload {

	protected String watermark;

	public ReadNotificationReceivePayload() {
		super(Type.READ_NOTIFICATION);
	}

	public String getWatermark() {
		return watermark;
	}

	public void setWatermark(final String watermark) {
		this.watermark = watermark;
	}

	@Override
	public String toString() {
		return "type=[" + type + "], watermark=[" + watermark + "]";
	}
}


text:
var logger = require('logger.js')({level: process.env.LOG_LEVEL || "error",name:"main"});

module.exports={
    logger : logger
}


text:
package mgl64

import (
	"fmt"
	"math"
)

// Generates a circle centered at (0,0) with a given radius.
// The radii are assumed to be in GL's coordinate sizing.
//
// Technically this draws an ellipse with two axes that match with the X and Y axes, the reason it has a radiusX and radiusY is because GL's coordinate system
// is proportional to screen width and screen height. So if you have a non-square viewport, a single radius will appear
// to "squash" the circle in one direction (usually the Y direction), so the X and Y radius allow for a circle to be made.
// A good way to get the correct radii is with mathgl.ScreenToGLCoords(radius, radius, screenWidth, screenHeight) which will get you the correct
// proportional GL coords.
//
// The numSlices argument specifies how many triangles you want your circle divided into, setting this
// number to too low a value may cause problem (and too high will cause it to take a lot of memory and time to compute
// without much gain in resolution).
//
// This uses discrete triangles, not a triangle fan
func Circle(radiusX, radiusY float64, numSlices int) []Vec2 {
	twoPi := float64(2.0 * math.Pi)

	circlePoints := make([]Vec2, 0, numSlices*3)
	center := Vec2{0.0, 0.0}
	previous := Vec2{radiusX, 0.0}

	for theta := twoPi / float64(numSlices); !FloatEqual(theta, twoPi); theta = Clamp(theta+twoPi/float64(numSlices), 0.0, twoPi) {
		sin, cos := math.Sincos(float64(theta))
		curr := Vec2{float64(cos) * radiusX, float64(sin) * radiusY}

		circlePoints = append(circlePoints, center, previous, curr)
		previous = curr
	}

	// Now add the final point at theta=2pi
	circlePoints = append(circlePoints, center, previous, Vec2{radiusX, 0.0})
	return circlePoints
}

// Generates a 2-triangle rectangle for use with GL_TRIANGLES. The width and height should use GL's proportions (that is, where a width of 1.0
// is equivalent to half of the width of the render target); however, the y-coordinates grow downwards, not upwards. That is, it
// assumes you want the origin of the rectangle with the top-left corner at (0.0,0.0).
//
// Keep in mind that GL's coordinate system is proportional, so width=height will not result in a square unless your viewport is square.
// If you want to maintain proportionality regardless of screen size, use the results of w,h := ScreenToGLCoordsf(absoluteWidth, absoluteHeight, screenWidth, screenHeight);
// w,h=w+1,h-1 in the call to this function. (The w+1,h-1 step maps the coordinates to start at 0.0 rather than -1.0)
func Rect(width, height float64) []Vec2 {
	return []Vec2{
		{0.0, 0.0},
		{0.0, -height},
		{width, -height},

		{0.0, 0.0},
		{width, -height},
		{width, 0.0},
	}
}

func QuadraticBezierCurve2D(t float64, cPoint1, cPoint2, cPoint3 Vec2) Vec2 {
	if t < 0.0 || t > 1.0 {
		panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]")
	}

	return cPoint1.Mul((1.0 - t) * (1.0 - t)).Add(cPoint2.Mul(2 * (1 - t) * t)).Add(cPoint3.Mul(t * t))
}

func QuadraticBezierCurve3D(t float64, cPoint1, cPoint2, cPoint3 Vec3) Vec3 {
	if t < 0.0 || t > 1.0 {
		panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]")
	}

	return cPoint1.Mul((1.0 - t) * (1.0 - t)).Add(cPoint2.Mul(2 * (1 - t) * t)).Add(cPoint3.Mul(t * t))
}

func CubicBezierCurve2D(t float64, cPoint1, cPoint2, cPoint3, cPoint4 Vec2) Vec2 {
	if t < 0.0 || t > 1.0 {
		panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]")
	}

	return cPoint1.Mul((1 - t) * (1 - t) * (1 - t)).Add(cPoint2.Mul(3 * (1 - t) * (1 - t) * t)).Add(cPoint3.Mul(3 * (1 - t) * t * t)).Add(cPoint4.Mul(t * t * t))
}

func CubicBezierCurve3D(t float64, cPoint1, cPoint2, cPoint3, cPoint4 Vec3) Vec3 {
	if t < 0.0 || t > 1.0 {
		panic("Can't interpolate on bezier curve with t out of range [0.0,1.0]")
	}

	return cPoint1.Mul((1 - t) * (1 - t) * (1 - t)).Add(cPoint2.Mul(3 * (1 - t) * (1 - t) * t)).Add(cPoint3.Mul(3 * (1 - t) * t * t)).Add(cPoint4.Mul(t * t * t))
}

// Returns the point at point t along an n-control point Bezier curve
//
// t must be in the range 0.0 and 1.0 or this function will panic. Consider [0.0,1.0] to be similar to a percentage,
// 0.0 is first control point, and the point at 1.0 is the last control point. Any point in between is how far along the path you are between 0 and 1.
//
// This function is not sensitive to the coordinate system of the control points. It will correctly interpolate regardless of whether they're in screen coords,
// gl coords, or something else entirely
func BezierCurve2D(t float64, cPoints []Vec2) Vec2 {
	if t < 0.0 || t > 1.0 {
		panic("Input to bezier has t not in range [0,1]. If you think this is a precision error, use mathgl.Clamp[f|d] before calling this function")
	}

	n := len(cPoints) - 1
	point := cPoints[0].Mul(float64(math.Pow(float64(1.0-t), float64(n))))

	for i := 1; i <= n; i++ {
		point = point.Add(cPoints[i].Mul(float64(float64(choose(n, i)) * math.Pow(float64(1-t), float64(n-i)) * math.Pow(float64(t), float64(i))))) // P += P_i * nCi * (1-t)^(n-i) * t^i
	}

	return point
}

// Same as the 2D version, except the line is in 3D space
func BezierCurve3D(t float64, cPoints []Vec3) Vec3 {
	if t < 0.0 || t > 1.0 {
		panic("Input to bezier has t not in range [0,1]. If you think this is a precision error, use mathgl.Clamp[f|d] before calling this function")
	}

	n := len(cPoints) - 1
	point := cPoints[0].Mul(float64(math.Pow(float64(1.0-t), float64(n))))

	for i := 1; i <= n; i++ {
		point = point.Add(cPoints[i].Mul(float64(float64(choose(n, i)) * math.Pow(float64(1-t), float64(n-i)) * math.Pow(float64(t), float64(i))))) // P += P_i * nCi * (1-t)^(n-i) * t^i
	}

	return point
}

// Generates a bezier curve with controlPoints cPoints. The numPoints argument
// determines how many "samples" it makes along the line. For instance, a
// call to this with numPoints 2 will have exactly two points: the start and end points
// For any points above 2 it will divide it into numPoints-1 chunks (which means it will generate numPoints-2 vertices other than the beginning and end).
// So for 3 points it will divide it in half, 4 points into thirds, and so on.
//
// This is likely to get rather expensive for anything over perhaps a cubic curve.
func MakeBezierCurve2D(numPoints int, cPoints []Vec2) (line []Vec2) {
	line = make([]Vec2, numPoints)
	if numPoints == 0 {
		return
	} else if numPoints == 1 {
		line[0] = cPoints[0]
		return
	} else if numPoints == 2 {
		line[0] = cPoints[0]
		line[1] = cPoints[len(cPoints)-1]
		return
	}

	line[0] = cPoints[0]
	for i := 1; i < numPoints-1; i++ {
		line[i] = BezierCurve2D(Clamp(float64(i)/float64(numPoints-1), 0.0, 1.0), cPoints)
	}
	line[numPoints-1] = cPoints[len(cPoints)-1]

	return
}

// Same as the 2D version, except with the line in 3D space
func MakeBezierCurve3D(numPoints int, cPoints []Vec3) (line []Vec3) {
	line = make([]Vec3, numPoints)
	if numPoints == 0 {
		return
	} else if numPoints == 1 {
		line[0] = cPoints[0]
		return
	} else if numPoints == 2 {
		line[0] = cPoints[0]
		line[1] = cPoints[len(cPoints)-1]
		return
	}

	line[0] = cPoints[0]
	for i := 1; i < numPoints-1; i++ {
		line[i] = BezierCurve3D(Clamp(float64(i)/float64(numPoints-1), 0.0, 1.0), cPoints)
	}
	line[numPoints-1] = cPoints[len(cPoints)-1]

	return
}

// Creates a 2-dimensional Bezier surface of arbitrary degree in 3D Space
// Like the curve functions, if u or v are not in the range [0.0,1.0] the function will panic, use Clamp[f|d]
// to ensure it is correct.
//
// The control point matrix must not be jagged, or this will end up panicking from an index out of bounds exception
func BezierSurface(u, v float64, cPoints [][]Vec3) Vec3 {
	if u < 0.0 || u > 1.0 || v < 1.0 || v > 1.0 {
		panic("u or v not in range [0.0,1.0] in BezierSurface")
	}

	n := len(cPoints) - 1
	m := len(cPoints[0]) - 1

	point := cPoints[0][0].Mul(float64(math.Pow(float64(1.0-u), float64(n)) * math.Pow(float64(1.0-v), float64(m))))

	for i := 0; i <= n; i++ {
		for j := 0; j <= m; j++ {
			if i == 0 && j == 0 {
				continue
			}

			point = point.Add(cPoints[i][j].Mul(float64(float64(choose(n, i)) * math.Pow(float64(u), float64(i)) * math.Pow(float64(1.0-u), float64(n-i)) * float64(choose(m, j)) * math.Pow(float64(v), float64(j)) * math.Pow(float64(1.0-v), float64(m-j)))))
		}
	}

	return point
}

// Does interpolation over a spline of several bezier curves. Each bezier curve must have a finite range,
// though the spline may be disjoint. The bezier curves are not required to be in any particular order.
//
// If t is out of the range of all given curves, this function will panic
func BezierSplineInterpolate2D(t float64, ranges [][2]float64, cPoints [][]Vec2) Vec2 {
	if len(ranges) != len(cPoints) {
		panic("Each bezier curve needs a range")
	}

	for i, curveRange := range ranges {
		if t >= curveRange[0] && t <= curveRange[1] {
			return BezierCurve2D((t-curveRange[0])/(curveRange[1]-curveRange[0]), cPoints[i])
		}
	}

	panic("t is out of the range of all bezier curves in this spline")
}

// Does interpolation over a spline of several bezier curves. Each bezier curve must have a finite range,
// though the spline may be disjoint. The bezier curves are not required to be in any particular order.
//
// If t is out of the range of all given curves, this function will panic
func BezierSplineInterpolate3D(t float64, ranges [][2]float64, cPoints [][]Vec3) Vec3 {
	if len(ranges) != len(cPoints) {
		panic("Each bezier curve needs a range")
	}

	for i, curveRange := range ranges {
		if t >= curveRange[0] && t <= curveRange[1] {
			return BezierCurve3D((t-curveRange[0])/(curveRange[1]-curveRange[0]), cPoints[i])
		}
	}

	panic("t is out of the range of all bezier curves in this spline")
}

// Reticulates ALL the Splines
//
// For the overly serious: the function is just for fun. It does nothing except prints a Maxis reference. Technically you could "reticulate splines"
// by joining a bunch of splines together, but that ruins the joke.
func ReticulateSplines(ranges [][][2]float64, cPoints [][][]Vec2, withLlamas bool) {
	if !withLlamas {
		fmt.Println("You can't reticulate splines without llamas, silly.")
	} else {
		fmt.Println("Actually, you can't even reticulate splines WITH llamas")
	}
}

// Transform from pixel coordinates to GL coordinates.
//
// This assumes that your pixel coordinate system considers its origin to be in the top left corner (GL's is in the bottom left).
// The coordinates x and y may be out of the range [0,screenWidth-1] and [0,screeneHeight-1].
//
// GL's coordinate system maps [screenWidth-1,0] to [1.0,1.0] and [0,screenHeight-1] to [-1.0,-1.0]. If x and y are out of the range, they'll still
// be mapped correctly, just off the screen. (e.g. if y = 2*(screenHeight-1) you'll get -3.0 for yOut)
//
// This is similar to Unproject, except for 2D cases and much simpler (especially since an inverse may always be found)
func ScreenToGLCoords(x, y int, screenWidth, screenHeight int) (xOut, yOut float64) {
	xOut = 2.0*float64(x)/float64(screenWidth-1) - 1.0
	yOut = -2.0*float64(y)/float64(screenHeight-1) + 1.0

	return
}

// Transform from GL's proportional system to pixel coordinates.
//
// Assumes the pixel coordinate system has its origin in the top left corner. (GL's is in the bottom left)
//
// GL's coordinate system maps [screenWidth-1,0] to [1.0,1.0] and [0,screenHeight-1] to [-1.0,-1.0]. If x and y are out of the range, they'll still
// be mapped correctly, just off the screen. (e.g. if y=-3.0, you'll get 2*(screenHeight-1) for yOut)
//
// This is similar to Project, except for 2D cases and much simpler
func GLToScreenCoords(x, y float64, screenWidth, screenHeight int) (xOut, yOut int) {
	xOut = int((x + 1.0) * float64(screenWidth-1) / 2.0)
	yOut = int((1.0 - y) * float64(screenHeight-1) / 2.0)

	return
}

// choose calculates the binomial coefficient C(n,k) aka nCk
func choose(n, k int) int {
	if k == 0 {
		return 1
	} else if n == 0 {
		return 0
	}
	result := float64(n - (k - 1))
	for i := 2; i <= k; i++ {
		result *= float64(n-(k-i)) / float64(i)
	}

	return int(result)
}


text:
'use strict';

'use strict';

function Node(val){
  this.val = val;
  this.next = null;
}

function Stack(){
  this.top = null;
  this.max = null;
}

Stack.prototype.push = function(node){
  if(node.val > this.max) this.max = node.val;
  if(!this.top) {
    this.top = node;
    node.next = null;
  } else {
    node.next = this.top
    this.top = node;
  }
}
Stack.prototype.pop = function(){
  if(!this.top) return null;
  if(this.max === this.top.val){
    let max = 0;
    let current = this.top.next;
    while(current != null){
      if(current.val > max) max = current.val;
      current = current.next;
    }
    this.max = max
  }
  let temp = this.top;
  this.top = this.top.next;
  return temp;
}

Stack.prototype.getMax = function(){
  return this.max;
}

let myStack = new Stack();
myStack.push(new Node(20))
myStack.push(new Node(10))
myStack.push(new Node(15))
myStack.push(new Node(16))
myStack.push(new Node(25))
myStack.push(new Node(22))
console.log(myStack.getMax());
myStack.pop();
console.log(myStack.getMax());
myStack.pop();
console.log(myStack.getMax());


text:
#include "library/common/extensions/filters/http/route_cache_reset/config.h"

#include "library/common/extensions/filters/http/route_cache_reset/filter.h"

namespace Envoy {
namespace Extensions {
namespace HttpFilters {
namespace RouteCacheReset {

Http::FilterFactoryCb RouteCacheResetFilterFactory::createFilterFactoryFromProtoTyped(
    const envoymobile::extensions::filters::http::route_cache_reset::RouteCacheReset&,
    const std::string&, Server::Configuration::FactoryContext&) {

  return [](Http::FilterChainFactoryCallbacks& callbacks) -> void {
    callbacks.addStreamDecoderFilter(std::make_shared<RouteCacheResetFilter>());
  };
}

/**
 * Static registration for the RouteCacheReset filter. @see NamedHttpFilterConfigFactory.
 */
REGISTER_FACTORY(RouteCacheResetFilterFactory, Server::Configuration::NamedHttpFilterConfigFactory);

} // namespace RouteCacheReset
} // namespace HttpFilters
} // namespace Extensions
} // namespace Envoy


text:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

  <title>Single Local Preview (Video Only)</title>
  <meta http-equiv="X-UA-Compatible" content="chrome=1"/>

      Local Preview

      <video width="320" height="240" id="view1"
          autoplay="autoplay"></video>
      <video width="320" height="240" id="view2"
          autoplay="autoplay"></video>


text:
<?php

namespace Teapotio\Base\ForumBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;

/**
 * Flag
 *
 * @ORM\MappedSuperclass
 */
class Flag implements FlagInterface
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var \DateTime $dateCreated
     *
     * @ORM\Column(name="date_created", type="datetime")
     */
    protected $dateCreated;

    /**
     * @var integer $totalFlagged
     *
     * @ORM\Column(name="total_flagged", type="integer")
     */
    protected $totalFlagged = 0;

    /**
     * @var boolean $isDeleted
     *
     * @ORM\Column(name="is_deleted", type="boolean")
     */
    protected $isDeleted = false;

    /**
     * @var ArrayCollection $users
     */
    protected $users;

    /**
     * @var \Teapotio\Base\ForumBundle\Entity\Topic $topic
     */
    protected $topic;

    /**
     * @var \Teapotio\Base\ForumBundle\Entity\Message $message
     */
    protected $message;

    /**
     * @var \Teapotio\Base\ForumBundle\Entity\Moderation $moderation
     */
    protected $moderation;

    public function __construct()
    {
        $this->users = new ArrayCollection();
    }

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

    /**
     * Set dateCreated
     *
     * @param \DateTime $dateCreated
     * @return Flag
     */
    public function setDateCreated($dateCreated)
    {
        $this->dateCreated = $dateCreated;

        return $this;
    }

    /**
     * Get dateCreated
     *
     * @return \DateTime
     */
    public function getDateCreated()
    {
        return $this->dateCreated;
    }

    /**
     * Set totalFlagged
     *
     * @param integer $int
     *
     * @return Flag
     */
    public function setTotalFlagged($int)
    {
        $this->totalFlagged = $int;

        return $this;
    }

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

    /**
     * Set isDeleted
     *
     * @param boolean $isDeleted
     * @return Flag
     */
    public function setDeleted($isDeleted)
    {
        $this->isDeleted = $isDeleted;

        return $this;
    }

    /**
     * Get isDeleted
     *
     * @return boolean
     */
    public function isDeleted()
    {
        return $this->isDeleted;
    }

    /**
     * Set user
     *
     * @param UserInterface $user
     * @return Moderation
     */
    public function addUser(UserInterface $user)
    {
        $this->users[] = $user;

        return $this;
    }

    /**
     * Remove a user entity from the collection
     *
     * @param  UserInterface  $user
     *
     * @return ArrayCollection
     */
    public function removeUser(UserInterface $user)
    {
        $this->users->removeElement($user);

        return $this->users;
    }

    /**
     * Get a list of users
     *
     * @return ArrayCollection
     */
    public function getUsers()
    {
        return $this->users;
    }

    /**
     * Set message
     *
     * @param \Teapotio\Base\ForumBundle\Entity\Message $message
     *
     * @return Flag
     */
    public function setMessage(MessageInterface $message)
    {
        $this->message = $message;

        return $this;
    }

    /**
     * Get message
     *
     * @return \Teapotio\Base\ForumBundle\Entity\Message
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Set topic
     *
     * @param \Teapotio\Base\ForumBundle\Entity\Topic $topic
     *
     * @return Flag
     */
    public function setTopic(TopicInterface $topic)
    {
        $this->topic = $topic;

        return $this;
    }

    /**
     * Get topic
     *
     * @return \Teapotio\Base\ForumBundle\Entity\Topic
     */
    public function getTopic()
    {
        return $this->topic;
    }

    /**
     * Set moderation
     *
     * @param \Teapotio\Base\ForumBundle\Entity\Moderation $moderation
     *
     * @return Flag
     */
    public function setModeration(ModerationInterface $moderation)
    {
        $this->moderation = $moderation;

        return $this;
    }

    /**
     * Get moderation
     *
     * @return \Teapotio\Base\ForumBundle\Entity\Moderation
     */
    public function getModeration()
    {
        return $this->moderation;
    }

    /**
     * Returns the entity associated to this flag
     *
     * @return Message|Topic
     */
    public function getFlaggedItem()
    {
        if ($this->getMessage() !== null) {
            return $this->getMessage();
        }
        else if ($this->getTopic() !== null) {
            return $this->getTopic();
        }
    }

    /**
     * Returns the name of the moderated item
     *
     * @return string
     */
    public function getFlaggedItemName()
    {
        return $this->getFlaggedItem()->getClassName();
    }
}


text:
using OpenSim.Framework.Servers.HttpServer;
using System;
using System.IO;
using System.Text;

namespace OpenSim.Tests.Common.Mock
{
    public class TestOSHttpResponse : IOSHttpResponse
    {
        /// <summary>
        /// Content type property.
        /// </summary>
        /// <remarks>
        /// Setting this property will also set IsContentTypeSet to
        /// true.
        /// </remarks>
        public string ContentType { get; set; }

        /// <summary>
        /// Boolean property indicating whether the content type
        /// property actively has been set.
        /// </summary>
        /// <remarks>
        /// IsContentTypeSet will go away together with .NET base.
        /// </remarks>
        // public bool IsContentTypeSet
        // {
        //     get { return _contentTypeSet; }
        // }
        // private bool _contentTypeSet;

        /// <summary>
        /// Length of the body content; 0 if there is no body.
        /// </summary>
        public long ContentLength { get; set; }

        /// <summary>
        /// Alias for ContentLength.
        /// </summary>
        public long ContentLength64 { get; set; }

        /// <summary>
        /// Encoding of the body content.
        /// </summary>
        public Encoding ContentEncoding { get; set; }

        public bool KeepAlive { get; set; }

        /// <summary>
        /// Get or set the keep alive timeout property (default is
        /// 20). Setting this to 0 also disables KeepAlive. Setting
        /// this to something else but 0 also enable KeepAlive.
        /// </summary>
        public int KeepAliveTimeout { get; set; }

        /// <summary>
        /// Return the output stream feeding the body.
        /// </summary>
        /// <remarks>
        /// On its way out...
        /// </remarks>
        public Stream OutputStream { get; private set; }

        public string ProtocolVersion { get; set; }

        /// <summary>
        /// Return the output stream feeding the body.
        /// </summary>
        public Stream Body { get; private set; }

        /// <summary>
        /// Set a redirct location.
        /// </summary>
        public string RedirectLocation { private get; set; }

        /// <summary>
        /// Chunk transfers.
        /// </summary>
        public bool SendChunked { get; set; }

        /// <summary>
        /// HTTP status code.
        /// </summary>
        public int StatusCode { get; set; }

        /// <summary>
        /// HTTP status description.
        /// </summary>
        public string StatusDescription { get; set; }

        public bool ReuseContext { get; set; }

        /// <summary>
        /// Add a header field and content to the response.
        /// </summary>
        /// <param name="key">string containing the header field
        /// name</param>
        /// <param name="value">string containing the header field
        /// value</param>
        public void AddHeader(string key, string value)
        {
            throw new NotImplementedException();
        }

        public void Send()
        {
        }
    }
}


text:
package com.haulmont.cuba.core.sys.remoting;

import com.haulmont.cuba.core.sys.AppContext;
import com.haulmont.cuba.core.sys.SecurityContext;
import com.haulmont.cuba.security.global.ClientBasedSession;
import com.haulmont.cuba.security.global.UserSession;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.remoting.support.RemoteInvocation;
import org.springframework.remoting.support.RemoteInvocationFactory;

public class CubaRemoteInvocationFactory implements RemoteInvocationFactory {

    @Override
    public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
        SecurityContext securityContext = AppContext.getSecurityContext();

        CubaRemoteInvocation remoteInvocation = new CubaRemoteInvocation(methodInvocation,
                securityContext == null ? null : securityContext.getSessionId());

        if (securityContext != null) {
            UserSession session = securityContext.getSession();

            if (session instanceof ClientBasedSession && ((ClientBasedSession) session).hasRequestScopedInfo()) {
                remoteInvocation.setLocale(session.getLocale() != null ? session.getLocale().toLanguageTag() : null);
                remoteInvocation.setTimeZone(session.getTimeZone());
                remoteInvocation.setAddress(session.getAddress());
                remoteInvocation.setClientInfo(session.getClientInfo());
            }
        }

        return remoteInvocation;
    }
}


text:
/**
*============================================================================
*  The Ohio State University Research Foundation, Emory University,
*  the University of Minnesota Supercomputing Institute
*
*  Distributed under the OSI-approved BSD 3-Clause License.
*  See http://ncip.github.com/cagrid-grid-incubation/LICENSE.txt for details.
*============================================================================
**/
/**
*============================================================================
*============================================================================
**/
package org.cagrid.redcap.common;

import java.rmi.RemoteException;

/**
 * This class is autogenerated, DO NOT EDIT.
 *
 * This interface represents the API which is accessable on the grid service from the client.
 *
 * @created by Introduce Toolkit version 1.3
 *
 */
public interface RedcapDataServiceI {

  public org.oasis.wsrf.properties.GetMultipleResourcePropertiesResponse getMultipleResourceProperties(org.oasis.wsrf.properties.GetMultipleResourceProperties_Element params) throws RemoteException ;

  public org.oasis.wsrf.properties.GetResourcePropertyResponse getResourceProperty(javax.xml.namespace.QName params) throws RemoteException ;

  public org.oasis.wsrf.properties.QueryResourcePropertiesResponse queryResourceProperties(org.oasis.wsrf.properties.QueryResourceProperties_Element params) throws RemoteException ;

  /**
   * The standard caGrid Data Service query method.
   *
   * @param cqlQuery
   *	The CQL query to be executed against the data source.
   * @return The result of executing the CQL query against the data source.
   * @throws QueryProcessingException
   *	Thrown when an error occurs in processing a CQL query
   * @throws MalformedQueryException
   *	Thrown when a query is found to be improperly formed
   */
  public gov.nih.nci.cagrid.cqlresultset.CQLQueryResults query(gov.nih.nci.cagrid.cqlquery.CQLQuery cqlQuery) throws RemoteException, gov.nih.nci.cagrid.data.faults.QueryProcessingExceptionType, gov.nih.nci.cagrid.data.faults.MalformedQueryExceptionType ;

}


text:
def square_of_sum(number):
    return sum([x for x in range(number+1)]) ** 2

def sum_of_squares(number):
    return sum([x**2 for x in range(number+1)])

def difference_of_squares(number):
    return square_of_sum(number) - sum_of_squares(number)