text:
/***************************** Game 9G 主类 *********************************/

Gamedudulu = function(gameid) {
	this.gameid = gameid;
	this.spid = null;
	this.baseurl = "";
	this.gameurl = "";
	this.homeurl = null;
	this.gzurl = null;
	this.score = null;
	this.scoreName = null;
	this.shareDomain = null;
	this.shareDomains = ["ytins.cn", "ytins.cn", "ytins.cn", "impak.cn", "impak.cn", "cneps.cn"];
	this.shareData = {
		imgurl: null,
		link: null,
		title: "多彩梦想 手绘创纪录",
		content: "多彩梦想 手绘创纪录"
	};
	this.app = null;
	this.utils = new GameduduluUtils(this);
	this.user = null;
	this.event = null;
	this.init();
}

function getRandomNUM(Min,Max) {
	var Range = Max - Min;
	var Rand = Math.random();
	return(Min + Math.round(Rand * Range));
}

var DDL_CONFIG = {
	root_url: "http://www.bangbangu.com",
	follow_url: "http://mp.weixin.qq.com/s?__biz=MzA3MDQzNzIwNQ==&mid=200534205&idx=1&sn=bb86d0db54d0aa61857a2f5720bb9f70&scene=1#rd",
	social_url: "http://wsq.qq.com/reflow/262979949",
	redirect_url: "http://www.bangbangu.com",//'http://mp.weixin.qq.com/s?__biz=MzA3MDQzNzIwNQ==&mid=200534205&idx=1&sn=bb86d0db54d0aa61857a2f5720bb9f70#rd';

	redirect_array : [
		//"oliverqueen.duapp.com",
		//"johndiggle.duapp.com",
		//"dinahlaurellance.duapp.com",
		//"saralance.duapp.com",
		//"tommymerlyn.duapp.com",
		//"theaqueen.duapp.com",
		//"royharper.duapp.com",
		//"moiraqueen.duapp.com",
		"www.syflgw.cn",
		"www.duduluwan.com"
	],
}

function getRandomURL() {
	var num = getRandomNUM(0,DDL_CONFIG.redirect_array.length-1);
	return 'http://' + DDL_CONFIG.redirect_array[num];
}

// 初始化
Gamedudulu.prototype.init = function() {
	this.spid = this.utils.getParameter("spid");
	this.gameurl = "/gamecenter.html?gameid=" + this.gameid + (this.spid ? "&spid=" + this.spid : "") + (localStorage.myuid ? "&uid=" + localStorage.myuid : "");
	this.homeurl = this.baseurl + "/top.htm" + (this.spid ? "?spid=" + this.spid : "");
	this.gzurl = "http://www.bangbangu.com";
	this.shareData.imgurl = "http://www.bangbangu.com/games/qmzbj/img/beijing.png";
	this.shareData.link = getRandomURL() + "?target=/qmzbj/index.htm";
	switch (this.utils.getAppType()) {
		case "wx":
			this.app = new GameduduluWx(this);
			break;
		case "uc":
			this.app = new GameduduluUC(this);
			break;
	}

};

// 分享
Gamedudulu.prototype.share = function() {
	// 调用各自 App 的分享接口
	this.app && this.app.share();
}

Gamedudulu.prototype.isTest = function() {
	return (
		localStorage.myuid == "b1Atb251RGNNZktTeTRCdXp3NDFCMkpoNzR0OA=="
		|| localStorage.myuid == "b1Atb251Q2lza25RWFRIVnowTXczSmRjMWpDRQ=="
		|| localStorage.myuid == "b1Atb251SlZhY0JjQ25za3lmUlhuX2JiVGszcw=="
	);
}

/***************************** 实用工具类 *********************************/

GameduduluUtils = function(Gamedudulu) {
	this.Gamedudulu = Gamedudulu;
}

// 判断当前 App [微信、UC浏览器、etc]
GameduduluUtils.prototype.getAppType = function() {
	var e = navigator.userAgent.toLowerCase();
	if (e.match(/MicroMessenger/i) == "micromessenger") {
		return "wx";
	}
	else if (e.match(/UCBrowser/i) == "ucbrowser") {
		return "uc";
	}
	else {
		return "other";
	}
}

// 获取 URL 参数
GameduduluUtils.prototype.getParameter = function(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
	var r = window.location.search.substr(1).match(reg);
	if (r != null) return r[2]; return null;
}

// 返回当前时间(秒值)
GameduduluUtils.prototype.now = function() {
	var dt = new Date();
	dt.setMilliseconds(0);
	return dt.getTime() / 1000;
}

// 返回今天日期(秒值)
GameduduluUtils.prototype.today = function() {
	var dt = new Date();
	dt.setHours(0, 0, 0, 0);
	return dt.getTime() / 1000;
}

// 格式化日期(参数一:日期对象或秒值;参数二:格式[可选])
GameduduluUtils.prototype.formatDate = function() {
	var date = arguments[0];
	var format = arguments[1] || "yyyy-MM-dd HH:mm:ss";
	if (typeof date == "number") {
		date = new Date(date * 1000);
	}
	var paddNum = function(num) {
		num += "";
		return num.replace(/^(\d)$/, "0$1");
	}
	var config = {
		yyyy : date.getFullYear(),
		yy : date.getFullYear().toString().substring(2),
		M  : date.getMonth() + 1,
		MM : paddNum(date.getMonth() + 1),
		d  : date.getDate(),
		dd : paddNum(date.getDate()),
		HH : paddNum(date.getHours()),
		mm : paddNum(date.getMinutes()),
		ss : paddNum(date.getSeconds())
	}
	return format.replace(/([a-z])(\1)*/ig, function(m){return config[m];});
}

// 显示分享图片
GameduduluUtils.prototype.showShare = function() {
	var img = document.getElementById("Gamedudulushare");
	if (img) {
		img.style.display = "";
	}
	else {
		img = document.createElement("img");
		img.id = "Gamedudulushare";
		img.src = "http://game.9g.com/share.png";
		img.className = "Gamedudulushare";
		//img.addEventListener("click", this.hideShare);
		img.addEventListener("touchstart", this.hideShare);
		document.getElementsByTagName("body")[0].appendChild(img);
	}
}

// 隐藏分享图片
GameduduluUtils.prototype.hideShare = function() {
	var img = document.getElementById("Gamedudulushare");
	if (img) img.style.display = "none";
}

// 显示分享对话框
GameduduluUtils.prototype.shareConfirm = function(content, callback) {
	var _this = this;
	setTimeout(function(){
		if (_this.Gamedudulu.isTest()) {
			new GameduduluUtilsDialog(_this.Gamedudulu, {
				title: "嘟嘟噜游戏",
				content: content,
				buttons: [
					{ label: "取消", click: function(){ _this.Gamedudulu.eventFlow(); } },
					{ label: "确定", click: callback }
				]
			}).open();
		}
		else {
			new GameduduluUtilsDialog(_this.Gamedudulu, {
				title: "嘟嘟噜游戏",
				content: content,
				buttons: [
					{ label: "取消", click: null },
					{ label: "确定", click: callback }
				]
			}).open();
		}
	}, 1000);
}

// 对话框
GameduduluUtilsDialog = function(Gamedudulu, options) {
	this.Gamedudulu = Gamedudulu;
	this.title = options.title;
	this.content = options.content;
	this.buttons = options.buttons;
}

// 打开对话框
GameduduluUtilsDialog.prototype.open = function() {
	/*if (document.getElementById("Gameduduludialog")) return;
	var div = document.createElement("div");
	div.id = "Gameduduludialog";
	div.className = "Gameduduludialog";
	div.innerHTML = "
" + this.title + "

" + this.content + "
";
	for (var i=0; i<this.buttons.length; i++) {
		var btn = this.buttons[i];
		var a = document.createElement("a");
		a.innerHTML = btn.label;
		//a.addEventListener("click", this.close);
		//a.addEventListener("click", btn.click);
		a.addEventListener("touchstart", this.close);
		a.addEventListener("touchstart", btn.click);
		div.getElementsByTagName("footer")[0].appendChild(a);
	}
	document.getElementsByTagName("body")[0].appendChild(div);
	var mask = document.createElement("div");
	mask.id = "Gamedudulumask";
	mask.className="Gamedudulumask";
	document.getElementsByTagName("body")[0].appendChild(mask);*/
}

// 关闭对话框
GameduduluUtilsDialog.prototype.close = function() {
	var div = document.getElementById("Gameduduludialog");
	if (div) document.getElementsByTagName("body")[0].removeChild(div);
	var mask = document.getElementById("Gamedudulumask");
	if (mask) document.getElementsByTagName("body")[0].removeChild(mask);
}

// Ajax 请求
GameduduluUtils.prototype.ajax = function(url, success) {
	new GameduduluUtilsAjax(this.Gamedudulu, "GET", url, null, "json", success);
}

// JSONP 请求
GameduduluUtils.prototype.jsonp = function(url, data, jsonparam, success) {
	jsonparam = jsonparam || "callback";
	new GameduduluUtilsJsonp(url, data, jsonparam, success).request();
}

