text:
package gov.nasa.worldwind.terrain;

import gov.nasa.worldwind.geom.*;
import gov.nasa.worldwind.globes.ElevationModel;

import java.util.List;

/**
 * An elevation model to map another elevation model's depths to a constant value, usually 0. It's typically used to
 * produce flat oceans when using an elevation model containing bathymetry. This elevation model filters elevations
 * returned from the source elevation model and sets all elevations less than a specified threshold (0 by default) to
 * that threshold. All elevations returned by the source elevation model are filtered, including the source model's
 * extreme elevations.
 *
 * @author tag
 * @version $Id: BathymetryFilterElevationModel.java 1171 2013-02-11 21:45:02Z dcollins $
 */
public class BathymetryFilterElevationModel extends AbstractElevationModel
{
    protected ElevationModel sourceModel;
    protected double threshold = 0d;

    /**
     * Constructs an elevation model that filters the elevations from a specified elevation model.
     *
     * @param source the elevation model to filter.
     */
    public BathymetryFilterElevationModel(ElevationModel source)
    {
        this.sourceModel = source;
    }

    public void dispose()
    {
        if (this.sourceModel != null)
            this.sourceModel.dispose();
    }

    /**
     * Returns the source elevation model.
     *
     * @return the source elevation model.
     */
    public ElevationModel getSourceModel()
    {
        return this.sourceModel;
    }

    /**
     * Returns the threshold value.
     *
     * @return the threshold.
     */
    public double getThreshold()
    {
        return this.threshold;
    }

    /**
     * Sets the value of the threshold. The default threshold is 0.
     *
     * @param threshold the desired threshold. Elevations less than this value are set to this value prior to being
     *                  return by any method returning one or more elevations.
     */
    public void setThreshold(double threshold)
    {
        this.threshold = threshold;
    }

    public double getMaxElevation()
    {
        return this.clampElevation(this.sourceModel.getMaxElevation());
    }

    public double getMinElevation()
    {
        return this.clampElevation(this.sourceModel.getMinElevation());
    }

    public double[] getExtremeElevations(Angle latitude, Angle longitude)
    {
        double[] elevs = this.sourceModel.getExtremeElevations(latitude, longitude);
        if (elevs == null)
            return elevs;

        return new double[] {this.clampElevation(elevs[0]), this.clampElevation(elevs[1])};
    }

    public double[] getExtremeElevations(Sector sector)
    {
        double[] elevs = this.sourceModel.getExtremeElevations(sector);
        if (elevs == null)
            return elevs;

        return new double[] {this.clampElevation(elevs[0]), this.clampElevation(elevs[1])};
    }

    public double getElevations(Sector sector, List<? extends LatLon> latlons, double targetResolution, double[] buffer)
    {
        double resolution = this.sourceModel.getElevations(sector, latlons, targetResolution, buffer);

        for (int i = 0; i < latlons.size(); i++)
        {
            LatLon ll = latlons.get(i);
            if (this.sourceModel.contains(ll.getLatitude(), ll.getLongitude()) && buffer[i] < this.threshold)
                buffer[i] = this.threshold;
        }

        return resolution;
    }

    public double getUnmappedElevations(Sector sector, List<? extends LatLon> latlons, double targetResolution,
        double[] buffer)
    {
        double resolution = this.sourceModel.getElevations(sector, latlons, targetResolution, buffer);

        for (int i = 0; i < latlons.size(); i++)
        {
            LatLon ll = latlons.get(i);
            if (this.sourceModel.contains(ll.getLatitude(), ll.getLongitude())
                && buffer[i] != this.sourceModel.getMissingDataSignal() && buffer[i] < this.threshold)
                buffer[i] = this.threshold;
        }

        return resolution;
    }

    public int intersects(Sector sector)
    {
        return this.sourceModel.intersects(sector);
    }

    public boolean contains(Angle latitude, Angle longitude)
    {
        return this.sourceModel.contains(latitude, longitude);
    }

    public double getBestResolution(Sector sector)
    {
        return this.sourceModel.getBestResolution(sector);
    }

    public double getUnmappedElevation(Angle latitude, Angle longitude)
    {
        double elev = this.sourceModel.getUnmappedElevation(latitude, longitude);

        return elev != this.sourceModel.getMissingDataSignal() && elev < this.threshold ? this.threshold : elev;
    }

    /**
     * Called to clamp a source elevation to this elevation model's threshold.
     *
     * @param elevation the elevation to check and map.
     *
     * @return the input elevation if it is greater than or equal to the threshold elevation, otherwise the threshold
     *         elevation.
     */
    protected double clampElevation(double elevation)
    {
        return elevation < this.threshold ? this.threshold : elevation;
    }

    @Override
    public double getLocalDataAvailability(Sector sector, Double targetResolution)
    {
        return this.sourceModel.getLocalDataAvailability(sector, targetResolution);
    }

    @Override
    public Object getValue(String key)
    {
        Object o = super.getValue(key);

        return o != null ? o : this.sourceModel != null ? this.sourceModel.getValue(key) : null;
    }
}


text:
package com.rbmhtechnology.apidocserver.security;

import java.util.Objects;
import org.mitre.openid.connect.config.ServerConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Profile;

@Profile("openid")
@ConfigurationProperties(prefix = "idp")
public class OpenIdConnectServer {

  private String url;
  private String issuer;
  private String authorizationEndpointUri;
  private String tokenEndpointUri;
  private String userInfoUri;
  private String jwksUri;

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public String getIssuer() {
    return issuer;
  }

  public void setIssuer(String issuer) {
    this.issuer = issuer;
  }

  public String getAuthorizationEndpointUri() {
    return authorizationEndpointUri;
  }

  public void setAuthorizationEndpointUri(String authorizationEndpointUri) {
    this.authorizationEndpointUri = authorizationEndpointUri;
  }

  public String getTokenEndpointUri() {
    return tokenEndpointUri;
  }

  public void setTokenEndpointUri(String tokenEndpointUri) {
    this.tokenEndpointUri = tokenEndpointUri;
  }

  public String getUserInfoUri() {
    return userInfoUri;
  }

  public void setUserInfoUri(String userInfoUri) {
    this.userInfoUri = userInfoUri;
  }

  public String getJwksUri() {
    return jwksUri;
  }

  public void setJwksUri(String jwksUri) {
    this.jwksUri = jwksUri;
  }

  public ServerConfiguration serverConfiguration() {
    final ServerConfiguration serverConfig = new ServerConfiguration();
    serverConfig.setIssuer(this.getIssuer());
    serverConfig.setAuthorizationEndpointUri(this.getAuthorizationEndpointUri());
    serverConfig.setTokenEndpointUri(this.getTokenEndpointUri());
    serverConfig.setUserInfoUri(this.getUserInfoUri());
    serverConfig.setJwksUri(this.getJwksUri());
    return serverConfig;
  }

  @Override
  public String toString() {
    return "Idp{" +
        "url='" + url + '\'' +
        ", issuer='" + issuer + '\'' +
        ", authorizationEndpointUri='" + authorizationEndpointUri + '\'' +
        ", tokenEndpointUri='" + tokenEndpointUri + '\'' +
        ", userInfoUri='" + userInfoUri + '\'' +
        ", jwksUri='" + jwksUri + '\'' +
        '}';
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OpenIdConnectServer openIdConnectServer = (OpenIdConnectServer) o;
    return Objects.equals(url, openIdConnectServer.url) &&
        Objects.equals(issuer, openIdConnectServer.issuer) &&
        Objects.equals(authorizationEndpointUri, openIdConnectServer.authorizationEndpointUri) &&
        Objects.equals(tokenEndpointUri, openIdConnectServer.tokenEndpointUri) &&
        Objects.equals(userInfoUri, openIdConnectServer.userInfoUri) &&
        Objects.equals(jwksUri, openIdConnectServer.jwksUri);
  }

  @Override
  public int hashCode() {
    return Objects
        .hash(url, issuer, authorizationEndpointUri, tokenEndpointUri, userInfoUri, jwksUri);
  }
}

redpajama_set_name: RedPajamaGithub


text:
package org.qi4j.library.rest.admin;

import org.qi4j.api.injection.scope.Structure;
import org.qi4j.api.injection.scope.Uses;
import org.qi4j.api.structure.Module;
import org.qi4j.api.unitofwork.*;
import org.restlet.*;
import org.restlet.data.MediaType;
import org.restlet.data.Status;
import org.restlet.resource.Finder;
import org.restlet.resource.ServerResource;
import org.restlet.routing.Router;

