text:
<?php
/**
 * SpecialMobileDiff.php
 */

/**
 * Show the difference between two revisions of a page
 */
class SpecialMobileDiff extends MobileSpecialPage {
	/** @var boolean $hasDesktopVersion Does this special page has a desktop version? */
	protected $hasDesktopVersion = true;
	/** @var integer $revId Saves the actual revision ID */
	private $revId;
	/** @var Revision $rev Saves the revision Object of actual revision */
	private $rev;
	/** @var Revision $prevRev Saves the previous revision */
	private $prevRev;
	/** @var Title Saves the title of the actual revision */
	private $targetTitle;

	/**
	 * Construct function
	 */
	public function __construct() {
		parent::__construct( 'MobileDiff' );
	}

	/**
	 * Get the revision object from ID
	 * @param integer $id ID of the wanted revision
	 * @return Revision
	 */
	public static function getRevision( $id ) {
		return Revision::newFromId( $id );
	}

	/**
	 * Generate a 404 Error message, that revisions can not be found
	 */
	public function executeBadQuery() {
		wfHttpError( 404, $this->msg( 'mobile-frontend-diffview-404-title' )->text(),
			$this->msg( 'mobile-frontend-diffview-404-desc' )->text() );
	}

	/**
	 * Takes 2 ids/keywords and validates them returning respective revisions
	 *
	 * @param int[] $revids Array of revision ids currently limited to 2 elements
	 * @return Revision[] Array of previous and next revision. The next revision is null if
	 *   a bad parameter is passed
	 */
	public function getRevisionsToCompare( $revids ) {
		$prev = null;
		$rev = null;

		// check 2 parameters are passed and are numbers
		if ( count( $revids ) === 2 && $revids[0] && $revids[1] ) {
			$id = intval( $revids[1] );
			$prevId = intval( $revids[0] );
			if ( $id && $prevId ) {
				$rev = static::getRevision( $id );
				// deal with identical ids
				if ( $id === $prevId ) {
					$rev = null;
				} elseif ( $rev ) {
					$prev = static::getRevision( $prevId );
					if ( !$prev ) {
						$rev = null;
					}
				} else {
					$rev = null;
				}
			}
		} elseif ( count( $revids ) === 1 ) {
			$id = intval( $revids[0] );
			if ( $id ) {
				$rev = static::getRevision( $id );
				if ( $rev ) {
					$prev = $rev->getPrevious();
				}
			}
		}
		return array( $prev, $rev );
	}

