text:
import {format, getLocale} from './locales';
import {isLayoutSizeDefined} from '#core/dom/layout';
import {
  observeWithSharedInOb,
  unobserveWithSharedInOb,
} from '#core/dom/layout/viewport-observer';
import {userAssert} from '../../../src/log';

export class AmpTimeAgo extends AMP.BaseElement {
  /** @param {!AmpElement} element */
  constructor(element) {
    super(element);

    /** @private {string} */
    this.datetime_ = '';

    /** @private {string} */
    this.locale_ = '';

    /** @private {string} */
    this.title_ = '';

    /** @private {?Element} */
    this.timeElement_ = null;

    /** @private {boolean} */
    this.cutOffReached_ = false;
  }

  /** @override */
  buildCallback() {
    userAssert(
      this.element.textContent.length > 0,
      'Content cannot be empty. Found in: %s',
      this.element
    );

    this.datetime_ = this.element.getAttribute('datetime');
    this.locale_ = getLocale(
      this.element.getAttribute('locale') ||
        this.win.document.documentElement.lang
    );
    this.title_ = this.element.textContent.trim();

    this.element.textContent = '';
    if (!this.element.hasAttribute('role')) {
      this.element.setAttribute('role', 'text');
    }

    this.timeElement_ = document.createElement('time');
    this.timeElement_.setAttribute('datetime', this.datetime_);

    this.setFuzzyTimestampValue_();
    this.element.appendChild(this.timeElement_);
  }

  /**
   * @param {boolean} inViewport
   * @private
   */
  viewportCallback_(inViewport) {
    if (inViewport && !this.cutOffReached_) {
      this.setFuzzyTimestampValue_();
    }
  }

  /** @override */
  layoutCallback() {
    observeWithSharedInOb(this.element, (inViewport) =>
      this.viewportCallback_(inViewport)
    );
    return Promise.resolve();
  }

  /** @override */
  unlayoutCallback() {
    unobserveWithSharedInOb(this.element);
    return false;
  }

  /** @override */
  mutatedAttributesCallback(mutations) {
    const datetime = mutations['datetime'];
    if (datetime !== undefined) {
      this.datetime_ = datetime;
      this.setFuzzyTimestampValue_();
    }
  }

  /** @override */
  isLayoutSupported(layout) {
    return isLayoutSizeDefined(layout);
  }

  /** @private */
  setFuzzyTimestampValue_() {
    if (this.element.hasAttribute('cutoff')) {
      const cutoff = parseInt(this.element.getAttribute('cutoff'), 10);
      const elDate = new Date(this.datetime_);
      const secondsAgo = Math.floor((Date.now() - elDate.getTime()) / 1000);

      if (secondsAgo > cutoff) {
        this.timeElement_.textContent = this.title_;
        this.cutOffReached_ = true;
      } else {
        this.timeElement_.textContent = format(this.datetime_, this.locale_);
      }
    } else {
      this.timeElement_.textContent = format(this.datetime_, this.locale_);
    }
  }
}

AMP.extension('amp-timeago', '0.1', (AMP) => {
  AMP.registerElement('amp-timeago', AmpTimeAgo);
});


text:
'use strict';

(function (root, factory) {
  if (typeof define === 'function' && define.amd) {
    define('pdfjs-web/overlay_manager', ['exports'], factory);
  } else if (typeof exports !== 'undefined') {
    factory(exports);
  } else {
    factory((root.pdfjsWebOverlayManager = {}));
  }
}(this, function (exports) {

var OverlayManager = {
  overlays: {},
  active: null,

  /**
   * @param {string} name The name of the overlay that is registered.
   * @param {HTMLDivElement} element The overlay's DOM element.
   * @param {function} callerCloseMethod (optional) The method that, if present,
   *                   will call OverlayManager.close from the Object
   *                   registering the overlay. Access to this method is
   *                   necessary in order to run cleanup code when e.g.
   *                   the overlay is force closed. The default is null.
   * @param {boolean} canForceClose (optional) Indicates if opening the overlay
   *                  will close an active overlay. The default is false.
   * @returns {Promise} A promise that is resolved when the overlay has been
   *                    registered.
   */
  register: function overlayManagerRegister(name, element,
                                            callerCloseMethod, canForceClose) {
    return new Promise(function (resolve) {
      var container;
      if (!name || !element || !(container = element.parentNode)) {
        throw new Error('Not enough parameters.');
      } else if (this.overlays[name]) {
        throw new Error('The overlay is already registered.');
      }
      this.overlays[name] = { element: element,
                              container: container,
                              callerCloseMethod: (callerCloseMethod || null),
                              canForceClose: (canForceClose || false) };
      resolve();
    }.bind(this));
  },

  /**
   * @param {string} name The name of the overlay that is unregistered.
   * @returns {Promise} A promise that is resolved when the overlay has been
   *                    unregistered.
   */
  unregister: function overlayManagerUnregister(name) {
    return new Promise(function (resolve) {
      if (!this.overlays[name]) {
        throw new Error('The overlay does not exist.');
      } else if (this.active === name) {
        throw new Error('The overlay cannot be removed while it is active.');
      }
      delete this.overlays[name];

      resolve();
    }.bind(this));
  },

  /**
   * @param {string} name The name of the overlay that should be opened.
   * @returns {Promise} A promise that is resolved when the overlay has been
   *                    opened.
   */
  open: function overlayManagerOpen(name) {
    return new Promise(function (resolve) {
      if (!this.overlays[name]) {
        throw new Error('The overlay does not exist.');
      } else if (this.active) {
        if (this.overlays[name].canForceClose) {
          this._closeThroughCaller();
        } else if (this.active === name) {
          throw new Error('The overlay is already active.');
        } else {
          throw new Error('Another overlay is currently active.');
        }
      }
      this.active = name;
      this.overlays[this.active].element.classList.remove('hidden');
      this.overlays[this.active].container.classList.remove('hidden');

      window.addEventListener('keydown', this._keyDown);
      resolve();
    }.bind(this));
  },

  /**
   * @param {string} name The name of the overlay that should be closed.
   * @returns {Promise} A promise that is resolved when the overlay has been
   *                    closed.
   */
  close: function overlayManagerClose(name) {
    return new Promise(function (resolve) {
      if (!this.overlays[name]) {
        throw new Error('The overlay does not exist.');
      } else if (!this.active) {
        throw new Error('The overlay is currently not active.');
      } else if (this.active !== name) {
        throw new Error('Another overlay is currently active.');
      }
      this.overlays[this.active].container.classList.add('hidden');
      this.overlays[this.active].element.classList.add('hidden');
      this.active = null;

      window.removeEventListener('keydown', this._keyDown);
      resolve();
    }.bind(this));
  },

  /**
   * @private
   */
  _keyDown: function overlayManager_keyDown(evt) {
    var self = OverlayManager;
    if (self.active && evt.keyCode === 27) { // Esc key.
      self._closeThroughCaller();
      evt.preventDefault();
    }
  },

  /**
   * @private
   */
  _closeThroughCaller: function overlayManager_closeThroughCaller() {
    if (this.overlays[this.active].callerCloseMethod) {
      this.overlays[this.active].callerCloseMethod();
    }
    if (this.active) {
      this.close(this.active);
    }
  }
};

exports.OverlayManager = OverlayManager;
}));

redpajama_set_name: RedPajamaGithub


text:
package com.netflix.atlas.akka

import javax.inject.Inject
import javax.inject.Singleton

import akka.actor.Actor
import akka.actor.ActorSystem
import akka.actor.Props
import akka.routing.FromConfig
import com.netflix.iep.service.AbstractService
import com.netflix.iep.service.ClassFactory
import com.typesafe.config.Config
import com.typesafe.scalalogging.StrictLogging

/**
  * Exposes actor system as service for healthcheck and proper shutdown. Additional
  * actors to start up can be specified using the `atlas.akka.actors` property.
  */
@Singleton
class ActorService @Inject() (system: ActorSystem, config: Config, classFactory: ClassFactory)
    extends AbstractService
    with StrictLogging {

  override def startImpl(): Unit = {
    import scala.jdk.CollectionConverters._
    config.getConfigList("atlas.akka.actors").asScala.foreach { cfg =>
      val name = cfg.getString("name")
      val cls = Class.forName(cfg.getString("class"))
      val ref = system.actorOf(newActor(name, cls), name)
      logger.info(s"created actor '${ref.path}' using class '${cls.getName}'")
    }
  }

  private def newActor(name: String, cls: Class[_]): Props = {
    val props = Props(classFactory.newInstance[Actor](cls))
    val routerCfgPath = s"akka.actor.deployment./$name.router"
    if (config.hasPath(routerCfgPath)) FromConfig.props(props) else props
  }

  override def stopImpl(): Unit = {}
}


text:
<?php

namespace PayPal\EnumType;

use \WsdlToPhp\PackageBase\AbstractStructEnumBase;

/**
 * This class stands for SubscribeTextType EnumType
 * Meta information extracted from the WSDL
 * - documentation: values for subscribe button text
 * @subpackage Enumerations
 * @author WsdlToPhp <contact@wsdltophp.com>
 */