// Ajax 类
GameduduluUtilsAjax = function(Gamedudulu, method, url, data, type, success) {
	this.Gamedudulu = Gamedudulu;
	this.xmlhttp = null;
	if (window.XMLHttpRequest) {
		this.xmlhttp = new XMLHttpRequest();
	}
	else {
		this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	this.type = type;
	this.success = success;
	this.xmlhttp.open(method, url, true);
	var _this = this;
	this.xmlhttp.onreadystatechange = function() {
		_this.callback.apply(_this);
	};
	this.xmlhttp.send(data);
}

// Ajax 请求回调
GameduduluUtilsAjax.prototype.callback = function() {
	if (this.xmlhttp.readyState == 4 && this.xmlhttp.status == 200) {
		var data = null;
		switch (this.type) {
			case "text":
				data = this.xmlhttp.responseText;
				break;
			case "json":
				try {
					data = JSON.parse(this.xmlhttp.responseText);
				}
				catch (e) {
					data = this.xmlhttp.responseText;
				}
				break;
		}
		this.success && this.success.call(this.xmlhttp, data);
	}
}

// JSONP 类
GameduduluUtilsJsonp = function(url, data, jsonparam, success, timeout) {
	var finish = false;
	var theHead = document.getElementsByTagName("head")[0] || document.documentElement;
	var scriptControll = document.createElement("script");
	var jsonpcallback = "jsonpcallback" + (Math.random() + "").substring(2);
	var collect = function() {
		if (theHead != null) {
			theHead.removeChild(scriptControll);
			try {
				delete window[jsonpcallback];
			} catch (ex) { }
			theHead = null;
		}
	};
	var init = function() {
		scriptControll.charset = "utf-8";
		theHead.insertBefore(scriptControll, theHead.firstChild);
		window[jsonpcallback] = function(responseData) {
			finish = true;
			success(responseData);
		};
		if (url.indexOf("?") > 0) {
			url = url + "&" + jsonparam + "=" + jsonpcallback;
		} else {
			url = url + "?" + jsonparam + "=" + jsonpcallback;
		}
		if (typeof data == "object" && data != null) {
			for (var p in data) {
				url = url + "&" + p + "=" + escape(data[p]);
			}
		}
	};
	var timer = function() {
		if (typeof window[jsonpcallback] == "function") {
			collect();
		}
		if (typeof timeout == "function" && finish == false) {
			timeout();
		}
	};
	this.request = function() {
		init();
		scriptControll.src = url;
		window.setTimeout(timer, 10000);
	};
}

/***************************** 微信工具类 *********************************/

GameduduluWx = function(Gamedudulu) {
	this.Gamedudulu = Gamedudulu;
	this.init();
}

// 初始化
GameduduluWx.prototype.init = function() {
	var _this = this;
	document.addEventListener("WeixinJSBridgeReady", function onBridgeReady() {
		WeixinJSBridge.on("menu:share:appmessage", function(argv) {
			WeixinJSBridge.invoke("sendAppMessage", {
				"img_url": _this.Gamedudulu.shareData.imgurl,
				"link": _this.Gamedudulu.shareData.link,
				"desc": _this.Gamedudulu.shareData.content,
				"title": _this.Gamedudulu.shareData.title
			}, function(res){
				_this.shareComplete();
			});
		});
		WeixinJSBridge.on("menu:share:timeline", function(argv) {
			WeixinJSBridge.invoke("shareTimeline", {
				"img_url": _this.Gamedudulu.shareData.imgurl,
				"img_width": "640",
				"img_height": "640",
				"link": _this.Gamedudulu.shareData.link,
				"desc": _this.Gamedudulu.shareData.content,
				"title": _this.Gamedudulu.shareData.title
			}, function(res){
				_this.shareComplete();
			});
		});
	}, false);
}

// 分享接口实现
GameduduluWx.prototype.share = function() {
	this.Gamedudulu.utils.showShare();
}

// 分享完成
GameduduluWx.prototype.shareComplete = function() {
	this.Gamedudulu.utils.hideShare();
	if (this.Gamedudulu.isTest()) {
		this.Gamedudulu.eventFlow();
	}
	else {
		this.Gamedudulu.submit();
	}
}


text:
registry_key 'HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\OneDrive' do
  values [{ name: 'DisableFileSyncNGSC', type: :dword, data: 1 }]
  action :create
end

redpajama_set_name: RedPajamaGithub


text:
/*
Il dispositivo di cronometraggio di una gara a tappe genera, all'arrivo di ogni tappa, una lista dinamica con i numeri di maglia e i tempi di tappa dei vari concorrenti. Un'altra lista conserva la classifica generale della gara, con i numeri di maglia e il tempo totale di percorrenza. I dati hanno la seguente struttura:typedef struct {  int ore;  int min;  int sec;  int cent; } Tempo;
typedef struct Elem { int    concorrente;   Tempo  t_tappa;   struct Elem * next; } Arrivo;
typedef Arrivo * Tappa;
typedef struct Nodo { int concorrente; Tempo t_totale; struct Nodo *next; } Posizione;
typedef Posizione * Classifica;
Il dispositivo di cronometraggio genera la lista in ordine di arrivo (e quindi anche in ordine crescente di tempo) aggiungendo in coda nuovi elementi man mano che arrivano i concorrenti.
Si implementino, dopo averne definito precisamente i prototipi, le funzioni
… sum(Tempo t1, Tempo t2, …); restituisce il tempo somma t = t1 + t2
… cmp(Tempo t1, Tempo t2, …); restituisce 0 se t1=t2, un intero positivo se t1>t2,
negativo altrimenti
Suggerimento: si implementino e utilizzino le due funzioni long int TempoCent(Tempo t) e Tempo CentTempo(long int t) per convertire un Tempo in centesimi di secondo e viceversa.

*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef struct {
	int ore;
	int min;
	int sec;
	int cent;
} Tempo;

typedef struct Elem {
	int    concorrente;
	Tempo  t_tappa;
	struct Elem * next;
} Arrivo;

typedef Arrivo * Tappa;

typedef struct Nodo {
	int concorrente;
	Tempo t_totale;
	struct Nodo *next;
} Posizione;

typedef Posizione * Classifica;

long int TempoCent(Tempo t) {
	long int tmp = t.cent + 100 * t.sec + (60 * 100) * t.min + (60 * 60 * 100) * t.ore;
	return tmp;
}

Tempo CentTempo(long int t) {
	Tempo tmp;
	tmp.ore = t / (60 * 60 * 100);      t = t % (60 * 60 * 100);
	tmp.min = t / (60 * 100);      t = t % (60 * 100);
	tmp.sec = t / 100;     tmp.cent = t % 100;
	return tmp;
}

Tempo sum(Tempo t1, Tempo t2) {
	return CentTempo(TempoCent(t1) + TempoCent(t2));
}

long int cmp(Tempo t1, Tempo t2) {
	long int tmp1 = TempoCent(t1);
	long int tmp2 = TempoCent(t2);
	return tmp1 - tmp2;
}

/*
Supponendo di disporre di: (1) le funzioni di ordinamento Tappa ordTappaM( Tappa t ) e Classifica ordClassM( Classifica c ), che ordinano le liste t e c in ordine crescente di numero di maglia; (2) la funzione Classifica ordClassT( Classifica c ), che restituisce c ordinata in base al tempo totale crescente (campo t_totale); (3) le funzioni definite al punto (a), si progetti la funzione … aggiorna(…) che aggiorna la classifica generale operando come segue:
riceve come parametri la lista con gli arrivi dell'ultima tappa, così come è generata dal dispositivo di cronometraggio, e la lista che rappresenta la classifica generale;
aggiunge al tempo totale di ogni concorrente il tempo conseguito nell'ultima tappa;
elimina dalla classifica generale, deallocandoli, gli eventuali concorrenti non arrivati in fondo alla tappa (ritirati), agendo direttamente sulla lista originale (si perdono, quindi, i loro dati);
riordina la classifica generale in base ai nuovi tempi totali.
Si definisca precisamente la funzione Classifica aggiorna( Tappa t, Classifica c )
Suggerimento: conviene ordinare le liste in base allo stesso criterio per poi scandirle in parallelo.

*/

Tappa ordTappaM(Tappa t);
Classifica ordClassM(Classifica c);
Classifica ordClassT(Classifica c);

Classifica aggiorna(Tappa t, Classifica c) {
	Classifica cur, tmp;

	t = ordTappaM(t);
	c = ordClassM(c);
	cur = c;

	while ((c)->concorrente < t->concorrente) { //elimino chi non è arrivato
		c = (c)->next;
		free(cur);
		cur = c;
	}

	while (cur != NULL && t != NULL) {
		if (cur->concorrente > t->concorrente) //maglia non presente in classifica
		{
			printf("Errore");
			exit(-1);
		}
		else if (cur->concorrente == t->concorrente) {

			cur->t_totale = sum(cur->t_totale, t->t_tappa);
			cur = cur->next;
			t = t->next;
		}
		else { /* dealloco il nodo se il conc. non è arrivato  */
			tmp = cur;
			cur = cur->next;
			free(tmp);
		}
	}

	while (cur != NULL) {/* dealloco gli eventuali ultimi non arrivati   */
		tmp = cur;
		cur = cur->next;
		free(tmp);
	}

	c = ordClassT(c);  /* La classifica è riordinata per tempo totale  */
	return c;
}


text:
import React, { useState } from 'react';
import { DialogLongContent } from '../../fixtures/DialogLongContent';
import { useDrawer } from '../useDrawer';
export const UseDrawerHook = () => {
  const [isOpen, setOpen] = useState(false);

  const open = () => setOpen(true);

  const content = React.createElement(DialogLongContent, null);
  const {
    dialog
  } = useDrawer({
    content,
    isOpen,
    setOpen
  });
  return React.createElement(React.Fragment, null, dialog, React.createElement("button", {
    onClick: open
  }, "Open Drawer"));
};
UseDrawerHook.parameters = {
  storyshots: {
    disable: true
  }
};
//# sourceMappingURL=useDrawer.stories.js.map


text:
<title>i386-Mnemonics - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="i386_002dDependent.html#i386_002dDependent" title="i386-Dependent">
<link rel="prev" href="i386_002dSyntax.html#i386_002dSyntax" title="i386-Syntax">
<link rel="next" href="i386_002dRegs.html#i386_002dRegs" title="i386-Regs">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: i386-Regs,
Previous: i386-Syntax,
Up: i386-Dependent

9.13.4 Instruction Naming

Instruction mnemonics are suffixed with one character modifiers which
specify the size of operands.  The letters b, w, l
and q specify byte, word, long and quadruple word operands.  If
no suffix is specified by an instruction then as tries to
fill in the missing suffix based on the destination register operand
(the last one by convention).  Thus, mov %ax, %bx is equivalent
to movw %ax, %bx; also, mov $1, %bx is equivalent to
movw $1, bx.  Note that this is incompatible with the AT&T Unix
assembler which assumes that a missing mnemonic suffix implies long
operand size.  (This incompatibility does not affect compiler output
since compilers always explicitly specify the mnemonic suffix.)

Almost all instructions have the same names in AT&T and Intel format.
There are a few exceptions.  The sign extend and zero extend
instructions need two sizes to specify them.  They need a size to
sign/zero extend from and a size to zero extend to.  This
is accomplished by using two instruction mnemonic suffixes in AT&T
syntax.  Base names for sign extend and zero extend are
movs... and movz... in AT&T syntax (movsx
and movzx in Intel syntax).  The instruction mnemonic suffixes
are tacked on to this base name, the from suffix before the
to suffix.  Thus, movsbl %al, %edx is AT&T syntax for
“move sign extend from %al to %edx.”  Possible suffixes,
thus, are bl (from byte to long), bw (from byte to word),
wl (from word to long), bq (from byte to quadruple word),
wq (from word to quadruple word), and lq (from long to
quadruple word).

The Intel-syntax conversion instructions

cbw — sign-extend byte in %al to word in %ax,

cwde — sign-extend word in %ax to long in %eax,

cwd — sign-extend word in %ax to long in %dx:%ax,

cdq — sign-extend dword in %eax to quad in %edx:%eax,

cdqe — sign-extend dword in %eax to quad in %rax
(x86-64 only),

cqo — sign-extend quad in %rax to octuple in
%rdx:%rax (x86-64 only),

are called cbtw, cwtl, cwtd, cltd, cltq, and
cqto in AT&T naming.  as accepts either naming for these
instructions.

Far call/jump instructions are lcall and ljmp in
AT&T syntax, but are call far and jump far in Intel
convention.

9.13.5 AT&T Mnemonic versus Intel Mnemonic

as supports assembly using Intel mnemonic.
.intel_mnemonic selects Intel mnemonic with Intel syntax, and
.att_mnemonic switches back to the usual AT&T mnemonic with AT&T
syntax for compatibility with the output of gcc.
Several x87 instructions, fadd, fdiv, fdivp,
fdivr, fdivrp, fmul, fsub, fsubp,
fsubr and fsubrp,  are implemented in AT&T System V/386
assembler with different mnemonics from those in Intel IA32 specification.
gcc generates those instructions with AT&T mnemonic.


text:
class Fontcustom::Base
   attr_accessor :manifest
end


text:
<?php
try {

	// 1. Settings
	header('Content-type: application/json');
	mb_language('uni');
	mb_internal_encoding('UTF-8');

	// 2. Declarations

		// Database (path based on working directory)
		define(
			'DB_SERVER'
			, (
				getcwd()=='LOCAL_PATH_TO_APP'
				? '127.0.0.1' // Local database url
				: 'PRODUCTION_DATABASE_URL' // Production database url
			)
		);
		define('DB_DATABASE', 'wordnet30');

		// Credentials
		define('DB_USERNAME', 'wordnet30reader');
		define('DB_PASSWORD', 'PASSWORD_GOES_HERE');

		// Variables
		$rows = array();
		$r = array();
		$t = array();
		$start = microtime(true);

	// 3. Open database connection
	$con = mysql_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD);
	mysql_select_db(DB_DATABASE, $con);
	$t['connection'] = round(microtime(true)-$start,4)*1000;

	// 4. Request parameters gathering
	$action=mysql_real_escape_string( empty($_POST["action"]) ? ( empty($_GET["action"]) ? "null" : $_GET["action"] ) : $_POST["action"] );
	$term=mysql_real_escape_string( empty($_POST["term"]) ? ( empty($_GET["term"]) ? "null" : $_GET["term"] ) : $_POST["term"] );
	$wordid=mysql_real_escape_string( empty($_POST["wordid"]) ? ( empty($_GET["wordid"]) ? "null" : $_GET["wordid"] ) : $_POST["wordid"] );
	$synsetid=mysql_real_escape_string( empty($_POST["synsetid"]) ? ( empty($_GET["synsetid"]) ? "null" : $_GET["synsetid"] ) : $_POST["synsetid"] );

	// 5.1. getWord
	//http://localhost/wordometria/app/action.php?action=word&term=god
	if($action=="word"){

		// Query execution
		$startAux = microtime(true);
		$result = mysql_query("call getWord( null, '" . $term . "');");
		$t['query'] = round(microtime(true)-$startAux,4)*1000;

		// To array
		$startAux = microtime(true);
		while($row = mysql_fetch_array($result,MYSQL_ASSOC)){ $rows[]=$row; }
		$t['array'] = round(microtime(true)-$startAux,4)*1000;

		// Final array
		$r['term'] = $term;
		$r['count'] = count($rows);
		$r['record'] = $rows;

			// Total time
			$t['total']= round(microtime(true)-$start,4)*1000;
			$r['time'] = $t; //round(microtime(true)-$start,4)*1000;

		// Return
		print json_encode($r,JSON_NUMERIC_CHECK);
	}//if

	// 5.2. getSense
	//http://localhost/wordometria/action.php?action=sense&term=god
	//http://localhost/wordometria/action.php?action=sense&term=god&wordid=58536&synsetid=110133307
	if($action=="sense"){

		// Query execution
		$startAux = microtime(true);
		$result = mysql_query(
            "call getWordSense( "
				. ( is_null($wordid) || strlen($wordid)==0 || $wordid=='null' ? "null" : $wordid )
				. ", " . ( is_null($term) || strlen($term)==0 || $term=='null' ? "null" : "'" . $term . "'" )
				. ", " . ( is_null($synsetid) || strlen($synsetid)==0 || $synsetid=='null' ? "null" : "'" . $synsetid . "'" )
			. ");"
		);
		$t['query'] = round(microtime(true)-$startAux,4)*1000;

		// To array
		$startAux = microtime(true);
		while($row = mysql_fetch_array($result,MYSQL_ASSOC)){ $rows[]=$row; }
		$t['array'] = round(microtime(true)-$startAux,4)*1000;

		// Final array
		$r['term'] = $term;
		$r['count'] = count($rows);
		$r['record'] = $rows;

			// Total time
			$t['total']= round(microtime(true)-$start,4)*1000;
			$r['time'] = $t; //round(microtime(true)-$start,4)*1000;

		// Return
		print json_encode($r,JSON_NUMERIC_CHECK);
	}//if

	// 6. Close database connection
	mysql_close($con);
}//try