public class RestApplication
    extends Application
{
    public static final MediaType APPLICATION_SPARQL_JSON = new MediaType( "application/sparql-results+json", "SPARQL JSON" );

    @Structure
    private Module module;

    public RestApplication( @Uses Context parentContext )
    {
        super( parentContext );

        getMetadataService().addExtension( "srj", APPLICATION_SPARQL_JSON );

        getTunnelService().setExtensionsTunnel( true );
    }

    @Override
    public void handle( Request request, Response response )
    {
        UnitOfWork uow = module.newUnitOfWork();
        try
        {
            super.handle( request, response );
            uow.complete();
        }
        catch( UnitOfWorkException e )
        {
            uow.discard();
            response.setStatus( Status.CLIENT_ERROR_NOT_ACCEPTABLE );
            response.setEntity( new ExceptionRepresentation( e ) );
            // More info to send...
        }
        catch( ConcurrentEntityModificationException e )
        {
            uow.discard();
            response.setStatus( Status.CLIENT_ERROR_LOCKED );
            response.setEntity( new ExceptionRepresentation( e ) );
            // Info to try again...
        }
        catch( UnitOfWorkCompletionException e )
        {
            uow.discard();
            response.setStatus( Status.CLIENT_ERROR_NOT_ACCEPTABLE );
            response.setEntity( new ExceptionRepresentation( e ) );
        }
    }

    /**
     * Creates a root Restlet that will receive all incoming calls.
     */
    @Override
    public synchronized Restlet createInboundRoot()
    {
        Router router = new Router( getContext() );

        router.attach( "/entity", createFinder( EntitiesResource.class ) );
        router.attach( "/entity/{identity}", createFinder( EntityResource.class ) );

        router.attach( "/query", createFinder( SPARQLResource.class ) );
        router.attach( "/query/sparqlhtml", createFinder( SPARQLResource.class ) );
        router.attach( "/query/index", createFinder( IndexResource.class ) );

        return router;
    }

    private Finder createFinder( Class<? extends ServerResource> resource )
    {
        Finder finder = module.newObject( Finder.class );
        finder.setTargetClass( resource );
        return finder;
    }
}


text:
<?php

namespace Tests\Magium\Magento2\Navigation;

use Magium\Magento\AbstractMagentoTestCase;
use Magium\Magento\Actions\Customer\NavigateAndLogin;
use Magium\Magento\Navigators\Customer\Account;
use Magium\Magento2\ConfigurationSwitcher;
use Magium\WebDriver\WebDriver;

class CustomerNavigationTest extends \Tests\Magium\Magento\Navigation\CustomerNavigationTest
{

    protected function setUp()
    {
        parent::setUp();
        (new ConfigurationSwitcher($this))->configure();
    }

}


text:
using System;
using MonoTouch.Dialog;
using KS_PSPDFKitBindings;
using System.Threading.Tasks;
using MonoTouch.UIKit;
using System.Collections.Generic;
using System.Threading;
using System.Linq;
using System.Drawing;
using MonoTouch.Foundation;

namespace PSPDFKitDemoXamarin.iOS
{
	/// <summary>
	/// Displays a list of annotations.
	/// </summary>
	public class KSAnnotationsListController: DialogViewController
	{
		PSPDFDocument document;
		PSPDFViewController controller;

		//Seperate Task to get the annotations
		Task taskGetAnnotations;

		ActivityElement activeElem;
		Section sectionActive;

		public KSAnnotationsListController (PSPDFDocument document, PSPDFViewController controller) :base (UITableViewStyle.Plain, null)
		{
			this.Title = "Annotations";
			this.document = document;
			this.controller = controller;
			this.Root = new RootElement (string.Empty);

			//First cell is "loading..." cell and then it is larger cells
			this.Root.UnevenRows = true;

		}

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
		}

		public override void ViewDidAppear (bool animated)
		{
			base.ViewDidAppear (animated);

			sectionActive = new Section ();
			activeElem = new ActivityElement ()
			{
				Animating = true
			};

			activeElem.Caption = "Loading...";
			activeElem.Animating = true;
			sectionActive.Add (activeElem);

			this.Root.Clear ();
			this.Root.Add (sectionActive);

			this.RefreshSource();
		}

		private void RefreshSource()
		{
			if (this.taskGetAnnotations != null && taskGetAnnotations.Status == TaskStatus.Running)
			{
				return;
			}

			//Threaded as could take a while if a big document or lots of annotations
			this.taskGetAnnotations = Task.Factory.StartNew( () => this.PopulateAnnotationSource());

		}

		private void PopulateAnnotationSource()
		{
			List<Section> sections = new List<Section> ();

			//Thread.Sleep (6000);
			//For every page get custom annotations and add to source
			for (uint page =0; page < this.document.PageCount; page++)
			{

				List<PSPDFAnnotation> annots = new List<PSPDFAnnotation> ();

				var annotsForPage = this.document.AnnotationParser.FileAnnotationProvider.AnnotationsForPage(page);

				if(annotsForPage.Length < 1)
				{
					continue;
				}

				//loop and add only custom
				foreach (var annot in annotsForPage)
				{

					if( !(annot is IKSAnnotation) )
					{
						//Only want annotations we made ..
						continue;
					}

					annots.Add(annot);

				}

				if(annots.Count < 1)
				{
					//no point continuing
					continue;
				}

				//Sort by Type
				annots.Sort ( (x, y) =>
			    {
					//Sort by Page and then Type
					return  String.Compare( x.TypeString , y.TypeString );

				});

				//Create Sections
				Section section = new Section("Page " + (page + 1).ToString() );
				sections.Add(section);
				foreach(var annot in annots)
				{
					PSPDFAnnotation annotCapture = annot;
					var tabElem = new KSAnnotationElement ( annot );
					tabElem.Tapped += () =>
					{
						this.controller.SetPageAnimated(annotCapture.Page,true);

						//Close Modal
						this.controller.PopoverController.Dismiss(true);
						this.controller.PopoverController = null;
					};

					section.Add(tabElem);
				}

			}

			//Now Completed , Now Remove the Activity Indicator and load the sections
			InvokeOnMainThread (() =>
			{
				//Remove Activity Indicator
				this.Root.Remove(this.Root.ElementAt(0), UITableViewRowAnimation.Automatic);

				//Insert Sections (Pages number with Annotations)
				this.Root.Insert(0, UITableViewRowAnimation.Bottom, sections.ToArray());

			});

		}
	}
}


text:
You can edit and add new users on the admin panel at `/admin/auth/user/`. You
will need to give new users permissions based on the access you wish them to
have. If you wish someone be able to see all clients and projects to be able to
add them to an entry, but not edit or delete them, you need to give them view
permissions under User permissions. These would be
`core | project | Can view project` and `core | client | Can view client`.


text:
<?php

class TemplateEngine
{
	/**
	 * @var array of the object of type Template
	 */
	public $templates;
	/**
	 * @var string path of templates
	 */
	private $tplpath;

	/**
	 * @param string $plugin
	 */
	private $plugin;

	public function __construct($path='') {
		$this->tplpath = !empty($path) ? $path : IM_TEMPLATE_DIR;
		$this->plugin = 'imanager';
	}

	/**
	 * Initializes all the templates and made them available in ImTplEngine::$templates
	 */
	public function init($path='', $plugin = '')
	{
		$this->tplpath = !empty($path) ? $path : $this->tplpath;
		$this->plugin = !empty($plugin) ? $plugin : 'imanager';
		$templates = array();
		foreach (glob($this->tplpath . '*' . IM_TEMPLATE_FILE_SUFFIX) as $file)
		{
			$tpl = new Template();

			$base = basename($file, '.im.tpl');
			$strp = strpos($base, '.');
			$name = substr($base, 0, $strp);
			$member = substr($base, $strp+1);
			$tpl->set('name', $name.'.'.$member);
			$tpl->content = file_get_contents($file);
			$this->templates[] = $tpl;
		}
	}

	/**
	 * Returns the number of templates
	 *
	 * @param array $templates
	 * @return int
	 */
	public function countTemplates(array $templates=array())
	{return count(!empty($templates) ? $templates : $this->templates);}

	/**
	 * Returns an object of type Template
	 * NOTE: However if no $templates argument is passed to the function, the templates
	 * must already be in the buffer: ImTplEngine::$templates. Call the ImTplEngine::init()
	 * method before to assign the templates to the buffer.
	 *
	 * You can search for template by "name": ImTplEngine::getTemplate('template_name')
	 * or similar to ImTplEngine::getTemplate('name=template_name')
	 * NOTE: Its not possible to search for memebership and specific terms
	 *
	 * @param string $stat
	 * @param array $templates
	 * @return boolean|object of the type Template
	 */
	public function getTemplate($stat, array $templates=array())
	{
		$loctpl = !empty($templates) ? $templates : $this->templates;
		// nothing to select
		if(empty($templates))
		{
			if(!$this->countTemplates() || $this->countTemplates() <= 0)
				return false;
		}

		if(false !== strpos($stat, '='))
		{
			$data = explode('=', $stat, 2);
			$key = strtolower(trim($data[0]));
			$val = trim($data[1]);

			if(false !== strpos($key, ' '))
				return false;

			foreach($loctpl as $tpl_id => $t)
			{
				if(!isset($t->$key) || $t->$key != $val)
					continue;

				return $loctpl[$tpl_id];;
			}
		} else
		{
			foreach($loctpl as $tpl_id => $t)
			{
				if(!isset($t->name) || $t->name != $stat)
					continue;

				return $loctpl[$tpl_id];
			}
		}
		return false;
	}