class SubscribeTextType extends AbstractStructEnumBase
{
    /**
     * Constant for value 'BUYNOW'
     * Meta information extracted from the WSDL
     * - documentation: button wording is BUYNOW
     * @return string 'BUYNOW'
     */
    const VALUE_BUYNOW = 'BUYNOW';
    /**
     * Constant for value 'SUBSCRIBE'
     * Meta information extracted from the WSDL
     * - documentation: button wording is SUBSCRIBE
     * @return string 'SUBSCRIBE'
     */
    const VALUE_SUBSCRIBE = 'SUBSCRIBE';
    /**
     * Return allowed values
     * @uses self::VALUE_BUYNOW
     * @uses self::VALUE_SUBSCRIBE
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_BUYNOW,
            self::VALUE_SUBSCRIBE,
        );
    }
}


text:
// Side-by-side comparison functions

var ngram_data = {}
var tsum = []
var nsum = {}
var ngramboxes = 0

function addNgram(json, state) {

    // Start from the beginning
    var D = new Date(state.dfrom)

    // Are we measuring emails or topics?
    if (state.topics) {
        json.emails = json.thread_struct
    }

    // For each day from $beginning to $now, push the no. of emails sent that day into an array
    var daily = []
    var zz = 0
    if (json.emails.length >= json.max) {
        document.getElementById('trends').innerHTML = "NOTE: Too many results found (≥" + json.max + ") , n-grams may be distorted"
        state.broken = true
    }
    for (var i in json.emails) {
        var f = parseInt(json.emails[i].epoch/86400)
        daily[f] = daily[f] ? daily[f]+1 : 1
        zz++;
    }
    tsum.push(zz)
    nsum[state.ngram] = zz
    var arr = []
    while (D <= state.dto) {
        var day = new Date(D)
        D.setDate(D.getDate()+1)
        var d = parseInt(D.getTime()/86400/1000) // make correct pointer to daily[] array

        arr.push([day, daily[d] ? daily[d] : 0])
    }
    ngram_data[state.ngram] = arr

    var ngram_names = []
    for (var n in ngram_data) ngram_names.push(n)

    // Sort so that the largest areas will be at the bottom in case of stacking
    ngram_names.sort(function(a,b) { return nsum[b] - nsum[a] })
    tsum = []
    for (var nn in ngram_names) {
        tsum.push(nsum[ngram_names[nn]])
    }

    var ngram_arr = []
    var avg = {}

    // find a suitable rolling-average timespan
    // set it to 1/15th of the timespan, or at least 3 days
    var ndays = parseInt(ngram_data[ngram_names[0]].length/15)
    if (ndays < 3) {
        ndays = 3
    }
    // For each ngram array we have, compile it into the quokka array
    for (var d in ngram_data[ngram_names[0]]) {
        var x = []
        var z = 0;
        for (var ni in ngram_names) {
            var n = ngram_names[ni]
            // Are we doing a rolling average ? let's calc it regardless, because ponies..
            avg[n] = avg[n] ? avg[n] : []
            avg[n].push(ngram_data[n][d][1])
            if (avg[n].length > ndays) {
                avg[n].shift();
            }
            var sum = 0;
            for (var a in avg[n]) {
                sum += avg[n][a]
            }
            sum = sum/avg[n].length;

            // Set the date for the array element
            x[0] = ngram_data[n][d][0];

            // push value (or rolling avg) into the quokka array
            x.push(state.avg ? sum*parseInt(ndays/3) : ngram_data[n][d][1])
        }
        if (!state.avg || d%parseInt(ndays/3) == 0) {
                ngram_arr.push(x)
            }

    }
    // Draw the current timeline
    var names_neat = []
    for (var i in ngram_names) {
        var nn = []
        var name = unescape(ngram_names[i])
        if (name.match(/^q=[a-z_]+=/)) {
            name = name.replace(/^q=/, "")
        }
        while (name.match(/([^=]+)=([^=&]+)&?/)) {
            var m = name.match(/([^=]+)=([^&=]+)&?/)
            name = name.replace(m[0], "")
            nn.push(m[1] + ": " + m[2])
        }
        if (name.match(/&?q=(.[^&=]+)/)) {
            nn.push("query: " + name.match(/&?q=(.[^&=]+)/)[1])
        }
        names_neat.push(nn.join(", "))
    }
    //quokkaLines("ngramCanvas", names_neat, ngram_arr, {stack: state.stack, curve: true, verts: false, title: "n-gram stats for " + state.listname + "@" + state.domain })

    // Fetch next ngram analysis if any are waiting
    if (state.ngrams.length > 0) {
        document.getElementById('trends').innerHTML = state.ngrams.length + " n-grams left to analyze..."
        var nngram = state.ngrams.pop()
        GetAsync('/api/stats.lua?' + (state.topics ? "" : 'quick=true&') + 'list='+state.listname+'&domain='+state.domain+'&d=' + state.dbl + "&" + nngram, { plaw:state.plaw, topics: state.topics, stack: state.stack, ngram: nngram, ngrams: state.ngrams, listname: state.listname, domain: state.domain, dbl: state.dbl, dfrom: state.dfrom, dto: state.dto, tspan: state.tspan, dspan: state.dspan, query: state.query, avg: state.avg }, addNgram)
    } else {
        document.getElementById('trends').innerHTML = "Rendering chart, hold on..!"
        window.setTimeout(function() {
            document.getElementById('trends').innerHTML = "n-gram analysis completed!"
            if (state.broken) {
                document.getElementById('trends').innerHTML += "
Note:Some n-gram objects exceeded the maximum result count (" + json.max + "), so the results may be distorted."
            }
            quokkaLines("ngramCanvas", names_neat, ngram_arr, {broken: state.broken, stack: state.stack, curve: true, verts: false, title: "n-gram stats for " + state.listname + "@" + state.domain }, tsum)
            // power law distribution check
            if (state.plaw) {
                document.getElementById('plawCanvas').style.display = "block"
                tsum.sort(function(b,a) {return a - b})
                var ref = tsum[0]
                var xs = []
                for (var i in tsum) {
                    xs.push([i, tsum[i], ref])
                    ref /= 2
                }
                quokkaLines("plawCanvas", ['Actual distribution', 'PL distribution reference'], xs, {nosum: true, curve: false, verts: false, title: "Power Law distribution check chart"})
            }

        }, 200)
    }

}

// ngram URL generator:
function makeNgramURL() {
    var list = document.getElementById('listname').value
    var timespan = document.getElementById('timespan').getAttribute("data")
    var qs = []
    if (document.getElementById('stack').checked) {
        qs.push("stack")
    }
    if (document.getElementById('topics').checked) {
        qs.push("topics")
    }
    if (document.getElementById('avg').checked) {
        qs.push("avg")
    }
    if (document.getElementById('plaw').checked) {
        qs.push("plaw")
    }
    for (n = 0; n < 20; n++) {
        if (document.getElementById('query' + n) && document.getElementById('query' + n).value.length > 0) {
            qs.push(document.getElementById('query' + n).value)
        }
    }
    var url = "ngrams.html?" + list + ":" + timespan + ":" + qs.join("||")
    location.href = url
}

//function for adding another field to the ngram form
function addNgramBox(hmm) {
    if (hmm > 0) {
        ngramboxes++
        var nobj = document.getElementById('ngram_query')
        var lbox = generateFormDivs('query' + ngramboxes, 'Query #' + ngramboxes + ':', 'text', "")
        lbox.childNodes[1].childNodes[0].setAttribute("onblur", "addNgramBox(this.value.length)")
        nobj.insertBefore(lbox, document.getElementById('ngrambutton'))
    }
}

// onload func that figures out what we want and then asks the API for stats
// invoked by onload in ngrams.html
function loadNgrams() {

    // get list, timespan and query from the html page
    var args = document.location.search.substr(1)
    var a_arr = args.split(/:/, 3)
    var list = a_arr[0]
    var dspan = a_arr[1]
    var query = a_arr[2]
    // Try to detect header searches, if present
    var queries = unescape(query ? query : "").split("||")
    var ngrams = []
    var avg = false
    var topics = false
    var stack = false
    var plaw = false
    for (var n in queries) {
        var nquery = []
        var q = encodeURIComponent(queries[n])
        if (q == 'avg') {
            avg = true
            continue
        } else if (q == 'stack') {
            stack = true
            continue
        } else if (q == 'plaw') {
            plaw = true
            continue
        } else if (q == 'topics') {
            topics = true
            continue
        } else if (q.length == 0) {
            continue
        } else if (q == '*') {
            ngrams.push("q=")
            continue
        }
        else if (q && q.length > 0) {
            var stuff = ['from', 'subject', 'body', 'to']
            for (var k in stuff) {
                // can we find 'header=foo' stuff?
                var r = RegExp(stuff[k] + "=([^&=]+)&?", "mi")
                var m = q.match(r)
                if (m) {
                    q = q.replace(m[0], "")
                    // append to the header_foo query
                    nquery.push("header_" + stuff[k] + "=" + encodeURIComponent(m[1]))
                }
            }
        }
        if (q.length > 0) {
            nquery.push("q=" + q)
        }
        ngrams.push(nquery.join("&"))
    }

    // default to 1 month view if nothing else is supplied
    if (!dspan || dspan.length == 0) {
        dspan = DEFAULT_RETENTION
    }

    // figure out when this is and what the double is (for comparisons)
    var xa = datePickerDouble(dspan)

    // split list name for stats.lua
    var arr = list.split(/@/)
    var listname = arr[0]
    var domain = arr[1]

    // make the ngram generator div
    var nobj = document.getElementById('ngram_query')
    // options for ngram generator

    nobj.appendChild(generateFormDivs('listname', 'List(s):', 'text', list))
    var tspanner = generateFormDivs('timespan', 'Date range:', 'text', datePickerValue(dspan))
    tspanner.childNodes[1].childNodes[0].setAttribute("onmousedown", 'datePicker(this);')
    tspanner.childNodes[1].childNodes[0].setAttribute("data", dspan)
    nobj.appendChild(tspanner)
    nobj.appendChild(generateFormDivs('stack', 'Stack n-grams:', 'checkbox', stack))
    nobj.appendChild(generateFormDivs('avg', 'Use rolling averages:', 'checkbox', avg))
    nobj.appendChild(generateFormDivs('topics', 'Group messages by topics:', 'checkbox', topics))
    nobj.appendChild(generateFormDivs('plaw', 'Check for PL distribution:', 'checkbox', plaw))

    // query fields

    for (var n in queries) {
        var q = unescape(queries[n]);
        if (q != 'stack' && q != 'topics' && q!= 'avg' && q != 'plaw') {
            ngramboxes++;
            nobj.appendChild(generateFormDivs('query' + ngramboxes, 'Query #' + ngramboxes + ':', 'text', q != undefined ? q : ""))
        }

    }

    // submit button
    var btn = document.createElement('input')
    btn.setAttribute("id", "ngrambutton")
    btn.setAttribute("type", "button")
    btn.setAttribute("value", "Generate n-grams")
    btn.setAttribute("onclick", "makeNgramURL()")
    nobj.appendChild(btn)

    // add an empty field
    addNgramBox(2)

    // Get us some data
    if (ngrams.length > 0) {
        var nngram = ngrams.pop()
        GetAsync('/api/stats.lua?' + (topics ? "" : "quick=true&") + 'list='+listname+'&domain='+domain+'&d=' + dspan + "&" + nngram, { plaw: plaw, topics: topics, stack: stack, avg: avg, ngram: nngram, ngrams: ngrams, listname: listname, domain: domain, dbl: dspan, dfrom: xa[1], dto: xa[2], tspan: xa[3], dspan: dspan, query: query }, addNgram)
        document.title = "n-gram stats for " + list + " - Pony Mail!"
    } else {
        document.getElementById('trends').innerHTML = ""
    }

}


text:
#ifndef AST_PASS_STMT_HH
# define AST_PASS_STMT_HH

# include <ast/stmt.hh>
# include <ast/visitor.hh>

namespace ast
{
    class PassStmt : public Stmt
    {
        public:
            PassStmt(const yy::location& location);
            virtual ~PassStmt();

            virtual void accept(Visitor& v);
            virtual void accept(ConstVisitor& v) const;
    };
} // namespace ast

#endif /* !AST_PASS_STMT_HH */


text:
package org.wso2.carbon.apimgt.core.models;

import java.time.Instant;

/**
 * Represents an instance of the average rating of an API.
 * */
public class AvgRating {

