text:
#ifndef __DEV_ARM_SMMU_V3_TRANSL_HH__
#define __DEV_ARM_SMMU_V3_TRANSL_HH__

#include "base/compiler.hh"
#include "dev/arm/smmu_v3_deviceifc.hh"
#include "dev/arm/smmu_v3_proc.hh"
#include "mem/packet.hh"

namespace gem5
{

namespace ArmISA
{
struct PageTableOps;
}

struct SMMUTranslRequest
{
    Addr     addr;
    unsigned size;
    uint32_t sid;  // streamId
    uint32_t ssid; // substreamId
    bool     isWrite;
    bool     isPrefetch;
    bool     isAtsRequest;

    PacketPtr pkt;

    static SMMUTranslRequest fromPacket(PacketPtr pkt, bool ats = false);
    static SMMUTranslRequest prefetch(Addr addr, uint32_t sid, uint32_t ssid);
};

class SMMUTranslationProcess : public SMMUProcess
{
  private:
    struct TranslContext
    {
        bool stage1Enable;
        bool stage2Enable;
        Addr ttb0, ttb1, httb;
        uint16_t asid;
        uint16_t vmid;
        uint8_t stage1TranslGranule;
        uint8_t stage2TranslGranule;
        uint8_t t0sz;
        uint8_t s2t0sz;
    };

    enum FaultType
    {
        FAULT_NONE,
        FAULT_TRANSLATION, // F_TRANSLATION
        FAULT_PERMISSION,  // F_PERMISSION
    };

    struct TranslResult
    {
        FaultType  fault;
        Addr       addr;
        Addr       addrMask;
        bool       writable;
    };

    SMMUv3DeviceInterface &ifc;

    SMMUTranslRequest request;
    TranslContext context;

    Tick recvTick;
    GEM5_CLASS_VAR_USED Tick faultTick;

    virtual void main(Yield &yield);

    TranslResult bypass(Addr addr) const;
    TranslResult smmuTranslation(Yield &yield);

    bool microTLBLookup(Yield &yield, TranslResult &tr);
    bool ifcTLBLookup(Yield &yield, TranslResult &tr, bool &wasPrefetched);
    bool smmuTLBLookup(Yield &yield, TranslResult &tr);

    void microTLBUpdate(Yield &yield, const TranslResult &tr);
    void ifcTLBUpdate(Yield &yield, const TranslResult &tr);
    void smmuTLBUpdate(Yield &yield, const TranslResult &tr);

    bool configCacheLookup(Yield &yield, TranslContext &tc);
    void configCacheUpdate(Yield &yield, const TranslContext &tc);
    bool findConfig(Yield &yield, TranslContext &tc, TranslResult &tr);

    void walkCacheLookup(Yield &yield,
                         const WalkCache::Entry *&walkEntry,
                         Addr addr, uint16_t asid, uint16_t vmid,
                         unsigned stage, unsigned level);

    void walkCacheUpdate(Yield &yield, Addr va, Addr vaMask, Addr pa,
                         unsigned stage, unsigned level,
                         bool leaf, uint8_t permissions);

    TranslResult walkStage1And2(Yield &yield, Addr addr,
                                const ArmISA::PageTableOps *pt_ops,
                                unsigned level, Addr walkPtr);

    TranslResult walkStage2(Yield &yield, Addr addr, bool final_tr,
                            const ArmISA::PageTableOps *pt_ops,
                            unsigned level, Addr walkPtr);

    TranslResult translateStage1And2(Yield &yield, Addr addr);
    TranslResult translateStage2(Yield &yield, Addr addr, bool final_tr);

    TranslResult combineTranslations(const TranslResult &s1tr,
                                     const TranslResult &s2tr) const;

    /**
     * Used to force ordering on transactions with same
     * (SID, SSID, 4k page) to avoid multiple identical
     * page-table walks.
     */
    bool hazard4kCheck();
    void hazard4kRegister();
    void hazard4kHold(Yield &yield);
    void hazard4kRelease();

    /**
     * Used to force ordering on transactions with the same orderId.
     * This attempts to model AXI IDs.
     */
    void hazardIdRegister();
    void hazardIdHold(Yield &yield);
    void hazardIdRelease();

    void issuePrefetch(Addr addr);

    void completeTransaction(Yield &yield, const TranslResult &tr);
    void completePrefetch(Yield &yield);

    void sendEvent(Yield &yield, const SMMUEvent &ev);

    void doReadSTE(Yield &yield, StreamTableEntry &ste, uint32_t sid);
    void doReadCD(Yield &yield, ContextDescriptor &cd,
                  const StreamTableEntry &ste, uint32_t sid, uint32_t ssid);
    void doReadConfig(Yield &yield, Addr addr, void *ptr, size_t size,
                      uint32_t sid, uint32_t ssid);
    void doReadPTE(Yield &yield, Addr va, Addr addr, void *ptr,
                   unsigned stage, unsigned level);

  public:
    SMMUTranslationProcess(const std::string &name, SMMUv3 &_smmu,
        SMMUv3DeviceInterface &_ifc);

    virtual ~SMMUTranslationProcess();

    void beginTransaction(const SMMUTranslRequest &req);
    void resumeTransaction();
};

} // namespace gem5

#endif /* __DEV_ARM_SMMU_V3_TRANSL_HH__ */


text:
require('normalize.css/normalize.css');
require('styles/App.scss');

import React from 'react';
import ReactDOM from 'react-dom';

var imageDatas = require('../data/imageDatas.json');

imageDatas = (function genImageUrl(imageDatasArr) {
	for (var i = 0; i < imageDatasArr.length; i++) {
		var singleImgData = imageDatasArr[i];

		singleImgData.imgURL = require('../images/' + singleImgData.fileName);

		imageDatasArr[i] = singleImgData;
	}

	return imageDatasArr;
})(imageDatas);

/*
 * 获取区间内的一个随机值
 */
function getRangeRandom(low, high) {
	return Math.ceil(Math.random() * (high - low) + low);
}

/*
 * 获取 0~30° 之间的一个任意正负值
 */
function get30DegRandom() {
	return ((Math.random() > 0.5 ? '' : '-') + Math.ceil(Math.random() * 30));
}

// App Component
var AppComponent = React.createClass({
	Constant: {
		centerPos: {
			left: 0,
			right: 0
		},
		hPosRange: {
			leftSecX: [0, 0],
			rightSecX: [0, 0],
			y: [0, 0]
		},
		vPosRange: {
			x: [0, 0],
			topY: [0, 0]
		}
	},
	getInitialState: function() {
		return {
			imgsArrangeArr: [
				// Arr Content
				/*{
					pos: {
						left: 0,
						top: 0
					},
					rotate: 0,
					isInverse: false,
					isCenter: false
				}*/
			]
		};
	},

	// 组件加载以后, 为每张图片计算其位置的范围
	componentDidMount: function() {
		var stageDOM = ReactDOM.findDOMNode(this.refs.stage),
			stageW = stageDOM.scrollWidth,
			stageH = stageDOM.scrollHeight,
			halfStageW = Math.ceil(stageW / 2),
			halfStageH = Math.ceil(stageH / 2);

		// 拿到一个imageFigure的大小
		var imgFigureDOM = ReactDOM.findDOMNode(this.refs.imgFigure0),
			imgW = imgFigureDOM.scrollWidth,
			imgH = imgFigureDOM.scrollHeight,
			halfImgW = Math.ceil(imgW / 2),
			halfImgH = Math.ceil(imgH / 2);

		// 计算中心图片的位置点
		this.Constant.centerPos = {
			left: halfStageW - halfImgW,
			top: halfStageH - halfImgH
		};

		// 计算左侧,右侧区域图片排布位置的取值范围
		this.Constant.hPosRange.leftSecX[0] = -halfImgW;
		this.Constant.hPosRange.leftSecX[1] = halfStageW - halfImgW * 3;
		this.Constant.hPosRange.rightSecX[0] = halfStageW + halfImgW;
		this.Constant.hPosRange.rightSecX[1] = stageW - halfImgW;
		this.Constant.hPosRange.y[0] = -halfImgH;
		this.Constant.hPosRange.y[1] = stageH - halfImgH;

		// 计算上侧区域图片排布位置的取值范围
		this.Constant.vPosRange.topY[0] = -halfImgH;
		this.Constant.vPosRange.topY[1] = halfStageH - halfImgH * 3;
		this.Constant.vPosRange.x[0] = halfStageW - imgW;
		this.Constant.vPosRange.x[1] = halfStageW;

		this.rearrange(0);

	},
	/*
	* 重新布局所有图片
	* @param centerIndex 指定居中排布哪个图片
	*/
	rearrange: function(centerIndex) {
		var imgsArrangeArr = this.state.imgsArrangeArr,
			Constant = this.Constant,
			centerPos = Constant.centerPos,
			hPosRange = Constant.hPosRange,
			vPosRange = Constant.vPosRange,
			hPosRangeLeftSecX = hPosRange.leftSecX,
			hPosRangeRightSecX = hPosRange.rightSecX,
			hPosRangeY = hPosRange.y,
			vPosRangeTopY = vPosRange.topY,
			vPosRangeX = vPosRange.x,

			imgsArrangeTopArr = [],
			topImgNum = Math.floor(Math.random() * 2),    // 取一个或者不取
			topImgSpliceIndex = 0,

			imgsArrangeCenterArr = imgsArrangeArr.splice(centerIndex, 1);

		imgsArrangeCenterArr[0] = {
			pos: centerPos,
			rotate: 0,
			isCenter: true,
			isInverse: false
		};
		// 取出要布局上侧的图片的状态信息
		topImgSpliceIndex = Math.ceil(Math.random() * (imgsArrangeArr.length - topImgNum));
		imgsArrangeTopArr = imgsArrangeArr.splice(topImgSpliceIndex, topImgNum);

		// 布局位于上侧的图片
		imgsArrangeTopArr.forEach(function (value, index) {
			imgsArrangeTopArr[index] = {
				pos: {
					top: getRangeRandom(vPosRangeTopY[0], vPosRangeTopY[1]),
					left: getRangeRandom(vPosRangeX[0], vPosRangeX[1])
				},
				rotate: get30DegRandom(),
				isCenter: false
			};
		});
		// 布局左右两侧的图片
		for (var i = 0, j = imgsArrangeArr.length, k = j / 2; i < j; i++) {
			var hPosRangeLORX = null;

			// 前半部分布局左边, 右半部分布局右边
			if (i < k) {
				hPosRangeLORX = hPosRangeLeftSecX;
			} else {
				hPosRangeLORX = hPosRangeRightSecX;
			}

			imgsArrangeArr[i] = {
				pos: {
					top: getRangeRandom(hPosRangeY[0], hPosRangeY[1]),
					left: getRangeRandom(hPosRangeLORX[0], hPosRangeLORX[1])
				},
				rotate: get30DegRandom(),
				isCenter: false
			};
		}

		if (imgsArrangeTopArr && imgsArrangeTopArr[0]) {
			imgsArrangeArr.splice(topImgSpliceIndex, 0, imgsArrangeTopArr[0]);
		}

		imgsArrangeArr.splice(centerIndex, 0, imgsArrangeCenterArr[0]);

		this.setState({
			imgsArrangeArr: imgsArrangeArr
		});
	},

	center: function(index) {
		return function() {
			this.rearrange(index);
		}.bind(this);
	},

	inverse: function(index) {
		return function() {
			var imgsArrangeArr = this.state.imgsArrangeArr;
			imgsArrangeArr[index].isInverse = !imgsArrangeArr[index].isInverse;
			this.setState({
				imgsArrangeArr: imgsArrangeArr
			});
		}.bind(this);
	},

	render: function() {
		var imgFigures = [],
			controllerUnits = [];

		imageDatas.forEach(function(value, index) {
			if (!this.state.imgsArrangeArr[index]) {
				this.state.imgsArrangeArr[index] = {
					pos: {
						left: 0,
						top: 0
					},
					rotate: 0,
					isInverse: false,
					isCenter: false
				}
			}

			imgFigures.push(<ImgFigure data={value} key={index} ref={'imgFigure' + index} arrange={this.state.imgsArrangeArr[index]} inverse={this.inverse(index)} center={this.center(index)}/>)
			controllerUnits.push(<ControllerUnit index={index} key={index} arrange={this.state.imgsArrangeArr[index]} center={this.center(index)} inverse={this.inverse(index)} />);
		}.bind(this));

		return (

					{imgFigures}

					{controllerUnits}

		);
	}
});