	/**
	 * Render the diff page
	 * @return boolean false when revision not exist
	 * @param string $par Revision IDs separated by three points (e.g. 123...124)
	 */
	function executeWhenAvailable( $par ) {
		$ctx = MobileContext::singleton();
		$this->setHeaders();
		$output = $this->getOutput();

		// @FIXME add full support for git-style notation (eg ...123, 123...)
		$revisions = $this->getRevisionsToCompare( explode( '...', $par ) );
		$rev = $revisions[1];
		$prev = $revisions[0];

		if ( is_null( $rev ) ) {
			$this->executeBadQuery();
			return false;
		}
		$this->revId = $rev->getId();
		$this->rev = $rev;
		$this->prevRev = $prev;
		$this->targetTitle = $this->rev->getTitle();

		$output->setPageTitle( $this->msg(
			'mobile-frontend-diffview-title',
			$this->targetTitle->getPrefixedText()
		) );

		// @todo FIXME: Don't add these styles. This is only needed for the user
		// icon to the left of the username
		$output->addModuleStyles( 'mobile.special.pagefeed.styles' );

		// Allow other extensions to load more stuff here
		Hooks::run( 'BeforeSpecialMobileDiffDisplay', array( &$output, $ctx, $revisions ) );

		$output->addHtml( '

' );

		$this->showHeader();
		$this->showDiff();
		$output->addHtml( '
' );

		$this->showFooter();

		$output->addHtml( '
' );

		return true;
	}

	/**
	 * Render the header of a diff page including:
	 * Name with url to page
	 * Bytes added/removed
	 * Day and time of edit
	 * Edit Comment
	 */
	function showHeader() {
		$title = $this->targetTitle;

		if ( $this->prevRev ) {
			$bytesChanged = $this->rev->getSize() - $this->prevRev->getSize();
		} else {
			$bytesChanged = $this->rev->getSize();
		}
		if ( $bytesChanged > 0 ) {
			$changeMsg = 'mobile-frontend-diffview-bytesadded';
			$sizeClass = MobileUI::iconClass( 'bytesadded', 'before', 'icon-12px meta mw-mf-bytesadded' );
		} elseif ( $bytesChanged === 0 ) {
			$changeMsg = 'mobile-frontend-diffview-bytesnochange';
			$sizeClass = MobileUI::iconClass( 'bytesneutral', 'before',
				'icon-12px meta mw-mf-bytesneutral' );
		} else {
			$changeMsg = 'mobile-frontend-diffview-bytesremoved';
			$sizeClass = MobileUI::iconClass( 'bytesremoved', 'before',
				'icon-12px meta mw-mf-bytesremoved' );
			$bytesChanged = abs( $bytesChanged );
		}

		$ts = new MWTimestamp( $this->rev->getTimestamp() );
		$this->getOutput()->addHtml(
			Html::openElement( 'div', array( 'id' => 'mw-mf-diff-info', 'class' => 'page-summary' ) )
				. Html::openElement( 'h2', array() )
				. Html::element( 'a',
					array(
						'href' => $title->getLocalURL(),
					),
					$title->getPrefixedText()
				)
				. Html::closeElement( 'h2' )
				. $this->msg( 'mobile-frontend-diffview-comma' )->rawParams(
					Html::element( 'span', array( 'class' => $sizeClass ),
						$this->msg( $changeMsg )->numParams( $bytesChanged )->text()
					),
					Html::element(
						'span', array( 'class' => 'mw-mf-diff-date meta' ),
						$ts->getHumanTimestamp()
					)
				)->text()
			. Html::closeElement( 'div' )
			. Html::element( 'div', array( 'id' => 'mw-mf-diff-comment' ), $this->rev->getComment() )
		);
	}

	/**
	 * Render the inline difference between two revisions
	 * using InlineDiffEngine
	 */
	function showDiff() {
		$ctx = MobileContext::singleton();

		$prevId = $this->prevRev ? $this->prevRev->getId() : 0;
		$unhide = (bool)$this->getRequest()->getVal( 'unhide' );
		$contentHandler = $this->rev->getContentHandler();
		$de = $contentHandler->createDifferenceEngine( $this->getContext(), $prevId, $this->revId );
		// HACK:
		if ( get_class( $de ) == 'DifferenceEngine' ) {
			$de = new InlineDifferenceEngine(
				$this->getContext(),
				$prevId,
				$this->revId,
				0,
				false,
				$unhide
			);
		} else {
			$de->showDiffPage();
			return;
		}
		$diff = $de->getDiffBody();
		if ( !$prevId ) {
			$audience = $unhide ? Revision::FOR_THIS_USER : Revision::FOR_PUBLIC;
			$diff = ''
				. nl2br( htmlspecialchars( $this->rev->getText( $audience ) ) )
				. '';
		}

		$warnings = $de->getWarningMessageText();
		if ( $warnings ) {
			$warnings = Html::openElement( 'div',
				array(
					'class' => 'warning alert',
				) ) .
				$warnings .
				Html::closeElement( 'div' );
		}
		$this->getOutput()->addHtml(
			$warnings .
			'
' .
			$diff .
			'
'
		);
		$prev = $this->rev->getPrevious();
		$next = $this->rev->getNext();
		if ( $prev || $next ) {
			$history = Html::openElement( 'ul', array( 'class' => 'hlist revision-history-links' ) );
			if ( $prev ) {
				$history .= Html::openElement( 'li' ) .
					Html::element( 'a', array(
						'href' => SpecialPage::getTitleFor( 'MobileDiff', $prev->getId() )->getLocalUrl()
					), $this->msg( 'previousdiff' ) ) . Html::closeElement( 'li' );
			}
			if ( $next ) {
				$history .= Html::openElement( 'li' ) .
					Html::element( 'a', array(
						'href' => SpecialPage::getTitleFor( 'MobileDiff', $next->getId() )->getLocalUrl()
					), $this->msg( 'nextdiff' ) ) . Html::closeElement( 'li' );
			}
			$history .= Html::closeElement( 'ul' );
			$this->getOutput()->addHtml( $history );
		}
	}

	/**
	 * Render the footer including userinfos (Name, Role, Editcount)
	 */
	function showFooter() {
		$output = $this->getOutput();

		$output->addHtml(
			Html::openElement( 'div', array( 'id' => 'mw-mf-userinfo',
				'class' => 'position-fixed' ) )
		);

		$userId = $this->rev->getUser();
		if ( $userId ) {
			$user = User::newFromId( $userId );
			$edits = $user->getEditCount();
			$attrs = array(
				'class' => MobileUI::iconClass( 'user', 'before', 'mw-mf-user icon-16px' ),
				'data-revision-id' => $this->revId,
				'data-user-name' => $user->getName(),
				'data-user-gender' => $user->getOption( 'gender' ),
			);
			$userLink = SpecialPage::getTitleFor( 'UserProfile', $user->getName() );
			$output->addHtml(
				Html::openElement( 'div', $attrs ) .
				Linker::link(
					$userLink,
					htmlspecialchars( $user->getName() ),
					array( 'class' => 'mw-mf-user-link' )
				) .
				'
' .
				'
' .
					$this->listGroups( $user ) .
				'
' .
				'
' .
					$this->msg(
						'mobile-frontend-diffview-editcount',
						$this->getLanguage()->formatNum( $edits )
					)->parse() .
				'
'
			);
		} else {
			$ipAddr = $this->rev->getUserText();
			$userPage = SpecialPage::getTitleFor( 'Contributions', $ipAddr );
			$output->addHtml(
				Html::element( 'div', array(
					'class' =>  MobileUI::iconClass( 'anonymous', 'before', 'mw-mf-user icon-16px mw-mf-anon' ),
				), $this->msg( 'mobile-frontend-diffview-anonymous' ) ) .
				'
' .
					Linker::link( $userPage, htmlspecialchars( $ipAddr ) ) .
				'
'
			);
		}

		$output->addHtml(
			Html::closeElement( 'div' )
		);
	}

	/**
	 * Get the list of groups of user
	 * @param User $user The user object to get the list from
	 * @return string comma separated list of user groups
	 */
	function listGroups( User $user ) {
		# Get groups to which the user belongs
		$userGroups = $user->getGroups();
		$userMembers = array();
		foreach ( $userGroups as $n => $ug ) {
			$memberName = User::getGroupMember( $ug, $user->getName() );
			if ( $n == 0 ) {
				$memberName = $this->getLanguage()->ucfirst( $memberName );
			}
			$userMembers[] = User::makeGroupLinkHTML( $ug, $memberName );
		}

		return $this->getLanguage()->commaList( $userMembers );
	}

	/**
	 * Get the url for the mobile diff special page to use in Desktop footer
	 * @return boolean|string Return URL or false when revision id's not set
	 */
	public static function getMobileUrlFromDesktop() {
		$req = MobileContext::singleton()->getRequest();
		$rev2 = $req->getText( 'diff' );
		$rev1 = $req->getText( 'oldid' );
		if ( $rev1 == 'prev' || $rev1 == 'next' ) { // Actually, both do the same, WTF
			$rev1 = '';
		}
		// redirect requests to the diff page to mobile view
		if ( !$rev2 ) {
			if ( $rev1 ) {
				$rev2 = $rev1;
				$rev1 = '';
			} else {
				return false;
			}
		}

		if ( $rev1 ) {
			$rev = static::getRevision( $rev1 );
			if ( $rev ) {
				// the diff parameter could be the string prev or next - deal with these cases
				if ( $rev2 === 'prev' ) {
					$prev = $rev->getPrevious();
					// yes this is confusing - this is how it works arrgghh
					$rev2 = $rev1;
					$rev1 = $prev ? $prev->getId() : '';
				} elseif ( $rev2 === 'next' ) {
					$next = $rev->getNext();
					$rev2 = $next ? $next->getId() : '';
				} else {
					$rev2 = static::getRevision( $rev2 );
					$rev2 = $rev2 ? $rev2->getId() : '';
				}
			} else {
				$rev2 = '';
			}
		}

		if ( $rev2 ) {
			$subpage = $rev1 ? $rev1 . '...' . $rev2 : $rev2;
			$title = SpecialPage::getTitleFor( 'MobileDiff', $subpage );
			return $title->getLocalURL();
		}
		return false;
	}

	/**
	 * Get the URL for Desktop version of difference view
	 * @param string $subPage URL of mobile diff page
	 * @return string Url to mobile diff page
	 */
	public function getDesktopUrl( $subPage ) {
		$parts = explode( '...', $subPage );
		if ( count( $parts ) > 1 ) {
			$params = array( 'diff' => $parts[1], 'oldid' => $parts[0] );
		} else {
			$params = array( 'diff' => $parts[0] );
		}
		if ( $this->getRequest()->getVal( 'unhide' ) ) {
			$params['unhide'] = 1;
		}
		return wfAppendQuery( wfScript(), $params );
	}
}


text:
package login;

import java.time.LocalDate;
import java.time.LocalTime;

//check this exception - are inputs okay?
//should inputs be variables?

//mostly complete as of 4/20/17
public class InvalidUsernameOrPasswordException extends RuntimeException{

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private String invalidField;
	private LocalTime timeThrown;

	public InvalidUsernameOrPasswordException(String invalidField) {
		this.invalidField = invalidField;
		this.timeThrown = LocalTime.now();
	}

	public String getErrorMessage() {
		String message;

		if (invalidField.equals("invalid")){
			message = "Invalid credentials. Please try again.";
		}
		else if (invalidField.equals("username")) {
			message = "The inputted username does not match any in our system.";
		}
		else if (invalidField.equals("password")) {
			message = "Incorrect password entered.";
		}
		else {
			message = "One or more login fields are empty.";
		}

		return message;// + " " + LocalDate.now() + " " + LocalTime.now(); // adds timestamp when error  occured, remove if needed
	}

}

redpajama_set_name: RedPajamaGithub


text:
import os.path
import subprocess
import shutil

from gii.core import *

from tools.ml2fsm import convertGraphMLToFSM

##----------------------------------------------------------------##
def _getModulePath( path ):
	import os.path
	return os.path.dirname( __file__ ) + '/' + path

##----------------------------------------------------------------##
class FSMSchemeAssetManager(AssetManager):
	def getName(self):
		return 'asset_manager.fsm_scheme'

	def acceptAssetFile( self, filePath ):
		if not os.path.isfile(filePath): return False
		if not filePath.endswith( '.fsm.graphml' ): return False
		return True

	def importAsset( self, node, reload = False ):
		node.setObjectFile( 'def', node.getCacheFile( 'def' ) )
		convertGraphMLToFSM(
			node.getAbsFilePath(), #input file
			node.getAbsObjectFile( 'def' ) #output file
		)
		node.assetType = 'fsm_scheme'
		return True

# ##----------------------------------------------------------------##
# class FSMSchemeCreator(AssetCreator):
# 	def getAssetType( self ):
# 		return 'fsm_scheme'

# 	def getLabel( self ):
# 		return 'FSMScheme'

# 	def createAsset( self, name, contextNode, assetType ):
# 		ext = '.fsm_scheme'
# 		filename = name + ext
# 		if contextNode.isType('folder'):
# 			nodepath = contextNode.getChildPath( filename )
# 		else:
# 			nodepath = contextNode.getSiblingPath( filename )

# 		fullpath = AssetLibrary.get().getAbsPath( nodepath )
# 		data={
# 			'_assetType' : 'fsm_scheme', #checksum
# 			'map'     :{},
# 			'entities':[]
# 		}
# 		if os.path.exists(fullpath):
# 			raise Exception('File already exist:%s'%fullpath)
# 		fp = open(fullpath,'w')
# 		json.dump( data, fp, sort_keys=True, indent=2 )
# 		fp.close()
# 		return nodepath

# ##----------------------------------------------------------------##
# FSMSchemeCreator().register()

FSMSchemeAssetManager().register()
AssetLibrary.get().setAssetIcon( 'fsm_scheme',    'scheme' )


text:
import {IStateProvider} from "./TinyDecorations";

declare module "Routing" {
    export interface IRouteView {
        name: string;
        controller: any;
        security?: Array<string>;
        url?: any;
    }
    export interface IRoutableStateProvider extends IStateProvider {
        route($stateProvider: IStateProvider, controller: any, name: string, url: string, security?: Array<string>, views?: Array<IRouteView>): IRoutableStateProvider;
    }
    /**
     * helper to reduce the ui route code
     * @param $stateProvider
     * @param controller
     * @param name
     * @param url
     * @param security
     */
    export  function route($stateProvider: IStateProvider, controller: any, name: string, url: string, security?: Array<string>, routes?: Array<IRouteView>): IRoutableStateProvider;
    export  function uiRoute($routeProvider: any, controller: any, route: string): void;
}


text:
using Mosa.Compiler.Common;

using Mosa.Compiler.MosaTypeSystem;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace Mosa.Compiler.Framework
{
	/// <summary>
	/// Operand class
	/// </summary>
	public sealed class Operand
	{
		#region Properties

		/// <summary>
		/// Holds a list of instructions, which define this operand.
		/// </summary>
		public List<InstructionNode> Definitions { get; private set; }

		/// <summary>
		/// Holds a list of instructions, which use this operand.
		/// </summary>
		public List<InstructionNode> Uses { get; private set; }

		/// <summary>
		/// Returns the type of the operand.
		/// </summary>
		public MosaType Type { get; private set; }

		/// <summary>
		/// Retrieves the register, where the operand is located.
		/// </summary>
		public Register Register { get; private set; }

		/// <summary>
		/// Retrieves the offset base.
		/// </summary>
		public Operand OffsetBase { get; private set; }

		/// <summary>
		/// Gets the effective base.
		/// </summary>
		/// <value>
		/// The effective base.
		/// </value>
		public Register EffectiveOffsetBase { get { return OffsetBase != null ? OffsetBase.Register : Register; } }

		/// <summary>
		/// Gets the base operand.
		/// </summary>
		public Operand SSAParent { get; private set; }

		/// <summary>
		/// Holds the address offset if used together with a base register or the absolute address, if register is null.
		/// </summary>
		/// <value>
		/// The offset.
		/// </value>
		public long Displacement { get; set; }

		/// <summary>
		/// Retrieves the method.
		/// </summary>
		public MosaMethod Method { get; private set; }

		/// <summary>
		/// Retrieves the field.
		/// </summary>
		public MosaField Field { get; private set; }

		/// <summary>
		/// Gets the ssa version.
		/// </summary>
		public int SSAVersion { get; private set; }

		/// <summary>
		/// Gets or sets the low operand.
		/// </summary>
		/// <value>
		/// The low operand.
		/// </value>
		public Operand Low { get; private set; }

		/// <summary>
		/// Gets or sets the high operand.
		/// </summary>
		/// <value>
		/// The high operand.
		/// </value>
		public Operand High { get; private set; }

		/// <summary>
		/// Gets the split64 parent.
		/// </summary>
		/// <value>
		/// The split64 parent.
		/// </value>
		public Operand SplitParent { get; private set; }

		/// <summary>
		/// Determines if the operand is a constant variable.
		/// </summary>
		public bool IsConstant { get; private set; }

		/// <summary>
		/// Determines if the operand is a symbol operand.
		/// </summary>
		public bool IsSymbol { get; private set; }

		/// <summary>
		/// Determines if the operand is a label operand.
		/// </summary>
		public bool IsLabel { get; private set; }

		/// <summary>
		/// Determines if the operand is a register.
		/// </summary>
		public bool IsRegister { get { return IsVirtualRegister || IsCPURegister; } }

		/// <summary>
		/// Determines if the operand is a virtual register operand.
		/// </summary>
		public bool IsVirtualRegister { get; private set; }

		/// <summary>
		/// Determines if the operand is a cpu register operand.
		/// </summary>
		public bool IsCPURegister { get; private set; }

		/// <summary>
		/// Determines if the operand is a memory operand.
		/// </summary>
		public bool IsMemoryAddress { get; private set; }

		/// <summary>
		/// Determines if the operand is a stack local operand.
		/// </summary>
		public bool IsStackLocal { get; private set; }

		/// <summary>
		/// Determines if the operand is a runtime member operand.
		/// </summary>
		public bool IsField { get; private set; }

		/// <summary>
		/// Determines if the operand is a local variable operand.
		/// </summary>
		public bool IsParameter { get; private set; }

		/// <summary>
		/// Determines if the operand is a ssa operand.
		/// </summary>
		public bool IsSSA { get; private set; }

		/// <summary>
		/// Gets a value indicating whether this instance is split64 child.
		/// </summary>
		/// <value>
		/// <c>true</c> if this instance is split64 child; otherwise, <c>false</c>.
		/// </value>
		public bool IsSplitChild { get { return SplitParent != null && !IsSSA; } }

		/// <summary>
		/// Determines if the operand is a shift operand.
		/// </summary>
		public bool IsShift { get; private set; }

		/// <summary>
		/// Gets the name.
		/// </summary>
		/// <value>The name.</value>
		public string Name { get; private set; }

		/// <summary>
		/// Gets the index.
		/// </summary>
		public int Index { get; private set; }

		/// <summary>
		/// Gets the constant long integer.
		/// </summary>
		/// <value>
		/// The constant long integer.
		/// </value>
		public ulong ConstantUnsignedLongInteger { get; private set; }

		/// <summary>
		/// Gets the constant integer.
		/// </summary>
		/// <value>
		/// The constant integer.
		/// </value>
		public uint ConstantUnsignedInteger { get { return (uint)ConstantUnsignedLongInteger; } set { ConstantUnsignedLongInteger = value; } }

		/// <summary>
		/// Gets the constant double float point.
		/// </summary>
		/// <value>
		/// The constant double float point.
		/// </value>
		public double ConstantDoubleFloatingPoint { get; private set; }

		/// <summary>
		/// Gets the single double float point.
		/// </summary>
		/// <value>
		/// The single double float point.
		/// </value>
		public float ConstantSingleFloatingPoint { get; private set; }

		/// <summary>
		/// Gets or sets the constant signed long integer.
		/// </summary>
		/// <value>
		/// The constant signed long integer.
		/// </value>
		public long ConstantSignedLongInteger { get { return (long)ConstantUnsignedLongInteger; } set { ConstantUnsignedLongInteger = (ulong)value; } }

		/// <summary>
		/// Gets or sets the constant signed integer.
		/// </summary>
		/// <value>
		/// The constant signed integer.
		/// </value>
		public int ConstantSignedInteger { get { return (int)ConstantUnsignedLongInteger; } set { ConstantUnsignedLongInteger = (ulong)value; } }

		/// <summary>
		/// Gets the string data.
		/// </summary>
		/// <value>
		/// The string data.
		/// </value>
		public string StringData { get; private set; }

		/// <summary>
		/// Gets a value indicating whether [is null].
		/// </summary>
		/// <value>
		///   <c>true</c> if [is null]; otherwise, <c>false</c>.
		/// </value>
		public bool IsNull { get; private set; }

		/// <summary>
		/// Gets a value indicating whether [is 64 bit integer].
		/// </summary>
		/// <value>
		///   <c>true</c> if [is signed integer]; otherwise, <c>false</c>.
		/// </value>
		public bool Is64BitInteger { get { return IsLong; } }

		/// <summary>
		/// Gets the type of the shift.
		/// </summary>
		/// <value>
		/// The type of the shift.
		/// </value>
		public ShiftType ShiftType { get; private set; }

		/// <summary>
		/// Gets a value indicating whether [is constant zero].
		/// </summary>
		/// <value>
		///   <c>true</c> if [is constant zero]; otherwise, <c>false</c>.
		/// </value>
		public bool IsConstantZero
		{
			get
			{
				if (!IsConstant)
					return false;
				else if (IsInteger || IsBoolean || IsChar || IsPointer)
					return ConstantUnsignedLongInteger == 0;
				else if (IsR8)
					return ConstantDoubleFloatingPoint == 0;
				else if (IsR4)
					return ConstantSingleFloatingPoint == 0;
				else if (IsNull)
					return true;
				throw new InvalidCompilerException();
			}
		}

		/// <summary>
		/// Gets a value indicating whether [is constant one].
		/// </summary>
		/// <value>
		///   <c>true</c> if [is constant one]; otherwise, <c>false</c>.
		/// </value>
		/// <exception cref="InvalidCompilerException"></exception>
		public bool IsConstantOne
		{
			get
			{
				if (!IsConstant)
					return false;
				else if (IsInteger || IsBoolean || IsChar || IsPointer)
					return ConstantUnsignedLongInteger == 1;
				else if (IsR8)
					return ConstantDoubleFloatingPoint == 1;
				else if (IsR4)
					return ConstantSingleFloatingPoint == 1;
				else if (IsNull)
					return false;
				throw new InvalidCompilerException();
			}
		}

		public bool IsR { get { return underlyingType.IsR; } }

		public bool IsR8 { get { return underlyingType.IsR8; } }

		public bool IsR4 { get { return underlyingType.IsR4; } }

		public bool IsInteger { get { return underlyingType.IsInteger; } }

		public bool IsSigned { get { return underlyingType.IsSigned; } }

		public bool IsUnsigned { get { return underlyingType.IsUnsigned; } }

		public bool IsU1 { get { return underlyingType.IsU1; } }

		public bool IsI1 { get { return underlyingType.IsI1; } }

		public bool IsU2 { get { return underlyingType.IsU2; } }

		public bool IsI2 { get { return underlyingType.IsI2; } }

		public bool IsU4 { get { return underlyingType.IsU4; } }

		public bool IsI4 { get { return underlyingType.IsI4; } }

		public bool IsU8 { get { return underlyingType.IsU8; } }

		public bool IsI8 { get { return underlyingType.IsI8; } }

		public bool IsByte { get { return underlyingType.IsUI1; } }

		public bool IsShort { get { return underlyingType.IsUI2; } }

		public bool IsChar { get { return underlyingType.IsChar; } }

		public bool IsInt { get { return underlyingType.IsUI4; } }

		public bool IsLong { get { return underlyingType.IsUI8; } }

		public bool IsBoolean { get { return Type.IsBoolean; } }

		public bool IsPointer { get { return Type.IsPointer; } }

		public bool IsManagedPointer { get { return Type.IsManagedPointer; } }

		public bool IsUnmanagedPointer { get { return Type.IsUnmanagedPointer; } }

		public bool IsFunctionPointer { get { return Type.IsFunctionPointer; } }

		public bool IsValueType { get { return underlyingType.IsValueType; } }

		public bool IsArray { get { return Type.IsArray; } }

		public bool IsI { get { return underlyingType.IsI; } }

		public bool IsU { get { return underlyingType.IsU; } }

		public bool IsReferenceType { get { return Type.IsReferenceType; } }

		private MosaType underlyingType { get { return Type.GetEnumUnderlyingType(); } }

		public bool IsPinned { get; private set; }

		#endregion Properties

		#region Construction

		private Operand()
		{
			Definitions = new List<InstructionNode>();
			Uses = new List<InstructionNode>();
			IsParameter = false;
			IsStackLocal = false;
			IsShift = false;
			IsConstant = false;
			IsVirtualRegister = false;
			IsLabel = false;
			IsCPURegister = false;
			IsMemoryAddress = false;
			IsSSA = false;
			IsSymbol = false;
			IsField = false;
			IsParameter = false;
		}

		/// <summary>
		/// Initializes a new instance of <see cref="Operand"/>.
		/// </summary>
		/// <param name="type">The type of the operand.</param>
		private Operand(MosaType type)
			: this()
		{
			Debug.Assert(type != null);
			Type = type;
		}

		/// <summary>
		/// Prevents a default instance of the <see cref="Operand"/> class from being created.
		/// </summary>
		/// <param name="shiftType">Type of the shift.</param>
		private Operand(ShiftType shiftType)
			: this()
		{
			ShiftType = shiftType;
			IsShift = true;
		}

		#endregion Construction

		#region Static Factory Constructors

		/// <summary>
		/// Creates a new constant <see cref="Operand" /> for the given integral value.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="value">The value to create the constant operand for.</param>
		/// <returns>
		/// A new operand representing the value <paramref name="value" />.
		/// </returns>
		/// <exception cref="InvalidCompilerException"></exception>
		public static Operand CreateConstant(MosaType type, ulong value)
		{
			var operand = new Operand(type);
			operand.IsConstant = true;
			operand.ConstantUnsignedLongInteger = value;
			operand.IsNull = (type.IsReferenceType && value == 0);

			if (type.IsReferenceType && value != 0)
			{
				throw new InvalidCompilerException();
			}

			if (!(operand.IsInteger || operand.IsBoolean || operand.IsChar || operand.IsPointer || operand.IsReferenceType))
			{
				throw new InvalidCompilerException();
			}

			return operand;
		}

		/// <summary>
		/// Creates a new constant <see cref="Operand" /> for the given integral value.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="value">The value to create the constant operand for.</param>
		/// <returns>
		/// A new operand representing the value <paramref name="value" />.
		/// </returns>
		public static Operand CreateConstant(MosaType type, long value)
		{
			return CreateConstant(type, (ulong)value);
		}

		/// <summary>
		/// Creates a new constant <see cref="Operand" /> for the given integral value.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="value">The value to create the constant operand for.</param>
		/// <returns>
		/// A new operand representing the value <paramref name="value" />.
		/// </returns>
		public static Operand CreateConstant(MosaType type, int value)
		{
			return CreateConstant(type, (long)value);
		}

		/// <summary>
		/// Creates a new constant <see cref="Operand" /> for the given integral value.
		/// </summary>
		/// <param name="typeSystem">The type system.</param>
		/// <param name="value">The value to create the constant operand for.</param>
		/// <returns>
		/// A new operand representing the value <paramref name="value" />.
		/// </returns>
		public static Operand CreateConstant(TypeSystem typeSystem, int value)
		{
			var operand = new Operand(typeSystem.BuiltIn.I4);
			operand.IsConstant = true;
			operand.ConstantSignedLongInteger = value;
			return operand;
		}

		/// <summary>
		/// Creates a new constant <see cref="Operand" /> for the given integral value.
		/// </summary>
		/// <param name="typeSystem">The type system.</param>
		/// <param name="value">The value to create the constant operand for.</param>
		/// <returns>
		/// A new operand representing the value <paramref name="value" />.
		/// </returns>
		public static Operand CreateConstant(TypeSystem typeSystem, long value)
		{
			var operand = new Operand(typeSystem.BuiltIn.I8);
			operand.IsConstant = true;
			operand.ConstantSignedLongInteger = value;
			return operand;
		}

		/// <summary>
		/// Creates a new constant <see cref="Operand"/> for the given integral value.
		/// </summary>
		/// <param name="typeSystem">The type system.</param>
		/// <param name="value">The value to create the constant operand for.</param>
		/// <returns>
		/// A new operand representing the value <paramref name="value"/>.
		/// </returns>
		public static Operand CreateConstant(TypeSystem typeSystem, float value)
		{
			var operand = new Operand(typeSystem.BuiltIn.R4);
			operand.IsConstant = true;
			operand.ConstantSingleFloatingPoint = value;
			return operand;
		}

		/// <summary>
		/// Creates a new constant <see cref="Operand"/> for the given integral value.
		/// </summary>
		/// <param name="typeSystem">The type system.</param>
		/// <param name="value">The value to create the constant operand for.</param>
		/// <returns>
		/// A new operand representing the value <paramref name="value"/>.
		/// </returns>
		public static Operand CreateConstant(TypeSystem typeSystem, double value)
		{
			var operand = new Operand(typeSystem.BuiltIn.R8);
			operand.IsConstant = true;
			operand.ConstantDoubleFloatingPoint = value;
			return operand;
		}

		/// <summary>
		/// Gets the null constant <see cref="Operand"/>.
		/// </summary>
		/// <returns></returns>
		public static Operand GetNull(TypeSystem typeSystem)
		{
			var operand = new Operand(typeSystem.BuiltIn.Object);
			operand.IsNull = true;
			operand.IsConstant = true;
			return operand;
		}

		/// <summary>
		/// Creates the symbol.
		/// </summary>
		/// <param name="typeSystem">The type system.</param>
		/// <param name="name">The name.</param>
		/// <returns></returns>
		public static Operand CreateUnmanagedSymbolPointer(TypeSystem typeSystem, string name)
		{
			var operand = new Operand(typeSystem.BuiltIn.Pointer);
			operand.IsSymbol = true;
			operand.Name = name;
			return operand;
		}

		/// <summary>
		/// Creates the symbol.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="name">The name.</param>
		/// <returns></returns>
		private static Operand CreateManagedSymbolPointer(MosaType type, string name)
		{
			// NOTE: Not being used
			var operand = new Operand(type.ToManagedPointer());
			operand.IsSymbol = true;
			operand.Name = name;
			return operand;
		}

		/// <summary>
		/// Creates the symbol.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="name">The name.</param>
		/// <returns></returns>
		public static Operand CreateManagedSymbol(MosaType type, string name)
		{
			var operand = new Operand(type);
			operand.IsSymbol = true;
			operand.Name = name;
			return operand;
		}

		/// <summary>
		/// Creates the string symbol with data.
		/// </summary>
		/// <param name="typeSystem">The type system.</param>
		/// <param name="name">The name.</param>
		/// <param name="data">The string data.</param>
		/// <returns></returns>
		public static Operand CreateStringSymbol(TypeSystem typeSystem, string name, string data)
		{
			Debug.Assert(data != null);

			var operand = new Operand(typeSystem.BuiltIn.String);
			operand.IsSymbol = true;
			operand.Name = name;
			operand.StringData = data;
			return operand;
		}

		/// <summary>
		/// Creates a new symbol <see cref="Operand" /> for the given symbol name.
		/// </summary>
		/// <param name="typeSystem">The type system.</param>
		/// <param name="method">The method.</param>
		/// <returns></returns>
		public static Operand CreateSymbolFromMethod(TypeSystem typeSystem, MosaMethod method)
		{
			var operand = CreateUnmanagedSymbolPointer(typeSystem, method.FullName);
			operand.Method = method;
			return operand;
		}

		/// <summary>
		/// Creates a new virtual register <see cref="Operand" />.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="index">The index.</param>
		/// <returns></returns>
		public static Operand CreateVirtualRegister(MosaType type, int index)
		{
			var operand = new Operand(type);
			operand.IsVirtualRegister = true;
			operand.Index = index;
			return operand;
		}

		/// <summary>
		/// Creates a new virtual register <see cref="Operand" />.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="index">The index.</param>
		/// <param name="name">The name.</param>
		/// <returns></returns>
		public static Operand CreateVirtualRegister(MosaType type, int index, string name)
		{
			var operand = new Operand(type);
			operand.IsVirtualRegister = true;
			operand.Name = name;
			operand.Index = index;
			return operand;
		}

		/// <summary>
		/// Creates a new physical register <see cref="Operand" />.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="register">The register.</param>
		/// <returns></returns>
		public static Operand CreateCPURegister(MosaType type, Register register)
		{
			var operand = new Operand(type);
			operand.IsCPURegister = true;
			operand.Register = register;
			return operand;
		}

		/// <summary>
		/// Creates a new memory address <see cref="Operand" />.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="offsetBase">The base register.</param>
		/// <param name="offset">The offset.</param>
		/// <returns></returns>
		public static Operand CreateMemoryAddress(MosaType type, Operand offsetBase, long offset)
		{
			var operand = new Operand(type);
			operand.IsMemoryAddress = true;
			operand.OffsetBase = offsetBase;
			operand.Displacement = offset;
			return operand;
		}

		/// <summary>
		/// Creates a new symbol <see cref="Operand" /> for the given symbol name.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="label">The label.</param>
		/// <returns></returns>
		public static Operand CreateLabel(MosaType type, string label)
		{
			var operand = new Operand(type);
			operand.IsMemoryAddress = true;
			operand.IsLabel = true;
			operand.Name = label;
			operand.Displacement = 0;
			return operand;
		}

		/// <summary>
		/// Creates a new runtime member <see cref="Operand"/>.
		/// </summary>
		/// <param name="field">The field.</param>
		/// <returns></returns>
		public static Operand CreateField(MosaField field)
		{
			var operand = new Operand(field.FieldType);
			operand.IsMemoryAddress = true;
			operand.IsField = true;
			operand.Displacement = 0;
			operand.Field = field;
			return operand;
		}

		/// <summary>
		/// Creates a new local variable <see cref="Operand" />.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="register">The register.</param>
		/// <param name="displacement">The displacement.</param>
		/// <param name="index">The index.</param>
		/// <returns></returns>
		public static Operand CreateParameter(MosaType type, Register register, int displacement, int index, string name)
		{
			var operand = new Operand(type);
			operand.IsMemoryAddress = true;
			operand.IsParameter = true;
			operand.Register = register;
			operand.Index = index;
			operand.Displacement = displacement;
			operand.Name = name;
			return operand;
		}

		/// <summary>
		/// Creates the stack local.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="register">The register.</param>
		/// <param name="index">The index.</param>
		/// <param name="pinned">if set to <c>true</c> [pinned].</param>
		/// <returns></returns>
		public static Operand CreateStackLocal(MosaType type, Register register, int index, bool pinned)
		{
			var operand = new Operand(type);
			operand.IsMemoryAddress = true;
			operand.Register = register;
			operand.Index = index;
			operand.IsStackLocal = true;
			operand.IsPinned = pinned;
			return operand;
		}

		/// <summary>
		/// Creates the stack local.
		/// </summary>
		/// <param name="type">The type.</param>
		/// <param name="index">The index.</param>
		/// <param name="pinned">if set to <c>true</c> [pinned].</param>
		/// <returns></returns>
		public static Operand CreateStackLocal(MosaType type, int index, bool pinned)
		{
			var operand = new Operand(type);
			operand.Index = index;
			operand.IsStackLocal = true;
			operand.IsPinned = pinned;
			return operand;
		}

		/// <summary>
		/// Creates the SSA <see cref="Operand"/>.
		/// </summary>
		/// <param name="ssaOperand">The ssa operand.</param>
		/// <param name="ssaVersion">The ssa version.</param>
		/// <returns></returns>
		public static Operand CreateSSA(Operand ssaOperand, int ssaVersion)
		{
			var operand = new Operand(ssaOperand.Type);
			operand.IsParameter = ssaOperand.IsParameter;
			operand.IsStackLocal = ssaOperand.IsStackLocal;
			operand.IsShift = ssaOperand.IsShift;
			operand.IsConstant = ssaOperand.IsConstant;
			operand.IsVirtualRegister = ssaOperand.IsVirtualRegister;
			operand.IsLabel = ssaOperand.IsLabel;
			operand.IsCPURegister = ssaOperand.IsCPURegister;
			operand.IsMemoryAddress = ssaOperand.IsMemoryAddress;
			operand.IsSymbol = ssaOperand.IsSymbol;
			operand.IsField = ssaOperand.IsField;
			operand.IsParameter = ssaOperand.IsParameter;
			operand.IsSSA = true;
			operand.SSAParent = ssaOperand;
			operand.SSAVersion = ssaVersion;
			return operand;
		}

		/// <summary>
		/// Creates the low 32 bit portion of a 64-bit <see cref="Operand"/>.
		/// </summary>
		/// <param name="longOperand">The long operand.</param>
		/// <param name="offset">The offset.</param>
		/// <param name="index">The index.</param>
		/// <returns></returns>
		public static Operand CreateLowSplitForLong(TypeSystem typeSystem, Operand longOperand, int offset, int index)
		{
			Debug.Assert(longOperand.IsLong);

			Debug.Assert(longOperand.SplitParent == null);
			Debug.Assert(longOperand.Low == null);

			Operand operand;

			if (longOperand.IsConstant)
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsConstant = true;
				operand.ConstantUnsignedLongInteger = longOperand.ConstantUnsignedLongInteger & uint.MaxValue;
			}
			else if (longOperand.IsField)
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsMemoryAddress = true;
				operand.IsField = true;
				operand.Field = longOperand.Field;
				operand.Type = longOperand.Type;
				operand.OffsetBase = longOperand.OffsetBase;
				operand.Displacement = longOperand.Displacement + offset;
				operand.Register = longOperand.Register;
			}
			else if (longOperand.IsMemoryAddress)
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsMemoryAddress = true;
				operand.OffsetBase = longOperand.OffsetBase;
				operand.Displacement = longOperand.Displacement + offset;
				operand.Register = longOperand.Register;
			}
			else
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsVirtualRegister = true;
			}

			operand.SplitParent = longOperand;

			Debug.Assert(longOperand.Low == null);
			longOperand.Low = operand;

			operand.Index = index;

			//operand.sequence = index;
			return operand;
		}