	/**
	 * Returns an array of object of type Template
	 * NOTE: However if no $templates argument is passed to the function, the templates
	 * must already be in the buffer: ImTplEngine::$templates. Call the ImTplEngine::init()
	 * method before to assign the templates to the buffer.
	 *
	 * You can get all templates by a membership
	 * Example, to get all templates with "general" membership, you can do the following:
	 * ImTplEngine::getTemplates('general', $your_template_array)
	 *
	 * @param string $stat
	 * @param array $templates An array of Template objects
	 * @return boolean|array
	 */
	public function getTemplates($stat, array $templates=array())
	{

		$loctpl = !empty($templates) ? $templates : $this->templates;
		// nothing to select
		if(empty($templates))
		{
			if(!$this->countTemplates() || $this->countTemplates() <= 0)
				return false;
		}

		$tplcontainer = array();

		if(false !== strpos($stat, '='))
		{
			$data = explode('=', $stat, 2);
			$key = strtolower(trim($data[0]));
			$val = trim($data[1]);

			if(false !== strpos($key, ' '))
				return false;

			foreach($loctpl as $tpl_id => $t)
			{
				$member = $t->get($key);

				if(!isset($member) || $member != $val)
					continue;

				$tplcontainer[$tpl_id] = $loctpl[$tpl_id];
			}
		} else
		{
			foreach($loctpl as $tpl_id => $t)
			{
				$member = $t->get('member');
				if(!isset($member) || $member != $stat)
					continue;
				$tplcontainer[$tpl_id] = $loctpl[$tpl_id];
			}
		}

		if(!empty($tplcontainer))
			return $tplcontainer;

		return false;
	}

	/**
	 * Unset a given array of Template objects
	 * @param array $templates
	 */
	public function destroyTemplates(array $templates=array())
	{$tpls=!empty($templates) ? $templates : $this->templates;unset($tpls);}

	/**
	 * Renders template by replacing $tvs and optionally language $lvs by setting the $lflag to true.
	 * You can use $clean flag to delete the tvs left in template
	 *
	 * @param $template (object | string)
	 * @param array $tvs
	 * @param bool $lflag
	 * @param array $lvs
	 * @param bool $clean
	 * @return Template object
	 */
	public function render($template, array $tvs=array(),
						   $lflag=false, array $lvs=array(), $clean=false
	){

		if($template instanceof Template)
		{
			$tpl = clone $template;
		} else {
			$customTemptate = new Template('custom');
			$customTemptate->content = $template;
			$tpl = clone $customTemptate;
		}

		if($lflag) $tpl->content = $this->renderLvs($tpl->content, $lvs);

		if(!empty($tvs))
			foreach($tvs as $key => $val)
				$tpl->content = preg_replace('%\[\[( *)'.$key.'( *)\]\]%', $val, $tpl->content);

		if($clean) return preg_replace('%\[\[(.*)\]\]%', '', $tpl->content);

		return $tpl->content;
	}

	/**
	 * Replaces language placeholders (lvs)
	 *
	 * @param string $ipl
	 * @return string
	 */
	private function renderLvs($tpl, array $lvs=array())
	{

		if(empty($lvs))
		{
			$lvs = $this->imI18n($this->plugin);
			if(!$lvs) $lvs = $this->imI18n($this->plugin,'en_US');
		}
		if(empty($lvs)) return false;

		foreach($lvs as $key => $val)
		{
			if(strpos($key, $tpl) !== true)
				$tpl = preg_replace('%\[\[( *)'.$key.'( *)\]\]%', $val, $tpl);
		}
		return $tpl;
	}

	/**
	 * Returns language array by plugin name and curent system language
	 *
	 * @param $plugin
	 * @param null $language
	 * @return array|bool
	 */
	private function imI18n($plugin, $language=null)
	{
		$l = array();
		if($this->imPrepI18n($plugin, $language ? $language : IM_LANGUAGE, $l))
			return $l;
		return false;
	}

	/**
	 * @param $plugin
	 * @param $lang
	 * @param $lp
	 * @return bool
	 */
	private function imPrepI18n($plugin, $lang, &$lvs)
	{
		$i18n = array();
		if(!file_exists(GSPLUGINPATH.$plugin.'/lang/'.$lang.'.php')) return false;

		// bug in PHP functionality's been missing since at least 2006
		@include(GSPLUGINPATH.$plugin.'/lang/'.$lang.'.php');
		if(count($i18n) <= 0)
			return false;

		foreach($i18n as $code => $text)
		{
			if(!array_key_exists($plugin.'/'.$code, $lvs))
				$lvs['lang/'.$code] = $text;
		}
		return true;
	}
}

/**
 * Class Template
 *
 * Anatomie of template file name:
 * name.membership.im.tpl
 *
 */
class Template
{
	public $name;
	protected $file;
	protected $filename;
	protected $member;
	public $content;

	public function __construct($name='')
	{
		$this->name = $name;
		$this->file = '';
		$this->filename = '';
		$this->content = '';
	}

	public function get($name){return $this->$name;}

	public function set($key, $val)
	{
		$key = strtolower($key);
		if($key == 'name')
		{
			$base = basename($val, '.im.tpl');
			$strp = strpos($base, '.');
			$name = substr($base, 0, $strp);
			$member = substr($base, $strp+1);
			$this->name = $name;
			$this->member = $member;
			if(file_exists(IM_TEMPLATE_DIR.$name.'.'.$member.IM_TEMPLATE_FILE_SUFFIX))
			{
				$this->file = IM_TEMPLATE_DIR.$name.'.'.$member.IM_TEMPLATE_FILE_SUFFIX;
				$this->filename = $name.'.'.$member.IM_TEMPLATE_FILE_SUFFIX;
			}
		} else
			$this->$key = $val;
	}

	//public function push(Template $val){ $this->content = $val->content;}
	//public function push($val){ $this->content .= $val;}
}


text:
layout: screenshot
title: RiftBoard
screenshotCount: 3
---


text:
var fs = require('fs');
var through = require('through');
var browserify = require('browserify');
var exorcist = require('exorcist');

function fixGherkinLexers(file) {
  var data = '';

  function write (buf) { data += buf; }

  function end () {
    var path = __dirname + '/node_modules/gherkin/lib';
    var lexersPath = path + '/gherkin/lexer';
    if (file === path + '/gherkin.js') {
      // Patch gherkin so that all lexers are available statically:
      var bufferPrefix = '';
      var dirFiles = fs.readdirSync(lexersPath);
      dirFiles.forEach(function (dirFile) {
        var matches = dirFile.match(/^(.*)\.js$/);
        if (matches && !dirFile.match(/\.min\.js$/)) {
          bufferPrefix += 'require("./gherkin/lexer/' + matches[1] + '");\n';
        }
      });
      data = bufferPrefix + data;
    }
    var ignoredFiles = [
      __dirname + '/lib/cucumber/cli.js'
    ];
    if (ignoredFiles.indexOf(file) > -1) {
      data = '';
    }
    this.queue(data);
    this.queue(null);
  }

  return through(write, end);
}

function Bundler(bundlePath) {
  var mapPath = bundlePath + '.map';

  var self = {
    bundle: function (callback) {
      var _callback = callback;
      callback = function (err) {
        if (_callback) _callback(err);
        _callback = null;
      };

      var operation = browserify({debug: true, standalone: 'Cucumber'})
          .transform({global: true}, fixGherkinLexers)
          .transform({global:true}, 'uglifyify')
          .exclude('./lib/cucumber/cli') // TODO: doesn't work, fix this
          .require('./bundle-main', { expose: 'cucumber' })
          .bundle()
          .pipe(exorcist(mapPath))
          .pipe(fs.createWriteStream(bundlePath, 'utf8'));

      operation.on('error', function (err) {
        callback(err);
      });

      operation.on('finish', function () {
        callback();
      });
    }
  };

  return self;
}

module.exports = Bundler;


text:
module LastFM
  class Auth < APIClass
    unrestricted_methods :get_token
    restricted_methods   :get_mobile_session, :get_session
  end
end


text:
package buckets_test

import (
	"os"
	"testing"

	"github.com/joyrexus/buckets"
)

// Ensure we can open/close a buckets db.
func TestOpen(t *testing.T) {
	bx, err := buckets.Open(tempfile())
	if err != nil {
		t.Error(err.Error())
	}
	defer os.Remove(bx.Path())
	defer bx.Close()
}


text:
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.api.ads.adwords.jaxws.v201809.cm;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
 *             Operation used to create or mutate a Feed.
 *
 *
 *
Java class for FeedOperation complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="FeedOperation">
 *   <complexContent>
 *     <extension base="{https://adwords.google.com/api/adwords/cm/v201809}Operation">
 *       <sequence>
 *         <element name="operand" type="{https://adwords.google.com/api/adwords/cm/v201809}Feed" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FeedOperation", propOrder = {
    "operand"
})
public class FeedOperation
    extends Operation
{

    protected Feed operand;

    /**
     * Gets the value of the operand property.
     *
     * @return
     *     possible object is
     *     {@link Feed }
     *
     */
    public Feed getOperand() {
        return operand;
    }

    /**
     * Sets the value of the operand property.
     *
     * @param value
     *     allowed object is
     *     {@link Feed }
     *
     */
    public void setOperand(Feed value) {
        this.operand = value;
    }

}


text:
cask "nault" do
  version "1.12.0"
  sha256 "61afdb81afb0c83a06c4debcaad8389c15a9e60842a683fb21bb1dddb7717de1"

  url "https://github.com/Nault/Nault/releases/download/v#{version}/Nault-#{version}-Mac.dmg"
  name "Nault"
  desc "Wallet for the Nano cryptocurrency with support for hardware wallets"
  homepage "https://github.com/Nault/Nault"

  auto_updates true

  app "Nault.app"

  zap trash: [
    "~/Library/Application Support/nault",
    "~/Library/Logs/Nault",
    "~/Library/Preferences/cc.nault.plist",
    "~/Library/Saved Application State/cc.nault.savedState",
  ]
end


text:
from .mutation import Mutation

