text:
Object.prototype.ref = function() {
	function Ref() {};
	Ref.prototype = this;
	Ref.prototype.constructor = Ref;
	return new Ref;
};
/*
IE не поддерживает scope: в querySelector, поэтому требуется альтернативное решение.
Решение найдено здесь: https://github.com/lazd/scopedQuerySelectorShim
*/

(function() {
  if (!HTMLElement.prototype.querySelectorAll) {
    throw new Error('rootedQuerySelectorAll: This polyfill can only be used with browsers that support querySelectorAll');
  }

  // A temporary element to query against for elements not currently in the DOM
  // We'll also use this element to test for :scope support
  var container = document.createElement('div');

  // Check if the browser supports :scope
  try {
    // Browser supports :scope, do nothing
    container.querySelectorAll(':scope *');
  }
  catch (e) {
    // Match usage of scope
    var scopeRE = /^\s*:scope/gi;

    // Overrides
    function overrideNodeMethod(prototype, methodName) {
      // Store the old method for use later
      var oldMethod = prototype[methodName];

      // Override the method
      prototype[methodName] = function(query) {
        var nodeList,
            gaveId = false,
            gaveContainer = false;

        if (query.match(scopeRE)) {
          // Remove :scope
          query = query.replace(scopeRE, '');

          if (!this.parentNode) {
            // Add to temporary container
            container.appendChild(this);
            gaveContainer = true;
          }

          parentNode = this.parentNode;

          if (!this.id) {
            // Give temporary ID
            this.id = 'rootedQuerySelector_id_'+(new Date()).getTime();
            gaveId = true;
          }

          // Find elements against parent node
          nodeList = oldMethod.call(parentNode, '#'+this.id+' '+query);

          // Reset the ID
          if (gaveId) {
            this.id = '';
          }

          // Remove from temporary container
          if (gaveContainer) {
            container.removeChild(this);
          }

          return nodeList;
        }
        else {
          // No immediate child selector used
          return oldMethod.call(this, query);
        }
      };
    }

    // Browser doesn't support :scope, add polyfill
    overrideNodeMethod(HTMLElement.prototype, 'querySelector');
    overrideNodeMethod(HTMLElement.prototype, 'querySelectorAll');
  }
}());
;(function() {
	var BrahmaFactory; // Инициализируем факторию для использования внутри её же конструктора

	var BrahmaFactory = function(userConfig) {
		/* Конфигурируем производство бибилиотеки */
		var factoryConfig = {
		};
		if ("object"===typeof  userConfig) for (var i in userConfig) {
			if (userConfig.hasOwnProperty(i)) {
				factoryConfig[i] = userConfig[i];
			}
		};
		/*
			Инициализируем новую переменную
		*/
		var Brahma = null;
		/*
			Мы можем поддерживать Sizzle, если он присутсвует в глобальном контексте. Его можно подключить отдельно или вместе с Jquery.
			Глобальная в scope переменная носит числовое значение, как маркер, где:
			0 : использовать querySelectorAll
			1 : использовать Sizzle

			Данная переменная проверяется в функции Brahma.nodeQuery
		*/
		var currentQuerySelector = ("function"===typeof Sizzle) ? 1 : 0;

		/*
			Создаем конструктор
		*/
		Brahma = function(subject) {
			if (this === window) {
	// OnAir
	var air = new Brahma();

	var callback = false;
	var extensionName = false;
	var option3 = false;
	switch (arguments.length) {
		case 1:
			var selector = arguments[0];
			var options = {};
			switch(typeof selector) {
				case "function":
					/*
						Если передана функция, то мы должны выполнить её после готовности документа
					*/
					if (Brahma.document.ready) {
						selector.call(this);
					} else {
						Brahma.bind('domReady', selector, true);
					}

					return Brahma(window);
				break;
				default:
					var elements = Brahma.nodeQuery.call(this, selector);
				break;
			}
		break;
		case 0:
			var selector = '';
			var options = {};
			var elements = Brahma.nodeQuery.call(this, selector);
		break;
	}

	/*
		Safari ведет себя очень странно, querySelectorAll возвращает функцию со свойствами, вместо массива, поэтому нам необходимо тестировать и
		на тип "function".
	*/
	if ( ("object"===typeof elements || "function"===typeof elements) && elements.length) {

		for (var index=0;index<elements.length;index++) {
			air[index] = elements[index];
		}
	};

	if (index>1) air.context = document;
	else if (index>0) air.context = elements[0].parentNode;
	else air.context = null;
	air.length = index;
	air.selector = selector;

	return air;
}
		};

		/*
			И прототип
		*/
		Brahma.vector = Brahma.prototype = {
			constructor: Brahma
		};

		/*
			Указываем версию
		*/
		Brahma.vector.version = '1.3.7';
		/*
			Над необходимо иметь данное свойство, что бы уметь отличать объекты Brahma от прочих
		*/
		Brahma.vector.brahma = true;
		/*
			Свойство document содержит информацию о текущем html-документе
			@ready : полностью ли загружен документ
		*/
		Brahma.document = {
			ready: false
		};

		/*
			Функционал обработки селекторов
		*/
		/*
Приводит любую переменную к массиву.
Отлично понимает массив Brahma объекты и jQuery объекты.
Для объектов неопределнного типа идет простой перебор свойств (не включая прототипные свойства)
Если же subject не объект, то он будет включен как элемент массива.
*/
Brahma.bench = function(subject, args, tieback) {

	var  elements = [];
	if ("object" === typeof subject) {
		if (subject instanceof Array || subject instanceof Brahma || (jQuery && subject instanceof jQuery)) {
			for(var i=0;i<subject.length;i++) {
				elements.push(subject[i]);
			}
		} else {
			for (var i in subject) {
				if (subject.hasOwnProperty(i)) {
					elements[i] = subject[i];
				}
			}
		};
	} else {
		elements = [subject];
	}

	return tieback.call(subject, elements, args);
};

Brahma.nodeQuery = Brahma.vector.nodeQuery = function(query, root) {
	var prefix;
	(root) ? (prefix=':scope ') : (prefix='');
	var root = root||document;

	switch(typeof query) {
		case 'string':
			var queryExpr = /<([a-zA-Z0-9_]+) \/>/i,
			argsExpr = /\[([a-zA-Z0-9_\-]*)[ ]?=([ ]?[^\]]*)\]/i;

			if (query.indexOf('[')>-1 && argsExpr.exec(query)) {
				/*
				Значения в запросах по поиск аттрибутов необходимо возводить в ковычки
				*/
				var patch = true;
				query = query.replace(argsExpr, "[$1=\"$2\"]");
			}

			if (queryExpr.exec(query) === null) {
				if (query.length===0) return new Array();

				if (currentQuerySelector===0) {
					// Нативный селектор
					try {
						return root.querySelectorAll(prefix+query);
					} catch(e) {
						console.log('Brahma: querySelectorAll not support query: '+query)
					}
				} else if (currentQuerySelector===1) {
					// Sizzle
					return Sizzle(query, root);
				}
			} else {
				return [document.createElement(result[1].toUpperCase())];
			};
		break;
		case 'function':
			return [];
		break;
		case 'object':
			if (query instanceof Array) {
				return query;
			} else {
				// test for window
				if (query==window) {
					return [query];
				}
				// test for jquery
				else if (query.jquery) {
					var elements = [];
					for (var j=0;j<query.length;j++) elements.push(query[j]);
					return elements;
				// test for self
				} else if (query.brahma) {
					var elements = [];
					for (var j=0;j<query.length;j++) elements.push(query[j]);
					return elements;
				} else {

					return [query];
				};
			}
		break;
		case "undefined":
		default:
			return [query];
		break;
	};
};

		/*
			Базовый API
		*/
		/**
@method camelCase
change dashed string to camel case style string

*/
Brahma.camelCase = function(text) {
	return text.replace(/-([\da-z])/gi, function( all, letter ) {
		return letter.toUpperCase();
	});
};

/**
	Функция создает объект, ссылающийся на другой. Соль в том, что ссылка будет происходить через прототип, а сам конструктор объекта будет типа Ref.
	Это позволит его отличать от обычной ссылки на объект при клонировании.
*/
Brahma.ref = function(proto) {
	function Ref() {};
	Ref.prototype = proto;
	var test = new Ref;
	return test;
};

/**
@method copyProps
Копирует все свойства объекта
*/
Brahma.copyProps = function(target, source) {
	for (var prop in source) {
		if (source.hasOwnProperty(prop)) target[prop] = source[prop];
	}
	return target;
}

/**
@method inherit
Копирует объект по максимальной глубине (функции и plane объекты остаются в прототипы, объекты клонируются)
*/
Brahma.inherit = function(proto) {
	var o = Object.create(proto);
	for (var prop in proto) {
		if (proto.hasOwnProperty(prop)&&null!==proto[prop]&&"object"===typeof proto[prop]) {
			/* Отслеживаем псевдо-ссылку */
			if (proto[prop].constructor.name!=='Ref') {
				o[prop] = Brahma.clone(proto[prop]);
			}
			else {
				o[prop] = proto[prop];
			}
		}
	}
	return o;
}

/**
@method clone
Создает копию объекта, возвращая её.
*/
Brahma.clone = function(prototype) {
	if (prototype instanceof Array) {
		var clone = [];
		clone.length=prototype.length;
	} else {
		var clone = {};
	};

	for (var prop in prototype) {
		if (!prototype.hasOwnProperty(prop)) continue;
		if (prototype[prop]===null || "object"!==typeof prototype[prop] || prototype[prop].constructor.name==='Ref') {
			clone[prop] = prototype[prop];
		} else {
			clone[prop] = Brahma.clone(prototype[prop]);
		}
	};

	return clone;
}
/**
@method extend
Объеденяет два объекта
*/
Brahma.extend = function() {

	var target = arguments[0], proto = arguments[1];
	var recrusive = (arguments.length>2) ? arguments[2] : false;

	for (var i in proto) {
		if (!proto.hasOwnProperty(i)) break;
		switch ( typeof proto[i] ) {
			case 'undefined':
			case 'null':
				target[i] = null;
			break;
			case 'object':

				if (proto[i] instanceof Array) {
					target[i] = [];

					Brahma.extend(target[i],proto[i]);
				} else {

					if (recrusive) {
						if ("object"!==typeof target[i]) target[i] = {};
						Brahma.exetnd(target[i], proto[i]);
					}
					else {
						target[i] = {};
						for (var ii in proto[i]) {
							target[i][ii] = proto[i][ii];
						};
					}
				};

			break;
			case 'boolean':
			case 'number':
			case 'string':
			case 'function':

				target[i] = proto[i];

			break;
		};
	};

	return target;
};

/*
Возвращает величину в пикселях, получая число % или px
@param value число
@param quantity контекстная величина в пикселях
*/
Brahma.percentEq = function(value, quantity) {

	if ("string" == typeof value&&value.substr(-1)==='%') {
		return ((quantity/100)* (value.substring(0, value.length-1)));
	};

	return parseInt(value);
};
/*
Парсит строку деклараций в ситаксисе разметки CSS
Brahma.parseCssDeclarations("background-color:red"); // {"background-color": "red"}
*/
Brahma.parseCssDeclarations = function(cssDeclarations) {
	if (typeof cssDeclarations != "string") return {};
	var cssDeclarations = cssDeclarations.split("\n").join('').split("\t").join('');
	if (cssDeclarations.length<1) return {};
	var cssDeclarations = cssDeclarations.split(';')
	var options = {};
	for (var o in cssDeclarations) {
		if (!cssDeclarations.hasOwnProperty(o)) continue;

		var op = (function(s){return "string"===typeof s ? s.trim() : s;})(cssDeclarations[o]).split(':');

		if (op[0].length===0) continue;
		options[op[0]] = (op[1]==='true'||op[1]==='false') ? (op[1]==="true"?true:false) : op[1];
	};

	return options;
};

/*
Перехват ошибки
*/
Brahma.die= function(a) {
	throw "Dharma error: "+(a||'unknown error');
};

		/**
			## Классы
			Brahma поддерживает возможность работы с большим количеством встроенных классов.

			На данный момент поддерживается только module. Module - это универстальный прототип компонента, он может модифицироваться расширениями. Сам класс модуля содержится в ключе Brahma.classes.module.proto. Расширения располагаются в Brahma.classes.module.internals.

			Конструктор модуля Brahma.classes.module.constructor должен быть вызван в контекте какого либо объекта. Он принимает два аргумента имя модуля и расширения.
			```
			Brahma.classes.module.constructor(name, internals)
			```
			Имя модуля может быть не указано. Конструктор возвращает новый объект.
			Новый объект имеет свойство master, которое ссылается на контекст, а так же добавляет в контекст в свойство modules ссылку на вновь созданный объект, если было указано имя.
		*/
		(Brahma.classes = {}) && (Brahma.classes.module = {
			constructor: function() {
	var name, internals;
	("string"===typeof arguments[0]) ? (name=arguments[0],internals=arguments[1]||[]) : (name=false,internals=arguments[0]||[]);

	var module = Brahma.inherit(Brahma.classes.module.proto);
	module.master = this.ref();

	//if (name) this.modules[name] = module;
	/* Каждый модуль может быть снабжден расширениями */
	if (internals instanceof Array) {
		for (var i = 0;i<internals.length;i++) {
			if ("object"!==typeof Brahma.classes.module.internals[internals[i]]) return Brahma.error('There in no internal `'+internals[i]+'`');

			Brahma.extend(module, Brahma.classes.module.internals[internals[i]].proto);

			if ("function"==typeof Brahma.classes.module.internals[internals[i]].initial) Brahma.classes.module.internals[internals[i]].initial.call(this.modules[name]);
		}
	}
	return module;
},
			proto: (function() {
	var proto = {};
	proto.prototype = {
		modules : {},
		/* Расширет модуль */
		assing : function(dist) {
			Brahma.extend(this, dist);
			return this;
		}
	};
	return proto;
})()
,
			internals: {
	'tie': {
		proto: {
			tie: function(cb) {
				cb.apply(this, arguments);
				return this;
			}
		}
	},
	// Расширение позволяющее встраивать в модуль фабрики
	'fabrics': {
		proto: {
			fabrics: {},
			modules: {},
			/**
			@method addFabric
			Модули способны содержать фабрики. Фабрики модулей вызываются с помощью функции create(fabricName, internals, proto)
			Т.е. фабрику, вместе со всеми настройками расширений можно задать заранее, но создать объект по этой схеме можно будет позже.
			*/
			addFabric : function(name, internals, constructor, proto) {

				this.fabrics[name] = {
					constructor: constructor||function(){},
					internals: internals,
					proto: proto||{}
				};

				return this;
			},
			/**
			@method create
			Процес создание модуля фабрикой идентичен с процессом создания модуля модулем
			*/
			create: function(fabricName, extend) {

				var module = Brahma.industry.make('module', this.fabrics[fabricName].internals, this.fabrics[fabricName].proto);

				Brahma.copyProps(module, extend);
				module.master = this.ref();

				this.fabrics[fabricName].constructor.call(module);
				return module;
			},
			/* Модуль устроен так, что его инициализация происходит только при его первом вызове, это исключает случай инициализации модуля в прототипе */
			module: function(globalName) {
				var
				initial=("function"===typeof arguments[2]) ? arguments[2] : ("function"===typeof arguments[1] ? arguments[1] : false),
				data=("object"===typeof arguments[1]) ? arguments[1] : ("object"===typeof arguments[2] ? arguments[2] : false);

				if (data||initial) {
					// Создаем фабрику
					this.addFabric(globalName, ['events'], initial, data||{});
					return this;
				} else {
					if ("undefined"===typeof this.modules[globalName]) {
						this.modules[globalName] = this.create(globalName);
					}
				}
				return this.modules[globalName];
			}
		}
	},
	// Позволяет создавать для модуля интерфейс. Интерйфейсые функции вызываются через свойство interface (Module.interface.go())
	// Такой подход позволяет отличать пользовательские функции и внутренние
	// Предлагаю убрать это расширение
	'interface': {
		proto: {
			interface: {},
			setInterface : function(data) {
				this.interface = {};
				var that = this;
				for (var i in data) {
					(function(name, f) {
						if ("function"===typeof f)
						that.interface[name] = function() { return f.apply(that, arguments); }
					})(i, data[i]['function']);
				}
				return this;
			}
		}
	},
	// VISUAL. Открывает функцию и свойство visual, и метод initVisualApi
	'visual': {
		proto: {
			createVisual: function(constructor) {
				var proto = {
					dom: {},
					objects: {}
				}
				if ("function"===typeof constructor) {
					var construct = constructor;
					construct.prototype = proto;
					construct.prototype.module = this;
					construct.prototype.constructor = constructor;

					this.visual = new construct(this);
				} else {
					this.visual = Brahma.extend(proto, constructor);
				}
				this.visual.module = this;
			}
		}
	},
	/* Добавляет поддержку событий */
	'events': {
		proto: {
			eventListners : {},
			bind : function(e, callback, once) {
				if (typeof this.eventListners[e] != 'object') this.eventListners[e] = [];

				this.eventListners[e].push({
					callback: callback,
					once: once
				});

				return this;
			},
			once : function(e, callback) {
				this.bind(e, callback, true);
				return this;
			},
			trigger : function() {

				if (typeof arguments[0] == 'integer') {
					var uin = arguments[0];
					var e = arguments[1];
					var args = (arguments.length>2) ? arguments[2] : [];
				} else {
					var uin = false;
					var e = arguments[0];
					var args = (arguments.length>1) ? arguments[1] : [];
				};

				var response = false;

				if (typeof this.eventListners[e] == 'object' && this.eventListners[e].length>0) {
					var todelete = [];
					for (var i = 0; i<this.eventListners[e].length; i++) {
						if (typeof this.eventListners[e][i] === 'object') {
							if (typeof this.eventListners[e][i].callback === "function") response = this.eventListners[e][i].callback.apply(this, args);

							if (this.eventListners[e][i].once) {

								todelete.push(i);
							};
						};
					};

					if (todelete.length>0) for (var i in todelete) {
						this.eventListners[e].splice(todelete[i], 1);
					};
				};
				return response;
			}
		}
	},
	/*
	Определнные методы можно вынести в контроллер, что делает их глабальными и доступными из объейта window
	*/
	'controller': {
		proto: {
			controller : {},
			// Create controller
			createController : function(a, b, c) {
				var globalName, initial, data;
				(arguments.length>2) && (globalName=a,initial=b,data=c);
				(arguments.length==2) && (globalName=false,initial=a,data=b);
				(arguments.length==1) && (globalName=false,initial=false,data=a);

				if ("object"==typeof initial||typeof data=="function") {
					var x=initial;initial=data,data=x; // Switch data and initial
				};

				this.controller = Brahma.module(data||{});
				this.controller.master = this;

				if (typeof initial === "function") initial.call(this.controller);

				if (globalName) {
					if ("object"!=typeof window.controllers) window.controllers = {};
					window.controllers[globalName] = this.controller;
				}
				return this.controller;
			}
		}
	}
},
		});

		/*
			Расщирения класса Brahma.classes.module содержат весьма полезные функции, такие как поддержка событий.
			Поэтому мы пользуемся имеющимся функционалом для расширения функционала самой Brahma, для того, что бы Brahma
			поддерживал возможность работы с событями bind, trigger.
		*/
		Brahma.extend(Brahma, Brahma.classes.module.internals.events.proto);

		/**
			## Brahma.industry
			Индустрия Brahma позволяет создавать объекты из классов Brahma.
			```
			object Brahma.industry('module', ['events'], {
				foo: 'bar'
			});
			```
		*/
		Brahma.industry = {
			make: function(className, internals, extend) {
				var newObject = Brahma.classes[className].constructor.call(false, internals||[]);

				if ("object"===typeof extend) for (var i in extend){
					if (extend.hasOwnProperty(i)) {
						if ("object"===typeof extend[i]) newObject[i] = Brahma.inherit(extend[i]);
						else newObject[i] = extend[i];
					}
				}
				return newObject;
			}
		}

		/**
			## brahma.applications

			Виджеты в Brahma - это что-то вроде плагинов в jQuery. Они работают с элементами DOM. Вызов их происходит через контекст этого объекта, получаемого через селектор.
			```
			Brahma('body').application('screens');
			```
			В данном случае мы создали объект, содержищий ссылку на BODY. Далее мы вызываем обработчик screens, который будет выполнен, получив объект со ссылкой в переменной this.data.

			Brahma так же поддерживаем передачу в this.data прочих объектов, например массива
			Brahma([1,2,3]).application('screens');
			Однако в большенстве случаев обработики требуют именно объекта Brahma с селектором DOM элементов.

			!Надо обратить внимание, что Brahma.applications - это не массив и не одномерный объект, а фактически модуль, который содержит другие модули. Т.е.
			*/
		Brahma.applications = Brahma.industry.make('module', ['fabrics']);
		/**
			## Brahma.application()
			Функция application позволяет как создавать, так и управлять и вызывать приложения. Всё зависит от того в каком контексте она вызвана.

			Когда мы вызывает функцию через объект Brahma, мы вызываем конструктор приложения:
			```
			Brahma.application('myapplication',{}) // Создаст приложение
			Brahma.application('myapplication', {}) // Модифицирует существующее приложение
			Brahma.application('myapplication') // Возвращает прототип приложения
			```
			Вызов приложения, когда оно нужно, происходит через объект vector, который создается при указаниии первого аргумента функции Brahma.
			```
			Brahma('div#go').application('myapplication'); // Создает экземпляр приложения и выполянет его

			Для удобтва можно указывать краткое имя функции
			Brahma('div#go').app('myapplication');

			При создании экземпляра приложения можно передавать в него конфигурацию
			Brahma('div#go').app('myapplication', {
				duration: 5000
			});
			```
		*/
		Brahma.applications.addFabric('default',['events','fabrics'], function() {});

Brahma.applications.execute = function() {
		// > Test for plugin exists
		if (typeof Brahma.applications.modules[arguments[0]] != 'object') {
			throw('Brahma: require `'+arguments[0]+'` application. Please, download it.');
		};

		// > We can give options to life elemnt
		var options = arguments.length>1 && typeof arguments[1] == 'object' ? arguments[1] : {};

		var plug = Brahma.inherit(Brahma.applications.modules[arguments[0]]);

		plug.config = Brahma.extend(plug.config, options, true);

		plug.scope = plug.selector = this;

		plug.classname = arguments[0];

		// > ! Append life variable to element
		Brahma(this)[0].component = plug;

		// > inside tie function
		if (typeof arguments[2] == "function") {
			arguments[2].apply(plug);
		};

		if ("function"===typeof plug.run) var result = plug.run();
		if (typeof result === 'undefined') return plug;
		else return result;
};

Brahma.app = Brahma.application = Brahma.vector.app = Brahma.vector.application = function(applicationName) {
	if (this === window || typeof this == 'function') {
		// > name of component
		var name = arguments[0];

		// > data
		if (arguments.length>1) {
			switch(typeof arguments[1]) {
				case 'object':
					var $data = arguments[1];
				break;
				case 'string': // copy
					var copy = arguments[1];
					if (typeof Brahma.applications.modules[copy] != 'undefined') {
						$data = Brahma.extend({}, Brahma.applications.modules[copy]);
					} else {
						$data = {};
					};
					if (arguments.length>2 && typeof arguments[2] == 'object') {
						$data = Brahma.extend($data, arguments[2]);
					};
				break;
			}

		} else {
			$data = {};
		};

		// > return component protptype if exists
		if (name && typeof Brahma.applications.modules[name] != 'undefined') return Brahma.extend(Brahma.applications.modules[name], $data);

		// merge with $data and make it Brahma module
		var component = Brahma.applications.create('default', $data);
		/*
		Этот момент нужно ещё протестировать, но нам нужно дополнительно дописать конфигурацию, потому что это протестировано.
		*/
		if (typeof $data.config === 'object') component.config = Brahma.extend(component.config, $data.config);

		Brahma.applications.modules[name] = component;

		if (!name) return this;
		else return Brahma.applications.modules[name];
	} else {
		return Brahma.applications.execute.apply(this,arguments);
	}
}
/* Выполняет приложение без передачи каких либо данных в качестве scope. Аналогично конструкции Brahma(window).app(appName) */
Brahma.application.run = function(appName) {
	return Brahma(window).app(appName);
}

/* В отличии от app, метод widget вызывает конструктор приложения для каждого элемента в наборе селекторов и возвращает не ссылку на созданный экземпляр приложения, а ссылку на vector */
Brahma.vector.widget = function() {
	var args = arguments;
	return Brahma.bench(this, arguments, function(elem, args) {
		for (var i=0;i<elem.length;i++) {
			Brahma.applications.execute.apply(elem[i],args);
		};
		return this;
	});
}
		/*
			API в стиле jQuery, работа с элементами, создание элементов и пр.
		*/

Brahma.vector.html = function(html) {
	if ("undefined"===typeof html) {
		if (this.length<=0) return null;
		return this[0].innerHTML;
	}
	else
	return Brahma.bench(this, arguments, function(elem, arguments) {
		for (var q = 0;q<elem.length;q++) {
			elem[q].innerHTML = html;
		}
		return this;
	});
};

Brahma.vector.empty = function() {
	return Brahma.bench(this, arguments, function(elem) {
		for (var q = 0;q<elem.length;q++) {
			elem[q].innerHTML = '';
		}
		return this;
	});
};

Brahma.vector.remove = function() {
	return Brahma.bench(this, arguments, function(elem) {
		for (var q = 0;q<elem.length;q++) {
			elem[q].parentNode.removeChild(elem[q]);
		}
		return elem[q].parentNode;
	});
};

/**
@method replace
Заменяет данный элемент другим элементом и опционально сохраняет data-аргументы и классы
*/
Brahma.vector.replace = function(newElement, preserveData) {
	return Brahma.bench(this, arguments, function(elem, args) {
		var queue = [];
		for (var i=0;i<elem.length;i++) {
			(function(e) {
				if (preserveData) {
					var className = e.className;
					var data = {};
					if (Brahma.caniuse('dataset')) {
						for (var d in e.dataset) {
							if (e.dataset.hasOwnProperty(d)) data[d] = e.dataset[d];
						};
					} else {
						for (var d in e.attributes) {
							if (!e.attributes.hasOwnProperty(d)) continue;
							if (e.attributes[d].name.substring(0,5)==='data-') {

								data[e.attributes[d].name.substring(5)] = e.attributes[d].value;
							}
						};
					}

				};
				queue.push(newElement.cloneNode());
				e.parentNode.replaceChild(queue[queue.length-1], e);

				if (preserveData) {
					if (Brahma.caniuse('dataset')) {
						for (var d in data) {
							queue[queue.length-1].dataset[d] = data[d];
						};
					} else {
						for (var d in data) {
							queue[queue.length-1].setAttribute('data-'+d, data[d]);
						};
					};
					queue[queue.length-1].className = className;
				};
			})(elem[i]);
		}
		return Brahma(queue);
	});
}

Brahma.vector.parent = function() {

	return Brahma.bench(this, arguments, function(elem) {

		if (elem.length>0) return Brahma(elem[0].parentNode);
		else return null;
	});
};

Brahma.vector.createNode = function() {
	return Brahma.bench(this, arguments, function(elem,args) {
		var nodeName=args[0], attrs=args[1]||{}, prepend=args[2]||false,element=elem[0];
		try {
			var newElement = document.createElement(nodeName);
		} catch(e) {
			Brahma.die('Not a valid name tag name `'+nodeName+'`('+nodeName.length+')');
		}
		;(!(prepend||false))?this[0].appendChild(newElement):(function() {
			;
			if (element.firstChild!==null)
			element.insertBefore(newElement, element.firstChild);
			else element.appendChild(newElement);
		})();
		for (var name in attrs) {
			if (attrs.hasOwnProperty(name)) {
				newElement.setAttribute(name, attrs[name]);
			}
		}
		return Brahma([newElement]);
	});
}

Brahma.vector.each = Brahma.each = function() {
	var subject, callback;
	(this instanceof Brahma) ? (subject = this, callback = arguments[0]||false) : (subject=arguments[0],callback=arguments[1]);

	Brahma.bench(subject, [callback], function(elements, args) {

		var callback = ("function"===typeof args[0]) ? args[0] : false;
		for (var index = 0;index<elements.length;index++) {

			if (callback) callback.call(elements[index], elements[index], index);
		}
	});
}

Brahma.vector.put = function() {
	var kit = [];
	Brahma.bench(this, arguments, function(elem, args) {
		Brahma(elem).each(function(element) {
			switch(typeof args[0]) {
				case "object":
					var newElement = args[0];
					element.appendChild(newElement);
					kit.push(newElement);
				break;
				case "string":
					var nodeName = args[0].trim().toUpperCase();
					var attrs = args[1]||{};
					var newElement = Brahma(element).createNode(nodeName, attrs)[0];
					kit.push(newElement);
				break;
			};
		});
	});
	return Brahma(kit);
};

Brahma.vector.shift = function() {
	var kit = [];
	Brahma.bench(this, arguments, function(elem, args) {
		Brahma(elem).each(function(element) {
			switch(typeof args[0]) {
				case "object":
					var newElement = args[0];
					if (element.firstChild!==null)
					element.insertBefore(newElement, element.firstChild);
					else element.appendChild(newElement);
					kit.push(newElement);
				break;
				case "string":
					var nodeName = args[0].trim().toUpperCase();
					var attrs = args[1]||{};
					var newElement = Brahma(element).createNode(nodeName, attrs, true)[0];
					kit.push(newElement);
				break;
			};
		});
	});
	return Brahma(kit);
};

Brahma.vector.and = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		if (elem.length>0) {
			var parent = Brahma(elem[0].parentNode);
			return parent.put.apply(parent, args);
		} else {
			return null;
		}
	});
};