    private String apiId;
    private String avgRating;
    private String createdUser;
    private Instant createdTime;
    private String lastUpdatedUser;
    private Instant lastUpdatedTime;

    public String getApiId() {
        return apiId;
    }

    public void setApiId(String apiId) {
        this.apiId = apiId;
    }

    public String getAvgRating() {
        return avgRating;
    }

    public void setAvgRating(String avgRating) {
        this.avgRating = avgRating;
    }

    public String getCreatedUser() {
        return createdUser;
    }

    public void setCreatedUser(String createdUser) {
        this.createdUser = createdUser;
    }

    public Instant getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Instant createdTime) {
        this.createdTime = createdTime;
    }

    public String getLastUpdatedUser() {
        return lastUpdatedUser;
    }

    public void setLastUpdatedUser(String lastUpdatedUser) {
        this.lastUpdatedUser = lastUpdatedUser;
    }

    public Instant getLastUpdatedTime() {
        return lastUpdatedTime;
    }

    public void setLastUpdatedTime(Instant lastUpdatedTime) {
        this.lastUpdatedTime = lastUpdatedTime;
    }
}


text:
#ifndef QDIRMODEL_H
#define QDIRMODEL_H

#include <QtCore/qabstractitemmodel.h>
#include <QtCore/qdir.h>
#include <QtWidgets/qfileiconprovider.h>

QT_BEGIN_NAMESPACE

#ifndef QT_NO_DIRMODEL

class QDirModelPrivate;

class Q_WIDGETS_EXPORT QDirModel : public QAbstractItemModel
{
    Q_OBJECT
    Q_PROPERTY(bool resolveSymlinks READ resolveSymlinks WRITE setResolveSymlinks)
    Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
    Q_PROPERTY(bool lazyChildCount READ lazyChildCount WRITE setLazyChildCount)

public:
    enum Roles {
        FileIconRole = Qt::DecorationRole,
        FilePathRole = Qt::UserRole + 1,
        FileNameRole
    };

    QDirModel(const QStringList &nameFilters, QDir::Filters filters,
              QDir::SortFlags sort, QObject *parent = 0);
    explicit QDirModel(QObject *parent = 0);
    ~QDirModel();

    QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
    QModelIndex parent(const QModelIndex &child) const;

    int rowCount(const QModelIndex &parent = QModelIndex()) const;
    int columnCount(const QModelIndex &parent = QModelIndex()) const;

    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);

    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;

    bool hasChildren(const QModelIndex &index = QModelIndex()) const;
    Qt::ItemFlags flags(const QModelIndex &index) const;

    void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);

    QStringList mimeTypes() const;
    QMimeData *mimeData(const QModelIndexList &indexes) const;
    bool dropMimeData(const QMimeData *data, Qt::DropAction action,
                      int row, int column, const QModelIndex &parent);
    Qt::DropActions supportedDropActions() const;

    // QDirModel specific API

    void setIconProvider(QFileIconProvider *provider);
    QFileIconProvider *iconProvider() const;

    void setNameFilters(const QStringList &filters);
    QStringList nameFilters() const;

    void setFilter(QDir::Filters filters);
    QDir::Filters filter() const;

    void setSorting(QDir::SortFlags sort);
    QDir::SortFlags sorting() const;

    void setResolveSymlinks(bool enable);
    bool resolveSymlinks() const;

    void setReadOnly(bool enable);
    bool isReadOnly() const;

    void setLazyChildCount(bool enable);
    bool lazyChildCount() const;

    QModelIndex index(const QString &path, int column = 0) const;

    bool isDir(const QModelIndex &index) const;
    QModelIndex mkdir(const QModelIndex &parent, const QString &name);
    bool rmdir(const QModelIndex &index);
    bool remove(const QModelIndex &index);

    QString filePath(const QModelIndex &index) const;
    QString fileName(const QModelIndex &index) const;
    QIcon fileIcon(const QModelIndex &index) const;
    QFileInfo fileInfo(const QModelIndex &index) const;

#ifdef Q_NO_USING_KEYWORD
    inline QObject *parent() const { return QObject::parent(); }
#else
    using QObject::parent;
#endif

public Q_SLOTS:
    void refresh(const QModelIndex &parent = QModelIndex());

protected:
    QDirModel(QDirModelPrivate &, QObject *parent = 0);
    friend class QFileDialogPrivate;

private:
    Q_DECLARE_PRIVATE(QDirModel)
    Q_DISABLE_COPY(QDirModel)
    Q_PRIVATE_SLOT(d_func(), void _q_refresh())
};

#endif // QT_NO_DIRMODEL

QT_END_NAMESPACE

#endif // QDIRMODEL_H


text:
#ifndef OSPL_DDS_SUB_DETAIL_ANYDATAREADER_HPP_
#define OSPL_DDS_SUB_DETAIL_ANYDATAREADER_HPP_

#include <dds/sub/detail/TAnyDataReaderImpl.hpp>
#include <org/opensplice/sub/AnyDataReaderDelegate.hpp>

/**
 * @cond
 * Ignore this file in the API
 */

namespace dds { namespace sub { namespace detail {
  typedef dds::sub::TAnyDataReader<org::opensplice::sub::AnyDataReaderDelegate> AnyDataReader;
} } }

/** @endcond */

#endif /* OSPL_DDS_SUB_DETAIL_ANYDATAREADER_HPP_ */


text:
import React from 'react';
import QueueAnim from 'rc-queue-anim';

const Centered = () => (

    <QueueAnim type="bottom" className="ui-animate">

Blank

    </QueueAnim>

);

module.exports = Centered;


text:
.. image:: https://img.shields.io/pypi/v/turnstile-codevalidator.svg
   :target: https://pypi.python.org/pypi/turnstile-codevalidator/
   :alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/l/turnstile-codevalidator.svg
   :target: https://github.com/zalando/turnstile-codevalidator/blob/master/LICENSE
   :alt: License

Turnstile-Codevalidator
=======================

Codevalidator extensions for `turnstile <https://github.com/zalando/turnstile>`_

Check
-----

The `codevalidator` check runs `codevalidator <https://github.com/hjacobs/codevalidator>`_ on added and modified files.

By default this check uses your general codevalidator configuration, but you can also provide a custom codevalidatorc by
adding it as `.codevalidatorc` to your repository root.

Command
-------
To check if staged files follow the codevalidator rules do:

    $ turnstile codevalidator

If you want codevalidator to try to fix the code style do:

    $ turnstile codevalidator --fix

Please note that any change will be left unstaged and need to be added with `git add` and any **unstaged change to
staged files will be overwritten**.

License
-------
Copyright 2015 Zalando SE

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


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

#include <utility>

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

DescribeRefreshSchemasStatusResult::DescribeRefreshSchemasStatusResult()
{
}

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

DescribeRefreshSchemasStatusResult& DescribeRefreshSchemasStatusResult::operator =(const AmazonWebServiceResult<JsonValue>& result)
{
  const JsonValue& jsonValue = result.GetPayload();
  if(jsonValue.ValueExists("RefreshSchemasStatus"))
  {
    m_refreshSchemasStatus = jsonValue.GetObject("RefreshSchemasStatus");

  }

  return *this;
}