class StringMutation(Mutation):
    def __init__(self, probability, random, alphabet):
        super().__init__()
        self.alphabet = alphabet
        self.probability = probability
        self.random = random

    def mutate(self, string):
        mutated = list(string)
        for i in range(len(mutated)):
            if self.probability.get_boolean():
                mutated[i] = self.random.choice(self.alphabet)
        return ''.join(mutated)


text:
using System;
using System.Collections.Generic;
using Android.Gms.Maps.Model;
using System.Linq;
namespace Xamarin.Forms.GoogleMaps.Android
{
    public static class PositionExtensions
    {
        public static LatLng ToLatLng(this Position self)
        {
            return new LatLng(self.Latitude, self.Longitude);
        }

        public static IList<LatLng> ToLatLngs(this IList<Position> self)
        {
            return self.Select(ToLatLng).ToList();
        }
    }
}


text:
"use strict";
define(["lodash", "tco", "barrier", "piano", "commands", "speak"], function(_, tco, barrier, Piano, Commands) {
  // bundles together the scripts that are pre-loaded to turtleroy repl
  return function turtleBundle(royEnv, turtle, repl, editor) {
    var globals = { repl: repl, turtle: turtle, tco: tco, Barrier: barrier, speak: speak }
    royEnv.setGlobals(Piano())
    royEnv.setGlobals(Commands(editor.code, repl, turtle))
    royEnv.setGlobals(globals)
    var all = Bacon.combineAsArray(
      Bacon.fromCallback(royEnv, "evalScript", "script/arrays.roy")
      ,Bacon.fromCallback(royEnv, "evalScript", "script/turtle.roy")
    )
    return { loaded: all.map(true) }
  }
})


text:
static CGFloat kInsetCorrectionTollerance = 150;
static CGFloat kRotationRestorationTollerance = 10;

@interface VKTableView(){
    CGFloat _newVeticalOffsetStorageFrame;
    NSIndexPath *_lastVisibleRow;
    BOOL _offsetRestorationRequired;
}
@end

@implementation VKTableView

- (void) setContentInset:(UIEdgeInsets)contentInset{
    CGFloat bottomOffset = (self.contentSize.height - self.bounds.size.height + self.contentInset.bottom) - self.contentOffset.y;
    BOOL shouldCorrect = (bottomOffset > kInsetCorrectionTollerance) || (bottomOffset < kInsetCorrectionTollerance && self.contentInset.bottom < contentInset.bottom);

    CGFloat offsetCorrection = 0;
    if (self.contentSize.height < self.bounds.size.height - self.contentInset.top - self.contentInset.bottom) {
        //content is smaller than current scrolling window
        offsetCorrection = self.contentSize.height - (self.bounds.size.height - contentInset.top - contentInset.bottom);
    }
    else {
        offsetCorrection = contentInset.bottom - self.contentInset.bottom;
    }

    [super setContentInset:contentInset];

    if (shouldCorrect) {
        CGPoint offset = self.contentOffset;
        offset.y += offsetCorrection;
        if (offset.y < -self.contentInset.top) {
            offset.y = -self.contentInset.top;
        }
        self.contentOffset = offset;
    }
}

- (void) setFrame:(CGRect)frame{
    if (self.frame.size.width != frame.size.width) {
        _offsetRestorationRequired = YES;
        if (self.frame.size.height > self.contentSize.height + self.contentInset.bottom) {
            _lastVisibleRow = [self indexPathForRowAtPoint:CGPointMake(0, self.contentSize.height + self.contentOffset.y - kRotationRestorationTollerance - self.contentInset.top)];
        }
        else{
            _lastVisibleRow = [self indexPathForRowAtPoint:CGPointMake(0, self.frame.size.height + self.contentOffset.y - kRotationRestorationTollerance - self.contentInset.top)];
        }
    }
    else if (self.frame.size.height != frame.size.height) {
        _offsetRestorationRequired = YES;
            if (self.frame.size.height > self.contentSize.height) {
                _newVeticalOffsetStorageFrame = 0;
            }
            else{
                _newVeticalOffsetStorageFrame = self.contentSize.height - self.frame.size.height - self.contentOffset.y;
            }
    }
    else{
        _offsetRestorationRequired = NO;
    }

    [super setFrame:frame];

    if (!_offsetRestorationRequired) {
        return;
    }

    if (_lastVisibleRow) {
        if (_lastVisibleRow.section < [self numberOfSections] && _lastVisibleRow.row < [self numberOfRowsInSection:_lastVisibleRow.section]){
            [self scrollToRowAtIndexPath:_lastVisibleRow
                        atScrollPosition:UITableViewScrollPositionBottom animated:NO];
        }
        else {
            [self scrollToBottom];
        }
        _lastVisibleRow = nil;
    }
    else {
        if (self.contentSize.height > self.frame.size.height
            && (self.contentSize.height - self.frame.size.height - _newVeticalOffsetStorageFrame) > -self.contentInset.top) {
            [self setContentOffset:CGPointMake(self.contentOffset.x,
                                               self.contentSize.height - self.frame.size.height - _newVeticalOffsetStorageFrame)];
        }
        else{
            [self setContentOffset:CGPointMake(self.contentOffset.x, -self.contentInset.top)];
        }
    }
}

- (void) scrollToBottom{
    [self scrollToBottomAnimated:NO];
}

- (void) scrollToBottomAnimated:(BOOL) animated{
    if (self.contentSize.height + self.contentInset.bottom + self.contentInset.top > self.bounds.size.height){
        [self setContentOffset:CGPointMake(self.contentOffset.x,
                                           self.contentSize.height - self.bounds.size.height + self.contentInset.bottom)
                      animated:animated];
    }
}
@end


text:
numpy.dtype.newbyteorder
========================

.. currentmodule:: numpy

.. automethod:: dtype.newbyteorder


text:
package operation

import (
	"context"
	"go-common/library/ecode"
	"testing"

	. "github.com/smartystreets/goconvey/convey"
)

func Test_WebOperations(t *testing.T) {
	Convey("WebOperations", t, WithService(func(s *Service) {
		res, err := s.WebOperations(context.TODO())
		So(err, ShouldEqual, ecode.NothingFound)
		So(res, ShouldBeNil)
	}))
	Convey("Ping", t, WithService(func(s *Service) {
		err := s.Ping(context.TODO())
		So(err, ShouldEqual, ecode.NothingFound)
	}))
}

func Test_AppBanner(t *testing.T) {
	Convey("AppBanner", t, WithService(func(s *Service) {
		bns, cbns, err := s.AppBanner(context.TODO())
		So(bns, ShouldBeNil)
		So(cbns, ShouldBeNil)
		So(err, ShouldNotBeNil)
	}))
}

func Test_CreatorOperationList(t *testing.T) {
	Convey("CreatorOperationList", t, WithService(func(s *Service) {
		bns, err := s.CreatorOperationList(context.TODO(), 1, 10)
		So(bns, ShouldBeNil)
		So(err, ShouldNotBeNil)
	}))
}


text:
<?php

/* TwigBundle:Exception:exception.atom.twig */
class __TwigTemplate_f03324d13f84d7c5f497f3ced30671995035f3b6b1a8aedf636ecf0d74c729c0 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        $this->loadTemplate("TwigBundle:Exception:exception.xml.twig", "TwigBundle:Exception:exception.atom.twig", 1)->display(array_merge($context, array("exception" => (isset($context["exception"]) ? $context["exception"] : $this->getContext($context, "exception")))));
    }

    public function getTemplateName()
    {
        return "TwigBundle:Exception:exception.atom.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  19 => 1,);
    }
}


text:
using System.Windows;
using System.Windows.Controls;

namespace MahApps.Metro.Controls
{
    public class HamburgerMenuItemStyleSelector : StyleSelector
    {
        /// <summary>
        /// Gets or sets a value indicating whether which item container style will be used for the HamburgerMenuItem.
        /// </summary>
        public bool IsItemOptions { get; set; }

        /// <inheritdoc />
        public override Style SelectStyle(object item, DependencyObject container)
        {
            if (container != null)
            {
                var listBox = ItemsControl.ItemsControlFromItemContainer(container);
                var hamburgerMenu = listBox?.TryFindParent<HamburgerMenu>();
                if (hamburgerMenu != null)
                {
                    if (item is HamburgerMenuSeparatorItem)
                    {
                        if (hamburgerMenu.SeparatorItemContainerStyle != null)
                        {
                            return hamburgerMenu.SeparatorItemContainerStyle;
                        }
                    }
                    else if (item is HamburgerMenuItem)
                    {
                        var itemContainerStyle = this.IsItemOptions ? hamburgerMenu.OptionsItemContainerStyle : hamburgerMenu.ItemContainerStyle;
                        if (itemContainerStyle != null)
                        {
                            return itemContainerStyle;
                        }
                    }
                }
            }

            return base.SelectStyle(item, container);
        }
    }
}


text:
package condor.gahp.gt42;

import condor.gahp.*;

import java.net.URL;
import org.oasis.wsrf.properties.GetResourcePropertyResponse;
import org.globus.exec.utils.client.ManagedJobFactoryClientHelper;
import org.globus.exec.generated.ManagedJobFactoryPortType;
import org.globus.axis.message.addressing.EndpointReferenceType;
import org.globus.exec.utils.ManagedJobFactoryConstants;
import org.ietf.jgss.GSSCredential;