Brahma.vector.condition = function(condit, onTrue, onFalse) {
	if (condit) {
		if (typeof onTrue == 'function') return onTrue.call(this, condit);
		return this;
	} else {
		if (typeof onFalse == 'function') return onFalse.call(this);
		return this;
	};
}

Brahma.vector.wrapAll = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		var wrap = Brahma(elem[0].parentNode);
		var node = wrap.createNode.apply(wrap, args);
		for (var i=0;i<elem.length;i++) {
			Brahma(node).put(elem[i]);
		}

		return node;
	});
}

Brahma.vector.find = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		var kit = [];
		Brahma.each(elem, function() {

			var founds = Brahma.nodeQuery(args[0], this);

			if (founds.length) for (var i=0;i<founds.length;i++) {
				kit.push(founds[i]);
			};
		});

		return Brahma(kit);
	});
}

Brahma.vector.tie = function(cb) {
	cb.call(this);
	return this;
}

Brahma.addEvent = function(elem, type, userEventHandle, once) {
	var eventHandle;
	eventHandle = once ? function() {
		userEventHandle.apply(this, arguments);
		if ( elem.addEventListener ) {
			elem.removeEventListener(type, eventHandle, false);
		}  else if ( elem.attachEvent ) {
			 element.detachEvent("on" + type, eventHandle);
		} else {
			elem["on"+type] = null;
		};
	} : userEventHandle;
    if (elem == null || typeof(elem) == 'undefined') return;
    if ( elem.addEventListener ) {

        elem.addEventListener( type, eventHandle, false );
    } else if ( elem.attachEvent ) {
        elem.attachEvent( "on" + type, eventHandle );
    } else {
        elem["on"+type]=eventHandle;
    }
};