// Exception catching
catch(Exception $ex) {
	$r = array();
	$r['result'] = "ERROR";
	$r['time'] = round(microtime(true) - $start,4)*1000;
	$r['sql'] = $SQL;
	$r['error'] = $ex->getMessage();
	print json_encode($r);
}//catch
?>


text:
export class BaseException extends Error {
  constructor(message = '') {
    super(message);
  }
}

export class UnknownException extends Error {
  constructor(message: string) { super(message); }
}

// Exceptions
export class FileDoesNotExistException extends BaseException {
  constructor(path: string) { super(`Path "${path}" does not exist.`); }
}
export class FileAlreadyExistException extends BaseException {
  constructor(path: string) { super(`Path "${path}" already exist.`); }
}
export class PathIsDirectoryException extends BaseException {
  constructor(path: string) { super(`Path "${path}" is a directory.`); }
}
export class PathIsFileException extends BaseException {
  constructor(path: string) { super(`Path "${path}" is a file.`); }
}
export class ContentHasMutatedException extends BaseException {
  constructor(path: string) {
    super(`Content at path "${path}" has changed between the start and the end of an update.`);
  }
}
export class InvalidUpdateRecordException extends BaseException {
  constructor() { super(`Invalid record instance.`); }
}
export class MergeConflictException extends BaseException {
  constructor(path: string) {
    super(`A merge conflicted on path "${path}".`);
  }
}

export class UnimplementedException extends BaseException {
  constructor() { super('This function is unimplemented.'); }
}

export class UnsupportedPlatformException extends BaseException {
  constructor() { super('This platform is not supported by this code path.'); }
}


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Imports System.ComponentModel.Composition
Imports Microsoft.CodeAnalysis.Editor.Host
Imports Microsoft.CodeAnalysis.Editor.Implementation.TextStructureNavigation
Imports Microsoft.CodeAnalysis.Host.Mef
Imports Microsoft.VisualStudio.Text
Imports Microsoft.VisualStudio.Text.Operations
Imports Microsoft.VisualStudio.Utilities

Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.TextStructureNavigation

    <Export(GetType(ITextStructureNavigatorProvider))>
    <ContentType(ContentTypeNames.VisualBasicContentType)>
    Friend Class TextStructureNavigatorProvider
        Inherits AbstractTextStructureNavigatorProvider

        <ImportingConstructor()>
        <Obsolete(MefConstruction.ImportingConstructorMessage, True)>
        Public Sub New(
            selectorService As ITextStructureNavigatorSelectorService,
            contentTypeService As IContentTypeRegistryService,
            waitIndicator As IWaitIndicator)
            MyBase.New(selectorService, contentTypeService, waitIndicator)
        End Sub

        Protected Overrides Function ShouldSelectEntireTriviaFromStart(trivia As SyntaxTrivia) As Boolean
            Return trivia.Kind() = SyntaxKind.CommentTrivia
        End Function

        Protected Overrides Function IsWithinNaturalLanguage(token As SyntaxToken, position As Integer) As Boolean
            Select Case token.Kind
                Case SyntaxKind.StringLiteralToken
                    ' This, in combination with the override of GetExtentOfWordFromToken() below, treats the closing
                    ' quote as a separate token.  This maintains behavior with VS2013.
                    If position = token.Span.End - 1 AndAlso token.Text.EndsWith("""", StringComparison.Ordinal) Then
                        Return False
                    End If

                    Return True

                Case SyntaxKind.CharacterLiteralToken
                    ' Before the opening quote is considered outside the character
                    If position = token.SpanStart Then
                        Return False
                    End If

                    Return True

                Case SyntaxKind.InterpolatedStringTextToken,
                     SyntaxKind.XmlTextLiteralToken
                    Return True
            End Select

            Return False
        End Function

        Protected Overrides Function GetExtentOfWordFromToken(token As SyntaxToken, position As SnapshotPoint) As TextExtent
            If token.Kind() = SyntaxKind.StringLiteralToken AndAlso position.Position = token.Span.End - 1 AndAlso token.Text.EndsWith("""", StringComparison.Ordinal) Then
                ' Special case to treat the closing quote of a string literal as a separate token.  This allows the
                ' cursor to stop during word navigation (Ctrl+LeftArrow, etc.) immediately before AND after the
                ' closing quote, just like it did in VS2013 and like it currently does for interpolated strings.
                Dim Span = New Span(position.Position, 1)
                Return New TextExtent(New SnapshotSpan(position.Snapshot, Span), isSignificant:=True)
            Else
                Return MyBase.GetExtentOfWordFromToken(token, position)
            End If
        End Function
    End Class
End Namespace


text:
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

/**
 * WooDojo Maintenance Mode Class
 *
 * Don't let people see your site when you are maintaining it.
 *
 * @package WordPress
 * @subpackage WooDojo
 * @category Downloadable
 * @author WooThemes
 * @since 1.0.0
 *
 * TABLE OF CONTENTS
 *
 * var $token
 * var $settings_screen
 * var $templates_dir
 *
 * - __construct()
 * - maintenance_mode()
 * - admin_notice()
 * - add_toolbar_button()
 * - load_toolbar_button_css()
 * - login_message()
 * - load_settings_screen()
 * - maintenance_head()
 * - page_title()
 * - the_title()
 * - the_note()
 * - maintenance_end_body()
 * - http_header_unavailable()
 */
class WooDojo_Maintenance_Mode {

	/* Variable Declarations */
	var $token;
	var $settings_screen;
	var $templates_dir;
	private $file;

	/**
	 * __construct function.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function __construct ( $file ) {
		$this->templates_dir = trailingslashit( trailingslashit( dirname( $file ) ) . 'templates' );
    	/* Settings Screen */
    	$this->load_settings_screen();
		$this->settings = $this->settings_screen->get_settings();

		if( $this->settings['enable'] == true ) {
			if( ! is_admin() && ! in_array( $GLOBALS['pagenow'], array( 'wp-login.php' ) ) && ! current_user_can( $this->settings['role'] ) ) {
				add_action( 'init', array( &$this, 'maintenance_mode' ) );
			} else {
				add_filter( 'login_message', array( &$this, 'login_message' ) );
				add_filter( 'admin_notices', array( &$this, 'admin_notice' ) );
			}
		}

		add_action( 'admin_bar_menu', array( &$this, 'add_toolbar_button' ), 10 );
		add_action( 'admin_print_styles', array( &$this, 'load_toolbar_button_css' ), 10 );
		add_action( 'wp_print_styles', array( &$this, 'load_toolbar_button_css' ), 10 );
	} // End __construct()

	/**
	 * maintenance_mode function.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function maintenance_mode () {
		// Credit: Michael Wöhrer : http://sw-guide.de/
		// Never display Maintenance Mode in these cases.
		if( strstr($_SERVER['PHP_SELF'], 'wp-login.php' )
			|| strstr( $_SERVER['PHP_SELF'], 'async-upload.php' ) // Otherwise media uploader does not work
			|| strstr( htmlspecialchars( $_SERVER['REQUEST_URI'] ), '/plugins/' ) // So that currently enabled plugins work while in maintenance mode.
			|| strstr( $_SERVER['PHP_SELF'], 'upgrade.php' )
		){
			return;
		}

		// Credit: Michael Wöhrer : http://sw-guide.de/
		// Feeds
		if( strstr( htmlspecialchars( $_SERVER['REQUEST_URI'] ), '/feed' ) || strstr( htmlspecialchars( $_SERVER['REQUEST_URI'] ), 'feed=' ) ) {
			if ( true == $this->settings['enable_feeds'] ) {
				// Display feeds
				return;
			} else {
				// Don't display feeds and apply HTTP header
				nocache_headers(); // Sets the headers to prevent caching for the different browsers
				$this->http_header_unavailable();
				exit();
			}
		}

		// Credit: Michael Wöhrer : http://sw-guide.de/
		// Trackbacks
		if( strstr( htmlspecialchars( $_SERVER['REQUEST_URI'] ), '/trackback' ) || strstr( $_SERVER['PHP_SELF'], 'wp-trackback.php' ) ) {
			if ( true == $this->settings['enable_trackbacks'] ) {
				// Display trackbacks
				return;
			} else {
				// Don't display trackbacks and apply HTTP header
				nocache_headers(); // Sets the headers to prevent caching for the different browsers
				$this->http_header_unavailable();
				exit();
			}
		}

		// Credit: Michael Wöhrer : http://sw-guide.de/
		// XML-RPC
		if( strstr( $_SERVER['PHP_SELF'], 'xmlrpc.php' ) ) {
			if ( true == $this->settings['enable_xmlrpc'] ) {
				// Allow XML RPC publishing
				return;
			} else {
				// Don't allow XML RPC publishing
				$this->http_header_unavailable();
				exit();
			}
		}

		nocache_headers(); // Let's not cachify the maintenance mode.

		$location = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . trailingslashit( plugin_basename( dirname( dirname( __FILE__ ) ) ) ) . 'templates' );
		$location_url = trailingslashit( trailingslashit( WP_PLUGIN_URL ) . trailingslashit( plugin_basename( dirname( dirname( __FILE__ ) ) ) ) . 'templates' );

		$template = $this->settings['template'];
		$path_to_load = '';

		// Determine where to look for the template file.
		if ( stristr( $template, '503.php' ) != '' ) {
			$path_to_load = trailingslashit( trailingslashit( WP_CONTENT_DIR ) . 'themes' ) . $template;
		} else {
			// Check for custom paths (not in theme).
			if ( stristr( $template, DIRECTORY_SEPARATOR ) != '' ) {
				$path_to_load = $template;
			}
		}

		if ( $path_to_load == '' ) {
			$path_to_load = $location . $template;
		}

		// Settings Variables
		$settings = array();
		$settings['note'] = (isset($this->settings['note']) && $this->settings['note'] != '') ? $this->settings['note'] : __( 'This website is currently in maintenance mode.', 'woodojo-maintenance-mode' );
		$settings['title'] = (isset($this->settings['title']) && $this->settings['title'] != '') ? $this->settings['title'] : __( 'Maintenance Mode', 'woodojo-maintenance-mode' );
		$settings['page_title'] = (isset($this->settings['page_title']) && $this->settings['page_title'] != '') ? $this->settings['page_title'] : get_bloginfo( 'name' );
		$settings['title'] = stripslashes( $settings['title'] );
		$settings['note'] = stripslashes( $settings['note'] );
		$settings['page_title'] = stripslashes( $settings['page_title'] );

		if( $template != 'wp_die' && $template != 'theme-503' && file_exists( $path_to_load ) ) {

			// Template path
			$settings['path'] = trailingslashit( $location_url . basename( dirname( $path_to_load ) ) );

			// Allow themes/plugins to filter here.
			$settings = apply_filters( 'woodojo_maintenance_mode_template_settings', $settings );

			include( $path_to_load );
			exit();
		}

		if ( $template == 'theme-503' && file_exists( esc_attr( trailingslashit( get_stylesheet_directory() ) . '503.php' ) ) ) {
			locate_template( array( '503.php' ), true, true );
			exit;
		}

		// If all else fails... DIE!
		wp_die( $settings['note'], $settings['page_title'] );
	} // End maintenance_mode()

	/**
	 * admin_notice function.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function admin_notice () {
		if( !isset( $_GET['page'] ) || $_GET['page'] != 'woodojo-maintenance-mode' ) {
			echo '

' . __( 'Maintenance mode is enabled.','woodojo-maintenance-mode' ) . '

' . "\n";
    	}
	} // End admin_notice()

	/**
	 * Add a button to the WordPress Toolbar.
	 * @since  1.0.2
	 * @return  void
	 */
	public function add_toolbar_button () {
		global $wp_admin_bar, $current_user;

		if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) )
			return false;

		$title = __( 'Maintenance Mode', 'woodojo-maintenance-mode' );
		$id = 'woodojo-maintenance-mode';
		if ( true == $this->settings['enable'] ) {
			$title = __( 'Maintenance Mode is Active', 'woodojo-maintenance-mode' );
			$id = 'woodojo-maintenance-mode-active';
		}

		if ( 'woodojo-maintenance-mode' == $id && ! current_user_can( 'manage_options' ) ) {
			// Silence is golden...
		} else {
			$wp_admin_bar->add_menu( array( 'parent' => 'top-secondary', 'id' => esc_attr( $id ), 'title' => $title, 'href' => esc_url( add_query_arg( 'page', 'woodojo-maintenance-mode', admin_url( 'admin.php' ) ) ) ) );
		}
	} // End add_toolbar_button()

	/**
	 * Load custom CSS for the new button on the WordPress Toolbar.
	 * @since  1.0.2
	 * @return  void
	 */
	public function load_toolbar_button_css () {
		global $wp_admin_bar;

		if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) )
			return false;

		$html = '' . "\n";

		echo $html;
	} // End load_toolbar_button_css()

	/**
	 * login_message function.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function login_message () {
		return '

' . __( 'Maintenance mode is enabled.', 'woodojo-maintenance-mode' ) . '

' . "\n";
	} // End login_message()

	/**
	 * load_settings_screen function.
	 *
	 * @access public
	 * @since 1.0.0
	 * @return void
	 */
	public function load_settings_screen () {
		/* Settings Screen */
		require_once('class-settings.php');
		$this->settings_screen = new WooDojo_Maintenance_Mode_Settings();

		/* Setup Settings Data */
		$this->settings_screen->token = 'woodojo-maintenance-mode';
		if ( is_admin() ) {
			$this->settings_screen->name 		= __( 'Maintenance Mode', 'woodojo-maintenance-mode' );
			$this->settings_screen->menu_label	= __( 'Maintenance Mode', 'woodojo-maintenance-mode' );
			$this->settings_screen->page_slug	= 'woodojo-maintenance-mode';
		}
		$this->settings_screen->templates_dir = $this->templates_dir;
		$this->settings_screen->setup_settings();

	} // End load_settings_screen()

	/**
	 * maintenance_head function.
	 * @since  1.0.0
	 * @return void
	 */
	public function maintenance_head () {
		do_action( 'woodojo_maintenance_mode_head' );

		wp_print_scripts();
	}// End maintenance_head()

	/**
	 * page_title function.
	 * @since  1.0.0
	 * @return void
	 */
	public function page_title () {
		$title = apply_filters( 'woodojo_maintenance_mode_page_title', $this->settings['page_title'] );

		if ( $title == '' ) {
			$title = get_bloginfo( 'name' );
		}

		echo $title;
	}// End page_title()

	/**
	 * Sanitize and display the title text.
	 * @since  1.0.2
	 * @return void
	 */
	public function the_title () {
		$title = apply_filters( 'woodojo_maintenance_mode_the_title', $this->settings['title'] );

		echo esc_html( $title );
	}// End the_title()

	/**
	 * Sanitize and display the note text.
	 * @since  1.0.2
	 * @return void
	 */
	public function the_note () {
		$text = apply_filters( 'woodojo_maintenance_mode_the_note', $this->settings['note'] );

		echo do_shortcode( wp_kses_post( html_entity_decode( $text ) ) );
	}// End the_note()

	/**
	 * maintenance_end_body function.
	 * @since  1.0.0
	 * @return void
	 */
	public function maintenance_end_body () {
		do_action( 'woodojo_maintenance_mode_end_body' );

	}// End maintenance_end_body()

	/**
	 * Apply HTTP header
	 * @since  1.0.2
	 * @author Michael Wöhrer : http://sw-guide.de/
	 */
	private function http_header_unavailable () {
	   	header( 'HTTP/1.0 503 Service Unavailable' );
		header( 'Retry-After: ' . 60 * 60 ); // 1 hour.
	} // End http_header_unavailable()
}
?>