		/// <summary>
		/// Creates the high 32 bit portion of a 64-bit <see cref="Operand"/>.
		/// </summary>
		/// <param name="longOperand">The long operand.</param>
		/// <param name="offset">The offset.</param>
		/// <param name="index">The index.</param>
		/// <returns></returns>
		public static Operand CreateHighSplitForLong(TypeSystem typeSystem, Operand longOperand, int offset, int index)
		{
			Debug.Assert(longOperand.IsLong);

			Debug.Assert(longOperand.SplitParent == null);
			Debug.Assert(longOperand.High == null);

			Operand operand;

			if (longOperand.IsConstant)
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsConstant = true;
				operand.ConstantUnsignedLongInteger = ((uint)(longOperand.ConstantUnsignedLongInteger >> 32)) & uint.MaxValue;
			}
			else if (longOperand.IsField)
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsMemoryAddress = true;
				operand.IsField = true;
				operand.Field = longOperand.Field;
				operand.Type = longOperand.Type;
				operand.OffsetBase = longOperand.OffsetBase;
				operand.Displacement = longOperand.Displacement + offset;
				operand.Register = longOperand.Register;
			}
			else if (longOperand.IsMemoryAddress)
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsMemoryAddress = true;
				operand.OffsetBase = longOperand.OffsetBase;
				operand.Displacement = longOperand.Displacement + offset;
				operand.Register = longOperand.Register;
			}
			else
			{
				operand = new Operand(typeSystem.BuiltIn.U4);
				operand.IsVirtualRegister = true;
			}

			operand.SplitParent = longOperand;

			//operand.SplitParent = longOperand;

			Debug.Assert(longOperand.High == null);
			longOperand.High = operand;

			operand.Index = index;
			return operand;
		}

		/// <summary>
		/// Creates the shifter.
		/// </summary>
		/// <param name="shiftType">Type of the shift.</param>
		/// <returns></returns>
		public static Operand CreateShifter(ShiftType shiftType)
		{
			var operand = new Operand(shiftType);
			return operand;
		}

		#endregion Static Factory Constructors

		/// <summary>
		/// Returns a string representation of <see cref="Operand"/>.
		/// </summary>
		/// <returns>A string representation of the operand.</returns>
		public string ToString(bool full)
		{
			if (IsSSA)
			{
				string ssa = SSAParent.ToString(full);
				int pos = ssa.IndexOf(' ');

				if (pos < 0)
					return ssa + "<" + SSAVersion + ">";
				else
					return ssa.Substring(0, pos) + "<" + SSAVersion + ">" + ssa.Substring(pos);
			}

			var sb = new StringBuilder();

			if (IsVirtualRegister)
			{
				sb.AppendFormat("V_{0}", Index);
			}
			else if (IsStackLocal && Name == null)
			{
				sb.AppendFormat("T_{0}", Index);
			}
			else if (IsParameter && Name == null)
			{
				sb.AppendFormat("P_{0}", Index);
			}

			if (Name != null)
			{
				sb.Append(Name);
				sb.Append(' ');
			}

			if (IsField)
			{
				sb.Append(' ');
				sb.Append(Field.FullName);
			}

			if (IsSplitChild)
			{
				sb.Append(' ');

				sb.Append("(" + SplitParent.ToString(full) + ")");

				if (SplitParent.High == this)
					sb.Append("/high");
				else
					sb.Append("/low");
			}

			if (IsConstant)
			{
				sb.Append(" const {");

				if (IsNull)
					sb.Append("null");
				else if (IsUnsigned || IsBoolean || IsChar || IsPointer)
					if (IsU8)
						sb.AppendFormat("{0}", ConstantUnsignedLongInteger);
					else
						sb.AppendFormat("{0}", ConstantUnsignedInteger);
				else if (IsSigned)
					if (IsI8)
						sb.AppendFormat("{0}", ConstantSignedLongInteger);
					else
						sb.AppendFormat("{0}", ConstantSignedInteger);
				if (IsR8)
					sb.AppendFormat("{0}", ConstantDoubleFloatingPoint);
				else if (IsR4)
					sb.AppendFormat("{0}", ConstantSingleFloatingPoint);

				sb.Append('}');
			}

			if (IsCPURegister)
			{
				sb.AppendFormat(" {0}", Register);
			}
			else if (IsMemoryAddress)
			{
				sb.Append(' ');
				if (OffsetBase != null)
				{
					if (Displacement > 0)
						sb.AppendFormat("[{0}+{1:X}h]", OffsetBase.ToString(full), Displacement);
					else
						sb.AppendFormat("[{0}-{1:X}h]", OffsetBase.ToString(full), -Displacement);
				}
				else if (Register != null)
				{
					if (Displacement > 0)
						sb.AppendFormat("[{0}+{1:X}h]", Register.ToString(), Displacement);
					else
						sb.AppendFormat("[{0}-{1:X}h]", Register.ToString(), -Displacement);
				}
				else if (IsField && IsSplitChild)
				{
					if (Displacement > 0)
						sb.AppendFormat("+{0:X}h", Displacement);
					else
						sb.AppendFormat("-{0:X}h", -Displacement);
				}
			}

			if (full)
			{
				sb.AppendFormat(" [{0}]", Type.FullName);
			}
			else
			{
				if (Type.IsReferenceType)
				{
					sb.AppendFormat(" [O]");
				}
				{
					sb.AppendFormat(" [{0}]", ShortenTypeName(Type.FullName));
				}
			}

			return sb.ToString().Replace("  ", " ").Trim();
		}

		private static string ShortenTypeName(string value)
		{
			if (value.Length < 2)
				return value;

			string type = value;
			string end = string.Empty;

			if (value.EndsWith("*"))
			{
				type = value.Substring(0, value.Length - 1);
				end = "*";
			}
			if (value.EndsWith("&"))
			{
				type = value.Substring(0, value.Length - 1);
				end = "&";
			}
			if (value.EndsWith("[]"))
			{
				type = value.Substring(0, value.Length - 2);
				end = "[]";
			}

			return ShortenTypeName2(type) + end;
		}

		private static string ShortenTypeName2(string value)
		{
			switch (value)
			{
				case "System.Object": return "O";
				case "System.Char": return "C";
				case "System.Void": return "V";
				case "System.String": return "String";
				case "System.Byte": return "U1";
				case "System.SByte": return "I1";
				case "System.Boolean": return "B";
				case "System.Int8": return "I1";
				case "System.UInt8": return "U1";
				case "System.Int16": return "I2";
				case "System.UInt16": return "U2";
				case "System.Int32": return "I4";
				case "System.UInt32": return "U4";
				case "System.Int64": return "I8";
				case "System.UInt64": return "U8";
				case "System.Single": return "R4";
				case "System.Double": return "R8";
			}

			return value;
		}

		internal void RenameIndex(int index)
		{
			Index = index;
		}

		#region Object Overrides

		public override string ToString()
		{
			return ToString(false);
		}

		#endregion Object Overrides
	}
}