public class Gt42GramPingHandler implements CommandHandler {
    private GahpInterface gahp;

	public void setGahp (GahpInterface g) {
		gahp = g;
	}

    public CommandHandlerResponse handleCommand (String[] cmd) {
        Integer reqId;
        String contactString = null;

        try {
                // cmd[0] = GRAM_JOB_REQUEST
                reqId = new Integer(cmd[1]);
                contactString = cmd[2];
        }
        catch (Exception e) {
                e.printStackTrace(System.err);
                return CommandHandlerResponse.SYNTAX_ERROR;
        }

        GSSCredential proxy = GSIUtils.getCredential (gahp);

        MyTask toRun = new MyTask (reqId,
								   contactString,
								   gahp,
                                   proxy);

        return new CommandHandlerResponse (
                CommandHandlerResponse.SUCCESS,
                toRun);
    }

    class MyTask implements Runnable {

            public final String factoryAddr;
            public final Integer requestID;
            private GahpInterface gahp;
        private GSSCredential proxy;

            public MyTask(Integer requestID,
                            String factoryURL,
                            GahpInterface gahp,
                          GSSCredential proxy) {
                    this.factoryAddr = factoryURL;
                    this.requestID = requestID;
                    this.gahp = gahp;
                    this.proxy = proxy;
            }

            public void run () {

                String[] result = new String[] { "0", "NULL" };

                // construct the factory url
                try {
					URL factoryURL = ManagedJobFactoryClientHelper.
                        getServiceURL(this.factoryAddr).getURL();

					EndpointReferenceType factoryEndpoint =
                        ManagedJobFactoryClientHelper.getDefaultFactoryEndpoint(
                        factoryURL.toExternalForm());

					ManagedJobFactoryPortType factory =
						ManagedJobFactoryClientHelper.getPort(factoryEndpoint);
					GramJobUtils.setDefaultFactoryAttributes (factory,
															  this.proxy);

						// Issue a dummy query to the resource
                        // We don't care about the answer
						// All that really matters is that it doesn't
						// puke up an exception...
					GetResourcePropertyResponse queryResult =
						factory.getResourceProperty (
													ManagedJobFactoryConstants.RP_DELEGATION_FACTORY_ENDPOINT);

                    if (queryResult == null) {
                        throw new Exception ("Sample query to factory returned null");
                    }

                }
                catch (Exception e) {
                    e.printStackTrace(System.err);
                    String errstr = e.toString();
                    if ( errstr == null || errstr.equals( "" ) ) {
                        errstr = "unknown";
                    }
                    result = new String[] { "1", errstr };
                }

                gahp.addResult (requestID.intValue(), result);
            }
    }
}


text:
/*
solver.h
-----

Role : Main application file
*/

#ifndef H_SOLVER
#define H_SOLVER

    void logo();
    void error(const char*, int);

#endif


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <link rel="stylesheet" href=" <?php echo base_url('asset/css/main.css');?>">

    <title></title>

        <img src="<?php echo base_url('asset/image/common/cbl.png')?>" title="cbl login" style="margin-left:60px;"/>

        <form class="form-horizontal" role="form" action="<?php echo base_url('login/check_login')?>" method="post">

                        <input type="text" class="form-control" name="us_name" placeholder="Username" aria-describedby="sizing-addon1" required="required">

                        <input type="password" name="us_pwd" class="form-control" placeholder="Password" aria-describedby="sizing-addon1" required="required">

<?php echo $captcha['image']; ?><input type="hidden" id="captcha" value="<?php echo $this->session->userdata('captcha'); ?>"/>

                    <input type="text" class="form-control" id="word" placeholder="Security Code" style="align:center;">

                    <input type="submit" class="btn btn-primary" value="login" id="btnlogin" placeholder="Enter email" style="margin-left:120px;">

            <?php echo $this->session->flashdata('msg');?>
        </form>


text:
package com.pdsl.parameters;

import com.example.*;
import com.pdsl.runners.PdslConfiguration;
import com.pdsl.runners.PdslGherkinApplication;
import com.pdsl.runners.PdslTest;
import com.pdsl.runners.RecognizedBy;
import com.pdsl.runners.junit.PdslGherkinJUnit4Runner;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.ParseTreeListener;
import org.antlr.v4.runtime.tree.TerminalNode;
import org.hamcrest.core.Is;
import org.junit.runner.RunWith;

import javax.inject.Provider;
import java.util.ServiceLoader;
import java.util.stream.Collectors;

/**
 * Provides a tutorial example for grammars made to demos made to explain how to extract parameters.
 */
@RunWith(PdslGherkinJUnit4Runner.class)
@PdslGherkinApplication(
        resourceRoot = "src/test/resources/features"
)
public class ParametersTest {

    @PdslTest(
            includesResources = "ParametersExample.feature",
            tags = "@Simplistic",
            parser = SimpleParameterParser.class,
            lexer = SimpleParameterLexer.class,
            listener = SimpleProvider.class,
            startRule = "parameterExample"
    )
    @RecognizedBy(
            dslRecognizerParser = SimpleParameterParser.class,
            dslRecognizerLexer = SimpleParameterLexer.class,
            recognizerRule = "parameterExample"
    )
    public void simpleLexer_extractsAndPrintsParameters(){}

    public static class SimpleProvider implements Provider<ParseTreeListener> {

        @Override
        public ParseTreeListener get() { return new SimpleListener();}
        private static class SimpleListener extends SimpleParameterParserBaseListener {
            @Override
            public void enterParameterExample(SimpleParameterParser.ParameterExampleContext ctx) {
                // You can directly reference tokens in a parser rule
                System.out.println(ctx.NUMBER().getText());
            }
            @Override
            public void visitErrorNode(ErrorNode errorNode) {
                throw new IllegalStateException("An error node was found!\n" + errorNode.getText());
            }
        }
    }

    @PdslTest(
            includesResources = "ParametersExample.feature",
            tags = "@MultipleMatches",
            parser = SimpleParameterParser.class,
            lexer = SimpleParameterLexer.class,
            listener = MultiProvider.class,
            startRule = "multiExample"
    )
    @RecognizedBy(
            dslRecognizerParser = SimpleParameterParser.class,
            dslRecognizerLexer = SimpleParameterLexer.class,
            recognizerRule = "multiExample"
    )
    public void simpleLexer_extractsAndPrintsMultipleParameters(){}

    public static class MultiProvider implements Provider<ParseTreeListener> {

        @Override
        public ParseTreeListener get() { return new MultiListener(); }
        private static class MultiListener extends SimpleParameterParserBaseListener {
            @Override
            public void enterMultiExample(SimpleParameterParser.MultiExampleContext ctx) {
                // If you match more than one rule/token then they are available as a list
                ctx.parameterExample().stream().forEach(paramContext -> System.out.println(paramContext.NUMBER().getText()));
            }
            @Override
            public void visitErrorNode(ErrorNode errorNode) {
                throw new IllegalStateException("An error node was found!\n" + errorNode.getText());
            }
        }
    }

    @PdslTest(
            includesResources = "PowerfulParametersExample.feature",
            parser = PowerfulParameterParser.class,
            lexer = PowerfulParameterLexer.class,
            listener = IslandListenerProvider.class
    )
    @RecognizedBy(
            dslRecognizerParser = PowerfulParameterParser.class,
            dslRecognizerLexer = PowerfulParameterLexer.class,
            recognizerRule = "polymorphicDslAllRules"
    )
    public void powerfulParser_extractsAndPrintsParameters(){}

    public static class IslandListenerProvider implements Provider<ParseTreeListener> {

        @Override
        public ParseTreeListener get() {
            return new IslandListener();
        }
        private static class IslandListener extends PowerfulParameterParserBaseListener {

            @Override
            public void enterQuotedParameter(PowerfulParameterParser.QuotedParameterContext ctx) {
                System.out.println(ctx.BODY().getText());
            }
            @Override
            public void enterDocstringParameter(PowerfulParameterParser.DocstringParameterContext ctx) {
                System.out.println(ctx.DOCSTRING().stream().map(TerminalNode::getText).collect(Collectors.joining()));
            }

            @Override
            public void visitErrorNode(ErrorNode errorNode) {
                throw new IllegalStateException("An error node was found!\n" + errorNode.getText());
            }
        }
    }
}


text:
package fr.adrienbrault.idea.symfony2plugin.util;

import com.intellij.psi.PsiElement;
import com.jetbrains.php.lang.psi.elements.StringLiteralExpression;

public class PsiElementUtils {

    public static String getMethodParameter(PsiElement parameter) {

        if (!(parameter instanceof StringLiteralExpression)) {
            return null;
        }

        StringLiteralExpression stringLiteralExpression = (StringLiteralExpression) parameter;

        String stringValue = stringLiteralExpression.getText();
        String value = stringValue.substring(stringLiteralExpression.getValueRange().getStartOffset(), stringLiteralExpression.getValueRange().getEndOffset());

        return removeIdeaRuleHack(value);
    }

    public static String removeIdeaRuleHack(String value) {
        // wtf: ???
        // looks like current cursor position is marked :)
        return value.replace("IntellijIdeaRulezzz", "").replace("IntellijIdeaRulezzz ", "").trim();
    }

}