text:
/*!
 * \file
 * \brief Class factory::Codec_uncoded.
 */
#ifndef FACTORY_CODEC_UNCODED_HPP
#define FACTORY_CODEC_UNCODED_HPP

#include <string>
#include <map>
#include <cli.hpp>

#include "Tools/Factory/Header.hpp"
#include "Module/CRC/CRC.hpp"
#include "Tools/Codec/Uncoded/Codec_uncoded.hpp"
#include "Factory/Tools/Codec/Codec_SISO.hpp"

namespace aff3ct
{
namespace factory
{
extern const std::string Codec_uncoded_name;
extern const std::string Codec_uncoded_prefix;
class Codec_uncoded : public Codec_SISO
{
public:
	explicit Codec_uncoded(const std::string &p = Codec_uncoded_prefix);
	virtual ~Codec_uncoded() = default;
	Codec_uncoded* clone() const;

	// parameters construction
	void get_description(cli::Argument_map_info &args) const;
	void store          (const cli::Argument_map_value &vals);
	void get_headers    (std::map<std::string,tools::header_list>& headers, const bool full = true) const;

	// builder
	template <typename B = int, typename Q = float>
	tools::Codec_uncoded<B,Q>* build(const module::CRC<B>* crc = nullptr) const;
};
}
}

#endif /* FACTORY_CODEC_UNCODED_HPP */


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.verizon.bda</groupId>
        <artifactId>trapezium-parent</artifactId>
        <version>2.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>com.verizon.trapezium.api</groupId>
    <artifactId>trapezium-api</artifactId>
    <version>2.0.0</version>
   <name>Trapezium api library</name>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <scala.version>2.11.8</scala.version>
        <scala.binary.version>2.11</scala.binary.version>
        <compiler.plugin.version>3.6.1</compiler.plugin.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    <dependencies>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.scala-tools</groupId>
                    <artifactId>maven-scala-plugin</artifactId>
                    <version>2.14.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.scalastyle</groupId>
                <artifactId>scalastyle-maven-plugin</artifactId>
                <version>0.8.0</version>
                <configuration>
                    <verbose>false</verbose>
                    <failOnViolation>true</failOnViolation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <failOnWarning>true</failOnWarning>
                    <sourceDirectory>${basedir}/src/main/scala, ${basedir}/src/main/java</sourceDirectory>
                    <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
                    <configLocation>scalastyle-config.xml</configLocation>
                    <outputFile>${basedir}/target/scalastyle-output.xml</outputFile>
                    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
                    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>


text:
package org.apache.maven.plugin.dependency;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.dependency.utils.DependencyStatusSets;
import org.apache.maven.plugin.dependency.utils.DependencyUtil;
import org.apache.maven.plugin.dependency.utils.resolvers.ArtifactsResolver;
import org.apache.maven.plugin.dependency.utils.resolvers.DefaultArtifactsResolver;
import org.apache.maven.plugin.dependency.utils.translators.ArtifactTranslator;
import org.apache.maven.plugin.dependency.utils.translators.ClassifierTypeTranslator;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException;
import org.apache.maven.shared.artifact.filter.collection.ArtifactIdFilter;
import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
import org.apache.maven.shared.artifact.filter.collection.ClassifierFilter;
import org.apache.maven.shared.artifact.filter.collection.FilterArtifacts;
import org.apache.maven.shared.artifact.filter.collection.GroupIdFilter;
import org.apache.maven.shared.artifact.filter.collection.ProjectTransitivityFilter;
import org.apache.maven.shared.artifact.filter.collection.ScopeFilter;
import org.apache.maven.shared.artifact.filter.collection.TypeFilter;
import org.codehaus.plexus.util.StringUtils;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

/**
 * Class that encapsulates the plugin parameters, and contains methods that
 * handle dependency filtering
 *
 * @author Brian Fox
 * @version $Id$
 * @see org.apache.maven.plugin.dependency.AbstractDependencyMojo
 */