text:
cask 'qgis' do
  version '2.18.2-1'
  sha256 '6bb3084e80fdb44ca6695093c9713a30423bd091af3a64ac5086a565703e350b'

  url "http://www.kyngchaos.com/files/software/qgis/QGIS-#{version}.dmg"
  name 'QGIS'
  homepage 'http://www.kyngchaos.com/software/qgis'

  depends_on cask: 'gdal-framework'
  depends_on formula: 'homebrew/python/matplotlib'

  pkg '4 Install QGIS.pkg'

  uninstall pkgutil: 'org.qgis.qgis-*'

  caveats <<-EOS.undent
    #{token} requires matplotlib in a specific location. Please run the following to finish install:

      sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /Library/Python/2.7/site-packages/matplotlib-override
  EOS
end


text:
"""
Configuration setup for Barbican Client.
"""

import os
import sys

from barbicanclient.version import __version__
from oslo_config import cfg

CONF = cfg.CONF

def parse_args(args=None, usage=None, default_config_files=None):
    CONF(args=args,
         project='barbicanclient',
         prog='barbicanclient',
         version=__version__,
         usage=usage,
         default_config_files=default_config_files)


text:
.PHONY: test

install: target

target:
	./build.sh

test: target
	lein midje


text:
package net.krinsoft.jobsuite.commands;