var ImgFigure = React.createClass({
	handleClick: function(e) {
		if (this.props.arrange.isCenter) {
			this.props.inverse();
		} else {
			this.props.center();
		}
		e.stopPropagation();
		e.preventDefault();
	},

	render: function() {
		var styleObj = {};
		if (this.props.arrange.pos) {
			styleObj = this.props.arrange.pos;
		}

		// 如果图片的旋转角度有值并且不为0, 添加旋转角度
		if (this.props.arrange.rotate) {
			(['MozTransform', 'msTransform', 'WebkitTransform', 'transform']).forEach(function (value) {
				styleObj[value] = 'rotate(' + this.props.arrange.rotate + 'deg)';
			}.bind(this));
		}

		if (this.props.arrange.isCenter) {
			styleObj.zIndex = 11;
		}

		var imgFigureClassName = 'img-figure';
		imgFigureClassName += this.props.arrange.isInverse ? ' is-inverse' : '';

		return (

{this.props.data.title}

{this.props.data.desc}

		)
	}

});

var ControllerUnit = React.createClass({
	handleClick: function(e) {
		if (this.props.arrange.isCenter) {
			this.props.inverse();
		} else {
			this.props.center();
		}
		e.stopPropagation();
		e.preventDefault();
	},

	render: function() {
		var controllerUnitClassName = 'controller-unit';
		if (this.props.arrange.isCenter) {
			controllerUnitClassName += ' is-center';
			if (this.props.arrange.isInverse) {
				controllerUnitClassName += ' is-inverse';
			}
		}
		return (
			{this.props.index + 1}
		);

	}
});

export default AppComponent;

redpajama_set_name: RedPajamaGithub


text:
/**
 * Make a container resizable
 * @class DDResize
 * @namespace WireIt.util
 * @extends YAHOO.util.DragDrop
 * @constructor
 * @param {WireIt.Container} container The container that is to be resizable
 * @param {Object} config Configuration object
 */
WireIt.util.DDResize = function(container, config) {

	/**
	 * Configuration object
	 *

	 *
minWidth: minimum width (default 50)

	 *
minHeight: minimum height (default 50)

	 *

	 * @property myConf
	 */
	// WARNING: the object config cannot be called "config" because YAHOO.util.DragDrop already has a "config" property
	this.myConf = config || {};
	this.myConf.container = container;
	this.myConf.minWidth = this.myConf.minWidth || 50;
	this.myConf.minHeight = this.myConf.minHeight || 50;

	// Call the superconstructor
	WireIt.util.DDResize.superclass.constructor.apply(this, [container.el, container.ddResizeHandle]);

	// Set the resize handle
	this.setHandleElId(container.ddResizeHandle);

	/**
	 * The event fired when the container is resized
	 * @event eventResize
	 */
	this.eventResize = new YAHOO.util.CustomEvent("eventResize");
};

YAHOO.extend(WireIt.util.DDResize, YAHOO.util.DragDrop, {

	/**
	 * @method onMouseDown
	 */
	onMouseDown: function(e) {
		var panel = this.getEl();
		this.startWidth = panel.offsetWidth;
		this.startHeight = panel.offsetHeight;

		this.startPos = [YAHOO.util.Event.getPageX(e), YAHOO.util.Event.getPageY(e)];
	},

	/**
	 * @method onDrag
	 */
	onDrag: function(e) {
		var newPos = [YAHOO.util.Event.getPageX(e),  YAHOO.util.Event.getPageY(e)];

		var offsetX = newPos[0] - this.startPos[0];
		var offsetY = newPos[1] - this.startPos[1];

		var newWidth = Math.max(this.startWidth + offsetX, this.myConf.minWidth);
		var newHeight = Math.max(this.startHeight + offsetY, this.myConf.minHeight);

		var panel = this.getEl();
		panel.style.width = newWidth + "px";
		panel.style.height = newHeight + "px";

		// Fire the resize event
		this.eventResize.fire([newWidth, newHeight]);
	}
});


text:
.footer {
  position: relative;
  width: 100%;
  bottom: 0;
  background-color: black;
}