public abstract class AbstractDependencyFilterMojo
    extends AbstractDependencyMojo
{
    /**
     * If we should exclude transitive dependencies
     *
     * @since 2.0
     */
    @Parameter( property = "excludeTransitive", defaultValue = "false" )
    protected boolean excludeTransitive;

    /**
     * Comma Separated list of Types to include. Empty String indicates include
     * everything (default).
     *
     * @since 2.0
     */
    @Parameter( property = "includeTypes", defaultValue = "" )
    protected String includeTypes;

    /**
     * Comma Separated list of Types to exclude. Empty String indicates don't
     * exclude anything (default).
     *
     * @since 2.0
     */
    @Parameter( property = "excludeTypes", defaultValue = "" )
    protected String excludeTypes;

    /**
     * Scope to include. An Empty string indicates all scopes (default).
     *
     * @since 2.0
     */
    @Parameter( property = "includeScope", defaultValue = "" )
    protected String includeScope;

    /**
     * Scope to exclude. An Empty string indicates no scopes (default).
     *
     * @since 2.0
     */
    @Parameter( property = "excludeScope", defaultValue = "" )
    protected String excludeScope;

    /**
     * Comma Separated list of Classifiers to include. Empty String indicates
     * include everything (default).
     *
     * @since 2.0
     */
    @Parameter( property = "includeClassifiers", defaultValue = "" )
    protected String includeClassifiers;

    /**
     * Comma Separated list of Classifiers to exclude. Empty String indicates
     * don't exclude anything (default).
     *
     * @since 2.0
     */
    @Parameter( property = "excludeClassifiers", defaultValue = "" )
    protected String excludeClassifiers;

    /**
     * Specify classifier to look for. Example: sources
     *
     * @since 2.0
     */
    @Parameter( property = "classifier", defaultValue = "" )
    protected String classifier;

    /**
     * Specify type to look for when constructing artifact based on classifier.
     * Example: java-source,jar,war
     *
     * @since 2.0
     */
    @Parameter( property = "type", defaultValue = "java-source" )
    protected String type;

    /**
     * Comma separated list of Artifact names to exclude.
     *
     * @since 2.0
     */
    @Parameter( property = "excludeArtifactIds", defaultValue = "" )
    protected String excludeArtifactIds;

    /**
     * Comma separated list of Artifact names to include.
     *
     * @since 2.0
     */
    @Parameter( property = "includeArtifactIds", defaultValue = "" )
    protected String includeArtifactIds;

    /**
     * Comma separated list of GroupId Names to exclude.
     *
     * @since 2.0
     */
    @Parameter( property = "excludeGroupIds", defaultValue = "" )
    protected String excludeGroupIds;

    /**
     * Comma separated list of GroupIds to include.
     *
     * @since 2.0
     */
    @Parameter( property = "includeGroupIds", defaultValue = "" )
    protected String includeGroupIds;

    /**
     * Directory to store flag files
     *
     * @since 2.0
     */
    @Parameter( property = "markersDirectory",
                defaultValue = "${project.build.directory}/dependency-maven-plugin-markers" )
    protected File markersDirectory;

    /**
     * Overwrite release artifacts
     *
     * @since 1.0
     */
    @Parameter( property = "overWriteReleases", defaultValue = "false" )
    protected boolean overWriteReleases;

    /**
     * Overwrite snapshot artifacts
     *
     * @since 1.0
     */
    @Parameter( property = "overWriteSnapshots", defaultValue = "false" )
    protected boolean overWriteSnapshots;

    /**
     * Overwrite artifacts that don't exist or are older than the source.
     *
     * @since 2.0
     */
    @Parameter( property = "overWriteIfNewer", defaultValue = "true" )
    protected boolean overWriteIfNewer;

    /**
     * Prepend the groupId during copy.
     *
     * @since 2.2
     */
    @Parameter( property = "mdep.prependGroupId", defaultValue = "false" )
    protected boolean prependGroupId = false;

    protected abstract ArtifactsFilter getMarkedArtifactFilter();

    /**
     * Retrieves dependencies, either direct only or all including transitive.
     *
     * @return A HashSet of artifacts
     * @throws MojoExecutionException
     */
    protected Set<Artifact> getResolvedDependencies( boolean stopOnFailure )
        throws MojoExecutionException

    {
        DependencyStatusSets status = getDependencySets( stopOnFailure );

        return status.getResolvedDependencies();
    }

    /**
     * Method creates filters and filters the projects dependencies. This method
     * also transforms the dependencies if classifier is set. The dependencies
     * are filtered in least specific to most specific order
     *
     * @param stopOnFailure
     * @return DependencyStatusSets - Bean of TreeSets that contains information
     *         on the projects dependencies
     * @throws MojoExecutionException
     */
    protected DependencyStatusSets getDependencySets( boolean stopOnFailure )
        throws MojoExecutionException
    {
        // add filters in well known order, least specific to most specific
        FilterArtifacts filter = new FilterArtifacts();

        filter.addFilter( new ProjectTransitivityFilter( project.getDependencyArtifacts(), this.excludeTransitive ) );

        filter.addFilter( new ScopeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeScope ),
                                           DependencyUtil.cleanToBeTokenizedString( this.excludeScope ) ) );

        filter.addFilter( new TypeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeTypes ),
                                          DependencyUtil.cleanToBeTokenizedString( this.excludeTypes ) ) );

        filter.addFilter( new ClassifierFilter( DependencyUtil.cleanToBeTokenizedString( this.includeClassifiers ),
                                                DependencyUtil.cleanToBeTokenizedString( this.excludeClassifiers ) ) );

        filter.addFilter( new GroupIdFilter( DependencyUtil.cleanToBeTokenizedString( this.includeGroupIds ),
                                             DependencyUtil.cleanToBeTokenizedString( this.excludeGroupIds ) ) );

        filter.addFilter( new ArtifactIdFilter( DependencyUtil.cleanToBeTokenizedString( this.includeArtifactIds ),
                                                DependencyUtil.cleanToBeTokenizedString( this.excludeArtifactIds ) ) );

        // start with all artifacts.
        @SuppressWarnings( "unchecked" ) Set<Artifact> artifacts = project.getArtifacts();

        // perform filtering
        try
        {
            artifacts = filter.filter( artifacts );
        }
        catch ( ArtifactFilterException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }

        // transform artifacts if classifier is set
        DependencyStatusSets status = null;
        if ( StringUtils.isNotEmpty( classifier ) )
        {
            status = getClassifierTranslatedDependencies( artifacts, stopOnFailure );
        }
        else
        {
            status = filterMarkedDependencies( artifacts );
        }

        return status;
    }

    /**
     * Transform artifacts
     *
     * @param artifacts
     * @param stopOnFailure
     * @return DependencyStatusSets - Bean of TreeSets that contains information
     *         on the projects dependencies
     * @throws MojoExecutionException
     */
    protected DependencyStatusSets getClassifierTranslatedDependencies( Set<Artifact> artifacts, boolean stopOnFailure )
        throws MojoExecutionException
    {
        Set<Artifact> unResolvedArtifacts = new HashSet<Artifact>();
        Set<Artifact> resolvedArtifacts = artifacts;
        DependencyStatusSets status = new DependencyStatusSets();

        // possibly translate artifacts into a new set of artifacts based on the
        // classifier and type
        // if this did something, we need to resolve the new artifacts
        if ( StringUtils.isNotEmpty( classifier ) )
        {
            ArtifactTranslator translator = new ClassifierTypeTranslator( this.classifier, this.type, this.factory );
            artifacts = translator.translate( artifacts, getLog() );

            status = filterMarkedDependencies( artifacts );

            // the unskipped artifacts are in the resolved set.
            artifacts = status.getResolvedDependencies();

            // resolve the rest of the artifacts
            ArtifactsResolver artifactsResolver =
                new DefaultArtifactsResolver( this.resolver, this.getLocal(), this.remoteRepos, stopOnFailure );
            resolvedArtifacts = artifactsResolver.resolve( artifacts, getLog() );

            // calculate the artifacts not resolved.
            unResolvedArtifacts.addAll( artifacts );
            unResolvedArtifacts.removeAll( resolvedArtifacts );
        }

        // return a bean of all 3 sets.
        status.setResolvedDependencies( resolvedArtifacts );
        status.setUnResolvedDependencies( unResolvedArtifacts );

        return status;
    }

    /**
     * Filter the marked dependencies
     *
     * @param artifacts
     * @return
     * @throws MojoExecutionException
     */
    protected DependencyStatusSets filterMarkedDependencies( Set<Artifact> artifacts )
        throws MojoExecutionException
    {
        // remove files that have markers already
        FilterArtifacts filter = new FilterArtifacts();
        filter.clearFilters();
        filter.addFilter( getMarkedArtifactFilter() );

        Set<Artifact> unMarkedArtifacts;
        try
        {
            unMarkedArtifacts = filter.filter( artifacts );
        }
        catch ( ArtifactFilterException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }

        // calculate the skipped artifacts
        Set<Artifact> skippedArtifacts = new HashSet<Artifact>();
        skippedArtifacts.addAll( artifacts );
        skippedArtifacts.removeAll( unMarkedArtifacts );

        return new DependencyStatusSets( unMarkedArtifacts, null, skippedArtifacts );
    }

    /**
     * @return Returns the markersDirectory.
     */
    public File getMarkersDirectory()
    {
        return this.markersDirectory;
    }

    /**
     * @param theMarkersDirectory The markersDirectory to set.
     */
    public void setMarkersDirectory( File theMarkersDirectory )
    {
        this.markersDirectory = theMarkersDirectory;
    }

    // TODO: Set marker files.

    /**
     * @return true, if the groupId should be prepended to the filename.
     */
    public boolean isPrependGroupId()
    {
        return prependGroupId;
    }

    /**
     * @param prependGroupId -
     *                       true if the groupId must be prepended during the copy.
     */
    public void setPrependGroupId( boolean prependGroupId )
    {
        this.prependGroupId = prependGroupId;
    }
}


text:
@interface MKDocNameLabel : NSTextField

@end


text:
Mirror your GitHub repos on a separate server. WebHook and Cron.

Every time a user pushes to your repo, it's cloned down to `~/reponame` and a
tar is made of it with the name `reponame-revision.tar.gz`. With the proper
configs, it's pushed up to Amazon S3.

## Installation

```bash
# on your server
~$ git clone git://github.com/parkr/spiegel.git && cd spiegel
~/spiegel$ # edit config.sh with your GitHub info
~/spiegel$ bash init.sh
~/spiegel$ bash sync.sh
```

If you want to use the webserver, setup node and make sure port 8080 is open on
your server.

## Mirroring

### Cron

Add a call to `sync.sh` to your `crontab` (usually by running `crontab -e`).

### WebHook

Copy `webhook/spiegel.conf` to `/etc/init/spiegel.conf` (it uses upstart on
ubuntu) and run `sudo start spiegel`. Then, add a webhook to your repos (under
Settings -> Service Hooks -> WebHook URLs) that points to your server on port
8080. Boom.

## Usage

Do whatever you like! I suggest using `rsync` for the dirs and `scp` for the
tar files. The idea is to have your code somewhere that will be available even
when GitHub goes offline.


text:
/**
 * This file contains functions to handle pagination for queries that use infinite scroll.
 * https://www.apollographql.com/docs/react/pagination/core-api/
 */
import { Strain } from "dicty-graphql-schema"
import { StrainItem, PlasmidItem } from "features/Stocks/Catalogs/types"

/**
 * Using interfaces rather than types so SearchInfo can be extended.
 */

interface SearchInfo {
  nextCursor: number
  totalCount: number
  __typename: string
}

interface ListStrainsWithAnnotation extends SearchInfo {
  strains: Array<Strain>
}

interface ListPlasmidsWithAnnotation extends SearchInfo {
  plasmids: Array<{
    id: string
    name: string
    summary: Array<string>
    in_stock: boolean
  }>
}

interface ListStrains extends SearchInfo {
  strains: Array<StrainItem>
}

interface ListPlasmids extends SearchInfo {
  plasmids: Array<PlasmidItem>
}

const listStrainsWithAnnotationPagination = () => ({
  keyArgs: ["type", "annotation"],
  merge(
    existing: ListStrainsWithAnnotation,
    incoming: ListStrainsWithAnnotation,
  ) {
    let strains: ListStrainsWithAnnotation["strains"] = []
    let totalCount: ListStrainsWithAnnotation["totalCount"] = 0
    if (existing) {
      strains = strains.concat(existing.strains)
      totalCount = existing.totalCount
    }
    if (incoming) {
      strains = strains.concat(incoming.strains)
      totalCount = totalCount + incoming.totalCount
    }
    return {
      ...incoming,
      strains,
      totalCount,
    }
  },
  read(existing: ListStrainsWithAnnotation) {
    return existing
  },
})

const listStrainsPagination = () => ({
  keyArgs: ["filter"],
  merge(existing: ListStrains, incoming: ListStrains) {
    let strains: ListStrains["strains"] = []
    if (existing) {
      strains = strains.concat(existing.strains)
    }
    if (incoming) {
      strains = strains.concat(incoming.strains)
    }
    return {
      ...incoming,
      strains,
    }
  },
  read(existing: ListStrains) {
    return existing
  },
})

const listPlasmidsWithAnnotationPagination = () => ({
  keyArgs: ["type", "annotation"],
  merge(
    existing: ListPlasmidsWithAnnotation,
    incoming: ListPlasmidsWithAnnotation,
  ) {
    let plasmids: ListPlasmidsWithAnnotation["plasmids"] = []
    let totalCount: ListPlasmidsWithAnnotation["totalCount"] = 0
    if (existing) {
      plasmids = plasmids.concat(existing.plasmids)
      totalCount = existing.totalCount
    }
    if (incoming) {
      plasmids = plasmids.concat(incoming.plasmids)
      totalCount = totalCount + incoming.totalCount
    }
    return {
      ...incoming,
      plasmids,
      totalCount,
    }
  },
  read(existing: ListPlasmidsWithAnnotation) {
    return existing
  },
})