text:
drop table login

/

drop table experience

/

drop sequence experience_seq

/

drop table salary

/

drop sequence salary_seq

/

drop table attendance

/

drop sequence attendance_seq

/

drop table loan_tran

/

drop sequence loan_tran_seq

/

drop table loan_master

/

drop sequence loan_master_seq

/

drop table employee_profile

/

drop sequence employee_profile_seq

/

drop table employee

/

drop sequence employee_seq

/

drop table bank_master

/

drop table company_master

/

drop table dept

/

drop sequence dept_seq

/

drop table designation

/

drop sequence designation_seq

/

create table bank_master
(
  bank_code varchar2(5) primary key,
  bank_name varchar2(50) not null,
  bank_address varchar2(200) not null,
  bank_city varchar2(20),
  bank_phone varchar2(20),
  bank_branch varchar2(40)
)

/

create table company_master
(
  cmp_code varchar2(5) primary key,
  cmp_name varchar2(100),
  cmp_address varchar2(200),
  cmp_city varchar2(30),
  cmp_state varchar2(20),
  cmp_pin varchar2(6)
)

/

create table dept
(
   dept_code number(2) primary key,
   dept_name varchar2(30)
)

/

create sequence dept_seq

/

create table designation
(
  dg_code number(2) primary key,
  dg_name varchar2(30)
)

/

create sequence designation_seq

/

create table employee
(
   emp_code number(5) primary key,
   cmp_code varchar2(5) references company_master(cmp_code),
   first_name varchar2(20),
   middle_name varchar2(20),
   last_name varchar2(20),
   address varchar2(200),
   city varchar2(30),
   state varchar2(20),
   pin varchar2(6),
   phone varchar2(20),
   dg_code number(2) references designation(dg_code),
   dept_code number(2) references dept(dept_code),
   join_date date,
   birth_date date,
   bank_code varchar2(5) references bank_master(bank_code),
   bank_account varchar2(15),
   pf_no varchar2(10),
   email varchar2(50)
)

/

create sequence employee_seq

/

create table employee_profile
(
   profile_code  number(7) primary key,
   emp_code number(5) references employee(emp_code),
   dg_code number(2) references designation(dg_code),
   dept_code number(2) references dept(dept_code),
   start_date date,
   end_date date,
   basic_salary number(15,2)
)

/

create sequence employee_profile_seq

/

create table loan_master
(
   loan_code number(7) primary key,
   profile_code number(7) references employee_profile(profile_code),
   loan_date date,
   loan_amount number(15,2),
   inst_amount number(15,2)
)

/

create sequence loan_master_seq

/

create table loan_tran
(
   loan_tran_code number(10) primary key,
   loan_code number(7) references loan_master(loan_code),
   tran_date date,
   tran_amount number(15,2),
   narration varchar2(50)
)

/

create sequence loan_tran_seq

/

create table attendance
(
  att_code number(10) primary key,
  profile_code number(7) references employee_profile(profile_code),
  att_date date,
  overtime_hours number(3),
  present number(2),
  absent number(2),
  weekoff number(2),
  leave number(2),
  holiday number(2),
  halfday number(2)
)

/

create sequence attendance_seq

/

create table salary
(
  salaryid number(10) primary key,
  salarydate date,
  profile_code number(7) references employee_profile(profile_code),
  da number(15),
  hra number(15),
  ma number(15),
  ptax number(15),
  leave_dedu number(15),
  overtime number(15),
  pf_amount number(15),
  other_allow number(15),
  other_dedu number(15)
)

/

create sequence salary_seq

/

create table experience
(
  exp_id number(5) primary key,
  emp_code number(5) references employee(emp_code),
  cmp_name varchar2(50),
  from_date date,
  to_date date,
  desig varchar2(15)
)

/

create sequence experience_seq

/

create table login
(
   username varchar2(15) primary key,
   password varchar2(40),
   question varchar2(50),
   answer varchar2(50)
)

/

insert into login values ('admin','admin',
'What is your cell number','90909090')

/


text:
source ../testsupport.sh

. cleanup.sh

run test.txt

grep -q "Stage folder" test.out || err "Failed to find expected stage hello"
grep -q "Stage after" test.out || err "Failed to find expected stage world"

[ `grep -c "execute" test.out` == 2 ]  || err "Skipped steps incorrectly on first run"

[ ! -f thefolder/output.csv ] && err "Failed to find expected output test.txt"
[ ! -f output.after.xml ] && err "Failed to find expected output test.world.txt"

bpipe query > test.out

grep -q "test.txt =>" test.out || err "Failed to find input test.txt in dependency graph"
grep -q "output.csv =>" test.out || err "Failed to find output.csv in dependency graph"
grep -q "output.after.xml" test.out || err "Failed to find output.after.xml in dependency graph"

run test.txt

grep -q "execute1" test.out && err "Failed to skip folder creation step on second run"
grep -q "execute2" test.out && err "Failed to skip stage after folder stage on second run"

true


text:
---
title: Documentation
---
Documentation
=============

Jison takes a context-free grammar as input and outputs a JavaScript file capable of parsing the language described by that grammar. You can then use the generated script to parse inputs and accept, reject, or perform actions based on the input. If you're familiar with Bison or Yacc, or other clones, you're almost ready to roll.