Brahma.vector.bind = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		for (var i=0;i<elem.length;i++) {
		   	Brahma.addEvent(elem[0], args[0], args[1], args[2]||false);
		}
		return this;
	});
}

Brahma.vector.addClass = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		var stylename = args[0];
		for (var i=0;i<elem.length;i++) {
			var st = elem[i].className.split(' ');
			(st.indexOf(stylename)<0) && (st.push(stylename), elem[i].className = st.join(' '));
		}
		return this;
	});
}

Brahma.vector.removeClass = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		var stylename = args[0];
		for (var i=0;i<elem.length;i++) {
			var st = elem[i].className.split(' ');
			var index = st.indexOf(stylename);
			if (index>-1) {
				st.splice(index, 1);
				elem[i].className = st.join(' ');
			};
		}
		return this;
	});
}

Brahma.vector.hasClass = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		var stylename = args[0];
		for (var i=0;i<elem.length;i++) {
			var st = elem[i].className.split(' ');
			var index = st.indexOf(stylename);
			if (index>-1) return true;
		}
		return false;
	});
}

Brahma.vector.css = function() {
	var data, polymorph=[];
	("object"===typeof arguments[0]) ? ((arguments[0] instanceof Array) ? (polymorph=arguments[0],data=arguments[1]) : (data=arguments[0])) : ( (arguments.length>1) ? (data={},data[arguments[0]]=arguments[1]) : (data=arguments[0]) );
	return Brahma.bench(this, [polymorph,data], function(elem, args) {
		if ("object"===typeof args[1]) {
			Brahma(elem).each(function() {
				for (var i in data) {
					if (polymorph.length!==0) for (var p = 0;p<polymorph.length;p++)
					this.style[polymorph[p]+i] = data[i];
					this.style[i] = data[i];
				};
			});
			return Brahma(elem);
		} else {
			return elem[0].style[data];
		};
	});
};