import net.krinsoft.jobsuite.Job;
import net.krinsoft.jobsuite.JobCore;
import net.krinsoft.jobsuite.JobItem;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.permissions.PermissionDefault;

import java.util.List;

/**
 * @author krinsdeath
 */
public class JobRemoveEnchantmentCommand extends JobCommand {

    public JobRemoveEnchantmentCommand(JobCore instance) {
        super(instance);
        setName("JobSuite: Remove Enchantment");
        setCommandUsage("/job remenchant [item id] [enchantment]");
        setArgRange(2, 2);
        addKey("jobsuite remenchant");
        addKey("job remenchant");
        addKey("js remenchant");
        addKey("jobsuite re");
        addKey("job re");
        addKey("js re");
        setPermission("jobsuite.remenchant", "Removes an enchantment from a job item.", PermissionDefault.TRUE);
    }

    @Override
    public void runCommand(CommandSender sender, List<String> args) {
        Job job = manager.getQueuedJob(sender.getName());
        if (job != null) {
            JobItem jItem;
            Enchantment ench;
            try {
                jItem = job.getItem(Integer.parseInt(args.get(0)));
                if (jItem == null) {
                    error(sender, "Couldn't find an item at that index.");
                    return;
                }
            } catch (NumberFormatException e) {
                error(sender, "Error parsing argument: expected number");
                return;
            }
            try {
                ench = Enchantment.getById(Integer.parseInt(args.get(1)));
            } catch (NumberFormatException e) {
                ench = Enchantment.getByName(args.get(1));
            }
            if (ench == null) {
                error(sender, "No such enchantment.");
                return;
            } else if (ench.canEnchantItem(jItem.getItem())) {
                error(sender, "That item can't have that enchantment.");
                return;
            }
            int id = jItem.removeEnchant(ench);
            if (id != 0) {
                message(sender, "Successfully removed enchantment from item at index '" + jItem.getId() + "'.");
                message(sender, "Add an enchantment: " + ChatColor.DARK_AQUA + "/job addenchant " + jItem.getId() + " [enchantment] [level]");
                message(sender, "Add an item: " + ChatColor.DARK_AQUA + "/job additem [type] [amount]");
                message(sender, "List current items: " + ChatColor.DARK_AQUA + "/job listitems");
            } else {
                message(sender, "Couldn't find that enchantment on that item.");
            }
        } else {
            error(sender, "You aren't currently making a job.");
        }
    }
}