const listPlasmidsPagination = () => ({
  keyArgs: ["filter"],
  merge(existing: ListPlasmids, incoming: ListPlasmids) {
    let plasmids: ListPlasmids["plasmids"] = []
    if (existing) {
      plasmids = plasmids.concat(existing.plasmids)
    }
    if (incoming) {
      plasmids = plasmids.concat(incoming.plasmids)
    }
    return {
      ...incoming,
      plasmids,
    }
  },
  read(existing: ListPlasmids) {
    return existing
  },
})

export type { ListStrainsWithAnnotation }
export {
  listStrainsWithAnnotationPagination,
  listPlasmidsWithAnnotationPagination,
  listStrainsPagination,
  listPlasmidsPagination,
}


text:
'use strict';

var _ = require('lodash');
var Promise = require('bluebird');
var fbuffer = require('flexbuffer');
var utils = require('./utils');
var commands = require('redis-commands');
var calculateSlot = require('cluster-key-slot');

/**
 * Command instance
 *
 * It's rare that you need to create a Command instance yourself.
 *
 * @constructor
 * @param {string} name - Command name
 * @param {string[]} [args=null] - An array of command arguments
 * @param {object} [options]
 * @param {string} [options.replyEncoding=null] - Set the encoding of the reply,
 * by default buffer will be returned.
 * @param {function} [callback=null] - The callback that handles the response.
 * If omit, the response will be handled via Promise.
 * @example
 * ```js
 * var infoCommand = new Command('info', null, function (err, result) {
 *   console.log('result', result);
 * });
 *
 * redis.sendCommand(infoCommand);
 *
 * // When no callback provided, Command instance will have a `promise` property,
 * // which will resolve/reject with the result of the command.
 * var getCommand = new Command('get', ['foo']);
 * getCommand.promise.then(function (result) {
 *   console.log('result', result);
 * });
 * ```
 *
 * @see {@link Redis#sendCommand} which can send a Command instance to Redis
 * @public
 */
function Command(name, args, options, callback) {
  if (typeof options === 'undefined') {
    options = {};
  }
  this.name = name;
  this.replyEncoding = options.replyEncoding;
  this.errorStack = options.errorStack;
  this.args = args ? _.flatten(args) : [];
  this.callback = callback;
  this.initPromise();

  var keyPrefix = options.keyPrefix;
  if (keyPrefix) {
    this._iterateKeys(function (key) {
      return keyPrefix + key;
    });
  }
}

Command.prototype.initPromise = function () {
  var _this = this;
  this.promise = new Promise(function (resolve, reject) {
    if (!_this.transformed) {
      _this.transformed = true;
      var transformer = Command._transformer.argument[_this.name];
      if (transformer) {
        _this.args = transformer(_this.args);
      }
      _this.stringifyArguments();
    }

    _this.resolve = _this._convertValue(resolve);
    if (_this.errorStack) {
      _this.reject = function (err) {
        reject(utils.optimizeErrorStack(err, _this.errorStack, __dirname));
      };
    } else {
      _this.reject = reject;
    }
  }).nodeify(this.callback);
};

Command.prototype.getSlot = function () {
  if (typeof this._slot === 'undefined') {
    var key = this.getKeys()[0];
    if (key) {
      this.slot = calculateSlot(key);
    } else {
      this.slot = null;
    }
  }
  return this.slot;
};

Command.prototype.getKeys = function () {
  return this._iterateKeys();
};

/**
 * Iterate through the command arguments that are considered keys.
 *
 * @param {function} [transform] - The transformation that should be applied to
 * each key. The transformations will persist.
 * @return {string[]} The keys of the command.
 * @private
 */
Command.prototype._iterateKeys = function (transform) {
  if (typeof this._keys === 'undefined') {
    if (typeof transform !== 'function') {
      transform = function (key) {
        return key;
      };
    }
    this._keys = [];
    if (commands.exists(this.name)) {
      var keyIndexes = commands.getKeyIndexes(this.name, this.args);
      for (var i = 0; i < keyIndexes.length; i++) {
        var index = keyIndexes[i];
        this.args[index] = transform(this.args[index]);
        this._keys.push(this.args[index]);
      }
    }
  }
  return this._keys;
};

/**
 * Convert command to writable buffer or string
 *
 * @return {string|Buffer}
 * @see {@link Redis#sendCommand}
 * @public
 */
Command.prototype.toWritable = function () {
  var bufferMode = false;
  var i;
  for (i = 0; i < this.args.length; ++i) {
    if (this.args[i] instanceof Buffer) {
      bufferMode = true;
      break;
    }
  }

  var result, arg;
  var commandStr = '*' + (this.args.length + 1) + '\r\n$' + this.name.length + '\r\n' + this.name + '\r\n';
  if (bufferMode) {
    var resultBuffer = new fbuffer.FlexBuffer(0);
    resultBuffer.write(commandStr);
    for (i = 0; i < this.args.length; ++i) {
      arg = this.args[i];
      if (arg instanceof Buffer) {
        if (arg.length === 0) {
          resultBuffer.write('$0\r\n\r\n');
        } else {
          resultBuffer.write('$' + arg.length + '\r\n');
          resultBuffer.write(arg);
          resultBuffer.write('\r\n');
        }
      } else {
        resultBuffer.write('$' + Buffer.byteLength(arg) + '\r\n' + arg + '\r\n');
      }
    }
    result = resultBuffer.getBuffer();
  } else {
    result = commandStr;
    for (i = 0; i < this.args.length; ++i) {
      result += '$' + Buffer.byteLength(this.args[i]) + '\r\n' + this.args[i] + '\r\n';
    }
  }
  return result;
};

Command.prototype.stringifyArguments = function () {
  for (var i = 0; i < this.args.length; ++i) {
    if (!(this.args[i] instanceof Buffer) && typeof this.args[i] !== 'string') {
      this.args[i] = utils.toArg(this.args[i]);
    }
  }
};

/**
 * Convert the value from buffer to the target encoding.
 *
 * @param {function} resolve - The resolve function of the Promise
 * @return {function} A funtion to transform and resolve a value
 * @private
 */
Command.prototype._convertValue = function (resolve) {
  var _this = this;
  return function (value) {
    try {
      resolve(_this.transformReply(value));
    } catch (err) {
      _this.reject(err);
    }
    return _this.promise;
  };
};

/**
 * Convert buffer/buffer[] to string/string[],
 * and apply reply transformer.
 *
 * @public
 */
Command.prototype.transformReply = function (result) {
  if (this.replyEncoding) {
    result = utils.convertBufferToString(result, this.replyEncoding);
  }
  var transformer = Command._transformer.reply[this.name];
  if (transformer) {
    result = transformer(result);
  }

  return result;
};

Command.FLAGS = {
  // Commands that can be processed when client is in the subscriber mode
  VALID_IN_SUBSCRIBER_MODE: ['subscribe', 'psubscribe', 'unsubscribe', 'punsubscribe', 'ping', 'quit'],
  // Commands that are valid in monitor mode
  VALID_IN_MONITOR_MODE: ['monitor', 'auth'],
  // Commands that will turn current connection into subscriber mode
  ENTER_SUBSCRIBER_MODE: ['subscribe', 'psubscribe'],
  // Commands that may make current connection quit subscriber mode
  EXIT_SUBSCRIBER_MODE: ['unsubscribe', 'punsubscribe'],
  // Commands that will make client disconnect from server TODO shutdown?
  WILL_DISCONNECT: ['quit']
};

var flagMap = Object.keys(Command.FLAGS).reduce(function (map, flagName) {
  map[flagName] = {};
  Command.FLAGS[flagName].forEach(function (commandName) {
    map[flagName][commandName] = true;
  });
  return map;
}, {});

/**
 * Check whether the command has the flag
 *
 * @param {string} flagName
 * @param {string} commandName
 * @return {boolean}
 */
Command.checkFlag = function (flagName, commandName) {
  return !!flagMap[flagName][commandName];
};

Command._transformer = {
  argument: {},
  reply: {}
};

Command.setArgumentTransformer = function (name, func) {
  Command._transformer.argument[name] = func;
};

Command.setReplyTransformer = function (name, func) {
  Command._transformer.reply[name] = func;
};

var msetArgumentTransformer = function (args) {
  if (args.length === 1) {
    if (typeof Map !== 'undefined' && args[0] instanceof Map) {
      return utils.convertMapToArray(args[0]);
    }
    if (typeof args[0] === 'object' && args[0] !== null) {
      return utils.convertObjectToArray(args[0]);
    }
  }
  return args;
};

Command.setArgumentTransformer('mset', msetArgumentTransformer);
Command.setArgumentTransformer('msetnx', msetArgumentTransformer);

Command.setArgumentTransformer('hmset', function (args) {
  if (args.length === 2) {
    if (typeof Map !== 'undefined' && args[1] instanceof Map) {
      return [args[0]].concat(utils.convertMapToArray(args[1]));
    }
    if (typeof args[1] === 'object' && args[1] !== null) {
      return [args[0]].concat(utils.convertObjectToArray(args[1]));
    }
  }
  return args;
});

Command.setReplyTransformer('hgetall', function (result) {
  if (Array.isArray(result)) {
    var obj = {};
    for (var i = 0; i < result.length; i += 2) {
      obj[result[i]] = result[i + 1];
    }
    return obj;
  }
  return result;
});

module.exports = Command;