Brahma.vector.data = function() {
	return Brahma.bench(this, arguments, function(elem, args) {
		var key = Brahma.camelCase(args[0]);
		for (var i = 0;i<elem.length;i++) {
			if (args.length>1) {
				if (Brahma.caniuse('dataset'))
				elem[i].dataset[key] = args[1];
				else elem[i].setAttribute("data-"+args[0], args[1]);
			} else {
				if (Brahma.caniuse('dataset'))
				return ("undefined"!==typeof elem[i].dataset[key]) ? elem[i].dataset[key] : null;
				else
				return elem[i].getAttribute("data-"+args[0]);
			}
		};
		return this;
	});
}

Brahma.vector.attr = function() {
	var elem;
	return Brahma.bench(this, arguments, function(elem, args) {

		if (args.length>0) {
			switch(typeof args[0]) {
				case 'object':
					Brahma(elem).each(function() {
						for (var i in args[0]) {
							this.setAttribute(i, args[0][i]);
						};
					});
				break;
				case "string":
					if (args.length>1) {
						Brahma(elem).each(function() {
							this.setAttribute(args[0], args[1]);
						});
						return this;
					} else {
						return elem[0].getAttribute(args[0]);
					}
				break;
				default:
					return elem[0].attributes;
				break;
			};
			return Brahma(elem);
		} else {
			return elem[0].attributes;
		};
		return Brahma(elem);
	});
};

Brahma.vector.scroll = function() {
	var doc = document.documentElement;
	var left = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);
	var top = (window.pageYOffset || doc.scrollTop)  - (doc.clientTop || 0);
	return {left: left, top: top};
};

		/**
			## Brahma.cultivate
			Обеспечение фукнции воспроизводства самого себя. Используя функцию cultivate можно создать библиотеку, основанную на Brahma.
			Стоит учитывать, что вновь созданная библиотека не будет включать в себя расширенный функционал, если таковой был подключен
			дополнительно.
		*/
		Brahma.cultivate = function() {
			return BrahmaFactory(false);
		}

		/**
			## Brahma.caniuse
			Это локальная процедура проверки допустимых для данного браузера или устройства, тех или иных возможностей.
			Конечно, это очень ограниченная база знаний, тем не менее, необходимая.
		*/
		Brahma.caniuse = function(test) {
	if (Brahma.caniuse.info[test] && "function"===typeof Brahma.caniuse.info[test]) Brahma.caniuse.info[test] = Brahma.caniuse.info[test]();
	if (Brahma.caniuse.info[test]) return Brahma.caniuse.info[test]; else return false;
};
Brahma.caniuse.info = {
    /* dataset - определяет возможность использования dataset для получения аргументов data-* */
	"dataset": (typeof document.createElement('div').dataset !== "undefined"),
    /* translate3D - определяет возможность использования translate3D */
	"translate3D": function() {
		// https://gist.github.com/dryan/738720
		// borrowed from modernizr
		var div = document.createElement('div'),
			ret = false,
			properties = ['perspectiveProperty', 'WebkitPerspective'];
		for (var i = properties.length - 1; i >= 0; i--){
			ret = ret ? ret : div.style[properties[i]] != undefined;
		};

        // webkit has 3d transforms disabled for chrome, though
        //   it works fine in safari on leopard and snow leopard
        // as a result, it 'recognizes' the syntax and throws a false positive
        // thus we must do a more thorough check:
        if (ret){
            var st = document.createElement('style');
            // webkit allows this media query to succeed only if the feature is enabled.
            // "@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){#modernizr{height:3px}}"
            st.textContent = '@media (-webkit-transform-3d){#test3d{height:3px}}';
            document.getElementsByTagName('head')[0].appendChild(st);
            div.id = 'test3d';
            document.body.appendChild(div);

            ret = div.offsetHeight === 3;

            st.parentNode.removeChild(st);
            div.parentNode.removeChild(div);
        }
        return ret;
	},
    "mobile": function() {
        var check = false;
        var i = 0,
         iOS = false,
         iDevice = ['iPad', 'iPhone', 'iPod'];

        for (;i < iDevice.length ; i++ ) {
            if( navigator.platform === iDevice[i] ){ return true; break; }
        }
        (function(a,b){if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))check = true})(navigator.userAgent||navigator.vendor||window.opera);

        return check;
    }
};

		/*
			Перехватываем глобальные события, такие как готовность документа
		*/
		/*!
 * contentloaded.js
 *
 * Author: Diego Perini (diego.perini at gmail.com)
 * Summary: cross-browser wrapper for DOMContentLoaded
 * Updated: 20101020
 * License: MIT
 * Version: 1.2
 *
 * URL:
 * http://javascript.nwbox.com/ContentLoaded/
 *
 */
(function (win, fn) {
      var done = false, top = true,

      doc = win.document, root = doc.documentElement,

      add = doc.addEventListener ? 'addEventListener' : 'attachEvent',
      rem = doc.addEventListener ? 'removeEventListener' : 'detachEvent',
      pre = doc.addEventListener ? '' : 'on',

      init = function(e) {
          if (e.type == 'readystatechange' && doc.readyState != 'complete') return;
          (e.type == 'load' ? win : doc)[rem](pre + e.type, init, false);
          if (!done && (done = true)) fn.call(win, e.type || e);
      },

      poll = function() {
          try { root.doScroll('left'); } catch(e) { setTimeout(poll, 50); return; }
          init('poll');
      };

      if (doc.readyState == 'complete') fn.call(win, 'lazy');
      else {
          if (doc.createEventObject && root.doScroll) {
              try { top = !win.frameElement; } catch(e) { }
              if (top) poll();
          }
          doc[add](pre + 'DOMContentLoaded', init, false);
          doc[add](pre + 'readystatechange', init, false);
          win[add](pre + 'load', init, false);
      }

})(window, function() {

	Brahma.document.ready = true;
	Brahma.trigger('domReady');
});
		return Brahma;
	};

	window.Brahma = BrahmaFactory();
})();


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

<title>IDatastoreServiceFactory (Google App Engine Java API)</title>
<meta name="date" content="2015-09-02">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.google.appengine.api.datastore

Interface IDatastoreServiceFactory

public interface IDatastoreServiceFactory

This interface should be implemented by providers of the DatastoreService and registered
 with com.google.appengine.spi.ServiceFactoryFactory.

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

AsyncDatastoreService
getAsyncDatastoreService(DatastoreServiceConfig config)

Creates an AsyncDatastoreService using the provided config.

DatastoreService
getDatastoreService(DatastoreServiceConfig config)

Creates a DatastoreService using the provided config.

Method Detail

getDatastoreService

DatastoreService getDatastoreService(DatastoreServiceConfig config)

Creates a DatastoreService using the provided config.

getAsyncDatastoreService

AsyncDatastoreService getAsyncDatastoreService(DatastoreServiceConfig config)

Creates an AsyncDatastoreService using the provided config.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

redpajama_set_name: RedPajamaGithub


text:
using FlatRedBall.Glue.Plugins.ExportedImplementations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace FlatRedBall.Glue.Plugins.EmbeddedPlugins.SyncedProjects.Controls
{
    /// <summary>
    /// Interaction logic for ToolbarControl.xaml
    /// </summary>
    public partial class ToolbarControl : UserControl
    {
        public ToolbarControl()
        {
            InitializeComponent();
        }

        private void VisualStudioButtonClick(object sender, RoutedEventArgs e)
        {
            if(GlueState.Self.CurrentMainProject != null)
            {
                ProjectListEntry.OpenInVisualStudio(GlueState.Self.CurrentMainProject);
            }
            else
            {
                MessageBox.Show("No Glue project loaded");
            }
        }
    }
}