text:
package main_test

import (
	"net/http"
	"net/http/httptest"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	. "github.com/uber/uberalls"
)

var _ = Describe("Health handler", func() {
	var response *httptest.ResponseRecorder
	var c Config

	JustBeforeEach(func() {
		request, _ := http.NewRequest("GET", "/health", nil)
		response = httptest.NewRecorder()

		db, err := c.DB()
		Expect(err).ToNot(HaveOccurred())

		handler := NewHealthHandler(db)
		handler.ServeHTTP(response, request)
	})

	Context("With a valid DB connection", func() {
		BeforeEach(func() {
			c = Config{
				DBType:     "sqlite3",
				DBLocation: "test.sqlite",
			}
		})

		It("Should be HTTP OK", func() {
			Expect(response.Code).To(Equal(http.StatusOK))
		})
	})

	Context("With an invalid DB connection", func() {
		BeforeEach(func() {
			c = Config{
				DBType:     "mysql",
				DBLocation: ":1111",
			}
		})

		It("should not be OK", func() {
			Expect(response.Code).To(Equal(http.StatusInternalServerError))
		})
	})
})


text:
<?php
// Generated by ZF2's ./bin/classmap_generator.php
return array(
  'IdAuth\Module'                                => __DIR__ . '/Module.php',
  'IdAuth\Adapter\Doctrine'                      => __DIR__ . '/src/IdAuth/Adapter/Doctrine.php',
  'IdAuth\Collector\IdAuthCollector'             => __DIR__ . '/src/IdAuth/Collector/IdAuthCollector.php',
  'IdAuth\Controller\UserController'             => __DIR__ . '/src/IdAuth/Controller/UserController.php',
  'IdAuth\Entity\Roles'                          => __DIR__ . '/src/IdAuth/Entity/Roles.php',
  'IdAuth\Entity\User'                           => __DIR__ . '/src/IdAuth/Entity/User.php',
  'IdAuth\Fixture\LoadUserData'                  => __DIR__ . '/src/IdAuth/Fixture/LoadUserData.php',
  'IdAuth\Fixture\LoadUserRoleData'              => __DIR__ . '/src/IdAuth/Fixture/LoadUserRoleData.php',
  'IdAuth\Forms\Login'                           => __DIR__ . '/src/IdAuth/Forms/Login.php',
  'IdAuth\Interfaces\Identity'                   => __DIR__ . '/src/IdAuth/Interfaces/Identity.php',
  'IdAuth\Provider\DbTable\DbIdentity'           => __DIR__ . '/src/IdAuth/Provider/DbTable/DbIdentity.php',
  'IdAuth\Provider\DbTable\DbTableProvider'      => __DIR__ . '/src/IdAuth/Provider/DbTable/DbTableProvider.php',
  'IdAuth\Provider\Interfaces\ProviderInterface' => __DIR__ . '/src/IdAuth/Provider/Interfaces/ProviderInterface.php',
  'IdAuth\Provider\ProviderResult'               => __DIR__ . '/src/IdAuth/Provider/ProviderResult.php',
  'IdAuth\Service\Factory\Adapter\DbTable'       => __DIR__ . '/src/IdAuth/Service/Factory/Adapter/DbTable.php',
  'IdAuth\Service\Factory\Adapter\Doctrine'      => __DIR__ . '/src/IdAuth/Service/Factory/Adapter/Doctrine.php',
  'IdAuth\Service\Factory\Collector'             => __DIR__ . '/src/IdAuth/Service/Factory/Collector.php',
  'IdAuth\Service\Factory\Config'                => __DIR__ . '/src/IdAuth/Service/Factory/Config.php',
  'IdAuth\Service\Factory\IdAuthService'         => __DIR__ . '/src/IdAuth/Service/Factory/IdAuthService.php',
  'IdAuth\Service\Factory\Storage\Session'       => __DIR__ . '/src/IdAuth/Service/Factory/Storage/Session.php',
  'IdAuth\Service\Factory\Storage'               => __DIR__ . '/src/IdAuth/Service/Factory/Storage.php',
  'IdAuth\Service\IAServiceProvider'             => __DIR__ . '/src/IdAuth/Service/IaServiceProvider.php',
  'IdAuth\Storage\Session'                       => __DIR__ . '/src/IdAuth/Storage/Session.php',
  'IdAuth\View\Helper\IdAuth'                    => __DIR__ . '/src/IdAuth/View/Helper/IdAuth.php',
  'IdAuthTest\Service\GetFactoryTestTest'        => __DIR__ . '/tests/IapTest/src/IapTest/Service/GetFactoryTest.php',
);