text:
#pragma once
#include <aws/lambda/Lambda_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace Lambda
{
namespace Model
{
  /*
    $shape.documentation
  */
  class AWS_LAMBDA_API AddPermissionResult
  {
  public:
    AddPermissionResult();
    AddPermissionResult(const AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    AddPermissionResult& operator=(const AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /*

The permission statement you specified in the request. The response returns the same as a string using "\" as an escape character in the JSON.

    */
    inline const Aws::String& GetStatement() const{ return m_statement; }

    /*

The permission statement you specified in the request. The response returns the same as a string using "\" as an escape character in the JSON.

    */
    inline void SetStatement(const Aws::String& value) { m_statement = value; }

    /*

The permission statement you specified in the request. The response returns the same as a string using "\" as an escape character in the JSON.

    */
    inline void SetStatement(Aws::String&& value) { m_statement = value; }

    /*

The permission statement you specified in the request. The response returns the same as a string using "\" as an escape character in the JSON.

    */
    inline void SetStatement(const char* value) { m_statement.assign(value); }

    /*

The permission statement you specified in the request. The response returns the same as a string using "\" as an escape character in the JSON.

    */
    inline AddPermissionResult& WithStatement(const Aws::String& value) { SetStatement(value); return *this;}

    /*

The permission statement you specified in the request. The response returns the same as a string using "\" as an escape character in the JSON.

    */
    inline AddPermissionResult& WithStatement(Aws::String&& value) { SetStatement(value); return *this;}

    /*

The permission statement you specified in the request. The response returns the same as a string using "\" as an escape character in the JSON.

    */
    inline AddPermissionResult& WithStatement(const char* value) { SetStatement(value); return *this;}

  private:
    Aws::String m_statement;
  };

} // namespace Model
} // namespace Lambda
} // namespace Aws


text: export { default } from "./../../_gen/openfl/events/RenderEvent";


text:
@interface CatchApiComment ()

@property(retain) CatchApiNote *impl;

@end

@implementation CatchApiComment

@synthesize parentId = parentId_;
@synthesize impl = impl_;

- (id)initWithGuts:(CatchApiNote *)guts
{
    if ((self = [super init])) {
        self.impl = guts;
    }

    return self;
}

- (id)initWithParentID:(NSString *)parentId
                  text:(NSString *)text
{
    return [self initWithCommentID:nil
                          parentId:parentId
                           created:NOT_SET_S64
                          modified:NOT_SET_S64
                              text:text
                            source:nil
                         sourceUrl:nil];
}

- (id)initWithCommentID:(NSString *)commentId
               parentId:(NSString *)parentId
                created:(SInt64)created
               modified:(SInt64)modified
                   text:(NSString *)text
                 source:(NSString *)source
              sourceUrl:(NSString *)sourceUrl
{
    CatchApiComment *ret = [self initWithGuts:[[[CatchApiNote alloc] init] autorelease]];
    ret.commentId = commentId;
    ret.parentId = parentId;
    ret.created = created;
    ret.modified = modified;
    ret.text = text;
    ret.source = source;
    ret.sourceUrl = sourceUrl;
    return ret;
}

- (id)init
{
    return [self initWithCommentID:nil
                          parentId:nil
                           created:NOT_SET_S64
                          modified:NOT_SET_S64
                              text:nil
                            source:nil
                         sourceUrl:nil];
}

- (id)copyWithZone:(NSZone *)zone
{
    CatchApiComment *copy = [[[self class] allocWithZone:zone] initWithGuts:
                             [[self.impl copyWithZone:zone] autorelease]];

    return copy;
}

- (void)dealloc
{
    self.impl = nil;

    [super dealloc];
}

- (NSString *)commentId
{
    return self.impl.noteId;
}

- (void)setCommentId:(NSString *)commentId
{
    self.impl.noteId = commentId;
}

- (SInt64)created
{
    return self.impl.created;
}

- (void)setCreated:(SInt64)created
{
    self.impl.created = created;
}

- (SInt64)modified
{
    return self.impl.modified;
}

- (void)setModified:(SInt64)modified
{
    self.impl.modified = modified;
}

- (NSString *)text
{
    return self.impl.text;
}

- (void)setText:(NSString *)text
{
    self.impl.text = text;
}

- (NSString *)source
{
    return self.impl.source;
}

- (void)setSource:(NSString *)source
{
    self.impl.source = source;
}

- (NSString *)sourceUrl
{
    return self.impl.sourceUrl;
}

- (void)setSourceUrl:(NSString *)sourceUrl
{
    self.impl.sourceUrl = sourceUrl;
}

@end


text:
<script>
var g_callback = null;
var g_geoDone = false;
function waitForGeo(doneCallback) {
  if (g_geoDone) {
    doneCallback();
  } else {
    g_callback = doneCallback;
  }
}

function geoDone() {
  g_geoDone = true;
  if (g_callback)
    g_callback();
}

// Don't care whether geo succeeds or fails, just whether it gets past the
// infobar.
navigator.geolocation.getCurrentPosition(geoDone, geoDone);
</script>


text:
'use strict';

//Teachers service used for communicating with the teachers REST endpoints
angular.module('teachers').factory('Teachers', ['$resource',
  function ($resource) {
    return $resource('api/teachers/:teacherId', {
      teacherId: '@_id'
    }, {
      update: {
        method: 'PUT'
      }
    });
  }
]);


text:
import Repository from './Repository';
import tables from '../db/tables';

export default class SpecialWeaponsRepository extends Repository {
  getTable() {
    return tables.specialWeapons;
  }
}


text:
<?php
/*
 * Oferapp < http://www.netyul.com.br/ >.
 * Autor: Jefte Amorim da Costa
 * aquivo que contem o Conteudo da pagina CONTATO do sistema Oferapp.
 * versão 1.0
 */

require_once('skin/section.phtml');

/*-- record set --*/

$query_contato = "SELECT email FROM oferapp";
$resultado_contato = mysqli_query($dboferapp, $query_contato);
$email_row = mysqli_fetch_assoc($resultado_contato);
$row_emaildb = mysqli_fetch_array($resultado_contato);
$row_totalRows = mysqli_num_rows($resultado_contato);

?>

   Quem Somos

A OferApp é uma plataforma que visa aproximar clientes e estabelecimentos por meio de ofertas, tablóides, presentes e uma variedade de recursos.

Aqui você encontra as melhores ofertas e promoções que estão mais perto de você, além dos melhores estabelecimentos, você consegue solicitar e adquirir "em um mesmo lugar" produtos e serviços no atacado e varejo. Fácil, rápido e divertido, com apenas alguns cliques você tem a opção de obter tudo com um preço diferenciado. Concorre a presentes dos logistas e tem vantagens exclusivas! Antes de comprar, economize tempo e dinheiro, acessando a OferApp e suas ofertas irresistíveis.

Para os nossos Clientes (lojistas), a OferApp proporciona uma maior visibilidade na internet, fideliza os clientes existentes, deixando todos conectados em busca de novas ofertas e presentes, em uma única plataforma, além de ajudar na prospecção de novos clientes, fornecer suporte completo é a nossa missão, deixando o seu comércio aquecido o ano inteiro.

Contate-nos

Quem Somos

Termos de uso

Política de privacidade


text:
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#include "../../public/fpdf_ppo.h"
#include "../include/fsdk_define.h"

class CPDF_PageOrganizer
{
public:
	CPDF_PageOrganizer();
	~CPDF_PageOrganizer();

public:
	FX_BOOL				PDFDocInit(CPDF_Document *pDestPDFDoc, CPDF_Document *pSrcPDFDoc);
	FX_BOOL				ExportPage(CPDF_Document *pSrcPDFDoc, CFX_WordArray* nPageNum, CPDF_Document *pDestPDFDoc, int nIndex);
	CPDF_Object*		PageDictGetInheritableTag(CPDF_Dictionary *pDict, CFX_ByteString nSrctag);
	FX_BOOL				UpdateReference(CPDF_Object *pObj, CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPtrToPtr);
	int					GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPtrToPtr, CPDF_Reference *pRef);

};

CPDF_PageOrganizer::CPDF_PageOrganizer()
{

}

CPDF_PageOrganizer::~CPDF_PageOrganizer()
{

}

FX_BOOL CPDF_PageOrganizer::PDFDocInit(CPDF_Document *pDestPDFDoc, CPDF_Document *pSrcPDFDoc)
{
	if(!pDestPDFDoc || !pSrcPDFDoc)
		return false;

	CPDF_Dictionary* pNewRoot = pDestPDFDoc->GetRoot();
	if(!pNewRoot)	return FALSE;

	//Set the document information////////////////////////////////////////////

	CPDF_Dictionary* DInfoDict = pDestPDFDoc->GetInfo();

	if(!DInfoDict)
		return FALSE;

	CFX_ByteString producerstr;
	producerstr.Format("PDFium");
	DInfoDict->SetAt("Producer", new CPDF_String(producerstr));

	//Set type////////////////////////////////////////////////////////////////
	CFX_ByteString cbRootType = pNewRoot->GetString("Type","");
	if( cbRootType.Equal("") )
	{
		pNewRoot->SetAt("Type", new CPDF_Name("Catalog"));
	}

	CPDF_Dictionary* pNewPages = (CPDF_Dictionary*)(pNewRoot->GetElement("Pages")? pNewRoot->GetElement("Pages")->GetDirect() : NULL);
	if(!pNewPages)
	{
		pNewPages = new CPDF_Dictionary;
		FX_DWORD NewPagesON = pDestPDFDoc->AddIndirectObject(pNewPages);
		pNewRoot->SetAt("Pages", new CPDF_Reference(pDestPDFDoc, NewPagesON));
	}

	CFX_ByteString cbPageType = pNewPages->GetString("Type","");
	if(cbPageType.Equal(""))
	{
		pNewPages->SetAt("Type", new CPDF_Name("Pages"));
	}

	CPDF_Array* pKeysArray = pNewPages->GetArray("Kids");
	if(pKeysArray == NULL)
	{
		CPDF_Array* pNewKids = new CPDF_Array;
		FX_DWORD Kidsobjnum = -1;
		Kidsobjnum = pDestPDFDoc->AddIndirectObject(pNewKids);//, Kidsobjnum, Kidsgennum);

		pNewPages->SetAt("Kids", new CPDF_Reference(pDestPDFDoc, Kidsobjnum));//, Kidsgennum));
		pNewPages->SetAt("Count", new CPDF_Number(0));
	}

	return true;
}

FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document *pSrcPDFDoc, CFX_WordArray* nPageNum,
												CPDF_Document *pDestPDFDoc,int nIndex)
{
	int curpage =nIndex;

	CFX_MapPtrToPtr* pMapPtrToPtr = new CFX_MapPtrToPtr;
	pMapPtrToPtr->InitHashTable(1001);

	for(int i=0; i<nPageNum->GetSize(); i++)
	{

		CPDF_Dictionary* pCurPageDict = pDestPDFDoc->CreateNewPage(curpage);
		CPDF_Dictionary* pSrcPageDict = pSrcPDFDoc->GetPage(nPageNum->GetAt(i)-1);
		if(!pSrcPageDict || !pCurPageDict)
		{
			delete pMapPtrToPtr;
			return FALSE;
		}

		// Clone the page dictionary///////////
		FX_POSITION	SrcPos = pSrcPageDict->GetStartPos();
		while (SrcPos)
		{
			CFX_ByteString cbSrcKeyStr;
			CPDF_Object* pObj = pSrcPageDict->GetNextElement(SrcPos, cbSrcKeyStr);
			if(cbSrcKeyStr.Compare(("Type")) && cbSrcKeyStr.Compare(("Parent")))
			{
				if(pCurPageDict->KeyExist(cbSrcKeyStr))
					pCurPageDict->RemoveAt(cbSrcKeyStr);
				pCurPageDict->SetAt(cbSrcKeyStr, pObj->Clone());
			}
		}

		//inheritable item///////////////////////
		CPDF_Object* pInheritable = NULL;
		//1	MediaBox  //required
		if(!pCurPageDict->KeyExist("MediaBox"))
		{

			pInheritable = PageDictGetInheritableTag(pSrcPageDict, "MediaBox");
			if(!pInheritable)
			{
				//Search the "CropBox" from source page dictionary, if not exists,we take the letter size.
				pInheritable = PageDictGetInheritableTag(pSrcPageDict, "CropBox");
				if(pInheritable)
					pCurPageDict->SetAt("MediaBox", pInheritable->Clone());
				else
				{
					//Make the default size to be letter size (8.5'x11')
					CPDF_Array* pArray = new CPDF_Array;
					pArray->AddNumber(0);
					pArray->AddNumber(0);
					pArray->AddNumber(612);
					pArray->AddNumber(792);
					pCurPageDict->SetAt("MediaBox", pArray);
				}
			}
			else
				pCurPageDict->SetAt("MediaBox", pInheritable->Clone());
		}
		//2 Resources //required
		if(!pCurPageDict->KeyExist("Resources"))
		{
			pInheritable = PageDictGetInheritableTag(pSrcPageDict, "Resources");
			if(!pInheritable)
			{
				delete pMapPtrToPtr;
				return FALSE;
			}
			pCurPageDict->SetAt("Resources", pInheritable->Clone());
		}
		//3 CropBox  //Optional
		if(!pCurPageDict->KeyExist("CropBox"))
		{
			pInheritable = PageDictGetInheritableTag(pSrcPageDict, "CropBox");
			if(pInheritable)
				pCurPageDict->SetAt("CropBox", pInheritable->Clone());
		}
		//4 Rotate  //Optional
		if(!pCurPageDict->KeyExist("Rotate"))
		{
			pInheritable = PageDictGetInheritableTag(pSrcPageDict, "Rotate");
			if(pInheritable)
				pCurPageDict->SetAt("Rotate", pInheritable->Clone());
		}

		/////////////////////////////////////////////
		//Update the reference
		FX_DWORD dwOldPageObj = pSrcPageDict->GetObjNum();
		FX_DWORD dwNewPageObj = pCurPageDict->GetObjNum();

		pMapPtrToPtr->SetAt((FX_LPVOID)(FX_UINTPTR)dwOldPageObj, (FX_LPVOID)(FX_UINTPTR)dwNewPageObj);

		this->UpdateReference(pCurPageDict, pDestPDFDoc, pMapPtrToPtr);
		curpage++;
	}

	delete pMapPtrToPtr;
	return TRUE;
}

CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(CPDF_Dictionary *pDict, CFX_ByteString nSrctag)
{
	if(!pDict || !pDict->KeyExist("Type") || nSrctag.IsEmpty())
		return NULL;

	CPDF_Object* pType = pDict->GetElement("Type")->GetDirect();
	if(!pType || pType->GetType() != PDFOBJ_NAME)	return NULL;

	if(pType->GetString().Compare("Page"))	return NULL;

	if(!pDict->KeyExist("Parent"))	return NULL;
	CPDF_Object* pParent = pDict->GetElement("Parent")->GetDirect();
	if(!pParent || pParent->GetType() != PDFOBJ_DICTIONARY)	return NULL;

	CPDF_Dictionary* pp = (CPDF_Dictionary*)pParent;

	if(pDict->KeyExist((const char*)nSrctag))
		return pDict->GetElement((const char*)nSrctag);
	while (pp)
	{
		if(pp->KeyExist((const char*)nSrctag))
			return pp->GetElement((const char*)nSrctag);
		else if (pp->KeyExist("Parent"))
		{
			pp = (CPDF_Dictionary*)pp->GetElement("Parent")->GetDirect();
			if (pp->GetType() == PDFOBJ_NULL) break;
		}
		else break;
	}

	return NULL;
}

FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object *pObj, CPDF_Document *pDoc,
										 CFX_MapPtrToPtr* pMapPtrToPtr)
{
	switch (pObj->GetType())
	{
	case PDFOBJ_REFERENCE:
		{
			CPDF_Reference* pReference = (CPDF_Reference*)pObj;
			int newobjnum = GetNewObjId(pDoc, pMapPtrToPtr, pReference);
			if (newobjnum == 0) return FALSE;
			pReference->SetRef(pDoc, newobjnum);//, 0);
			break;
		}
	case PDFOBJ_DICTIONARY:
		{
			CPDF_Dictionary* pDict = (CPDF_Dictionary*)pObj;

			FX_POSITION pos = pDict->GetStartPos();
			while(pos)
			{
				CFX_ByteString key("");
				CPDF_Object* pNextObj = pDict->GetNextElement(pos, key);
				if (!FXSYS_strcmp(key, "Parent") || !FXSYS_strcmp(key, "Prev") || !FXSYS_strcmp(key, "First"))
					continue;
				if(pNextObj)
				{
					if(!UpdateReference(pNextObj, pDoc, pMapPtrToPtr))
						pDict->RemoveAt(key);
				}
				else
					return FALSE;
			}
			break;
		}
	case	PDFOBJ_ARRAY:
		{
			CPDF_Array* pArray = (CPDF_Array*)pObj;
			FX_DWORD count = pArray->GetCount();
			for(FX_DWORD i = 0; i < count; i ++)
			{
				CPDF_Object* pNextObj = pArray->GetElement(i);
				if(pNextObj)
				{
					if(!UpdateReference(pNextObj, pDoc, pMapPtrToPtr))
						return FALSE;
				}
				else
					return FALSE;
			}
			break;
		}
	case	PDFOBJ_STREAM:
		{
			CPDF_Stream* pStream = (CPDF_Stream*)pObj;
			CPDF_Dictionary* pDict = pStream->GetDict();
			if(pDict)
			{
				if(!UpdateReference(pDict, pDoc, pMapPtrToPtr))
					return FALSE;
			}
			else
				return FALSE;
			break;
		}
	default:	break;
	}

	return TRUE;
}

int	CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPtrToPtr,
									CPDF_Reference *pRef)
{
	size_t dwObjnum = 0;
	if(!pRef)
		return 0;
	dwObjnum = pRef->GetRefObjNum();

	size_t dwNewObjNum = 0;

	pMapPtrToPtr->Lookup((FX_LPVOID)dwObjnum, (FX_LPVOID&)dwNewObjNum);
	if(dwNewObjNum)
	{
		return (int)dwNewObjNum;
	}
	else
	{
		CPDF_Object* pDirect = pRef->GetDirect();
		if(!pDirect)
		{
			return 0;
		}

		CPDF_Object* pClone = pDirect->Clone();
		if(!pClone)
		{
			return 0;
		}

		if(pClone->GetType() == PDFOBJ_DICTIONARY)
		{
			CPDF_Dictionary* pDictClone = (CPDF_Dictionary*)pClone;
			if(pDictClone->KeyExist("Type"))
			{
				CFX_ByteString strType = pDictClone->GetString("Type");
				if(!FXSYS_stricmp(strType, "Pages"))
				{
					pDictClone->Release();
					return 4;
				}
				else if(!FXSYS_stricmp(strType, "Page"))
				{
					pDictClone->Release();
					return  0;
				}
			}
		}
		dwNewObjNum = pDoc->AddIndirectObject(pClone);//, onum, gnum);
		pMapPtrToPtr->SetAt((FX_LPVOID)dwObjnum, (FX_LPVOID)dwNewObjNum);

		if(!UpdateReference(pClone, pDoc, pMapPtrToPtr))
		{
			pClone->Release();
			return 0;
		}
		return (int)dwNewObjNum;
	}
	return 0;
}

FPDF_BOOL ParserPageRangeString(CFX_ByteString rangstring, CFX_WordArray* pageArray,int nCount)
{

	if(rangstring.GetLength() != 0)
	{
		rangstring.Remove(' ');
		int nLength = rangstring.GetLength();
		CFX_ByteString cbCompareString("0123456789-,");
		for(int i=0; i<nLength; i++)
		{
			if(cbCompareString.Find(rangstring[i]) == -1)
				return FALSE;
		}
		CFX_ByteString cbMidRange;
		int nStringFrom = 0;
		int nStringTo=0;
		while(nStringTo < nLength)
		{
			nStringTo = rangstring.Find(',',nStringFrom);
			if(nStringTo == -1)
			{
				nStringTo = nLength;
			}
			cbMidRange = rangstring.Mid(nStringFrom,nStringTo-nStringFrom);

			int nMid = cbMidRange.Find('-');
			if(nMid == -1)
			{
				long lPageNum = atol(cbMidRange);
				if(lPageNum <= 0 || lPageNum > nCount)
					return FALSE;
				pageArray->Add((FX_WORD)lPageNum);
			}
			else
			{
				int nStartPageNum = atol(cbMidRange.Mid(0,nMid));
				if (nStartPageNum ==0)
				{
					return FALSE;
				}

				nMid = nMid+1;
				int nEnd = cbMidRange.GetLength()-nMid;

				if(nEnd ==0)return FALSE;

				//				int nEndPageNum = (nEnd == 0)?nCount:atol(cbMidRange.Mid(nMid,nEnd));
				int nEndPageNum = atol(cbMidRange.Mid(nMid,nEnd));

				if(nStartPageNum < 0 ||nStartPageNum >nEndPageNum|| nEndPageNum > nCount)
				{
					return FALSE;
				}
				else
				{
					for(int nIndex=nStartPageNum; nIndex <= nEndPageNum; nIndex ++)
						pageArray->Add(nIndex);
				}
			}
			nStringFrom = nStringTo +1;
		}
	}
	return TRUE;
}

DLLEXPORT FPDF_BOOL STDCALL FPDF_ImportPages(FPDF_DOCUMENT dest_doc,FPDF_DOCUMENT src_doc,
											 FPDF_BYTESTRING pagerange, int index)
{
	if(dest_doc == NULL || src_doc == NULL )
		return FALSE;
	CFX_WordArray pageArray;
	CPDF_Document* pSrcDoc = (CPDF_Document*)src_doc;
	int nCount = pSrcDoc->GetPageCount();
	if(pagerange)
	{
		if(ParserPageRangeString(pagerange,&pageArray,nCount) == FALSE)
			return FALSE;
	}
	else
	{
		for(int i=1; i<=nCount; i++)
		{
			pageArray.Add(i);
		}
	}

	CPDF_Document* pDestDoc = (CPDF_Document*)dest_doc;
	CPDF_PageOrganizer pageOrg;

	pageOrg.PDFDocInit(pDestDoc,pSrcDoc);

	if(pageOrg.ExportPage(pSrcDoc,&pageArray,pDestDoc,index))
		return TRUE;
	return FALSE;
}

DLLEXPORT FPDF_BOOL STDCALL FPDF_CopyViewerPreferences(FPDF_DOCUMENT dest_doc, FPDF_DOCUMENT src_doc)
{
	if(src_doc == NULL || dest_doc == NULL)
		return false;
	CPDF_Document* pSrcDoc = (CPDF_Document*)src_doc;
	CPDF_Dictionary* pSrcDict = pSrcDoc->GetRoot();
	pSrcDict = pSrcDict->GetDict(FX_BSTRC("ViewerPreferences"));;
	if(!pSrcDict)
		return FALSE;
	CPDF_Document* pDstDoc = (CPDF_Document*)dest_doc;
	CPDF_Dictionary* pDstDict = pDstDoc->GetRoot();
	if(!pDstDict)
		return FALSE;
	pDstDict->SetAt(FX_BSTRC("ViewerPreferences"), pSrcDict->Clone(TRUE));
	return TRUE;
}


text:
require_relative 'spec_helper'

module Selenium
  module WebDriver
    describe Window do
      after do
        sleep 1 if ENV['TRAVIS']
        quit_driver
      end

      let(:window) { driver.manage.window }

      it 'gets the size of the current window' do
        size = window.size

        expect(size).to be_a(Dimension)

        expect(size.width).to be > 0
        expect(size.height).to be > 0
      end

      it 'sets the size of the current window' do
        size = window.size

        target_width = size.width - 20
        target_height = size.height - 20

        window.size = Dimension.new(target_width, target_height)

        new_size = window.size
        expect(new_size.width).to eq(target_width)
        expect(new_size.height).to eq(target_height)
      end

      it 'gets the position of the current window' do
        pos = window.position

        expect(pos).to be_a(Point)

        expect(pos.x).to be >= 0
        expect(pos.y).to be >= 0
      end

      it 'sets the position of the current window', except: {browser: :safari_preview} do
        pos = window.position

        target_x = pos.x + 10
        target_y = pos.y + 10

        window.position = Point.new(target_x, target_y)

        wait.until { window.position.x != pos.x && window.position.y != pos.y }

        new_pos = window.position
        expect(new_pos.x).to eq(target_x)
        expect(new_pos.y).to eq(target_y)
      end

      it 'gets the rect of the current window', only: {browser: %i[firefox ie]} do
        rect = window.rect

        expect(rect).to be_a(Rectangle)

        expect(rect.x).to be >= 0
        expect(rect.y).to be >= 0
        expect(rect.width).to be >= 0
        expect(rect.height).to be >= 0
      end

      it 'sets the rect of the current window', only: {browser: %i[firefox ie]} do
        rect = window.rect

        target_x = rect.x + 10
        target_y = rect.y + 10
        target_width = rect.width + 10
        target_height = rect.height + 10

        window.rect = Rectangle.new(target_x, target_y, target_width, target_height)

        wait.until { window.rect.x != rect.x && window.rect.y != rect.y }

        new_rect = window.rect
        expect(new_rect.x).to eq(target_x)
        expect(new_rect.y).to eq(target_y)
        expect(new_rect.width).to eq(target_width)
        expect(new_rect.height).to eq(target_height)
      end

      it 'can maximize the current window', except: {window_manager: false} do
        window.size = old_size = Dimension.new(200, 200)

        window.maximize
        wait.until { window.size != old_size }

        new_size = window.size
        expect(new_size.width).to be > old_size.width
        expect(new_size.height).to be > old_size.height
      end

      # Edge: Not Yet - https://dev.windows.com/en-us/microsoft-edge/platform/status/webdriver/details/
      # https://github.com/mozilla/geckodriver/issues/1281
      it 'can make window full screen', only: {window_manager: true, browser: %i[ie firefox]},
                                        exclude: {driver: :remote, browser: :firefox, platform: :linux} do
        window.size = old_size = Dimension.new(200, 200)

        wait.until { window.size != old_size }

        new_size = window.size
        expect(new_size.width).to be > old_size.width
        expect(new_size.height).to be > old_size.height
      end

      # Edge: Not Yet - https://dev.windows.com/en-us/microsoft-edge/platform/status/webdriver/details/
      # https://github.com/mozilla/geckodriver/issues/1281
      it 'can minimize the window', only: {window_manager: true, browser: %i[ie firefox]},
                                    exclude: {driver: :remote, browser: :firefox, platform: :linux} do
        window.minimize
        expect(driver.execute_script('return document.hidden;')).to be true
      end
    end
  end # WebDriver
end # Selenium