text:
namespace policy {

// static
ProfilePolicyConnectorFactory* ProfilePolicyConnectorFactory::GetInstance() {
  return base::Singleton<ProfilePolicyConnectorFactory>::get();
}

// static
ProfilePolicyConnector* ProfilePolicyConnectorFactory::GetForBrowserContext(
    content::BrowserContext* context) {
  return GetInstance()->GetForBrowserContextInternal(context);
}

// static
std::unique_ptr<ProfilePolicyConnector>
ProfilePolicyConnectorFactory::CreateForBrowserContext(
    content::BrowserContext* context,
    bool force_immediate_load) {
  return GetInstance()->CreateForBrowserContextInternal(context,
                                                        force_immediate_load);
}

void ProfilePolicyConnectorFactory::SetServiceForTesting(
    content::BrowserContext* context,
    ProfilePolicyConnector* connector) {
  ProfilePolicyConnector*& map_entry = connectors_[context];
  CHECK(!map_entry);
  map_entry = connector;
}

void ProfilePolicyConnectorFactory::PushProviderForTesting(
    ConfigurationPolicyProvider* provider) {
  test_providers_.push_back(provider);
}

ProfilePolicyConnectorFactory::ProfilePolicyConnectorFactory()
    : BrowserContextKeyedBaseFactory(
        "ProfilePolicyConnector",
        BrowserContextDependencyManager::GetInstance()) {
  DependsOn(SchemaRegistryServiceFactory::GetInstance());
#if defined(OS_CHROMEOS)
  DependsOn(UserCloudPolicyManagerFactoryChromeOS::GetInstance());
#else
  DependsOn(UserCloudPolicyManagerFactory::GetInstance());
#endif
}

ProfilePolicyConnectorFactory::~ProfilePolicyConnectorFactory() {
  DCHECK(connectors_.empty());
}

ProfilePolicyConnector*
ProfilePolicyConnectorFactory::GetForBrowserContextInternal(
    content::BrowserContext* context) {
  // Get the connector for the original Profile, so that the incognito Profile
  // gets managed settings from the same PolicyService.
  content::BrowserContext* const original_context =
      chrome::GetBrowserContextRedirectedInIncognito(context);
  const ConnectorMap::const_iterator it = connectors_.find(original_context);
  CHECK(it != connectors_.end());
  return it->second;
}

std::unique_ptr<ProfilePolicyConnector>
ProfilePolicyConnectorFactory::CreateForBrowserContextInternal(
    content::BrowserContext* context,
    bool force_immediate_load) {
  DCHECK(connectors_.find(context) == connectors_.end());

  SchemaRegistry* schema_registry = nullptr;
  CloudPolicyManager* user_cloud_policy_manager = nullptr;

  schema_registry =
      SchemaRegistryServiceFactory::GetForContext(context)->registry();

#if defined(OS_CHROMEOS)
  Profile* const profile = Profile::FromBrowserContext(context);
  const user_manager::User* user = nullptr;
  if (chromeos::ProfileHelper::IsSigninProfile(profile)) {
    policy::DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager =
        g_browser_process->platform_part()
            ->browser_policy_connector_chromeos()
            ->GetDeviceCloudPolicyManager();
    // TODO(tnagel): Do we need to do something for Active Directory management?
    if (device_cloud_policy_manager) {
      device_cloud_policy_manager->SetSigninProfileSchemaRegistry(
          schema_registry);
    }
  } else {
    user = chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
    CHECK(user);
  }
  user_cloud_policy_manager =
      UserCloudPolicyManagerFactoryChromeOS::GetForProfile(profile);
#else
  user_cloud_policy_manager =
      UserCloudPolicyManagerFactory::GetForBrowserContext(context);
#endif  // defined(OS_CHROMEOS)

  std::unique_ptr<ProfilePolicyConnector> connector(
      new ProfilePolicyConnector());

  if (test_providers_.empty()) {
    connector->Init(
#if defined(OS_CHROMEOS)
        user,
#endif
        schema_registry, user_cloud_policy_manager);
  } else {
    PolicyServiceImpl::Providers providers;
    providers.push_back(test_providers_.front());
    test_providers_.pop_front();
    std::unique_ptr<PolicyService> service(new PolicyServiceImpl(providers));
    connector->InitForTesting(std::move(service));
  }

  connectors_[context] = connector.get();
  return connector;
}

void ProfilePolicyConnectorFactory::BrowserContextShutdown(
    content::BrowserContext* context) {
  if (Profile::FromBrowserContext(context)->IsOffTheRecord())
    return;
  const ConnectorMap::const_iterator it = connectors_.find(context);
  if (it != connectors_.end())
    it->second->Shutdown();
}

void ProfilePolicyConnectorFactory::BrowserContextDestroyed(
    content::BrowserContext* context) {
  const ConnectorMap::iterator it = connectors_.find(context);
  if (it != connectors_.end())
    connectors_.erase(it);
  BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context);
}

void ProfilePolicyConnectorFactory::SetEmptyTestingFactory(
    content::BrowserContext* context) {}

bool ProfilePolicyConnectorFactory::HasTestingFactory(
    content::BrowserContext* context) {
  return false;
}

void ProfilePolicyConnectorFactory::CreateServiceNow(
    content::BrowserContext* context) {}

}  // namespace policy


text:
import test from 'ava'
import Vue from 'vue'
import { mount } from 'avoriaz'
import { i18n, currentLang } from 'app/config'
import Home from './Home.vue'

const wrapper = mount(Home, { i18n })

test('should have the correct name', t => {
  t.is(wrapper.name(), 'home')
})

test('should have the correct title', t => {
  const pageTitle = wrapper.find('h1')[0]

  t.is(pageTitle.text(), currentLang.home.title)
})


text:
require 'spaceship'

module WatchBuild
  class Runner
    attr_accessor :spaceship

    # Uses the spaceship to create or download a provisioning profile
    # returns the path the newly created provisioning profile (in /tmp usually)
    def run
      FastlaneCore::PrintTable.print_values(config: WatchBuild.config,
                                            hide_keys: [],
                                            title: "Summary for WatchBuild #{WatchBuild::VERSION}")

      UI.message("Starting login with user '#{WatchBuild.config[:username]}'")

      ENV['FASTLANE_ITC_TEAM_ID'] = WatchBuild.config[:itc_team_id] if WatchBuild.config[:itc_team_id]
      ENV['FASTLANE_ITC_TEAM_NAME'] = WatchBuild.config[:itc_team_name] if WatchBuild.config[:itc_team_name]
      ENV['SLACK_URL'] = WatchBuild.config[:slack_url]

      Spaceship::ConnectAPI.login(WatchBuild.config[:username], nil, use_portal: false, use_tunes: true)
      UI.message('Successfully logged in')

      start = Time.now
      build = wait_for_build(start)
      minutes = ((Time.now - start) / 60).round
      notification(build, minutes)
    end

    def wait_for_build(start_time)
      UI.user_error!("Could not find app with app identifier #{WatchBuild.config[:app_identifier]}") unless app

      build = nil
      showed_info = false

      loop do
        begin
          build = find_build(build)

          if build.nil?
            UI.important("Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997") unless showed_info
            showed_info = true
          else
            return build if build.processed?

            seconds_elapsed = (Time.now - start_time).to_i.abs
            case seconds_elapsed
            when 0..59
              time_elapsed = Time.at(seconds_elapsed).utc.strftime '%S seconds'
            when 60..3599
              time_elapsed = Time.at(seconds_elapsed).utc.strftime '%M:%S minutes'
            else
              time_elapsed = Time.at(seconds_elapsed).utc.strftime '%H:%M:%S hours'
            end

            UI.message("Waiting #{time_elapsed} for App Store Connect to process the build #{build.app_version} (#{build.version})... this might take a while...")
          end
        rescue => ex
          UI.error(ex)
          UI.message('Something failed... trying again to recover')
        end
        if WatchBuild.config[:sample_only_once] == false
          sleep 30
        else
          break
        end
      end
      nil
    end

    def notification(build, minutes)
      if build.nil?
        UI.message 'Application build is still processing'
        return
      end

      platform = build.pre_release_version.platform.downcase.gsub('_', '')

      url = "https://appstoreconnect.apple.com/apps/#{app.id}/testflight/#{platform}/#{build.id}/metadata"

      slack_url = ENV['SLACK_URL'].to_s
      if !slack_url.empty?
        notify_slack(build, minutes, slack_url)
      else
        notify_terminal(build, minutes, url)
      end

      UI.success('Successfully finished processing the build')
      if minutes > 0 # it's 0 minutes if there was no new build uploaded
        UI.message('You can now tweet: ')
        UI.important("App Store Connect #iosprocessingtime #{minutes} minutes")
      end
      UI.message(url)
    end

    private

    def app
      @app ||= Spaceship::ConnectAPI::App.find(WatchBuild.config[:app_identifier])
    end

    def notify_slack(build, minutes, url)
      require 'net/http'
      require 'uri'
      require 'json'

      message = "App Store build #{build.app_version} (#{build.version}) has finished processing in #{minutes} minutes"
      slack_url = URI.parse(url)
      slack_message = {
        "text": message
      }

      header = {'Content-Type': 'application/json'}

      http = Net::HTTP.new(slack_url.host, slack_url.port)
      http.use_ssl = true
      request = Net::HTTP::Post.new(slack_url.request_uri, header)
      request.body = slack_message.to_json
      response = http.request(request)

      if response.kind_of?(Net::HTTPSuccess)
        UI.success('Message sent to Slack.')
      else
        UI.user_error!('Error sending Slack notification.')
      end
    end

    def notify_terminal(build, minutes, url)
    	require 'terminal-notifier'

    	TerminalNotifier.notify('Build finished processing',
                              title: app.name,
                              subtitle: "#{build.app_version} (#{build.version})",
                              execute: "open '#{url}'")
    end

    # Finds a build if none given
    # Otherwise fetches a build (to get updated state)
    def find_build(build)
      if build.nil?
        build = app.get_builds(includes: Spaceship::ConnectAPI::Build::ESSENTIAL_INCLUDES).select do |build|
          build.processing_state == Spaceship::ConnectAPI::Build::ProcessingState::PROCESSING
        end.sort_by(&:uploaded_date).last
      else
        build = Spaceship::ConnectAPI::Build.get(build_id: build.id, includes: Spaceship::ConnectAPI::Build::ESSENTIAL_INCLUDES)
      end

      unless build
        UI.error("No processing builds available for app #{WatchBuild.config[:app_identifier]} - this may take a few minutes (check your email for processing issues if this continues)")
      end

      build
    end
  end
end


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

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.shiro.authc.AccountException;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.config.ConfigurationException;
import org.apache.shiro.realm.jdbc.JdbcRealm;
import static org.apache.shiro.realm.jdbc.JdbcRealm.SaltStyle.COLUMN;
import static org.apache.shiro.realm.jdbc.JdbcRealm.SaltStyle.CRYPT;
import static org.apache.shiro.realm.jdbc.JdbcRealm.SaltStyle.EXTERNAL;
import static org.apache.shiro.realm.jdbc.JdbcRealm.SaltStyle.NO_SALT;
import org.apache.shiro.util.ByteSource;
import org.apache.shiro.util.JdbcUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * This realm allows a user to authenticate based on its <i>email address</i>.
 */
public class SMRealm extends JdbcRealm {

  private static final Logger logger = LoggerFactory.getLogger(SMRealm.class);