* [Installation](#installation)
* [Usage from the command line](#usage-from-the-command-line)
* [Usage from a CommonJS Module](#usage-from-a-commonjs-module)
* [Using the Generated Parser](#using-the-generated-parser)
* [Using the Parser from the Web](#using-the-parser-from-the-web)
* [The Concepts of Jison](#the-concepts-of-jison)
* [Specifying a Language](#specifying-a-language)
* [Lexical Analysis](#lexical-analysis)
* [Tracking Locations](#tracking-locations)
* [Custom Scanners](#custom-scanners)
* [Sharing Scope](#sharing-scope)
* [Parsing algorithms](#parsing-algorithms)
* [Projects using Jison](#projects-using-jison)
* [Contributors](#contributors)
* [License](#license)

Installation
------------

Jison can be installed for [Node](http://nodejs.org) using [`npm`](http://github.com/isaacs/npm/)

Using npm:

    npm install jison -g

Usage from the command line
-----------------------

Clone the github repository for examples:

    git clone git://github.com/zaach/jison.git
    cd jison/examples

Now you're ready to generate some parsers:

    jison calculator.jison

This will generate `calculator.js` in your current working directory. This script can be used to parse an input file, like so:

    echo "2^32 / 1024" > testcalc
    node calculator.js testcalc

This will print out `4194304`.

Usage from a CommonJS Module
--------------------------

You can generate parsers programmatically from JavaScript as well. Assuming Jison is in your CommonJS environment's load path:

    // mygenerator.js
    var Parser = require("jison").Parser;

    var grammar = {
        "lex": {
            "rules": [
               ["\\s+", "/* skip whitespace */"],
               ["[a-f0-9]+", "return 'HEX';"]
            ]
        },

        "bnf": {
            "hex_strings" :[ "hex_strings HEX",
                             "HEX" ]
        }
    };

    var parser = new Parser(grammar);

    // generate source, ready to be written to disk
    var parserSource = parser.generate();

    // you can also use the parser directly from memory

    parser.parse("adfe34bc e82a");
    // returns true

    parser.parse("adfe34bc zxg");
    // throws lexical error

Alternatively, if you want to use the Jison file format but not generate a static JavaScript file for it, you could use a snippet like this:

    // myparser.js
    var fs = require("fs");
    var jison = require("jison");

    var bnf = fs.readFileSync("grammar.jison", "utf8");
    var parser = new jison.Parser(bnf);

    module.exports = parser;

Using the Generated Parser
--------------------------

Once you have generated the parser and saved it, you no longer need Jison or any other dependencies.

As demonstrated before, the parser can be used from the command line:

    node calculator.js testcalc

Though, more ideally, the parser will be a dependency of another module. You can require it from another module like so:

    // mymodule.js
    var parser = require("./calculator").parser;

    function exec (input) {
        return parser.parse(input);
    }

    var twenty = exec("4 * 5");

Or more succinctly:

    // mymodule.js
    function exec (input) {
        return require("./calculator").parse(input);
    }

    var twenty = exec("4 * 5");

Using the Parser from the Web
----------------------------

The generated parser script may be included in a web page without any need for a CommonJS loading environment. It's as simple as pointing to it via a script tag:

    <script src="calculator.js"></script>

When you generate the parser, you can specify the variable name it will be declared as:

    // mygenerator.js
    var parserSource = generator.generate({moduleName: "calc"});
    // then write parserSource to a file called, say, calc.js

Whatever `moduleName` you specified will be the the variable you can access the parser from in your web page:

    <script src="calc.js"></script>
    <script>
      calc.parse("42 / 0");
    </script>

The moduleName you specify can also include a namespace, e.g:

    // mygenerator.js
    var parserSource = parser.generate({moduleName: "myCalculator.parser"});

And could be used like so:

    <script>
      var myCalculator = {};
    </script>

    <script src="calc.js"></script>

    <script>
      myCalculator.parser.parse("42 / 0");
    </script>

Or something like that -- you get the picture.

A demo of the calculator script used in a web page is [here](/jison/demos/calc/).

The Concepts of Jison
---------------------

Until the [Bison guide](http://dinosaur.compilertools.net/bison/bison_4.html#SEC7) is properly ported for Jison, you can refer to it for the major concepts, which are equivalent (except for the bits about static typing of semantic values, and other obvious C artifacts.)

Other helpful sections:

* [Bison Grammar Files](http://dinosaur.compilertools.net/bison/bison_6.html#SEC34)
* [The Bison Parser Algorithm](http://dinosaur.compilertools.net/bison/bison_8.html#SEC68)
* [Error Recovery](http://dinosaur.compilertools.net/bison/bison_9.html#SEC81) (alpha support, at this point)

Specifying a Language
---------------------

The process of parsing a language involves two phases: **lexical analysis** (tokenizing) and **parsing**, which the Lex/Yacc and Flex/Bison combinations are famous for. Jison lets you specify a parser much like you would using Bison/Flex, with separate files for tokenization rules and for the language grammar, or with the tokenization rules embedded in the main grammar.

For example, here is the grammar for the calculator parser:

    /* description: Parses end executes mathematical expressions. */

    /* lexical grammar */
    %lex

    %%
    \s+                   /* skip whitespace */
    [0-9]+("."[0-9]+)?\b  return 'NUMBER';
    "*"                   return '*';
    "/"                   return '/';
    "-"                   return '-';
    "+"                   return '+';
    "^"                   return '^';
    "("                   return '(';
    ")"                   return ')';
    "PI"                  return 'PI';
    "E"                   return 'E';
    <<EOF>>               return 'EOF';

    /lex

    /* operator associations and precedence */

    %left '+' '-'
    %left '*' '/'
    %left '^'
    %left UMINUS

    %start expressions

    %% /* language grammar */

    expressions
        : e EOF
            {print($1); return $1;}
        ;

    e
        : e '+' e
            {$$ = $1+$3;}
        | e '-' e
            {$$ = $1-$3;}
        | e '*' e
            {$$ = $1*$3;}
        | e '/' e
            {$$ = $1/$3;}
        | e '^' e
            {$$ = Math.pow($1, $3);}
        | '-' e %prec UMINUS
            {$$ = -$2;}
        | '(' e ')'
            {$$ = $2;}
        | NUMBER
            {$$ = Number(yytext);}
        | E
            {$$ = Math.E;}
        | PI
            {$$ = Math.PI;}
        ;

which compiles down to this JSON representation used directly by Jison:

    {
        "lex": {
            "rules": [
               ["\\s+",                    "/* skip whitespace */"],
               ["[0-9]+(?:\\.[0-9]+)?\\b", "return 'NUMBER';"],
               ["\\*",                     "return '*';"],
               ["\\/",                     "return '/';"],
               ["-",                       "return '-';"],
               ["\\+",                     "return '+';"],
               ["\\^",                     "return '^';"],
               ["\\(",                     "return '(';"],
               ["\\)",                     "return ')';"],
               ["PI\\b",                   "return 'PI';"],
               ["E\\b",                    "return 'E';"],
               ["$",                       "return 'EOF';"]
            ]
        },

        "operators": [
            ["left", "+", "-"],
            ["left", "*", "/"],
            ["left", "^"],
            ["left", "UMINUS"]
        ],

        "bnf": {
            "expressions" :[[ "e EOF",   "print($1); return $1;"  ]],

            "e" :[[ "e + e",   "$$ = $1 + $3;" ],
                  [ "e - e",   "$$ = $1 - $3;" ],
                  [ "e * e",   "$$ = $1 * $3;" ],
                  [ "e / e",   "$$ = $1 / $3;" ],
                  [ "e ^ e",   "$$ = Math.pow($1, $3);" ],
                  [ "- e",     "$$ = -$2;", {"prec": "UMINUS"} ],
                  [ "( e )",   "$$ = $2;" ],
                  [ "NUMBER",  "$$ = Number(yytext);" ],
                  [ "E",       "$$ = Math.E;" ],
                  [ "PI",      "$$ = Math.PI;" ]]
        }
    }

Jison accepts both the Bison/Flex style format, or the raw JSON format, e.g:

    node bin/jison examples/calculator.jison

or

    node bin/jison examples/calculator.json

When the lexical grammar resides in its own (.jisonlex) file, use that as the second argument to Jison, e.g.:

    node bin/jison examples/classy.jison examples/classy.jisonlex

More examples can be found in the [`examples/`](http://github.com/zaach/jison/tree/master/examples/) and [`tests/parser/`](http://github.com/zaach/jison/tree/master/tests/parser/) directories.

Lexical Analysis
----------------

Jison includes a rather rudimentary scanner generator, though **any module that supports the basic scanner API could be used** in its place.

The format of the [input file](http://dinosaur.compilertools.net/flex/flex_6.html#SEC6) (including macro support) and the style of the [pattern matchers](http://dinosaur.compilertools.net/flex/flex_7.html#SEC7) are modeled after Flex. Several [metacharacters have been added](https://github.com/zaach/jison/wiki/Deviations-From-Flex-Bison), but there is also one minor inconvenience compared to Flex patterns, namely exact string patterns must be placed in quotes e.g.:

Bad:

    [0-9]+zomg    print(yytext)

Good:

    [0-9]+"zomg"    print(yytext);

Actions that span multiple lines should be surrounded by braces:

    [0-9]+"zomg"    %{ print(yytext);
                       return 'ZOMG'; %}

A recently added feature are **[start conditions](http://dinosaur.compilertools.net/flex/flex_11.html)**, which allow certain rules to only match in certain states. If the lexer is not in that state, then the rule is ignored. The lexer starts in the `INITIAL` state, but can move to new states specified by you. Read that link for the run-down. An example below shows where Jison differs, namely `this.begin('state')` instead of `BEGIN(STATE)` for changing states within an action:

    %s expect

    %%
    expect-floats        this.begin('expect');

    <expect>[0-9]+"."[0-9]+      {
                console.log( "found a float, = " + yytext );
                }
    <expect>\n           %{
                /* that's the end of the line, so
                 * we need another "expect-number"
                 * before we'll recognize any more
                 * numbers
                 */
                this.begin('INITIAL');
                %}

    [0-9]+      console.log( "found an integer, = " + yytext );

    "."         console.log( "found a dot" );

>
> ### Note: `begin()` API is old; use `pushState()` API instead.
>
> As Jison maintains a **start condition _stack_** it is advised to use
> the more recent lexer API methods `pushState('state')` and `popState()` rather than
> the older `this.begin('state')` described just above as these `pushState()` and
> `popState()` better describe of what the lexer does and what you can expect.
>
> The old `this.begin('state')` lexer API call is identical to calling the new `this.pushState('state')` API.
>

If you use `%x` instead of `%s` to declare your start condition then _only_ rules that match the current start condition will be considered.

Consider the following example of a scanner that simply scans all double-quote delimited strings in a text file but disallows newlines inside quotations:

    %x string

    %%
    ["]               this.begin("string");
    <string>[^"\n]*   return "STRING";
    <string>[\n]      return "NEWLINE_IN_STRING";
    <string><<EOF>>   return "EOF_IN_STRING";
    <string>["]       this.popState();

    [.\n]+            /* skip over text not in quotes */
    <<EOF>>           return "EOF";

Additionally, use `this.popState()` within an action to revert to the previous state.

Using the JSON format, start conditions are defined with an array before the rule's matcher:

    {
      rules: [
        [['expect'], '[0-9]+"."[0-9]+', 'console.log( "found a float, = " + yytext );']
      ]
    }

The array contains the list of start conditions for the rule.

Tracking Locations
------------------

Jison's lexical analyzer will track line number and column number information for each token and make them available within parser actions.
The API is identical to [Bison's](http://www.gnu.org/software/bison/manual/html_node/Actions-and-Locations.html#Actions-and-Locations).

Custom Scanners
---------------

You don't have to use the builtin Jison lexical scanner. An object with a `lex` and a `setInput` function would suffice, e.g.:

    parser.lexer = {
		lex: function () {
			return 'NIL';
		},
		setInput: function (str) {}
	};

This lexer would simply return `NIL` tokens *ad infinitum*.

The following example demonstrates a scanner that looks for upper and lower case letters, ignoring all whitespace:

    // myscanner.js
    function AlphabetScanner() {
        var text = "";
        this.yytext = "";
        this.yyloc = {
            first_column: 0,
            first_line: 1,
            last_line: 1,
            last_column: 0
        };
        this.yylloc = this.yyloc;
        this.setInput = function(text_) {
            text = text_;
        };
        this.lex = function() {
            // Return the EOF token when we run out of text.
            if (text === "") {
                return "EOF";
            }

            // Consume a single character and increment our column numbers.
            var c = text.charAt(0);
            text = text.substring(1);
            this.yytext = c;
            this.yyloc.first_column++;
            this.yyloc.last_column++;

            if (c === "\n") {
                // Increment our line number when we hit newlines.
                this.yyloc.first_line++;
                this.yyloc.last_line++;
                // Try to keep lexing because we aren't interested
                // in newlines.
                return this.lex();
            } else if (/[a-z]/.test(c)) {
                return "LOWER_CASE";
            } else if (/[A-Z]/.test(c)) {
                return "UPPER_CASE";
            } else if (/\s/.test(c)) {
                // Try to keep lexing because we aren't interested
                // in whitespace.
                return this.lex();
            } else {
                return "INVALID";
            }
        };
    }
    parser.lexer = new AlphabetScanner();

Sharing Scope
------------

In Bison, code is expected to be lexically defined within the scope of the semantic actions. E.g., chunks of code may be included in the generated parser source, which are available from semantic actions.

Jison supports inline code blocks like Bison, but also exposes state that can be accessed from other modules. Instead of pulling code into the generated module, the generated module can be required and used by other modules. The parser has a `yy` property which is exposed to actions as the `yy` free variable. Any functionality attached to this property is available in both lexical and semantic actions through the `yy` free variable.

An example from orderly.js:

    var parser = require("./orderly/parse").parser;

    // set parser's shared scope
    parser.yy = require("./orderly/scope");

    // returns the JSON object
    var parse = exports.parse = function (input) {
        return parser.parse(input);
    };
    ...

The `scope` module contains logic for building data structures, which is used within the semantic actions.

Parsing algorithms
------------------

Like Bison, Jison can recognize languages described by LALR(1) grammars, though it also has modes for LR(0), SLR(1), and LR(1). It also has a special mode for generating LL(1) parse tables (requested by my professor,) and could be extended to generate a recursive descent parser for LL(k) languages in the future. But, for now, Jison is geared toward bottom-up parsing.

**LR(1) mode is currently not practical for use with anything other than toy grammars, but that is entirely a consequence of the algorithm used, and may change in the future.**

Deviations from Flex / Bison
----------------------------

<!-- #################################################### -->
<!-- this bit is also available in the wiki at:  -->
<!-- #################################################### -->

## Lex Patterns

### Literal tokens

>
> #### WARNING: vanilla zaach/jison has 'easy keyword' support turned *on* all the time
>
> The section currently describes the GerHobbelt fork which has the
>
> ```
> %options easy_keyword_rules
> ```
>
> feature while vanilla jison has not (at least not a pullreq for this is posted by me (@GerHobbelt) and accepted.
>
> Hence vanilla jison will work as if you *implicitly* specified `%options easy_keyword_rules` in every lexer of yours.
>

When the lexer 'easy keyword' option has been turned on in your lexer file / section using

```
%options easy_keyword_rules
```

you will notice that token `"foo"` will match whole word only, while `("foo")` will match `foo` anywhere unless.

See [issue #63](https://github.com/zaach/jison/issues/63) and [GHO commit 64759c43](https://github.com/GerHobbelt/jison/commit/64759c4362af04f63e980764e322ddca279737a5).

>
> #### Under The Hood
>
> Technically what happens is that `%options easy_keyword_rules` turns on lexer rule inspection and where it recognizes that
> a rule *ends* with a literal character, then the regex *word edge* `\\b` check is appended to the lexer regex for the given rule.
>

### Longest rule matching

The lexer will use the first rule that matches the input string unless you use `%options flex`, in which case it will use the rule with the longest match.

### Additions

Because Jison uses JavaScript's regular expression engine, it is possible to use some metacharacters that are not present in Flex patterns.

See for a full list of available regex metacharacters the MDN documentation: [Using Special Characters](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions#Using_special_characters)

#### Negative Lookahead

Flex patterns support lookahead using `/`, Jison adds negative lookahead using `/!`.

>
> ##### Under The Hood
>
> Technically what happens is that `/\<atom>` and `/!\<atom>` are 1:1 replaced by the regex expressions `(?=\<atom>)` and `(?!\<atom>)` respectively.
>

#### Advanced Grouping Options

Jison supports as advanced grouping options

  * non-grouping brackets `(?:PATTERN)`,
  * positive lookahead `(?=PATTERN)` and
  * negative lookahead `(?!PATTERN)`.

#### yymore, yyless, etc...

The flex macros `yymore()` and `yyless` must be rewritten to use the Jison lexer's JavaScript API calls:

  * `yymore()` -> `this.more()`
    (See: [flex manual](http://flex.sourceforge.net/manual/Actions.html#index-g_t_007c_002c-use-of-114)
    and the Jison [example as "test more()"](https://github.com/zaach/jison-lex/blob/master/tests/regexplexer.js#L288))
  * `yyless()` -> `this.less()`
    (See [flex manual](http://flex.sourceforge.net/manual/Actions.html#index-yyless_0028_0029-119)
    and the Jison [example as "test less()"](https://github.com/zaach/jison-lex/blob/master/tests/regexplexer.js#L790))

#### Braces in actions

Within **lexer** actions use `%{ ... %}` delimiters if you want to use block-style statements, e.g.:

``` plain
.*  %{
  if (true) {
    console.log('test');
  }
  // ...
%}
```

Within **parser** actions you may alternatively use `{{ .. }}` delimiters for the same purpose:

``` plain
test
  : STRING EOF  {{
    if (true) {
      console.log('test');
    }
    // ...
    return $1;
  }}
  ;
```

though Jison also supports `%{ ... %}` multi-line action blocks in the *grammar* rules:

``` plain
test
  : STRING EOF  %{
    if (true) {
      console.log('test');
    }
    // ...
    return $1;
  }%
  ;
```

See [issue #85](https://github.com/zaach/jison/issues/85)

## Semantic Actions

Actions should contain JavaScript instead of C, naturally.

### Braces

As of Jison v0.2.8, you no longer need to use double braces `{{...}}` around grammar rule
action code blocks.

From now on, single braces `{...}` suffice.

### Short-hand syntax

There is a short-hand arrow syntax:
```
 exp:    ...
         | '(' exp ')' -> $2
         | exp '+' exp -> $1 + $3
```

### Accessing values and location information

Normally, you'ld have to use the position of the corresponding nonterminal or terminal in the production, prefixed by a dollar sign $, e.g.:

```
 exp:    ...
         | '(' exp ')'
             { $$ = $2; }
```

Now, you can also access the value by using the name of the nonterminal instead of its position, e.g.:

```
 exp:    ...
         | '(' exp ')'
             { $$ = $exp; }
```

If the rule is ambiguous (the nonterminal appears more than once,) append a number to the end of the nonterminal name to disambiguate the desired value:

```
 exp:    ...
         | exp '+' exp
             { $$ = $exp1 + $exp2; }
```

Association by name leads to a looser coupling (and is easier to grok.)

This also works for accessing location information (compare with the [Bison manual on Named references](http://www.gnu.org/software/bison/manual/html_node/Named-References.html#Named-References) and their [Actions and Locations](http://www.gnu.org/software/bison/manual/html_node/Actions-and-Locations.html#Actions-and-Locations) section):

```
 exp:    ...
         | '(' exp ')'
             { @$ = @exp; /* instead of @$ = $2 */ }
```

Another way to resolve ambiguity would be to use *aliases* in square brackets, for example:

```
 exp:    ...
         | exp\[left] '+' exp\[right]
             { $$ = $left + $right; }
```

#### Auto-numbered named accessors

'Auto-numbering' means that the first occurrence of label (token name or alias) `nnn` will also be available as `nnn*1*`, and so on.

In the section above you may have seen one example where the nonterminal *names* have been auto-numbered to provide unambiguous access to each:

```
 exp:    ...
         | exp '+' exp
             { $$ = $exp1 + $exp2; }
```

Note that in every Jison rule production, all the nonterminal names *and* all the *aliases* are always also available in 'auto-numbered' form,
that is: when the same nonterminal name or alias occurs multiple times in the same rule, the action block can uniquely address a particular
nonterminal or alias by using the auto-numbered form.

An example:

``` plain
test
: subrule\[alt] subrule\[wicked_middle] subrule\[alt] '?'\[alt]
%{
    // These are all unambiguous and legal to address $1, $2, $3 and $4:
    //
    // $1 === $subrule1 === $alt1
    // $1 === $alt  <-- first occurrence also registers the name itself!
    // $2 === $subrule2 === $wicked_middle
    // $3 === $subrule3 === $alt2
    // $4 === $alt3
    //
    // @1 === @subrule1 === @alt1
    // @1 === @alt  <-- first occurrence also registers the name itself!
    // @2 === @subrule2 === @wicked_middle
    // @3 === @subrule3 === @alt2
    // @4 === @alt3
%}
```

>
> ##### Caveat Emptor
>
> It doesn't say what'll happen if you go and game the system by using aliases with the same name as the nonterminals, e.g.
>
> ```
> exp:    ...
>          | exp\[exp] '+' exp\[exp]
>              { $$ = $exp1 + $exp3 /* 3? Are we sure about this? */; }
> ```
>
> If you wonder, [RTFC: vanilla](https://github.com/zaach/jison/blob/master/lib/jison.js#L279) vs. [RTFC: GerHobbelt](https://github.com/GerHobbelt/jison/blob/master/lib/jison.js#L385)
>
>
> ---
>
>
> #### WARNING: vanilla zaach/jison doesn't behave the same when it comes to mixing aliases and nonterminal names.
>
> The section currently describes the GerHobbelt fork. With vanilla zaach/jison the safe rule of thumb here is that when you specify an *alias* for a nonterminal, then you SHOULD NOT USE the nonterminal name itself any more in your action code.
>
> RTFC to compare and check each's behaviour here: [vanilla](https://github.com/zaach/jison/blob/master/lib/jison.js#L279) vs. [GerHobbelt](https://github.com/GerHobbelt/jison/blob/master/lib/jison.js#L385)
>

## Extended BNF

Jison now supports EBNF syntax, showcased [here](https://gist.github.com/1659274).

## Extended BNF: how it works and what to keep in mind when using this

EBNF is accepted by the jison grammar engine and transposed to a *BNF* grammar using equivalence transforms for each of the EBNF `*`, `+`, `?` and `(...)` operators.

For these EBNF wildcards & groups the following treatment must be kept in mind:

- Only the outermost wild-carded group's label or index is addressable in your action. That group
  is translated to a single nonterminal, e.g.

  ```
  rule: A (B C D E)?
  ```

  becomes

  ```
  rule: A subrule_option0

  subrule_option0: /* nil */ | B C D E;
  ```

  hence your action block for rule `rule` will only have `$1` and `$2` (the `subrule_option0` nonterminal) to play with.

  As jison allows labeling the wildcarded group, such an alias might keep things more readable:

  ```
  rule: A (B C D E)?\[choice]
  ```

  becomes

  ```
  rule: A subrule_option0\[choice]

  subrule_option0: /* nil */ | B C D E;
  ```

  **WARNING**: it's illegal to attempt to access `$B`, `$C` et al from your `rule`'s action code block and very bad things will happen you.

  + vanilla zaach/jison will not translate those references and your code will be *TOAST*.

  + GerHobbelt/jison analyzes your action code chunk and attempts to locate all your `$whatever` and `@whatever` references in there and barfs a hairball (i.e. fails at jison compile time) with a big fat error message if you do.

    >
    > Do note that we are a little dumb scanner, so we *will* recognize those references even when they sit in a nice cozy **comment** in there!
    >

- `(...)*`, `(...)+` and `(...)?` are the wildcarded ones and will be rewritten to equivalent BNF rules.

  You MAY nest these constructs.

- The `(...)` group is also recognized (no wildcard operator there): it will be unrolled. Unless there's a label attacked to it. In that case it's rewritten.

  Hence

  ```
  rule: A (B C D E)
  ```

  becomes

  ```
  rule: A B C D E;
  ```

  while

  ```
  rule: A (B C D E)\[groupies]
  ```

  becomes

  ```
  rule: A subrule\[groupies]

  subrule: B C D E;
  ```

  so be aware that a little change like that can play havoc on your (*action*) code: the former, unrolled, grouping gives you
  access to all it terms (nonterminals and terminals alike), while the labeled a.k.a. aliased version *hides* those inner terms from you.

- In order to have something decent to work with in your action code, every *wildcard* or non-wilcarded group
  which is not unrolled will collect all its terms' values (`yytext`) as
  produced by the lexer and store it in an array, thus constructing a *Poor Man's AST*:

  ```
  rule: A (B C+ (D E)\[hoobahop])?\[choice]
  ```

  becomes

  ```
  rule: A subrule_option0\[choice]

  subrule_option0: /* nil */ | subrule_option1;

  subrule_option1: B C+ (D E)\[hoobahop];
  ```

  which becomes

  ```
  rule: A subrule_option0\[choice]

  subrule_option0: /* nil */ | subrule_option0;

  subrule_option1: B subrule_series1 hoobahop_group0;

  subrule_series1: subrule_series1 C | C;

  hoobahop_group0: D E;
  ```

  which will deliver in your `$choice` reference an array shaped like this
  (comments show the origin of each bit):

  ```
  // subrule_option0
  \[
    // **Note**:
    // as this is choice, you get only the value
    //
    //     undefined
    //
    // when you've hit the **nil** epsilon choice instead!

    // subrule_option1:
    \[
      B,
      // subrule_series1
      \[
        // the EBNF rewriter is smart enough to see that there's
        // only 1(one) term in this one: `C` so no extra arrays-in-array
        // for you here:
        C,
        C,
        ...
      ],
      // hoobahop_group0
      \[
        D,
        E
      ]
    ]
  ]
  ```

### BIG FAT WARNING:

The above is written for the GerHobbelt fork as currently EBNF support in vanilla zaach/jison is ever so slightly b0rked.

But that's not what this warning is about!

As I (Gerhobbelt) write this, I wonder if this **really** **really** is the truth. It *may* be that the current bleeding edge
(master branch) still has a few, ahh..., sub-optimalities in reality compared to the above.

**To Be Checked**

---

Some improvements have been made for parser and lexer grammars in Jison 0.3 (demonstrated in the FlooP/BlooP example below.)

For lexers:

* Patterns may use unquoted characters instead of strings
* Two new options, `%options flex case-insensitive`
 * `flex`: the rule with the longest match is used, and no word boundary patterns are added
 * `case-insensitive`: all patterns are case insensitive
* User code section is included in the generated module

For parsers:

* Arrow syntax for semantic actions
* EBNF syntax (enabled using the `%ebnf` declaration)
 * Operators include repetition (`*`), non-empty repetition (`+`), grouping (`()`), alternation within groups (`|`), and option (`?`)
* User code section and code blocks are included in the generated module

Also, Robert Plummer has created a [PHP port](https://github.com/zaach/jison/tree/master/ports/php) of Jison's parser.

See the grammar below for more examples.

---

<!-- #################################################### -->
<!-- end of the 'wiki::Deviations from Felx / Bison' part -->
<!-- #################################################### -->

Projects using Jison
--------------------

View them on the [wiki](https://github.com/zaach/jison/wiki/ProjectsUsingJison), or add your own.

Contributors
------------

via [github](http://github.com/zaach/jison/contributors)

License
-------

> Copyright (c) 2009-2013 Zachary Carter
>
>  Permission is hereby granted, free of
> charge, to any person  obtaining a
> copy of this software and associated
> documentation  files (the "Software"),
> to deal in the Software without
> restriction, including without
> limitation the rights to use,  copy,
> modify, merge, publish, distribute,
> sublicense, and/or sell  copies of the
> Software, and to permit persons to
> whom the  Software is furnished to do
> so, subject to the following
> conditions:
>
>  The above copyright notice and this
> permission notice shall be  included
> in all copies or substantial portions
> of the Software.
>
>  THE SOFTWARE IS PROVIDED "AS IS",
> WITHOUT WARRANTY OF ANY KIND,  EXPRESS
> OR IMPLIED, INCLUDING BUT NOT LIMITED
> TO THE WARRANTIES  OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT  HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY,  WHETHER IN AN ACTION OF
> CONTRACT, TORT OR OTHERWISE, ARISING
> FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR  OTHER DEALINGS
> IN THE SOFTWARE.

  [1]: http://dinosaur.compilertools.net/bison/bison_4.html


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Patterns.Singleton
{
    /// <summary>
    /// Allows you to calculate health risks
    /// </summary>
    class RiskCalculator
    {
        /// <summary>
        /// Hiding constructor to avoid direct class instance creation
        /// </summary>
        private RiskCalculator(){}

        /// <summary>
        /// Lazy initializer of singleton object
        /// </summary>
        static Lazy<RiskCalculator> _lazyInstance = new Lazy<RiskCalculator>(() => new RiskCalculator());

        /// <summary>
        /// Get RiskCalculator object instance
        /// </summary>
        public static RiskCalculator Instance
        {
            get
            {
                return _lazyInstance.Value;
            }
        }

        /// <summary>
        /// Calculates stroke risk based on your blood pressure
        /// </summary>
        /// <param name="systolicBp"></param>
        /// <param name="diastolicBp"></param>
        /// <returns></returns>
        public double GetStrokeRiskValue(double systolicBp, double diastolicBp)
        {
            //Fake risk, of course :)
            return systolicBp + diastolicBp;
        }
    }
}


text:
from msrest.serialization import Model

class OperationResponse(Model):
    """this is the management partner operations response.

    :param name: this is the operation response name
    :type name: str
    :param display: this is the operation display
    :type display: ~azure.mgmt.managementpartner.models.OperationDisplay
    :param origin: the is operation response origin information
    :type origin: str
    """

    _attribute_map = {
        'name': {'key': 'name', 'type': 'str'},
        'display': {'key': 'display', 'type': 'OperationDisplay'},
        'origin': {'key': 'origin', 'type': 'str'},
    }

    def __init__(self, name=None, display=None, origin=None):
        super(OperationResponse, self).__init__()
        self.name = name
        self.display = display
        self.origin = origin


text:
package cmd

import (
	"github.com/spf13/cobra"
)

// endpointCmd represents the endpoint command
var endpointCmd = &cobra.Command{
	Use:   "endpoint",
	Short: "Manage endpoints",
}

func init() {
	rootCmd.AddCommand(endpointCmd)
}


text:
<!DOCTYPE html>

  <title>iron-icons demo</title>

  <link rel="import" href="../../paper-styles/demo-pages.html">
  <link rel="import" href="../../paper-styles/color.html">
  <link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">

  <link rel="import" href="../iron-icons.html">

  <link rel="import" href="../av-icons.html">
  <link rel="import" href="../communication-icons.html">
  <link rel="import" href="../device-icons.html">
  <link rel="import" href="../editor-icons.html">
  <link rel="import" href="../hardware-icons.html">
  <link rel="import" href="../image-icons.html">
  <link rel="import" href="../maps-icons.html">
  <link rel="import" href="../notification-icons.html">
  <link rel="import" href="../social-icons.html">
  <link rel="import" href="../places-icons.html">

  <template is="dom-bind">

   <iron-meta type="iconset" list="{{iconsets}}"></iron-meta>

    <template is="dom-repeat" items="{{iconsets}}">

{{item.name}}

        <template is="dom-repeat" items="{{getIconNames(item)}}">

            <iron-icon icon="{{item}}"></iron-icon>

{{item}}

        </template>

    </template>

  </template>


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Site.Areas.HelpDesk.Controls {

    public partial class WebFormSupportRequestSelectOrder {

        /// <summary>
        /// PlanPackageList control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.RadioButtonList PlanPackageList;

        /// <summary>
        /// PlanPackageListRequiredFieldValidator control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.RequiredFieldValidator PlanPackageListRequiredFieldValidator;
    }
}


text:
class Ode < Formula
  desc "Simulating articulated rigid body dynamics"
  homepage "https://www.ode.org/"
  url "https://bitbucket.org/odedevs/ode/downloads/ode-0.15.2.tar.gz"
  sha256 "2eaebb9f8b7642815e46227956ca223806f666acd11e31708bd030028cf72bac"
  revision 1
  head "https://bitbucket.org/odedevs/ode/", :using => :hg

  bottle do
    cellar :any_skip_relocation
    sha256 "d392aba8c14119ee6072c2677835e928d9a9cca95d4b3c0ef0b82aedf1bc0147" => :high_sierra
    sha256 "34670979e3b841475cbbef0038203bae036baa753a6c03af179a0aff7b27d168" => :sierra
    sha256 "4f2986f5867bd16da6836dc9a580f1ca2a01f4d7177fd3308b4fcea41443ac7e" => :el_capitan
  end

  option "with-double-precision", "Compile ODE with double precision"
  option "with-shared", "Compile ODE with shared library support"
  option "with-x11", "Build the drawstuff library and demos"

  deprecated_option "enable-double-precision" => "with-double-precision"
  deprecated_option "enable-shared" => "with-shared"

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "libtool" => :build
  depends_on "pkg-config" => :build
  depends_on "libccd"
  depends_on :x11 => :optional

  def install
    args = ["--prefix=#{prefix}", "--enable-libccd"]
    args << "--enable-double-precision" if build.with? "double-precision"
    args << "--enable-shared" if build.with? "shared"
    args << "--with-demos" if build.with? "x11"

    inreplace "bootstrap", "libtoolize", "glibtoolize"
    system "./bootstrap"

    system "./configure", *args
    system "make"
    system "make", "install"
  end

  test do
    (testpath/"test.cpp").write <<~EOS
      #include <ode/ode.h>
      int main() {
        dInitODE();
        dCloseODE();
        return 0;
      }
    EOS
    system ENV.cc, "test.cpp", "-I#{include}/ode", "-L#{lib}", "-lode", "-lccd",
                   "-lc++", "-o", "test"
    system "./test"
  end
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Package dillon.gameAPI.entity</title>
<meta name="date" content="2017-08-08">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
dillon.gameAPI.entity

Packages that use dillon.gameAPI.entity

Package
Description

dillon.gameAPI.entity

dillon.gameAPI.mapping

dillon.gameAPI.scripting.bridges

Classes in dillon.gameAPI.entity used by dillon.gameAPI.entity

Class and Description

Entity

This class stores the position, direction and sprite of an entity.

Classes in dillon.gameAPI.entity used by dillon.gameAPI.mapping

Class and Description

Entity

This class stores the position, direction and sprite of an entity.

Classes in dillon.gameAPI.entity used by dillon.gameAPI.scripting.bridges

Class and Description

Entity

This class stores the position, direction and sprite of an entity.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
<?php
namespace PureMachine\Bundle\SDKBundle\Store\WebService;

use Symfony\Component\Validator\Constraints as Assert;
use PureMachine\Bundle\SDKBundle\Store\Annotation as Store;

class ArrayResponse extends Response
{
    /**
     * @Store\Property(description="webService answer")
     * @Store\StoreClass("PureMachine\Bundle\SDKBundle\Store\Base\BaseStore")
     * @Assert\Type("array")
     * @Assert\NotBlank
     */
    protected $answer;

}


text:
from __future__ import unicode_literals

from ...tokens import Doc
from ..util import get_doc, apply_transition_sequence

import pytest

@pytest.mark.parametrize('text', ["A test sentence"])
@pytest.mark.parametrize('punct', ['.', '!', '?', ''])
def test_parser_sbd_single_punct(en_tokenizer, text, punct):
    heads = [2, 1, 0, -1] if punct else [2, 1, 0]
    tokens = en_tokenizer(text + punct)
    doc = get_doc(tokens.vocab, [t.text for t in tokens], heads=heads)
    assert len(doc) == 4 if punct else 3
    assert len(list(doc.sents)) == 1
    assert sum(len(sent) for sent in doc.sents) == len(doc)

def test_parser_sentence_breaks(en_tokenizer, en_parser):
    text = "This is a sentence . This is another one ."
    heads = [1, 0, 1, -2, -3, 1, 0, 1, -2, -3]
    deps = ['nsubj', 'ROOT', 'det', 'attr', 'punct', 'nsubj', 'ROOT', 'det',
            'attr', 'punct']
    transition = ['L-nsubj', 'S', 'L-det', 'R-attr', 'D', 'R-punct', 'B-ROOT',
                  'L-nsubj', 'S', 'L-attr', 'R-attr', 'D', 'R-punct']

    tokens = en_tokenizer(text)
    doc = get_doc(tokens.vocab, [t.text for t in tokens], heads=heads, deps=deps)
    apply_transition_sequence(en_parser, doc, transition)

    assert len(list(doc.sents)) == 2
    for token in doc:
        assert token.dep != 0 or token.is_space
    assert [token.head.i for token in doc ] == [1, 1, 3, 1, 1, 6, 6, 8, 6, 6]

# Currently, there's no way of setting the serializer data for the parser
# without loading the models, so we can't remove the model dependency here yet.

@pytest.mark.models
def test_parser_sbd_serialization_projective(EN):
    """Test that before and after serialization, the sentence boundaries are
    the same."""

    text = "I bought a couch from IKEA It wasn't very comfortable."
    transition = ['L-nsubj', 'S', 'L-det', 'R-dobj', 'D', 'R-prep', 'R-pobj',
                  'B-ROOT', 'L-nsubj', 'R-neg', 'D', 'S', 'L-advmod',
                  'R-acomp', 'D', 'R-punct']

    doc = EN.tokenizer(text)
    apply_transition_sequence(EN.parser, doc, transition)
    doc_serialized = Doc(EN.vocab).from_bytes(doc.to_bytes())
    assert doc.is_parsed == True
    assert doc_serialized.is_parsed == True
    assert doc.to_bytes() == doc_serialized.to_bytes()
    assert [s.text for s in doc.sents] == [s.text for s in doc_serialized.sents]


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Stropharia drymonia Morgan

### Remarks
null


text:
package pl.newicom.dddd.messaging.event

import pl.newicom.dddd.aggregate.EntityId

case class AggregateSnapshotId(aggregateId: EntityId, sequenceNr: Long = 0)


text:
import core = require('eight/core');

var webGLRenderer = function(parameters?) {
    console.log('davinci-eight', core.VERSION);

    parameters = parameters || {};

    var canvas: HTMLCanvasElement = parameters.canvas !== undefined ? parameters.canvas : document.createElement('canvas');
    var alpha: boolean = parameters.alpha !== undefined ? parameters.alpha : false;
    var depth: boolean = parameters.depth !== undefined ? parameters.depth : true;
    var stencil: boolean = parameters.stencil !== undefined ? parameters.stencil : true;
    var antialias: boolean = parameters.antialias !== undefined ? parameters.antialias : false;
    var premultipliedAlpha: boolean = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true;
    var preserveDrawingBuffer: boolean = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false;

    var gl: WebGLRenderingContext;

    var setViewport = function(x: number, y: number, width: number, height: number) {
        if (gl) {
            gl.viewport(x, y, width, height);
        }
    };

    function initGL() {
        try {
            var attributes =
                {
                    'alpha': alpha,
                    'depth': depth,
                    'stencil': stencil,
                    'antialias': antialias,
                    'premultipliedAlpha': premultipliedAlpha,
                    'preserveDrawingBuffer': preserveDrawingBuffer
                };

            gl = canvas.getContext('webgl', attributes) || canvas.getContext('experimental-webgl', attributes);

            if (gl === null) {
                throw 'Error creating WebGL context.';
            }
        }
        catch (e) {
            console.error(e);
        }
    }

    var that = {
        get canvas() { return canvas; },
        get context(): WebGLRenderingContext {return gl },
        onContextGain: function(context: WebGLRenderingContext) {
            gl = context;
            gl.clearColor(32 / 256, 32 / 256, 32 / 256, 1.0);
            gl.enable(gl.DEPTH_TEST);
        },
        onContextLoss: function() {
        },
        clearColor: function(r: number, g: number, b: number, a: number) {
            if (gl) {
                gl.clearColor(r, g, b, a);
            }
        },
        render: function(scene, camera: { projectionMatrix: any }) {
            if (gl) {
                gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);

                var children = scene.children;
                for (var i = 0, length = children.length; i < length; i++) {
                    children[i].draw(camera.projectionMatrix);
                }
            }
        },
        viewport: function(x, y, width, height) {
            if (gl) {
                gl.viewport(x, y, width, height);
            }
        },
        setSize: function(width, height, updateStyle) {
            canvas.width = width;// * devicePixelRatio;
            canvas.height = height;// * devicePixelRatio;

            if (updateStyle !== false) {
                canvas.style.width = width + 'px';
                canvas.style.height = height + 'px';
            }

            setViewport(0, 0, width, height);
        }
    };

    initGL();

    return that;
};

export = webGLRenderer;


text:
================================================================================
WinNetBIOSConfigInfo
================================================================================

.. describe:: Since

    vSphere API 4.1

.. describe:: Extends

    :py:class:`~pyvisdk.mo.net_bios_config_info.NetBIOSConfigInfo`

.. class:: pyvisdk.do.win_net_bios_config_info.WinNetBIOSConfigInfo

    .. py:attribute:: primaryWINS

        The IP address of the primary WINS server.

    .. py:attribute:: secondaryWINS

        The IP address of the secondary WINS server.


text:
import Vue from 'vue';
import Vuex from 'vuex';

import * as actions from './actions';
import * as getters from './getters';
import listModule from './mutations';

import createLogger from 'vuex/dist/logger';

Vue.use(Vuex);

const debug = process.env.NODE_ENV !== 'production';

export default new Vuex.Store({
  actions,
  getters,
  ...listModule,
  strict: debug,
  plugins: debug ? [createLogger()] : []
});