text:
from django.db import migrations
from django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor
from django.db.migrations.state import StateApps
from django.db.models import Count

def clear_duplicate_reactions(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -> None:
    """Zulip's data model for reactions has enforced via code,
    nontransactionally, that they can only react with one emoji_code
    for a given reaction_type.  This fixes any that were stored in the
    database via a race; the next migration will add the appropriate
    database-level unique constraint.
    """
    Reaction = apps.get_model("zerver", "Reaction")

    duplicate_reactions = (
        Reaction.objects.all()
        .values("user_profile_id", "message_id", "reaction_type", "emoji_code")
        .annotate(Count("id"))
        .filter(id__count__gt=1)
    )
    for duplicate_reaction in duplicate_reactions:
        duplicate_reaction.pop("id__count")
        to_cleanup = Reaction.objects.filter(**duplicate_reaction)[1:]
        for reaction in to_cleanup:
            reaction.delete()

class Migration(migrations.Migration):

    dependencies = [
        ("zerver", "0286_merge_0260_0285"),
    ]

    operations = [
        migrations.RunPython(
            clear_duplicate_reactions, reverse_code=migrations.RunPython.noop, elidable=True
        ),
    ]


text:
package com.dassmeta.passport.dal.dataobject;

import java.util.Date;

public class AuJobInfo {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_job_info.id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Long id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_job_info.job_name
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String jobName;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_job_info.org_id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Long orgId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_job_info.create_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Date createTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_job_info.modify_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private Date modifyTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column au_job_info.deleted
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    private String deleted;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_job_info.id
     *
     * @return the value of au_job_info.id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Long getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_job_info.id
     *
     * @param id the value for au_job_info.id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_job_info.job_name
     *
     * @return the value of au_job_info.job_name
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getJobName() {
        return jobName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_job_info.job_name
     *
     * @param jobName the value for au_job_info.job_name
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_job_info.org_id
     *
     * @return the value of au_job_info.org_id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Long getOrgId() {
        return orgId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_job_info.org_id
     *
     * @param orgId the value for au_job_info.org_id
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_job_info.create_time
     *
     * @return the value of au_job_info.create_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_job_info.create_time
     *
     * @param createTime the value for au_job_info.create_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_job_info.modify_time
     *
     * @return the value of au_job_info.modify_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public Date getModifyTime() {
        return modifyTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_job_info.modify_time
     *
     * @param modifyTime the value for au_job_info.modify_time
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column au_job_info.deleted
     *
     * @return the value of au_job_info.deleted
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public String getDeleted() {
        return deleted;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column au_job_info.deleted
     *
     * @param deleted the value for au_job_info.deleted
     *
     * @mbggenerated Thu Jan 19 13:57:36 CST 2017
     */
    public void setDeleted(String deleted) {
        this.deleted = deleted;
    }
}


text:
		<form id="login-form" method="POST" action="/bo/administracion/ingreso_invitado" class="smart-form client-form">

									Iniciar sesión

								<fieldset>

											Cuenta

												<input required type="text" placeholder="Username Afiliado" name="username">
												 Ingrese su id, usuario o correo

											Clave

												<input required type="password" placeholder="Clave de Afiliado" name="password_invitado">
												 Ingrese la contraseña

								</fieldset>

									<button id="enviar" type="submit" class="btn btn-primary">
										Iniciar
									</button>

							</form>