  @Override
  protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token)
      throws AuthenticationException {
    UsernamePasswordToken upToken = (UsernamePasswordToken) token;
    final String email = upToken.getUsername();

    // null email is invalid
    if (email == null) {
      throw new AccountException("Null email is not allowed by this realm.");
    }

    Connection conn = null;
    SimpleAuthenticationInfo info = null;
    try {
      conn = dataSource.getConnection();
      String password = null;
      String salt = null;
      switch (saltStyle) {
      case NO_SALT:
        password = getPasswordForUser(conn, email)[0];
        break;
      case CRYPT:
        // TODO: separate password and hash from getPasswordForUser[0]
        throw new ConfigurationException("Not implemented yet");
        // break;
      case COLUMN:
        String[] queryResults = getPasswordForUser(conn, email);
        password = queryResults[0];
        salt = queryResults[1];
        break;
      case EXTERNAL:
        password = getPasswordForUser(conn, email)[0];
        salt = getSaltForUser(email);
      }

      if (password == null) {
        throw new UnknownAccountException(
            "No account found for user identified by [" + email + "]");
      }
      info = new SimpleAuthenticationInfo(email, password.toCharArray(),
          getName());
      if (salt != null) {
        info.setCredentialsSalt(ByteSource.Util.bytes(salt));
      }
    } catch (SQLException e) {
      final String message = "There was a SQL error while authenticating user identified by ["
          + email + "]";
      logger.error(message, e);
      // rethrow any SQL errors as an authentication exception
      throw new AuthenticationException(message, e);
    } finally {
      JdbcUtils.closeConnection(conn);
    }

    return info;
  }

  private String[] getPasswordForUser(Connection conn, String email)
      throws SQLException {
    String[] result;
    boolean returningSeparatedSalt = false;
    switch (saltStyle) {
    case NO_SALT:
    case CRYPT:
    case EXTERNAL:
      result = new String[1];
      break;
    default:
      result = new String[2];
      returningSeparatedSalt = true;
    }

    PreparedStatement ps = null;
    ResultSet rs = null;
    try {
      ps = conn.prepareStatement(authenticationQuery);
      ps.setString(1, email); // set email address

      // Loop over results - although we are only expecting one result,
      // since usernames should be unique
      rs = ps.executeQuery();
      boolean foundResult = false;
      while (rs.next()) {
        // Check to ensure only one row is processed
        if (foundResult) {
          throw new AuthenticationException(
              "More than one user row found for user [" + email
                  + "]. Emails must be unique.");
        }

        result[0] = rs.getString(1);
        if (returningSeparatedSalt) {
          result[1] = rs.getString(2);
        }
        foundResult = true;
      }
    } finally {
      JdbcUtils.closeResultSet(rs);
      JdbcUtils.closeStatement(ps);
    }

    return result;
  }

}


text:
'use strict';

const { createTooltip, returnEmptyArr, getExpectedData } = require('../command_util');

(function(c) {
    const COMMAND_TYPES = Entry.STATIC.COMMAND_TYPES;

    c[COMMAND_TYPES.containerSelectObject] = {
        do(objectId) {
            Entry.container.selectObject(objectId);
        },
        state(objectId) {
            return [Entry.playground.object.id, objectId];
        },
        log(objectId) {
            return [
                ['objectId', objectId],
                ['objectIndex', Entry.container.getObjectIndex(objectId)],
            ];
        },
        restrict(data, domQuery, callback) {
            Entry.container.scrollToObject(data.content[1][1]);

            return new Entry.Tooltip(
                [
                    {
                        title: data.tooltip.title,
                        content: data.tooltip.content,
                        target: domQuery,
                    },
                ],
                {
                    dimmed: true,
                    restrict: true,
                    callBack() {
                        callback();
                    },
                }
            );
        },
        undo: 'containerSelectObject',
        recordable: Entry.STATIC.RECORDABLE.SUPPORT,
        dom: ['container', 'objectIndex', '&1'],
    };

    c[COMMAND_TYPES.removeObject] = {
        do(objectId) {
            Entry.Utils.forceStopSounds();
            const { name } = Entry.container.getObject(objectId);
            Entry.container.removeObject(objectId);

            Entry.toast.success(
                Lang.Workspace.remove_object,
                `${name} ${Lang.Workspace.remove_object_msg}`
            );
        },
        state(objectId) {
            const object = Entry.container.getObject(objectId);
            return [object.toJSON(), object.getIndex()];
        },
        log(objectId) {
            return [['objectId', objectId]];
        },
        undo: 'addObject',
        recordable: Entry.STATIC.RECORDABLE.SUPPORT,
        dom: ['container', 'objectId', '&0', 'removeButton'],
    };

    c[COMMAND_TYPES.addObject] = {
        do(objectModel, index) {
            objectModel.id = getExpectedData('objectModel', {}).id || objectModel.id;
            Entry.container.addObjectFunc(objectModel, index);
            Entry.dispatchEvent('dismissModal');
        },
        state(objectModel, index) {
            objectModel.id = getExpectedData('objectModel', {}).id || objectModel.id;
            return [objectModel.id, index];
        },
        log(objectModel, index) {
            const { sprite, options = {} } = objectModel;
            const { font } = options;

            //$$hashKey can't saved for db
            const _omitFunc = _.partial(_.omit, _, '$$hashKey');

            objectModel.sprite = _omitFunc(sprite);
            if (_.isObject(font)) {
                objectModel.options.font = _omitFunc(font);
            }
            return [['objectModel', objectModel], ['objectIndex', index], ['spriteId', sprite._id]];
        },
        dom: ['.btn_confirm_modal'],
        restrict(data, domQuery, callback) {
            Entry.dispatchEvent('dismissModal');
            const {
                tooltip: { title, content },
            } = data;

            const tooltip = createTooltip(title, content, '.btn_confirm_modal', callback, {
                render: false,
            });

            const event = Entry.getMainWS().widgetUpdateEvent;

            if (!data.skip) {
                Entry.dispatchEvent(
                    'openSpriteManager',
                    getExpectedData('spriteId'),
                    event.notify.bind(event)
                );
            }
            return tooltip;
        },
        undo: 'removeObject',
        validate: false,
        recordable: Entry.STATIC.RECORDABLE.SUPPORT,
    };

    c[COMMAND_TYPES.addObjectButtonClick] = {
        do() {
            Entry.dispatchEvent('dismissModal');
            Entry.dispatchEvent('openSpriteManager');
        },
        state: returnEmptyArr,
        log: returnEmptyArr,
        undo: 'dismissModal',
        recordable: Entry.STATIC.RECORDABLE.SUPPORT,
        validate: false,
        dom: ['engine', 'objectAddButton'],
    };
})(Entry.Command);


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

    JBoss, Home of Professional Open Source.
    Copyright 2014-2022 Red Hat, Inc., and individual contributors
    as indicated by the @author tags.

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

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

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