text:
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        # Deleting model 'Tag'
        db.rename_table('api_tag', 'tags_tag')

        # Adding model 'Domain'
        db.create_table('api_domain', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(default='', max_length=100)),
            ('url', self.gf('django.db.models.fields.URLField')(max_length=300)),
        ))
        db.send_create_signal('api', ['Domain'])

        # Adding model 'Page'
        db.create_table('api_page', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('url', self.gf('django.db.models.fields.URLField')(max_length=300)),
            ('domain', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Domain'])),
            ('title', self.gf('django.db.models.fields.CharField')(default='', max_length=2000)),
            ('favicon_url', self.gf('django.db.models.fields.TextField')(default='')),
            ('favIconUrl', self.gf('django.db.models.fields.URLField')(default='', max_length=2000)),
            ('description', self.gf('django.db.models.fields.TextField')(default='')),
            ('img_url', self.gf('django.db.models.fields.URLField')(default='', max_length=2000)),
        ))
        db.send_create_signal('api', ['Page'])

        # Adding field 'PopularHistoryInfo.page'
        db.add_column('api_popularhistoryinfo', 'page',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Page'], null=True, on_delete=models.SET_NULL),
                      keep_default=False)

        # Adding field 'EyeHistory.page'
        db.add_column('api_eyehistory', 'page',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Page'], null=True, on_delete=models.SET_NULL),
                      keep_default=False)

    def backwards(self, orm):
        # Adding model 'Tag'
        db.rename_table('tags_tag', 'api_tag')

        # Deleting model 'Domain'
        db.delete_table('api_domain')

        # Deleting model 'Page'
        db.delete_table('api_page')

        # Deleting field 'PopularHistoryInfo.page'
        db.delete_column('api_popularhistoryinfo', 'page_id')

        # Deleting field 'EyeHistory.page'
        db.delete_column('api_eyehistory', 'page_id')

    models = {
        'api.blacklistitem': {
            'Meta': {'unique_together': "(('user', 'url'),)", 'object_name': 'BlackListItem'},
            'date_created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2017, 4, 24, 0, 0)'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
        },
        'api.chatmessage': {
            'Meta': {'object_name': 'ChatMessage'},
            'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['auth.User']"}),
            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'message': ('django.db.models.fields.CharField', [], {'max_length': '2000'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '300'})
        },
        'api.domain': {
            'Meta': {'object_name': 'Domain'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '300'})
        },
        'api.eyehistory': {
            'Meta': {'object_name': 'EyeHistory'},
            'domain': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'end_event': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40'}),
            'end_time': ('django.db.models.fields.DateTimeField', [], {}),
            'favIconUrl': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'favicon_url': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'humanize_time': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '200'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Page']", 'null': 'True', 'on_delete': 'models.SET_NULL'}),
            'src': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40'}),
            'start_event': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40'}),
            'start_time': ('django.db.models.fields.DateTimeField', [], {}),
            'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2000'}),
            'total_time': ('django.db.models.fields.IntegerField', [], {}),
            'url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
        },
        'api.eyehistorymessage': {
            'Meta': {'ordering': "['-post_time']", 'object_name': 'EyeHistoryMessage'},
            'eyehistory': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.EyeHistory']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'message': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300'}),
            'post_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
        },
        'api.eyehistoryraw': {
            'Meta': {'object_name': 'EyeHistoryRaw'},
            'domain': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'end_event': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40'}),
            'end_time': ('django.db.models.fields.DateTimeField', [], {}),
            'favIconUrl': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'favicon_url': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'humanize_time': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '200'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'src': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40'}),
            'start_event': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '40'}),
            'start_time': ('django.db.models.fields.DateTimeField', [], {}),
            'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2000'}),
            'total_time': ('django.db.models.fields.IntegerField', [], {}),
            'url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
        },
        'api.mutelist': {
            'Meta': {'object_name': 'MuteList'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '300', 'null': 'True'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
            'word': ('django.db.models.fields.URLField', [], {'max_length': '300', 'null': 'True'})
        },
        'api.page': {
            'Meta': {'object_name': 'Page'},
            'description': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Domain']"}),
            'favIconUrl': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'favicon_url': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'img_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2000'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '300'})
        },
        'api.popularhistory': {
            'Meta': {'unique_together': "(('user', 'popular_history'),)", 'object_name': 'PopularHistory'},
            'avg_time_ago': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'avg_time_spent_score': ('django.db.models.fields.FloatField', [], {'default': '0.0'}),
            'eye_hists': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.EyeHistory']", 'symmetrical': 'False'}),
            'humanize_avg_time': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '200'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'messages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['api.EyeHistoryMessage']", 'symmetrical': 'False'}),
            'num_comment_score': ('django.db.models.fields.FloatField', [], {'default': '0.0'}),
            'popular_history': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.PopularHistoryInfo']"}),
            'top_score': ('django.db.models.fields.FloatField', [], {'default': '0.0'}),
            'total_time_ago': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            'total_time_spent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
            'unique_visitor_score': ('django.db.models.fields.FloatField', [], {'default': '0.0'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
            'visitors': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'pophist_visitors'", 'symmetrical': 'False', 'to': "orm['auth.User']"})
        },
        'api.popularhistoryinfo': {
            'Meta': {'object_name': 'PopularHistoryInfo'},
            'description': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'domain': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '100'}),
            'favIconUrl': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'favicon_url': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'img_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Page']", 'null': 'True', 'on_delete': 'models.SET_NULL'}),
            'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2000'}),
            'url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '255'})
        },
        'api.whitelistitem': {
            'Meta': {'unique_together': "(('user', 'url'),)", 'object_name': 'WhiteListItem'},
            'date_created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2017, 4, 24, 0, 0)'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
        },
        'auth.group': {
            'Meta': {'object_name': 'Group'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        'auth.permission': {
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        'auth.user': {
            'Meta': {'object_name': 'User'},
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
        },
        'contenttypes.contenttype': {
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        }
    }

    complete_apps = ['api']


text:
package com.cardpay.pccredit.notification.dao;

import java.util.List;

import com.cardpay.pccredit.notification.model.NotificationMessage;
import com.wicresoft.jrad.base.database.dao.query.QueryContext;
import com.wicresoft.util.annotation.Mapper;

/**
 * Description of NotificationMessageDao
 *
 * @author smithw
 * @created on 2014-10-15
 *
 * @version $Id:$
 */
@Mapper
public interface NotificationMessageDao {

	public List<NotificationMessage> findNotificationMessageByFilter(QueryContext qc);

	public int deleteNotificationMessage(String messageId);
}


text:
package sourcecoded.quantum.api.vacuum;

import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import sourcecoded.quantum.api.CraftingContext;

import java.util.ArrayList;
import java.util.List;

/**
 * The registration class for Vacuum Catalyst crafting.
 * This is where you register your Vacuum recipes. It is
 * recommended that you register at an FMLInitialization
 * event, but you can register whenever you need.
 *
 * @author SourceCoded
 */
public class VacuumRegistry {

    /**
     * The ArrayList containing all the registered recipes
     */
    private static ArrayList<IVacuumRecipe> recipes = new ArrayList<IVacuumRecipe>();

    /**
     * Register a recipe in the registry. Again,
     * it is recommended that you call this at
     * an Initialization event, but not required.
     */
    public static void addRecipe(IVacuumRecipe recipe) {
        recipes.add(recipe);
    }

    /**
     * Get a list of all the registered recipes.
     * If you plan on iterating through this list,
     * I recommend calling .clone(), as this returns
     * the List object itself.
     */
    public static List<IVacuumRecipe> getRecipes() {
        return recipes;
    }

    /**
     * Returns if this registry has a recipe for the
     * specified catalysts. This is just a
     * null check on getRecipeForCatalyst
     */
    public static boolean hasRecipeForCatalyst(List<ItemStack> catalysts) {
        return getRecipeForCatalyst(catalysts) != null;
    }

    /**
     * Returns the Vacuum Recipe for the given catalysts.
     * This will return null if there is no recipe found
     */
    public static IVacuumRecipe getRecipeForCatalyst(List<ItemStack> catalysts) {
//        for (IVacuumRecipe recipe : getRecipes()) {
//            if (matchesContext(recipe.getCatalysts(), catalysts, recipe.getContext()))
//                return recipe;
//        }

        for (IVacuumRecipe recipe : getRecipes()) {
            if (matchesExact(recipe.getCatalysts(), catalysts))             //Makes sure stacks sizes are taken into account for the catalysts
                return recipe;
        }
        return null;
    }

    public static IVacuumRecipe getRecipeForOutput(List<ItemStack> outputs) {
        for (IVacuumRecipe recipe : getRecipes()) {
            if (matches(recipe.getOutputs(), outputs))
                return recipe;
        }
        return null;
    }

    public static IVacuumRecipe getRecipeForOutput(ItemStack output) {
        for (IVacuumRecipe recipe : getRecipes()) {
            for (ItemStack out : recipe.getOutputs())
                if (matches(out, output)) return recipe;
        }
        return null;
    }

    /**
     * Returns true if both ItemStacks match. This does
     * not yet take into account NBT tags, only Item and
     * Meta
     */
    public static boolean matches(ItemStack item1, ItemStack item2) {
        //return item1.isItemEqual(item2);
        return OreDictionary.itemMatches(item1, item2, false);

    }

    public static boolean matchesExact(List<ItemStack> l1, List<ItemStack> l2) {
        if (l1.size() != l2.size()) return false;

        for (int i = 0; i < l1.size(); i++) {
            if (!matches(l1.get(i), l2.get(i)) || l1.get(i).stackSize != l2.get(i).stackSize)
                return false;
        }

        return true;
    }

    /**
     * Iterates two lists into the matches() method above.
     */
    public static boolean matches(List<ItemStack> l1, List<ItemStack> l2) {
        if (l1.size() != l2.size()) return false;

        for (int i = 0; i < l1.size(); i++) {
            if (!matches(l1.get(i), l2.get(i)))
                return false;
        }

        return true;
    }

    public static boolean matchesContext(List<ItemStack> l1, List<ItemStack> l2, CraftingContext context) {
        if (l1.size() != l2.size()) return false;

        for (int i = 0; i < l1.size(); i++) {
            if (!context.matches(l1.get(i), l2.get(i)))
                return false;
        }

        return true;
    }

}


text:
package mockit;

import javax.inject.*;

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

public final class StandardDI2Test
{
   static class TestedClass
   {
      TestedClass() { throw new RuntimeException("Must not occur"); }
      @Inject TestedClass(Runnable action) {}
   }

   @Tested TestedClass tested;

   @Test(expected = IllegalArgumentException.class)
   public void attemptToCreateTestedObjectThroughAnnotatedConstructorWithMissingInjectables()
   {
      fail();
   }
}


text:
import updateMarkdownAttrs from './updateMarkdownAttrs';
import walkMarkdownTokens from './walkMarkdownTokens';

export default function addTargetBlankToHyperlinksMarkdown(tokens) {
  return walkMarkdownTokens(tokens, token => {
    switch (token.type) {
      case 'link_open':
        token = updateMarkdownAttrs(token, attrs =>
          // Adds only for external links, e.g. https://, data:
          // Don't add for internal links, e.g. #ref-1, ?q=doc
          /^\w/u.test(attrs.href)
            ? {
                ...attrs,
                rel: 'noopener noreferrer',
                target: '_blank'
              }
            : attrs
        );

        break;

      default:
        break;
    }

    return token;
  });
}


text:
\hypertarget{interface_able_polecat___meta_data_interface}{}\section{Able\+Polecat\+\_\+\+Meta\+Data\+Interface Interface Reference}
\label{interface_able_polecat___meta_data_interface}\index{Able\+Polecat\+\_\+\+Meta\+Data\+Interface@{Able\+Polecat\+\_\+\+Meta\+Data\+Interface}}
Inheritance diagram for Able\+Polecat\+\_\+\+Meta\+Data\+Interface\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{interface_able_polecat___meta_data_interface}
\end{center}
\end{figure}
\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item
\hypertarget{interface_able_polecat___meta_data_interface_a0e851703423f0e426a72843a724fe215}{}const {\bfseries C\+L\+I\+E\+N\+T\+\_\+\+I\+D} = \textquotesingle{}client\+\_\+id\textquotesingle{}\label{interface_able_polecat___meta_data_interface_a0e851703423f0e426a72843a724fe215}

\item
\hypertarget{interface_able_polecat___meta_data_interface_ab63ae970cd2a8405dcafc310dc3102e1}{}const {\bfseries S\+U\+B\+J\+E\+C\+T} = \textquotesingle{}subject\textquotesingle{}\label{interface_able_polecat___meta_data_interface_ab63ae970cd2a8405dcafc310dc3102e1}

\item
\hypertarget{interface_able_polecat___meta_data_interface_a5ae84ee64ebc1100f9037309d6723a8f}{}const {\bfseries P\+R\+E\+D\+I\+C\+A\+T\+E} = \textquotesingle{}predicate\textquotesingle{}\label{interface_able_polecat___meta_data_interface_a5ae84ee64ebc1100f9037309d6723a8f}

\item
\hypertarget{interface_able_polecat___meta_data_interface_aa2f1769baa345f301668853c444000e1}{}const {\bfseries O\+B\+J\+E\+C\+T} = \textquotesingle{}object\textquotesingle{}\label{interface_able_polecat___meta_data_interface_aa2f1769baa345f301668853c444000e1}

\item
\hypertarget{interface_able_polecat___meta_data_interface_aa8f5c4281b26694a81509ab77da8d86c}{}const {\bfseries R\+E\+P\+R\+E\+S\+E\+N\+T\+A\+T\+I\+O\+N} = \textquotesingle{}representation\textquotesingle{}\label{interface_able_polecat___meta_data_interface_aa8f5c4281b26694a81509ab77da8d86c}

\item
\hypertarget{interface_able_polecat___meta_data_interface_ad7a0cb2592aa45dd08251b948d43f1d6}{}const {\bfseries O\+P\+T\+I\+O\+N\+S} = \textquotesingle{}options\textquotesingle{}\label{interface_able_polecat___meta_data_interface_ad7a0cb2592aa45dd08251b948d43f1d6}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}

The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item
C\+:/wamp/www/polecat/public/core/Meta\+Data.\+php\end{DoxyCompactItemize}


text:
<?php

/**
 * @namespace
 */
namespace Bluz\Request;

use Bluz\Request;

/**
 * Request
 *
 * @category Bluz
 * @package  Request
 *
 * @author   Anton Shevchuk
 * @created  06.07.11 16:59
 */
class HttpRequest extends AbstractRequest
{
    /**
     * Constructor
     *
     */
    public function __construct()
    {
        parent::__construct();
        $this->method = $this->getServer('REQUEST_METHOD');

        // switch statement for $this->method
        switch ($this->method) {
            case self::METHOD_PUT:
            case self::METHOD_DELETE:
                parse_str(file_get_contents('php://input'), $data);
                $this->setParams($data);
                break;
        }
    }

    /**
     * Access values contained in the superglobals as public members
     * Order of precedence: 1. GET, 2. POST, 3. COOKIE, 4. SERVER, 5. ENV
     *
     * @see http://msdn.microsoft.com/en-us/library/system.web.httprequest.item.aspx
     * @param string $key
     * @return mixed
     */
    public function __get($key)
    {
        switch (true) {
            case parent::__isset($key):
                return parent::__get($key);
            case isset($_GET[$key]):
                return $_GET[$key];
            case isset($_POST[$key]):
                return $_POST[$key];
            case isset($_COOKIE[$key]):
                return $_COOKIE[$key];
            case isset($_SERVER[$key]):
                return $_SERVER[$key];
            case isset($_ENV[$key]):
                return $_ENV[$key];
            default:
                return null;
        }
    }

    /**
     * Check to see if a property is set
     *
     * @param string $key
     * @return boolean
     */
    public function __isset($key)
    {
        switch (true) {
            case parent::__isset($key):
                return true;
            case isset($_GET[$key]):
                return true;
            case isset($_POST[$key]):
                return true;
            case isset($_COOKIE[$key]):
                return true;
            case isset($_SERVER[$key]):
                return true;
            case isset($_ENV[$key]):
                return true;
            default:
                return false;
        }
    }

    /**
     * Unset custom param
     *
     * @param $key
     */
    public function __unset($key)
    {
        parent::__unset($key);

        if (isset($_GET[$key])) {
            unset($_GET[$key]);
        }
        if (isset($_POST[$key])) {
            unset($_POST[$key]);
        }
        if (isset($_COOKIE[$key])) {
            unset($_COOKIE[$key]);
        }
        if (isset($_SERVER[$key])) {
            unset($_SERVER[$key]);
        }
        if (isset($_ENV[$key])) {
            unset($_ENV[$key]);
        }
    }

    /**
     * Get all request parameters
     *
     * @return array
     */
    public function getAllParams()
    {
        return array_merge($_ENV, $_SERVER, $_COOKIE, $_POST, $_GET, $this->params);
    }

    /**
     * Get the request URI scheme
     *
     * @return string
     */
    public function getScheme()
    {
        return ($this->getServer('HTTPS') == 'on') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;
    }

    /**
     * Retrieve a member of the $_GET superglobal
     *
     * If no $key is passed, returns the entire $_GET array.
     *
     * @todo How to retrieve from nested arrays
     * @param string $key
     * @param mixed $default Default value to use if key not found
     * @return mixed Returns null if key does not exist
     */
    public function getQuery($key = null, $default = null)
    {
        if (null === $key) {
            return $_GET;
        }

        return (isset($_GET[$key])) ? $_GET[$key] : $default;
    }

    /**
     * Retrieve a member of the $_POST superglobal
     *
     * If no $key is passed, returns the entire $_POST array.
     *
     * @todo How to retrieve from nested arrays
     * @param string $key
     * @param mixed $default Default value to use if key not found
     * @return mixed Returns null if key does not exist
     */
    public function getPost($key = null, $default = null)
    {
        if (null === $key) {
            return $_POST;
        }

        return (isset($_POST[$key])) ? $_POST[$key] : $default;
    }

    /**
     * Retrieve a member of the $_COOKIE superglobal
     *
     * If no $key is passed, returns the entire $_COOKIE array.
     *
     * @todo How to retrieve from nested arrays
     * @param string $key
     * @param mixed $default Default value to use if key not found
     * @return mixed Returns null if key does not exist
     */
    public function getCookie($key = null, $default = null)
    {
        if (null === $key) {
            return $_COOKIE;
        }

        return (isset($_COOKIE[$key])) ? $_COOKIE[$key] : $default;
    }

    /**
     * Retrieve a member of the $_SERVER superglobal
     *
     * If no $key is passed, returns the entire $_SERVER array.
     *
     * @param string $key
     * @param mixed $default Default value to use if key not found
     * @return mixed Returns null if key does not exist
     */
    public function getServer($key = null, $default = null)
    {
        if (null === $key) {
            return $_SERVER;
        }

        return (isset($_SERVER[$key])) ? $_SERVER[$key] : $default;
    }

    /**
     * Get the HTTP host.
     *
     * "Host" ":" host [ ":" port ] ; Section 3.2.2
     * Note the HTTP Host header is not the same as the URI host.
     * It includes the port while the URI host doesn't.
     *
     * @return string
     */
    public function getHttpHost()
    {
        $host = $this->getServer('HTTP_HOST');
        if (!empty($host)) {
            return $host;
        }

        $scheme = $this->getScheme();
        $name   = $this->getServer('SERVER_NAME');
        $port   = $this->getServer('SERVER_PORT');

        if(null === $name) {
            return '';
        }
        elseif (($scheme == self::SCHEME_HTTP && $port == 80) || ($scheme == self::SCHEME_HTTPS && $port == 443)) {
            return $name;
        } else {
            return $name . ':' . $port;
        }
    }

    /**
     * Get the request URI.
     *
     * @return string
     */
    public function getRequestUri()
    {
        if ($this->requestUri === null) {
            $this->requestUri = $this->detectRequestUri();
        }
        return $this->requestUri;
    }

    /**
     * Get the request URI.
     *
     * @return string
     */
    public function getCleanUri()
    {
        if ($this->cleanUri === null) {
            $uri = parse_url($this->getRequestUri());
            $uri = $uri['path'];

            if ($this->getBaseUrl() && strpos($uri, $this->getBaseUrl()) === 0) {
                $uri = substr($uri, strlen($this->getBaseUrl()));
            }
            $this->cleanUri = $uri;
        }
        return $this->cleanUri;
    }

    /**
     * Get the base URL.
     *
     * @return string
     */
    public function getBaseUrl()
    {
        if (null === $this->baseUrl) {
            $this->setBaseUrl($this->detectBaseUrl());
        }

        return $this->baseUrl;
    }

    /**
     * Get the client's IP address
     *
     * @param  boolean $checkProxy
     * @return string
     */
    public function getClientIp($checkProxy = true)
    {
        if ($checkProxy && $this->getServer('HTTP_CLIENT_IP') != null) {
            $ip = $this->getServer('HTTP_CLIENT_IP');
        } else if ($checkProxy && $this->getServer('HTTP_X_FORWARDED_FOR') != null) {
            $ip = $this->getServer('HTTP_X_FORWARDED_FOR');
        } else {
            $ip = $this->getServer('REMOTE_ADDR');
        }

        return $ip;
    }

    /**
     * Detect the base URI for the request
     *
     * Looks at a variety of criteria in order to attempt to autodetect a base
     * URI, including rewrite URIs, proxy URIs, etc.
     *
     * @return string
     */
    public function detectRequestUri()
    {
        $requestUri = null;

        // Check this first so IIS will catch.
        $httpXRewriteUrl = $this->getServer('HTTP_X_REWRITE_URL');
        if ($httpXRewriteUrl !== null) {
            $requestUri = $httpXRewriteUrl;
        }

        // IIS7 with URL Rewrite: make sure we get the unencoded url
        // (double slash problem).
        $iisUrlRewritten = $this->getServer('IIS_WasUrlRewritten');
        $unencodedUrl    = $this->getServer('UNENCODED_URL', '');
        if ('1' == $iisUrlRewritten && '' !== $unencodedUrl) {
            return $unencodedUrl;
        }

        // HTTP proxy requests setup request URI with scheme and host
        // [and port] + the URL path, only use URL path.
        if (!$httpXRewriteUrl) {
            $requestUri = $this->getServer('REQUEST_URI');
        }
        if ($requestUri !== null) {
            $schemeAndHttpHost = $this->getScheme() . '://'. $this->getServer('HTTP_HOST');

            if (strpos($requestUri, $schemeAndHttpHost) === 0) {
                $requestUri = substr($requestUri, strlen($schemeAndHttpHost));
            }
            return $requestUri;
        }

        // IIS 5.0, PHP as CGI.
        $origPathInfo = $this->getServer('ORIG_PATH_INFO');
        if ($origPathInfo !== null) {
            $queryString = $this->getServer('QUERY_STRING', '');
            if ($queryString !== '') {
                $origPathInfo .= '?' . $queryString;
            }
            return $origPathInfo;
        }

        return '/';
    }

    /**
     * Auto-detect the base path from the request environment
     *
     * Uses a variety of criteria in order to detect the base URL of the request
     * (i.e., anything additional to the document root).
     *
     * The base URL includes the schema, host, and port, in addition to the path.
     *
     * @return string
     */
    public function detectBaseUrl()
    {
        $baseUrl        = '';
        $filename       = $this->getServer('SCRIPT_FILENAME', '');
        $scriptName     = $this->getServer('SCRIPT_NAME');
        $phpSelf        = $this->getServer('PHP_SELF');
        $origScriptName = $this->getServer('ORIG_SCRIPT_NAME');

        if ($scriptName !== null && basename($scriptName) === $filename) {
            $baseUrl = $scriptName;
        } elseif ($phpSelf !== null && basename($phpSelf) === $filename) {
            $baseUrl = $phpSelf;
        } elseif ($origScriptName !== null && basename($origScriptName) === $filename) {
            // 1and1 shared hosting compatibility.
            $baseUrl = $origScriptName;
        } else {
            // Backtrack up the SCRIPT_FILENAME to find the portion
            // matching PHP_SELF.
            $path     = $phpSelf ?: '';
            $segments = array_reverse(explode('/', trim($filename, '/')));
            $index    = 0;
            $last     = count($segments);
            $baseUrl  = '';

            do {
                $segment  = $segments[$index];
                $baseUrl = '/' . $segment . $baseUrl;
                $index++;
            } while ($last > $index && false !== ($pos = strpos($path, $baseUrl)) && 0 !== $pos);
        }

        // Does the base URL have anything in common with the request URI?
        $requestUri = $this->getRequestUri();

        // Full base URL matches.
        if (0 === strpos($requestUri, $baseUrl)) {
            return $baseUrl;
        }

        // Directory portion of base path matches.
        if (0 === strpos($requestUri, dirname($baseUrl))) {
            $baseUrl = dirname($baseUrl);
            return $baseUrl;
        }

        $truncatedRequestUri = $requestUri;

        if (false !== ($pos = strpos($requestUri, '?'))) {
            $truncatedRequestUri = substr($requestUri, 0, $pos);
        }

        $basename = basename($baseUrl);

        // No match whatsoever
        if (empty($basename) || false === strpos($truncatedRequestUri, $basename)) {
            return '';
        }

        // If using mod_rewrite or ISAPI_Rewrite strip the script filename
        // out of the base path. $pos !== 0 makes sure it is not matching a
        // value from PATH_INFO or QUERY_STRING.
        if (strlen($requestUri) >= strlen($baseUrl)
            && (false !== ($pos = strpos($requestUri, $baseUrl)) && $pos !== 0)
        ) {
            $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl));
        }

        return $baseUrl;
    }
}