text:
- Original: [Release electron v9.0.4 - electron/electron](https://github.com/electron/electron/releases/tag/v9.0.4)

## Fixes

- Added missing support for `isComposing` KeyboardEvent property. [#23996](https://github.com/electron/electron/pull/23996)
  - `isComposing` KeyboardEvent プロパティーに対して不足しているサポートを追加しました
  - `before-input-event` が不足していた問題 [#23244](https://github.com/electron/electron/issues/23244) の修正
- Enable NTLM v2 for POSIX platforms and added --disable-ntlm-v2 switch to disable it. [#23934](https://github.com/electron/electron/pull/23934)
  - POSIX プラットフォームに対する NTLM v2 の有効化と、(これを) 無効化するための --disable-ntlm-v2 スイッチを追加しました
  - macOS の HTTP 認証で NTLM v2 が機能しない問題 [#22951](https://github.com/electron/electron/issues/22951) の修正
- Fix: Allow windows behind macOS elements if "frame" is false. [#24033](https://github.com/electron/electron/pull/24033)
  - 修正: "frame" が false なら macOS 要素の背後にあるウィンドウを許可します
  - `BrowserWindow` の `level` を `screen-saver` にしても Tray (メニュー) バーを透過しない問題 [#24000](https://github.com/electron/electron/issues/24000) の修正
- Fixed `chrome://media-internals` and `chrome://webrtc-internals` pages not loading. [#24058](https://github.com/electron/electron/pull/24058)
  - `chrome://media-internals` と `chrome://webrtc-internals` ページが読み込まれない問題を修正しました
  - Electron v8.x でリソース パッケージ (`*.pak` ファイル) がビルド構成へ適切に含まれていないため、これらのページへアクセス不能になっていたとのこと
- Fixed a crash that could occur when using the `ipcRenderer` module after blink had released the context. Instead, a JS exception will be thrown. [#23978](https://github.com/electron/electron/pull/23978)
  - Blink がコンテキストを解放した後に `ipcRenderer` モジュールを使用すると発生する可能性のあったクラッシュを修正しました、(クラッシュする) 代わりに JS 例外をスローします
  - この状態はこれまでセグメンテーション違反によりクラッシュしていたが修正により明示的なエラーとして扱われるようになった
- Fixed an issue where `rmdir` and `rmdirSync` work with `original-fs` in an asar context. [#23956](https://github.com/electron/electron/pull/23956)
  - asar コンテキストにて `rmdir` と `rmdirSync` が `original-fs` と連携される問題を修正しました
  - `original-fs` の `rmdir` が asar ファイルの含まれたフォルダーを削除するとエラーになる問題 [#23871](https://github.com/electron/electron/issues/23871) の修正、`fs` API のオーバーライド不足が原因だったとのこと
- Fixed no `session` in webContents of type remote. [#24065](https://github.com/electron/electron/pull/24065)
  - remote タイプの webContents に `session` がない問題を修正しました
  - 拡張機能のバックグラウンド ページから受信したイベント データに `webContents` と `session` がない問題 [#23615](https://github.com/electron/electron/issues/23615) の修正
- Fixed: On some Windows machines, especially Windows Insider builds, Electron would crash silently during startup. [#24039](https://github.com/electron/electron/pull/24039)
  - 修正: 一部の Windows マシン、特に Windows Insider ビルドでは Electron 起動時に黙ってクラッシュしていました
  - Node.js の libuv 部分へのパッチ適用にて修正

## Other Changes

- Updated Chromium to 83.0.4103.104. [#24068](https://github.com/electron/electron/pull/24068)
  - Chromium を 83.0.4103.104 へ更新しました
  - 変更点は[こちら](https://chromium.googlesource.com/chromium/src/+log/83.0.4103.103..83.0.4103.104?n=10000&pretty=fuller)を参照のこと
- [a11y] fix incorrect position and size reported for grouped items in a listbox. [#24060](https://github.com/electron/electron/pull/24060)
  - [a11y] リストボックス内のグループ化されたアイテムに対し誤ってレポートされた位置とサイズを修正しました
  - Chromium 部分のパッチ適用にて修正
- [a11y] fix incorrect selection item count for listbox with grouped items. [#24061](https://github.com/electron/electron/pull/24061)
  - [a11y] グループ化されたアイテムを持つリストボックスの誤った選択アイテム数を修正しました
  - Chromium 部分のパッチ適用にて修正


text:
package org.apache.sis.internal.storage.io;

import java.io.OutputStream;
import java.io.IOException;

/**
 * Wraps a {@link ChannelDataOutput} as a standard {@link OutputStream}.
 *
 * @author  Martin Desruisseaux (Geomatys)
 * @version 1.2
 *
 * @see InputStreamAdapter
 *
 * @since 0.8
 * @module
 */
final class OutputStreamAdapter extends OutputStream implements Markable {
    /**
     * The underlying data output stream. In principle, public access to this field breaks encapsulation.
     * But since {@code OutputStreamAdapter} does not hold any state and just forwards every method calls
     * to that {@code ChannelDataOutput}, using on object or the other does not make a difference.
     *
     * @todo to be replaced by a reference to {@link javax.imageio.stream.ImageOutputStream} if the
     *       {@link ChannelImageOutputStream} class implements that interface in a future version.
     */
    final ChannelImageOutputStream output;

    /**
     * Constructs a new output stream.
     *
     * @param output  the stream to wrap.
     */
    OutputStreamAdapter(final ChannelImageOutputStream output) {
        this.output = output;
    }

    /**
     * Writes the specified byte to the output stream.
     *
     * @param  b  the byte to write.
     * @throws IOException if an I/O error occurs.
     */
    @Override
    public void write(final int b) throws IOException {
        output.write(b);
    }

    /**
     * Writes the specified bytes to the output stream.
     *
     * @param  b  the bytes to write.
     * @throws IOException if an I/O error occurs.
     */
    @Override
    public void write(final byte[] b) throws IOException {
        output.write(b);
    }

    /**
     * Writes the specified sub-array to the output stream.
     *
     * @param  b    the bytes to write.
     * @param  off  the start offset in the data.
     * @param  len  the number of bytes to write.
     * @throws IOException if an I/O error occurs.
     */
    @Override
    public void write(final byte[] b, final int off, final int len) throws IOException {
        output.write(b, off, len);
    }

    /**
     * Marks the current position in this output stream.
     */
    @Override
    public void mark() {
        output.mark();
    }

    /**
     * Resets this stream to the position at the time the {@code mark} method was last called.
     *
     * @throws IOException if this stream cannot move to the last mark position.
     */
    @Override
    public void reset() throws IOException {
        output.reset();
    }

    /**
     * Moves to the given position in the stream and discards all marks at or after that position.
     *
     * @param  mark  position where to seek.
     * @throws IOException if this stream cannot move to the specified mark position.
     */
    @Override
    public void reset(final long mark) throws IOException {
        output.reset(mark);
    }

    /**
     * Returns the current byte position of the stream.
     *
     * @return the position of the stream.
     * @throws IOException if the position cannot be obtained.
     */
    @Override
    public long getStreamPosition() throws IOException {
        return output.getStreamPosition();
    }

    /**
     * Forces any buffered output bytes to be written out.
     *
     * @throws IOException if an I/O error occurs.
     */
    @Override
    public void flush() throws IOException {
        output.flush();
    }

    /**
     * Releases any system resources associated with the output stream.
     *
     * @throws IOException if an I/O error occurs.
     */
    @Override
    public void close() throws IOException {
        output.close();
    }
}


text:
using System.Data;

namespace FluentMigrator.Runner.Generators.SqlServer
{
    internal class SqlServer2005TypeMap : SqlServer2000TypeMap
    {
        protected override void SetupTypeMaps()
        {
            base.SetupTypeMaps();

            SetTypeMap(DbType.String, "NVARCHAR(MAX)", UnicodeTextCapacity);
            SetTypeMap(DbType.AnsiString, "VARCHAR(MAX)", AnsiTextCapacity);
            SetTypeMap(DbType.Binary, "VARBINARY(MAX)", ImageCapacity);

        }
    }
}


text:
      <button title="Close"
          type="button"
          class="btn-transparent close"
          [hidden]="hideclose"
          (click)="onClose($event)">×
      </button>


text:
package infrastructure

import play.api.Play.current
import play.api.Logger
import org.joda.time.DateTime
import play.api.db.DB
import anorm._
import anorm.SqlParser._
import models._
import models.Environment.ConnectionName

object RelayRepository {

   val simpleRelay = {
      get[String]("recipient") ~
      get[Boolean]("enabled") ~
      get[String]("status") map {
         case recipient~enabled~status => {
            Relay(recipient,enabled,status)
         }
      }
   }

   def findRelaysForDomain(domain: Domain): List[Relay] = {
      domain.connection match {
         case Some(connection) => findRelaysForDomain(connection,domain)
         case None => throw new IllegalStateException("No connection in domain")
      }
   }

   def findRelaysForDomain(connection: ConnectionName, domain: Domain): List[Relay] = {
      DB.withConnection(connection) { implicit connection =>
         SQL(
            """
select * from relays
where recipient like {name}
order by recipient
            """
         ).on(
            'name -> s"%@${domain.name}"
         ).as(simpleRelay *)
      }
   }

   def findRelays(connection: ConnectionName): List[Relay] = {
      DB.withConnection(connection) { implicit connection =>
         SQL(
            """
select * from relays
order by recipient
            """
         ).as(simpleRelay *)
      }
   }

   def findCatchAll(connection: ConnectionName, domain: Domain): Option[Relay] = findRelay(connection,s"@${domain.name}")

   def findRelay(alias: String, domain: Domain): Option[Relay] = findRelay(domain.connection.get, s"${alias}@${domain.name}")

   def disable(connection: ConnectionName, recipient: String) {
      DB.withConnection(connection) { implicit connection =>
         SQL(
            """
update relays set enabled = 0 where recipient = {recipient}
            """
         ).on(
            'recipient -> recipient
         ).executeUpdate
      }
   }

   def enable(connection: ConnectionName, recipient: String) {
      DB.withConnection(connection) { implicit connection =>
         SQL(
            """
update relays set enabled = 1 where recipient = {recipient}
            """
         ).on(
            'recipient -> recipient
         ).executeUpdate
      }
   }

   def findRelay(connection: ConnectionName, recipient: String): Option[Relay] = {
      DB.withConnection(connection) { implicit connection =>
         SQL(
            """
select * from relays
where recipient = {recipient}
order by recipient
            """
         ).on(
            'recipient -> recipient
         ).as(simpleRelay *).headOption
      }
   }

   def save(connectionName: ConnectionName, relay: Relay) = {
      DB.withConnection(connectionName) { implicit connection =>
         SQL(
            """
insert into relays (recipient,status,enabled) values ({recipient},{status},{enabled})
            """
         ).on(
            'recipient -> relay.recipient,
            'status -> relay.status,
            'enabled -> relay.enabled
         ).execute
      }
   }

   def delete(connectionName: ConnectionName, relay: Relay) = {
      DB.withConnection(connectionName) { implicit connection =>
         SQL(
            """
delete from relays where recipient = {recipient}
            """
         ).on(
            'recipient -> relay.recipient
         ).execute
      }
   }

   def reject(connection: ConnectionName, relay: Relay) = {
      DB.withConnection(connection) { implicit connection =>
         SQL(
            """
update relays set status = 'REJECT' where recipient = {recipient}
            """
         ).on(
            'recipient -> relay.recipient
         ).executeUpdate
      }
   }

   def accept(connection: ConnectionName, relay: Relay) = {
      DB.withConnection(connection) { implicit connection =>
         SQL(
            """
update relays set status = 'OK' where recipient = {recipient}
            """
         ).on(
            'recipient -> relay.recipient
         ).executeUpdate
      }
   }

}


text:
#include "mod_stream.h"
#include "modipulate_common.h"
#include "modipulate.h"

#include <string>
#include <string.h>
#include "portaudio.h"

// Last error string.
char* last_error = NULL;

// Table of all modules.
#define MAX_MODSTREAMS 16
ModStream* mods[MAX_MODSTREAMS];

// Check if we've initialized.
static bool modipulateIsInitialized = false;

ModipulateErr modipulate_global_init(void) {
    if (modipulateIsInitialized) {
        return MODIPULATE_ERROR_GENERAL;
    }

    DPRINT("Loading Modipulate!");

	for (int i = 0; i < MAX_MODSTREAMS; i++)
		mods[i] = NULL;

    modipulateIsInitialized = true;

    // Start PortAudio.
    return modipulate_handle_pa_error(Pa_Initialize());
}

ModipulateErr modipulate_global_deinit(void) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NONE;
    }

    modipulateIsInitialized = false;

    DPRINT("Quiting Modipulate");
    ModipulateErr ret = MODIPULATE_ERROR_NONE;

    // Close mod players.
	for (int i = 0; i < MAX_MODSTREAMS; i++) {
		try {
			if (mods[i] != NULL)
				mods[i]->close();
		} catch (std::string e) {
			modipulate_set_error_string_cpp(e);
			ret = MODIPULATE_ERROR_GENERAL;
		}

		// Free memory!
		delete mods[i];
		mods[i] = NULL;
	}

    // Stop PortAudio.
    Pa_Terminate();

    return ret;
}

char* modipulate_global_get_last_error_string(void) {
    return last_error;
}

ModipulateErr modipulate_global_update(void) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    // Call all callbacks.
	for (int i = 0; i < MAX_MODSTREAMS; i++) {
		if (mods[i]) {
			mods[i]->perform_callbacks();
		}
	}

    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_load(const char* filename, ModipulateSong* song) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    DPRINT("Opening file: %s", filename);
    ModipulateErr ret = MODIPULATE_ERROR_NONE;

	ModStream* stream = NULL;

	// Find an empty slot.
    int slot = -1;
	for (int i = 0; i < MAX_MODSTREAMS; i++) {
		if (mods[i] == NULL) {
			// We got one!
			stream = new ModStream();
            slot = i;
			mods[slot] = stream;

			break;
		}
	}

	if (!stream) {
		// Oh no!
		modipulate_set_error_string_cpp("Max concurrent songs reached!");

        return MODIPULATE_ERROR_GENERAL;
	}

    try {
        stream->open(filename);
		*song = stream;
    } catch (std::string e) {
        modipulate_set_error_string_cpp(e);
        ret = MODIPULATE_ERROR_GENERAL;

        // Cleanup.
        delete stream;
        mods[slot] = NULL;
    }

    return ret;
}

ModipulateErr modipulate_song_unload(ModipulateSong song) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    modipulate_song_play(song, false);

    // Destroy object.
	for (int i = 0; i < MAX_MODSTREAMS; i++) {
		if (mods[i] == song) {
			mods[i]->close();
			delete mods[i];
			mods[i] = NULL;

			break;
		}
	}

    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_play(ModipulateSong song, int play) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ModipulateErr ret = MODIPULATE_ERROR_NONE;

    try {
        ((ModStream*) song)->set_playing((bool) play);
    } catch (std::string e) {
        modipulate_set_error_string_cpp(e);
        ret = MODIPULATE_ERROR_GENERAL;
    }

    return ret;
}

ModipulateErr modipulate_song_get_info(ModipulateSong song, ModipulateSongInfo** song_info) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ModipulateErr ret = MODIPULATE_ERROR_NONE;

    try {
        ((ModStream*) song)->get_info(song_info);
    } catch (std::string e) {
        modipulate_set_error_string_cpp(e);
        ret = MODIPULATE_ERROR_GENERAL;
    }

    return ret;
}

ModipulateErr modipulate_song_info_free(ModipulateSongInfo* song_info) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ModStream::free_info(song_info);

    return MODIPULATE_ERROR_NONE;
}

float modipulate_song_get_volume(ModipulateSong song) {
    if (!modipulateIsInitialized) {
        return -1;
    }

    return ((ModStream*) song)->get_volume();
}

void modipulate_song_set_volume(ModipulateSong song, float volume) {
    if (!modipulateIsInitialized) {
        return;
    }

    ((ModStream*) song)->set_volume(volume);
}

void modipulate_song_set_channel_enabled(ModipulateSong song, unsigned channel, int enabled) {
    if (!modipulateIsInitialized) {
        return;
    }

    DPRINT("Channel %d is set to %s", channel, enabled ? "Enabled" : "Disabled");

    ((ModStream*) song)->set_channel_enabled(channel, enabled);
}

int modipulate_song_get_channel_enabled(ModipulateSong song, unsigned channel) {
    if (!modipulateIsInitialized) {
        return -1;
    }

    return ((ModStream*) song)->get_channel_enabled(channel);
}

ModipulateErr modipulate_song_play_sample(ModipulateSong song, int sample, int note,
	unsigned channel, int modulus, unsigned offset, int volume_command, int volume_value,
	int effect_command, int effect_value) {

	if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ModipulateErr ret = MODIPULATE_ERROR_NONE;

    try {
        ((ModStream*) song)->play_sample(sample, note, channel,
			modulus, offset, volume_command, volume_value,
			effect_command, effect_value);
    } catch (std::string e) {
        modipulate_set_error_string_cpp(e);
        ret = MODIPULATE_ERROR_GENERAL;
    }

    return ret;
}

ModipulateErr modipulate_song_fade_channel(ModipulateSong song, unsigned msec, int channel, double destination_amp) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }
    if (destination_amp < 0.0 || destination_amp > 1.0) {
        modipulate_set_error_string_cpp("Mix volume must be between 0.0 and 1.0");
        return MODIPULATE_ERROR_INVALID_PARAMETERS;
    }
    if (channel < -1 || channel >= ((ModStream*) song)->get_num_channels()) {
        modipulate_set_error_string_cpp("Invalid channel number");
        return MODIPULATE_ERROR_INVALID_PARAMETERS;
    }

    ModipulateErr ret = MODIPULATE_ERROR_NONE;

    try {
        ((ModStream*) song)->fade_channel(msec, channel, destination_amp);
    } catch (std::string e) {
        modipulate_set_error_string_cpp(e);
        ret = MODIPULATE_ERROR_GENERAL;
    }

    return ret;
}

float modipulate_global_get_volume(void) {
    if (!modipulateIsInitialized) {
        return -1.0;
    }

	return ModStream::modipulate_global_volume;
}

void modipulate_global_set_volume(float vol) {
    if (!modipulateIsInitialized) {
        return;
    }

    ModStream::modipulate_global_volume = vol;
}

ModipulateErr modipulate_song_set_transposition(ModipulateSong song, unsigned channel, int offset) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->set_transposition(channel, offset);

    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_get_transposition(ModipulateSong song, unsigned channel, int *offset) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    *offset = ((ModStream*) song)->get_transposition(channel);

    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_volume_command(ModipulateSong song, unsigned channel,
    int volume_command, int volume_value) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->issue_volume_command(channel, volume_command, volume_value);
    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_enable_volume(ModipulateSong song, unsigned channel,
    int volume_command, int enable) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->enable_volume_command(channel, volume_command, (bool) enable);
    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_effect_command(ModipulateSong song, unsigned channel,
    int effect_command, int effect_value) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->issue_effect_command(channel, effect_command, effect_value);
    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_enable_effect(ModipulateSong song, unsigned channel,
    int effect_command, int enable) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->enable_effect_command(channel, effect_command, (bool) enable);
    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_on_pattern_change(ModipulateSong song,
    modipulate_song_pattern_change_cb cb, void* user_data) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->set_pattern_change_cb(cb, user_data);

    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_on_row_change(ModipulateSong song,
    modipulate_song_row_change_cb cb, void* user_data) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->set_row_change_cb(cb, user_data);

    return MODIPULATE_ERROR_NONE;
}

ModipulateErr modipulate_song_on_note(ModipulateSong song,
    modipulate_song_note_cb cb, void* user_data) {
    if (!modipulateIsInitialized) {
        return MODIPULATE_ERROR_NOT_INITIALIZED;
    }

    ((ModStream*) song)->set_note_change_cb(cb, user_data);

    return MODIPULATE_ERROR_NONE;
}


text:
package com.daa.verifier.Models;

import javax.validation.constraints.NotNull;
import java.math.BigInteger;

/**
 * Created by DK on 12/3/16.
 */
public class SigData {
    @NotNull
    public String sig;

    @NotNull
    public String nonce;

    @NotNull
    public String basename;

    public SigData() {
    }
    public SigData(String sig, BigInteger nonce, String basename) {
        this.setBasename(basename);
        this.setNonce(nonce.toString());
        this.setSig(sig);
    }

    public String getSig() {
        return sig;
    }
    public void setSig(String sig) {
        this.sig = sig;
    }

    public String getNonce() {
        return nonce;
    }

    public void setNonce(String nonce) {
        this.nonce = nonce;
    }

    public String getBasename() {
        return basename;
    }

    public void setBasename(String basename) {
        this.basename = basename;
    }
}


text:
package el.phys;

public class Trans {
	public float x, y;
}


text:
<!DOCTYPE html>

    <title>likeness.Sorting.getDocSort(sspec~details documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../../../../../../../../index.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../../../../../../highlight.css" />

            spare

                :likeness:Sorting.getDocSort(sspec~details

A map of dot-delimited paths to Number directions (1 or -1).

        This document was generated with
        doczar
        at 3:55pm on 8/14/2015


text:
package it.polito.mad.countonme.models;

/**
 * Created by francescobruno on 09/05/17.
 */

public class Share {

    private User mUser;
    private Double mAmount;

    public Share() {
        this( null, 0.0 );
    }

    public Share( User user, Double amount ) {
        mUser   = user;
        mAmount = amount;
    }

    public void setUser( User user ) { mUser = user; }

    public User getUser() { return mUser; }

    public void setAmount( Double amount ) { mAmount = amount; }

    public Double getAmount() { return mAmount; }

}


text:
<?php
$this->load->view("partials/inner_header");
$this->load->view("partials/top_menu");

$this->load->view("partials/inner_top");
?>

<!-- CONTENT -->
<div class="container">
    <?php echo $template['body']; ?>
    <?php $this->load->view('partials/inner_right_part');?>
</div>
<!-- END OF CONTENT -->

<?php
$this->load->view("partials/inner_footer");
?>


text:
<?php

namespace Oro\Bundle\ActivityListBundle\Tests\Functional\Api\Rest;

use Oro\Bundle\TestFrameworkBundle\Test\WebTestCase;
use Oro\Bundle\UserBundle\Entity\User;

/**
 * @dbIsolation
 */
class ActivityListRoleControllerTest extends WebTestCase
{
    protected function setUp()
    {
        $this->initClient([], $this->generateWsseAuthHeader(), true);
        $this->loadFixtures([
            'Oro\Bundle\ActivityListBundle\Tests\Functional\DataFixtures\LoadActivityData',
            'Oro\Bundle\ActivityListBundle\Tests\Functional\DataFixtures\LoadUserData'
        ]);
    }

    /**
     * Test to verify access for user who does not have access to activity other user
     */
    public function testGetListForUserWithOutPermissions()
    {
        $this->markTestSkipped("Test skipped. User wssi do not work. Test entity ACL do not work.");
        $this->client->request(
            'GET',
            $this->getUrl(
                'oro_activity_list_api_get_list',
                [
                    'entityClass' => 'Oro_Bundle_TestFrameworkBundle_Entity_TestActivityTarget',
                    'entityId'    => $this->getReference('test_activity_target_1')->getId()
                ]
            )
        );
        $result = $this->getJsonResponseContent($this->client->getResponse(), 200);
        $this->assertCount(0, $result['data']);
        $this->assertEquals(0, $result['count']);
    }
}


text:
using AppStudio.Uwp.Controls;
using Windows.UI.Xaml;

namespace Windows10News.Layouts.List
{
    public sealed partial class ListGroupedHome : ListLayoutBase
    {
        public ListGroupedHome()
        {
            this.InitializeComponent();
        }
    }
}


text:
<?php

namespace AppBundle\Form\Model;

/**
 * Class GenerateReceiptItemModel.
 *
 * @category FormModel
 */
class GenerateReceiptItemModel
{
    /**
     * @var int
     */
    protected $studentId;

    /**
     * @var string
     */
    protected $studentName;

    /**
     * @var float
     */
    protected $units;

    /**
     * @var float
     */
    protected $unitPrice;

    /**
     * @var float
     */
    protected $discount;

    /**
     * @var bool
     */
    protected $isReadyToGenerate;

    /**
     * @var bool
     */
    protected $isPreviouslyGenerated;

    /**
     * @var bool
     */
    protected $isPrivateLessonType;

    /**
     * Methods.
     */

    /**
     * @return int
     */
    public function getStudentId()
    {
        return $this->studentId;
    }

    /**
     * @param int $studentId
     *
     * @return $this
     */
    public function setStudentId($studentId)
    {
        $this->studentId = $studentId;

        return $this;
    }

    /**
     * @return string
     */
    public function getStudentName()
    {
        return $this->studentName;
    }

    /**
     * @param string $studentName
     *
     * @return $this
     */
    public function setStudentName($studentName)
    {
        $this->studentName = $studentName;

        return $this;
    }

    /**
     * @return float
     */
    public function getUnits()
    {
        return $this->units;
    }

    /**
     * @param float $units
     *
     * @return $this
     */
    public function setUnits($units)
    {
        $this->units = $units;

        return $this;
    }

    /**
     * @return float
     */
    public function getUnitPrice()
    {
        return $this->unitPrice;
    }

    /**
     * @param float $unitPrice
     *
     * @return $this
     */
    public function setUnitPrice($unitPrice)
    {
        $this->unitPrice = $unitPrice;

        return $this;
    }

    /**
     * @return float
     */
    public function getDiscount()
    {
        return $this->discount;
    }

    /**
     * @param float $discount
     *
     * @return $this
     */
    public function setDiscount($discount)
    {
        $this->discount = $discount;

        return $this;
    }

    /**
     * @return bool
     */
    public function isReadyToGenerate()
    {
        return $this->isReadyToGenerate;
    }

    /**
     * @return bool
     */
    public function getIsReadyToGenerate()
    {
        return $this->isReadyToGenerate();
    }

    /**
     * @param bool $isReadyToGenerate
     *
     * @return $this
     */
    public function setIsReadyToGenerate($isReadyToGenerate)
    {
        $this->isReadyToGenerate = $isReadyToGenerate;

        return $this;
    }

    /**
     * @return bool
     */
    public function isPreviouslyGenerated()
    {
        return $this->isPreviouslyGenerated;
    }

    /**
     * @return bool
     */
    public function getIsPreviouslyGenerated()
    {
        return $this->isPreviouslyGenerated();
    }

    /**
     * @param bool $isPreviouslyGenerated
     *
     * @return $this
     */
    public function setIsPreviouslyGenerated($isPreviouslyGenerated)
    {
        $this->isPreviouslyGenerated = $isPreviouslyGenerated;

        return $this;
    }

    /**
     * @return bool
     */
    public function isPrivateLessonType()
    {
        return $this->isPrivateLessonType;
    }

    /**
     * @return bool
     */
    public function getPrivateLessonType()
    {
        return $this->isPrivateLessonType();
    }

    /**
     * @param bool $isPrivateLessonType
     *
     * @return $this
     */
    public function setIsPrivateLessonType($isPrivateLessonType)
    {
        $this->isPrivateLessonType = $isPrivateLessonType;

        return $this;
    }

    /**
     * @return float
     */
    public function getTotal()
    {
        return $this->getUnits() * $this->getUnitPrice() - $this->getDiscount();
    }
}


text:
import { merge } from 'lodash'
import Vue from 'vue'
import Vuelidate from 'vuelidate'
import { mount } from '@vue/test-utils'
import { useI18n } from '../../__utils__/i18n'
import { InputCurrency } from '@/components/Input'
import store from '@/store'
import BigNumber from '@/plugins/bignumber'

jest.mock('@/store', () => {
  return {
    getters: {
      'session/network': jest.fn()
    }
  }
})

Vue.use(Vuelidate)
const i18n = useI18n(Vue)

describe('InputCurrency', () => {
  let mockNetwork

  beforeEach(() => {
    mockNetwork = {
      symbol: '×',
      token: 'NET',
      market: {
        enabled: true
      },
      fractionDigits: 8
    }

    store.getters['session/network'] = mockNetwork
  })

  const mountComponent = config => {
    return mount(InputCurrency, merge({
      i18n,
      propsData: {
        currency: mockNetwork.token,
        value: '',
        minimumAmount: new BigNumber(1e8),
        maximumAmount: new BigNumber(1e8)
      },
      mocks: {
        currency_format: () => 'NET 9.9',
        session_network: mockNetwork
      }
    }, config))
  }

  it('has the right name', () => {
    const wrapper = mountComponent()
    expect(wrapper.name()).toEqual('InputCurrency')
  })

  it('should render', () => {
    const wrapper = mountComponent()
    expect(wrapper.contains('.InputCurrency')).toBeTruthy()
  })

  describe('decimalSeparator', () => {
    it('should be obtained from the locale', () => {
      let wrapper = mountComponent({
        mocks: {
          currency_format: () => 'NET 9.9'
        }
      })
      expect(wrapper.vm.decimalSeparator).toBe('.')

      wrapper = mountComponent({
        mocks: {
          currency_format: () => '9,9 NET'
        }
      })
      expect(wrapper.vm.decimalSeparator).toBe(',')
    })
  })

  describe('thousandSeparator', () => {
    it('should be obtained from the locale', () => {
      let wrapper = mountComponent({
        mocks: {
          currency_format: () => 'NET 9.9'
        }
      })
      expect(wrapper.vm.thousandSeparator).toBe(',')

      wrapper = mountComponent({
        mocks: {
          currency_format: () => '9,9 NET'
        }
      })
      expect(wrapper.vm.thousandSeparator).toBe('.')
    })
  })

  describe('when receiving the `isDisabled` prop', () => {
    it('should be disabled', () => {
      const wrapper = mountComponent({
        propsData: { isDisabled: true }
      })
      const input = wrapper.find('.InputCurrency__input')
      expect(input.attributes().disabled).toBe('disabled')
    })
  })

  describe('when receiving the `helperText` prop', () => {
    it('should show a helper text', () => {
      const helperText = 'example text'
      const wrapper = mountComponent({
        propsData: { helperText }
      })
      const helper = wrapper.find('.InputField__helper')
      expect(helper.text()).toBe(helperText)
    })
  })

  describe('when the input value changes', () => {
    it('should emit the `input` event', () => {
      const wrapper = mountComponent()
      wrapper.find('.InputCurrency input').setValue(99)

      expect(wrapper.emitted('input')[0][0]).toEqual('99')
    })

    it('should emit the `raw` event', () => {
      const wrapper = mountComponent()
      wrapper.find('.InputCurrency input').setValue(99)

      expect(wrapper.emitted('raw')[0][0]).toEqual('99')
    })
  })

  describe('emitInput', () => {
    it('should emit 0 instead of invalid numbers', () => {
      const wrapper = mountComponent()

      wrapper.vm.emitInput('not')
      expect(wrapper.emitted('input')[0][0]).toEqual('0')

      wrapper.vm.emitInput(null)
      expect(wrapper.emitted('input')[1][0]).toEqual('0')
    })

    it('should sanitize the values', () => {
      const wrapper = mountComponent()
      jest.spyOn(wrapper.vm, 'sanitizeNumeric')

      wrapper.vm.emitInput('122,0122')

      expect(wrapper.vm.sanitizeNumeric).toHaveBeenCalledWith('122,0122')
    })

    it('should emit numeric values as Numbers', () => {
      const wrapper = mountComponent()

      wrapper.vm.emitInput('122,0122')
      expect(wrapper.emitted('input')[0][0]).toEqual('122.0122')

      wrapper.vm.emitInput('1,,23')
      expect(wrapper.emitted('input')[1][0]).toEqual('1.23')

      wrapper.vm.emitInput('6,,97')
      expect(wrapper.emitted('input')[2][0]).toEqual('6.97')
    })
  })

  describe('checkAmount', () => {
    it('should return `true`` on Numbers', () => {
      const wrapper = mountComponent()

      expect(wrapper.vm.checkAmount(0)).toBeTrue()
      expect(wrapper.vm.checkAmount(19)).toBeTrue()
      expect(wrapper.vm.checkAmount(19.9999999999)).toBeTrue()
      expect(wrapper.vm.checkAmount(766619.9999999999)).toBeTrue()
    })

    it('should return `true`` on Strings that looks like numbers', () => {
      const wrapper = mountComponent()

      expect(wrapper.vm.checkAmount('19')).toBeTrue()
      expect(wrapper.vm.checkAmount('19.9999999999')).toBeTrue()
      expect(wrapper.vm.checkAmount('766619.9999999999')).toBeTrue()
      expect(wrapper.vm.checkAmount('19,9')).toBeTrue()
      expect(wrapper.vm.checkAmount('19,999')).toBeTrue()
      expect(wrapper.vm.checkAmount('19,999.00')).toBeTrue()
      expect(wrapper.vm.checkAmount('19.999,00')).toBeTrue()
    })

    it('should return `true` on Strings that could be sanitized as numbers', () => {
      const wrapper = mountComponent()

      expect(wrapper.vm.checkAmount('.9')).toBeTrue()
      expect(wrapper.vm.checkAmount(',95')).toBeTrue()
      expect(wrapper.vm.checkAmount('  .79  ')).toBeTrue()
      expect(wrapper.vm.checkAmount('  33')).toBeTrue()
      expect(wrapper.vm.checkAmount(' 323 3 3')).toBeTrue()
      expect(wrapper.vm.checkAmount('766..999')).toBeTrue()
      expect(wrapper.vm.checkAmount('16  4.99')).toBeTrue()
      expect(wrapper.vm.checkAmount('7,,36')).toBeTrue()
      expect(wrapper.vm.checkAmount('5,,44.3')).toBeTrue()
    })

    it('should return `false` on Strings that does not look like numbers', () => {
      const wrapper = mountComponent()

      expect(wrapper.vm.checkAmount('')).toBeFalse()
      expect(wrapper.vm.checkAmount('a.9')).toBeFalse()
      expect(wrapper.vm.checkAmount('19a.99')).toBeFalse()
      expect(wrapper.vm.checkAmount('as97')).toBeFalse()
    })
  })

  describe('sanitizeNumeric', () => {
    it('should parse numeric values', () => {
      const wrapper = mountComponent()

      expect(wrapper.vm.sanitizeNumeric('10')).toEqual('10')
      expect(wrapper.vm.sanitizeNumeric('1.10')).toEqual('1.10')
      expect(wrapper.vm.sanitizeNumeric('.999')).toEqual('0.999')
      expect(wrapper.vm.sanitizeNumeric('..87')).toEqual('0.87')
      expect(wrapper.vm.sanitizeNumeric(',333')).toEqual('0.333')
      expect(wrapper.vm.sanitizeNumeric(',,4')).toEqual('0.4')
      expect(wrapper.vm.sanitizeNumeric('  8')).toEqual('8')
      expect(wrapper.vm.sanitizeNumeric('73  ')).toEqual('73')
      expect(wrapper.vm.sanitizeNumeric('  59  ')).toEqual('59')
      expect(wrapper.vm.sanitizeNumeric(1.1)).toEqual('1.1')
      expect(wrapper.vm.sanitizeNumeric(1e-8)).toEqual('0.00000001')
      expect(wrapper.vm.sanitizeNumeric(1e-6)).toEqual('0.000001')
      expect(wrapper.vm.sanitizeNumeric('1,1')).toEqual('1.1')
      expect(wrapper.vm.sanitizeNumeric('100.200.300,40')).toEqual('100200300.40')
      expect(wrapper.vm.sanitizeNumeric('7.777')).toEqual('7.777')
      expect(wrapper.vm.sanitizeNumeric('9,999')).toEqual('9999')
      expect(wrapper.vm.sanitizeNumeric('9,999,999.99')).toEqual('9999999.99')
      expect(wrapper.vm.sanitizeNumeric('10 000 000.5')).toEqual('10000000.5')
      expect(wrapper.vm.sanitizeNumeric('30 000.555')).toEqual('30000.555')
      expect(wrapper.vm.sanitizeNumeric('80 000,8')).toEqual('80000.8')
      expect(wrapper.vm.sanitizeNumeric('30 300,666')).toEqual('30300.666')
      expect(wrapper.vm.sanitizeNumeric('11_111_111.11')).toEqual('11111111.11')
      expect(wrapper.vm.sanitizeNumeric('33_333,33')).toEqual('33333.33')
      expect(wrapper.vm.sanitizeNumeric('10  007')).toEqual('10007')
      expect(wrapper.vm.sanitizeNumeric('49,,390.1')).toEqual('49390.1')
      expect(wrapper.vm.sanitizeNumeric('1..23')).toEqual('1.23')
      expect(wrapper.vm.sanitizeNumeric('6,,19')).toEqual('6.19')
      expect(wrapper.vm.sanitizeNumeric('9 8.34')).toEqual('98.34')
    })
  })

  describe('updateInputValue', () => {
    describe('when receiving an empty value', () => {
      it('should empty the input value', () => {
        const wrapper = mountComponent()
        wrapper.vm.inputValue = 10

        wrapper.vm.updateInputValue('')
        expect(wrapper.vm.inputValue).toEqual('')
      })

      it('should return `true`', () => {
        const wrapper = mountComponent()

        expect(wrapper.vm.updateInputValue('')).toBeTrue()
      })
    })

    describe('when receiving values that look like numbers', () => {
      it('should sanitize it', () => {
        const wrapper = mountComponent()
        wrapper.vm.inputValue = 1
        jest.spyOn(wrapper.vm, 'sanitizeNumeric')

        wrapper.vm.updateInputValue('33.333,33')

        expect(wrapper.vm.inputValue).toEqual('33333.33')
        expect(wrapper.vm.sanitizeNumeric).toHaveBeenCalledWith('33.333,33')
      })

      it('should return `true`', () => {
        const wrapper = mountComponent()

        expect(wrapper.vm.updateInputValue('10')).toBeTrue()
      })
    })

    describe('when receiving values that do not look like numbers', () => {
      it('should not change the input value', () => {
        const wrapper = mountComponent()
        wrapper.vm.inputValue = 10

        wrapper.vm.updateInputValue('not')
        expect(wrapper.vm.inputValue).toEqual(10)

        wrapper.vm.updateInputValue(null)
        expect(wrapper.vm.inputValue).toEqual(10)
      })

      it('should return `false`', () => {
        const wrapper = mountComponent()

        expect(wrapper.vm.updateInputValue('not')).toBeFalse()
        expect(wrapper.vm.updateInputValue(null)).toBeFalse()
      })
    })
  })
})


text:
@class UICollectionViewWaterfallLayout;
@protocol UICollectionViewDelegateWaterfallLayout <UICollectionViewDelegate>
- (CGFloat)collectionView:(UICollectionView *)collectionView
                   layout:(UICollectionViewWaterfallLayout *)collectionViewLayout
 heightForItemAtIndexPath:(NSIndexPath *)indexPath;
@end

@interface UICollectionViewWaterfallLayout : UICollectionViewLayout
@property (nonatomic, weak) id<UICollectionViewDelegateWaterfallLayout> delegate;
@property (nonatomic, assign) NSUInteger columnCount; // How many columns
@property (nonatomic, assign) CGFloat itemWidth; // Width for every column
@property (nonatomic, assign) UIEdgeInsets sectionInset; // The margins used to lay out content in a section
@end


text:
SshSFtp &SshSftpCommand::sftp() const
{
    return m_sftp;
}

void SshSftpCommand::setName(const QString &name)
{
    m_name = name;
}

QString SshSftpCommand::name() const
{
    return m_name;
}

QStringList SshSftpCommand::errMsg() const
{
    return m_errMsg;
}

SshSftpCommand::SshSftpCommand(SshSFtp &sftp)
    : QObject(qobject_cast<QObject*>(&sftp))
    , m_sftp(sftp)
{
    m_state = CommandState::Openning;
}

SshSftpCommand::CommandState SshSftpCommand::state() const
{
    return m_state;
}

void SshSftpCommand::setState(const CommandState &state)
{
    if(m_state != state)
    {
        m_state = state;
        emit stateChanged(m_state);
    }
}


text:
define(
  'tinymce.plugins.nonbreaking.api.Commands',
  [
    'tinymce.plugins.nonbreaking.core.Actions'
  ],
  function (Actions) {
    var register = function (editor) {
      editor.addCommand('mceNonBreaking', function () {
        Actions.insertNbsp(editor, 1);
      });
    };

    return {
      register: register
    };
  }
);


text:
/**
 * @author kotmw0701
 *
 */
package jp.kotmw.splatoon.util;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

public class NMSBase {

	protected static void sendPacket(Player player, Object packet) {
		try {
			Object handle = player.getClass().getMethod("getHandle").invoke(player);
			Object pConnection = handle.getClass().getField("playerConnection").get(handle);
			pConnection.getClass().getMethod("sendPacket", getNMSClass("Packet")).invoke(pConnection, packet);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	protected static Class<?> getNMSClass(String name) {
		String ver = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
		try {
			return Class.forName("net.minecraft.server."+ver+"."+name);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			return null;
		}
	}

	protected enum Ver{
		v1_9, //byte
		v1_10, //byte
		v1_11, //byte
		v1_12 //ChatMessageType
	}

	protected static boolean isCMT() {
		String ver = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
		if(ver.contains(Ver.v1_9.toString()))
			return false;
		else if (ver.contains(Ver.v1_10.toString()))
			return false;
		else if (ver.contains(Ver.v1_11.toString()))
			return false;
		else if (ver.contains(Ver.v1_12.toString()))
			return true;
		return true;
	}
}


text:
layout: default
title: Bukkit Plugin Information for Minecraft Servers
page: home
---

The Best API for Minecraft Plugin Information

Formerly empowering your application yesterday

    Documentation

Announcement

The BukGet project is shutting down. More details...

Link to database dump


text:
include ../../Library/GNU.mk

Title=		Ragel State Machine Compiler
Name=		ragel
Version=	6.9
Site=		http://www.colm.net/open-source/ragel/
Source=		http://www.colm.net/wp-content/uploads/2014/10/$(Name)-$(Version).tar.gz
License=	GPL

define check_hook
cd $(BuildDir)/test ; ./runtests
endef

define test_hook
$(BinDir)/ragel --version | grep $(Version)
endef


text:
DceLti::Engine.routes.draw do
  resources :sessions, only: [:create] do
    collection do
      get :invalid
    end
  end

  resources :configs, only: [:index]
end


text:
namespace google {
namespace protobuf {
namespace compiler {
namespace java {

// Commonly-used separator comments.  Thick is a line of '=', thin is a line
// of '-'.
extern const char kThickSeparator[];
extern const char kThinSeparator[];

// Converts a name to camel-case. If cap_first_letter is true, capitalize the
// first letter.
string UnderscoresToCamelCase(const string& name, bool cap_first_letter);
// Converts the field's name to camel-case, e.g. "foo_bar_baz" becomes
// "fooBarBaz" or "FooBarBaz", respectively.
string UnderscoresToCamelCase(const FieldDescriptor* field);
string UnderscoresToCapitalizedCamelCase(const FieldDescriptor* field);

// Similar, but for method names.  (Typically, this merely has the effect
// of lower-casing the first letter of the name.)
string UnderscoresToCamelCase(const MethodDescriptor* method);

// Get an identifier that uniquely identifies this type within the file.
// This is used to declare static variables related to this type at the
// outermost file scope.
string UniqueFileScopeIdentifier(const Descriptor* descriptor);

// Strips ".proto" or ".protodevel" from the end of a filename.
string StripProto(const string& filename);

// Gets the unqualified class name for the file.  For each .proto file, there
// will be one Java class containing all the immutable messages and another
// Java class containing all the mutable messages.
// TODO(xiaofeng): remove the default value after updating client code.
string FileClassName(const FileDescriptor* file, bool immutable = true);

// Returns the file's Java package name.
string FileJavaPackage(const FileDescriptor* file, bool immutable = true);

// Returns output directory for the given package name.
string JavaPackageToDir(string package_name);

// Converts the given fully-qualified name in the proto namespace to its
// fully-qualified name in the Java namespace, given that it is in the given
// file.
// TODO(xiaofeng): this method is deprecated and should be removed in the
// future.
string ToJavaName(const string& full_name,
                  const FileDescriptor* file);

// TODO(xiaofeng): the following methods are kept for they are exposed
// publicly in //google/protobuf/compiler/java/names.h. They return
// immutable names only and should be removed after mutable API is
// integrated into google3.
string ClassName(const Descriptor* descriptor);
string ClassName(const EnumDescriptor* descriptor);
string ClassName(const ServiceDescriptor* descriptor);
string ClassName(const FileDescriptor* descriptor);

// Comma-separate list of option-specified interfaces implemented by the
// Message, to follow the "implements" declaration of the Message definition.
string ExtraMessageInterfaces(const Descriptor* descriptor);
// Comma-separate list of option-specified interfaces implemented by the
// MutableMessage, to follow the "implements" declaration of the MutableMessage
// definition.
string ExtraMutableMessageInterfaces(const Descriptor* descriptor);
// Comma-separate list of option-specified interfaces implemented by the
// Builder, to follow the "implements" declaration of the Builder definition.
string ExtraBuilderInterfaces(const Descriptor* descriptor);
// Comma-separate list of option-specified interfaces extended by the
// MessageOrBuilder, to follow the "extends" declaration of the
// MessageOrBuilder definition.
string ExtraMessageOrBuilderInterfaces(const Descriptor* descriptor);

// Get the unqualified Java class name for mutable messages. i.e. without
// package or outer classnames.
inline string ShortMutableJavaClassName(const Descriptor* descriptor) {
  return descriptor->name();
}

// Whether we should generate multiple java files for messages.
inline bool MultipleJavaFiles(
    const FileDescriptor* descriptor, bool immutable) {
  return descriptor->options().java_multiple_files();
}

// Get the unqualified name that should be used for a field's field
// number constant.
string FieldConstantName(const FieldDescriptor *field);

// Returns the type of the FieldDescriptor.
// This does nothing interesting for the open source release, but is used for
// hacks that improve compatibility with version 1 protocol buffers at Google.
FieldDescriptor::Type GetType(const FieldDescriptor* field);

enum JavaType {
  JAVATYPE_INT,
  JAVATYPE_LONG,
  JAVATYPE_FLOAT,
  JAVATYPE_DOUBLE,
  JAVATYPE_BOOLEAN,
  JAVATYPE_STRING,
  JAVATYPE_BYTES,
  JAVATYPE_ENUM,
  JAVATYPE_MESSAGE
};

JavaType GetJavaType(const FieldDescriptor* field);

const char* PrimitiveTypeName(JavaType type);

// Get the fully-qualified class name for a boxed primitive type, e.g.
// "java.lang.Integer" for JAVATYPE_INT.  Returns NULL for enum and message
// types.
const char* BoxedPrimitiveTypeName(JavaType type);

// Get the name of the java enum constant representing this type. E.g.,
// "INT32" for FieldDescriptor::TYPE_INT32. The enum constant's full
// name is "com.google.protobuf.WireFormat.FieldType.INT32".
const char* FieldTypeName(const FieldDescriptor::Type field_type);

class ClassNameResolver;
string DefaultValue(const FieldDescriptor* field, bool immutable,
                    ClassNameResolver* name_resolver);
inline string ImmutableDefaultValue(const FieldDescriptor* field,
                                    ClassNameResolver* name_resolver) {
  return DefaultValue(field, true, name_resolver);
}
bool IsDefaultValueJavaDefault(const FieldDescriptor* field);

// Does this message class have generated parsing, serialization, and other
// standard methods for which reflection-based fallback implementations exist?
inline bool HasGeneratedMethods(const Descriptor* descriptor) {
  return descriptor->file()->options().optimize_for() !=
           FileOptions::CODE_SIZE;
}

// Does this message have specialized equals() and hashCode() methods?
inline bool HasEqualsAndHashCode(const Descriptor* descriptor) {
  return descriptor->file()->options().java_generate_equals_and_hash();
}

// Does this message class have descriptor and reflection methods?
inline bool HasDescriptorMethods(const Descriptor* descriptor) {
  return descriptor->file()->options().optimize_for() !=
           FileOptions::LITE_RUNTIME;
}
inline bool HasDescriptorMethods(const EnumDescriptor* descriptor) {
  return descriptor->file()->options().optimize_for() !=
           FileOptions::LITE_RUNTIME;
}
inline bool HasDescriptorMethods(const FileDescriptor* descriptor) {
  return descriptor->options().optimize_for() !=
           FileOptions::LITE_RUNTIME;
}

// Should we generate generic services for this file?
inline bool HasGenericServices(const FileDescriptor *file) {
  return file->service_count() > 0 &&
         file->options().optimize_for() != FileOptions::LITE_RUNTIME &&
         file->options().java_generic_services();
}

inline bool IsLazy(const FieldDescriptor* descriptor) {
  // Currently, the proto-lite version suports lazy field.
  // TODO(niwasaki): Support lazy fields also for other proto runtimes.
  if (descriptor->file()->options().optimize_for() !=
      FileOptions::LITE_RUNTIME) {
    return false;
  }
  return descriptor->options().lazy();
}

// Methods for shared bitfields.

// Gets the name of the shared bitfield for the given index.
string GetBitFieldName(int index);

// Gets the name of the shared bitfield for the given bit index.
// Effectively, GetBitFieldName(bitIndex / 32)
string GetBitFieldNameForBit(int bitIndex);

// Generates the java code for the expression that returns the boolean value
// of the bit of the shared bitfields for the given bit index.
// Example: "((bitField1_ & 0x04) == 0x04)"
string GenerateGetBit(int bitIndex);

// Generates the java code for the expression that sets the bit of the shared
// bitfields for the given bit index.
// Example: "bitField1_ = (bitField1_ | 0x04)"
string GenerateSetBit(int bitIndex);

// Generates the java code for the expression that clears the bit of the shared
// bitfields for the given bit index.
// Example: "bitField1_ = (bitField1_ & ~0x04)"
string GenerateClearBit(int bitIndex);

// Does the same as GenerateGetBit but operates on the bit field on a local
// variable. This is used by the builder to copy the value in the builder to
// the message.
// Example: "((from_bitField1_ & 0x04) == 0x04)"
string GenerateGetBitFromLocal(int bitIndex);

// Does the same as GenerateSetBit but operates on the bit field on a local
// variable. This is used by the builder to copy the value in the builder to
// the message.
// Example: "to_bitField1_ = (to_bitField1_ | 0x04)"
string GenerateSetBitToLocal(int bitIndex);

// Does the same as GenerateGetBit but operates on the bit field on a local
// variable. This is used by the parsing constructor to record if a repeated
// field is mutable.
// Example: "((mutable_bitField1_ & 0x04) == 0x04)"
string GenerateGetBitMutableLocal(int bitIndex);

// Does the same as GenerateSetBit but operates on the bit field on a local
// variable. This is used by the parsing constructor to record if a repeated
// field is mutable.
// Example: "mutable_bitField1_ = (mutable_bitField1_ | 0x04)"
string GenerateSetBitMutableLocal(int bitIndex);

// Returns whether the JavaType is a reference type.
bool IsReferenceType(JavaType type);

// Returns the capitalized name for calling relative functions in
// CodedInputStream
const char* GetCapitalizedType(const FieldDescriptor* field, bool immutable);

// For encodings with fixed sizes, returns that size in bytes.  Otherwise
// returns -1.
int FixedSize(FieldDescriptor::Type type);

// Comparators used to sort fields in MessageGenerator
struct FieldOrderingByNumber {
  inline bool operator()(const FieldDescriptor* a,
                         const FieldDescriptor* b) const {
    return a->number() < b->number();
  }
};

struct ExtensionRangeOrdering {
  bool operator()(const Descriptor::ExtensionRange* a,
                  const Descriptor::ExtensionRange* b) const {
    return a->start < b->start;
  }
};

// Sort the fields of the given Descriptor by number into a new[]'d array
// and return it. The caller should delete the returned array.
const FieldDescriptor** SortFieldsByNumber(const Descriptor* descriptor);

// Does this message class have any packed fields?
inline bool HasPackedFields(const Descriptor* descriptor) {
  for (int i = 0; i < descriptor->field_count(); i++) {
    if (descriptor->field(i)->is_packed()) {
      return true;
    }
  }
  return false;
}

// Check a message type and its sub-message types recursively to see if any of
// them has a required field. Return true if a required field is found.
bool HasRequiredFields(const Descriptor* descriptor);

// Whether a .proto file supports field presence test for non-message types.
inline bool SupportFieldPresence(const FileDescriptor* descriptor) {
  return descriptor->syntax() != FileDescriptor::SYNTAX_PROTO3;
}

// Whether generate classes expose public PARSER instances.
inline bool ExposePublicParser(const FileDescriptor* descriptor) {
  // TODO(liujisi): Mark the PARSER private in 3.1.x releases.
  return descriptor->syntax() == FileDescriptor::SYNTAX_PROTO2;
}

// Whether unknown enum values are kept (i.e., not stored in UnknownFieldSet
// but in the message and can be queried using additional getters that return
// ints.
inline bool SupportUnknownEnumValue(const FileDescriptor* descriptor) {
  return descriptor->syntax() == FileDescriptor::SYNTAX_PROTO3;
}

// Check whether a mesasge has repeated fields.
bool HasRepeatedFields(const Descriptor* descriptor);

inline bool IsMapEntry(const Descriptor* descriptor) {
  return descriptor->options().map_entry();
}

inline bool IsMapField(const FieldDescriptor* descriptor) {
  return descriptor->is_map();
}

inline bool PreserveUnknownFields(const Descriptor* descriptor) {
  return descriptor->file()->syntax() != FileDescriptor::SYNTAX_PROTO3;
}

inline bool IsAnyMessage(const Descriptor* descriptor) {
  return descriptor->full_name() == "google.protobuf.Any";
}

inline bool CheckUtf8(const FieldDescriptor* descriptor) {
  return descriptor->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ||
      descriptor->file()->options().java_string_check_utf8();
}

}  // namespace java
}  // namespace compiler
}  // namespace protobuf

}  // namespace google
#endif  // GOOGLE_PROTOBUF_COMPILER_JAVA_HELPERS_H__


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Syll. fung. (Abellini) 8: 547 (1889)

#### Original name
Peziza macrotis Berk.

### Remarks
null


text:
using Gluon.Relay.Contracts;
using System;

namespace Gluon.Relay.Signalr.Client
{
    public class NullService : IServiceType
    {
        public void Execute(IRemoteMethodInvoker proxy, object request)
        {
            throw new NotImplementedException();
        }
    }
}


text:
export interface Vector2 {
  x: number;
  y: number;
}


text:
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.hadoop.hive.metastore.api;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class Decimal implements org.apache.thrift.TBase<Decimal, Decimal._Fields>, java.io.Serializable, Cloneable, Comparable<Decimal> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Decimal");

  private static final org.apache.thrift.protocol.TField SCALE_FIELD_DESC = new org.apache.thrift.protocol.TField("scale", org.apache.thrift.protocol.TType.I16, (short)3);
  private static final org.apache.thrift.protocol.TField UNSCALED_FIELD_DESC = new org.apache.thrift.protocol.TField("unscaled", org.apache.thrift.protocol.TType.STRING, (short)1);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new DecimalStandardSchemeFactory());
    schemes.put(TupleScheme.class, new DecimalTupleSchemeFactory());
  }

  private short scale; // required
  private ByteBuffer unscaled; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    SCALE((short)3, "scale"),
    UNSCALED((short)1, "unscaled");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 3: // SCALE
          return SCALE;
        case 1: // UNSCALED
          return UNSCALED;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __SCALE_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.SCALE, new org.apache.thrift.meta_data.FieldMetaData("scale", org.apache.thrift.TFieldRequirementType.REQUIRED,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
    tmpMap.put(_Fields.UNSCALED, new org.apache.thrift.meta_data.FieldMetaData("unscaled", org.apache.thrift.TFieldRequirementType.REQUIRED,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Decimal.class, metaDataMap);
  }

  public Decimal() {
  }

  public Decimal(
    short scale,
    ByteBuffer unscaled)
  {
    this();
    this.scale = scale;
    setScaleIsSet(true);
    this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(unscaled);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Decimal(Decimal other) {
    __isset_bitfield = other.__isset_bitfield;
    this.scale = other.scale;
    if (other.isSetUnscaled()) {
      this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(other.unscaled);
    }
  }

  public Decimal deepCopy() {
    return new Decimal(this);
  }

  @Override
  public void clear() {
    setScaleIsSet(false);
    this.scale = 0;
    this.unscaled = null;
  }

  public short getScale() {
    return this.scale;
  }

  public void setScale(short scale) {
    this.scale = scale;
    setScaleIsSet(true);
  }

  public void unsetScale() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCALE_ISSET_ID);
  }

  /** Returns true if field scale is set (has been assigned a value) and false otherwise */
  public boolean isSetScale() {
    return EncodingUtils.testBit(__isset_bitfield, __SCALE_ISSET_ID);
  }

  public void setScaleIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCALE_ISSET_ID, value);
  }

  public byte[] getUnscaled() {
    setUnscaled(org.apache.thrift.TBaseHelper.rightSize(unscaled));
    return unscaled == null ? null : unscaled.array();
  }

  public ByteBuffer bufferForUnscaled() {
    return org.apache.thrift.TBaseHelper.copyBinary(unscaled);
  }

  public void setUnscaled(byte[] unscaled) {
    this.unscaled = unscaled == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(unscaled, unscaled.length));
  }

  public void setUnscaled(ByteBuffer unscaled) {
    this.unscaled = org.apache.thrift.TBaseHelper.copyBinary(unscaled);
  }

  public void unsetUnscaled() {
    this.unscaled = null;
  }

  /** Returns true if field unscaled is set (has been assigned a value) and false otherwise */
  public boolean isSetUnscaled() {
    return this.unscaled != null;
  }

  public void setUnscaledIsSet(boolean value) {
    if (!value) {
      this.unscaled = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case SCALE:
      if (value == null) {
        unsetScale();
      } else {
        setScale((Short)value);
      }
      break;

    case UNSCALED:
      if (value == null) {
        unsetUnscaled();
      } else {
        setUnscaled((ByteBuffer)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case SCALE:
      return getScale();

    case UNSCALED:
      return getUnscaled();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case SCALE:
      return isSetScale();
    case UNSCALED:
      return isSetUnscaled();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof Decimal)
      return this.equals((Decimal)that);
    return false;
  }

  public boolean equals(Decimal that) {
    if (that == null)
      return false;

    boolean this_present_scale = true;
    boolean that_present_scale = true;
    if (this_present_scale || that_present_scale) {
      if (!(this_present_scale && that_present_scale))
        return false;
      if (this.scale != that.scale)
        return false;
    }

    boolean this_present_unscaled = true && this.isSetUnscaled();
    boolean that_present_unscaled = true && that.isSetUnscaled();
    if (this_present_unscaled || that_present_unscaled) {
      if (!(this_present_unscaled && that_present_unscaled))
        return false;
      if (!this.unscaled.equals(that.unscaled))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_scale = true;
    list.add(present_scale);
    if (present_scale)
      list.add(scale);

    boolean present_unscaled = true && (isSetUnscaled());
    list.add(present_unscaled);
    if (present_unscaled)
      list.add(unscaled);

    return list.hashCode();
  }

  @Override
  public int compareTo(Decimal other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetScale()).compareTo(other.isSetScale());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScale()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scale, other.scale);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUnscaled()).compareTo(other.isSetUnscaled());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnscaled()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unscaled, other.unscaled);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("Decimal(");
    boolean first = true;

    sb.append("scale:");
    sb.append(this.scale);
    first = false;
    if (!first) sb.append(", ");
    sb.append("unscaled:");
    if (this.unscaled == null) {
      sb.append("null");
    } else {
      org.apache.thrift.TBaseHelper.toString(this.unscaled, sb);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (!isSetScale()) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'scale' is unset! Struct:" + toString());
    }

    if (!isSetUnscaled()) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'unscaled' is unset! Struct:" + toString());
    }

    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class DecimalStandardSchemeFactory implements SchemeFactory {
    public DecimalStandardScheme getScheme() {
      return new DecimalStandardScheme();
    }
  }

  private static class DecimalStandardScheme extends StandardScheme<Decimal> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, Decimal struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 3: // SCALE
            if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
              struct.scale = iprot.readI16();
              struct.setScaleIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 1: // UNSCALED
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.unscaled = iprot.readBinary();
              struct.setUnscaledIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, Decimal struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.unscaled != null) {
        oprot.writeFieldBegin(UNSCALED_FIELD_DESC);
        oprot.writeBinary(struct.unscaled);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(SCALE_FIELD_DESC);
      oprot.writeI16(struct.scale);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class DecimalTupleSchemeFactory implements SchemeFactory {
    public DecimalTupleScheme getScheme() {
      return new DecimalTupleScheme();
    }
  }

  private static class DecimalTupleScheme extends TupleScheme<Decimal> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      oprot.writeI16(struct.scale);
      oprot.writeBinary(struct.unscaled);
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, Decimal struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.scale = iprot.readI16();
      struct.setScaleIsSet(true);
      struct.unscaled = iprot.readBinary();
      struct.setUnscaledIsSet(true);
    }
  }

}


text:
<?php

/**
 * @file
 * Handles the Entity publication.
 */

/**
 * Handles publishing using a Facebook publication entity.
 */
class FBAutopostEntity extends FBAutopost {
  /**
   * Publishes content stored in a Facebook publication entity
   *
   * @param FacebookPublicationEntity $publication
   *   The fully loaded Facebook publication entity.
   * @param string $page_id
   *   Page id (among those already selected via UI).
   *   If this is present it will override the parameter destination.
   *   Use 'me' to publish to the user's timeline
   *
   * @return string
   *   Facebook id string for the publication. Needed to edit, or delete the
   *   publication.
   *
   * @throws FBAutopostException
   * @see FBAutopost::publish()
   */
  public function publishEntity(FacebookPublicationEntity $publication, string $page_id = NULL) {
    // Invoke FBAutopost::publish() with the parameters from $publication.
    return parent::publish(array(
      'type' => $publication->type,
      'params' => fb_autopost_entity_get_properties($publication),
      // We need to control serialization to handle class loading
      'entity' => serialize($publication),
    ), $page_id);
  }

  /**
   * Deletes a publication from facebook stored in an entity.
   *
   * @param FacebookPublicationEntity $publication
   *   The fully loaded Facebook publication entity.
   *
   * @return boolean
   *   TRUE if the publication was deleted successfully.
   *
   * @throws FBAutopostException
   * @see FBAutopost::remoteDelete()
   */
  public function remoteEntityDelete(FacebookPublicationEntity $publication) {
    // Get a wrapper for the entity and extract the remote ID.
    $wrapper = entity_metadata_wrapper('facebook_publication', $publication);
    $remote_id = $wrapper->facebook_id->value();
    // If there is a remote ID in return, then delete the associated
    // publication.
    if (!empty($remote_id)) {
      return parent::remoteDelete($remote_id);
    }
    else {
      throw new FBAutopostException(t('Remote ID could not be found.'), FBAutopost::missing_param, WATCHDOG_ERROR);
    }
  }

  /**
   * Edits a publication in facebook from a stored entity.
   *
   * @param FacebookPublicationEntity $publication
   *   The fully loaded Facebook publication entity
   *
   * @throws FBAutopostException
   * @see FBAutopost::remoteEdit()
   */
  public function remoteEntityEdit(FacebookPublicationEntity $publication) {
    // In this case, edit means delete + publish. This has the side effect that
    // the ID is not preserved.
    if ($this->remoteEntityDelete($publication)) {
      return $this->publishEntity($publication);
    }
  }
}


text:
#include "org_mitk_gui_qt_properties_Activator.h"
#include "QmitkPropertiesPreferencePage.h"
#include "QmitkPropertyTreeView.h"
#include <QtPlugin>

ctkPluginContext* mitk::org_mitk_gui_qt_properties_Activator::m_Context = NULL;

ctkPluginContext* mitk::org_mitk_gui_qt_properties_Activator::GetContext()
{
  return m_Context;
}

void mitk::org_mitk_gui_qt_properties_Activator::start(ctkPluginContext* context)
{
  BERRY_REGISTER_EXTENSION_CLASS(QmitkPropertiesPreferencePage, context);
  BERRY_REGISTER_EXTENSION_CLASS(QmitkPropertyTreeView, context);
  m_Context = context;
}

void mitk::org_mitk_gui_qt_properties_Activator::stop(ctkPluginContext*)
{
  m_Context = NULL;
}

Q_EXPORT_PLUGIN2(org_mitk_gui_qt_properties, mitk::org_mitk_gui_qt_properties_Activator)


text:
require 'minitest/autorun'
require "minitest/reporters"

Minitest::Reporters.use! Minitest::Reporters::DefaultReporter.new(:color => true)  # => Redgreen-capable version of standard Minitest reporter
# Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new     # => Turn-like output that reads like a spec

Minitest.after_run do
end


text:
<?php

namespace Sw2\Forms;

use Nette;
use Nette\Forms\Controls\BaseControl;
use Nette\Utils\ArrayHash;

/**
 * Class EntityFormFactory
 *
 * @package Sw2\Forms
 */
abstract class EntityFormFactory
{
	use TContainerHandler;

	/** @var Nette\Localization\ITranslator */
	protected $translator;

	/** @var Nette\Forms\IFormRenderer */
	private $formRenderer;

	/**
	 * @param Nette\Localization\ITranslator $translator
	 * @param Nette\Forms\IFormRenderer $formRenderer
	 */
	public function __construct(Nette\Localization\ITranslator $translator, Nette\Forms\IFormRenderer $formRenderer)
	{
		$this->translator = $translator;
		$this->formRenderer = $formRenderer;
	}

	/**
	 * @param IFormEntity|null $entity
	 * @return Form
	 */
	public final function create(IFormEntity $entity = NULL)
	{
		$form = new Form;
		$form->setTranslator($this->translator);
		$form->setRenderer($this->getFormRenderer());
		$this->build($form, $entity);

		$form->onAttached[] = function (Form $self) use ($entity) {
			$this->buildToggles($self, "frm-{$self->name}");
			if ($entity !== NULL) {
				$this->setDefaultsByEntity($self, $entity);
			}
		};
		$form->beforeValidate[] = function (Form $self) {
			return $this->beforeValidate($self->values);
		};
		$form->onValidate[] = function (Form $self) use ($entity) {
			$this->onValidate($self, $entity);
		};

		return $form;
	}

	/**
	 * @return Nette\Forms\IFormRenderer
	 */
	protected function getFormRenderer()
	{
		return $this->formRenderer;
	}

	/**
	 * @param Form $form
	 */
	abstract protected function build(Form $form, IFormEntity $entity = NULL);

	/**
	 * @param Form|BaseControl[] $self
	 * @param string $fid
	 */
	protected function buildToggles(Form $self, $fid)
	{
	}

	/**
	 * @param ArrayHash $values
	 *
	 * @return ArrayHash
	 */
	protected function beforeValidate(ArrayHash $values)
	{
		return $values;
	}

	/**
	 * @param Form $form
	 */
	protected function onValidate(Form $form, IFormEntity $entity = NULL)
	{
	}

	/**
	 * Method for set values by existing item.
	 *
	 * @param Form $form
	 * @param IFormEntity $entity
	 */
	abstract protected function setDefaultsByEntity(Form $form, IFormEntity $entity);

}


text:
**Attention! This repository is not currently maintained, and is kept for historical purpose only. Fork your copy away!**

_Thanks everyone for support <3_

:lock::lock::lock:

Scrollyeah :+1:
=============

Puts floats in single line.

## Getting Started

To make Scrollyeah work on a page:

1. Link to the newest jQuery, scrollyeah.css & scrollyeah.js.
1. Add elements to `<div class="scrollyeah"></div>`.

Basic example:

```html
<script src="jquery.js"></script>
<link  href="scrollyeah.css" rel="stylesheet" />
<script src="scrollyeah.js"></script>

<div class="scrollyeah">
  <div class="float">1</div>
  <div class="with-any-class">2</div>
  <div class="yeah">3</div>
  <!-- ... -->
</div>
```

## Options

Options are passed through the `data-optionName` attributes:

```html
<div class="scrollyeah" data-shadows="false" data-disableIfFit="true">
  <!-- ... -->
</div>
```

#### `shadows`

Enables shadows.

#### `maxWidth`

Inner content max-width in pixels. Increase if your content wider than 999999px.

#### `disableIfFit`

Disables dragging if no overflow.

#### `centerIfFit`

Centers content if width enough.

#### `triggerScrollyeah`

Triggers `scrollyeah` event on element.

Default options:

```javascript
{
  maxWidth: 999999,
  shadows: true,
  disableIfFit: true,
  centerIfFit: false,
  triggerScrollyeah: false
}
```

## Examples

1. [Default](http://artpolikarpov.github.io/scrollyeah/examples/default.html)
1. [Disable if fit](http://artpolikarpov.github.io/scrollyeah/examples/disable-if-fit.html)
1. [Center if fit](http://artpolikarpov.github.io/scrollyeah/examples/center-if-fit.html)
1. [Parallax](http://artpolikarpov.github.io/scrollyeah/examples/parallax.html)

## Live example

* http://ilyabirman.ru/

jQuery (1.9+) is required.

## License
Copyright © 2012 Artem Polikarpov
Licensed under the MIT License.


text:
class Application < ActiveRecord::Base
  belongs_to :company

  validates_presence_of   :company_id
  validates_presence_of   :name
  validates_uniqueness_of :name, :scope => :company_id

  validates_format_of :key, :with => /\A\w[\w\.+\-_]+$/, :message => I18n.t("edit.errors.invalid_name_alpha_only")
end


text:
package com.acme.samples.local.stepdef;

import com.acme.samples.local.context.LocalContext;
import com.acme.samples.local.pages.alert.SwitchAlertPage;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import org.junit.Assert;
import org.openqa.selenium.UnhandledAlertException;

import javax.inject.Inject;

public class SwitchToAlertStepDef {

    private final SwitchAlertPage alertPage;
    private final LocalContext context;

    @Inject
    public SwitchToAlertStepDef(final SwitchAlertPage alertPage, final LocalContext context) {
        this.alertPage = alertPage;
        this.context = context;
    }

    @Given("a new slow loading alert has been created")
    public void a_new_slow_loading_alert_has_been_created() {
        alertPage.createSlowLoadingAlert();
    }

    @Given("a new alert has been created")
    public void a_new_alert_has_been_created() {
        alertPage.createAlert();
    }

    @Given("a new confirm alert has been created")
    public void a_new_confirm_alert_has_been_created() {
        alertPage.createConfirmAlert();
    }

    @Given("a new prompt alert has been created")
    public void a_new_prompt_alert_has_been_created() {
        alertPage.createPromptAlert();
    }

    @When("I accept the alert")
    public void i_accept_the_alert() {
        try {
            alertPage.acceptAlert();
        } catch (UnhandledAlertException e) {
            context.setAlertPresent(true);
        }
    }

    @When("I dismiss the alert")
    public void i_dismiss_the_alert() {
        try {
            alertPage.dismissAlert();
        } catch (UnhandledAlertException e) {
            context.setAlertPresent(true);
        }
    }

    @Then("the alert should be closed")
    public void the_alert_should_be_closed() throws Throwable {
        Assert.assertFalse("Alert is present", context.isAlertPresent());
    }

    @When("I enter the text {string} into the alert")
    public void i_enter_the_text_into_the_alert(String alertTest) {
        alertPage.inputAlertText(alertTest);
    }

    @When("the alert return value should should equal {string}")
    public void the_alert_return_value_should_should_equal(String returnValue) {
        Assert.assertEquals(returnValue, alertPage.getAlertReturnValue());
    }
}


text:
# Logarithm of Cumulative Distribution Function

> Evaluate the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [Student's t][t-distribution] distribution.

The [cumulative distribution function][cdf] (CDF) for a [t distribution][t-distribution] random variable is

where `v > 0` is the degrees of freedom. In the definition, `Beta( x; a, b )` denotes the lower incomplete beta function and `Beta( a, b )` the [beta function][beta-function].

## Usage

```javascript
var logcdf = require( '@stdlib/stats/base/dists/t/logcdf' );
```

#### logcdf( x, v )

Evaluates the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [Student's t][t-distribution] distribution with degrees of freedom `v`.

```javascript
var y = logcdf( 2.0, 0.1 );
// returns ~-0.493

y = logcdf( 1.0, 2.0 );
// returns ~-0.237

y = logcdf( -1.0, 4.0 );
// returns ~-1.677
```

If provided `NaN` as any argument, the function returns `NaN`.

```javascript
var y = logcdf( NaN, 1.0 );
// returns NaN

y = logcdf( 0.0, NaN );
// returns NaN
```

If provided `v <= 0`, the function returns `NaN`.

```javascript
var y = logcdf( 2.0, -1.0 );
// returns NaN

y = logcdf( 2.0, 0.0 );
// returns NaN
```

#### logcdf.factory( v )

Returns a `function` for evaluating the natural logarithm of the [CDF][cdf] of a [Student's t][t-distribution] distribution with degrees of freedom `v`.

```javascript
var mylogcdf = logcdf.factory( 0.5 );
var y = mylogcdf( 3.0 );
// returns ~-0.203

y = mylogcdf( 1.0 );
// returns ~-0.358
```

## Notes

-   In virtually all cases, using the `logpdf` or `logcdf` functions is preferable to manually computing the logarithm of the `pdf` or `cdf`, respectively, since the latter is prone to overflow and underflow.

## Examples

```javascript
var randu = require( '@stdlib/random/base/randu' );
var logcdf = require( '@stdlib/stats/base/dists/t/logcdf' );

var v;
var x;
var y;
var i;

for ( i = 0; i < 10; i++ ) {
    x = (randu() * 6.0) - 3.0;
    v = randu() * 10.0;
    y = logcdf( x, v );
    console.log( 'x: %d, v: %d, ln(F(x;v)): %d', x.toFixed( 4 ), v.toFixed( 4 ), y.toFixed( 4 ) );
}
```

[beta-function]: https://en.wikipedia.org/wiki/Beta_function

[cdf]: https://en.wikipedia.org/wiki/Cumulative_distribution_function

[t-distribution]: https://en.wikipedia.org/wiki/Student%27s_t-distribution