-->
<persistence version="2.0"
   xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
        http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
   <persistence-unit name="primary">
       <jta-data-source>@persistence.jta-data-source@</jta-data-source>
       <jar-file>model.jar</jar-file>
       <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
       <properties>
         <!-- Properties for Hibernate -->
          <property name="hibernate.dialect" value="@persistence.hibernate.dialect@"/>
          <property name="hibernate.hbm2ddl.auto" value="@persistence.hibernate.hbm2ddl.auto@"/>
          <property name="hibernate.show_sql" value="false"/>
          <property name="hibernate.format_sql" value="true"/>
          <property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
          <!-- required by: BuildConfigurationRepositoryImpl.save to increment revision of parent entity when child is updated -->
          <property name="org.hibernate.envers.do_not_audit_optimistic_locking_field" value="false"/>
          <property name="hibernate.generate_statistics" value="true" />
          <property name="hibernate.session.events.log" value="false" />

          <!-- Configure batches to improve performance when doing bulk inserts and updates.
               Do not exceed with the size because when an entity is persisted, Hibernate stores it in the persistence context (in memory) before flushing.
          -->
          <property name="hibernate.jdbc.batch_size" value="50"/>
          <property name="hibernate.order_inserts" value="true"/>
          <property name="hibernate.order_updates" value="true"/>
          <property name="hibernate.batch_versioned_data" value="true"/>

          <!-- Raise error instead of warning if "HHH000104: firstResult/maxResults specified with collection fetch; applying in memory!" is detected (since Hibernate 5.2.13) -->
          <property name="hibernate.query.fail_on_pagination_over_collection_fetch" value="true"/>

          <!--
              Infinispan second level cache (default Wildfly settings are
              https://infinispan.org/docs/stable/titles/integrating/integrating.html#default_local_configuration_second_level):
                - Eviction wake up interval is 5 seconds.
                - Max number of entries are 10,000.
                - Max idle time before expiration is 100 seconds.
                - Default eviction algorithm is LRU, least recently used.
          -->
          <property name="hibernate.cache.use_reference_entries" value="true" />
          <property name="hibernate.cache.use_second_level_cache" value="true" />
          <property name="hibernate.cache.use_query_cache" value="true" />
          <property name="hibernate.cache.region_prefix" value=""/>
          <property name="hibernate.cache.infinispan.statistics" value="true"/>

          <!--
              Custom configurations can be made to the single entities
              https://infinispan.org/docs/stable/titles/integrating/integrating.html#configuration_properties

              # Examples to override single properties for each entity

              # Available options are NONE, LRU and LIRS
              <property name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.eviction.strategy" value= "LRU"/>
              # Period of thread checking expired entries (in milliseconds)
              <property name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.eviction.wake_up_interval" value= "2000"/>
              # Maximum number of entries in the cache
              <property name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.eviction.max_entries" value= "5000"/>
              # Lifespan of entry from last read/modification (in milliseconds)
              <property name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.expiration.max_idle" value= "30000"/>
              # Lifespan of entry from insert into cache (in milliseconds)
              <property name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.expiration.lifespan" value= "60000"/>
          -->

          <!-- Check expired entries every 4 mins -->
          <property name="hibernate.cache.infinispan.entity.eviction.wake_up_interval" value= "240000"/>

          <!-- If not read/modified in 20 mins, expire -->
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Product.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Product.productVersions.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductMilestone.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductMilestone.distributedArtifacts.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductMilestone.performedBuilds.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductMilestoneRelease.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductRelease.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductVersion.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductVersion.attributes.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductVersion.buildConfigurations.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.ProductVersion.buildConfigurationSets.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Project.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Project.buildConfigurations.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildRecordPushResult.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfiguration.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfiguration.buildConfigurationSets.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfiguration.dependencies.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfiguration.genericParameters.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfigurationSet.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfigurationSet.buildConfigurations.expiration.max_idle" />
          <property value= "1200000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.RepositoryConfiguration.expiration.max_idle" />

          <!-- If not read/modified in 10 mins, expire -->
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildRecord.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildRecord.attributes.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildRecord.builtArtifacts.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildRecord.dependencies.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfigSetRecord.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfigSetRecord.attributes.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildConfigSetRecord.buildRecords.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.buildRecords.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.Artifact.dependantBuildRecords.expiration.max_idle" />
          <property value= "600000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.TargetRepository.expiration.max_idle" />

          <!-- If not read/modified in 2 mins, expire; always expire in 4 mins and re-read from DB  -->
          <property value= "120000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.User.expiration.max_idle" />
          <property value= "240000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.User.expiration.lifespan" />
          <property value= "120000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildEnvironment.expiration.max_idle" />
          <property value= "120000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildEnvironment.attributes.expiration.max_idle" />
          <property value= "240000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildEnvironment.expiration.lifespan" />
          <property value= "240000" name="hibernate.cache.infinispan.ear-package.ear#primary.org.jboss.pnc.model.BuildEnvironment.attributes.expiration.lifespan" />

      </properties>
   </persistence-unit>
</persistence>


text:
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';

import { NioBreadcrumbsService } from './breadcrumbs.service';
import { NioBreadcrumbComponent } from './breadcrumbs.component';

@NgModule({
    declarations: [NioBreadcrumbComponent],

    imports: [
        CommonModule,
        RouterModule
    ],

    exports: [NioBreadcrumbComponent]
})
export class NioBreadcrumbsModule {
    public static forRoot():ModuleWithProviders {
        return {
            ngModule: NioBreadcrumbsModule,
            providers: [NioBreadcrumbsService]
        };
    }
}


text:
namespace CoursesSystem.Server.Areas.HelpPage.ModelDescriptions
{
    public class CollectionModelDescription : ModelDescription
    {
        public ModelDescription ElementDescription { get; set; }
    }
}


text:
id: 587d824c367417b2b2512c4c
title: Assert Deep Equality with .deepEqual and .notDeepEqual
challengeType: 2
videoUrl: ''
localeTitle: Afirmar la igualdad profunda con .deepEqual y .notDeepEqual
---

## Description

 Como recordatorio, este proyecto se está construyendo sobre el siguiente proyecto de inicio en Glitch , o clonado desde GitHub . .deepEqual (), .notDeepEqual () .deepEqual () afirma que dos objetos son profundos iguales

## Instructions

## Tests

```yml
tests:
  - text: Todas las pruebas deben pasar
    testString: 'getUserInput => $.get(getUserInput("url") + "/_api/get-tests?type=unit&n=6").then(data => {assert.equal(data.state,"passed"); }, xhr => { throw new Error(xhr.responseText); })'
  - text: Elija la aserción correcta - deepEqual vs. notDeepEqual
    testString: 'getUserInput => $.get(getUserInput("url") + "/_api/get-tests?type=unit&n=6").then(data => {  assert.equal(data.assertions[0].method, "deepEqual", "The order of the keys does not matter"); }, xhr => { throw new Error(xhr.responseText); })'
  - text: Elija la aserción correcta - deepEqual vs. notDeepEqual
    testString: 'getUserInput => $.get(getUserInput("url") + "/_api/get-tests?type=unit&n=6").then(data => {  assert.equal(data.assertions[1].method, "notDeepEqual", "The position of elements within an array does matter"); }, xhr => { throw new Error(xhr.responseText); })'

```

## Challenge Seed

## Solution

```js
// solution required
```


text:
@implementation ShowDataModel
-(instancetype)initWithDataModel:(int)superID myID:(int)myID grade:(int)grade isOpen:(BOOL)isOpen showName:(NSString *)showName rightShowName:(NSString *)rightShowName personMOdel:(personData *)persionModel{
    if (self=[super init]) {
        self.superID=superID;
        self.myID=myID;
        self.grade=grade;
        self.isOpen=isOpen;
        self.showName=showName;
        self.rightShowName=rightShowName;
        self.organId = persionModel.organId;
        self.organName = persionModel.organName;
        self.StruId = persionModel.StruId;
        self.OrganType = persionModel.OrganType;
    }
    return self;
}
+(instancetype)showDataModel:(int)superID myID:(int)myID grade:(int)grade isOpen:(BOOL)isOpen showName:(NSString *)showName rightShowName:(NSString *)rightShowName personMOdel:(personData *)persionModel{
    return [[self alloc]initWithDataModel:superID myID:myID grade:grade isOpen:isOpen showName:showName rightShowName:rightShowName personMOdel:persionModel];
}
@end


text:
""".. Ignore pydocstyle D400.

======================
Permissions Management
======================

.. automodule:: resolwe.flow.management.commands.register
    :members:

"""

from django.conf import settings
from django.contrib.auth import get_user_model
from django.db.models import signals

def create_anonymous_user(sender, **kwargs):
    """Create anonymous User instance if it does not exist."""
    User = get_user_model()
    try:
        User.objects.get(username=settings.ANONYMOUS_USER_NAME)
    except User.DoesNotExist:
        User.objects.create_user(username=settings.ANONYMOUS_USER_NAME)

# Create Anonymous user on post migrate signal. This includes "flush" which is
# performed it tests originating from TransactionTestCase.
signals.post_migrate.connect(create_anonymous_user)


text:
namespace chrono {
namespace geometry {

/// Geometric object representing a NURBS surface.

class ChApi ChSurfaceNurbs : public ChSurface {

  public:
    ChMatrixDynamic< ChVector<> > points;
    ChMatrixDynamic<>         weights;
    ChVectorDynamic<>         knots_u;
    ChVectorDynamic<>         knots_v;
    int                       p_u;
    int                       p_v;

  public:
        /// Constructor. By default, a segment (order = 1, two points on X axis, at -1, +1)
    ChSurfaceNurbs();

        /// Constructor from a given array of control points. Input data is copied.
        /// If the knots are not provided, a uniformly spaced knot vector is made.
        /// If the weights are not provided, a constant weight vector is made.
    ChSurfaceNurbs(int morder_u,                 ///< order pu: 1= linear, 2=quadratic, etc.
                   int morder_v,                 ///< order pv: 1= linear, 2=quadratic, etc.
                ChMatrixDynamic< ChVector<> >& mpoints, ///< control points, size nuxnv. Required: at least nu >= pu+1, same for v
                ChVectorDynamic<>* mknots_u = 0,      ///< knots, size ku. Required ku=nu+pu+1. If not provided, initialized to uniform.
                ChVectorDynamic<>* mknots_v = 0,      ///< knots, size kv. Required ku=nu+pu+1. If not provided, initialized to uniform.
                ChMatrixDynamic<>* weights = 0     ///< weights, size nuxnv. If not provided, all weights as 1.
                );

    ChSurfaceNurbs(const ChSurfaceNurbs& source);
    ~ChSurfaceNurbs() {}

    /// "Virtual" copy constructor (covariant return type).
    virtual ChSurfaceNurbs* Clone() const override { return new ChSurfaceNurbs(*this); }

    //virtual int Get_complexity() const override { return points.GetRows(); }

        /// Evaluates a point on the line, given parametric coordinate U.
        /// Parameter U always work in 0..1 range, even if knots are not in 0..1 range.
        /// So if you want to use u' in knot range, use ComputeUfromKnotU().
        /// Computed value goes into the 'pos' reference.
        /// It must be implemented by inherited classes.
    virtual void Evaluate(ChVector<>& pos,
                          const double parU,
                          const double parV ) const override;

        /// Evaluates normal
    //virtual void Normal(ChVector<>& dir, const double parU) const override;

    // NURBS specific functions

        /// When using Evaluate() etc. you need U parameter to be in 0..1 range,
        /// but knot range is not necessarily in 0..1. So you can convert u->U,
        /// where u is in knot range, calling this:
    double ComputeUfromKnotU(const double u) const {
        return (u - this->knots_u(0)) / (knots_u(knots_u.GetRows()-1) - knots_u(0));
    }
        /// When using Evaluate() etc. you need U parameter to be in 0..1 range,
        /// but knot range is not necessarily in 0..1. So you can convert U->u,
        /// where u is in knot range, calling this:
    double ComputeKnotUfromU(const double U) const {
        return U*(knots_u(knots_u.GetRows()-1) - knots_u(0)) + this->knots_u(0);
    }

        /// When using Evaluate() etc. you need V parameter to be in 0..1 range,
        /// but knot range is not necessarily in 0..1. So you can convert v->V,
        /// where v is in knot range, calling this:
    double ComputeVfromKnotV(const double v) const {
        return (v - this->knots_v(0)) / (knots_v(knots_v.GetRows()-1) - knots_v(0));
    }
        /// When using Evaluate() etc. you need V parameter to be in 0..1 range,
        /// but knot range is not necessarily in 0..1. So you can convert V->v,
        /// where v is in knot range, calling this:
    double ComputeKnotVfromV(const double V) const {
        return V*(knots_v(knots_v.GetRows()-1) - knots_v(0)) + this->knots_v(0);
    }

        /// Access the points
    ChMatrixDynamic< ChVector<> >& Points() { return points; }

        /// Access the weights
    ChMatrixDynamic<>& Weights() { return weights; }

        /// Access the U knots
    ChVectorDynamic<>& Knots_u() { return knots_u; }

        /// Access the U knots
    ChVectorDynamic<>& Knots_v() { return knots_v; }

        /// Get the order in u direction
    int GetOrder_u() { return p_u; }

        /// Get the order in v direction
    int GetOrder_v() { return p_v; }

        /// Initial easy setup from a given array of control points. Input data is copied.
        /// If the knots are not provided, a uniformly spaced knot vector is made.
        /// If the weights are not provided, a constant weight vector is made.
    virtual void SetupData( int morder_u,                 ///< order pu: 1= linear, 2=quadratic, etc.
                            int morder_v,                 ///< order pv: 1= linear, 2=quadratic, etc.
                            ChMatrixDynamic< ChVector<> >& mpoints,///< control points, size nuxnv. Required: at least nu >= pu+1, same for v
                            ChVectorDynamic<>* mknots_u = 0,      ///< knots u, size ku. Required ku=nu+pu+1. If not provided, initialized to uniform.
                            ChVectorDynamic<>* mknots_v = 0,      ///< knots v, size kv. Required ku=nu+pu+1. If not provided, initialized to uniform.
                            ChMatrixDynamic<>* weights = 0     ///< weights, size nuxnv. If not provided, all weights as 1.
                    );

    virtual void ArchiveOUT(ChArchiveOut& marchive) override {
        // version number
        marchive.VersionWrite<ChSurfaceNurbs>();
        // serialize parent class
        ChSurface::ArchiveOUT(marchive);
        // serialize all member data:
        marchive << CHNVP(points);
        marchive << CHNVP(weights);
        marchive << CHNVP(knots_u);
        marchive << CHNVP(knots_v);
        marchive << CHNVP(p_u);
        marchive << CHNVP(p_v);
    }

    /// Method to allow de serialization of transient data from archives.
    virtual void ArchiveIN(ChArchiveIn& marchive) override {
        // version number
        int version = marchive.VersionRead<ChSurfaceNurbs>();
        // deserialize parent class
        ChSurface::ArchiveIN(marchive);
        // stream in all member data:
        marchive >> CHNVP(points);
        marchive >> CHNVP(weights);
        marchive >> CHNVP(knots_u);
        marchive >> CHNVP(knots_v);
        marchive >> CHNVP(p_u);
        marchive >> CHNVP(p_v);
    }
};

}  // end namespace geometry

CH_CLASS_VERSION(geometry::ChSurfaceNurbs,0)

}  // end namespace chrono

#endif


text:
namespace CoreLib
{
	namespace Imaging
	{
		class ImageRef
		{
		public:
			VectorMath::Vec4 * Pixels;
			int Width, Height;
			ImageRef()
			{
				Width = Height = 0;
				Pixels = 0;
			}
			ImageRef(int width, int height, float * rgbData)
			{
				Width = width;
				Height = height;
				Pixels = (VectorMath::Vec4*)rgbData;
			}
			void SaveAsBmpFile(Basic::String fileName, bool reverseY = false);
			void SaveAsPngFile(Basic::String fileName, bool reverseY = false);
			void SaveAsPfmFile(Basic::String fileName, bool reverseY = false);
		};

		class BitmapF
		{
		private:
			VectorMath::Vec4 * pixels;
			int width;
			int height;
		public:
			inline VectorMath::Vec4 * GetPixels()
			{
				return pixels;
			}
			inline int GetWidth()
			{
				return width;
			}
			inline int GetHeight()
			{
				return height;
			}
			BitmapF()
			{
				width = 0;
				height = 0;
			}
			BitmapF(int width, int height)
			{
				this->width = width;
				this->height = height;
				pixels = (VectorMath::Vec4 *)malloc(width * height * sizeof(VectorMath::Vec4));
			}
			~BitmapF()
			{
				free(pixels);
			}

			BitmapF(Basic::String fileName);

			inline ImageRef GetImageRef()
			{
				ImageRef rs;
				rs.Pixels = pixels;
				rs.Width = width;
				rs.Height = height;
				return rs;
			}
		};

		class Bitmap
		{
		private:
			unsigned char * pixels;
			int width;
			int height;
			bool isTransparent;
		public:
			inline unsigned char * GetPixels() const
			{
				return pixels;
			}
			inline int GetWidth() const
			{
				return width;
			}
			inline int GetHeight() const
			{
				return height;
			}
			inline bool GetIsTransparent() const
			{
				return isTransparent;
			}
			Bitmap()
			{
				width = 0;
				height = 0;
				isTransparent = false;
			}
			Bitmap(int width, int height)
			{
				this->width = width;
				this->height = height;
				pixels = (unsigned char*)malloc(width * height * 4);
				isTransparent = false;
			}
			~Bitmap()
			{
				if (pixels)
					free(pixels);
			}

			Bitmap(Basic::String fileName);
		};

		void WriteBitmask(int * bits, int width, int height, Basic::String fileName);
		BitmapF CombineImageFromChannels(Bitmap * r, Bitmap * g, Bitmap * b, Bitmap * a);
	}
}

#endif


text:
using ProtoBuf;

namespace Kyru.Network.TcpMessages
{
	[ProtoContract]
	internal sealed class StoreObjectResponse
	{
		[ProtoMember(1)]
		internal Error Error;

		// if Error is Success, client will send the object contents as-is.
	}
}


text:
using System;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.CodeAnalysis.Scripting
{
    /// <summary>
    /// Represents the submission states and globals that get passed to a script entry point when run.
    /// </summary>
    internal sealed class ScriptExecutionState
    {
        private object[] _submissionStates;
        private int _count;
        private int _frozen;

        private ScriptExecutionState(object[] submissionStates, int count)
        {
            _submissionStates = submissionStates;
            _count = count;
        }

        public static ScriptExecutionState Create(object globals)
        {
            // first submission state is the globals.
            var submissionStates = new object[2];
            submissionStates[0] = globals;
            return new ScriptExecutionState(submissionStates, count: 1);
        }

        public ScriptExecutionState FreezeAndClone()
        {
            // freeze state so it can no longer be modified.
            var wasAlreadyFrozen = Interlocked.CompareExchange(ref _frozen, 1, 0) == 1;

            if (wasAlreadyFrozen)
            {
                // since only one state can add to the submissions, if its already been frozen and clone before
                // make a copy of the visible contents for the new state.
                var copy = new object[_count];
                Array.Copy(_submissionStates, copy, _count);
                return new ScriptExecutionState(copy, _count);
            }
            else
            {
                // cloned state can continue to add submission states
                return new ScriptExecutionState(_submissionStates, _count);
            }
        }

        public int SubmissionStateCount => _count;

        public object GetSubmissionState(int index)
        {
            Debug.Assert(index >= 0 && index < _count);
            return _submissionStates[index];
        }

        internal async Task<TResult> RunSubmissionsAsync<TResult>(
            ImmutableArray<Func<object[], Task>> precedingExecutors,
            Func<object[], Task> currentExecutor,
            CancellationToken cancellationToken)
        {
            Debug.Assert(_frozen == 0);

            foreach (var executor in precedingExecutors)
            {
                cancellationToken.ThrowIfCancellationRequested();

                EnsureStateCapacity();
                await executor(_submissionStates).ConfigureAwait(continueOnCapturedContext: false);
                AdvanceStateCounter();
            }

            cancellationToken.ThrowIfCancellationRequested();

            EnsureStateCapacity();
            TResult result = await ((Task<TResult>)currentExecutor(_submissionStates)).ConfigureAwait(continueOnCapturedContext: false);
            AdvanceStateCounter();

            return result;
        }

        private void EnsureStateCapacity()
        {
            // make sure there is enough free space for the submission to add its state
            if (_count >= _submissionStates.Length)
            {
                Array.Resize(ref _submissionStates, Math.Max(_count, _submissionStates.Length * 2));
            }
        }

        private void AdvanceStateCounter()
        {
            // check to see if state was added (submissions that don't make declarations don't add state)
            if (_submissionStates[_count] != null)
            {
                _count++;
            }
        }
    }
}


text:
package com.amazonaws.services.kinesis.model;

import java.io.Serializable;

/**
 *

 * Represents the output for ListStreams.
 *

 */
public class ListStreamsResult implements Serializable, Cloneable {

    /**
     *

     * The names of the streams that are associated with the AWS account making
     * the ListStreams request.
     *

     */
    private com.amazonaws.internal.SdkInternalList<String> streamNames;
    /**
     *

     * If set to true, there are more streams available to list.
     *

     */
    private Boolean hasMoreStreams;

    /**
     *

     * The names of the streams that are associated with the AWS account making
     * the ListStreams request.
     *

     *
     * @return The names of the streams that are associated with the AWS account
     *         making the ListStreams request.
     */

    public java.util.List<String> getStreamNames() {
        if (streamNames == null) {
            streamNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return streamNames;
    }

    /**
     *

     * The names of the streams that are associated with the AWS account making
     * the ListStreams request.
     *

     *
     * @param streamNames
     *        The names of the streams that are associated with the AWS account
     *        making the ListStreams request.
     */

    public void setStreamNames(java.util.Collection<String> streamNames) {
        if (streamNames == null) {
            this.streamNames = null;
            return;
        }

        this.streamNames = new com.amazonaws.internal.SdkInternalList<String>(
                streamNames);
    }

    /**
     *

     * The names of the streams that are associated with the AWS account making
     * the ListStreams request.
     *

     *

     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setStreamNames(java.util.Collection)} or
     * {@link #withStreamNames(java.util.Collection)} if you want to override
     * the existing values.
     *

     *
     * @param streamNames
     *        The names of the streams that are associated with the AWS account
     *        making the ListStreams request.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public ListStreamsResult withStreamNames(String... streamNames) {
        if (this.streamNames == null) {
            setStreamNames(new com.amazonaws.internal.SdkInternalList<String>(
                    streamNames.length));
        }
        for (String ele : streamNames) {
            this.streamNames.add(ele);
        }
        return this;
    }

    /**
     *

     * The names of the streams that are associated with the AWS account making
     * the ListStreams request.
     *

     *
     * @param streamNames
     *        The names of the streams that are associated with the AWS account
     *        making the ListStreams request.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public ListStreamsResult withStreamNames(
            java.util.Collection<String> streamNames) {
        setStreamNames(streamNames);
        return this;
    }

    /**
     *

     * If set to true, there are more streams available to list.
     *

     *
     * @param hasMoreStreams
     *        If set to true, there are more streams available to
     *        list.
     */

    public void setHasMoreStreams(Boolean hasMoreStreams) {
        this.hasMoreStreams = hasMoreStreams;
    }

    /**
     *

     * If set to true, there are more streams available to list.
     *

     *
     * @return If set to true, there are more streams available to
     *         list.
     */

    public Boolean getHasMoreStreams() {
        return this.hasMoreStreams;
    }

    /**
     *

     * If set to true, there are more streams available to list.
     *

     *
     * @param hasMoreStreams
     *        If set to true, there are more streams available to
     *        list.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public ListStreamsResult withHasMoreStreams(Boolean hasMoreStreams) {
        setHasMoreStreams(hasMoreStreams);
        return this;
    }

    /**
     *

     * If set to true, there are more streams available to list.
     *

     *
     * @return If set to true, there are more streams available to
     *         list.
     */

    public Boolean isHasMoreStreams() {
        return this.hasMoreStreams;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStreamNames() != null)
            sb.append("StreamNames: " + getStreamNames() + ",");
        if (getHasMoreStreams() != null)
            sb.append("HasMoreStreams: " + getHasMoreStreams());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ListStreamsResult == false)
            return false;
        ListStreamsResult other = (ListStreamsResult) obj;
        if (other.getStreamNames() == null ^ this.getStreamNames() == null)
            return false;
        if (other.getStreamNames() != null
                && other.getStreamNames().equals(this.getStreamNames()) == false)
            return false;
        if (other.getHasMoreStreams() == null
                ^ this.getHasMoreStreams() == null)
            return false;
        if (other.getHasMoreStreams() != null
                && other.getHasMoreStreams().equals(this.getHasMoreStreams()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime
                * hashCode
                + ((getStreamNames() == null) ? 0 : getStreamNames().hashCode());
        hashCode = prime
                * hashCode
                + ((getHasMoreStreams() == null) ? 0 : getHasMoreStreams()
                        .hashCode());
        return hashCode;
    }

    @Override
    public ListStreamsResult clone() {
        try {
            return (ListStreamsResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                            + "even though we're Cloneable!", e);
        }
    }
}