text:
.textLayer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.2;
  line-height: 1.0;
}

.textLayer > span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
}

.textLayer .highlight {
  margin: -1px;
  padding: 1px;

  background-color: rgb(180, 0, 170);
  border-radius: 4px;
}

.textLayer .highlight.begin {
  border-radius: 4px 0px 0px 4px;
}

.textLayer .highlight.end {
  border-radius: 0px 4px 4px 0px;
}

.textLayer .highlight.middle {
  border-radius: 0px;
}

.textLayer .highlight.selected {
  background-color: rgb(0, 100, 0);
}

.textLayer ::selection { background: rgb(0,0,255); }

.textLayer .endOfContent {
  display: block;
  position: absolute;
  left: 0px;
  top: 100%;
  right: 0px;
  bottom: 0px;
  z-index: -1;
  cursor: default;
  user-select: none;
}

.textLayer .endOfContent.active {
  top: 0px;
}


text:
import java.util.List;

class BuilderInstanceMethod<T> {
	public String create(int show, final int yes, List<T> also, int $andMe) {
		return "" + show + yes + also + $andMe;
	}

	@java.lang.SuppressWarnings("all")
	@javax.annotation.Generated("lombok")
	public class StringBuilder {
		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		private int show;
		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		private int yes;
		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		private List<T> also;
		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		private int $andMe;

		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		StringBuilder() {
		}

		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		public StringBuilder show(final int show) {
			this.show = show;
			return this;
		}

		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		public StringBuilder yes(final int yes) {
			this.yes = yes;
			return this;
		}

		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		public StringBuilder also(final List<T> also) {
			this.also = also;
			return this;
		}

		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		public StringBuilder $andMe(final int $andMe) {
			this.$andMe = $andMe;
			return this;
		}

		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		public String build() {
			return BuilderInstanceMethod.this.create(show, yes, also, $andMe);
		}

		@java.lang.Override
		@java.lang.SuppressWarnings("all")
		@javax.annotation.Generated("lombok")
		public java.lang.String toString() {
			return "BuilderInstanceMethod.StringBuilder(show=" + this.show + ", yes=" + this.yes + ", also=" + this.also + ", $andMe=" + this.$andMe + ")";
		}
	}

	@java.lang.SuppressWarnings("all")
	@javax.annotation.Generated("lombok")
	public StringBuilder builder() {
		return new StringBuilder();
	}
}