answer
stringlengths 15
1.25M
|
|---|
using System.ComponentModel;
namespace EncompassRest.Loans.Enums
{
<summary>
<API key>
</summary>
public enum <API key>
{
<summary>
Automated Valuation Model
</summary>
[Description("Automated Valuation Model")]
<API key> = 0,
<summary>
Desktop Appraisal
</summary>
[Description("Desktop Appraisal")]
DesktopAppraisal = 1,
<summary>
Drive By
</summary>
[Description("Drive By")]
DriveBy = 2,
<summary>
Estimation
</summary>
Estimation = 3,
<summary>
Full Appraisal
</summary>
[Description("Full Appraisal")]
FullAppraisal = 5,
<summary>
None
</summary>
None = 6,
<summary>
Other
</summary>
Other = 7,
<summary>
Prior Appraisal Used
</summary>
[Description("Prior Appraisal Used")]
PriorAppraisalUsed = 8
}
}
|
'use strict';
var RESOLVED = 0;
var REJECTED = 1;
var PENDING = 2;
function Promise$1(executor) {
this.state = PENDING;
this.value = undefined;
this.deferred = [];
var promise = this;
try {
executor(function (x) {
promise.resolve(x);
}, function (r) {
promise.reject(r);
});
} catch (e) {
promise.reject(e);
}
}
Promise$1.reject = function (r) {
return new Promise$1(function (resolve, reject) {
reject(r);
});
};
Promise$1.resolve = function (x) {
return new Promise$1(function (resolve, reject) {
resolve(x);
});
};
Promise$1.all = function all(iterable) {
return new Promise$1(function (resolve, reject) {
var count = 0,
result = [];
if (iterable.length === 0) {
resolve(result);
}
function resolver(i) {
return function (x) {
result[i] = x;
count += 1;
if (count === iterable.length) {
resolve(result);
}
};
}
for (var i = 0; i < iterable.length; i += 1) {
Promise$1.resolve(iterable[i]).then(resolver(i), reject);
}
});
};
Promise$1.race = function race(iterable) {
return new Promise$1(function (resolve, reject) {
for (var i = 0; i < iterable.length; i += 1) {
Promise$1.resolve(iterable[i]).then(resolve, reject);
}
});
};
var p = Promise$1.prototype;
p.resolve = function resolve(x) {
var promise = this;
if (promise.state === PENDING) {
if (x === promise) {
throw new TypeError('Promise settled with itself.');
}
var called = false;
try {
var then = x && x['then'];
if (x !== null && typeof x === 'object' && typeof then === 'function') {
then.call(x, function (x) {
if (!called) {
promise.resolve(x);
}
called = true;
}, function (r) {
if (!called) {
promise.reject(r);
}
called = true;
});
return;
}
} catch (e) {
if (!called) {
promise.reject(e);
}
return;
}
promise.state = RESOLVED;
promise.value = x;
promise.notify();
}
};
p.reject = function reject(reason) {
var promise = this;
if (promise.state === PENDING) {
if (reason === promise) {
throw new TypeError('Promise settled with itself.');
}
promise.state = REJECTED;
promise.value = reason;
promise.notify();
}
};
p.notify = function notify() {
var promise = this;
nextTick(function () {
if (promise.state !== PENDING) {
while (promise.deferred.length) {
var deferred = promise.deferred.shift(),
onResolved = deferred[0],
onRejected = deferred[1],
resolve = deferred[2],
reject = deferred[3];
try {
if (promise.state === RESOLVED) {
if (typeof onResolved === 'function') {
resolve(onResolved.call(undefined, promise.value));
} else {
resolve(promise.value);
}
} else if (promise.state === REJECTED) {
if (typeof onRejected === 'function') {
resolve(onRejected.call(undefined, promise.value));
} else {
reject(promise.value);
}
}
} catch (e) {
reject(e);
}
}
}
});
};
p.then = function then(onResolved, onRejected) {
var promise = this;
return new Promise$1(function (resolve, reject) {
promise.deferred.push([onResolved, onRejected, resolve, reject]);
promise.notify();
});
};
p["catch"] = function (onRejected) {
return this.then(undefined, onRejected);
};
/**
* Promise adapter.
*/
if (typeof Promise === 'undefined') {
window.Promise = Promise$1;
}
function PromiseObj(executor, context) {
if (executor instanceof Promise) {
this.promise = executor;
} else {
this.promise = new Promise(executor.bind(context));
}
this.context = context;
}
PromiseObj.all = function (iterable, context) {
return new PromiseObj(Promise.all(iterable), context);
};
PromiseObj.resolve = function (value, context) {
return new PromiseObj(Promise.resolve(value), context);
};
PromiseObj.reject = function (reason, context) {
return new PromiseObj(Promise.reject(reason), context);
};
PromiseObj.race = function (iterable, context) {
return new PromiseObj(Promise.race(iterable), context);
};
var p$1 = PromiseObj.prototype;
p$1.bind = function (context) {
this.context = context;
return this;
};
p$1.then = function (fulfilled, rejected) {
if (fulfilled && fulfilled.bind && this.context) {
fulfilled = fulfilled.bind(this.context);
}
if (rejected && rejected.bind && this.context) {
rejected = rejected.bind(this.context);
}
return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
};
p$1["catch"] = function (rejected) {
if (rejected && rejected.bind && this.context) {
rejected = rejected.bind(this.context);
}
return new PromiseObj(this.promise["catch"](rejected), this.context);
};
p$1["finally"] = function (callback) {
return this.then(function (value) {
callback.call(this);
return value;
}, function (reason) {
callback.call(this);
return Promise.reject(reason);
});
};
/**
* Utility functions.
*/
var _ref = {},
hasOwnProperty = _ref.hasOwnProperty,
slice = [].slice,
debug = false,
ntick;
var inBrowser = typeof window !== 'undefined';
function Util (_ref2) {
var config = _ref2.config,
nextTick = _ref2.nextTick;
ntick = nextTick;
debug = config.debug || !config.silent;
}
function warn(msg) {
if (typeof console !== 'undefined' && debug) {
console.warn('[VueResource warn]: ' + msg);
}
}
function error(msg) {
if (typeof console !== 'undefined') {
console.error(msg);
}
}
function nextTick(cb, ctx) {
return ntick(cb, ctx);
}
function trim(str) {
return str ? str.replace(/^\s*|\s*$/g, '') : '';
}
function trimEnd(str, chars) {
if (str && chars === undefined) {
return str.replace(/\s+$/, '');
}
if (!str || !chars) {
return str;
}
return str.replace(new RegExp("[" + chars + "]+$"), '');
}
function toLower(str) {
return str ? str.toLowerCase() : '';
}
function toUpper(str) {
return str ? str.toUpperCase() : '';
}
var isArray = Array.isArray;
function isString(val) {
return typeof val === 'string';
}
function isFunction(val) {
return typeof val === 'function';
}
function isObject(obj) {
return obj !== null && typeof obj === 'object';
}
function isPlainObject(obj) {
return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;
}
function isBlob(obj) {
return typeof Blob !== 'undefined' && obj instanceof Blob;
}
function isFormData(obj) {
return typeof FormData !== 'undefined' && obj instanceof FormData;
}
function when(value, fulfilled, rejected) {
var promise = PromiseObj.resolve(value);
if (arguments.length < 2) {
return promise;
}
return promise.then(fulfilled, rejected);
}
function options(fn, obj, opts) {
opts = opts || {};
if (isFunction(opts)) {
opts = opts.call(obj);
}
return merge(fn.bind({
$vm: obj,
$options: opts
}), fn, {
$options: opts
});
}
function each(obj, iterator) {
var i, key;
if (isArray(obj)) {
for (i = 0; i < obj.length; i++) {
iterator.call(obj[i], obj[i], i);
}
} else if (isObject(obj)) {
for (key in obj) {
if (hasOwnProperty.call(obj, key)) {
iterator.call(obj[key], obj[key], key);
}
}
}
return obj;
}
var assign = Object.assign || _assign;
function merge(target) {
var args = slice.call(arguments, 1);
args.forEach(function (source) {
_merge(target, source, true);
});
return target;
}
function defaults(target) {
var args = slice.call(arguments, 1);
args.forEach(function (source) {
for (var key in source) {
if (target[key] === undefined) {
target[key] = source[key];
}
}
});
return target;
}
function _assign(target) {
var args = slice.call(arguments, 1);
args.forEach(function (source) {
_merge(target, source);
});
return target;
}
function _merge(target, source, deep) {
for (var key in source) {
if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
target[key] = {};
}
if (isArray(source[key]) && !isArray(target[key])) {
target[key] = [];
}
_merge(target[key], source[key], deep);
} else if (source[key] !== undefined) {
target[key] = source[key];
}
}
}
/**
* Root Prefix Transform.
*/
function root (options$$1, next) {
var url = next(options$$1);
if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) {
url = trimEnd(options$$1.root, '/') + '/' + url;
}
return url;
}
/**
* Query Parameter Transform.
*/
function query (options$$1, next) {
var urlParams = Object.keys(Url.options.params),
query = {},
url = next(options$$1);
each(options$$1.params, function (value, key) {
if (urlParams.indexOf(key) === -1) {
query[key] = value;
}
});
query = Url.params(query);
if (query) {
url += (url.indexOf('?') == -1 ? '?' : '&') + query;
}
return url;
}
function expand(url, params, variables) {
var tmpl = parse(url),
expanded = tmpl.expand(params);
if (variables) {
variables.push.apply(variables, tmpl.vars);
}
return expanded;
}
function parse(template) {
var operators = ['+', '
variables = [];
return {
vars: variables,
expand: function expand(context) {
return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) {
if (expression) {
var operator = null,
values = [];
if (operators.indexOf(expression.charAt(0)) !== -1) {
operator = expression.charAt(0);
expression = expression.substr(1);
}
expression.split(/,/g).forEach(function (variable) {
var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable);
values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
variables.push(tmp[1]);
});
if (operator && operator !== '+') {
var separator = ',';
if (operator === '?') {
separator = '&';
} else if (operator !== '
separator = operator;
}
return (values.length !== 0 ? operator : '') + values.join(separator);
} else {
return values.join(',');
}
} else {
return encodeReserved(literal);
}
});
}
};
}
function getValues(context, operator, key, modifier) {
var value = context[key],
result = [];
if (isDefined(value) && value !== '') {
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
value = value.toString();
if (modifier && modifier !== '*') {
value = value.substring(0, parseInt(modifier, 10));
}
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
} else {
if (modifier === '*') {
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function (value) {
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));
});
} else {
Object.keys(value).forEach(function (k) {
if (isDefined(value[k])) {
result.push(encodeValue(operator, value[k], k));
}
});
}
} else {
var tmp = [];
if (Array.isArray(value)) {
value.filter(isDefined).forEach(function (value) {
tmp.push(encodeValue(operator, value));
});
} else {
Object.keys(value).forEach(function (k) {
if (isDefined(value[k])) {
tmp.push(encodeURIComponent(k));
tmp.push(encodeValue(operator, value[k].toString()));
}
});
}
if (isKeyOperator(operator)) {
result.push(encodeURIComponent(key) + '=' + tmp.join(','));
} else if (tmp.length !== 0) {
result.push(tmp.join(','));
}
}
}
} else {
if (operator === ';') {
result.push(encodeURIComponent(key));
} else if (value === '' && (operator === '&' || operator === '?')) {
result.push(encodeURIComponent(key) + '=');
} else if (value === '') {
result.push('');
}
}
return result;
}
function isDefined(value) {
return value !== undefined && value !== null;
}
function isKeyOperator(operator) {
return operator === ';' || operator === '&' || operator === '?';
}
function encodeValue(operator, value, key) {
value = operator === '+' || operator === '#' ? encodeReserved(value) : encodeURIComponent(value);
if (key) {
return encodeURIComponent(key) + '=' + value;
} else {
return value;
}
}
function encodeReserved(str) {
return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
if (!/%[0-9A-Fa-f]/.test(part)) {
part = encodeURI(part);
}
return part;
}).join('');
}
/**
* URL Template (RFC 6570) Transform.
*/
function template (options) {
var variables = [],
url = expand(options.url, options.params, variables);
variables.forEach(function (key) {
delete options.params[key];
});
return url;
}
/**
* Service for URL templating.
*/
function Url(url, params) {
var self = this || {},
options$$1 = url,
transform;
if (isString(url)) {
options$$1 = {
url: url,
params: params
};
}
options$$1 = merge({}, Url.options, self.$options, options$$1);
Url.transforms.forEach(function (handler) {
if (isString(handler)) {
handler = Url.transform[handler];
}
if (isFunction(handler)) {
transform = factory(handler, transform, self.$vm);
}
});
return transform(options$$1);
}
/**
* Url options.
*/
Url.options = {
url: '',
root: null,
params: {}
};
/**
* Url transforms.
*/
Url.transform = {
template: template,
query: query,
root: root
};
Url.transforms = ['template', 'query', 'root'];
/**
* Encodes a Url parameter string.
*
* @param {Object} obj
*/
Url.params = function (obj) {
var params = [],
escape = encodeURIComponent;
params.add = function (key, value) {
if (isFunction(value)) {
value = value();
}
if (value === null) {
value = '';
}
this.push(escape(key) + '=' + escape(value));
};
serialize(params, obj);
return params.join('&').replace(/%20/g, '+');
};
/**
* Parse a URL and return its components.
*
* @param {String} url
*/
Url.parse = function (url) {
var el = document.createElement('a');
if (document.documentMode) {
el.href = url;
url = el.href;
}
el.href = url;
return {
href: el.href,
protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',
port: el.port,
host: el.host,
hostname: el.hostname,
pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,
search: el.search ? el.search.replace(/^\?/, '') : '',
hash: el.hash ? el.hash.replace(/^
};
};
function factory(handler, next, vm) {
return function (options$$1) {
return handler.call(vm, options$$1, next);
};
}
function serialize(params, obj, scope) {
var array = isArray(obj),
plain = isPlainObject(obj),
hash;
each(obj, function (value, key) {
hash = isObject(value) || isArray(value);
if (scope) {
key = scope + '[' + (plain || hash ? key : '') + ']';
}
if (!scope && array) {
params.add(value.name, value.value);
} else if (hash) {
serialize(params, value, key);
} else {
params.add(key, value);
}
});
}
/**
* XDomain client (Internet Explorer).
*/
function xdrClient (request) {
return new PromiseObj(function (resolve) {
var xdr = new XDomainRequest(),
handler = function handler(_ref) {
var type = _ref.type;
var status = 0;
if (type === 'load') {
status = 200;
} else if (type === 'error') {
status = 500;
}
resolve(request.respondWith(xdr.responseText, {
status: status
}));
};
request.abort = function () {
return xdr.abort();
};
xdr.open(request.method, request.getUrl());
if (request.timeout) {
xdr.timeout = request.timeout;
}
xdr.onload = handler;
xdr.onabort = handler;
xdr.onerror = handler;
xdr.ontimeout = handler;
xdr.onprogress = function () {};
xdr.send(request.getBody());
});
}
/**
* CORS Interceptor.
*/
var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();
function cors (request) {
if (inBrowser) {
var orgUrl = Url.parse(location.href);
var reqUrl = Url.parse(request.getUrl());
if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {
request.crossOrigin = true;
request.emulateHTTP = false;
if (!SUPPORTS_CORS) {
request.client = xdrClient;
}
}
}
}
/**
* Form data Interceptor.
*/
function form (request) {
if (isFormData(request.body)) {
request.headers["delete"]('Content-Type');
} else if (isObject(request.body) && request.emulateJSON) {
request.body = Url.params(request.body);
request.headers.set('Content-Type', 'application/<API key>');
}
}
/**
* JSON Interceptor.
*/
function json (request) {
var type = request.headers.get('Content-Type') || '';
if (isObject(request.body) && type.indexOf('application/json') === 0) {
request.body = JSON.stringify(request.body);
}
return function (response) {
return response.bodyText ? when(response.text(), function (text) {
var type = response.headers.get('Content-Type') || '';
if (type.indexOf('application/json') === 0 || isJson(text)) {
try {
response.body = JSON.parse(text);
} catch (e) {
response.body = null;
}
} else {
response.body = text;
}
return response;
}) : response;
};
}
function isJson(str) {
var start = str.match(/^\s*(\[|\{)/);
var end = {
'[': /]\s*$/,
'{': /}\s*$/
};
return start && end[start[1]].test(str);
}
/**
* JSONP client (Browser).
*/
function jsonpClient (request) {
return new PromiseObj(function (resolve) {
var name = request.jsonp || 'callback',
callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2),
body = null,
handler,
script;
handler = function handler(_ref) {
var type = _ref.type;
var status = 0;
if (type === 'load' && body !== null) {
status = 200;
} else if (type === 'error') {
status = 500;
}
if (status && window[callback]) {
delete window[callback];
document.body.removeChild(script);
}
resolve(request.respondWith(body, {
status: status
}));
};
window[callback] = function (result) {
body = JSON.stringify(result);
};
request.abort = function () {
handler({
type: 'abort'
});
};
request.params[name] = callback;
if (request.timeout) {
setTimeout(request.abort, request.timeout);
}
script = document.createElement('script');
script.src = request.getUrl();
script.type = 'text/javascript';
script.async = true;
script.onload = handler;
script.onerror = handler;
document.body.appendChild(script);
});
}
/**
* JSONP Interceptor.
*/
function jsonp (request) {
if (request.method == 'JSONP') {
request.client = jsonpClient;
}
}
/**
* Before Interceptor.
*/
function before (request) {
if (isFunction(request.before)) {
request.before.call(this, request);
}
}
/**
* HTTP method override Interceptor.
*/
function method (request) {
if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {
request.headers.set('<API key>', request.method);
request.method = 'POST';
}
}
/**
* Header Interceptor.
*/
function header (request) {
var headers = assign({}, Http.headers.common, !request.crossOrigin ? Http.headers.custom : {}, Http.headers[toLower(request.method)]);
each(headers, function (value, name) {
if (!request.headers.has(name)) {
request.headers.set(name, value);
}
});
}
/**
* XMLHttp client (Browser).
*/
function xhrClient (request) {
return new PromiseObj(function (resolve) {
var xhr = new XMLHttpRequest(),
handler = function handler(event) {
var response = request.respondWith('response' in xhr ? xhr.response : xhr.responseText, {
status: xhr.status === 1223 ? 204 : xhr.status,
// IE9 status bug
statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
});
each(trim(xhr.<API key>()).split('\n'), function (row) {
response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
});
resolve(response);
};
request.abort = function () {
return xhr.abort();
};
xhr.open(request.method, request.getUrl(), true);
if (request.timeout) {
xhr.timeout = request.timeout;
}
if (request.responseType && 'responseType' in xhr) {
xhr.responseType = request.responseType;
}
if (request.withCredentials || request.credentials) {
xhr.withCredentials = true;
}
if (!request.crossOrigin) {
request.headers.set('X-Requested-With', 'XMLHttpRequest');
} // deprecated use downloadProgress
if (isFunction(request.progress) && request.method === 'GET') {
xhr.addEventListener('progress', request.progress);
}
if (isFunction(request.downloadProgress)) {
xhr.addEventListener('progress', request.downloadProgress);
} // deprecated use uploadProgress
if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) {
xhr.upload.addEventListener('progress', request.progress);
}
if (isFunction(request.uploadProgress) && xhr.upload) {
xhr.upload.addEventListener('progress', request.uploadProgress);
}
request.headers.forEach(function (value, name) {
xhr.setRequestHeader(name, value);
});
xhr.onload = handler;
xhr.onabort = handler;
xhr.onerror = handler;
xhr.ontimeout = handler;
xhr.send(request.getBody());
});
}
/**
* Http client (Node).
*/
function nodeClient (request) {
var client = require('got');
return new PromiseObj(function (resolve) {
var url = request.getUrl();
var body = request.getBody();
var method = request.method;
var headers = {},
handler;
request.headers.forEach(function (value, name) {
headers[name] = value;
});
client(url, {
body: body,
method: method,
headers: headers
}).then(handler = function handler(resp) {
var response = request.respondWith(resp.body, {
status: resp.statusCode,
statusText: trim(resp.statusMessage)
});
each(resp.headers, function (value, name) {
response.headers.set(name, value);
});
resolve(response);
}, function (error$$1) {
return handler(error$$1.response);
});
});
}
/**
* Base client.
*/
function Client (context) {
var reqHandlers = [sendRequest],
resHandlers = [];
if (!isObject(context)) {
context = null;
}
function Client(request) {
while (reqHandlers.length) {
var handler = reqHandlers.pop();
if (isFunction(handler)) {
var _ret = function () {
var response = void 0,
next = void 0;
response = handler.call(context, request, function (val) {
return next = val;
}) || next;
if (isObject(response)) {
return {
v: new PromiseObj(function (resolve, reject) {
resHandlers.forEach(function (handler) {
response = when(response, function (response) {
return handler.call(context, response) || response;
}, reject);
});
when(response, resolve, reject);
}, context)
};
}
if (isFunction(response)) {
resHandlers.unshift(response);
}
}();
if (typeof _ret === "object") return _ret.v;
} else {
warn("Invalid interceptor of type " + typeof handler + ", must be a function");
}
}
}
Client.use = function (handler) {
reqHandlers.push(handler);
};
return Client;
}
function sendRequest(request) {
var client = request.client || (inBrowser ? xhrClient : nodeClient);
return client(request);
}
/**
* HTTP Headers.
*/
var Headers = /*#__PURE__*/function () {
function Headers(headers) {
var _this = this;
this.map = {};
each(headers, function (value, name) {
return _this.append(name, value);
});
}
var _proto = Headers.prototype;
_proto.has = function has(name) {
return getName(this.map, name) !== null;
};
_proto.get = function get(name) {
var list = this.map[getName(this.map, name)];
return list ? list.join() : null;
};
_proto.getAll = function getAll(name) {
return this.map[getName(this.map, name)] || [];
};
_proto.set = function set(name, value) {
this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];
};
_proto.append = function append(name, value) {
var list = this.map[getName(this.map, name)];
if (list) {
list.push(trim(value));
} else {
this.set(name, value);
}
};
_proto["delete"] = function _delete(name) {
delete this.map[getName(this.map, name)];
};
_proto.deleteAll = function deleteAll() {
this.map = {};
};
_proto.forEach = function forEach(callback, thisArg) {
var _this2 = this;
each(this.map, function (list, name) {
each(list, function (value) {
return callback.call(thisArg, value, name, _this2);
});
});
};
return Headers;
}();
function getName(map, name) {
return Object.keys(map).reduce(function (prev, curr) {
return toLower(name) === toLower(curr) ? curr : prev;
}, null);
}
function normalizeName(name) {
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
throw new TypeError('Invalid character in header field name');
}
return trim(name);
}
/**
* HTTP Response.
*/
var Response = /*#__PURE__*/function () {
function Response(body, _ref) {
var url = _ref.url,
headers = _ref.headers,
status = _ref.status,
statusText = _ref.statusText;
this.url = url;
this.ok = status >= 200 && status < 300;
this.status = status || 0;
this.statusText = statusText || '';
this.headers = new Headers(headers);
this.body = body;
if (isString(body)) {
this.bodyText = body;
} else if (isBlob(body)) {
this.bodyBlob = body;
if (isBlobText(body)) {
this.bodyText = blobText(body);
}
}
}
var _proto = Response.prototype;
_proto.blob = function blob() {
return when(this.bodyBlob);
};
_proto.text = function text() {
return when(this.bodyText);
};
_proto.json = function json() {
return when(this.text(), function (text) {
return JSON.parse(text);
});
};
return Response;
}();
Object.defineProperty(Response.prototype, 'data', {
get: function get() {
return this.body;
},
set: function set(body) {
this.body = body;
}
});
function blobText(body) {
return new PromiseObj(function (resolve) {
var reader = new FileReader();
reader.readAsText(body);
reader.onload = function () {
resolve(reader.result);
};
});
}
function isBlobText(body) {
return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;
}
/**
* HTTP Request.
*/
var Request = /*#__PURE__*/function () {
function Request(options$$1) {
this.body = null;
this.params = {};
assign(this, options$$1, {
method: toUpper(options$$1.method || 'GET')
});
if (!(this.headers instanceof Headers)) {
this.headers = new Headers(this.headers);
}
}
var _proto = Request.prototype;
_proto.getUrl = function getUrl() {
return Url(this);
};
_proto.getBody = function getBody() {
return this.body;
};
_proto.respondWith = function respondWith(body, options$$1) {
return new Response(body, assign(options$$1 || {}, {
url: this.getUrl()
}));
};
return Request;
}();
/**
* Service for sending network requests.
*/
var COMMON_HEADERS = {
'Accept': 'application/json, text/plain, */*'
};
var JSON_CONTENT_TYPE = {
'Content-Type': 'application/json;charset=utf-8'
};
function Http(options$$1) {
var self = this || {},
client = Client(self.$vm);
defaults(options$$1 || {}, self.$options, Http.options);
Http.interceptors.forEach(function (handler) {
if (isString(handler)) {
handler = Http.interceptor[handler];
}
if (isFunction(handler)) {
client.use(handler);
}
});
return client(new Request(options$$1)).then(function (response) {
return response.ok ? response : PromiseObj.reject(response);
}, function (response) {
if (response instanceof Error) {
error(response);
}
return PromiseObj.reject(response);
});
}
Http.options = {};
Http.headers = {
put: JSON_CONTENT_TYPE,
post: JSON_CONTENT_TYPE,
patch: JSON_CONTENT_TYPE,
"delete": JSON_CONTENT_TYPE,
common: COMMON_HEADERS,
custom: {}
};
Http.interceptor = {
before: before,
method: method,
jsonp: jsonp,
json: json,
form: form,
header: header,
cors: cors
};
Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors'];
['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) {
Http[method$$1] = function (url, options$$1) {
return this(assign(options$$1 || {}, {
url: url,
method: method$$1
}));
};
});
['post', 'put', 'patch'].forEach(function (method$$1) {
Http[method$$1] = function (url, body, options$$1) {
return this(assign(options$$1 || {}, {
url: url,
method: method$$1,
body: body
}));
};
});
/**
* Service for interacting with RESTful services.
*/
function Resource(url, params, actions, options$$1) {
var self = this || {},
resource = {};
actions = assign({}, Resource.actions, actions);
each(actions, function (action, name) {
action = merge({
url: url,
params: assign({}, params)
}, options$$1, action);
resource[name] = function () {
return (self.$http || Http)(opts(action, arguments));
};
});
return resource;
}
function opts(action, args) {
var options$$1 = assign({}, action),
params = {},
body;
switch (args.length) {
case 2:
params = args[0];
body = args[1];
break;
case 1:
if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) {
body = args[0];
} else {
params = args[0];
}
break;
case 0:
break;
default:
throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';
}
options$$1.body = body;
options$$1.params = assign({}, options$$1.params, params);
return options$$1;
}
Resource.actions = {
get: {
method: 'GET'
},
save: {
method: 'POST'
},
query: {
method: 'GET'
},
update: {
method: 'PUT'
},
remove: {
method: 'DELETE'
},
"delete": {
method: 'DELETE'
}
};
/**
* Install plugin.
*/
function plugin(Vue) {
if (plugin.installed) {
return;
}
Util(Vue);
Vue.url = Url;
Vue.http = Http;
Vue.resource = Resource;
Vue.Promise = PromiseObj;
Object.defineProperties(Vue.prototype, {
$url: {
get: function get() {
return options(Vue.url, this, this.$options.url);
}
},
$http: {
get: function get() {
return options(Vue.http, this, this.$options.http);
}
},
$resource: {
get: function get() {
return Vue.resource.bind(this);
}
},
$promise: {
get: function get() {
var _this = this;
return function (executor) {
return new Vue.Promise(executor, _this);
};
}
}
});
}
if (typeof window !== 'undefined' && window.Vue && !window.Vue.resource) {
window.Vue.use(plugin);
}
module.exports = plugin;
|
console.log('argv[0]: '+process.argv[0]);
console.log('argv[1]: '+process.argv[1]);
|
// <auto-generated>
// :2.0.50727.8806
// </auto-generated>
namespace HtmlButton_ {
<summary>
_Default
</summary>
<remarks>
</remarks>
public partial class _Default {
<summary>
form1
</summary>
<remarks>
</remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
<summary>
button1
</summary>
<remarks>
</remarks>
protected global::System.Web.UI.HtmlControls.HtmlButton button1;
}
}
|
require 'rss/2.0'
class Feed::RssRenderer < ParagraphRenderer
paragraph :feed
paragraph :view_rss
paragraph :rss_auto_discovery, :cache => true
def feed
paragraph_data = (paragraph.data || {}).symbolize_keys
@handler_info = get_handler_info(:feed,:rss,paragraph_data[:feed_type])
if ! @handler_info
data_paragraph :text => 'Reconfigure RSS Feed'.t
return
end
<API key> = nil
begin
<API key> = "#{@handler_info[:class_name]}::Options".constantize
rescue
end
if <API key>.nil?
data_paragraph :text => 'Reconfigure RSS Feed'.t
return
end
@options = <API key>.new(paragraph_data)
@handler = @handler_info[:class].new(@options)
@cache_id = site_node.id.to_s
if @handler.respond_to?(:set_path)
@handler.set_path(params[:path])
@cache_id += DomainModel.hexdigest(params[:path].join("/"))
end
results = renderer_cache(nil,@cache_id, :skip => @options.timeout <= 0, :expires => @options.timeout*60) do |cache|
data = @handler.get_feed
data[:self_link] = Configuration.domain_link site_node.node_path
if @handler_info[:custom]
cache[:output] = render_to_string(:partial => @handler_info[:custom],:locals => { :data => data})
else
cache[:output] = render_to_string(:partial => '/feed/rss/feed',:locals => { :data => data })
end
end
headers['Content-Type'] = 'text/xml'
data_paragraph :text => results.output
end
feature :rss_feed_view, :default_feature => <<-FEATURE
<div class='rss_feed'>
<cms:feed>
<h2><cms:link><cms:title/></cms:link></h2>
<cms:description/>
<cms:items>
<cms:item>
<div class='rss_feed_item'>
<h3><cms:link><cms:title/></cms:link></h3>
<cms:content/>
</div>
</cms:item>
</cms:items>
</cms:feed>
<cms:no_feed>
No Feed
</cms:no_feed>
</div>
FEATURE
include ActionView::Helpers::DateHelper
def <API key>(data)
webiva_feature(:rss_feed_view,data) do |c|
c.define_tag('feed') { |tag| data[:feed].blank? ? nil : tag.expand }
c.define_tag('no_feed') { |tag| data[:feed].blank? ? tag.expand : nil }
c.define_link_tag('feed:') { |t| data[:feed].channel.link }
c.define_value_tag('feed:title') { |tag| data[:feed].channel.title }
c.define_value_tag('feed:description') { |tag|
data[:feed].channel.description
}
c.define_tag('feed:no_items') { |tag| data[:feed].items.length == 0 ? tag.expand : nil }
c.define_tag('feed:items') { |tag| data[:feed].items.length > 0 ? tag.expand : nil }
c.define_tag('feed:items:item') do |tag|
result = ''
items = data[:feed].items
unless data[:category].blank?
items = items.find_all { |item| item.categories.detect { |cat| cat.content == data[:category] } }
end
items = items[0..(data[:items]-1)] if data[:items] > 0
items.each_with_index do |item,idx|
tag.locals.item = item
tag.locals.index = idx + 1
tag.locals.first = idx == 0
tag.locals.last = idx == data[:feed].items.length
result << tag.expand
end
result
end
c.define_value_tag('feed:items:item:content') { |tag|
if data[:read_more].blank?
txt = tag.locals.item.description
else
txt = tag.locals.item.description.to_s.sub(data[:read_more],"[<a href='#{tag.locals.item.link}'>Read More..</a>]")
end
}
c.define_link_tag('feed:items:item:') { |t| t.locals.item.link }
c.define_value_tag('feed:items:item:title') { |tag| tag.locals.item.title }
c.define_value_tag('feed:items:item:author') { |tag| tag.locals.item.author }
c.define_value_tag('feed:items:item:categories') { |tag| tag.locals.item.categories.map { |cat| cat.content }.join(", ") }
c.define_value_tag('feed:items:item:description') { |tag| tag.locals.item.description }
c.date_tag('feed:items:item:date') { |t| t.locals.item.date }
c.value_tag('feed:items:item:ago') { |t|
<API key>(t.locals.item.date).gsub('about','').strip if t.locals.item.date }
end
end
def view_rss
options = Feed::RssController::ViewRssOptions.new(paragraph.data || {})
return render_paragraph :text => 'Configure Paragraph' if options.rss_url.blank?
result = renderer_cache(nil,options.rss_url, :expires => options.cache_minutes.to_i.minutes) do |cache|
rss_feed = delayed_cache_fetch(FeedParser,:delayed_feed_parser,{ :rss_url => options.rss_url },options.rss_url, :expires => options.cache_minutes.to_i.minutes)
return render_paragraph :text => '' if !rss_feed
data = { :feed => rss_feed[:feed], :items => options.items, :category => options.category, :read_more => options.read_more }
cache[:output] = <API key>(data)
logger.warn('In Renderer Cache')
end
render_paragraph :text => result.output
end
def rss_auto_discovery
@options = paragraph.data || {}
if !@options[:module_node_id].blank? && @options[:module_node_id].to_i > 0
@nodes = [ SiteNode.find_by_id(@options[:module_node_id]) ].compact
else
@nodes = SiteNode.find(:all,:conditions => ['node_type = "M" AND module_name = "/feed/rss"' ],:include => :page_modifier)
end
output = @nodes.collect do |nd|
if nd.page_modifier
nd.page_modifier.modifier_data ||= {}
"<link rel='alternate' type='application/rss+xml' title='#{vh nd.page_modifier.modifier_data[:feed_title]}' href='#{vh nd.node_path}' />"
else
nil
end
end.compact.join("\n")
include_in_head(output)
render_paragraph :nothing => true
end
end
|
'use strict';
var Crawler = require('../lib/crawler');
var expect = require('chai').expect;
var jsdom = require('jsdom');
var httpbinHost = 'localhost:8000';
describe('Errors', function() {
describe('timeout', function() {
var c = new Crawler({
timeout : 1500,
retryTimeout : 1000,
retries : 2,
jquery : false
});
it('should return a timeout error after ~5sec', function(done) {
// override default mocha test timeout of 2000ms
this.timeout(10000);
c.queue({
uri : 'http://'+httpbinHost+'/delay/15',
callback : function(error, response) //noinspection <API key>,<API key>
{
expect(error).not.to.be.null;
expect(error.code).to.equal("ETIMEDOUT");
//expect(response).to.be.undefined;
done();
}
});
});
it('should retry after a first timeout', function(done) {
// override default mocha test timeout of 2000ms
this.timeout(15000);
c.queue({
uri : 'http://'+httpbinHost+'/delay/1',
callback : function(error, response) {
expect(error).to.be.null;
expect(response.body).to.be.ok;
done();
}
});
});
});
describe('error status code', function() {
var c = new Crawler({
jQuery : false
});
it('should not return an error on status code 400 (Bad Request)', function(done) {
c.queue({
uri: 'http://' + httpbinHost + '/status/400',
callback: function(error, response, $){
expect(error).to.be.null;
expect(response.statusCode).to.equal(400);
done();
}
});
});
it('should not return an error on status code 401 (Unauthorized)', function(done) {
c.queue({
uri: 'http://' + httpbinHost + '/status/401',
callback: function(error, response, $){
expect(error).to.be.null;
expect(response.statusCode).to.equal(401);
done();
}
});
});
it('should not return an error on status code 403 (Forbidden)', function(done) {
c.queue({
uri: 'http://' + httpbinHost + '/status/403',
callback: function(error, response, $){
expect(error).to.be.null;
expect(response.statusCode).to.equal(403);
done();
}
});
});
it('should not return an error on a 404', function(done) {
c.queue({
uri : 'http://'+httpbinHost+'/status/404',
callback : function(error, response) {
expect(error).to.be.null;
expect(response.statusCode).to.equal(404);
done();
}
});
});
it('should not return an error on a 500', function(done) {
c.queue({
uri : 'http://'+httpbinHost+'/status/500',
callback : function(error, response) {
expect(error).to.be.null;
expect(response.statusCode).to.equal(500);
done();
}
});
});
it('should not failed on empty response', function(done) {
c.queue({
uri : 'http://'+httpbinHost+'/status/204',
callback : function(error) {
expect(error).to.be.null;
done();
}
});
});
it('should not failed on a malformed html if jquery is false', function(done) {
c.queue({
html : '<html><p>hello <div>dude</p></html>',
callback : function(error, response) {
expect(error).to.be.null;
expect(response).not.to.be.null;
done();
}
});
});
it('should not return an error on a malformed html if jQuery is jsdom', function(done) {
c.queue({
html : '<html><p>hello <div>dude</p></html>',
jQuery : jsdom,
callback : function(error, response) {
expect(error).to.be.null;
expect(response).not.to.be.undefined;
done();
}
});
});
});
});
|
using System;
using Xamarin.Forms;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using System.Linq;
namespace MyShop
{
public class StoresViewModel : BaseViewModel
{
readonly IDataStore dataStore;
public <API key><Store> Stores { get; set;}
public <API key><Grouping<string, Store>> StoresGrouped { get; set; }
public bool ForceSync { get; set; }
public StoresViewModel (Page page) : base (page)
{
Title = "Locations";
dataStore = DependencyService.Get<IDataStore> ();
Stores = new <API key><Store> ();
StoresGrouped = new <API key><Grouping<string, Store>> ();
}
public async Task DeleteStore(Store store)
{
if (IsBusy)
return;
IsBusy = true;
try {
await dataStore.RemoveStoreAsync(store);
Stores.Remove(store);
Sort();
} catch(Exception ex) {
page.DisplayAlert ("Uh Oh :(", "Unable to remove store, please try again", "OK");
Xamarin.Insights.Report (ex);
}
finally {
IsBusy = false;
}
}
private Command getStoresCommand;
public Command GetStoresCommand
{
get {
return getStoresCommand ??
(getStoresCommand = new Command (async () => await <API key> (), () => {return !IsBusy;}));
}
}
private async Task <API key>()
{
if (IsBusy)
return;
if (ForceSync)
Settings.LastSync = DateTime.Now.AddDays (-30);
IsBusy = true;
GetStoresCommand.ChangeCanExecute ();
try{
Stores.Clear();
var stores = await dataStore.GetStoresAsync ();
foreach(var store in stores)
{
if(string.IsNullOrWhiteSpace(store.Image))
store.Image = "http://refractored.com/images/wc_small.jpg";
Stores.Add(store);
}
Sort();
}
catch(Exception ex) {
page.DisplayAlert ("Uh Oh :(", "Unable to gather stores.", "OK");
Xamarin.Insights.Report (ex);
}
finally {
IsBusy = false;
GetStoresCommand.ChangeCanExecute ();
}
}
private void Sort()
{
StoresGrouped.Clear();
var sorted = from store in Stores
orderby store.Country, store.City
group store by store.Country into storeGroup
select new Grouping<string, Store>(storeGroup.Key, storeGroup);
foreach(var sort in sorted)
StoresGrouped.Add(sort);
}
}
}
|
"use strict";
var <API key> = require("@babel/runtime/helpers/<API key>");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = <API key>(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime");
var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M21 3H3C2 3 1 4 1 5v14c0 1.1.9 2 2 2h18c1 0 2-1 <API key> 17l3.5-4.5 2.5 3.01L14.5 11l4.5 6H5z"
}), '<API key>');
exports.default = _default;
|
{% extends "layout.html" %}
{% block page_title %}
Personal details
{% endblock %}
{% block content %}
<main id="content" role="main">
{% include "../includes/phase_banner_alpha.html" %}
<form action="contact-details" method="#" class="form">
<div class="grid-row">
<div class="column-two-thirds">
<header>
<h1 class="form-title heading-large">
<!-- <span class="heading-secondary">Section 2 of 23</span> -->
Personal details
</h1>
</header>
<div class="form-group">
<label class="form-label-bold" for="title">Title</label>
<input type="text" class="form-control form-control-1-4" id="title" name="title">
</div>
<div class="form-group">
<label class="form-label-bold" for="full-name">First name</label>
<input type="text" class="form-control" id="full-name" name="full-name">
</div>
<div class="form-group">
<label class="form-label-bold" for="other-name">Middle names</label>
<input type="text" class="form-control" id="other-name" name="other-name">
</div>
<div class="form-group">
<label class="form-label-bold" for="surname">Surname</label>
<input type="text" class="form-control" id="surname" name="surname">
</div>
<div class="form-group">
<fieldset>
<legend><span class="form-label-bold">Date of birth</span></legend>
<div class="form-date">
<div class="form-group form-group-day">
<label for="dob-day">Day</label>
<input type="text" class="form-control" id="dob-day" maxlength="2" name="dob-day">
</div>
<div class="form-group form-group-month">
<label for="dob-month">Month</label>
<input type="text" class="form-control" id="dob-month" maxlength="2" name="dob-month">
</div>
<div class="form-group form-group-year">
<label for="dob-year">Year</label>
<input type="text" class="form-control" id="dob-year" maxlength="4" name="dob-year">
</div>
</div>
</fieldset>
</div>
<div class="panel panel-border-narrow js-hidden" id="state-age">
<fieldset class="inline form-group">
<legend class="form-label-bold">
What sex are you?
</legend>
<label for="radio-part-4" data-target="yesHeal" class="block-label">
<input id="radio-part-4" type="radio" name="esaHeal" value="Male">
Male
</label>
<label for="radio-part-5" data-target="noHeal" class="block-label">
<input id="radio-part-5" type="radio" name="esaHeal" value="Female">
Female
</label>
</fieldset>
</div>
<div class="form-group">
<label class="form-label-bold" for="nino">
National Insurance number
</label>
<input type="text" class="form-control" id="nino" name="nino">
</div>
<!-- Primary buttons, secondary links -->
<div class="form-group">
<input type="submit" class="button" value="Continue"> <!--a href="overview">I do not agree - leave now</a
</div>
</div>
<div class="column-one-third">
<p> </p>
</div>
</div>
</form>
</main>
{% endblock %}
{% block body_end %}
{% include "includes/scripts.html" %}
<script src="/public/javascripts/moment.js"></script>
<script>
$("#dob-year").change(function(e) {
var $this = $(this);
var maxAge = 60;
var dob = $("#dob-day").val();
dob += $("#dob-month").val();
dob += $("#dob-year").val();
var years = moment(dob, 'DDMMYYYY').fromNow();
years = years.split(' ');
years = parseInt(years[0]);
if(years >= maxAge) {
$("#state-age").removeClass('js-hidden').addClass('js-show');
}
});
</script>
{% endblock %}
|
#!/usr/bin/python
# convert LLVM GenAsmWriter.inc for Capstone disassembler.
# by Nguyen Anh Quynh, 2019
import sys
if len(sys.argv) == 1:
print("Syntax: %s <GenAsmWriter.inc> <Output-GenAsmWriter.inc> <<API key>.inc> <arch>" %sys.argv[0])
sys.exit(1)
arch = sys.argv[4]
f = open(sys.argv[1])
lines = f.readlines()
f.close()
f1 = open(sys.argv[2], 'w+')
f2 = open(sys.argv[3], 'w+')
f1.write("\n")
f1.write("/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */\n")
f1.write("\n")
f2.write("\n")
f2.write("/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */\n")
f2.write("\n")
need_endif = False
in_getRegisterName = False
in_printAliasInstr = False
fragment_no = None
skip_printing = False
skip_line = 0
skip_count = 0
def replace_getOp(line):
line2 = line
if 'MI->getOperand(0)' in line:
line2 = line.replace('MI->getOperand(0)', 'MCInst_getOperand(MI, 0)')
elif 'MI->getOperand(1)' in line:
line2 = line.replace('MI->getOperand(1)', 'MCInst_getOperand(MI, 1)')
elif 'MI->getOperand(2)' in line:
line2 = line.replace('MI->getOperand(2)', 'MCInst_getOperand(MI, 2)')
elif 'MI->getOperand(3)' in line:
line2 = line.replace('MI->getOperand(3)', 'MCInst_getOperand(MI, 3)')
elif 'MI->getOperand(4)' in line:
line2 = line.replace('MI->getOperand(4)', 'MCInst_getOperand(MI, 4)')
elif 'MI->getOperand(5)' in line:
line2 = line.replace('MI->getOperand(5)', 'MCInst_getOperand(MI, 5)')
elif 'MI->getOperand(6)' in line:
line2 = line.replace('MI->getOperand(6)', 'MCInst_getOperand(MI, 6)')
elif 'MI->getOperand(7)' in line:
line2 = line.replace('MI->getOperand(7)', 'MCInst_getOperand(MI, 7)')
elif 'MI->getOperand(8)' in line:
line2 = line.replace('MI->getOperand(8)', 'MCInst_getOperand(MI, 8)')
return line2
def replace_getReg(line):
line2 = line
if 'MI->getOperand(0).getReg()' in line:
line2 = line.replace('MI->getOperand(0).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 0))')
elif 'MI->getOperand(1).getReg()' in line:
line2 = line.replace('MI->getOperand(1).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 1))')
elif 'MI->getOperand(2).getReg()' in line:
line2 = line.replace('MI->getOperand(2).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 2))')
elif 'MI->getOperand(3).getReg()' in line:
line2 = line.replace('MI->getOperand(3).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 3))')
elif 'MI->getOperand(4).getReg()' in line:
line2 = line.replace('MI->getOperand(4).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 4))')
elif 'MI->getOperand(5).getReg()' in line:
line2 = line.replace('MI->getOperand(5).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 5))')
elif 'MI->getOperand(6).getReg()' in line:
line2 = line.replace('MI->getOperand(6).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 6))')
elif 'MI->getOperand(7).getReg()' in line:
line2 = line.replace('MI->getOperand(7).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 7))')
elif 'MI->getOperand(8).getReg()' in line:
line2 = line.replace('MI->getOperand(8).getReg()', 'MCOperand_getReg(MCInst_getOperand(MI, 8))')
return line2
# extract param between text()
# MRI.getRegClass(AArch64::GPR32spRegClassID).contains(MI->getOperand(1).getReg()))
def extract_paren(line, text):
i = line.index(text)
return line[line.index('(', i)+1 : line.index(')', i)]
# extract text between <>
# printSVERegOp<'q'>
def extract_brackets(line):
if '<' in line:
return line[line.index('<')+1 : line.index('>')]
else:
return ''
# delete text between <>, including <>
# printSVERegOp<'q'>
def del_brackets(line):
if '<' in line:
return line[:line.index('<')] + line[line.index('>') + 1:]
else:
return line
def print_line(line):
line = line.replace('::', '_')
line = line.replace('nullptr', 'NULL')
if not skip_printing:
if in_getRegisterName:
f2.write(line + "\n")
else:
f1.write(line + "\n")
for line in lines:
line = line.rstrip()
#print("@", line)
# skip Alias
if arch.upper() == 'X86':
if 'PRINT_ALIAS_INSTR' in line:
# done
break
if skip_line:
skip_count += 1
if skip_count <= skip_line:
# skip this line
continue
else:
# skip enough number of lines, reset counters
skip_line = 0
skip_count = 0
if "::printInstruction" in line:
if arch.upper() in ('AARCH64', 'ARM64'):
#print_line("static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)\n{")
print_line("static void printInstruction(MCInst *MI, SStream *O)\n{")
else:
print_line("static void printInstruction(MCInst *MI, SStream *O)\n{")
elif 'const char *AArch64InstPrinter::' in line:
continue
elif 'getRegisterName(' in line:
if 'unsigned AltIdx' in line:
print_line("static const char *getRegisterName(unsigned RegNo, unsigned AltIdx)\n{")
else:
print_line("static const char *getRegisterName(unsigned RegNo)\n{")
elif 'getRegisterName' in line:
in_getRegisterName = True
print_line(line)
elif '::printAliasInstr' in line:
if arch.upper() in ('AARCH64', 'PPC'):
print_line("static char *printAliasInstr(MCInst *MI, SStream *OS, MCRegisterInfo *MRI)\n{")
print_line(' #define GETREGCLASS_CONTAIN(_class, _reg) <API key>(<API key>(MRI, _class), MCOperand_getReg(MCInst_getOperand(MI, _reg)))')
else:
print_line("static bool printAliasInstr(MCInst *MI, SStream *OS)\n{")
print_line(" unsigned int I = 0, OpIdx, PrintMethodIdx;")
print_line(" char *tmpString;")
in_printAliasInstr = True
elif 'STI.getFeatureBits()[' in line:
if arch.upper() == 'ARM':
line2 = line.replace('STI.getFeatureBits()[', 'ARM_getFeatureBits(MI->csh->mode, ')
elif arch.upper() == 'AARCH64':
line2 = line.replace('STI.getFeatureBits()[', '<API key>(')
line2 = line2.replace(']', ')')
print_line(line2)
elif ', STI, ' in line:
line2 = line.replace(', STI, ', ', ')
if 'printSVELogicalImm<' in line:
if 'int16' in line:
line2 = line2.replace('printSVELogicalImm', '<API key>')
line2 = line2.replace('<int16_t>', '')
elif 'int32' in line:
line2 = line2.replace('printSVELogicalImm', '<API key>')
line2 = line2.replace('<int32_t>', '')
else:
line2 = line2.replace('printSVELogicalImm', '<API key>')
line2 = line2.replace('<int64_t>', '')
if 'MI->getOperand(' in line:
line2 = replace_getOp(line2)
# C++ template
if 'printPrefetchOp' in line2:
param = extract_brackets(line2)
if param == '':
param = 'false'
line2 = del_brackets(line2)
line2 = line2.replace(', O);', ', O, %s);' %param)
line2 = line2.replace(', OS);', ', OS, %s);' %param)
elif '<false>' in line2:
line2 = line2.replace('<false>', '')
line2 = line2.replace(', O);', ', O, false);')
line2 = line2.replace('STI, ', '')
elif '<true>' in line:
line2 = line2.replace('<true>', '')
line2 = line2.replace(', O);', ', O, true);')
line2 = line2.replace('STI, ', '')
elif '<API key>' in line:
# C++ template
if '<0>' in line:
line2 = line2.replace('<0>', '')
line2 = line2.replace(', O);', ', O, 0);')
elif '<1>' in line:
line2 = line2.replace('<1>', '')
line2 = line2.replace(', O);', ', O, 1);')
elif '<2>' in line:
line2 = line2.replace('<2>', '')
line2 = line2.replace(', O);', ', O, 2);')
elif 'printImm8OptLsl' in line2:
param = extract_brackets(line2)
line2 = del_brackets(line2)
if '8' in param or '16' in param or '32' in param:
line2 = line2.replace('printImm8OptLsl', 'printImm8OptLsl32')
elif '64' in param:
line2 = line2.replace('printImm8OptLsl', 'printImm8OptLsl64')
elif 'printLogicalImm' in line2:
param = extract_brackets(line2)
line2 = del_brackets(line2)
if '8' in param or '16' in param or '32' in param:
line2 = line2.replace('printLogicalImm', 'printLogicalImm32')
elif '64' in param:
line2 = line2.replace('printLogicalImm', 'printLogicalImm64')
elif 'printSVERegOp' in line2 or '<API key>' in line2 or '<API key>' in line2 or 'printPostIncOperand' in line2 or 'printImmScale' in line2 or '<API key>' in line2 or 'printUImm12Offset' in line2 or 'printExactFPImm' in line2 or 'printMemExtend' in line2 or 'printZPRasFPR' in line2:
param = extract_brackets(line2)
if param == '':
param = '0'
line2 = del_brackets(line2)
line2 = line2.replace(', O);', ', O, %s);' %param)
line2 = line2.replace(', OS);', ', OS, %s);' %param)
elif '<API key>' in line:
# <API key><90, 0>(MI, 5, STI, O);
bracket_content = line2[line2.index('<') + 1 : line2.index('>')]
line2 = line2.replace('<' + bracket_content + '>', '')
line2 = line2.replace(' O);', ' O, %s);' %bracket_content)
print_line(line2)
elif "static const char AsmStrs[]" in line:
print_line("#ifndef CAPSTONE_DIET")
print_line(" static const char AsmStrs[] = {")
need_endif = True
elif "static const char AsmStrsNoRegAltName[]" in line:
print_line("#ifndef CAPSTONE_DIET")
print_line(" static const char AsmStrsNoRegAltName[] = {")
need_endif = True
elif line == ' O << "\\t";':
print_line(" unsigned int opcode = MCInst_getOpcode(MI);")
print_line(' // printf("opcode = %u\\n", opcode);');
elif 'MI->getOpcode()' in line:
if 'switch' in line:
line2 = line.replace('MI->getOpcode()', 'MCInst_getOpcode(MI)')
else:
line2 = line.replace('MI->getOpcode()', 'opcode')
print_line(line2)
elif 'O << ' in line:
if '"' in line:
line2 = line.lower()
line2 = line2.replace('o << ', 'SStream_concat0(O, ');
else:
line2 = line.replace('O << ', 'SStream_concat0(O, ');
line2 = line2.replace("'", '"')
line2 = line2.replace(';', ');')
if '" : "' in line2: # "segment : offset" in X86
line2 = line2.replace('" : "', '":"')
# ARM
print_line(line2)
if '", #0"' in line2:
print_line(' op_addImm(MI, 0);')
if '", #1"' in line2:
print_line(' op_addImm(MI, 1);')
# PowerPC
if '", 268"' in line2:
print_line(' op_addImm(MI, 268);')
elif '", 256"' in line2:
print_line(' op_addImm(MI, 256);')
elif '", 0, "' in line2 or '", 0"' in line2:
print_line(' op_addImm(MI, 0);')
elif '", -1"' in line2:
print_line(' op_addImm(MI, -1);')
if '[' in line2:
if not '[]' in line2:
print_line(' set_mem_access(MI, true);')
if ']' in line2:
if not '[]' in line2:
print_line(' set_mem_access(MI, false);')
if '".f64\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_F64);')
elif '".f32\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_F32);')
elif '".f16\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_F16);')
elif '".s64\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_S64);')
elif '".s32\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_S32);')
elif '".s16\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_S16);')
elif '".s8\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_S8);')
elif '".u64\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_U64);')
elif '".u32\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_U32);')
elif '".u16\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_U16);')
elif '".u8\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_U8);')
elif '".i64\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_I64);')
elif '".i32\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_I32);')
elif '".i16\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_I16);')
elif '".i8\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_I8);')
elif '".f16.f64\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f64.f16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f16.f32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f32.f16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f64.f32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f32.f64\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".s32.f32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f32.s32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".u32.f32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f32.u32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".p8\\t"' in line2:
print_line(' <API key>(MI, ARM_VECTORDATA_P8);')
elif '".f64.s16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".s16.f64\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f32.s16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".s16.f32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f64.s32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".s32.f64\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f64.u16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".u16.f64\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f32.u16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".u16.f32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f64.u32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".u32.f64\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f16.u32\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".u32.f16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".f16.u16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '".u16.f16\\t"' in line2:
print_line(' <API key>(MI, <API key>);')
elif '"\\tlr"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_LR);')
elif '"\\tapsr_nzcv, fpscr"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_APSR_NZCV);')
print_line(' ARM_addReg(MI, ARM_REG_FPSCR);')
elif '"\\tpc, lr"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_PC);')
print_line(' ARM_addReg(MI, ARM_REG_LR);')
elif '"\\tfpscr, "' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPSCR);')
elif '"\\tfpexc, "' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPEXC);')
elif '"\\tfpinst, "' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPINST);')
elif '"\\tfpinst2, "' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPINST2);')
elif '"\\tfpsid, "' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPSID);')
elif '"\\tsp, "' in line2:
print_line(' ARM_addReg(MI, ARM_REG_SP);')
elif '"\\tsp!, "' in line2:
print_line(' ARM_addReg(MI, ARM_REG_SP);')
elif '", apsr"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_APSR);')
elif '", spsr"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_SPSR);')
elif '", fpscr"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPSCR);')
elif '", fpscr"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPSCR);')
elif '", fpexc"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPEXC);')
elif '", fpinst"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPINST);')
elif '", fpinst2"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPINST2);')
elif '", fpsid"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_FPSID);')
elif '", mvfr0"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_MVFR0);')
elif '", mvfr1"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_MVFR1);')
elif '", mvfr2"' in line2:
print_line(' ARM_addReg(MI, ARM_REG_MVFR2);')
elif '.8\\t' in line2:
print_line(' <API key>(MI, 8);')
elif '.16\\t' in line2:
print_line(' <API key>(MI, 16);')
elif '.32\\t' in line2:
print_line(' <API key>(MI, 32);')
elif '.64\\t' in line2:
print_line(' <API key>(MI, 64);')
elif '" ^"' in line2:
print_line(' ARM_addUserMode(MI);')
if '.16b' in line2:
print_line(' <API key>(MI, ARM64_VAS_16B);')
elif '.8b' in line2:
print_line(' <API key>(MI, ARM64_VAS_8B);')
elif '.4b' in line2:
print_line(' <API key>(MI, ARM64_VAS_4B);')
elif '.b' in line2:
print_line(' <API key>(MI, ARM64_VAS_1B);')
elif '.8h' in line2:
print_line(' <API key>(MI, ARM64_VAS_8H);')
elif '.4h' in line2:
print_line(' <API key>(MI, ARM64_VAS_4H);')
elif '.2h' in line2:
print_line(' <API key>(MI, ARM64_VAS_2H);')
elif '.h' in line2:
print_line(' <API key>(MI, ARM64_VAS_1H);')
elif '.4s' in line2:
print_line(' <API key>(MI, ARM64_VAS_4S);')
elif '.2s' in line2:
print_line(' <API key>(MI, ARM64_VAS_2S);')
elif '.s' in line2:
print_line(' <API key>(MI, ARM64_VAS_1S);')
elif '.2d' in line2:
print_line(' <API key>(MI, ARM64_VAS_2D);')
elif '.1d' in line2:
print_line(' <API key>(MI, ARM64_VAS_1D);')
elif '.1q' in line2:
print_line(' <API key>(MI, ARM64_VAS_1Q);')
if '#0.0' in line2:
print_line(' arm64_op_addFP(MI, 0);')
elif '#0' in line2:
print_line(' arm64_op_addImm(MI, 0);')
elif '#8' in line2:
print_line(' arm64_op_addImm(MI, 8);')
elif '#16' in line2:
print_line(' arm64_op_addImm(MI, 16);')
elif '#32' in line2:
print_line(' arm64_op_addImm(MI, 32);')
# X86
if '", %rax"' in line2 or '", rax"' in line2:
print_line(' op_addReg(MI, X86_REG_RAX);')
elif '", %eax"' in line2 or '", eax"' in line2:
print_line(' op_addReg(MI, X86_REG_EAX);')
elif '", %ax"' in line2 or '", ax"' in line2:
print_line(' op_addReg(MI, X86_REG_AX);')
elif '", %al"' in line2 or '", al"' in line2:
print_line(' op_addReg(MI, X86_REG_AL);')
elif '", %dx"' in line2 or '", dx"' in line2:
print_line(' op_addReg(MI, X86_REG_DX);')
elif '", %st(0)"' in line2 or '", st(0)"' in line2:
print_line(' op_addReg(MI, X86_REG_ST0);')
elif '", 1"' in line2:
print_line(' op_addImm(MI, 1);')
elif '", cl"' in line2:
print_line(' op_addReg(MI, X86_REG_CL);')
elif '"{1to2}, "' in line2:
print_line(' op_addAvxBroadcast(MI, X86_AVX_BCAST_2);')
elif '"{1to4}, "' in line2:
print_line(' op_addAvxBroadcast(MI, X86_AVX_BCAST_4);')
elif '"{1to8}, "' in line2:
print_line(' op_addAvxBroadcast(MI, X86_AVX_BCAST_8);')
elif '"{1to16}, "' in line2:
print_line(' op_addAvxBroadcast(MI, X86_AVX_BCAST_16);')
elif '{z}{sae}' in line2:
print_line(' op_addAvxSae(MI);')
print_line(' op_addAvxZeroOpmask(MI);')
elif ('{z}' in line2):
print_line(' op_addAvxZeroOpmask(MI);')
elif '{sae}' in line2:
print_line(' op_addAvxSae(MI);')
elif 'llvm_unreachable("Invalid command number.");' in line:
line2 = line.replace('llvm_unreachable("Invalid command number.");', '// unreachable')
print_line(line2)
elif ('assert(' in line) or ('assert (' in line):
pass
elif 'Invalid alt name index' in line:
pass
elif '::' in line and 'case ' in line:
#print_line(line2)
print_line(line)
elif 'MI->getNumOperands()' in line:
line2 = line.replace('MI->getNumOperands()', '<API key>(MI)')
print_line(line2)
elif 'const MCOperand &MCOp' in line:
line2 = line.replace('const MCOperand &MCOp', 'MCOperand *MCOp')
print_line(line2)
elif 'MI->getOperand(0).isImm()' in line:
line2 = line.replace('MI->getOperand(0).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 0))')
print_line(line2)
elif 'MI->getOperand(1).isImm()' in line:
line2 = line.replace('MI->getOperand(1).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 1))')
print_line(line2)
elif 'MI->getOperand(2).isImm()' in line:
line2 = line.replace('MI->getOperand(2).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 2))')
print_line(line2)
elif 'MI->getOperand(3).isImm()' in line:
line2 = line.replace('MI->getOperand(3).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 3))')
print_line(line2)
elif 'MI->getOperand(4).isImm()' in line:
line2 = line.replace('MI->getOperand(4).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 4))')
print_line(line2)
elif 'MI->getOperand(5).isImm()' in line:
line2 = line.replace('MI->getOperand(5).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 5))')
print_line(line2)
elif 'MI->getOperand(6).isImm()' in line:
line2 = line.replace('MI->getOperand(6).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 6))')
print_line(line2)
elif 'MI->getOperand(7).isImm()' in line:
line2 = line.replace('MI->getOperand(7).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 7))')
print_line(line2)
elif 'MI->getOperand(8).isImm()' in line:
line2 = line.replace('MI->getOperand(8).isImm()', 'MCOperand_isImm(MCInst_getOperand(MI, 8))')
print_line(line2)
elif 'MI->getOperand(0).getImm()' in line:
line2 = line.replace('MI->getOperand(0).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 0))')
print_line(line2)
elif 'MI->getOperand(1).getImm()' in line:
line2 = line.replace('MI->getOperand(1).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 1))')
print_line(line2)
elif 'MI->getOperand(2).getImm()' in line:
line2 = line.replace('MI->getOperand(2).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 2))')
print_line(line2)
elif 'MI->getOperand(3).getImm()' in line:
line2 = line.replace('MI->getOperand(3).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 3))')
print_line(line2)
elif 'MI->getOperand(4).getImm()' in line:
line2 = line.replace('MI->getOperand(4).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 4))')
print_line(line2)
elif 'MI->getOperand(5).getImm()' in line:
line2 = line.replace('MI->getOperand(5).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 5))')
print_line(line2)
elif 'MI->getOperand(6).getImm()' in line:
line2 = line.replace('MI->getOperand(6).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 6))')
print_line(line2)
elif 'MI->getOperand(7).getImm()' in line:
line2 = line.replace('MI->getOperand(7).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 7))')
print_line(line2)
elif 'MI->getOperand(8).getImm()' in line:
line2 = line.replace('MI->getOperand(8).getImm()', 'MCOperand_getImm(MCInst_getOperand(MI, 8))')
print_line(line2)
elif 'MRI.getRegClass(' in line:
classid = extract_paren(line, 'getRegClass(')
operand = extract_paren(line, 'getOperand')
line2 = line.replace('MI->getNumOperands()', '<API key>(MI)')
line2 = ' GETREGCLASS_CONTAIN(%s, %s)' %(classid, operand)
if line.endswith('())) {'):
line2 += ') {'
elif line.endswith(' {'):
line2 += ' {'
elif line.endswith(' &&'):
line2 += ' &&'
print_line(line2)
elif 'MI->getOperand(' in line and 'isReg' in line:
operand = extract_paren(line, 'getOperand')
line2 = ' MCOperand_isReg(MCInst_getOperand(MI, %s))' %(operand)
# MI->getOperand(1).isReg() &&
if line.endswith(' {'):
line2 += ' {'
elif line.endswith(' &&'):
line2 += ' &&'
print_line(line2)
elif 'MI->getOperand(' in line and 'getReg' in line:
line2 = replace_getReg(line)
# one more time
line2 = replace_getReg(line2)
print_line(line2)
elif ' return false;' in line and in_printAliasInstr:
print_line(' return NULL;')
elif 'MCOp.isImm()' in line:
line2 = line.replace('MCOp.isImm()', 'MCOperand_isImm(MCOp)')
print_line(line2)
elif 'MCOp.getImm()' in line:
line2 = line.replace('MCOp.getImm()', 'MCOperand_getImm(MCOp)')
if 'int64_t Val =' in line:
line2 = line2.replace('int64_t Val =', 'Val =')
print_line(line2)
elif '<API key><' in line:
if 'int8' in line:
line2 = line.replace('<API key>', '<API key>')
line2 = line2.replace('<int8_t>', '')
elif 'int16' in line:
line2 = line.replace('<API key>', '<API key>')
line2 = line2.replace('<int16_t>', '')
elif 'int32' in line:
line2 = line.replace('<API key>', '<API key>')
line2 = line2.replace('<int32_t>', '')
else:
line2 = line.replace('<API key>', '<API key>')
line2 = line2.replace('<int64_t>', '')
print_line(line2)
elif 'switch (PredicateIndex) {' in line:
print_line(' int64_t Val;')
print_line(line)
elif 'unsigned I = 0;' in line and in_printAliasInstr:
print_line("""
tmpString = cs_strdup(AsmString);
while (AsmString[I] != ' ' && AsmString[I] != '\\t' &&
AsmString[I] != '$' && AsmString[I] != '\\0')
++I;
tmpString[I] = 0;
SStream_concat0(OS, tmpString);
if (AsmString[I] != '\\0') {
if (AsmString[I] == ' ' || AsmString[I] == '\\t') {
SStream_concat0(OS, " ");
++I;
}
do {
if (AsmString[I] == '$') {
++I;
if (AsmString[I] == (char)0xff) {
++I;
OpIdx = AsmString[I++] - 1;
PrintMethodIdx = AsmString[I++] - 1;
<API key>(MI, OpIdx, PrintMethodIdx, OS);
} else
printOperand(MI, (unsigned)(AsmString[I++]) - 1, OS);
} else {
SStream_concat1(OS, AsmString[I++]);
}
} while (AsmString[I] != '\\0');
}
return tmpString;
}
""")
in_printAliasInstr = False
# skip next few lines
skip_printing = True
elif '::<API key>' in line:
# print again
skip_printing = False
print_line('static void <API key>(')
elif 'const MCSubtargetInfo &STI' in line:
pass
elif 'const MCInst *MI' in line:
line2 = line.replace('const MCInst *MI', 'MCInst *MI')
print_line(line2)
elif 'llvm_unreachable("' in line:
if 'default: ' in line:
print_line(' default:')
elif 'llvm_unreachable("Unknown MCOperandPredicate kind")' in line:
print_line(' return false; // never reach')
else:
pass
elif 'raw_ostream &' in line:
line2 = line.replace('raw_ostream &', 'SStream *')
if line2.endswith(' {'):
line2 = line2.replace(' {', '\n{')
print_line(line2)
elif '<API key>(' in line and 'STI, ' in line:
line2 = line.replace('STI, ', '')
print_line(line2)
elif '// Fragment ' in line:
# // Fragment 0 encoded into 6 bits for 51 unique commands.
tmp = line.strip().split(' ')
fragment_no = tmp[2]
print_line(line)
elif ('switch ((' in line or 'if ((' in line) and 'Bits' in line:
# switch ((Bits >> 14) & 63) {
bits = line.strip()
bits = bits.replace('switch ', '')
bits = bits.replace('if ', '')
bits = bits.replace('{', '')
bits = bits.strip()
print_line(' // printf("Fragment %s: %%"PRIu64"\\n", %s);' %(fragment_no, bits))
print_line(line)
elif not skip_printing:
print_line(line)
if line == ' };':
if need_endif and not in_getRegisterName:
# endif only for AsmStrs when we are not inside getRegisterName()
print_line("#endif")
need_endif = False
elif 'return AsmStrs+RegAsmOffset[RegNo-1];' in line:
if in_getRegisterName:
# return NULL for register name on Diet mode
print_line("#else")
print_line(" return NULL;")
print_line("#endif")
print_line("}")
need_endif = False
in_getRegisterName = False
# skip 1 line
skip_line = 1
elif line == ' }':
# ARM64
if in_getRegisterName:
# return NULL for register name on Diet mode
print_line("#else")
print_line(" return NULL;")
print_line("#endif")
print_line("}")
need_endif = False
in_getRegisterName = False
# skip 1 line
skip_line = 1
elif 'default:' in line:
# ARM64
if in_getRegisterName:
# get the size of RegAsmOffsetvreg[]
print_line(" return (const char *)(sizeof(RegAsmOffsetvreg)/sizeof(RegAsmOffsetvreg[0]));")
f1.close()
f2.close()
|
#!/usr/bin/env perl
use strict;
use warnings;
# This script is literally translated from the C version. It has two funtionalities:
# a) compute the length of the reference sequence contained in an alignment;
# b) collapse backward overlaps and generate consensus sequence and quality
# During the consensus construction, if two bases from two overlapping segments agree,
# the base quality is taken as the higher one of the two; if the two bases disagree,
# the base is set to the one of higher quality and the quality set to the difference
# between the two qualities.
# There are several special cases or errors:
# a) If a backward operation goes beyond the beginning of SEQ, the read is regarded to
# be unmapped.
# b) If the CIGARs of two segments in an overlap are inconsistent (e.g. 10M3B1M1I8M)
# the consensus CIGAR is taken as the one from the latter.
# c) If three or more segments overlap, the consensus SEQ/QUAL will be computed firstly
# for the first two overlapping segments, and then between the two-segment consensus
# and the 3rd segment and so on. The consensus CIGAR is always taken from the last one.
die("Usage: removeB.pl <in.sam>\n") if (@ARGV == 0 && -t STDIN);
while (<>) {
if (/^\@/) { # do not process the header lines
print;
next;
}
my $failed = 0; # set to '1' in case of inconsistent CIGAR
my @t = split;
$t[5] =~ s/\d+B$//; # trim trailing 'B'
my @cigar; # this is the old CIGAR array
my $no_qual = ($t[10] eq '*'); # whether QUAL equals '*'
# Compute the length of reference in the alignment #
my $alen = 0; # length of reference in the alignment
while ($t[5] =~ m/(\d+)([A-Z])/g) { # loop through the CIGAR string
my ($op, $len) = ($2, $1);
if ($op eq 'B') { # a backward operation
my ($u, $v) = (0, 0); # $u: query length during backward lookup; $v: reference length
my $l;
for ($l = $#cigar; $l >= 0; --$l) { # look back
my ($op1, $len1) = @{$cigar[$l]};
if ($op1 =~ m/[MIS]/) { # consume the query sequence
if ($u + $len1 >= $len) { # we have moved back enough; stop
$v += $len - $u if ($op1 =~ m/[MDN]/);
last;
} else { $u += $len1; }
}
$v += $len1 if ($op1 =~ m/[MDN]/);
}
$alen = $l < 0? 0 : $alen - $v;
} elsif ($op =~ m/[MDN]/) { # consume the reference sequence
$alen += $len;
}
push(@cigar, [$op, $len]); # keep it in the @cigar array
}
push(@t, "XL:i:$alen"); # write $alen in a tag
goto endloop if ($t[5] !~ /B/); # do nothing if the CIGAR does not contain 'B'
# Collapse backward overlaps #
$t[10] = '!' x length($t[9]) if $t[10] eq '*'; # when no QUAL; set all qualities to zero
# $i: length of query that has been read; $j: length of query that has been written
# $end_j: the right-most query position; $j may be less than $end_j after a backward operation
my ($k, $i, $j, $end_j) = (0, 0, 0, -1);
my @cigar2; # the new CIGAR array will be kept here; the new SEQ/QUAL will be generated in place
for ($k = 0; $k < @cigar; ++$k) {
my ($op, $len) = @{$cigar[$k]}; # the CIGAR operation and the operation length
if ($op eq 'B') { # a backward operation
my ($t, $u); # $u: query length during backward loopup
goto endloop if $len > $j; # an excessively long backward operation
for ($t = $#cigar2, $u = 0; $t >= 0; --$t) { # look back along the new cigar
my ($op1, $len1) = @{$cigar2[$t]};
if ($op1 =~ m/[MIS]/) { # consume the query sequence
if ($u + $len1 >= $len) { # we have looked back enough; stop
$cigar2[$t][1] -= $len - $u;
last;
} else { $u += $len1; }
}
}
--$t if $cigar2[$t][1] == 0; # get rid of the zero-length operation
$#cigar2 = $t; # truncate the new CIGAR array
$end_j = $j;
$j -= $len;
} else {
push(@cigar2, $cigar[$k]); # copy the old CIGAR to the new one
if ($op =~ m/[MIS]/) { # consume the query sequence
my ($u, $c);
# note that SEQ and QUAL is generated in place (i.e. overwriting the old SEQ/QUAL)
for ($u = 0; $u < $len; ++$u) {
$c = substr($t[9], $i + $u, 1); # the base on latter segment
if ($j + $u < $end_j) { # we are in an backward overlap
# for non-Perl programmers: ord() takes the ASCII of a character; chr() gets the character of an ASCII
if ($c ne substr($t[9], $j + $u, 1)) { # a mismatch in the overlaps
if (ord(substr($t[10], $j + $u, 1)) < ord(substr($t[10], $i + $u, 1))) { # QUAL of the 2nd segment is better
substr($t[9], $j + $u, 1) = $c; # the consensus base is taken from the 2nd segment
substr($t[10],$j + $u, 1) = chr(ord(substr($t[10], $i + $u, 1)) - ord(substr($t[10], $j + $u, 1)) + 33);
} else { # then do not change the base, but reduce the quality
substr($t[10],$j + $u, 1) = chr(ord(substr($t[10], $j + $u, 1)) - ord(substr($t[10], $i + $u, 1)) + 33);
}
} else { # same base; then set the quality as the higher one
substr($t[10],$j + $u, 1) = ord(substr($t[10], $j + $u, 1)) > ord(substr($t[10], $i + $u, 1))?
substr($t[10], $j + $u, 1) : substr($t[10], $i + $u, 1);
}
} else { # not in an overlap; then copy the base and quality over
substr($t[9], $j + $u, 1) = $c;
substr($t[10],$j + $u, 1) = substr($t[10], $i + $u, 1);
}
}
$i += $len; $j += $len;
}
}
}
# merge adjacent CIGAR operations of the same type
for ($k = 1; $k < @cigar2; ++$k) {
if ($cigar2[$k][0] eq $cigar2[$k-1][0]) {
$cigar2[$k][1] += $cigar2[$k-1][1];
$cigar2[$k-1][1] = 0; # set the operation length to zero
}
}
# update SEQ, QUAL and CIGAR
$t[9] = substr($t[9], 0, $j); # SEQ
$t[10]= substr($t[10],0, $j); # QUAL
$t[5] = ''; # CIGAR
for my $p (@cigar2) {
$t[5] .= "$p->[1]$p->[0]" if ($p->[1]); # skip zero-length operations
}
# Print #
endloop:
$t[1] |= 4 if $failed; # mark the read as "UNMAPPED" if something bad happens
$t[10] = '*' if $no_qual;
print join("\t", @t), "\n";
}
|
const PlotCard = require('../../plotcard.js');
class RiseOfTheKraken extends PlotCard {
setupCardAbilities() {
this.interrupt({
when: {
onUnopposedWin: event => event.challenge.winner === this.controller
},
handler: () => {
this.game.addMessage('{0} uses {1} to gain an additional power from winning an unopposed challenge', this.controller, this);
this.game.addPower(this.controller, 1);
}
});
}
}
RiseOfTheKraken.code = '02012';
module.exports = RiseOfTheKraken;
|
using System.Drawing;
using System.Drawing.Drawing2D;
static class DrawHelper
{
public static GraphicsPath CreateRoundRect(float x, float y, float width, float height, float radius)
{
GraphicsPath gp = new GraphicsPath();
gp.AddLine(x + radius, y, x + width - (radius * 2), y);
gp.AddArc(x + width - (radius * 2), y, radius * 2, radius * 2, 270, 90);
gp.AddLine(x + width, y + radius, x + width, y + height - (radius * 2));
gp.AddArc(x + width - (radius * 2), y + height - (radius * 2), radius * 2, radius * 2, 0, 90);
gp.AddLine(x + width - (radius * 2), y + height, x + radius, y + height);
gp.AddArc(x, y + height - (radius * 2), radius * 2, radius * 2, 90, 90);
gp.AddLine(x, y + height - (radius * 2), x, y + radius);
gp.AddArc(x, y, radius * 2, radius * 2, 180, 90);
gp.CloseFigure();
return gp;
}
public static GraphicsPath CreateUpRoundRect(float x, float y, float width, float height, float radius)
{
GraphicsPath gp = new GraphicsPath();
gp.AddLine(x + radius, y, x + width - (radius * 2), y);
gp.AddArc(x + width - (radius * 2), y, radius * 2, radius * 2, 270, 90);
gp.AddLine(x + width, y + radius, x + width, y + height - (radius * 2) + 1);
gp.AddArc(x + width - (radius * 2), y + height - (radius * 2), radius * 2, 2, 0, 90);
gp.AddLine(x + width, y + height, x + radius, y + height);
gp.AddArc(x, y + height - (radius * 2) + 1, radius * 2, 1, 90, 90);
gp.AddLine(x, y + height, x, y + radius);
gp.AddArc(x, y, radius * 2, radius * 2, 180, 90);
gp.CloseFigure();
return gp;
}
public static GraphicsPath CreateLeftRoundRect(float x, float y, float width, float height, float radius)
{
GraphicsPath gp = new GraphicsPath();
gp.AddLine(x + radius, y, x + width - (radius * 2), y);
gp.AddArc(x + width - (radius * 2), y, radius * 2, radius * 2, 270, 90);
gp.AddLine(x + width, y + 0, x + width, y + height);
gp.AddArc(x + width - (radius * 2), y + height - (1), radius * 2, 1, 0, 90);
gp.AddLine(x + width - (radius * 2), y + height, x + radius, y + height);
gp.AddArc(x, y + height - (radius * 2), radius * 2, radius * 2, 90, 90);
gp.AddLine(x, y + height - (radius * 2), x, y + radius);
gp.AddArc(x, y, radius * 2, radius * 2, 180, 90);
gp.CloseFigure();
return gp;
}
public static Color BlendColor(Color backgroundColor, Color frontColor)
{
double ratio = 0 / 255d;
double invRatio = 1d - ratio;
int r = (int)((backgroundColor.R * invRatio) + (frontColor.R * ratio));
int g = (int)((backgroundColor.G * invRatio) + (frontColor.G * ratio));
int b = (int)((backgroundColor.B * invRatio) + (frontColor.B * ratio));
return Color.FromArgb(r, g, b);
}
}
|
namespace Perspex.Controls
{
using Layout;
public class RightDocker : Docker
{
public RightDocker(Size availableSize) : base(availableSize)
{
}
public Rect GetDockingRect(Size sizeToDock, Margins margins, Alignments alignments)
{
var marginsCutout = margins.AsThickness();
var withoutMargins = OriginalRect.Deflate(marginsCutout);
var finalRect = withoutMargins.AlignChild(sizeToDock, Alignment.End, alignments.Vertical);
AccumulatedOffset += sizeToDock.Width;
margins.HorizontalMargin = margins.HorizontalMargin.Offset(0, sizeToDock.Width);
return finalRect;
}
}
}
|
class <API key> < ActiveRecord::Migration
def change
create_table :collect_salaries do |t|
t.belongs_to :user
t.decimal :money, :precision => 10, :scale => 2
t.date :collect_date
t.string :notes
t.timestamps null: false
end
end
end
|
<?php
Autoloader::add_core_namespace('Amon');
Autoloader::add_classes(array(
'Amon\\Error' => __DIR__ . '/classes/error.php',
'Amon\\Log' => __DIR__ . '/classes/log.php',
'Amon\\Amon_Data' => __DIR__ . '/classes/amon/data.php',
'Amon\\Amon_Request' => __DIR__ . '/classes/amon/request.php',
'Amon\\Amon_Request_Http' => __DIR__ . '/classes/amon/request/http.php',
'Amon\\Amon_Request_Zeromq' => __DIR__ . '/classes/amon/request/zeromq.php',
));
|
#! /usr/bin/env ruby
# <script name>
# DESCRIPTION:
# Get time series values from Graphite and create events based on values
# OUTPUT:
# plain text
# PLATFORMS:
# Linux
# DEPENDENCIES:
# gem: sensu-plugin
# gem: array_stats
# USAGE:
# #YELLOW
# NOTES:
# Modifications by Chris Jansen to support wildcard targets
# for details.
require 'sensu-plugin/check/cli'
require 'json'
require 'net/http'
require 'net/https'
require 'socket'
require 'array_stats'
class Graphite < Sensu::Plugin::Check::CLI
option :host,
short: '-h HOST',
long: '--host HOST',
description: 'Graphite host to connect to, include port',
required: true
option :target,
description: 'The graphite metric name. Could be a comma separated list of metric names.',
short: '-t TARGET',
long: '--target TARGET',
required: true
option :complex_target,
description: 'Allows complex targets which contain functions. Disables splitting on comma.',
short: '-x',
long: '--complex_target',
default: false
option :period,
description: 'The period back in time to extract from Graphite and compare with. Use 24hours,2days etc, same format as in Graphite',
short: '-p PERIOD',
long: '--period PERIOD',
default: '2hours'
option :updated_since,
description: 'The graphite value should have been updated within UPDATED_SINCE seconds, default to 600 seconds',
short: '-u UPDATED_SINCE',
long: '--updated_since UPDATED_SINCE',
default: 600
option :<API key>,
description: 'The acceptable diff from max values in percentage, used in <API key>',
short: '-D <API key>',
long: '--<API key> <API key>',
default: 0
option :<API key>,
description: 'Check that value is increasing or equal over time (use <API key> if it should allow to be lower)',
short: '-i',
long: '--<API key>',
default: false,
boolean: true
option :greater_than,
description: 'Change whether value is greater than or less than check',
short: '-g',
long: '--greater_than',
default: false
option :check_last,
description: 'Check that the last value in GRAPHITE is greater/less than VALUE',
short: '-l VALUE',
long: '--last VALUE',
default: nil
option :ignore_nulls,
description: 'Do not error on null values, used in <API key>',
short: '-n',
long: '--ignore_nulls',
default: false,
boolean: true
option :concat_output,
description: 'Include warning messages in output even if overall status is critical',
short: '-c',
long: '--concat_output',
default: false,
boolean: true
option :short_output,
description: 'Report only the highest status per series in output',
short: '-s',
long: '--short_output',
default: false,
boolean: true
option :check_average,
description: 'MAX_VALUE should be greater than the average of Graphite values from PERIOD',
short: '-a MAX_VALUE',
long: '--average_value MAX_VALUE'
option :data_points,
description: 'Number of data points to include in average check (smooths out spikes)',
short: '-d VALUE',
long: '--data_points VALUE',
default: 1
option :<API key>,
description: 'MAX_VALUE% should be greater than the average of Graphite values from PERIOD',
short: '-b MAX_VALUE',
long: '--<API key> MAX_VALUE'
option :percentile,
description: 'Percentile value, should be used in conjunction with percentile_value, defaults to 90',
long: '--percentile PERCENTILE',
default: 90
option :check_percentile,
description: 'Values should not be greater than the VALUE of Graphite values from PERIOD',
long: '--percentile_value VALUE'
option :http_user,
description: 'Basic HTTP authentication user',
short: '-U USER',
long: '--http-user USER',
default: nil
option :http_password,
description: 'Basic HTTP authentication password',
short: '-P PASSWORD',
long: '--http-password USER',
default: nil
def initialize
super
@graphite_cache = {}
end
def graphite_cache(target = nil)
# #YELLOW
if @graphite_cache.key?(target)
graphite_value = @graphite_cache[target].select { |value| value[:period] == @period }
graphite_value if graphite_value.size > 0
end
end
# Create a graphite url from params
def graphite_url(target = nil)
url = "#{config[:host]}/render/"
url = 'http://' + url unless url[0..3] == 'http'
# #YELLOW
url = url + "?target=#{target}" if target # rubocop:disable Style/SelfAssignment
URI.parse(url)
end
def get_levels(config_param)
values = config_param.split(',')
i = 0
levels = {}
%w(warning error fatal).each do |type|
levels[type] = values[i] if values[i]
i += 1
end
levels
end
def get_graphite_values(target)
cache_value = graphite_cache target
return cache_value if cache_value
params = {
target: target,
from: "-#{@period}",
format: 'json'
}
req = Net::HTTP::Post.new(graphite_url.path)
# If the basic http authentication credentials have been provided, then use them
if !config[:http_user].nil? && !config[:http_password].nil?
req.basic_auth(config[:http_user], config[:http_password])
end
req.set_form_data(params)
nethttp = Net::HTTP.new(graphite_url.host, graphite_url.port)
if graphite_url.scheme == 'https'
nethttp.use_ssl = true
end
resp = nethttp.start { |http| http.request(req) }
data = JSON.parse(resp.body)
@graphite_cache[target] = []
if data.size > 0
data.each { |d| @graphite_cache[target] << { target: d['target'], period: @period, datapoints: d['datapoints'] } }
graphite_cache target
end
end
# Will give max values for [0..-2]
def max_graphite_value(target)
max_values = {}
values = get_graphite_values target
if values
values.each do |val|
max = get_max_value(val[:datapoints])
max_values[val[:target]] = max
end
end
max_values
end
def get_max_value(values)
if values
values.map { |i| i[0] ? i[0] : 0 }[0..-2].max
end
end
def <API key>(target, count = 1)
last_values = {}
values = get_graphite_values target
if values
values.each do |val|
last = get_last_metric(val[:datapoints], count)
last_values[val[:target]] = last
end
end
last_values
end
def get_last_metric(values, count = 1)
if values
ret = []
values_size = values.size
count = values_size if count > values_size
while count > 0
values_size -= 1
break if values[values_size].nil?
count -= 1 if values[values_size][0]
ret.push(values[values_size]) if values[values_size][0]
end
ret
end
end
def last_graphite_value(target, count = 1)
last_metrics = <API key>(target, count)
last_values = {}
if last_metrics
last_metrics.each do |target_name, metrics|
last_values[target_name] = metrics.map { |metric| metric[0] }.mean
end
end
last_values
end
def been_updated_since(target, time, updated_since)
last_time_stamp = <API key> target
warnings = []
if last_time_stamp
last_time_stamp.each do |target_name, value|
<API key> = value[1] > time.to_i ? true : false
warnings << "The metric #{target_name} has not been updated in #{updated_since} seconds" unless <API key>
end
end
warnings
end
def greater_less
return 'greater' if config[:greater_than]
return 'less' unless config[:greater_than]
end
def check_increasing(target)
updated_since = config[:updated_since].to_i
<API key> = Time.now - updated_since
critical_errors = []
warnings = []
max_gv = max_graphite_value target
last_gv = last_graphite_value target
if last_gv.is_a?(Hash) && max_gv.is_a?(Hash)
# #YELLOW
last_gv.each do |target_name, value|
if value && max_gv[target_name]
last = value
max = max_gv[target_name]
if max > last * (1 + config[:<API key>].to_f / 100)
msg = "The metric #{target} with last value #{last} is less than max value #{max} during #{config[:period]} period"
critical_errors << msg
end
end
end
else
warnings << "Could not found any value in Graphite for metric #{target}, see #{graphite_url(target)}"
end
unless config[:ignore_nulls]
warnings.concat(been_updated_since(target, <API key>, updated_since))
end
[warnings, critical_errors, []]
end
def <API key>(target, max_values, data_points = 1)
values = get_graphite_values target
last_values = last_graphite_value(target, data_points)
return [[], [], []] unless values
warnings = []
criticals = []
fatal = []
values.each do |data|
target = data[:target]
values_pair = data[:datapoints]
values_array = values_pair.select(&:first).map { |v| v.first unless v.first.nil? }
# #YELLOW
avg_value = values_array.reduce { |sum, el| sum + el if el }.to_f / values_array.size # rubocop:disable <API key>
last_value = last_values[target]
percent = last_value / avg_value unless last_value.nil? || avg_value.nil?
# #YELLOW
%w(fatal error warning).each do |type|
next unless max_values.key?(type)
max_value = max_values[type]
var1 = config[:greater_than] ? percent : max_value.to_f
var2 = config[:greater_than] ? max_value.to_f : percent
if !percent.nil? && var1 > var2 && (values_array.size > 0 || !config[:ignore_nulls])
text = "The last value of metric #{target} is #{percent}% #{greater_less} than allowed #{max_value}% of the average value #{avg_value}"
case type
when 'warning'
warnings << text
when 'error'
criticals << text
when 'fatal'
fatal << text
else
raise "Unknown type #{type}"
end
break if config[:short_output]
end
end
end
[warnings, criticals, fatal]
end
def check_average(target, max_values)
values = get_graphite_values target
return [[], [], []] unless values
warnings = []
criticals = []
fatal = []
values.each do |data|
target = data[:target]
values_pair = data[:datapoints]
values_array = values_pair.select(&:first).map { |v| v.first unless v.first.nil? }
# #YELLOW
avg_value = values_array.reduce { |sum, el| sum + el if el }.to_f / values_array.size # rubocop:disable <API key>
# YELLOW
%w(fatal error warning).each do |type|
next unless max_values.key?(type)
max_value = max_values[type]
var1 = config[:greater_than] ? avg_value : max_value.to_f
var2 = config[:greater_than] ? max_value.to_f : avg_value
if var1 > var2 && (values_array.size > 0 || !config[:ignore_nulls])
text = "The average value of metric #{target} is #{avg_value} that is #{greater_less} than allowed average of #{max_value}"
case type
when 'warning'
warnings << text
when 'error'
criticals << text
when 'fatal'
fatal << text
else
raise "Unknown type #{type}"
end
break if config[:short_output]
end
end
end
[warnings, criticals, fatal]
end
def check_percentile(target, max_values, percentile, data_points = 1)
values = get_graphite_values target
last_values = last_graphite_value(target, data_points)
return [[], [], []] unless values
warnings = []
criticals = []
fatal = []
values.each do |data|
target = data[:target]
values_pair = data[:datapoints]
values_array = values_pair.select(&:first).map { |v| v.first unless v.first.nil? }
percentile_value = values_array.percentile(percentile)
last_value = last_values[target]
percent = last_value / percentile_value unless last_value.nil? || percentile_value.nil?
# #YELLOW
%w(fatal error warning).each do |type|
next unless max_values.key?(type)
max_value = max_values[type]
var1 = config[:greater_than] ? percent : max_value.to_f
var2 = config[:greater_than] ? max_value.to_f : percent
if !percentile_value.nil? && var1 > var2
text = "The percentile value of metric #{target} (#{last_value}) is #{greater_less} than the
#{percentile}th percentile (#{percentile_value}) by more than #{max_value}%"
case type
when 'warning'
warnings << text
when 'error'
criticals << text
when 'fatal'
fatal << text
else
raise "Unknown type #{type}"
end
break if config[:short_output]
end
end
end
[warnings, criticals, fatal]
end
def check_last(target, max_values)
last_targets = last_graphite_value target
return [[], [], []] unless last_targets
warnings = []
criticals = []
fatal = []
# #YELLOW
last_targets.each do |target_name, last_value|
unless last_value.nil?
# #YELLOW
%w(fatal error warning).each do |type|
next unless max_values.key?(type)
max_value = max_values[type]
var1 = config[:greater_than] ? last_value : max_value.to_f
var2 = config[:greater_than] ? max_value.to_f : last_value
if var1 > var2
text = "The metric #{target_name} is #{last_value} that is #{greater_less} than last allowed #{max_value}"
case type
when 'warning'
warnings << text
when 'error'
criticals << text
when 'fatal'
fatal << text
else
raise "Unknown type #{type}"
end
break if config[:short_output]
end
end
end
end
[warnings, criticals, fatal]
end
def run # rubocop:disable AbcSize
targets = config[:complex_target] ? [config[:target]] : config[:target].split(',')
@period = config[:period]
critical_errors = []
warnings = []
fatals = []
# #YELLOW
targets.each do |target|
if config[:<API key>]
inc_warnings, inc_critical, inc_fatal = check_increasing target
warnings += inc_warnings
critical_errors += inc_critical
fatals += inc_fatal
end
if config[:check_last]
max_values = get_levels config[:check_last]
lt_warnings, lt_critical, lt_fatal = check_last(target, max_values)
warnings += lt_warnings
critical_errors += lt_critical
fatals += lt_fatal
end
if config[:check_average]
max_values = get_levels config[:check_average]
avg_warnings, avg_critical, avg_fatal = check_average(target, max_values)
warnings += avg_warnings
critical_errors += avg_critical
fatals += avg_fatal
end
if config[:<API key>]
max_values = get_levels config[:<API key>]
avg_warnings, avg_critical, avg_fatal = <API key>(target, max_values, config[:data_points].to_i)
warnings += avg_warnings
critical_errors += avg_critical
fatals += avg_fatal
end
if config[:check_percentile]
max_values = get_levels config[:check_percentile]
pct_warnings, pct_critical, pct_fatal = check_percentile(target, max_values, config[:percentile].to_i, config[:data_points].to_i)
warnings += pct_warnings
critical_errors += pct_critical
fatals += pct_fatal
end
end
fatals_string = fatals.size > 0 ? fatals.join("\n") : ''
criticals_string = critical_errors.size > 0 ? critical_errors.join("\n") : ''
warnings_string = warnings.size > 0 ? warnings.join("\n") : ''
if config[:concat_output]
fatals_string = fatals_string + "\n" + criticals_string if critical_errors.size > 0
fatals_string = fatals_string + "\nGraphite WARNING: " + warnings_string if warnings.size > 0
criticals_string = criticals_string + "\nGraphite WARNING: " + warnings_string if warnings.size > 0
critical fatals_string if fatals.size > 0
critical criticals_string if critical_errors.size > 0
warning warnings_string if warnings.size > 0 # rubocop:disable Style/<API key>
else
critical fatals_string if fatals.size > 0
critical criticals_string if critical_errors.size > 0
warning warnings_string if warnings.size > 0 # rubocop:disable Style/<API key>
end
ok
end
end
|
#include "machineoperand.h"
#include "basicblock.h"
#include <cassert>
#include <iostream>
#include <new>
using namespace TosLang::BackEnd;
MachineOperand::MachineOperand() : mKind{ OperandKind::UNKNOWN } { }
MachineOperand::MachineOperand(const unsigned op, const OperandKind kind)
{
assert((kind == OperandKind::IMMEDIATE)
|| (kind == OperandKind::STACK_SLOT)
|| (kind == OperandKind::REGISTER));
mKind = kind;
switch (kind)
{
case OperandKind::IMMEDIATE:
imm = op;
break;
case OperandKind::STACK_SLOT:
stackslot = op;
break;
case OperandKind::REGISTER:
reg = op;
break;
default:
assert(false && "Unexpected error while building a virtual instruction");
break;
}
}
std::ostream& TosLang::BackEnd::operator<<(std::ostream& stream, const MachineOperand& op)
{
switch (op.mKind)
{
case MachineOperand::OperandKind::IMMEDIATE:
return stream << op.imm;
case MachineOperand::OperandKind::STACK_SLOT:
return stream << "S" << op.stackslot;
case MachineOperand::OperandKind::REGISTER:
return stream << "R" << op.reg;
default:
return stream;
}
}
|
/*
This file contains the sigma-delta driver implementation.
*/
#include "platform.h"
#include "hw_timer.h"
#include "task/task.h"
#include "c_stdlib.h"
#include "pcm.h"
static const os_param_t <API key> = 0x70636D; // "pcm"
static void ICACHE_RAM_ATTR drv_sd_timer_isr( os_param_t arg )
{
cfg_t *cfg = (cfg_t *)arg;
pcm_buf_t *buf = &(cfg->bufs[cfg->rbuf_idx]);
if (cfg->isr_throttled) {
return;
}
if (!buf->empty) {
uint16_t tmp;
// buffer is not empty, continue reading
tmp = abs((int16_t)(buf->data[buf->rpos]) - 128);
if (tmp > cfg->vu_peak_tmp) {
cfg->vu_peak_tmp = tmp;
}
cfg->vu_samples_tmp++;
if (cfg->vu_samples_tmp >= cfg->vu_req_samples) {
cfg->vu_peak = cfg->vu_peak_tmp;
task_post_low( pcm_data_vu_task, (os_param_t)cfg );
cfg->vu_samples_tmp = 0;
cfg->vu_peak_tmp = 0;
}
<API key>( buf->data[buf->rpos++] );
if (buf->rpos >= buf->len) {
// buffer data consumed, request to re-fill it
buf->empty = TRUE;
cfg->fbuf_idx = cfg->rbuf_idx;
task_post_high( pcm_data_play_task, (os_param_t)cfg );
// switch to next buffer
cfg->rbuf_idx ^= 1;
<API key>( PLATFORM_GPIO_LOW );
}
} else {
// flag ISR throttled
cfg->isr_throttled = 1;
<API key>( PLATFORM_GPIO_LOW );
cfg->fbuf_idx = cfg->rbuf_idx;
task_post_high( pcm_data_play_task, (os_param_t)cfg );
}
}
static uint8_t drv_sd_stop( cfg_t *cfg )
{
<API key>( <API key> );
return TRUE;
}
static uint8_t drv_sd_close( cfg_t *cfg )
{
drv_sd_stop( cfg );
<API key>( cfg->pin );
<API key>( PLATFORM_GPIO_INPUT, <API key> );
return TRUE;
}
static uint8_t drv_sd_play( cfg_t *cfg )
{
// VU control: derive callback frequency
cfg->vu_req_samples = (uint16_t)((1000000L / (uint32_t)cfg->vu_freq) / (uint32_t)pcm_rate_def[cfg->rate]);
cfg->vu_samples_tmp = 0;
cfg->vu_peak_tmp = 0;
// (re)start hardware timer ISR to feed the sigma-delta
if (<API key>( <API key>, FRC1_SOURCE, TRUE )) {
<API key>( <API key>, drv_sd_timer_isr, (os_param_t)cfg );
<API key>( <API key>, pcm_rate_def[cfg->rate] );
return TRUE;
} else {
return FALSE;
}
}
static uint8_t drv_sd_init( cfg_t *cfg )
{
<API key>( PLATFORM_GPIO_HIGH );
<API key>( <API key>, <API key> );
<API key>( cfg->pin );
<API key>( 9 );
return TRUE;
}
static uint8_t drv_sd_fail( cfg_t *cfg )
{
return FALSE;
}
const drv_t pcm_drv_sd = {
.init = drv_sd_init,
.close = drv_sd_close,
.play = drv_sd_play,
.record = drv_sd_fail,
.stop = drv_sd_stop
};
|
module Packet
class Reactor
include Core
#<API key>(20)
attr_accessor :fd_writers, :msg_writers,:msg_reader
attr_accessor :result_hash
attr_accessor :live_workers
#after_connection :provide_workers
def self.server_logger= (log_file_name)
@@server_logger = log_file_name
end
def self.run
<API key> = new
<API key>.result_hash = {}
<API key>.live_workers = DoubleKeyedHash.new
yield(<API key>)
<API key>.load_workers
<API key>.start_reactor
end # end of run method
def set_result_hash(hash)
@result_hash = hash
end
def update_result(worker_key,result)
@result_hash ||= {}
@result_hash[worker_key.to_sym] = result
end
def <API key>(t_sock)
sock_fd = t_sock.fileno
worker_instance = @live_workers[sock_fd]
begin
raw_data = read_data(t_sock)
worker_instance.receive_data(raw_data) if worker_instance.respond_to?(:receive_data)
rescue DisconnectError => sock_error
worker_instance.receive_data(sock_error.data) if worker_instance.respond_to?(:receive_data)
remove_worker(t_sock)
end
end
def remove_worker(t_sock)
@live_workers.delete(t_sock.fileno)
read_ios.delete(t_sock)
end
def delete_worker(worker_options = {})
worker_name = worker_options[:worker]
worker_name_key = gen_worker_key(worker_name,worker_options[:worker_key])
worker_options[:method] = :exit
@live_workers[worker_name_key].send_request(worker_options)
end
def load_workers
worker_root = defined?(WORKER_ROOT) ? WORKER_ROOT : "#{PACKET_APP}/worker"
t_workers = Dir["#{worker_root}*.rb"]
return if t_workers.empty?
t_workers.each do |b_worker|
worker_name = File.basename(b_worker,".rb")
require worker_name
worker_klass = Object.const_get(packet_classify(worker_name))
next if worker_klass.no_auto_load
fork_and_load(worker_klass)
end
end
def start_worker(worker_options = { })
worker_name = worker_options[:worker].to_s
worker_name_key = gen_worker_key(worker_name,worker_options[:worker_key])
return if @live_workers[worker_name_key]
worker_options.delete(:worker)
begin
require worker_name
worker_klass = Object.const_get(packet_classify(worker_name))
fork_and_load(worker_klass,worker_options)
rescue LoadError
puts "no such worker #{worker_name}"
return
end
end
def enable_nonblock io
f = io.fcntl(Fcntl::F_GETFL,0)
io.fcntl(Fcntl::F_SETFL,Fcntl::O_NONBLOCK | f)
end
# method should use worker_key if provided in options hash.
def fork_and_load(worker_klass,worker_options = { })
t_worker_name = worker_klass.worker_name
worker_pimp = worker_klass.worker_proxy.to_s
# socket from which master process is going to read
master_read_end,worker_write_end = UNIXSocket.pair(Socket::SOCK_STREAM)
# socket to which master process is going to write
worker_read_end,master_write_end = UNIXSocket.pair(Socket::SOCK_STREAM)
option_dump = Marshal.dump(worker_options)
option_dump_length = option_dump.length
master_write_end.write(option_dump)
worker_name_key = gen_worker_key(t_worker_name,worker_options[:worker_key])
if(!(pid = fork))
[master_write_end,master_read_end].each { |x| x.close }
[worker_read_end,worker_write_end].each { |x| enable_nonblock(x) }
begin
if(ARGV[0] == 'start' && Object.const_defined?(:SERVER_LOGGER))
redirect_io(SERVER_LOGGER)
end
rescue
puts $!.backtrace
end
exec form_cmd_line(worker_read_end.fileno,worker_write_end.fileno,t_worker_name,option_dump_length)
end
Process.detach(pid)
[master_read_end,master_write_end].each { |x| enable_nonblock(x) }
if worker_pimp && !worker_pimp.empty?
require worker_pimp
pimp_klass = Object.const_get(packet_classify(worker_pimp))
@live_workers[worker_name_key,master_read_end.fileno] = pimp_klass.new(master_write_end,pid,self)
else
t_pimp = Packet::MetaPimp.new(master_write_end,pid,self)
t_pimp.worker_key = worker_name_key
t_pimp.worker_name = t_worker_name
t_pimp.<API key> = worker_klass.instance_methods
@live_workers[worker_name_key,master_read_end.fileno] = t_pimp
end
worker_read_end.close
worker_write_end.close
read_ios << master_read_end
end # end of fork_and_load method
# Free file descriptors and
# point them somewhere sensible
# STDOUT/STDERR should go to a logfile
def redirect_io(logfile_name)
begin; STDIN.reopen "/dev/null"; rescue ::Exception; end
if logfile_name
begin
STDOUT.reopen logfile_name, "a"
STDOUT.sync = true
rescue ::Exception
begin; STDOUT.reopen "/dev/null"; rescue ::Exception; end
end
else
begin; STDOUT.reopen "/dev/null"; rescue ::Exception; end
end
begin; STDERR.reopen STDOUT; rescue ::Exception; end
STDERR.sync = true
end
def form_cmd_line *args
min_string = "<API key> #{args[0]}:#{args[1]}:#{args[2]}:#{args[3]}"
min_string << ":#{WORKER_ROOT}" if defined? WORKER_ROOT
min_string << ":#{WORKER_LOAD_ENV}" if defined? WORKER_LOAD_ENV
min_string
end
end # end of Reactor class
end # end of Packet module
|
<h3 class="title">How to Use</h3>
<h5 class="htu-content">
<ul class="list-blank text-center">
<li class="list-item-header first"><h3>1</h3></li>
<li>Add the AngularJS <a href="https://code.angularjs.org/1.2.16/angular-animate.min.js" target="_blank">ngAnimate</a> script to your project</li>
<li class="list-item-header first"><h3>2</h3></li>
<li>Reference the 'ngAnimate' module as a dependency in your app</li>
<li class="list-item-header"><h3>3</h3></li>
<li>
Add one of the following files to your app:
<div class="row row-spaced">
<div class="col-sm-4 col-sm-offset-1">
<a class="btn btn-primary col-btn" target="_blank" href="https://raw.githubusercontent.com/theoinglis/ngAnimate.css/master/build/nga.min.css">
<b>nga.css</b> <br />
(leaner - simple)
</a>
</div>
<div class="col-sm-2 col-text htu-or">
<b>or</b>
</div>
<div class="col-sm-4">
<a class="btn btn-primary col-btn" target="_blank" href="https://raw.githubusercontent.com/theoinglis/ngAnimate.css/master/build/nga.all.min.css">
<b>nga.all.css</b> <br />
(more customisable - advanced)
</a>
</div>
</div>
</li>
<li class="list-item-header"><h3>4</h3></li>
<li>Add the classes in the 'Classes Applied' section to the element you want to animate</li>
<li class="list-item-header"><h3>Done</h3></li>
</ul>
</h5>
|
#!/bin/sh
tar -xf $INPUT_CODE && mv ping /ping
cd /ping && npm install
|
#ifndef <API key>
#define <API key>
#include <QHostAddress>
#include <QIODevice>
#include <QMultiMap>
#include <qhttpengine/ibytearray.h>
#include "qhttpengine_export.h"
class QJsonDocument;
class QTcpSocket;
namespace QHttpEngine
{
class QHTTPENGINE_EXPORT SocketPrivate;
/**
* @brief Implementation of the HTTP protocol
*
* This class provides a class derived from QIODevice that can be used to read
* data from and write data to an HTTP client through a QTcpSocket provided in
* the constructor. The socket will assume ownership of the QTcpSocket and
* ensure it is properly deleted. Consequently, the QTcpSocket must have been
* allocated on the heap:
*
* @code
* QTcpSocket *tcpSock = new QTcpSocket;
* tcpSock->connectToHost(...);
* tcpSock->waitForConnected();
*
* QHttpEngine::Socket *httpSock = new QHttpEngine::Socket(tcpSock);
* @endcode
*
* Once the headersParsed() signal is emitted, information about the request
* can be retrieved using the appropriate methods. As data is received, the
* readyRead() signal is emitted and any available data can be read using
* QIODevice::read():
*
* @code
* QByteArray data;
* connect(httpSock, SIGNAL(readyRead()), this, SLOT(onReadyRead()));
*
* void MyClass::onReadyRead()
* {
* data.append(httpSock->readAll());
* }
* @endcode
*
* If the client sets the `Content-Length` header, the readChannelFinished()
* signal will be emitted when the specified amount of data is read from the
* client. Otherwise the readChannelFinished() signal will be emitted
* immediately after the headers are read.
*
* The status code and headers may be set as long as no data has been written
* to the device and the writeHeaders() method has not been called. The
* headers are written either when the writeHeaders() method is called or when
* data is first written to the device:
*
* @code
* httpSock->setStatusCode(QHttpSocket::OK);
* httpSock->setHeader("Content-Length", 13);
* httpSock->write("Hello, world!");
* @endcode
*
* This class also provides methods that simplify writing a redirect or an
* HTTP error to the socket. To write a redirect, simply pass a path to the
* writeRedirect() method. To write an error, simply pass the desired HTTP
* status code to the writeError() method. Both methods will close the socket
* once the response is written.
*/
class QHTTPENGINE_EXPORT Socket : public QIODevice
{
Q_OBJECT
public:
/**
* @brief Map consisting of query string values
*/
typedef QMultiMap<QString, QString> QueryStringMap;
/**
* @brief Map consisting of HTTP headers
*
* The key used for the map is the
* [IByteArray](@ref QHttpEngine::IByteArray) class, which allows for
* case-insensitive comparison.
*/
typedef QMultiMap<IByteArray, QByteArray> HeaderMap;
/**
* HTTP methods
*
* An integer constant is provided for each of the methods described in
* RFC 2616 (HTTP/1.1).
*/
enum Method {
Request for communications options
OPTIONS = 1,
Request resource
GET = 1 << 1,
Request resource without body
HEAD = 1 << 2,
Store subordinate resource
POST = 1 << 3,
Store resource
PUT = 1 << 4,
Delete resource
DELETE = 1 << 5,
Diagnostic trace
TRACE = 1 << 6,
Proxy connection
CONNECT = 1 << 7
};
/**
* Predefined constants for HTTP status codes
*/
enum {
Request was successful
OK = 200,
Request was successful and a resource was created
Created = 201,
Request was accepted for processing, not completed yet.
Accepted = 202,
%Range request was successful
PartialContent = 206,
Resource has moved permanently
MovedPermanently = 301,
Resource is available at an alternate URI
Found = 302,
Bad client request
BadRequest = 400,
Client is unauthorized to access the resource
Unauthorized = 401,
Access to the resource is forbidden
Forbidden = 403,
Resource was not found
NotFound = 404,
Method is not valid for the resource
MethodNotAllowed = 405,
The request could not be completed due to a conflict with the current state of the resource
Conflict = 409,
An internal server error occurred
InternalServerError = 500,
Invalid response from server while acting as a gateway
BadGateway = 502,
%Server unable to handle request due to overload
ServiceUnavailable = 503,
%Server does not supports the HTTP version in the request
<API key> = 505
};
/**
* @brief Create a new socket from a QTcpSocket
*
* This instance will assume ownership of the QTcpSocket. That is, it will
* make itself the parent of the socket.
*/
Socket(QTcpSocket *socket, QObject *parent = 0);
/**
* @brief Retrieve the number of bytes available for reading
*
* This method indicates the number of bytes that could immediately be
* read by a call to QIODevice::readAll().
*/
virtual qint64 bytesAvailable() const;
/**
* @brief Determine if the device is sequential
*
* This method will always return true.
*/
virtual bool isSequential() const;
/**
* @brief Close the device and underlying socket
*
* Invoking this method signifies that no more data will be written to the
* device. It will also close the underlying QTcpSocket and destroy this
* object.
*/
virtual void close();
/**
* @brief Retrive the address of the remote peer
*/
QHostAddress peerAddress() const;
/**
* @brief Determine if the request headers have been parsed yet
*/
bool isHeadersParsed() const;
/**
* @brief Retrieve the request method
*
* This method may only be called after the request headers have been
* parsed.
*/
Method method() const;
/**
* @brief Retrieve the raw request path
*
* This method may only be called after the request headers have been
* parsed.
*/
QByteArray rawPath() const;
/**
* @brief Retrieve the decoded path with the query string removed
*
* This method may only be called after the request headers have been
* parsed.
*/
QString path() const;
/**
* @brief Retrieve the query string
*
* This method may only be called after the request headers have been
* parsed.
*/
QueryStringMap queryString() const;
/**
* @brief Retrieve a map of request headers
*
* This method may only be called after the request headers have been
* parsed. The original case of the headers is preserved but comparisons
* are performed in a case-insensitive manner.
*/
HeaderMap headers() const;
/**
* @brief Retrieve the length of the content
*
* This value is provided by the `Content-Length` HTTP header (if present)
* and returns -1 if the value is not available.
*/
qint64 contentLength() const;
/**
* @brief Parse the request body as a JSON document
*
* This method may only be called after the request headers **and** the
* request body have been received. The most effective way to confirm that
* this is the case is by using:
*
* @code
* socket->bytesAvailable() >= socket->contentLength()
* @endcode
*
* If the JSON received is invalid, an error will be immediately written
* to the socket. The return value indicates whether the JSON was valid.
*/
bool readJson(QJsonDocument &document);
/**
* @brief Set the response code
*
* This method may only be called before the response headers are written.
*
* The statusReason parameter may be omitted if one of the predefined
* status code constants is used. If no response status code is explicitly
* set, it will assume a default value of "200 OK".
*/
void setStatusCode(int statusCode, const QByteArray &statusReason = QByteArray());
/**
* @brief Set a response header to a specific value
*
* This method may only be called before the response headers are written.
* Duplicate values will be either appended to the header or used to
* replace the original value, depending on the third parameter.
*/
void setHeader(const QByteArray &name, const QByteArray &value, bool replace = true);
/**
* @brief Set the response headers
*
* This method may only be called before the response headers are written.
* All existing headers will be overwritten.
*/
void setHeaders(const HeaderMap &headers);
/**
* @brief Write response headers to the socket
*
* This method should not be invoked after the response headers have been
* written.
*/
void writeHeaders();
/**
* @brief Write an HTTP 3xx redirect to the socket and close it
*/
void writeRedirect(const QByteArray &path, bool permanent = false);
/**
* @brief Write an HTTP error to the socket and close it
*/
void writeError(int statusCode, const QByteArray &statusReason = QByteArray());
/**
* @brief Write the specified JSON document to the socket and close it
*/
void writeJson(const QJsonDocument &document, int statusCode = OK);
Q_SIGNALS:
/**
* @brief Indicate that request headers have been parsed
*
* This signal is emitted when the request headers have been received from
* the client and parsing is complete. It is then safe to begin reading
* request data. The readyRead() signal will be emitted as request data is
* received.
*/
void headersParsed();
/**
* @brief Indicate that the client has disconnected
*/
void disconnected();
protected:
/**
* @brief Implementation of QIODevice::readData()
*/
virtual qint64 readData(char *data, qint64 maxlen);
/**
* @brief Implementation of QIODevice::writeData()
*/
virtual qint64 writeData(const char *data, qint64 len);
private:
SocketPrivate *const d;
friend class SocketPrivate;
};
}
#endif // <API key>
|
// Reflect.cs: Creates Element classes from an instance
// Miguel de Icaza (miguel@gnome.org)
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using MonoTouch.UIKit;
using System.Drawing;
using MonoTouch.Foundation;
namespace MonoTouch.Dialog
{
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class EntryAttribute : Attribute {
public EntryAttribute () : this (null) { }
public EntryAttribute (string placeholder)
{
Placeholder = placeholder;
}
public string Placeholder;
public UIKeyboardType KeyboardType;
public <API key> AutocorrectionType;
public <API key> <API key>;
public UITextFieldViewMode ClearButtonMode;
}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class DateAttribute : Attribute { }
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class TimeAttribute : Attribute { }
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class CheckboxAttribute : Attribute {}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class MultilineAttribute : Attribute {}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class HtmlAttribute : Attribute {}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class SkipAttribute : Attribute {}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class PasswordAttribute : EntryAttribute {
public PasswordAttribute (string placeholder) : base (placeholder) {}
}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class AlignmentAttribute : Attribute {
public AlignmentAttribute (UITextAlignment alignment) {
Alignment = alignment;
}
public UITextAlignment Alignment;
}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class <API key> : Attribute {
public string Target;
public <API key> (string target)
{
Target = target;
}
}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class OnTapAttribute : Attribute {
public OnTapAttribute (string method)
{
Method = method;
}
public string Method;
}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class CaptionAttribute : Attribute {
public CaptionAttribute (string caption)
{
Caption = caption;
}
public string Caption;
}
[AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited=false)]
public class SectionAttribute : Attribute {
public SectionAttribute () {}
public SectionAttribute (string caption)
{
Caption = caption;
}
public SectionAttribute (string caption, string footer)
{
Caption = caption;
Footer = footer;
}
public string Caption, Footer;
}
public class RangeAttribute : Attribute {
public RangeAttribute (float low, float high)
{
Low = low;
High = high;
}
public float Low, High;
public bool ShowCaption;
}
public class BindingContext : IDisposable {
public RootElement Root;
Dictionary<Element,MemberAndInstance> mappings;
class MemberAndInstance {
public MemberAndInstance (MemberInfo mi, object o)
{
Member = mi;
Obj = o;
}
public MemberInfo Member;
public object Obj;
}
static object GetValue (MemberInfo mi, object o)
{
var fi = mi as FieldInfo;
if (fi != null)
return fi.GetValue (o);
var pi = mi as PropertyInfo;
var getMethod = pi.GetGetMethod ();
return getMethod.Invoke (o, new object [0]);
}
static void SetValue (MemberInfo mi, object o, object val)
{
var fi = mi as FieldInfo;
if (fi != null){
fi.SetValue (o, val);
return;
}
var pi = mi as PropertyInfo;
var setMethod = pi.GetSetMethod ();
setMethod.Invoke (o, new object [] { val });
}
static string MakeCaption (string name)
{
var sb = new StringBuilder (name.Length);
bool nextUp = true;
foreach (char c in name){
if (nextUp){
sb.Append (Char.ToUpper (c));
nextUp = false;
} else {
if (c == '_'){
sb.Append (' ');
continue;
}
if (Char.IsUpper (c))
sb.Append (' ');
sb.Append (c);
}
}
return sb.ToString ();
}
// Returns the type for fields and properties and null for everything else
static Type GetTypeForMember (MemberInfo mi)
{
if (mi is FieldInfo)
return ((FieldInfo) mi).FieldType;
else if (mi is PropertyInfo)
return ((PropertyInfo) mi).PropertyType;
return null;
}
public BindingContext (object callbacks, object o, string title)
{
if (o == null)
throw new <API key> ("o");
mappings = new Dictionary<Element,MemberAndInstance> ();
Root = new RootElement (title);
Populate (callbacks, o, Root);
}
void Populate (object callbacks, object o, RootElement root)
{
MemberInfo last_radio_index = null;
var members = o.GetType ().GetMembers (BindingFlags.DeclaredOnly | BindingFlags.Public |
BindingFlags.NonPublic | BindingFlags.Instance);
Section section = null;
foreach (var mi in members){
Type mType = GetTypeForMember (mi);
if (mType == null)
continue;
string caption = null;
object [] attrs = mi.GetCustomAttributes (false);
bool skip = false;
foreach (var attr in attrs){
if (attr is SkipAttribute || attr is System.Runtime.CompilerServices.<API key>)
skip = true;
else if (attr is CaptionAttribute)
caption = ((CaptionAttribute) attr).Caption;
else if (attr is SectionAttribute){
if (section != null)
root.Add (section);
var sa = attr as SectionAttribute;
section = new Section (sa.Caption, sa.Footer);
}
}
if (skip)
continue;
if (caption == null)
caption = MakeCaption (mi.Name);
if (section == null)
section = new Section ();
Element element = null;
if (mType == typeof (string)){
PasswordAttribute pa = null;
AlignmentAttribute align = null;
EntryAttribute ea = null;
object html = null;
NSAction invoke = null;
bool multi = false;
foreach (object attr in attrs){
if (attr is PasswordAttribute)
pa = attr as PasswordAttribute;
else if (attr is EntryAttribute)
ea = attr as EntryAttribute;
else if (attr is MultilineAttribute)
multi = true;
else if (attr is HtmlAttribute)
html = attr;
else if (attr is AlignmentAttribute)
align = attr as AlignmentAttribute;
if (attr is OnTapAttribute){
string mname = ((OnTapAttribute) attr).Method;
if (callbacks == null){
throw new Exception ("Your class contains [OnTap] attributes, but you passed a null object for `context' in the constructor");
}
var method = callbacks.GetType ().GetMethod (mname);
if (method == null)
throw new Exception ("Did not find method " + mname);
invoke = delegate {
method.Invoke (method.IsStatic ? null : callbacks, new object [0]);
};
}
}
string value = (string) GetValue (mi, o);
if (pa != null)
element = new EntryElement (caption, pa.Placeholder, value, true);
else if (ea != null)
element = new EntryElement (caption, ea.Placeholder, value) { KeyboardType = ea.KeyboardType, <API key> = ea.<API key>, AutocorrectionType = ea.AutocorrectionType, ClearButtonMode = ea.ClearButtonMode };
else if (multi)
element = new MultilineElement (caption, value);
else if (html != null)
element = new HtmlElement (caption, value);
else {
var selement = new StringElement (caption, value);
element = selement;
if (align != null)
selement.Alignment = align.Alignment;
}
if (invoke != null)
((StringElement) element).Tapped += invoke;
} else if (mType == typeof (float)){
var floatElement = new FloatElement (null, null, (float) GetValue (mi, o));
floatElement.Caption = caption;
element = floatElement;
foreach (object attr in attrs){
if (attr is RangeAttribute){
var ra = attr as RangeAttribute;
floatElement.MinValue = ra.Low;
floatElement.MaxValue = ra.High;
floatElement.ShowCaption = ra.ShowCaption;
}
}
} else if (mType == typeof (bool)){
bool checkbox = false;
foreach (object attr in attrs){
if (attr is CheckboxAttribute)
checkbox = true;
}
if (checkbox)
element = new CheckboxElement (caption, (bool) GetValue (mi, o));
else
element = new BooleanElement (caption, (bool) GetValue (mi, o));
} else if (mType == typeof (DateTime)){
var dateTime = (DateTime) GetValue (mi, o);
bool asDate = false, asTime = false;
foreach (object attr in attrs){
if (attr is DateAttribute)
asDate = true;
else if (attr is TimeAttribute)
asTime = true;
}
if (asDate)
element = new DateElement (caption, dateTime);
else if (asTime)
element = new TimeElement (caption, dateTime);
else
element = new DateTimeElement (caption, dateTime);
} else if (mType.IsEnum){
var csection = new Section ();
ulong evalue = Convert.ToUInt64 (GetValue (mi, o), null);
int idx = 0;
int selected = 0;
foreach (var fi in mType.GetFields (BindingFlags.Public | BindingFlags.Static)){
ulong v = Convert.ToUInt64 (GetValue (fi, null));
if (v == evalue)
selected = idx;
CaptionAttribute ca = Attribute.GetCustomAttribute(fi, typeof(CaptionAttribute)) as CaptionAttribute;
csection.Add (new RadioElement (ca != null ? ca.Caption : MakeCaption (fi.Name)));
idx++;
}
element = new RootElement (caption, new RadioGroup (null, selected)) { csection };
} else if (mType == typeof (UIImage)){
element = new ImageElement ((UIImage) GetValue (mi, o));
} else if (typeof (System.Collections.IEnumerable).IsAssignableFrom (mType)){
var csection = new Section ();
int count = 0;
if (last_radio_index == null)
throw new Exception ("IEnumerable found, but no previous int found");
foreach (var e in (IEnumerable) GetValue (mi, o)){
csection.Add (new RadioElement (e.ToString ()));
count++;
}
int selected = (int) GetValue (last_radio_index, o);
if (selected >= count || selected < 0)
selected = 0;
element = new RootElement (caption, new MemberRadioGroup (null, selected, last_radio_index)) { csection };
last_radio_index = null;
} else if (typeof (int) == mType){
foreach (object attr in attrs){
if (attr is <API key>){
last_radio_index = mi;
break;
}
}
} else {
var nested = GetValue (mi, o);
if (nested != null){
var newRoot = new RootElement (caption);
Populate (callbacks, nested, newRoot);
element = newRoot;
}
}
if (element == null)
continue;
section.Add (element);
mappings [element] = new MemberAndInstance (mi, o);
}
root.Add (section);
}
class MemberRadioGroup : RadioGroup {
public MemberInfo mi;
public MemberRadioGroup (string key, int selected, MemberInfo mi) : base (key, selected)
{
this.mi = mi;
}
}
public void Dispose ()
{
Dispose (true);
}
protected virtual void Dispose (bool disposing)
{
if (disposing){
foreach (var element in mappings.Keys){
element.Dispose ();
}
mappings = null;
}
}
public void Fetch ()
{
foreach (var dk in mappings){
Element element = dk.Key;
MemberInfo mi = dk.Value.Member;
object obj = dk.Value.Obj;
if (element is DateTimeElement)
SetValue (mi, obj, ((DateTimeElement) element).DateValue);
else if (element is FloatElement)
SetValue (mi, obj, ((FloatElement) element).Value);
else if (element is BooleanElement)
SetValue (mi, obj, ((BooleanElement) element).Value);
else if (element is CheckboxElement)
SetValue (mi, obj, ((CheckboxElement) element).Value);
else if (element is EntryElement){
var entry = (EntryElement) element;
entry.FetchValue ();
SetValue (mi, obj, entry.Value);
} else if (element is ImageElement)
SetValue (mi, obj, ((ImageElement) element).Value);
else if (element is RootElement){
var re = element as RootElement;
if (re.group as MemberRadioGroup != null){
var group = re.group as MemberRadioGroup;
SetValue (group.mi, obj, re.RadioSelected);
} else if (re.group as RadioGroup != null){
var mType = GetTypeForMember (mi);
var fi = mType.GetFields (BindingFlags.Public | BindingFlags.Static) [re.RadioSelected];
SetValue (mi, obj, fi.GetValue (null));
}
}
}
}
}
}
|
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using System.Web;
namespace Blog.Models
{
public class ApplicationUser : IdentityUser
{
[Required]
public string FullName { get; set; }
public async Task<ClaimsIdentity> <API key>(UserManager<ApplicationUser> manager)
{
// Note the authenticationType must match the one defined in Cookie<API key>.AuthenticationType
var userIdentity = await manager.CreateIdentityAsync(this, <API key>.ApplicationCookie);
// Add custom user claims here
return userIdentity;
}
}
}
|
<!DOCTYPE HTML>
<html lang="en-US" >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
<title> | EMP</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="">
<meta name="generator" content="GitBook 1.3.4">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="<API key>" content="yes">
<meta name="<API key>" content="black">
<link rel="<API key>" sizes="152x152" href="../gitbook/images/<API key>.png">
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="../overview/EMPIntroduce.html" />
<link rel="prev" href="../overview/Introduction.html" />
</head>
<body>
<link rel="stylesheet" href="../gitbook/style.css">
<div class="book" data-level="1.1" data-basepath=".." data-revision="1463048404363">
<div class="book-summary">
<div class="book-search">
<input type="text" placeholder="Type to search" class="form-control" />
</div>
<ul class="summary">
<li class="chapter " data-level="0" data-path="index.html">
<a href="../index.html">
<i class="fa fa-check"></i>
Introduction
</a>
</li>
<li class="chapter " data-level="1" data-path="overview/Introduction.html">
<a href="../overview/Introduction.html">
<i class="fa fa-check"></i>
<b>1.</b>
EMP
</a>
<ul class="articles">
<li class="chapter active" data-level="1.1" data-path="overview/TermIntroduction.html">
<a href="../overview/TermIntroduction.html">
<i class="fa fa-check"></i>
<b>1.1.</b>
</a>
</li>
<li class="chapter " data-level="1.2" data-path="overview/EMPIntroduce.html">
<a href="../overview/EMPIntroduce.html">
<i class="fa fa-check"></i>
<b>1.2.</b>
EMP
</a>
</li>
<li class="chapter " data-level="1.3" data-path="overview/Components.html">
<a href="../overview/Components.html">
<i class="fa fa-check"></i>
<b>1.3.</b>
EMP
</a>
</li>
<li class="chapter " data-level="1.4" data-path="overview/Client.html">
<a href="../overview/Client.html">
<i class="fa fa-check"></i>
<b>1.4.</b>
EMP
</a>
</li>
<li class="chapter " data-level="1.5" data-path="overview/EWP.html">
<a href="../overview/EWP.html">
<i class="fa fa-check"></i>
<b>1.5.</b>
EMP EWP
</a>
</li>
<li class="chapter " data-level="1.6" data-path="overview/Console.html">
<a href="../overview/Console.html">
<i class="fa fa-check"></i>
<b>1.6.</b>
EMP
</a>
</li>
<li class="chapter " data-level="1.7" data-path="overview/IDE.html">
<a href="../overview/IDE.html">
<i class="fa fa-check"></i>
<b>1.7.</b>
EMP IDE
</a>
</li>
<li class="chapter " data-level="1.8" data-path="overview/EMPRun.html">
<a href="../overview/EMPRun.html">
<i class="fa fa-check"></i>
<b>1.8.</b>
EMP
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2" data-path="prerequisites/Introduction.html">
<a href="../prerequisites/Introduction.html">
<i class="fa fa-check"></i>
<b>2.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="2.1" data-path="prerequisites/Erlang.html">
<a href="../prerequisites/Erlang.html">
<i class="fa fa-check"></i>
<b>2.1.</b>
Erlang
</a>
</li>
<li class="chapter " data-level="2.2" data-path="prerequisites/Lua.html">
<a href="../prerequisites/Lua.html">
<i class="fa fa-check"></i>
<b>2.2.</b>
Lua
</a>
</li>
<li class="chapter " data-level="2.3" data-path="prerequisites/XHTML.html">
<a href="../prerequisites/XHTML.html">
<i class="fa fa-check"></i>
<b>2.3.</b>
XHTML
</a>
</li>
<li class="chapter " data-level="2.4" data-path="prerequisites/CSS.html">
<a href="../prerequisites/CSS.html">
<i class="fa fa-check"></i>
<b>2.4.</b>
CSS
</a>
</li>
<li class="chapter " data-level="2.5" data-path="prerequisites/ClearSilver.html">
<a href="../prerequisites/ClearSilver.html">
<i class="fa fa-check"></i>
<b>2.5.</b>
CLEARSILVER
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="3" data-path="setup_develop_env/Introduction.html">
<a href="../setup_develop_env/Introduction.html">
<i class="fa fa-check"></i>
<b>3.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="3.1" data-path="setup_develop_env/server/Introduction.html">
<a href="../setup_develop_env/server/Introduction.html">
<i class="fa fa-check"></i>
<b>3.1.</b>
EMP Server
</a>
<ul class="articles">
<li class="chapter " data-level="3.1.1" data-path="setup_develop_env/server/Windows/Introduction.html">
<a href="../setup_develop_env/server/Windows/Introduction.html">
<i class="fa fa-check"></i>
<b>3.1.1.</b>
Windows
</a>
<ul class="articles">
<li class="chapter " data-level="3.1.1.1" data-path="setup_develop_env/server/Windows/VMInstall.html">
<a href="../setup_develop_env/server/Windows/VMInstall.html">
<i class="fa fa-check"></i>
<b>3.1.1.1.</b>
</a>
</li>
<li class="chapter " data-level="3.1.1.2" data-path="setup_develop_env/server/Windows/ErlangInstall.html">
<a href="../setup_develop_env/server/Windows/ErlangInstall.html">
<i class="fa fa-check"></i>
<b>3.1.1.2.</b>
Erlang
</a>
</li>
<li class="chapter " data-level="3.1.1.3" data-path="setup_develop_env/server/Windows/AndroidSimInstall.html">
<a href="../setup_develop_env/server/Windows/AndroidSimInstall.html">
<i class="fa fa-check"></i>
<b>3.1.1.3.</b>
Android
</a>
</li>
<li class="chapter " data-level="3.1.1.4" data-path="setup_develop_env/server/Windows/EclipseIDEInstall.html">
<a href="../setup_develop_env/server/Windows/EclipseIDEInstall.html">
<i class="fa fa-check"></i>
<b>3.1.1.4.</b>
Eclipse IDE
</a>
</li>
<li class="chapter " data-level="3.1.1.5" data-path="dev_book/develop_env/atom.html">
<a href="../dev_book/develop_env/atom.html">
<i class="fa fa-check"></i>
<b>3.1.1.5.</b>
</a>
</li>
<li class="chapter " data-level="3.1.1.6" data-path="dev_book/develop_env/env.html">
<a href="../dev_book/develop_env/env.html">
<i class="fa fa-check"></i>
<b>3.1.1.6.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="3.1.2" data-path="setup_develop_env/server/Linux/Introduction.html">
<a href="../setup_develop_env/server/Linux/Introduction.html">
<i class="fa fa-check"></i>
<b>3.1.2.</b>
Linux
</a>
<ul class="articles">
<li class="chapter " data-level="3.1.2.1" data-path="setup_develop_env/server/Linux/EMPInstall.html">
<a href="../setup_develop_env/server/Linux/EMPInstall.html">
<i class="fa fa-check"></i>
<b>3.1.2.1.</b>
ubuntuEMP
</a>
</li>
<li class="chapter " data-level="3.1.2.2" data-path="setup_develop_env/server/Linux/AndroidSimInstall.html">
<a href="../setup_develop_env/server/Linux/AndroidSimInstall.html">
<i class="fa fa-check"></i>
<b>3.1.2.2.</b>
Android
</a>
</li>
<li class="chapter " data-level="3.1.2.3" data-path="setup_develop_env/server/Linux/ECTSInstall.html">
<a href="../setup_develop_env/server/Linux/ECTSInstall.html">
<i class="fa fa-check"></i>
<b>3.1.2.3.</b>
ECTS
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="4" data-path="hello_emp/Introduction.html">
<a href="../hello_emp/Introduction.html">
<i class="fa fa-check"></i>
<b>4.</b>
Hello EMP
</a>
<ul class="articles">
<li class="chapter " data-level="4.1" data-path="dev_book/create_project/create_project.html">
<a href="../dev_book/create_project/create_project.html">
<i class="fa fa-check"></i>
<b>4.1.</b>
Project
</a>
</li>
<li class="chapter " data-level="4.2" data-path="dev_book/create_project/start_project.html">
<a href="../dev_book/create_project/start_project.html">
<i class="fa fa-check"></i>
<b>4.2.</b>
Project
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5" data-path="app_dev/Introduction.html">
<a href="../app_dev/Introduction.html">
<i class="fa fa-check"></i>
<b>5.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="5.1" data-path="app_dev/xhtml/XHTMLDev.html">
<a href="../app_dev/xhtml/XHTMLDev.html">
<i class="fa fa-check"></i>
<b>5.1.</b>
XHTML
</a>
<ul class="articles">
<li class="chapter " data-level="5.1.1" data-path="app_dev/xhtml/xhtmlCompost/XHTMLCompost.html">
<a href="../app_dev/xhtml/xhtmlCompost/XHTMLCompost.html">
<i class="fa fa-check"></i>
<b>5.1.1.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="5.1.1.1" data-path="app_dev/xhtml/xhtmlCompost/xhtml_baseTag.html">
<a href="../app_dev/xhtml/xhtmlCompost/xhtml_baseTag.html">
<i class="fa fa-check"></i>
<b>5.1.1.1.</b>
</a>
</li>
<li class="chapter " data-level="5.1.1.2" data-path="app_dev/xhtml/xhtmlCompost/xhtml_css.html">
<a href="../app_dev/xhtml/xhtmlCompost/xhtml_css.html">
<i class="fa fa-check"></i>
<b>5.1.1.2.</b>
CSS
</a>
</li>
<li class="chapter " data-level="5.1.1.3" data-path="app_dev/xhtml/xhtmlCompost/xhtml_cusTag.html">
<a href="../app_dev/xhtml/xhtmlCompost/xhtml_cusTag.html">
<i class="fa fa-check"></i>
<b>5.1.1.3.</b>
</a>
</li>
<li class="chapter " data-level="5.1.1.4" data-path="app_dev/xhtml/xhtmlCompost/xhtml_LuaScript.html">
<a href="../app_dev/xhtml/xhtmlCompost/xhtml_LuaScript.html">
<i class="fa fa-check"></i>
<b>5.1.1.4.</b>
Lua
</a>
</li>
<li class="chapter " data-level="5.1.1.5" data-path="app_dev/xhtml/xhtmlCompost/xhtml_mul_example.html">
<a href="../app_dev/xhtml/xhtmlCompost/xhtml_mul_example.html">
<i class="fa fa-check"></i>
<b>5.1.1.5.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.1.2" data-path="app_dev/xhtml/xhtmlDyn/xhtml_dyn.html">
<a href="../app_dev/xhtml/xhtmlDyn/xhtml_dyn.html">
<i class="fa fa-check"></i>
<b>5.1.2.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="5.1.2.1" data-path="app_dev/xhtml/xhtmlDyn/xhtml_init.html">
<a href="../app_dev/xhtml/xhtmlDyn/xhtml_init.html">
<i class="fa fa-check"></i>
<b>5.1.2.1.</b>
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="5.2" data-path="app_dev/module/module_dev.html">
<a href="../app_dev/module/module_dev.html">
<i class="fa fa-check"></i>
<b>5.2.</b>
EWP MODULE
</a>
<ul class="articles">
<li class="chapter " data-level="5.2.1" data-path="app_dev/module/module_function.html">
<a href="../app_dev/module/module_function.html">
<i class="fa fa-check"></i>
<b>5.2.1.</b>
Module
</a>
</li>
<li class="chapter " data-level="5.2.2" data-path="app_dev/module/module_compose.html">
<a href="../app_dev/module/module_compose.html">
<i class="fa fa-check"></i>
<b>5.2.2.</b>
Module
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.3" data-path="app_dev/ewpData/module_data.html">
<a href="../app_dev/ewpData/module_data.html">
<i class="fa fa-check"></i>
<b>5.3.</b>
MODULE
</a>
<ul class="articles">
<li class="chapter " data-level="5.3.1" data-path="app_dev/ewpData/simple_session.html">
<a href="../app_dev/ewpData/simple_session.html">
<i class="fa fa-check"></i>
<b>5.3.1.</b>
Session
</a>
</li>
<li class="chapter " data-level="5.3.2" data-path="app_dev/ewpData/database.html">
<a href="../app_dev/ewpData/database.html">
<i class="fa fa-check"></i>
<b>5.3.2.</b>
</a>
</li>
<li class="chapter " data-level="5.3.3" data-path="app_dev/ewpData/other_service.html">
<a href="../app_dev/ewpData/other_service.html">
<i class="fa fa-check"></i>
<b>5.3.3.</b>
Service
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.4" data-path="app_dev/pageData/page_data.html">
<a href="../app_dev/pageData/page_data.html">
<i class="fa fa-check"></i>
<b>5.4.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="5.4.1" data-path="app_dev/pageData/from_module.html">
<a href="../app_dev/pageData/from_module.html">
<i class="fa fa-check"></i>
<b>5.4.1.</b>
MODULE
</a>
</li>
<li class="chapter " data-level="5.4.2" data-path="app_dev/pageData/page_to_page.html">
<a href="../app_dev/pageData/page_to_page.html">
<i class="fa fa-check"></i>
<b>5.4.2.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.5" data-path="app_dev/mul_example/Introduction.html">
<a href="../app_dev/mul_example/Introduction.html">
<i class="fa fa-check"></i>
<b>5.5.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="6" data-path="deepin_app_dev/Introduction.html">
<a href="../deepin_app_dev/Introduction.html">
<i class="fa fa-check"></i>
<b>6.</b>
APP
</a>
<ul class="articles">
<li class="chapter " data-level="6.1" data-path="deepin_app_dev/<API key>/Introduction.html">
<a href="../deepin_app_dev/<API key>/Introduction.html">
<i class="fa fa-check"></i>
<b>6.1.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="6.1.1" data-path="deepin_app_dev/<API key>/<API key>.html">
<a href="../deepin_app_dev/<API key>/<API key>.html">
<i class="fa fa-check"></i>
<b>6.1.1.</b>
</a>
</li>
<li class="chapter " data-level="6.1.2" >
<span><b>6.1.2.</b> </span>
<ul class="articles">
<li class="chapter " data-level="6.1.2.1" data-path="deepin_app_dev/<API key>/<API key>.html">
<a href="../deepin_app_dev/<API key>/<API key>.html">
<i class="fa fa-check"></i>
<b>6.1.2.1.</b>
</a>
</li>
<li class="chapter " data-level="6.1.2.2" data-path="deepin_app_dev/<API key>/<API key>.html">
<a href="../deepin_app_dev/<API key>/<API key>.html">
<i class="fa fa-check"></i>
<b>6.1.2.2.</b>
</a>
</li>
<li class="chapter " data-level="6.1.2.3" data-path="deepin_app_dev/<API key>/<API key>.html">
<a href="../deepin_app_dev/<API key>/<API key>.html">
<i class="fa fa-check"></i>
<b>6.1.2.3.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="6.1.3" >
<span><b>6.1.3.</b> atom</span>
<ul class="articles">
<li class="chapter " data-level="6.1.3.1" data-path="dev_book/create_channel/create_channel.html">
<a href="../dev_book/create_channel/create_channel.html">
<i class="fa fa-check"></i>
<b>6.1.3.1.</b>
channel
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="6.1.4" data-path="deepin_app_dev/channel_page/Introduction.html">
<a href="../deepin_app_dev/channel_page/Introduction.html">
<i class="fa fa-check"></i>
<b>6.1.4.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="6.1.4.1" data-path="dev_book/lua_fun/jump.html">
<a href="../dev_book/lua_fun/jump.html">
<i class="fa fa-check"></i>
<b>6.1.4.1.</b>
</a>
</li>
<li class="chapter " data-level="6.1.4.2" data-path="dev_book/lua_fun/public_fun.html">
<a href="../dev_book/lua_fun/public_fun.html">
<i class="fa fa-check"></i>
<b>6.1.4.2.</b>
</a>
</li>
<li class="chapter " data-level="6.1.4.3" data-path="dev_book/page_dev/add_basic_common.html">
<a href="../dev_book/page_dev/add_basic_common.html">
<i class="fa fa-check"></i>
<b>6.1.4.3.</b>
</a>
</li>
<li class="chapter " data-level="6.1.4.4" data-path="deepin_app_dev/channel_page/<API key>.html">
<a href="../deepin_app_dev/channel_page/<API key>.html">
<i class="fa fa-check"></i>
<b>6.1.4.4.</b>
</a>
</li>
<li class="chapter " data-level="6.1.4.5" data-path="deepin_app_dev/channel_page/channel_lua_develop.html">
<a href="../deepin_app_dev/channel_page/channel_lua_develop.html">
<i class="fa fa-check"></i>
<b>6.1.4.5.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="6.1.5" data-path="dev_book/debug/Introduction.html">
<a href="../dev_book/debug/Introduction.html">
<i class="fa fa-check"></i>
<b>6.1.5.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="6.1.5.1" data-path="dev_book/debug/debug.html">
<a href="../dev_book/debug/debug.html">
<i class="fa fa-check"></i>
<b>6.1.5.1.</b>
</a>
</li>
<li class="chapter " data-level="6.1.5.2" data-path="dev_book/debug/log.html">
<a href="../dev_book/debug/log.html">
<i class="fa fa-check"></i>
<b>6.1.5.2.</b>
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="7" data-path="deepin_app_dev/<API key>/Introduction.html">
<a href="../deepin_app_dev/<API key>/Introduction.html">
<i class="fa fa-check"></i>
<b>7.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="7.1" data-path="deepin_app_dev/<API key>/folder_introduction.html">
<a href="../deepin_app_dev/<API key>/folder_introduction.html">
<i class="fa fa-check"></i>
<b>7.1.</b>
</a>
</li>
<li class="chapter " data-level="7.2" data-path="deepin_app_dev/<API key>/page_dev.html">
<a href="../deepin_app_dev/<API key>/page_dev.html">
<i class="fa fa-check"></i>
<b>7.2.</b>
</a>
</li>
<li class="chapter " data-level="7.3" data-path="deepin_app_dev/<API key>/pack.html">
<a href="../deepin_app_dev/<API key>/pack.html">
<i class="fa fa-check"></i>
<b>7.3.</b>
</a>
</li>
<li class="chapter " data-level="7.4" data-path="deepin_app_dev/<API key>/upload.html">
<a href="../deepin_app_dev/<API key>/upload.html">
<i class="fa fa-check"></i>
<b>7.4.</b>
</a>
</li>
<li class="chapter " data-level="7.5" data-path="deepin_app_dev/<API key>/run_and_verify.html">
<a href="../deepin_app_dev/<API key>/run_and_verify.html">
<i class="fa fa-check"></i>
<b>7.5.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="8" >
<span><b>8.</b> Module</span>
<ul class="articles">
<li class="chapter " data-level="8.1" data-path="app_dev/module/module_dev.html">
<a href="../app_dev/module/module_dev.html">
<i class="fa fa-check"></i>
<b>8.1.</b>
EWP MODULE
</a>
<ul class="articles">
<li class="chapter " data-level="8.1.1" data-path="app_dev/module/module_function.html">
<a href="../app_dev/module/module_function.html">
<i class="fa fa-check"></i>
<b>8.1.1.</b>
Module
</a>
</li>
<li class="chapter " data-level="8.1.2" data-path="app_dev/module/module_compose.html">
<a href="../app_dev/module/module_compose.html">
<i class="fa fa-check"></i>
<b>8.1.2.</b>
Module
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="8.2" data-path="app_dev/ewpData/module_data.html">
<a href="../app_dev/ewpData/module_data.html">
<i class="fa fa-check"></i>
<b>8.2.</b>
MODULE
</a>
<ul class="articles">
<li class="chapter " data-level="8.2.1" data-path="app_dev/ewpData/simple_session.html">
<a href="../app_dev/ewpData/simple_session.html">
<i class="fa fa-check"></i>
<b>8.2.1.</b>
Session
</a>
</li>
<li class="chapter " data-level="8.2.2" data-path="app_dev/ewpData/database.html">
<a href="../app_dev/ewpData/database.html">
<i class="fa fa-check"></i>
<b>8.2.2.</b>
</a>
</li>
<li class="chapter " data-level="8.2.3" data-path="app_dev/ewpData/other_service.html">
<a href="../app_dev/ewpData/other_service.html">
<i class="fa fa-check"></i>
<b>8.2.3.</b>
Service
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="9" data-path="deepin_app_dev/Introduction.html">
<a href="../deepin_app_dev/Introduction.html">
<i class="fa fa-check"></i>
<b>9.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="9.1" data-path="deepin_app_dev/adapter/Introduction.html">
<a href="../deepin_app_dev/adapter/Introduction.html">
<i class="fa fa-check"></i>
<b>9.1.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="9.1.1" data-path="deepin_app_dev/adapter/adapter.html">
<a href="../deepin_app_dev/adapter/adapter.html">
<i class="fa fa-check"></i>
<b>9.1.1.</b>
</a>
</li>
<li class="chapter " data-level="9.1.2" data-path="deepin_app_dev/adapter/deploy_adapter.html">
<a href="../deepin_app_dev/adapter/deploy_adapter.html">
<i class="fa fa-check"></i>
<b>9.1.2.</b>
</a>
</li>
<li class="chapter " data-level="9.1.3" data-path="deepin_app_dev/adapter/<API key>.html">
<a href="../deepin_app_dev/adapter/<API key>.html">
<i class="fa fa-check"></i>
<b>9.1.3.</b>
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="10" data-path="deepin_app_dev/interface/Introduction.html">
<a href="../deepin_app_dev/interface/Introduction.html">
<i class="fa fa-check"></i>
<b>10.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="10.1" data-path="deepin_app_dev/interface/<API key>.html">
<a href="../deepin_app_dev/interface/<API key>.html">
<i class="fa fa-check"></i>
<b>10.1.</b>
Web
</a>
<ul class="articles">
<li class="chapter " data-level="10.1.1" data-path="deepin_app_dev/interface/<API key>.html">
<a href="../deepin_app_dev/interface/<API key>.html">
<i class="fa fa-check"></i>
<b>10.1.1.</b>
Web
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="10.2" data-path="deepin_app_dev/interface/<API key>.html">
<a href="../deepin_app_dev/interface/<API key>.html">
<i class="fa fa-check"></i>
<b>10.2.</b>
Callback
</a>
<ul class="articles">
<li class="chapter " data-level="10.2.1" data-path="deepin_app_dev/interface/<API key>.html">
<a href="../deepin_app_dev/interface/<API key>.html">
<i class="fa fa-check"></i>
<b>10.2.1.</b>
Callback
</a>
</li>
<li class="chapter " data-level="10.2.2" data-path="deepin_app_dev/interface/<API key>.html">
<a href="../deepin_app_dev/interface/<API key>.html">
<i class="fa fa-check"></i>
<b>10.2.2.</b>
EWP Callback
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="11" data-path="code_standard/code_standard.html">
<a href="../code_standard/code_standard.html">
<i class="fa fa-check"></i>
<b>11.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="11.1" data-path="code_standard/erlang_standard.html">
<a href="../code_standard/erlang_standard.html">
<i class="fa fa-check"></i>
<b>11.1.</b>
Erlang
</a>
</li>
<li class="chapter " data-level="11.2" data-path="code_standard/xhtml_standard.html">
<a href="../code_standard/xhtml_standard.html">
<i class="fa fa-check"></i>
<b>11.2.</b>
Xhtml
</a>
</li>
<li class="chapter " data-level="11.3" data-path="code_standard/css_standard.html">
<a href="../code_standard/css_standard.html">
<i class="fa fa-check"></i>
<b>11.3.</b>
CSS
</a>
</li>
<li class="chapter " data-level="11.4" data-path="code_standard/lua_standard.html">
<a href="../code_standard/lua_standard.html">
<i class="fa fa-check"></i>
<b>11.4.</b>
Lua
</a>
</li>
<li class="chapter " data-level="11.5" data-path="code_standard/lua_include.html">
<a href="../code_standard/lua_include.html">
<i class="fa fa-check"></i>
<b>11.5.</b>
</a>
</li>
<li class="chapter " data-level="11.6" data-path="code_standard/basic_tag_standard.html">
<a href="../code_standard/basic_tag_standard.html">
<i class="fa fa-check"></i>
<b>11.6.</b>
</a>
</li>
<li class="chapter " data-level="11.7" data-path="code_standard/public_tag_standard.html">
<a href="../code_standard/public_tag_standard.html">
<i class="fa fa-check"></i>
<b>11.7.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="12" data-path="dev_book/add_tag/Introduction.html">
<a href="../dev_book/add_tag/Introduction.html">
<i class="fa fa-check"></i>
<b>12.</b>
</a>
<ul class="articles">
<li class="chapter " data-level="12.1" data-path="dev_book/add_tag/basic_ui.html">
<a href="../dev_book/add_tag/basic_ui.html">
<i class="fa fa-check"></i>
<b>12.1.</b>
</a>
</li>
<li class="chapter " data-level="12.2" data-path="dev_book/add_tag/public_ui.html">
<a href="../dev_book/add_tag/public_ui.html">
<i class="fa fa-check"></i>
<b>12.2.</b>
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="13" data-path="common_problem/FAQ.html">
<a href="../common_problem/FAQ.html">
<i class="fa fa-check"></i>
<b>13.</b>
</a>
</li>
<li class="chapter " data-level="14" data-path="senior_topical/Introduction.html">
<a href="../senior_topical/Introduction.html">
<i class="fa fa-check"></i>
<b>14.</b>
EWP
</a>
<ul class="articles">
<li class="chapter " data-level="14.1" data-path="senior_topical/Session.html">
<a href="../senior_topical/Session.html">
<i class="fa fa-check"></i>
<b>14.1.</b>
SESSION
</a>
</li>
<li class="chapter " data-level="14.2" data-path="senior_topical/SessionShared.html">
<a href="../senior_topical/SessionShared.html">
<i class="fa fa-check"></i>
<b>14.2.</b>
SESSION
</a>
</li>
<li class="chapter " data-level="14.3" data-path="senior_topical/Push.html">
<a href="../senior_topical/Push.html">
<i class="fa fa-check"></i>
<b>14.3.</b>
</a>
</li>
<li class="chapter " data-level="14.4" data-path="senior_topical/error_code_service.html">
<a href="../senior_topical/error_code_service.html">
<i class="fa fa-check"></i>
<b>14.4.</b>
</a>
</li>
<li class="chapter " data-level="14.5" data-path="senior_topical/data_store.html">
<a href="../senior_topical/data_store.html">
<i class="fa fa-check"></i>
<b>14.5.</b>
</a>
</li>
<li class="chapter " data-level="14.6" data-path="senior_topical/OfflineStore.html">
<a href="../senior_topical/OfflineStore.html">
<i class="fa fa-check"></i>
<b>14.6.</b>
</a>
</li>
<li class="chapter " data-level="14.7" data-path="senior_topical/<API key>.html">
<a href="../senior_topical/<API key>.html">
<i class="fa fa-check"></i>
<b>14.7.</b>
</a>
</li>
<li class="chapter " data-level="14.8" data-path="senior_topical/py_resource_up_down.html">
<a href="../senior_topical/py_resource_up_down.html">
<i class="fa fa-check"></i>
<b>14.8.</b>
</a>
</li>
<li class="chapter " data-level="14.9" data-path="senior_topical/offline_resource.html">
<a href="../senior_topical/offline_resource.html">
<i class="fa fa-check"></i>
<b>14.9.</b>
</a>
</li>
<li class="chapter " data-level="14.10" data-path="senior_topical/preset_resource.html">
<a href="../senior_topical/preset_resource.html">
<i class="fa fa-check"></i>
<b>14.10.</b>
</a>
</li>
<li class="chapter " data-level="14.11" data-path="senior_topical/Database.html">
<a href="../senior_topical/Database.html">
<i class="fa fa-check"></i>
<b>14.11.</b>
</a>
</li>
</ul>
</li>
<li class="divider"></li>
<li>
<a href="http:
</li>
</ul>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header">
<!-- Actions Left -->
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
<a href="#" class="btn pull-left toggle-search" aria-label="Toggle search"><i class="fa fa-search"></i></a>
<div id="<API key>" class="dropdown pull-left">
<a href="#" class="btn toggle-dropdown" aria-label="Toggle font settings"><i class="fa fa-font"></i>
</a>
<div class="dropdown-menu font-settings">
<div class="dropdown-caret">
<span class="caret-outer"></span>
<span class="caret-inner"></span>
</div>
<div class="buttons">
<button type="button" id="reduce-font-size" class="button size-2">A</button>
<button type="button" id="enlarge-font-size" class="button size-2">A</button>
</div>
<div class="buttons font-family-list">
<button type="button" data-font="0" class="button">Serif</button>
<button type="button" data-font="1" class="button">Sans</button>
</div>
<div class="buttons color-theme-list">
<button type="button" id="<API key>" class="button size-3" data-theme="0">White</button>
<button type="button" id="<API key>" class="button size-3" data-theme="1">Sepia</button>
<button type="button" id="<API key>" class="button size-3" data-theme="2">Night</button>
</div>
</div>
</div>
<!-- Actions Right -->
<div class="dropdown pull-right">
<a href="#" class="btn toggle-dropdown" aria-label="Toggle share dropdown"></a>
<div class="dropdown-menu font-settings dropdown-left">
<div class="dropdown-caret">
<span class="caret-outer"></span>
<span class="caret-inner"></span>
</div>
<div class="buttons">
<a href="/emp/get_started/get_started.zip" class="button">html</a>
<a href="/emp/get_started/book.pdf" class="button">pdf</a>
<a href="" class="button">epub</a>
</div>
</div>
</div>
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="../" >EMP</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1">
<div class="page-inner">
<section class="normal" id="section-gitbook_81">
<h1 id=""></h1>
<!-- toc -->
<!-- toc stop -->
<ul>
<li><p>EMP (Enterpries Mobile Platform) </p>
<p> EMP</p>
</li>
<li><p>Yaws (Yet another web server) </p>
<p> YawsErlangErlang</p>
</li>
<li><p>EWP (Erlang Web Service Platform) </p>
<p> EWPyawsweb,APP</p>
</li>
<li><p>ERT (EMP Client Runtime) </p>
<p> ERTiOSAndroidWindows PhonePCQT</p>
</li>
</ul>
</section>
</div>
</div>
</div>
<a href="../overview/Introduction.html" class="navigation navigation-prev " aria-label="Previous page: EMP"><i class="fa fa-angle-left"></i></a>
<a href="../overview/EMPIntroduce.html" class="navigation navigation-next " aria-label="Next page: EMP "><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="../gitbook/app.js"></script>
<script>
require(["gitbook"], function(gitbook) {
var config = {"fontSettings":{"theme":null,"family":"sans","size":2}};
gitbook.start(config);
});
</script>
</body>
</html>
|
Retrieves the original email in a thread, including headers and attachments, when the reporting user forwarded the original email not as an attachment.
You must have the necessary permissions in your email service to execute global search.
- EWS: eDiscovery
- Gmail: Google Apps Domain-Wide Delegation of Authority
## Dependencies
This playbook uses the following sub-playbooks, integrations, and scripts.
Sub-playbooks
* Get Original Message - Gmail
* Get Original Email - EWS
Integrations
This playbook does not use any integrations.
Scripts
This playbook does not use any scripts.
Commands
This playbook does not use any commands.
## Playbook Inputs
There are no inputs for this playbook.
## Playbook Outputs
| **Path** | **Description** | **Type** |
|
| Email | The email object. | unknown |
| File | The original attachments. | unknown |
| Email.To | The recipient of the email. | string |
| Email.From | The sender of the email. | string |
| Email.CC | The CC address of the email. | string |
| Email.BCC | The BCC address of the email. | string |
| Email.HTML | The email HTML. | string |
| Email.Body | The email text body. | string |
| Email.Headers | The email headers. | unknown |
| Email.Subject | The email subject. | string |
## Playbook Image

|
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM8 17c-.55 0-1-.45-1-1v-5c0-.55.45-1 1-1s1 .45 1 1v5c0 .55-.45 1-1 1zm4 0c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1zm4 0c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1z"
}), 'AssessmentRounded');
|
html {
font-family: sans-serif;
-<API key>: 100%;
-ms-text-size-adjust: 100%;
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
margin: .67em 0;
font-size: 2em;
}
mark {
color: #000;
background: #ff0;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sup {
top: -.5em;
}
sub {
bottom: -.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
height: 0;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
margin: 0;
font: inherit;
color: inherit;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
padding: 0;
border: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-<API key>,
input[type="number"]::-<API key> {
height: auto;
}
input[type="search"] {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-appearance: textfield;
}
input[type="search"]::-<API key>,
input[type="search"]::-<API key> {
-webkit-appearance: none;
}
fieldset {
padding: .35em .625em .75em;
margin: 0 2px;
border: 1px solid #c0c0c0;
}
legend {
padding: 0;
border: 0;
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
td,
th {
padding: 0;
}
@media print {
*,
*:before,
*:after {
color: #000 !important;
text-shadow: none !important;
background: transparent !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
.navbar {
display: none;
}
.btn > .caret,
.dropup > .btn > .caret {
border-top-color: #000 !important;
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
}
.table td,
.table th {
background-color: #fff !important;
}
.table-bordered th,
.table-bordered td {
border: 1px solid #ddd !important;
}
}
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/<API key>.eot');
src: url('../fonts/<API key>.eot?#iefix') format('embedded-opentype'), url('../fonts/<API key>.woff2') format('woff2'), url('../fonts/<API key>.woff') format('woff'), url('../fonts/<API key>.ttf') format('truetype'), url('../fonts/<API key>.svg#<API key>') format('svg');
}
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-<API key>: antialiased;
-<API key>: grayscale;
}
.glyphicon-asterisk:before {
content: "\2a";
}
.glyphicon-plus:before {
content: "\2b";
}
.glyphicon-euro:before,
.glyphicon-eur:before {
content: "\20ac";
}
.glyphicon-minus:before {
content: "\2212";
}
.glyphicon-cloud:before {
content: "\2601";
}
.glyphicon-envelope:before {
content: "\2709";
}
.glyphicon-pencil:before {
content: "\270f";
}
.glyphicon-glass:before {
content: "\e001";
}
.glyphicon-music:before {
content: "\e002";
}
.glyphicon-search:before {
content: "\e003";
}
.glyphicon-heart:before {
content: "\e005";
}
.glyphicon-star:before {
content: "\e006";
}
.<API key>:before {
content: "\e007";
}
.glyphicon-user:before {
content: "\e008";
}
.glyphicon-film:before {
content: "\e009";
}
.glyphicon-th-large:before {
content: "\e010";
}
.glyphicon-th:before {
content: "\e011";
}
.glyphicon-th-list:before {
content: "\e012";
}
.glyphicon-ok:before {
content: "\e013";
}
.glyphicon-remove:before {
content: "\e014";
}
.glyphicon-zoom-in:before {
content: "\e015";
}
.glyphicon-zoom-out:before {
content: "\e016";
}
.glyphicon-off:before {
content: "\e017";
}
.glyphicon-signal:before {
content: "\e018";
}
.glyphicon-cog:before {
content: "\e019";
}
.glyphicon-trash:before {
content: "\e020";
}
.glyphicon-home:before {
content: "\e021";
}
.glyphicon-file:before {
content: "\e022";
}
.glyphicon-time:before {
content: "\e023";
}
.glyphicon-road:before {
content: "\e024";
}
.<API key>:before {
content: "\e025";
}
.glyphicon-download:before {
content: "\e026";
}
.glyphicon-upload:before {
content: "\e027";
}
.glyphicon-inbox:before {
content: "\e028";
}
.<API key>:before {
content: "\e029";
}
.glyphicon-repeat:before {
content: "\e030";
}
.glyphicon-refresh:before {
content: "\e031";
}
.glyphicon-list-alt:before {
content: "\e032";
}
.glyphicon-lock:before {
content: "\e033";
}
.glyphicon-flag:before {
content: "\e034";
}
.<API key>:before {
content: "\e035";
}
.<API key>:before {
content: "\e036";
}
.<API key>:before {
content: "\e037";
}
.glyphicon-volume-up:before {
content: "\e038";
}
.glyphicon-qrcode:before {
content: "\e039";
}
.glyphicon-barcode:before {
content: "\e040";
}
.glyphicon-tag:before {
content: "\e041";
}
.glyphicon-tags:before {
content: "\e042";
}
.glyphicon-book:before {
content: "\e043";
}
.glyphicon-bookmark:before {
content: "\e044";
}
.glyphicon-print:before {
content: "\e045";
}
.glyphicon-camera:before {
content: "\e046";
}
.glyphicon-font:before {
content: "\e047";
}
.glyphicon-bold:before {
content: "\e048";
}
.glyphicon-italic:before {
content: "\e049";
}
.<API key>:before {
content: "\e050";
}
.<API key>:before {
content: "\e051";
}
.<API key>:before {
content: "\e052";
}
.<API key>:before {
content: "\e053";
}
.<API key>:before {
content: "\e054";
}
.<API key>:before {
content: "\e055";
}
.glyphicon-list:before {
content: "\e056";
}
.<API key>:before {
content: "\e057";
}
.<API key>:before {
content: "\e058";
}
.<API key>:before {
content: "\e059";
}
.glyphicon-picture:before {
content: "\e060";
}
.<API key>:before {
content: "\e062";
}
.glyphicon-adjust:before {
content: "\e063";
}
.glyphicon-tint:before {
content: "\e064";
}
.glyphicon-edit:before {
content: "\e065";
}
.glyphicon-share:before {
content: "\e066";
}
.glyphicon-check:before {
content: "\e067";
}
.glyphicon-move:before {
content: "\e068";
}
.<API key>:before {
content: "\e069";
}
.<API key>:before {
content: "\e070";
}
.glyphicon-backward:before {
content: "\e071";
}
.glyphicon-play:before {
content: "\e072";
}
.glyphicon-pause:before {
content: "\e073";
}
.glyphicon-stop:before {
content: "\e074";
}
.glyphicon-forward:before {
content: "\e075";
}
.<API key>:before {
content: "\e076";
}
.<API key>:before {
content: "\e077";
}
.glyphicon-eject:before {
content: "\e078";
}
.<API key>:before {
content: "\e079";
}
.<API key>:before {
content: "\e080";
}
.glyphicon-plus-sign:before {
content: "\e081";
}
.<API key>:before {
content: "\e082";
}
.<API key>:before {
content: "\e083";
}
.glyphicon-ok-sign:before {
content: "\e084";
}
.<API key>:before {
content: "\e085";
}
.glyphicon-info-sign:before {
content: "\e086";
}
.<API key>:before {
content: "\e087";
}
.<API key>:before {
content: "\e088";
}
.glyphicon-ok-circle:before {
content: "\e089";
}
.<API key>:before {
content: "\e090";
}
.<API key>:before {
content: "\e091";
}
.<API key>:before {
content: "\e092";
}
.glyphicon-arrow-up:before {
content: "\e093";
}
.<API key>:before {
content: "\e094";
}
.glyphicon-share-alt:before {
content: "\e095";
}
.<API key>:before {
content: "\e096";
}
.<API key>:before {
content: "\e097";
}
.<API key>:before {
content: "\e101";
}
.glyphicon-gift:before {
content: "\e102";
}
.glyphicon-leaf:before {
content: "\e103";
}
.glyphicon-fire:before {
content: "\e104";
}
.glyphicon-eye-open:before {
content: "\e105";
}
.glyphicon-eye-close:before {
content: "\e106";
}
.<API key>:before {
content: "\e107";
}
.glyphicon-plane:before {
content: "\e108";
}
.glyphicon-calendar:before {
content: "\e109";
}
.glyphicon-random:before {
content: "\e110";
}
.glyphicon-comment:before {
content: "\e111";
}
.glyphicon-magnet:before {
content: "\e112";
}
.<API key>:before {
content: "\e113";
}
.<API key>:before {
content: "\e114";
}
.glyphicon-retweet:before {
content: "\e115";
}
.<API key>:before {
content: "\e116";
}
.<API key>:before {
content: "\e117";
}
.<API key>:before {
content: "\e118";
}
.<API key>:before {
content: "\e119";
}
.<API key>:before {
content: "\e120";
}
.glyphicon-hdd:before {
content: "\e121";
}
.glyphicon-bullhorn:before {
content: "\e122";
}
.glyphicon-bell:before {
content: "\e123";
}
.<API key>:before {
content: "\e124";
}
.glyphicon-thumbs-up:before {
content: "\e125";
}
.<API key>:before {
content: "\e126";
}
.<API key>:before {
content: "\e127";
}
.glyphicon-hand-left:before {
content: "\e128";
}
.glyphicon-hand-up:before {
content: "\e129";
}
.glyphicon-hand-down:before {
content: "\e130";
}
.<API key>:before {
content: "\e131";
}
.<API key>:before {
content: "\e132";
}
.<API key>:before {
content: "\e133";
}
.<API key>:before {
content: "\e134";
}
.glyphicon-globe:before {
content: "\e135";
}
.glyphicon-wrench:before {
content: "\e136";
}
.glyphicon-tasks:before {
content: "\e137";
}
.glyphicon-filter:before {
content: "\e138";
}
.glyphicon-briefcase:before {
content: "\e139";
}
.<API key>:before {
content: "\e140";
}
.glyphicon-dashboard:before {
content: "\e141";
}
.glyphicon-paperclip:before {
content: "\e142";
}
.<API key>:before {
content: "\e143";
}
.glyphicon-link:before {
content: "\e144";
}
.glyphicon-phone:before {
content: "\e145";
}
.glyphicon-pushpin:before {
content: "\e146";
}
.glyphicon-usd:before {
content: "\e148";
}
.glyphicon-gbp:before {
content: "\e149";
}
.glyphicon-sort:before {
content: "\e150";
}
.<API key>:before {
content: "\e151";
}
.<API key>:before {
content: "\e152";
}
.<API key>:before {
content: "\e153";
}
.<API key>:before {
content: "\e154";
}
.<API key>:before {
content: "\e155";
}
.<API key>:before {
content: "\e156";
}
.glyphicon-unchecked:before {
content: "\e157";
}
.glyphicon-expand:before {
content: "\e158";
}
.<API key>:before {
content: "\e159";
}
.<API key>:before {
content: "\e160";
}
.glyphicon-log-in:before {
content: "\e161";
}
.glyphicon-flash:before {
content: "\e162";
}
.glyphicon-log-out:before {
content: "\e163";
}
.<API key>:before {
content: "\e164";
}
.glyphicon-record:before {
content: "\e165";
}
.glyphicon-save:before {
content: "\e166";
}
.glyphicon-open:before {
content: "\e167";
}
.glyphicon-saved:before {
content: "\e168";
}
.glyphicon-import:before {
content: "\e169";
}
.glyphicon-export:before {
content: "\e170";
}
.glyphicon-send:before {
content: "\e171";
}
.<API key>:before {
content: "\e172";
}
.<API key>:before {
content: "\e173";
}
.<API key>:before {
content: "\e174";
}
.<API key>:before {
content: "\e175";
}
.<API key>:before {
content: "\e176";
}
.<API key>:before {
content: "\e177";
}
.glyphicon-transfer:before {
content: "\e178";
}
.glyphicon-cutlery:before {
content: "\e179";
}
.glyphicon-header:before {
content: "\e180";
}
.<API key>:before {
content: "\e181";
}
.glyphicon-earphone:before {
content: "\e182";
}
.glyphicon-phone-alt:before {
content: "\e183";
}
.glyphicon-tower:before {
content: "\e184";
}
.glyphicon-stats:before {
content: "\e185";
}
.glyphicon-sd-video:before {
content: "\e186";
}
.glyphicon-hd-video:before {
content: "\e187";
}
.glyphicon-subtitles:before {
content: "\e188";
}
.<API key>:before {
content: "\e189";
}
.<API key>:before {
content: "\e190";
}
.glyphicon-sound-5-1:before {
content: "\e191";
}
.glyphicon-sound-6-1:before {
content: "\e192";
}
.glyphicon-sound-7-1:before {
content: "\e193";
}
.<API key>:before {
content: "\e194";
}
.<API key>:before {
content: "\e195";
}
.<API key>:before {
content: "\e197";
}
.<API key>:before {
content: "\e198";
}
.<API key>:before {
content: "\e199";
}
.<API key>:before {
content: "\e200";
}
.glyphicon-cd:before {
content: "\e201";
}
.glyphicon-save-file:before {
content: "\e202";
}
.glyphicon-open-file:before {
content: "\e203";
}
.glyphicon-level-up:before {
content: "\e204";
}
.glyphicon-copy:before {
content: "\e205";
}
.glyphicon-paste:before {
content: "\e206";
}
.glyphicon-alert:before {
content: "\e209";
}
.glyphicon-equalizer:before {
content: "\e210";
}
.glyphicon-king:before {
content: "\e211";
}
.glyphicon-queen:before {
content: "\e212";
}
.glyphicon-pawn:before {
content: "\e213";
}
.glyphicon-bishop:before {
content: "\e214";
}
.glyphicon-knight:before {
content: "\e215";
}
.<API key>:before {
content: "\e216";
}
.glyphicon-tent:before {
content: "\26fa";
}
.<API key>:before {
content: "\e218";
}
.glyphicon-bed:before {
content: "\e219";
}
.glyphicon-apple:before {
content: "\f8ff";
}
.glyphicon-erase:before {
content: "\e221";
}
.glyphicon-hourglass:before {
content: "\231b";
}
.glyphicon-lamp:before {
content: "\e223";
}
.glyphicon-duplicate:before {
content: "\e224";
}
.<API key>:before {
content: "\e225";
}
.glyphicon-scissors:before {
content: "\e226";
}
.glyphicon-bitcoin:before {
content: "\e227";
}
.glyphicon-btc:before {
content: "\e227";
}
.glyphicon-xbt:before {
content: "\e227";
}
.glyphicon-yen:before {
content: "\00a5";
}
.glyphicon-jpy:before {
content: "\00a5";
}
.glyphicon-ruble:before {
content: "\20bd";
}
.glyphicon-rub:before {
content: "\20bd";
}
.glyphicon-scale:before {
content: "\e230";
}
.glyphicon-ice-lolly:before {
content: "\e231";
}
.<API key>:before {
content: "\e232";
}
.glyphicon-education:before {
content: "\e233";
}
.<API key>:before {
content: "\e234";
}
.<API key>:before {
content: "\e235";
}
.<API key>:before {
content: "\e236";
}
.<API key>:before {
content: "\e237";
}
.glyphicon-oil:before {
content: "\e238";
}
.glyphicon-grain:before {
content: "\e239";
}
.<API key>:before {
content: "\e240";
}
.glyphicon-text-size:before {
content: "\e241";
}
.<API key>:before {
content: "\e242";
}
.<API key>:before {
content: "\e243";
}
.<API key>:before {
content: "\e244";
}
.<API key>:before {
content: "\e245";
}
.<API key>:before {
content: "\e246";
}
.<API key>:before {
content: "\e247";
}
.<API key>:before {
content: "\e248";
}
.<API key>:before {
content: "\e249";
}
.<API key>:before {
content: "\e250";
}
.<API key>:before {
content: "\e251";
}
.<API key>:before {
content: "\e252";
}
.<API key>:before {
content: "\e253";
}
.glyphicon-console:before {
content: "\e254";
}
.<API key>:before {
content: "\e255";
}
.glyphicon-subscript:before {
content: "\e256";
}
.glyphicon-menu-left:before {
content: "\e257";
}
.<API key>:before {
content: "\e258";
}
.glyphicon-menu-down:before {
content: "\e259";
}
.glyphicon-menu-up:before {
content: "\e260";
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 10px;
-<API key>: rgba(0, 0, 0, 0);
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
}
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a {
color: #337ab7;
text-decoration: none;
}
a:hover,
a:focus {
color: #23527c;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -<API key>;
outline-offset: -2px;
}
figure {
margin: 0;
}
img {
vertical-align: middle;
}
.img-responsive,
.thumbnail > img,
.thumbnail a > img,
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
display: block;
max-width: 100%;
height: auto;
}
.img-rounded {
border-radius: 6px;
}
.img-thumbnail {
display: inline-block;
max-width: 100%;
height: auto;
padding: 4px;
line-height: 1.42857143;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
-webkit-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
.img-circle {
border-radius: 50%;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
[role="button"] {
cursor: pointer;
}
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
}
h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small,
.h1 small,
.h2 small,
.h3 small,
.h4 small,
.h5 small,
.h6 small,
h1 .small,
h2 .small,
h3 .small,
h4 .small,
h5 .small,
h6 .small,
.h1 .small,
.h2 .small,
.h3 .small,
.h4 .small,
.h5 .small,
.h6 .small {
font-weight: normal;
line-height: 1;
color: #777;
}
h1,
.h1,
h2,
.h2,
h3,
.h3 {
margin-top: 20px;
margin-bottom: 10px;
}
h1 small,
.h1 small,
h2 small,
.h2 small,
h3 small,
.h3 small,
h1 .small,
.h1 .small,
h2 .small,
.h2 .small,
h3 .small,
.h3 .small {
font-size: 65%;
}
h4,
.h4,
h5,
.h5,
h6,
.h6 {
margin-top: 10px;
margin-bottom: 10px;
}
h4 small,
.h4 small,
h5 small,
.h5 small,
h6 small,
.h6 small,
h4 .small,
.h4 .small,
h5 .small,
.h5 .small,
h6 .small,
.h6 .small {
font-size: 75%;
}
h1,
.h1 {
font-size: 36px;
}
h2,
.h2 {
font-size: 30px;
}
h3,
.h3 {
font-size: 24px;
}
h4,
.h4 {
font-size: 18px;
}
h5,
.h5 {
font-size: 14px;
}
h6,
.h6 {
font-size: 12px;
}
p {
margin: 0 0 10px;
}
.lead {
margin-bottom: 20px;
font-size: 16px;
font-weight: 300;
line-height: 1.4;
}
@media (min-width: 768px) {
.lead {
font-size: 21px;
}
}
small,
.small {
font-size: 85%;
}
mark,
.mark {
padding: .2em;
background-color: #fcf8e3;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.text-justify {
text-align: justify;
}
.text-nowrap {
white-space: nowrap;
}
.text-lowercase {
text-transform: lowercase;
}
.text-uppercase {
text-transform: uppercase;
}
.text-capitalize {
text-transform: capitalize;
}
.text-muted {
color: #777;
}
.text-primary {
color: #337ab7;
}
a.text-primary:hover,
a.text-primary:focus {
color: #286090;
}
.text-success {
color: #3c763d;
}
a.text-success:hover,
a.text-success:focus {
color: #2b542c;
}
.text-info {
color: #31708f;
}
a.text-info:hover,
a.text-info:focus {
color: #245269;
}
.text-warning {
color: #8a6d3b;
}
a.text-warning:hover,
a.text-warning:focus {
color: #66512c;
}
.text-danger {
color: #a94442;
}
a.text-danger:hover,
a.text-danger:focus {
color: #843534;
}
.bg-primary {
color: #fff;
background-color: #337ab7;
}
a.bg-primary:hover,
a.bg-primary:focus {
background-color: #286090;
}
.bg-success {
background-color: #dff0d8;
}
a.bg-success:hover,
a.bg-success:focus {
background-color: #c1e2b3;
}
.bg-info {
background-color: #d9edf7;
}
a.bg-info:hover,
a.bg-info:focus {
background-color: #afd9ee;
}
.bg-warning {
background-color: #fcf8e3;
}
a.bg-warning:hover,
a.bg-warning:focus {
background-color: #f7ecb5;
}
.bg-danger {
background-color: #f2dede;
}
a.bg-danger:hover,
a.bg-danger:focus {
background-color: #e4b9b9;
}
.page-header {
padding-bottom: 9px;
margin: 40px 0 20px;
border-bottom: 1px solid #eee;
}
ul,
ol {
margin-top: 0;
margin-bottom: 10px;
}
ul ul,
ol ul,
ul ol,
ol ol {
margin-bottom: 0;
}
.list-unstyled {
padding-left: 0;
list-style: none;
}
.list-inline {
padding-left: 0;
margin-left: -5px;
list-style: none;
}
.list-inline > li {
display: inline-block;
padding-right: 5px;
padding-left: 5px;
}
dl {
margin-top: 0;
margin-bottom: 20px;
}
dt,
dd {
line-height: 1.42857143;
}
dt {
font-weight: bold;
}
dd {
margin-left: 0;
}
@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
overflow: hidden;
clear: left;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}
.dl-horizontal dd {
margin-left: 180px;
}
}
abbr[title],
abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted #777;
}
.initialism {
font-size: 90%;
text-transform: uppercase;
}
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
}
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
margin-bottom: 0;
}
blockquote footer,
blockquote small,
blockquote .small {
display: block;
font-size: 80%;
line-height: 1.42857143;
color: #777;
}
blockquote footer:before,
blockquote small:before,
blockquote .small:before {
content: '\2014 \00A0';
}
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
text-align: right;
border-right: 5px solid #eee;
border-left: 0;
}
.blockquote-reverse footer:before,
blockquote.pull-right footer:before,
.blockquote-reverse small:before,
blockquote.pull-right small:before,
.blockquote-reverse .small:before,
blockquote.pull-right .small:before {
content: '';
}
.blockquote-reverse footer:after,
blockquote.pull-right footer:after,
.blockquote-reverse small:after,
blockquote.pull-right small:after,
.blockquote-reverse .small:after,
blockquote.pull-right .small:after {
content: '\00A0 \2014';
}
address {
margin-bottom: 20px;
font-style: normal;
line-height: 1.42857143;
}
code,
kbd,
pre,
samp {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
}
kbd {
padding: 2px 4px;
font-size: 90%;
color: #fff;
background-color: #333;
border-radius: 3px;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
}
kbd kbd {
padding: 0;
font-size: 100%;
font-weight: bold;
-webkit-box-shadow: none;
box-shadow: none;
}
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
color: #333;
word-break: break-all;
word-wrap: break-word;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
pre code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
.pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
.container-fluid {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
.row {
margin-right: -15px;
margin-left: -15px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
}
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
float: left;
}
.col-xs-12 {
width: 100%;
}
.col-xs-11 {
width: 91.66666667%;
}
.col-xs-10 {
width: 83.33333333%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-8 {
width: 66.66666667%;
}
.col-xs-7 {
width: 58.33333333%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-5 {
width: 41.66666667%;
}
.col-xs-4 {
width: 33.33333333%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-2 {
width: 16.66666667%;
}
.col-xs-1 {
width: 8.33333333%;
}
.col-xs-pull-12 {
right: 100%;
}
.col-xs-pull-11 {
right: 91.66666667%;
}
.col-xs-pull-10 {
right: 83.33333333%;
}
.col-xs-pull-9 {
right: 75%;
}
.col-xs-pull-8 {
right: 66.66666667%;
}
.col-xs-pull-7 {
right: 58.33333333%;
}
.col-xs-pull-6 {
right: 50%;
}
.col-xs-pull-5 {
right: 41.66666667%;
}
.col-xs-pull-4 {
right: 33.33333333%;
}
.col-xs-pull-3 {
right: 25%;
}
.col-xs-pull-2 {
right: 16.66666667%;
}
.col-xs-pull-1 {
right: 8.33333333%;
}
.col-xs-pull-0 {
right: auto;
}
.col-xs-push-12 {
left: 100%;
}
.col-xs-push-11 {
left: 91.66666667%;
}
.col-xs-push-10 {
left: 83.33333333%;
}
.col-xs-push-9 {
left: 75%;
}
.col-xs-push-8 {
left: 66.66666667%;
}
.col-xs-push-7 {
left: 58.33333333%;
}
.col-xs-push-6 {
left: 50%;
}
.col-xs-push-5 {
left: 41.66666667%;
}
.col-xs-push-4 {
left: 33.33333333%;
}
.col-xs-push-3 {
left: 25%;
}
.col-xs-push-2 {
left: 16.66666667%;
}
.col-xs-push-1 {
left: 8.33333333%;
}
.col-xs-push-0 {
left: auto;
}
.col-xs-offset-12 {
margin-left: 100%;
}
.col-xs-offset-11 {
margin-left: 91.66666667%;
}
.col-xs-offset-10 {
margin-left: 83.33333333%;
}
.col-xs-offset-9 {
margin-left: 75%;
}
.col-xs-offset-8 {
margin-left: 66.66666667%;
}
.col-xs-offset-7 {
margin-left: 58.33333333%;
}
.col-xs-offset-6 {
margin-left: 50%;
}
.col-xs-offset-5 {
margin-left: 41.66666667%;
}
.col-xs-offset-4 {
margin-left: 33.33333333%;
}
.col-xs-offset-3 {
margin-left: 25%;
}
.col-xs-offset-2 {
margin-left: 16.66666667%;
}
.col-xs-offset-1 {
margin-left: 8.33333333%;
}
.col-xs-offset-0 {
margin-left: 0;
}
@media (min-width: 768px) {
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
float: left;
}
.col-sm-12 {
width: 100%;
}
.col-sm-11 {
width: 91.66666667%;
}
.col-sm-10 {
width: 83.33333333%;
}
.col-sm-9 {
width: 75%;
}
.col-sm-8 {
width: 66.66666667%;
}
.col-sm-7 {
width: 58.33333333%;
}
.col-sm-6 {
width: 50%;
}
.col-sm-5 {
width: 41.66666667%;
}
.col-sm-4 {
width: 33.33333333%;
}
.col-sm-3 {
width: 25%;
}
.col-sm-2 {
width: 16.66666667%;
}
.col-sm-1 {
width: 8.33333333%;
}
.col-sm-pull-12 {
right: 100%;
}
.col-sm-pull-11 {
right: 91.66666667%;
}
.col-sm-pull-10 {
right: 83.33333333%;
}
.col-sm-pull-9 {
right: 75%;
}
.col-sm-pull-8 {
right: 66.66666667%;
}
.col-sm-pull-7 {
right: 58.33333333%;
}
.col-sm-pull-6 {
right: 50%;
}
.col-sm-pull-5 {
right: 41.66666667%;
}
.col-sm-pull-4 {
right: 33.33333333%;
}
.col-sm-pull-3 {
right: 25%;
}
.col-sm-pull-2 {
right: 16.66666667%;
}
.col-sm-pull-1 {
right: 8.33333333%;
}
.col-sm-pull-0 {
right: auto;
}
.col-sm-push-12 {
left: 100%;
}
.col-sm-push-11 {
left: 91.66666667%;
}
.col-sm-push-10 {
left: 83.33333333%;
}
.col-sm-push-9 {
left: 75%;
}
.col-sm-push-8 {
left: 66.66666667%;
}
.col-sm-push-7 {
left: 58.33333333%;
}
.col-sm-push-6 {
left: 50%;
}
.col-sm-push-5 {
left: 41.66666667%;
}
.col-sm-push-4 {
left: 33.33333333%;
}
.col-sm-push-3 {
left: 25%;
}
.col-sm-push-2 {
left: 16.66666667%;
}
.col-sm-push-1 {
left: 8.33333333%;
}
.col-sm-push-0 {
left: auto;
}
.col-sm-offset-12 {
margin-left: 100%;
}
.col-sm-offset-11 {
margin-left: 91.66666667%;
}
.col-sm-offset-10 {
margin-left: 83.33333333%;
}
.col-sm-offset-9 {
margin-left: 75%;
}
.col-sm-offset-8 {
margin-left: 66.66666667%;
}
.col-sm-offset-7 {
margin-left: 58.33333333%;
}
.col-sm-offset-6 {
margin-left: 50%;
}
.col-sm-offset-5 {
margin-left: 41.66666667%;
}
.col-sm-offset-4 {
margin-left: 33.33333333%;
}
.col-sm-offset-3 {
margin-left: 25%;
}
.col-sm-offset-2 {
margin-left: 16.66666667%;
}
.col-sm-offset-1 {
margin-left: 8.33333333%;
}
.col-sm-offset-0 {
margin-left: 0;
}
}
@media (min-width: 992px) {
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
float: left;
}
.col-md-12 {
width: 100%;
}
.col-md-11 {
width: 91.66666667%;
}
.col-md-10 {
width: 83.33333333%;
}
.col-md-9 {
width: 75%;
}
.col-md-8 {
width: 66.66666667%;
}
.col-md-7 {
width: 58.33333333%;
}
.col-md-6 {
width: 50%;
}
.col-md-5 {
width: 41.66666667%;
}
.col-md-4 {
width: 33.33333333%;
}
.col-md-3 {
width: 25%;
}
.col-md-2 {
width: 16.66666667%;
}
.col-md-1 {
width: 8.33333333%;
}
.col-md-pull-12 {
right: 100%;
}
.col-md-pull-11 {
right: 91.66666667%;
}
.col-md-pull-10 {
right: 83.33333333%;
}
.col-md-pull-9 {
right: 75%;
}
.col-md-pull-8 {
right: 66.66666667%;
}
.col-md-pull-7 {
right: 58.33333333%;
}
.col-md-pull-6 {
right: 50%;
}
.col-md-pull-5 {
right: 41.66666667%;
}
.col-md-pull-4 {
right: 33.33333333%;
}
.col-md-pull-3 {
right: 25%;
}
.col-md-pull-2 {
right: 16.66666667%;
}
.col-md-pull-1 {
right: 8.33333333%;
}
.col-md-pull-0 {
right: auto;
}
.col-md-push-12 {
left: 100%;
}
.col-md-push-11 {
left: 91.66666667%;
}
.col-md-push-10 {
left: 83.33333333%;
}
.col-md-push-9 {
left: 75%;
}
.col-md-push-8 {
left: 66.66666667%;
}
.col-md-push-7 {
left: 58.33333333%;
}
.col-md-push-6 {
left: 50%;
}
.col-md-push-5 {
left: 41.66666667%;
}
.col-md-push-4 {
left: 33.33333333%;
}
.col-md-push-3 {
left: 25%;
}
.col-md-push-2 {
left: 16.66666667%;
}
.col-md-push-1 {
left: 8.33333333%;
}
.col-md-push-0 {
left: auto;
}
.col-md-offset-12 {
margin-left: 100%;
}
.col-md-offset-11 {
margin-left: 91.66666667%;
}
.col-md-offset-10 {
margin-left: 83.33333333%;
}
.col-md-offset-9 {
margin-left: 75%;
}
.col-md-offset-8 {
margin-left: 66.66666667%;
}
.col-md-offset-7 {
margin-left: 58.33333333%;
}
.col-md-offset-6 {
margin-left: 50%;
}
.col-md-offset-5 {
margin-left: 41.66666667%;
}
.col-md-offset-4 {
margin-left: 33.33333333%;
}
.col-md-offset-3 {
margin-left: 25%;
}
.col-md-offset-2 {
margin-left: 16.66666667%;
}
.col-md-offset-1 {
margin-left: 8.33333333%;
}
.col-md-offset-0 {
margin-left: 0;
}
}
@media (min-width: 1200px) {
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
float: left;
}
.col-lg-12 {
width: 100%;
}
.col-lg-11 {
width: 91.66666667%;
}
.col-lg-10 {
width: 83.33333333%;
}
.col-lg-9 {
width: 75%;
}
.col-lg-8 {
width: 66.66666667%;
}
.col-lg-7 {
width: 58.33333333%;
}
.col-lg-6 {
width: 50%;
}
.col-lg-5 {
width: 41.66666667%;
}
.col-lg-4 {
width: 33.33333333%;
}
.col-lg-3 {
width: 25%;
}
.col-lg-2 {
width: 16.66666667%;
}
.col-lg-1 {
width: 8.33333333%;
}
.col-lg-pull-12 {
right: 100%;
}
.col-lg-pull-11 {
right: 91.66666667%;
}
.col-lg-pull-10 {
right: 83.33333333%;
}
.col-lg-pull-9 {
right: 75%;
}
.col-lg-pull-8 {
right: 66.66666667%;
}
.col-lg-pull-7 {
right: 58.33333333%;
}
.col-lg-pull-6 {
right: 50%;
}
.col-lg-pull-5 {
right: 41.66666667%;
}
.col-lg-pull-4 {
right: 33.33333333%;
}
.col-lg-pull-3 {
right: 25%;
}
.col-lg-pull-2 {
right: 16.66666667%;
}
.col-lg-pull-1 {
right: 8.33333333%;
}
.col-lg-pull-0 {
right: auto;
}
.col-lg-push-12 {
left: 100%;
}
.col-lg-push-11 {
left: 91.66666667%;
}
.col-lg-push-10 {
left: 83.33333333%;
}
.col-lg-push-9 {
left: 75%;
}
.col-lg-push-8 {
left: 66.66666667%;
}
.col-lg-push-7 {
left: 58.33333333%;
}
.col-lg-push-6 {
left: 50%;
}
.col-lg-push-5 {
left: 41.66666667%;
}
.col-lg-push-4 {
left: 33.33333333%;
}
.col-lg-push-3 {
left: 25%;
}
.col-lg-push-2 {
left: 16.66666667%;
}
.col-lg-push-1 {
left: 8.33333333%;
}
.col-lg-push-0 {
left: auto;
}
.col-lg-offset-12 {
margin-left: 100%;
}
.col-lg-offset-11 {
margin-left: 91.66666667%;
}
.col-lg-offset-10 {
margin-left: 83.33333333%;
}
.col-lg-offset-9 {
margin-left: 75%;
}
.col-lg-offset-8 {
margin-left: 66.66666667%;
}
.col-lg-offset-7 {
margin-left: 58.33333333%;
}
.col-lg-offset-6 {
margin-left: 50%;
}
.col-lg-offset-5 {
margin-left: 41.66666667%;
}
.col-lg-offset-4 {
margin-left: 33.33333333%;
}
.col-lg-offset-3 {
margin-left: 25%;
}
.col-lg-offset-2 {
margin-left: 16.66666667%;
}
.col-lg-offset-1 {
margin-left: 8.33333333%;
}
.col-lg-offset-0 {
margin-left: 0;
}
}
table {
background-color: transparent;
}
caption {
padding-top: 8px;
padding-bottom: 8px;
color: #777;
text-align: left;
}
th {
text-align: left;
}
.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #ddd;
}
.table > thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid #ddd;
}
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {
border-top: 0;
}
.table > tbody + tbody {
border-top: 2px solid #ddd;
}
.table .table {
background-color: #fff;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
padding: 5px;
}
.table-bordered {
border: 1px solid #ddd;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
border: 1px solid #ddd;
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
.table-striped > tbody > tr:nth-of-type(odd) {
background-color: #f9f9f9;
}
.table-hover > tbody > tr:hover {
background-color: #f5f5f5;
}
table col[class*="col-"] {
position: static;
display: table-column;
float: none;
}
table td[class*="col-"],
table th[class*="col-"] {
position: static;
display: table-cell;
float: none;
}
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
background-color: #f5f5f5;
}
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
background-color: #e8e8e8;
}
.table > thead > tr > td.success,
.table > tbody > tr > td.success,
.table > tfoot > tr > td.success,
.table > thead > tr > th.success,
.table > tbody > tr > th.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > tbody > tr.success > td,
.table > tfoot > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > th {
background-color: #dff0d8;
}
.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover,
.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr.success:hover > th {
background-color: #d0e9c6;
}
.table > thead > tr > td.info,
.table > tbody > tr > td.info,
.table > tfoot > tr > td.info,
.table > thead > tr > th.info,
.table > tbody > tr > th.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > tbody > tr.info > td,
.table > tfoot > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > th {
background-color: #d9edf7;
}
.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover,
.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr.info:hover > th {
background-color: #c4e3f3;
}
.table > thead > tr > td.warning,
.table > tbody > tr > td.warning,
.table > tfoot > tr > td.warning,
.table > thead > tr > th.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > tbody > tr.warning > td,
.table > tfoot > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > th {
background-color: #fcf8e3;
}
.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover,
.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr.warning:hover > th {
background-color: #faf2cc;
}
.table > thead > tr > td.danger,
.table > tbody > tr > td.danger,
.table > tfoot > tr > td.danger,
.table > thead > tr > th.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > tbody > tr.danger > td,
.table > tfoot > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > th {
background-color: #f2dede;
}
.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover,
.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr.danger:hover > th {
background-color: #ebcccc;
}
.table-responsive {
min-height: .01%;
overflow-x: auto;
}
@media screen and (max-width: 767px) {
.table-responsive {
width: 100%;
margin-bottom: 15px;
overflow-y: hidden;
-ms-overflow-style: -<API key>;
border: 1px solid #ddd;
}
.table-responsive > .table {
margin-bottom: 0;
}
.table-responsive > .table > thead > tr > th,
.table-responsive > .table > tbody > tr > th,
.table-responsive > .table > tfoot > tr > th,
.table-responsive > .table > thead > tr > td,
.table-responsive > .table > tbody > tr > td,
.table-responsive > .table > tfoot > tr > td {
white-space: nowrap;
}
.table-responsive > .table-bordered {
border: 0;
}
.table-responsive > .table-bordered > thead > tr > th:first-child,
.table-responsive > .table-bordered > tbody > tr > th:first-child,
.table-responsive > .table-bordered > tfoot > tr > th:first-child,
.table-responsive > .table-bordered > thead > tr > td:first-child,
.table-responsive > .table-bordered > tbody > tr > td:first-child,
.table-responsive > .table-bordered > tfoot > tr > td:first-child {
border-left: 0;
}
.table-responsive > .table-bordered > thead > tr > th:last-child,
.table-responsive > .table-bordered > tbody > tr > th:last-child,
.table-responsive > .table-bordered > tfoot > tr > th:last-child,
.table-responsive > .table-bordered > thead > tr > td:last-child,
.table-responsive > .table-bordered > tbody > tr > td:last-child,
.table-responsive > .table-bordered > tfoot > tr > td:last-child {
border-right: 0;
}
.table-responsive > .table-bordered > tbody > tr:last-child > th,
.table-responsive > .table-bordered > tfoot > tr:last-child > th,
.table-responsive > .table-bordered > tbody > tr:last-child > td,
.table-responsive > .table-bordered > tfoot > tr:last-child > td {
border-bottom: 0;
}
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: inherit;
color: #333;
border: 0;
border-bottom: 1px solid #e5e5e5;
}
label {
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-weight: bold;
}
input[type="search"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
line-height: normal;
}
input[type="file"] {
display: block;
}
input[type="range"] {
display: block;
width: 100%;
}
select[multiple],
select[size] {
height: auto;
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
outline: 5px auto -<API key>;
outline-offset: -2px;
}
output {
display: block;
padding-top: 7px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
}
.form-control {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}
.form-control::-moz-placeholder {
color: #999;
opacity: 1;
}
.form-control:-<API key> {
color: #999;
}
.form-control::-<API key> {
color: #999;
}
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
background-color: #eee;
opacity: 1;
}
.form-control[disabled],
fieldset[disabled] .form-control {
cursor: not-allowed;
}
textarea.form-control {
height: auto;
}
input[type="search"] {
-webkit-appearance: none;
}
@media screen and (-<API key>: 0) {
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control {
line-height: 34px;
}
input[type="date"].input-sm,
input[type="time"].input-sm,
input[type="datetime-local"].input-sm,
input[type="month"].input-sm,
.input-group-sm input[type="date"],
.input-group-sm input[type="time"],
.input-group-sm input[type="datetime-local"],
.input-group-sm input[type="month"] {
line-height: 30px;
}
input[type="date"].input-lg,
input[type="time"].input-lg,
input[type="datetime-local"].input-lg,
input[type="month"].input-lg,
.input-group-lg input[type="date"],
.input-group-lg input[type="time"],
.input-group-lg input[type="datetime-local"],
.input-group-lg input[type="month"] {
line-height: 46px;
}
}
.form-group {
margin-bottom: 15px;
}
.radio,
.checkbox {
position: relative;
display: block;
margin-top: 10px;
margin-bottom: 10px;
}
.radio label,
.checkbox label {
min-height: 20px;
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
cursor: pointer;
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
position: absolute;
margin-top: 4px \9;
margin-left: -20px;
}
.radio + .radio,
.checkbox + .checkbox {
margin-top: -5px;
}
.radio-inline,
.checkbox-inline {
position: relative;
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
vertical-align: middle;
cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
margin-top: 0;
margin-left: 10px;
}
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"].disabled,
input[type="checkbox"].disabled,
fieldset[disabled] input[type="radio"],
fieldset[disabled] input[type="checkbox"] {
cursor: not-allowed;
}
.radio-inline.disabled,
.checkbox-inline.disabled,
fieldset[disabled] .radio-inline,
fieldset[disabled] .checkbox-inline {
cursor: not-allowed;
}
.radio.disabled label,
.checkbox.disabled label,
fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label {
cursor: not-allowed;
}
.form-control-static {
min-height: 34px;
padding-top: 7px;
padding-bottom: 7px;
margin-bottom: 0;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding-right: 0;
padding-left: 0;
}
.input-sm {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
select.input-sm {
height: 30px;
line-height: 30px;
}
textarea.input-sm,
select[multiple].input-sm {
height: auto;
}
.form-group-sm .form-control {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.form-group-sm select.form-control {
height: 30px;
line-height: 30px;
}
.form-group-sm textarea.form-control,
.form-group-sm select[multiple].form-control {
height: auto;
}
.form-group-sm .form-control-static {
height: 30px;
min-height: 32px;
padding: 6px 10px;
font-size: 12px;
line-height: 1.5;
}
.input-lg {
height: 46px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px;
}
select.input-lg {
height: 46px;
line-height: 46px;
}
textarea.input-lg,
select[multiple].input-lg {
height: auto;
}
.form-group-lg .form-control {
height: 46px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px;
}
.form-group-lg select.form-control {
height: 46px;
line-height: 46px;
}
.form-group-lg textarea.form-control,
.form-group-lg select[multiple].form-control {
height: auto;
}
.form-group-lg .form-control-static {
height: 46px;
min-height: 38px;
padding: 11px 16px;
font-size: 18px;
line-height: 1.3333333;
}
.has-feedback {
position: relative;
}
.has-feedback .form-control {
padding-right: 42.5px;
}
.<API key> {
position: absolute;
top: 0;
right: 0;
z-index: 2;
display: block;
width: 34px;
height: 34px;
line-height: 34px;
text-align: center;
pointer-events: none;
}
.input-lg + .<API key>,
.input-group-lg + .<API key>,
.form-group-lg .form-control + .<API key> {
width: 46px;
height: 46px;
line-height: 46px;
}
.input-sm + .<API key>,
.input-group-sm + .<API key>,
.form-group-sm .form-control + .<API key> {
width: 30px;
height: 30px;
line-height: 30px;
}
.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline,
.has-success.radio label,
.has-success.checkbox label,
.has-success.radio-inline label,
.has-success.checkbox-inline label {
color: #3c763d;
}
.has-success .form-control {
border-color: #3c763d;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
.has-success .form-control:focus {
border-color: #2b542c;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
}
.has-success .input-group-addon {
color: #3c763d;
background-color: #dff0d8;
border-color: #3c763d;
}
.has-success .<API key> {
color: #3c763d;
}
.has-warning .help-block,
.has-warning .control-label,
.has-warning .radio,
.has-warning .checkbox,
.has-warning .radio-inline,
.has-warning .checkbox-inline,
.has-warning.radio label,
.has-warning.checkbox label,
.has-warning.radio-inline label,
.has-warning.checkbox-inline label {
color: #8a6d3b;
}
.has-warning .form-control {
border-color: #8a6d3b;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
.has-warning .form-control:focus {
border-color: #66512c;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
}
.has-warning .input-group-addon {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #8a6d3b;
}
.has-warning .<API key> {
color: #8a6d3b;
}
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline,
.has-error.radio label,
.has-error.checkbox label,
.has-error.radio-inline label,
.has-error.checkbox-inline label {
color: #a94442;
}
.has-error .form-control {
border-color: #a94442;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
.has-error .form-control:focus {
border-color: #843534;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
}
.has-error .input-group-addon {
color: #a94442;
background-color: #f2dede;
border-color: #a94442;
}
.has-error .<API key> {
color: #a94442;
}
.has-feedback label ~ .<API key> {
top: 25px;
}
.has-feedback label.sr-only ~ .<API key> {
top: 0;
}
.help-block {
display: block;
margin-top: 5px;
margin-bottom: 10px;
color: #737373;
}
@media (min-width: 768px) {
.form-inline .form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.form-inline .form-control-static {
display: inline-block;
}
.form-inline .input-group {
display: inline-table;
vertical-align: middle;
}
.form-inline .input-group .input-group-addon,
.form-inline .input-group .input-group-btn,
.form-inline .input-group .form-control {
width: auto;
}
.form-inline .input-group > .form-control {
width: 100%;
}
.form-inline .control-label {
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio,
.form-inline .checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio label,
.form-inline .checkbox label {
padding-left: 0;
}
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
.form-inline .has-feedback .<API key> {
top: 0;
}
}
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
padding-top: 7px;
margin-top: 0;
margin-bottom: 0;
}
.form-horizontal .radio,
.form-horizontal .checkbox {
min-height: 27px;
}
.form-horizontal .form-group {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
.form-horizontal .control-label {
padding-top: 7px;
margin-bottom: 0;
text-align: right;
}
}
.form-horizontal .has-feedback .<API key> {
right: 15px;
}
@media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label {
padding-top: 14.333333px;
font-size: 18px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label {
padding-top: 6px;
font-size: 12px;
}
}
.btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
outline: thin dotted;
outline: 5px auto -<API key>;
outline-offset: -2px;
}
.btn:hover,
.btn:focus,
.btn.focus {
color: #333;
text-decoration: none;
}
.btn:active,
.btn.active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
cursor: not-allowed;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
opacity: .65;
}
a.btn.disabled,
fieldset[disabled] a.btn {
pointer-events: none;
}
.btn-default {
color: #333;
background-color: #fff;
border-color: #ccc;
}
.btn-default:focus,
.btn-default.focus {
color: #333;
background-color: #e6e6e6;
border-color: #8c8c8c;
}
.btn-default:hover {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
.btn-default:active:hover,
.btn-default.active:hover,
.open > .dropdown-toggle.btn-default:hover,
.btn-default:active:focus,
.btn-default.active:focus,
.open > .dropdown-toggle.btn-default:focus,
.btn-default:active.focus,
.btn-default.active.focus,
.open > .dropdown-toggle.btn-default.focus {
color: #333;
background-color: #d4d4d4;
border-color: #8c8c8c;
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
background-image: none;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #fff;
border-color: #ccc;
}
.btn-default .badge {
color: #fff;
background-color: #333;
}
.btn-primary {
color: #fff;
background-color: #337ab7;
border-color: #2e6da4;
}
.btn-primary:focus,
.btn-primary.focus {
color: #fff;
background-color: #286090;
border-color: #122b40;
}
.btn-primary:hover {
color: #fff;
background-color: #286090;
border-color: #204d74;
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
color: #fff;
background-color: #286090;
border-color: #204d74;
}
.btn-primary:active:hover,
.btn-primary.active:hover,
.open > .dropdown-toggle.btn-primary:hover,
.btn-primary:active:focus,
.btn-primary.active:focus,
.open > .dropdown-toggle.btn-primary:focus,
.btn-primary:active.focus,
.btn-primary.active.focus,
.open > .dropdown-toggle.btn-primary.focus {
color: #fff;
background-color: #204d74;
border-color: #122b40;
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #337ab7;
border-color: #2e6da4;
}
.btn-primary .badge {
color: #337ab7;
background-color: #fff;
}
.btn-success {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn-success:focus,
.btn-success.focus {
color: #fff;
background-color: #449d44;
border-color: #255625;
}
.btn-success:hover {
color: #fff;
background-color: #449d44;
border-color: #398439;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
color: #fff;
background-color: #449d44;
border-color: #398439;
}
.btn-success:active:hover,
.btn-success.active:hover,
.open > .dropdown-toggle.btn-success:hover,
.btn-success:active:focus,
.btn-success.active:focus,
.open > .dropdown-toggle.btn-success:focus,
.btn-success:active.focus,
.btn-success.active.focus,
.open > .dropdown-toggle.btn-success.focus {
color: #fff;
background-color: #398439;
border-color: #255625;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
background-image: none;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn-success .badge {
color: #5cb85c;
background-color: #fff;
}
.btn-info {
color: #fff;
background-color: #5bc0de;
border-color: #46b8da;
}
.btn-info:focus,
.btn-info.focus {
color: #fff;
background-color: #31b0d5;
border-color: #1b6d85;
}
.btn-info:hover {
color: #fff;
background-color: #31b0d5;
border-color: #269abc;
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
color: #fff;
background-color: #31b0d5;
border-color: #269abc;
}
.btn-info:active:hover,
.btn-info.active:hover,
.open > .dropdown-toggle.btn-info:hover,
.btn-info:active:focus,
.btn-info.active:focus,
.open > .dropdown-toggle.btn-info:focus,
.btn-info:active.focus,
.btn-info.active.focus,
.open > .dropdown-toggle.btn-info.focus {
color: #fff;
background-color: #269abc;
border-color: #1b6d85;
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
background-image: none;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #5bc0de;
border-color: #46b8da;
}
.btn-info .badge {
color: #5bc0de;
background-color: #fff;
}
.btn-warning {
color: #fff;
background-color: #f0ad4e;
border-color: #eea236;
}
.btn-warning:focus,
.btn-warning.focus {
color: #fff;
background-color: #ec971f;
border-color: #985f0d;
}
.btn-warning:hover {
color: #fff;
background-color: #ec971f;
border-color: #d58512;
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
color: #fff;
background-color: #ec971f;
border-color: #d58512;
}
.btn-warning:active:hover,
.btn-warning.active:hover,
.open > .dropdown-toggle.btn-warning:hover,
.btn-warning:active:focus,
.btn-warning.active:focus,
.open > .dropdown-toggle.btn-warning:focus,
.btn-warning:active.focus,
.btn-warning.active.focus,
.open > .dropdown-toggle.btn-warning.focus {
color: #fff;
background-color: #d58512;
border-color: #985f0d;
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
background-image: none;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #f0ad4e;
border-color: #eea236;
}
.btn-warning .badge {
color: #f0ad4e;
background-color: #fff;
}
.btn-danger {
color: #fff;
background-color: #d9534f;
border-color: #d43f3a;
}
.btn-danger:focus,
.btn-danger.focus {
color: #fff;
background-color: #c9302c;
border-color: #761c19;
}
.btn-danger:hover {
color: #fff;
background-color: #c9302c;
border-color: #ac2925;
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
color: #fff;
background-color: #c9302c;
border-color: #ac2925;
}
.btn-danger:active:hover,
.btn-danger.active:hover,
.open > .dropdown-toggle.btn-danger:hover,
.btn-danger:active:focus,
.btn-danger.active:focus,
.open > .dropdown-toggle.btn-danger:focus,
.btn-danger:active.focus,
.btn-danger.active.focus,
.open > .dropdown-toggle.btn-danger.focus {
color: #fff;
background-color: #ac2925;
border-color: #761c19;
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
background-image: none;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #d9534f;
border-color: #d43f3a;
}
.btn-danger .badge {
color: #d9534f;
background-color: #fff;
}
.btn-link {
font-weight: normal;
color: #337ab7;
border-radius: 0;
}
.btn-link,
.btn-link:active,
.btn-link.active,
.btn-link[disabled],
fieldset[disabled] .btn-link {
background-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
border-color: transparent;
}
.btn-link:hover,
.btn-link:focus {
color: #23527c;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover,
fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus {
color: #777;
text-decoration: none;
}
.btn-lg,
.btn-group-lg > .btn {
padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px;
}
.btn-sm,
.btn-group-sm > .btn {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-xs,
.btn-group-xs > .btn {
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-block {
display: block;
width: 100%;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.fade {
opacity: 0;
-webkit-transition: opacity .15s linear;
-o-transition: opacity .15s linear;
transition: opacity .15s linear;
}
.fade.in {
opacity: 1;
}
.collapse {
display: none;
}
.collapse.in {
display: block;
}
tr.collapse.in {
display: table-row;
}
tbody.collapse.in {
display: table-row-group;
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
-<API key>: ease;
-<API key>: ease;
<API key>: ease;
-<API key>: .35s;
-<API key>: .35s;
transition-duration: .35s;
-<API key>: height, visibility;
-<API key>: height, visibility;
transition-property: height, visibility;
}
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: 4px dashed;
border-top: 4px solid \9;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
.dropup,
.dropdown {
position: relative;
}
.dropdown-toggle:focus {
outline: 0;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
font-size: 14px;
text-align: left;
list-style: none;
background-color: #fff;
-<API key>: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, .15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.dropdown-menu.pull-right {
right: 0;
left: auto;
}
.dropdown-menu .divider {
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #333;
white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
color: #262626;
text-decoration: none;
background-color: #f5f5f5;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #fff;
text-decoration: none;
background-color: #337ab7;
outline: 0;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #777;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
cursor: not-allowed;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.open > .dropdown-menu {
display: block;
}
.open > a {
outline: 0;
}
.dropdown-menu-right {
right: 0;
left: auto;
}
.dropdown-menu-left {
right: auto;
left: 0;
}
.dropdown-header {
display: block;
padding: 3px 20px;
font-size: 12px;
line-height: 1.42857143;
color: #777;
white-space: nowrap;
}
.dropdown-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 990;
}
.pull-right > .dropdown-menu {
right: 0;
left: auto;
}
.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
content: "";
border-top: 0;
border-bottom: 4px dashed;
border-bottom: 4px solid \9;
}
.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
top: auto;
bottom: 100%;
margin-bottom: 2px;
}
@media (min-width: 768px) {
.navbar-right .dropdown-menu {
right: 0;
left: auto;
}
.navbar-right .dropdown-menu-left {
right: auto;
left: 0;
}
}
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle;
}
.btn-group > .btn,
.btn-group-vertical > .btn {
position: relative;
float: left;
}
.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover,
.btn-group > .btn:focus,
.btn-group-vertical > .btn:focus,
.btn-group > .btn:active,
.btn-group-vertical > .btn:active,
.btn-group > .btn.active,
.btn-group-vertical > .btn.active {
z-index: 2;
}
.btn-group .btn + .btn,
.btn-group .btn + .btn-group,
.btn-group .btn-group + .btn,
.btn-group .btn-group + .btn-group {
margin-left: -1px;
}
.btn-toolbar {
margin-left: -5px;
}
.btn-toolbar .btn,
.btn-toolbar .btn-group,
.btn-toolbar .input-group {
float: left;
}
.btn-toolbar > .btn,
.btn-toolbar > .btn-group,
.btn-toolbar > .input-group {
margin-left: 5px;
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
.btn-group > .btn:first-child {
margin-left: 0;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
<API key>: 0;
<API key>: 0;
}
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
<API key>: 0;
<API key>: 0;
}
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
<API key>: 0;
<API key>: 0;
}
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
<API key>: 0;
<API key>: 0;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
padding-right: 8px;
padding-left: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
padding-right: 12px;
padding-left: 12px;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-group.open .dropdown-toggle.btn-link {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn .caret {
margin-left: 0;
}
.btn-lg .caret {
border-width: 5px 5px 0;
border-bottom-width: 0;
}
.dropup .btn-lg .caret {
border-width: 0 5px 5px;
}
.btn-group-vertical > .btn,
.btn-group-vertical > .btn-group,
.btn-group-vertical > .btn-group > .btn {
display: block;
float: none;
width: 100%;
max-width: 100%;
}
.btn-group-vertical > .btn-group > .btn {
float: none;
}
.btn-group-vertical > .btn + .btn,
.btn-group-vertical > .btn + .btn-group,
.btn-group-vertical > .btn-group + .btn,
.btn-group-vertical > .btn-group + .btn-group {
margin-top: -1px;
margin-left: 0;
}
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
border-radius: 0;
}
.btn-group-vertical > .btn:first-child:not(:last-child) {
<API key>: 4px;
<API key>: 0;
<API key>: 0;
}
.btn-group-vertical > .btn:last-child:not(:first-child) {
<API key>: 0;
<API key>: 0;
<API key>: 4px;
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
<API key>: 0;
<API key>: 0;
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
<API key>: 0;
<API key>: 0;
}
.btn-group-justified {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
}
.btn-group-justified > .btn,
.btn-group-justified > .btn-group {
display: table-cell;
float: none;
width: 1%;
}
.btn-group-justified > .btn-group .btn {
width: 100%;
}
.btn-group-justified > .btn-group .dropdown-menu {
left: auto;
}
[data-toggle="buttons"] > .btn input[type="radio"],
[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
[data-toggle="buttons"] > .btn input[type="checkbox"],
[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
position: absolute;
clip: rect(0, 0, 0, 0);
pointer-events: none;
}
.input-group {
position: relative;
display: table;
border-collapse: separate;
}
.input-group[class*="col-"] {
float: none;
padding-right: 0;
padding-left: 0;
}
.input-group .form-control {
position: relative;
z-index: 2;
float: left;
width: 100%;
margin-bottom: 0;
}
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
height: 46px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
border-radius: 6px;
}
select.input-group-lg > .form-control,
select.input-group-lg > .input-group-addon,
select.input-group-lg > .input-group-btn > .btn {
height: 46px;
line-height: 46px;
}
textarea.input-group-lg > .form-control,
textarea.input-group-lg > .input-group-addon,
textarea.input-group-lg > .input-group-btn > .btn,
select[multiple].input-group-lg > .form-control,
select[multiple].input-group-lg > .input-group-addon,
select[multiple].input-group-lg > .input-group-btn > .btn {
height: auto;
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
select.input-group-sm > .form-control,
select.input-group-sm > .input-group-addon,
select.input-group-sm > .input-group-btn > .btn {
height: 30px;
line-height: 30px;
}
textarea.input-group-sm > .form-control,
textarea.input-group-sm > .input-group-addon,
textarea.input-group-sm > .input-group-btn > .btn,
select[multiple].input-group-sm > .form-control,
select[multiple].input-group-sm > .input-group-addon,
select[multiple].input-group-sm > .input-group-btn > .btn {
height: auto;
}
.input-group-addon,
.input-group-btn,
.input-group .form-control {
display: table-cell;
}
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group .form-control:not(:first-child):not(:last-child) {
border-radius: 0;
}
.input-group-addon,
.input-group-btn {
width: 1%;
white-space: nowrap;
vertical-align: middle;
}
.input-group-addon {
padding: 6px 12px;
font-size: 14px;
font-weight: normal;
line-height: 1;
color: #555;
text-align: center;
background-color: #eee;
border: 1px solid #ccc;
border-radius: 4px;
}
.input-group-addon.input-sm {
padding: 5px 10px;
font-size: 12px;
border-radius: 3px;
}
.input-group-addon.input-lg {
padding: 10px 16px;
font-size: 18px;
border-radius: 6px;
}
.input-group-addon input[type="radio"],
.input-group-addon input[type="checkbox"] {
margin-top: 0;
}
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
<API key>: 0;
<API key>: 0;
}
.input-group-addon:first-child {
border-right: 0;
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
<API key>: 0;
<API key>: 0;
}
.input-group-addon:last-child {
border-left: 0;
}
.input-group-btn {
position: relative;
font-size: 0;
white-space: nowrap;
}
.input-group-btn > .btn {
position: relative;
}
.input-group-btn > .btn + .btn {
margin-left: -1px;
}
.input-group-btn > .btn:hover,
.input-group-btn > .btn:focus,
.input-group-btn > .btn:active {
z-index: 2;
}
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group {
margin-right: -1px;
}
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group {
z-index: 2;
margin-left: -1px;
}
.nav {
padding-left: 0;
margin-bottom: 0;
list-style: none;
}
.nav > li {
position: relative;
display: block;
}
.nav > li > a {
position: relative;
display: block;
padding: 10px 15px;
}
.nav > li > a:hover,
.nav > li > a:focus {
text-decoration: none;
background-color: #eee;
}
.nav > li.disabled > a {
color: #777;
}
.nav > li.disabled > a:hover,
.nav > li.disabled > a:focus {
color: #777;
text-decoration: none;
cursor: not-allowed;
background-color: transparent;
}
.nav .open > a,
.nav .open > a:hover,
.nav .open > a:focus {
background-color: #eee;
border-color: #337ab7;
}
.nav .nav-divider {
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.nav > li > a > img {
max-width: none;
}
.nav-tabs {
border-bottom: 1px solid #ddd;
}
.nav-tabs > li {
float: left;
margin-bottom: -1px;
}
.nav-tabs > li > a {
margin-right: 2px;
line-height: 1.42857143;
border: 1px solid transparent;
border-radius: 4px 4px 0 0;
}
.nav-tabs > li > a:hover {
border-color: #eee #eee #ddd;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
color: #555;
cursor: default;
background-color: #fff;
border: 1px solid #ddd;
border-bottom-color: transparent;
}
.nav-tabs.nav-justified {
width: 100%;
border-bottom: 0;
}
.nav-tabs.nav-justified > li {
float: none;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 5px;
text-align: center;
}
.nav-tabs.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs.nav-justified > li > a {
margin-right: 0;
border-radius: 4px;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border: 1px solid #ddd;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li > a {
border-bottom: 1px solid #ddd;
border-radius: 4px 4px 0 0;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border-bottom-color: #fff;
}
}
.nav-pills > li {
float: left;
}
.nav-pills > li > a {
border-radius: 4px;
}
.nav-pills > li + li {
margin-left: 2px;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
color: #fff;
background-color: #337ab7;
}
.nav-stacked > li {
float: none;
}
.nav-stacked > li + li {
margin-top: 2px;
margin-left: 0;
}
.nav-justified {
width: 100%;
}
.nav-justified > li {
float: none;
}
.nav-justified > li > a {
margin-bottom: 5px;
text-align: center;
}
.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs-justified {
border-bottom: 0;
}
.nav-tabs-justified > li > a {
margin-right: 0;
border-radius: 4px;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border: 1px solid #ddd;
}
@media (min-width: 768px) {
.nav-tabs-justified > li > a {
border-bottom: 1px solid #ddd;
border-radius: 4px 4px 0 0;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border-bottom-color: #fff;
}
}
.tab-content > .tab-pane {
display: none;
}
.tab-content > .active {
display: block;
}
.nav-tabs .dropdown-menu {
margin-top: -1px;
<API key>: 0;
<API key>: 0;
}
.navbar {
position: relative;
min-height: 50px;
margin-bottom: 20px;
border: 1px solid transparent;
}
@media (min-width: 768px) {
.navbar {
border-radius: 4px;
}
}
@media (min-width: 768px) {
.navbar-header {
float: left;
}
}
.navbar-collapse {
padding-right: 15px;
padding-left: 15px;
overflow-x: visible;
-<API key>: touch;
border-top: 1px solid transparent;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
.navbar-collapse.in {
overflow-y: auto;
}
@media (min-width: 768px) {
.navbar-collapse {
width: auto;
border-top: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-collapse.collapse {
display: block !important;
height: auto !important;
padding-bottom: 0;
overflow: visible !important;
}
.navbar-collapse.in {
overflow-y: visible;
}
.navbar-fixed-top .navbar-collapse,
.navbar-static-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
padding-right: 0;
padding-left: 0;
}
}
.navbar-fixed-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
max-height: 340px;
}
@media (max-device-width: 480px) and (orientation: landscape) {
.navbar-fixed-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
max-height: 200px;
}
}
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: 0;
margin-left: 0;
}
}
.navbar-static-top {
z-index: 1000;
border-width: 0 0 1px;
}
@media (min-width: 768px) {
.navbar-static-top {
border-radius: 0;
}
}
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: 1030;
}
@media (min-width: 768px) {
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-fixed-bottom {
bottom: 0;
margin-bottom: 0;
border-width: 1px 0 0;
}
.navbar-brand {
float: left;
height: 50px;
padding: 15px 15px;
font-size: 18px;
line-height: 20px;
}
.navbar-brand:hover,
.navbar-brand:focus {
text-decoration: none;
}
.navbar-brand > img {
display: block;
}
@media (min-width: 768px) {
.navbar > .container .navbar-brand,
.navbar > .container-fluid .navbar-brand {
margin-left: -15px;
}
}
.navbar-toggle {
position: relative;
float: right;
padding: 9px 10px;
margin-top: 8px;
margin-right: 15px;
margin-bottom: 8px;
background-color: transparent;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.navbar-toggle:focus {
outline: 0;
}
.navbar-toggle .icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
}
.navbar-toggle .icon-bar + .icon-bar {
margin-top: 4px;
}
@media (min-width: 768px) {
.navbar-toggle {
display: none;
}
}
.navbar-nav {
margin: 7.5px -15px;
}
.navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
line-height: 20px;
}
@media (max-width: 767px) {
.navbar-nav .open .dropdown-menu {
position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-nav .open .dropdown-menu > li > a,
.navbar-nav .open .dropdown-menu .dropdown-header {
padding: 5px 15px 5px 25px;
}
.navbar-nav .open .dropdown-menu > li > a {
line-height: 20px;
}
.navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-nav .open .dropdown-menu > li > a:focus {
background-image: none;
}
}
@media (min-width: 768px) {
.navbar-nav {
float: left;
margin: 0;
}
.navbar-nav > li {
float: left;
}
.navbar-nav > li > a {
padding-top: 15px;
padding-bottom: 15px;
}
}
.navbar-form {
padding: 10px 15px;
margin-top: 8px;
margin-right: -15px;
margin-bottom: 8px;
margin-left: -15px;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
}
@media (min-width: 768px) {
.navbar-form .form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.navbar-form .form-control-static {
display: inline-block;
}
.navbar-form .input-group {
display: inline-table;
vertical-align: middle;
}
.navbar-form .input-group .input-group-addon,
.navbar-form .input-group .input-group-btn,
.navbar-form .input-group .form-control {
width: auto;
}
.navbar-form .input-group > .form-control {
width: 100%;
}
.navbar-form .control-label {
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .radio,
.navbar-form .checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .radio label,
.navbar-form .checkbox label {
padding-left: 0;
}
.navbar-form .radio input[type="radio"],
.navbar-form .checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
.navbar-form .has-feedback .<API key> {
top: 0;
}
}
@media (max-width: 767px) {
.navbar-form .form-group {
margin-bottom: 5px;
}
.navbar-form .form-group:last-child {
margin-bottom: 0;
}
}
@media (min-width: 768px) {
.navbar-form {
width: auto;
padding-top: 0;
padding-bottom: 0;
margin-right: 0;
margin-left: 0;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
}
.navbar-nav > li > .dropdown-menu {
margin-top: 0;
<API key>: 0;
<API key>: 0;
}
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
margin-bottom: 0;
<API key>: 4px;
<API key>: 4px;
<API key>: 0;
<API key>: 0;
}
.navbar-btn {
margin-top: 8px;
margin-bottom: 8px;
}
.navbar-btn.btn-sm {
margin-top: 10px;
margin-bottom: 10px;
}
.navbar-btn.btn-xs {
margin-top: 14px;
margin-bottom: 14px;
}
.navbar-text {
margin-top: 15px;
margin-bottom: 15px;
}
@media (min-width: 768px) {
.navbar-text {
float: left;
margin-right: 15px;
margin-left: 15px;
}
}
@media (min-width: 768px) {
.navbar-left {
float: left !important;
}
.navbar-right {
float: right !important;
margin-right: -15px;
}
.navbar-right ~ .navbar-right {
margin-right: 0;
}
}
.navbar-default {
background-color: #f8f8f8;
border-color: #e7e7e7;
}
.navbar-default .navbar-brand {
color: #777;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: #5e5e5e;
background-color: transparent;
}
.navbar-default .navbar-text {
color: #777;
}
.navbar-default .navbar-nav > li > a {
color: #777;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #333;
background-color: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #555;
background-color: #e7e7e7;
}
.navbar-default .navbar-nav > .disabled > a,
.navbar-default .navbar-nav > .disabled > a:hover,
.navbar-default .navbar-nav > .disabled > a:focus {
color: #ccc;
background-color: transparent;
}
.navbar-default .navbar-toggle {
border-color: #ddd;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
background-color: #ddd;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #888;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
border-color: #e7e7e7;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
color: #555;
background-color: #e7e7e7;
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #777;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #333;
background-color: transparent;
}
.navbar-default .navbar-nav .open .dropdown-menu > .active > a,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #555;
background-color: #e7e7e7;
}
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #ccc;
background-color: transparent;
}
}
.navbar-default .navbar-link {
color: #777;
}
.navbar-default .navbar-link:hover {
color: #333;
}
.navbar-default .btn-link {
color: #777;
}
.navbar-default .btn-link:hover,
.navbar-default .btn-link:focus {
color: #333;
}
.navbar-default .btn-link[disabled]:hover,
fieldset[disabled] .navbar-default .btn-link:hover,
.navbar-default .btn-link[disabled]:focus,
fieldset[disabled] .navbar-default .btn-link:focus {
color: #ccc;
}
.navbar-inverse {
background-color: #222;
border-color: #080808;
height: 60px;
}
.navbar-inverse .navbar-brand {
color: #9d9d9d;
}
.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
color: #fff;
background-color: transparent;
}
.navbar-inverse .navbar-text {
color: #9d9d9d;
}
.navbar-inverse .navbar-nav > li > a {
color: #9d9d9d;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
color: #fff;
background-color: transparent;
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
color: #fff;
background-color: #080808;
}
.navbar-inverse .navbar-nav > .disabled > a,
.navbar-inverse .navbar-nav > .disabled > a:hover,
.navbar-inverse .navbar-nav > .disabled > a:focus {
color: #444;
background-color: transparent;
}
.navbar-inverse .navbar-toggle {
border-color: #333;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
background-color: #333;
}
.navbar-inverse .navbar-toggle .icon-bar {
background-color: #fff;
}
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
border-color: #101010;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
color: #fff;
background-color: #080808;
}
@media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
border-color: #080808;
}
.navbar-inverse .navbar-nav .open .dropdown-menu .divider {
background-color: #080808;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #9d9d9d;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
color: #fff;
background-color: transparent;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-color: #080808;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #444;
background-color: transparent;
}
}
.navbar-inverse .navbar-link {
color: #9d9d9d;
}
.navbar-inverse .navbar-link:hover {
color: #fff;
}
.navbar-inverse .btn-link {
color: #9d9d9d;
}
.navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link:focus {
color: #fff;
}
.navbar-inverse .btn-link[disabled]:hover,
fieldset[disabled] .navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link[disabled]:focus,
fieldset[disabled] .navbar-inverse .btn-link:focus {
color: #444;
}
.breadcrumb {
padding: 8px 15px;
margin-bottom: 20px;
list-style: none;
background-color: #f5f5f5;
border-radius: 4px;
}
.breadcrumb > li {
display: inline-block;
}
.breadcrumb > li + li:before {
padding: 0 5px;
color: #ccc;
content: "/\00a0";
}
.breadcrumb > .active {
color: #777;
}
.pagination {
display: inline-block;
padding-left: 0;
margin: 20px 0;
border-radius: 4px;
}
.pagination > li {
display: inline;
}
.pagination > li > a,
.pagination > li > span {
position: relative;
float: left;
padding: 6px 12px;
margin-left: -1px;
line-height: 1.42857143;
color: #337ab7;
text-decoration: none;
background-color: #fff;
border: 1px solid #ddd;
}
.pagination > li:first-child > a,
.pagination > li:first-child > span {
margin-left: 0;
<API key>: 4px;
<API key>: 4px;
}
.pagination > li:last-child > a,
.pagination > li:last-child > span {
<API key>: 4px;
<API key>: 4px;
}
.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
z-index: 3;
color: #23527c;
background-color: #eee;
border-color: #ddd;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
z-index: 2;
color: #fff;
cursor: default;
background-color: #337ab7;
border-color: #337ab7;
}
.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
color: #777;
cursor: not-allowed;
background-color: #fff;
border-color: #ddd;
}
.pagination-lg > li > a,
.pagination-lg > li > span {
padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
}
.pagination-lg > li:first-child > a,
.pagination-lg > li:first-child > span {
<API key>: 6px;
<API key>: 6px;
}
.pagination-lg > li:last-child > a,
.pagination-lg > li:last-child > span {
<API key>: 6px;
<API key>: 6px;
}
.pagination-sm > li > a,
.pagination-sm > li > span {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
}
.pagination-sm > li:first-child > a,
.pagination-sm > li:first-child > span {
<API key>: 3px;
<API key>: 3px;
}
.pagination-sm > li:last-child > a,
.pagination-sm > li:last-child > span {
<API key>: 3px;
<API key>: 3px;
}
.pager {
padding-left: 0;
margin: 20px 0;
text-align: center;
list-style: none;
}
.pager li {
display: inline;
}
.pager li > a,
.pager li > span {
display: inline-block;
padding: 5px 14px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 15px;
}
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #eee;
}
.pager .next > a,
.pager .next > span {
float: right;
}
.pager .previous > a,
.pager .previous > span {
float: left;
}
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: #777;
cursor: not-allowed;
background-color: #fff;
}
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
}
a.label:hover,
a.label:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
}
.label:empty {
display: none;
}
.btn .label {
position: relative;
top: -1px;
}
.label-default {
background-color: #777;
}
.label-default[href]:hover,
.label-default[href]:focus {
background-color: #5e5e5e;
}
.label-primary {
background-color: #337ab7;
}
.label-primary[href]:hover,
.label-primary[href]:focus {
background-color: #286090;
}
.label-success {
background-color: #5cb85c;
}
.label-success[href]:hover,
.label-success[href]:focus {
background-color: #449d44;
}
.label-info {
background-color: #5bc0de;
}
.label-info[href]:hover,
.label-info[href]:focus {
background-color: #31b0d5;
}
.label-warning {
background-color: #f0ad4e;
}
.label-warning[href]:hover,
.label-warning[href]:focus {
background-color: #ec971f;
}
.label-danger {
background-color: #d9534f;
}
.label-danger[href]:hover,
.label-danger[href]:focus {
background-color: #c9302c;
}
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: 12px;
font-weight: bold;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: #777;
border-radius: 10px;
}
.badge:empty {
display: none;
}
.btn .badge {
position: relative;
top: -1px;
}
.btn-xs .badge,
.btn-group-xs > .btn .badge {
top: 0;
padding: 1px 5px;
}
a.badge:hover,
a.badge:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
}
.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: #337ab7;
background-color: #fff;
}
.list-group-item > .badge {
float: right;
}
.list-group-item > .badge + .badge {
margin-right: 5px;
}
.nav-pills > li > a > .badge {
margin-left: 3px;
}
.jumbotron {
padding-top: 30px;
padding-bottom: 30px;
margin-bottom: 30px;
color: inherit;
background-color: #eee;
}
.jumbotron h1,
.jumbotron .h1 {
color: inherit;
}
.jumbotron p {
margin-bottom: 15px;
font-size: 21px;
font-weight: 200;
}
.jumbotron > hr {
border-top-color: #d5d5d5;
}
.container .jumbotron,
.container-fluid .jumbotron {
border-radius: 6px;
}
.jumbotron .container {
max-width: 100%;
}
@media screen and (min-width: 768px) {
.jumbotron {
padding-top: 48px;
padding-bottom: 48px;
}
.container .jumbotron,
.container-fluid .jumbotron {
padding-right: 60px;
padding-left: 60px;
}
.jumbotron h1,
.jumbotron .h1 {
font-size: 63px;
}
}
.thumbnail {
display: block;
padding: 4px;
margin-bottom: 20px;
line-height: 1.42857143;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
-webkit-transition: border .2s ease-in-out;
-o-transition: border .2s ease-in-out;
transition: border .2s ease-in-out;
}
.thumbnail > img,
.thumbnail a > img {
margin-right: auto;
margin-left: auto;
}
a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
border-color: #337ab7;
}
.thumbnail .caption {
padding: 9px;
color: #333;
}
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
}
.alert h4 {
margin-top: 0;
color: inherit;
}
.alert .alert-link {
font-weight: bold;
}
.alert > p,
.alert > ul {
margin-bottom: 0;
}
.alert > p + p {
margin-top: 5px;
}
.alert-dismissable,
.alert-dismissible {
padding-right: 35px;
}
.alert-dismissable .close,
.alert-dismissible .close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
.alert-success {
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
}
.alert-success hr {
border-top-color: #c9e2b3;
}
.alert-success .alert-link {
color: #2b542c;
}
.alert-info {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}
.alert-info hr {
border-top-color: #a6e1ec;
}
.alert-info .alert-link {
color: #245269;
}
.alert-warning {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
}
.alert-warning hr {
border-top-color: #f7e1b5;
}
.alert-warning .alert-link {
color: #66512c;
}
.alert-danger {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
.alert-danger hr {
border-top-color: #e4b9c0;
}
.alert-danger .alert-link {
color: #843534;
}
@-webkit-keyframes <API key> {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@-o-keyframes <API key> {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@keyframes <API key> {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
.progress {
height: 20px;
margin-bottom: 20px;
overflow: hidden;
background-color: #f5f5f5;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
}
.progress-bar {
float: left;
width: 0;
height: 100%;
font-size: 12px;
line-height: 20px;
color: #fff;
text-align: center;
background-color: #337ab7;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
-webkit-transition: width .6s ease;
-o-transition: width .6s ease;
transition: width .6s ease;
}
.progress-striped .progress-bar,
.<API key> {
background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-<API key>: 40px 40px;
background-size: 40px 40px;
}
.progress.active .progress-bar,
.progress-bar.active {
-webkit-animation: <API key> 2s linear infinite;
-o-animation: <API key> 2s linear infinite;
animation: <API key> 2s linear infinite;
}
.<API key> {
background-color: #5cb85c;
}
.progress-striped .<API key> {
background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.progress-bar-info {
background-color: #5bc0de;
}
.progress-striped .progress-bar-info {
background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.<API key> {
background-color: #f0ad4e;
}
.progress-striped .<API key> {
background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.progress-bar-danger {
background-color: #d9534f;
}
.progress-striped .progress-bar-danger {
background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.media {
margin-top: 15px;
}
.media:first-child {
margin-top: 0;
}
.media,
.media-body {
overflow: hidden;
zoom: 1;
}
.media-body {
width: 10000px;
}
.media-object {
display: block;
}
.media-object.img-thumbnail {
max-width: none;
}
.media-right,
.media > .pull-right {
padding-left: 10px;
}
.media-left,
.media > .pull-left {
padding-right: 10px;
}
.media-left,
.media-right,
.media-body {
display: table-cell;
vertical-align: top;
}
.media-middle {
vertical-align: middle;
}
.media-bottom {
vertical-align: bottom;
}
.media-heading {
margin-top: 0;
margin-bottom: 5px;
}
.media-list {
padding-left: 0;
list-style: none;
}
.list-group {
padding-left: 0;
margin-bottom: 20px;
}
.list-group-item {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid #ddd;
}
.list-group-item:first-child {
<API key>: 4px;
<API key>: 4px;
}
.list-group-item:last-child {
margin-bottom: 0;
<API key>: 4px;
<API key>: 4px;
}
a.list-group-item,
button.list-group-item {
color: #555;
}
a.list-group-item .<API key>,
button.list-group-item .<API key> {
color: #333;
}
a.list-group-item:hover,
button.list-group-item:hover,
a.list-group-item:focus,
button.list-group-item:focus {
color: #555;
text-decoration: none;
background-color: #f5f5f5;
}
button.list-group-item {
width: 100%;
text-align: left;
}
.list-group-item.disabled,
.list-group-item.disabled:hover,
.list-group-item.disabled:focus {
color: #777;
cursor: not-allowed;
background-color: #eee;
}
.list-group-item.disabled .<API key>,
.list-group-item.disabled:hover .<API key>,
.list-group-item.disabled:focus .<API key> {
color: inherit;
}
.list-group-item.disabled .<API key>,
.list-group-item.disabled:hover .<API key>,
.list-group-item.disabled:focus .<API key> {
color: #777;
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
z-index: 2;
color: #fff;
background-color: #337ab7;
border-color: #337ab7;
}
.list-group-item.active .<API key>,
.list-group-item.active:hover .<API key>,
.list-group-item.active:focus .<API key>,
.list-group-item.active .<API key> > small,
.list-group-item.active:hover .<API key> > small,
.list-group-item.active:focus .<API key> > small,
.list-group-item.active .<API key> > .small,
.list-group-item.active:hover .<API key> > .small,
.list-group-item.active:focus .<API key> > .small {
color: inherit;
}
.list-group-item.active .<API key>,
.list-group-item.active:hover .<API key>,
.list-group-item.active:focus .<API key> {
color: #c7ddef;
}
.<API key> {
color: #3c763d;
background-color: #dff0d8;
}
a.<API key>,
button.<API key> {
color: #3c763d;
}
a.<API key> .<API key>,
button.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
button.<API key>:hover,
a.<API key>:focus,
button.<API key>:focus {
color: #3c763d;
background-color: #d0e9c6;
}
a.<API key>.active,
button.<API key>.active,
a.<API key>.active:hover,
button.<API key>.active:hover,
a.<API key>.active:focus,
button.<API key>.active:focus {
color: #fff;
background-color: #3c763d;
border-color: #3c763d;
}
.<API key> {
color: #31708f;
background-color: #d9edf7;
}
a.<API key>,
button.<API key> {
color: #31708f;
}
a.<API key> .<API key>,
button.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
button.<API key>:hover,
a.<API key>:focus,
button.<API key>:focus {
color: #31708f;
background-color: #c4e3f3;
}
a.<API key>.active,
button.<API key>.active,
a.<API key>.active:hover,
button.<API key>.active:hover,
a.<API key>.active:focus,
button.<API key>.active:focus {
color: #fff;
background-color: #31708f;
border-color: #31708f;
}
.<API key> {
color: #8a6d3b;
background-color: #fcf8e3;
}
a.<API key>,
button.<API key> {
color: #8a6d3b;
}
a.<API key> .<API key>,
button.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
button.<API key>:hover,
a.<API key>:focus,
button.<API key>:focus {
color: #8a6d3b;
background-color: #faf2cc;
}
a.<API key>.active,
button.<API key>.active,
a.<API key>.active:hover,
button.<API key>.active:hover,
a.<API key>.active:focus,
button.<API key>.active:focus {
color: #fff;
background-color: #8a6d3b;
border-color: #8a6d3b;
}
.<API key> {
color: #a94442;
background-color: #f2dede;
}
a.<API key>,
button.<API key> {
color: #a94442;
}
a.<API key> .<API key>,
button.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
button.<API key>:hover,
a.<API key>:focus,
button.<API key>:focus {
color: #a94442;
background-color: #ebcccc;
}
a.<API key>.active,
button.<API key>.active,
a.<API key>.active:hover,
button.<API key>.active:hover,
a.<API key>.active:focus,
button.<API key>.active:focus {
color: #fff;
background-color: #a94442;
border-color: #a94442;
}
.<API key> {
margin-top: 0;
margin-bottom: 5px;
}
.<API key> {
margin-bottom: 0;
line-height: 1.3;
}
.panel {
margin-bottom: 20px;
background-color: #fff;
border: 1px solid transparent;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.panel-body {
padding: 15px;
}
.panel-heading {
padding: 10px 15px;
border-bottom: 1px solid transparent;
<API key>: 3px;
<API key>: 3px;
}
.panel-heading > .dropdown .dropdown-toggle {
color: inherit;
}
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: 16px;
color: inherit;
}
.panel-title > a,
.panel-title > small,
.panel-title > .small,
.panel-title > small > a,
.panel-title > .small > a {
color: inherit;
}
.panel-footer {
padding: 10px 15px;
background-color: #f5f5f5;
border-top: 1px solid #ddd;
<API key>: 3px;
<API key>: 3px;
}
.panel > .list-group,
.panel > .panel-collapse > .list-group {
margin-bottom: 0;
}
.panel > .list-group .list-group-item,
.panel > .panel-collapse > .list-group .list-group-item {
border-width: 1px 0;
border-radius: 0;
}
.panel > .list-group:first-child .list-group-item:first-child,
.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
border-top: 0;
<API key>: 3px;
<API key>: 3px;
}
.panel > .list-group:last-child .list-group-item:last-child,
.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
border-bottom: 0;
<API key>: 3px;
<API key>: 3px;
}
.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
<API key>: 0;
<API key>: 0;
}
.panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0;
}
.list-group + .panel-footer {
border-top-width: 0;
}
.panel > .table,
.panel > .table-responsive > .table,
.panel > .panel-collapse > .table {
margin-bottom: 0;
}
.panel > .table caption,
.panel > .table-responsive > .table caption,
.panel > .panel-collapse > .table caption {
padding-right: 15px;
padding-left: 15px;
}
.panel > .table:first-child,
.panel > .table-responsive:first-child > .table:first-child {
<API key>: 3px;
<API key>: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
<API key>: 3px;
<API key>: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
<API key>: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
<API key>: 3px;
}
.panel > .table:last-child,
.panel > .table-responsive:last-child > .table:last-child {
<API key>: 3px;
<API key>: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
<API key>: 3px;
<API key>: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
<API key>: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
<API key>: 3px;
}
.panel > .panel-body + .table,
.panel > .panel-body + .table-responsive,
.panel > .table + .panel-body,
.panel > .table-responsive + .panel-body {
border-top: 1px solid #ddd;
}
.panel > .table > tbody:first-child > tr:first-child th,
.panel > .table > tbody:first-child > tr:first-child td {
border-top: 0;
}
.panel > .table-bordered,
.panel > .table-responsive > .table-bordered {
border: 0;
}
.panel > .table-bordered > thead > tr > th:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
.panel > .table-bordered > tbody > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
.panel > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-bordered > thead > tr > td:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
.panel > .table-bordered > tbody > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
.panel > .table-bordered > tfoot > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
border-left: 0;
}
.panel > .table-bordered > thead > tr > th:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
.panel > .table-bordered > tbody > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
.panel > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-bordered > thead > tr > td:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
.panel > .table-bordered > tbody > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
.panel > .table-bordered > tfoot > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
border-right: 0;
}
.panel > .table-bordered > thead > tr:first-child > td,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
.panel > .table-bordered > tbody > tr:first-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
.panel > .table-bordered > thead > tr:first-child > th,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
.panel > .table-bordered > tbody > tr:first-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
border-bottom: 0;
}
.panel > .table-bordered > tbody > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
.panel > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-bordered > tbody > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
.panel > .table-bordered > tfoot > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
border-bottom: 0;
}
.panel > .table-responsive {
margin-bottom: 0;
border: 0;
}
.panel-group {
margin-bottom: 20px;
}
.panel-group .panel {
margin-bottom: 0;
border-radius: 4px;
}
.panel-group .panel + .panel {
margin-top: 5px;
}
.panel-group .panel-heading {
border-bottom: 0;
}
.panel-group .panel-heading + .panel-collapse > .panel-body,
.panel-group .panel-heading + .panel-collapse > .list-group {
border-top: 1px solid #ddd;
}
.panel-group .panel-footer {
border-top: 0;
}
.panel-group .panel-footer + .panel-collapse .panel-body {
border-bottom: 1px solid #ddd;
}
.panel-default {
border-color: #ddd;
}
.panel-default > .panel-heading {
color: #333;
background-color: #f5f5f5;
border-color: #ddd;
}
.panel-default > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #ddd;
}
.panel-default > .panel-heading .badge {
color: #f5f5f5;
background-color: #333;
}
.panel-default > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #ddd;
}
.panel-primary {
border-color: #337ab7;
}
.panel-primary > .panel-heading {
color: #fff;
background-color: #337ab7;
border-color: #337ab7;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #337ab7;
}
.panel-primary > .panel-heading .badge {
color: #337ab7;
background-color: #fff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #337ab7;
}
.panel-success {
border-color: #d6e9c6;
}
.panel-success > .panel-heading {
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
}
.panel-success > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #d6e9c6;
}
.panel-success > .panel-heading .badge {
color: #dff0d8;
background-color: #3c763d;
}
.panel-success > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #d6e9c6;
}
.panel-info {
border-color: #bce8f1;
}
.panel-info > .panel-heading {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}
.panel-info > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #bce8f1;
}
.panel-info > .panel-heading .badge {
color: #d9edf7;
background-color: #31708f;
}
.panel-info > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #bce8f1;
}
.panel-warning {
border-color: #faebcc;
}
.panel-warning > .panel-heading {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
}
.panel-warning > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #faebcc;
}
.panel-warning > .panel-heading .badge {
color: #fcf8e3;
background-color: #8a6d3b;
}
.panel-warning > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #faebcc;
}
.panel-danger {
border-color: #ebccd1;
}
.panel-danger > .panel-heading {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
.panel-danger > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #ebccd1;
}
.panel-danger > .panel-heading .badge {
color: #f2dede;
background-color: #a94442;
}
.panel-danger > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #ebccd1;
}
.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
}
.embed-responsive .<API key>,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
.<API key> {
padding-bottom: 56.25%;
}
.<API key> {
padding-bottom: 75%;
}
.well {
min-height: 20px;
padding: 19px;
margin-bottom: 20px;
background-color: #f5f5f5;
border: 1px solid #e3e3e3;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
.well blockquote {
border-color: #ddd;
border-color: rgba(0, 0, 0, .15);
}
.well-lg {
padding: 24px;
border-radius: 6px;
}
.well-sm {
padding: 9px;
border-radius: 3px;
}
.close {
float: right;
font-size: 21px;
font-weight: bold;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
filter: alpha(opacity=20);
opacity: .2;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
filter: alpha(opacity=50);
opacity: .5;
}
button.close {
-webkit-appearance: none;
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
}
.modal-open {
overflow: hidden;
}
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
display: none;
overflow: hidden;
-<API key>: touch;
outline: 0;
}
.modal.fade .modal-dialog {
-webkit-transition: -webkit-transform .3s ease-out;
-o-transition: -o-transform .3s ease-out;
transition: transform .3s ease-out;
-webkit-transform: translate(0, -25%);
-ms-transform: translate(0, -25%);
-o-transform: translate(0, -25%);
transform: translate(0, -25%);
}
.modal.in .modal-dialog {
-webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
.modal-content {
position: relative;
background-color: #fff;
-<API key>: padding-box;
background-clip: padding-box;
border: 1px solid #999;
border: 1px solid rgba(0, 0, 0, .2);
border-radius: 6px;
outline: 0;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000;
}
.modal-backdrop.fade {
filter: alpha(opacity=0);
opacity: 0;
}
.modal-backdrop.in {
filter: alpha(opacity=50);
opacity: .5;
}
.modal-header {
min-height: 16.42857143px;
padding: 15px;
border-bottom: 1px solid #e5e5e5;
}
.modal-header .close {
margin-top: -2px;
}
.modal-title {
margin: 0;
line-height: 1.42857143;
}
.modal-body {
position: relative;
padding: 15px;
}
.modal-footer {
padding: 15px;
text-align: right;
border-top: 1px solid #e5e5e5;
}
.modal-footer .btn + .btn {
margin-bottom: 0;
margin-left: 5px;
}
.modal-footer .btn-group .btn + .btn {
margin-left: -1px;
}
.modal-footer .btn-block + .btn-block {
margin-left: 0;
}
.<API key> {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
@media (min-width: 768px) {
.modal-dialog {
width: 600px;
margin: 30px auto;
}
.modal-content {
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
}
.modal-sm {
width: 300px;
}
}
@media (min-width: 992px) {
.modal-lg {
width: 900px;
}
}
.tooltip {
position: absolute;
z-index: 1070;
display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
line-height: 1.42857143;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
white-space: normal;
filter: alpha(opacity=0);
opacity: 0;
line-break: auto;
}
.tooltip.in {
filter: alpha(opacity=90);
opacity: .9;
}
.tooltip.top {
padding: 5px 0;
margin-top: -3px;
}
.tooltip.right {
padding: 0 5px;
margin-left: 3px;
}
.tooltip.bottom {
padding: 5px 0;
margin-top: 3px;
}
.tooltip.left {
padding: 0 5px;
margin-left: -3px;
}
.tooltip-inner {
max-width: 200px;
padding: 3px 8px;
color: #fff;
text-align: center;
background-color: #000;
border-radius: 4px;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.top-left .tooltip-arrow {
right: 5px;
bottom: 0;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.top-right .tooltip-arrow {
bottom: 0;
left: 5px;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.tooltip.bottom-left .tooltip-arrow {
top: 0;
right: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.tooltip.bottom-right .tooltip-arrow {
top: 0;
left: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000;
}
.popover {
position: absolute;
top: 0;
left: 0;
z-index: 1060;
display: none;
max-width: 276px;
padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
font-style: normal;
font-weight: normal;
line-height: 1.42857143;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
white-space: normal;
background-color: #fff;
-<API key>: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, .2);
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
line-break: auto;
}
.popover.top {
margin-top: -10px;
}
.popover.right {
margin-left: 10px;
}
.popover.bottom {
margin-top: 10px;
}
.popover.left {
margin-left: -10px;
}
.popover-title {
padding: 8px 14px;
margin: 0;
font-size: 14px;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
border-radius: 5px 5px 0 0;
}
.popover-content {
padding: 9px 14px;
}
.popover > .arrow,
.popover > .arrow:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.popover > .arrow {
border-width: 11px;
}
.popover > .arrow:after {
content: "";
border-width: 10px;
}
.popover.top > .arrow {
bottom: -11px;
left: 50%;
margin-left: -11px;
border-top-color: #999;
border-top-color: rgba(0, 0, 0, .25);
border-bottom-width: 0;
}
.popover.top > .arrow:after {
bottom: 1px;
margin-left: -10px;
content: " ";
border-top-color: #fff;
border-bottom-width: 0;
}
.popover.right > .arrow {
top: 50%;
left: -11px;
margin-top: -11px;
border-right-color: #999;
border-right-color: rgba(0, 0, 0, .25);
border-left-width: 0;
}
.popover.right > .arrow:after {
bottom: -10px;
left: 1px;
content: " ";
border-right-color: #fff;
border-left-width: 0;
}
.popover.bottom > .arrow {
top: -11px;
left: 50%;
margin-left: -11px;
border-top-width: 0;
border-bottom-color: #999;
border-bottom-color: rgba(0, 0, 0, .25);
}
.popover.bottom > .arrow:after {
top: 1px;
margin-left: -10px;
content: " ";
border-top-width: 0;
border-bottom-color: #fff;
}
.popover.left > .arrow {
top: 50%;
right: -11px;
margin-top: -11px;
border-right-width: 0;
border-left-color: #999;
border-left-color: rgba(0, 0, 0, .25);
}
.popover.left > .arrow:after {
right: 1px;
bottom: -10px;
content: " ";
border-right-width: 0;
border-left-color: #fff;
}
.carousel {
position: relative;
}
.carousel-inner {
position: relative;
width: 100%;
overflow: hidden;
}
.carousel-inner > .item {
position: relative;
display: none;
-webkit-transition: .6s ease-in-out left;
-o-transition: .6s ease-in-out left;
transition: .6s ease-in-out left;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
line-height: 1;
}
@media all and (transform-3d), (-webkit-transform-3d) {
.carousel-inner > .item {
-webkit-transition: -webkit-transform .6s ease-in-out;
-o-transition: -o-transform .6s ease-in-out;
transition: transform .6s ease-in-out;
-<API key>: hidden;
backface-visibility: hidden;
-webkit-perspective: 1000px;
perspective: 1000px;
}
.carousel-inner > .item.next,
.carousel-inner > .item.active.right {
left: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
.carousel-inner > .item.prev,
.carousel-inner > .item.active.left {
left: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.carousel-inner > .item.next.left,
.carousel-inner > .item.prev.right,
.carousel-inner > .item.active {
left: 0;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.carousel-inner > .active,
.carousel-inner > .next,
.carousel-inner > .prev {
display: block;
}
.carousel-inner > .active {
left: 0;
}
.carousel-inner > .next,
.carousel-inner > .prev {
position: absolute;
top: 0;
width: 100%;
}
.carousel-inner > .next {
left: 100%;
}
.carousel-inner > .prev {
left: -100%;
}
.carousel-inner > .next.left,
.carousel-inner > .prev.right {
left: 0;
}
.carousel-inner > .active.left {
left: -100%;
}
.carousel-inner > .active.right {
left: 100%;
}
.carousel-control {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 15%;
font-size: 20px;
color: #fff;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
filter: alpha(opacity=50);
opacity: .5;
}
.carousel-control.left {
background-image: -<API key>(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
background-repeat: repeat-x;
}
.carousel-control.right {
right: 0;
left: auto;
background-image: -<API key>(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
background-repeat: repeat-x;
}
.carousel-control:hover,
.carousel-control:focus {
color: #fff;
text-decoration: none;
filter: alpha(opacity=90);
outline: 0;
opacity: .9;
}
.carousel-control .icon-prev,
.carousel-control .icon-next,
.carousel-control .<API key>,
.carousel-control .<API key> {
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
margin-top: -10px;
}
.carousel-control .icon-prev,
.carousel-control .<API key> {
left: 50%;
margin-left: -10px;
}
.carousel-control .icon-next,
.carousel-control .<API key> {
right: 50%;
margin-right: -10px;
}
.carousel-control .icon-prev,
.carousel-control .icon-next {
width: 20px;
height: 20px;
font-family: serif;
line-height: 1;
}
.carousel-control .icon-prev:before {
content: '\2039';
}
.carousel-control .icon-next:before {
content: '\203a';
}
.carousel-indicators {
position: absolute;
bottom: 10px;
left: 50%;
z-index: 15;
width: 60%;
padding-left: 0;
margin-left: -30%;
text-align: center;
list-style: none;
}
.carousel-indicators li {
display: inline-block;
width: 10px;
height: 10px;
margin: 1px;
text-indent: -999px;
cursor: pointer;
background-color: #000 \9;
background-color: rgba(0, 0, 0, 0);
border: 1px solid #fff;
border-radius: 10px;
}
.carousel-indicators .active {
width: 12px;
height: 12px;
margin: 0;
background-color: #fff;
}
.carousel-caption {
position: absolute;
right: 15%;
bottom: 20px;
left: 15%;
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: #fff;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.carousel-caption .btn {
text-shadow: none;
}
@media screen and (min-width: 768px) {
.carousel-control .<API key>,
.carousel-control .<API key>,
.carousel-control .icon-prev,
.carousel-control .icon-next {
width: 30px;
height: 30px;
margin-top: -15px;
font-size: 30px;
}
.carousel-control .<API key>,
.carousel-control .icon-prev {
margin-left: -15px;
}
.carousel-control .<API key>,
.carousel-control .icon-next {
margin-right: -15px;
}
.carousel-caption {
right: 20%;
left: 20%;
padding-bottom: 30px;
}
.carousel-indicators {
bottom: 20px;
}
}
.clearfix:before,
.clearfix:after,
.dl-horizontal dd:before,
.dl-horizontal dd:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after,
.form-horizontal .form-group:before,
.form-horizontal .form-group:after,
.btn-toolbar:before,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:before,
.btn-group-vertical > .btn-group:after,
.nav:before,
.nav:after,
.navbar:before,
.navbar:after,
.navbar-header:before,
.navbar-header:after,
.navbar-collapse:before,
.navbar-collapse:after,
.pager:before,
.pager:after,
.panel-body:before,
.panel-body:after,
.modal-footer:before,
.modal-footer:after {
display: table;
content: " ";
}
.clearfix:after,
.dl-horizontal dd:after,
.container:after,
.container-fluid:after,
.row:after,
.form-horizontal .form-group:after,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:after,
.nav:after,
.navbar:after,
.navbar-header:after,
.navbar-collapse:after,
.pager:after,
.panel-body:after,
.modal-footer:after {
clear: both;
}
.center-block {
display: block;
margin-right: auto;
margin-left: auto;
}
.pull-right {
float: right !important;
}
.pull-left {
float: left !important;
}
.hide {
display: none !important;
}
.show {
display: block !important;
}
.invisible {
visibility: hidden;
}
.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.hidden {
display: none !important;
}
.affix {
position: fixed;
}
@-ms-viewport {
width: device-width;
}
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
display: none !important;
}
.visible-xs-block,
.visible-xs-inline,
.<API key>,
.visible-sm-block,
.visible-sm-inline,
.<API key>,
.visible-md-block,
.visible-md-inline,
.<API key>,
.visible-lg-block,
.visible-lg-inline,
.<API key> {
display: none !important;
}
@media (max-width: 767px) {
.visible-xs {
display: block !important;
}
table.visible-xs {
display: table !important;
}
tr.visible-xs {
display: table-row !important;
}
th.visible-xs,
td.visible-xs {
display: table-cell !important;
}
}
@media (max-width: 767px) {
.visible-xs-block {
display: block !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline {
display: inline !important;
}
}
@media (max-width: 767px) {
.<API key> {
display: inline-block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm {
display: block !important;
}
table.visible-sm {
display: table !important;
}
tr.visible-sm {
display: table-row !important;
}
th.visible-sm,
td.visible-sm {
display: table-cell !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-block {
display: block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline {
display: inline !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.<API key> {
display: inline-block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md {
display: block !important;
}
table.visible-md {
display: table !important;
}
tr.visible-md {
display: table-row !important;
}
th.visible-md,
td.visible-md {
display: table-cell !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-block {
display: block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline {
display: inline !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.<API key> {
display: inline-block !important;
}
}
@media (min-width: 1200px) {
.visible-lg {
display: block !important;
}
table.visible-lg {
display: table !important;
}
tr.visible-lg {
display: table-row !important;
}
th.visible-lg,
td.visible-lg {
display: table-cell !important;
}
}
@media (min-width: 1200px) {
.visible-lg-block {
display: block !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline {
display: inline !important;
}
}
@media (min-width: 1200px) {
.<API key> {
display: inline-block !important;
}
}
@media (max-width: 767px) {
.hidden-xs {
display: none !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.hidden-sm {
display: none !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.hidden-md {
display: none !important;
}
}
@media (min-width: 1200px) {
.hidden-lg {
display: none !important;
}
}
.visible-print {
display: none !important;
}
@media print {
.visible-print {
display: block !important;
}
table.visible-print {
display: table !important;
}
tr.visible-print {
display: table-row !important;
}
th.visible-print,
td.visible-print {
display: table-cell !important;
}
}
.visible-print-block {
display: none !important;
}
@media print {
.visible-print-block {
display: block !important;
}
}
.<API key> {
display: none !important;
}
@media print {
.<API key> {
display: inline !important;
}
}
.<API key> {
display: none !important;
}
@media print {
.<API key> {
display: inline-block !important;
}
}
@media print {
.hidden-print {
display: none !important;
}
}
/*# sourceMappingURL=bootstrap.css.map */
|
#ifndef ASF_H
#define ASF_H
/*
* This file includes all API header files for the selected drivers from ASF.
* Note: There might be duplicate includes required by more than one driver.
*
* The file is automatically generated and will be re-written when
* running the ASF driver selector tool. Any changes will be discarded.
*/
// From module: Common SAM compiler driver
#include <compiler.h>
#include <status_codes.h>
// From module: EEFC - Enhanced Embedded Flash Controller
#include <efc.h>
// From module: Flash - SAM Flash Service API
#include <flash_efc.h>
// From module: GPIO - General purpose Input/Output
#include <gpio.h>
// From module: Generic board support
#include <board.h>
// From module: Generic components of unit test framework
#include <unit_test/suite.h>
// From module: IOPORT - General purpose I/O service
#include <ioport.h>
// From module: Interrupt management - SAM implementation
#include <interrupt.h>
// From module: PIO - Parallel Input/Output Controller
#include <pio.h>
// From module: PMC - Power Management Controller
#include <pmc.h>
#include <sleep.h>
// From module: Part identification macros
#include <parts.h>
// From module: SAM3S EK2 LED support enabled
#include <led.h>
// From module: SAM3SD8 startup code
#include <exceptions.h>
// From module: Standard serial I/O (stdio) - SAM implementation
#include <stdio_serial.h>
// From module: System Clock Control - SAM3SD implementation
#include <sysclk.h>
// From module: UART - Univ. Async Rec/Trans
#include <uart.h>
// From module: USART - Serial interface - SAM implementation for devices with both UART and USART
#include <serial.h>
// From module: USART - Univ. Syn Async Rec/Trans
#include <usart.h>
// From module: pio_handler support enabled
#include <pio_handler.h>
#endif // ASF_H
|
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m.06 9.34v2.14c-.92.02-1.84-.31-2.54-1.01-1.12-1.12-1.3-2.8-.59-4.13l-1.1-1.1c-1.28 1.94-1.07 4.59.64 6.29.97.98 2.25 1.47 3.53 1.47h.06v2l2.83-2.83-2.83-2.83zm3.48-4.88c-.99-.99-2.3-1.46-3.6-1.45V5L9.11 7.83l2.83 2.83V8.51H12c.9 0 1.79.34 2.48 1.02 1.12 1.12 1.3 2.8.59 4.13l1.1 1.1c1.28-1.94 1.07-4.59-.63-6.3z",
opacity: ".3"
}, "0"), /*#__PURE__*/_jsx("path", {
d: "M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm.06 11.34v2.14c-.92.02-1.84-.31-2.54-1.01-1.12-1.12-1.3-2.8-.59-4.13l-1.1-1.1c-1.28 1.94-1.07 4.59.64 6.29.97.98 2.25 1.47 3.53 1.47h.06v2l2.83-2.83-2.83-2.83zm3.48-4.88c-.99-.99-2.3-1.46-3.6-1.45V5L9.11 7.83l2.83 2.83V8.51H12c.9 0 1.79.34 2.48 1.02 1.12 1.12 1.3 2.8.59 4.13l1.1 1.1c1.28-1.94 1.07-4.59-.63-6.3z"
}, "1")], 'ChangeCircleTwoTone');
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging, os
logging.basicConfig(level=logging.INFO)
from deepy.networks import <API key>
from deepy.trainers import SGDTrainer, <API key>
from util import get_data, VECTOR_SIZE
model_path = os.path.join(os.path.dirname(__file__), "models", "rae1.gz")
if __name__ == '__main__':
model = <API key>(input_dim=VECTOR_SIZE, rep_dim=10)
trainer = SGDTrainer(model)
annealer = <API key>()
trainer.run(get_data(), epoch_controllers=[annealer])
model.save_params(model_path)
|
namespace StringExtensions
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
<summary>
Static class providing various string extension methods:
<list type="bullet">
<item>
<description>ToMd5Hash,</description>
</item>
<item>
<description>ToBoolean,</description>
</item>
<item>
<description>ToShort,</description>
</item>
<item>
<description>ToInteger,</description>
</item>
<item>
<description>ToLong,</description>
</item>
<item>
<description>ToDateTime,</description>
</item>
<item>
<description><API key>,</description>
</item>
<item>
<description><API key>,</description>
</item>
<item>
<description><API key>,</description>
</item>
<item>
<description>ToValidUsername,</description>
</item>
<item>
<description><API key>,</description>
</item>
<item>
<description>GetFirstCharacters,</description>
</item>
<item>
<description>GetFileExtension,</description>
</item>
<item>
<description>ToContentType,</description>
</item>
<item>
<description>ToByteArray,</description>
</item>
</list>
</summary>
public static class StringExtensions
{
<summary>
A string extension method that converts the target string to a byte array, and
computes the hashes for each element.
Then bytes are formatted as a hexadecimal strings and appended to the resulting
string that is finally returned.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>A hexadecimal string</returns>
<exception cref="<API key>">The algorithm was used with Federal Information Processing Standards (FIPS)
mode enabled, but is not FIPS compatible.</exception>
public static string ToMd5Hash(this string input)
{
var md5Hash = MD5.Create();
// Convert the input string to a byte array and compute the hash.
var data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));
// Create a new StringBuilder to collect the bytes
// and create a string.
var builder = new StringBuilder();
// Loop through each byte of the hashed data
// and format each one as a hexadecimal string.
for (int i = 0; i < data.Length; i++)
{
builder.Append(data[i].ToString("x2"));
}
// Return the hexadecimal string.
return builder.ToString();
}
<summary>
A string extension method that checks whether the target string is contained within a
predefined collection of true-like values.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>Whether the input is among the given true values (True/False)</returns>
public static bool ToBoolean(this string input)
{
var stringTrueValues = new[] { "true", "ok", "yes", "1", "да" };
return stringTrueValues.Contains(input.ToLower());
}
<summary>
Converts the target string to a short value and returns it.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The short value obtained from parsing the input string</returns>
public static short ToShort(this string input)
{
short shortValue;
short.TryParse(input, out shortValue);
return shortValue;
}
<summary>
Converts the target string to an integer value and returns it.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The integer value obtained from parsing the input string</returns>
public static int ToInteger(this string input)
{
int integerValue;
int.TryParse(input, out integerValue);
return integerValue;
}
<summary>
Converts the target string to a long value and returns it.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The long value obtained from parsing the input string</returns>
public static long ToLong(this string input)
{
long longValue;
long.TryParse(input, out longValue);
return longValue;
}
<summary>
Converts the target string to a DateTime value and returns it.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The DateTime value obtained from parsing the input string</returns>
public static DateTime ToDateTime(this string input)
{
DateTime dateTimeValue;
DateTime.TryParse(input, out dateTimeValue);
return dateTimeValue;
}
<summary>
Capitalizes the first letter of the target string.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The string with capital first letter.</returns>
public static string <API key>(this string input)
{
if (string.IsNullOrEmpty(input))
{
return input;
}
return input.Substring(0, 1).ToUpper(CultureInfo.CurrentCulture) + input.Substring(1, input.Length - 1);
}
<summary>
Returns the substring between two given substrings.
</summary>
<param name="input">The string the method is called upon.</param>
<param name="startString">The start of the substring</param>
<param name="endString">The end of the substring</param>
<param name="startFrom">The index to start the search from</param>
<returns>The found substring or an empty one</returns>
public static string GetStringBetween(this string input, string startString, string endString, int startFrom = 0)
{
input = input.Substring(startFrom);
startFrom = 0;
if (!input.Contains(startString) || !input.Contains(endString))
{
return string.Empty;
}
var startPosition = input.IndexOf(startString, startFrom, StringComparison.Ordinal) + startString.Length;
if (startPosition == -1)
{
return string.Empty;
}
var endPosition = input.IndexOf(endString, startPosition, StringComparison.Ordinal);
if (endPosition == -1)
{
return string.Empty;
}
return input.Substring(startPosition, endPosition - startPosition);
}
<summary>
Replaces cyrillic letters in a string with their latin representation.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The new string with latin letters.</returns>
public static string <API key>(this string input)
{
var bulgarianLetters = new[]
{
"а", "б", "в", "г", "д", "е", "ж", "з", "и", "й", "к", "л", "м", "н", "о", "п",
"р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ь", "ю", "я"
};
var <API key> = new[]
{
"a", "b", "v", "g", "d", "e", "j", "z", "i", "y", "k",
"l", "m", "n", "o", "p", "r", "s", "t", "u", "f", "h",
"c", "ch", "sh", "sht", "u", "i", "yu", "ya"
};
for (var i = 0; i < bulgarianLetters.Length; i++)
{
input = input.Replace(bulgarianLetters[i], <API key>[i]);
input = input.Replace(bulgarianLetters[i].ToUpper(), <API key>[i].<API key>());
}
return input;
}
<summary>
Replaces latin letters in a string with their cyrillic representation.
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The new string with cyrillic letters.</returns>
public static string <API key>(this string input)
{
var latinLetters = new[]
{
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
"q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
};
var <API key> = new[]
{
"а", "б", "ц", "д", "е", "ф", "г", "х", "и", "й", "к",
"л", "м", "н", "о", "п", "я", "р", "с", "т", "у", "ж",
"в", "ь", "ъ", "з"
};
for (int i = 0; i < latinLetters.Length; i++)
{
input = input.Replace(latinLetters[i], <API key>[i]);
input = input.Replace(latinLetters[i].ToUpper(), <API key>[i].ToUpper());
}
return input;
}
<summary>
Converts a string into a valid username
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The string after the cyrllic letters are converted to latin and all characters
that are not alpha-numeric, ".", or "_", are removed.</returns>
<exception cref="<API key>">A time-out occurred. For more information about time-outs, see the Remarks section.</exception>
public static string ToValidUsername(this string input)
{
input = input.<API key>();
return Regex.Replace(input, @"[^a-zA-z0-9_\.]+", string.Empty);
}
<summary>
Converts a string into a valid latin filename
</summary>
<param name="input">The string the method is called upon.</param>
<returns>The string after the cyrllic letters are converted to latin, spaces are replaced with "-",
and all characters that are not alpha-numeric, ".", "-", or "_", are removed.</returns>
<exception cref="<API key>">A time-out occurred. For more information about time-outs, see the Remarks section.</exception>
public static string <API key>(this string input)
{
input = input.Replace(" ", "-").<API key>();
return Regex.Replace(input, @"[^a-zA-z0-9_\.\-]+", string.Empty);
}
<summary>
Returns the first n characters from the string, where n is the second parameter.
</summary>
<param name="input">The string the method is called upon</param>
<param name="charsCount">The number of characters to be returned</param>
<returns>The first n characters from the string (or the whole string if charsCount
is larger than the length of the string).</returns>
public static string GetFirstCharacters(this string input, int charsCount)
{
return input.Substring(0, Math.Min(input.Length, charsCount));
}
<summary>
Returns the file extension of the given filename.
</summary>
<param name="fileName">The string (filename) the method is called upon.</param>
<returns>The file extension of the filename</returns>
public static string GetFileExtension(this string fileName)
{
if (string.IsNullOrWhiteSpace(fileName))
{
return string.Empty;
}
string[] fileParts = fileName.Split(new[] { "." }, StringSplitOptions.None);
if (fileParts.Count() == 1 || string.IsNullOrEmpty(fileParts.Last()))
{
return string.Empty;
}
return fileParts.Last().Trim().ToLower();
}
<summary>
Returns the content type of a file depending on its extension.
</summary>
<param name="fileExtension">The file extension</param>
<returns>The content type associated with the given file extension</returns>
public static string ToContentType(this string fileExtension)
{
var <API key> = new Dictionary<string, string>
{
{ "jpg", "image/jpeg" },
{ "jpeg", "image/jpeg" },
{ "png", "image/x-png" },
{
"docx",
"application/vnd.<API key>.wordprocessingml.document"
},
{ "doc", "application/msword" },
{ "pdf", "application/pdf" },
{ "txt", "text/plain" },
{ "rtf", "application/rtf" }
};
if (<API key>.ContainsKey(fileExtension.Trim()))
{
return <API key>[fileExtension.Trim()];
}
return "application/octet-stream";
}
<summary>
Converts a string into an array of bytes
</summary>
<param name="input">The string the method is called upon</param>
<returns>An array of bytes derived from converting every character
in the given string to its byte representation</returns>
<exception cref="OverflowException">The array is multidimensional and contains more than <see cref="F:System.Int32.MaxValue" /> elements.</exception>
public static byte[] ToByteArray(this string input)
{
var bytesArray = new byte[input.Length * sizeof(char)];
Buffer.BlockCopy(input.ToCharArray(), 0, bytesArray, 0, bytesArray.Length);
return bytesArray;
}
}
}
|
<?php declare(strict_types=1);
namespace WyriMaps\Tests\BattleNet\Resource\Async\WorldOfWarcraft;
use ApiClients\Tools\<API key>\<API key>;
use WyriMaps\BattleNet\Resource\Async\WorldOfWarcraft\EmptyQuest;
final class EmptyQuestTest extends <API key>
{
public function getSyncAsync(): string
{
return 'Async';
}
public function getClass(): string
{
return EmptyQuest::class;
}
}
|
# Gsp
[ combining across repositories which has great significance to the performance of webpage.
Gsp uses git hooks(pre-commit) to integrate lint and unit tests, besides it support coffee and less autocompiling.
## Installation
Install the application with: `npm install -g gsp`.
## The simulator
Gsp has simulator running for generating temple files based on resource requst, in additon, it can accomplish some tasks like lint and unit tests before commiting changes.
1. Run `gsp pull` in a new directory(path/to/workspace, for example) to clone all the development repositories.
2. Run `gsp start` on directory above to start a simulator for resource requst
3. Config a webserver(nginx/apache/lighttpd) and start
## Config nginx
text
server {
listen 80;
server_name static.resource.com;
charset utf-8;
location ~* \.(?:ttf|eot|woff)$ {
add_header "<API key>" "*";
expires 1M;
access_log off;
add_header Cache-Control "public";
proxy_set_header x-request-filename $request_filename;
proxy_pass http://127.0.0.1:7070;
}
location ~* /.+\.[a-z]+$ {
proxy_pass http://127.0.0.1:7070;
}
}
## Configs for communication
Gsp use a special domain "gsp.com" for interacting with server, this domain must link to the machine where the gsp server runs.
You can bind it in your DNS provider, or just edit the hosts file.
text
192.168.1.110 gsp.com
## Repository configuration
Every development repository should contain a `.gspconfig` file.
{
"publish_dir" : "dist",
"mapping_dir" : "app/home",
"lint": {
"js": {
"engine": "eslint",
"config": "eslint.json"
},
"css": {
"engine": "csslint",
"config": "csslint.json"
}
},
"test": {
"engine": "jasmine",
"src_files": "src*.js",
"spec_files": "test/spec*.js",
"helper_files": "test/helper*.js"
},
"compress": {
"png": true
},
"modular": {
"type": "amd",
"idprefix": "home",
|
module.exports={A:{A:{"2":"K C G E B A WB"},B:{"2":"D u Y I M H"},C:{"1":"6 7","2":"0 1 2 3 UB z F J K C G E B A D u Y I M H N O P Q R S T U V W X w Z a b c d e f L h i j k l m n o p q r s t y SB RB","132":"v","578":"5 g"},D:{"1":"0 1 2 3 5 6 7 t y v g GB BB DB VB EB","2":"F J K C G E B A D u Y I M H N O P Q R S T U V W X w Z a b c d e f L h i j k l m n o p q r s"},E:{"1":"MB","2":"F J K C G E B FB AB HB IB JB KB LB","322":"A"},F:{"1":"L h i j k l m n o p q r s t","2":"8 9 E A D I M H N O P Q R S T U V W X w Z a b c d e f NB OB PB QB TB x"},G:{"2":"4 G AB CB XB YB ZB aB bB cB dB eB","322":"A"},H:{"2":"fB"},I:{"1":"v","2":"4 z F gB hB iB jB kB lB"},J:{"2":"C B"},K:{"1":"L","2":"8 9 B A D x"},L:{"1":"BB"},M:{"132":"g"},N:{"2":"B A"},O:{"2":"mB"},P:{"1":"J","2":"F"},Q:{"2":"nB"},R:{"2":"oB"}},B:5,C:"Resource Hints: preload"};
|
SVG.G = SVG.invent({
// Initialize node
create: 'g'
// Inherit from
, inherit: SVG.Container
// Add class methods
, extend: {
// Move over x-axis
x: function(x) {
return x == null ? this.transform('x') : this.transform({ x: x - this.x() }, true)
}
// Move over y-axis
, y: function(y) {
return y == null ? this.transform('y') : this.transform({ y: y - this.y() }, true)
}
// Move by center over x-axis
, cx: function(x) {
return x == null ? this.gbox().cx : this.x(x - this.gbox().width / 2)
}
// Move by center over y-axis
, cy: function(y) {
return y == null ? this.gbox().cy : this.y(y - this.gbox().height / 2)
}
, gbox: function() {
var bbox = this.bbox()
, trans = this.transform()
bbox.x += trans.x
bbox.x2 += trans.x
bbox.cx += trans.x
bbox.y += trans.y
bbox.y2 += trans.y
bbox.cy += trans.y
return bbox
}
}
// Add parent method
, construct: {
// Create a group element
group: function() {
return this.put(new SVG.G)
}
}
})
|
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Runtime.InteropServices;
namespace Wox
{
public class ImagePathConverter : <API key>
{
private static Dictionary<string, object> imageCache = new Dictionary<string, object>();
private static ImageSource GetIcon(string fileName)
{
Icon icon = GetFileIcon(fileName);
if (icon == null) icon = Icon.<API key>(fileName);
if (icon != null)
{
return System.Windows.Interop.Imaging.<API key>(icon.Handle, new Int32Rect(0, 0, icon.Width, icon.Height), BitmapSizeOptions.FromEmptyOptions());
}
return null;
}
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
object img = null;
if (values[0] == null) return null;
string path = values[0].ToString();
string pluginDirectory = values[1].ToString();
string fullPath = Path.Combine(pluginDirectory, path);
if (imageCache.ContainsKey(fullPath))
{
return imageCache[fullPath];
}
string resolvedPath = string.Empty;
if (!string.IsNullOrEmpty(path) && path.Contains(":\\") && File.Exists(path))
{
resolvedPath = path;
}
else if (!string.IsNullOrEmpty(path) && File.Exists(fullPath))
{
resolvedPath = fullPath;
}
if (resolvedPath.ToLower().EndsWith(".exe") || resolvedPath.ToLower().EndsWith(".lnk"))
{
img = GetIcon(resolvedPath);
}
else if (!string.IsNullOrEmpty(resolvedPath) && File.Exists(resolvedPath))
{
img = new BitmapImage(new Uri(resolvedPath));
}
if (img != null)
{
imageCache.Add(fullPath, img);
}
return img;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
return null;
}
public static System.Drawing.Icon GetFileIcon(string name)
{
SHFILEINFO shfi = new SHFILEINFO();
uint flags = SHGFI_SYSICONINDEX;
IntPtr himl = SHGetFileInfo(name,
<API key>,
ref shfi,
(uint)System.Runtime.InteropServices.Marshal.SizeOf(shfi),
flags);
if (himl != IntPtr.Zero)
{
IntPtr hIcon = ImageList_GetIcon(himl, shfi.iIcon, ILD_NORMAL);
System.Drawing.Icon icon = (System.Drawing.Icon)System.Drawing.Icon.FromHandle(hIcon).Clone();
DestroyIcon(hIcon);
return icon;
}
return null;
}
[DllImport("comctl32.dll", SetLastError = true)]
private static extern IntPtr ImageList_GetIcon(IntPtr himl, int i, uint flags);
private const int MAX_PATH = 256;
[StructLayout(LayoutKind.Sequential)]
private struct SHITEMID
{
public ushort cb;
[MarshalAs(UnmanagedType.LPArray)]
public byte[] abID;
}
[StructLayout(LayoutKind.Sequential)]
private struct ITEMIDLIST
{
public SHITEMID mkid;
}
[StructLayout(LayoutKind.Sequential)]
private struct BROWSEINFO
{
public IntPtr hwndOwner;
public IntPtr pidlRoot;
public IntPtr pszDisplayName;
[MarshalAs(UnmanagedType.LPTStr)]
public string lpszTitle;
public uint ulFlags;
public IntPtr lpfn;
public int lParam;
public IntPtr iImage;
}
// Browsing for directory.
private const uint <API key> = 0x0001;
private const uint <API key> = 0x0002;
private const uint BIF_STATUSTEXT = 0x0004;
private const uint <API key> = 0x0008;
private const uint BIF_EDITBOX = 0x0010;
private const uint BIF_VALIDATE = 0x0020;
private const uint BIF_NEWDIALOGSTYLE = 0x0040;
private const uint BIF_USENEWUI = (BIF_NEWDIALOGSTYLE | BIF_EDITBOX);
private const uint <API key> = 0x0080;
private const uint <API key> = 0x1000;
private const uint <API key> = 0x2000;
private const uint <API key> = 0x4000;
private const uint BIF_SHAREABLE = 0x8000;
[StructLayout(LayoutKind.Sequential)]
private struct SHFILEINFO
{
public const int NAMESIZE = 80;
public IntPtr hIcon;
public int iIcon;
public uint dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = NAMESIZE)]
public string szTypeName;
};
private const uint SHGFI_ICON = 0x000000100; // get icon
private const uint SHGFI_DISPLAYNAME = 0x000000200; // get display name
private const uint SHGFI_TYPENAME = 0x000000400; // get type name
private const uint SHGFI_ATTRIBUTES = 0x000000800; // get attributes
private const uint SHGFI_ICONLOCATION = 0x000001000; // get icon location
private const uint SHGFI_EXETYPE = 0x000002000; // return exe type
private const uint SHGFI_SYSICONINDEX = 0x000004000; // get system icon index
private const uint SHGFI_LINKOVERLAY = 0x000008000; // put a link overlay on icon
private const uint SHGFI_SELECTED = 0x000010000; // show icon in selected state
private const uint <API key> = 0x000020000; // get only specified attributes
private const uint SHGFI_LARGEICON = 0x000000000; // get large icon
private const uint SHGFI_SMALLICON = 0x000000001; // get small icon
private const uint SHGFI_OPENICON = 0x000000002; // get open icon
private const uint SHGFI_SHELLICONSIZE = 0x000000004; // get shell size icon
private const uint SHGFI_PIDL = 0x000000008; // pszPath is a pidl
private const uint <API key> = 0x000000010; // use passed dwFileAttribute
private const uint SHGFI_ADDOVERLAYS = 0x000000020; // apply the appropriate overlays
private const uint SHGFI_OVERLAYINDEX = 0x000000040; // Get the index of the overlay
private const uint <API key> = 0x00000010;
private const uint <API key> = 0x00000080;
private const uint ILD_NORMAL = 0x00000000;
[DllImport("Shell32.dll")]
private static extern IntPtr SHGetFileInfo(
string pszPath,
uint dwFileAttributes,
ref SHFILEINFO psfi,
uint cbFileInfo,
uint uFlags
);
[DllImport("User32.dll")]
private static extern int DestroyIcon(IntPtr hIcon);
}
}
|
--TEST
/** test \n*/
--SKIPIF
<?php
if (!@include_once('PhpDocumentor/phpDocumentor/DocBlock/Lexer.inc')) {
echo 'skip needs <API key> class';
}
?>
--FILE
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';
$result = $lexer->lex("/** test \n*/");
$phpt->assertEquals(array(
array(<API key>, ' test'),
array(<API key>, "\n")
), $result, 'result 1');
$result = $lexer->lex("/** test \r\n*/");
$phpt->assertEquals(array(
array(<API key>, ' test'),
array(<API key>, "\n")
), $result, 'result');
$result = $lexer->lex("/** test \r*/");
$phpt->assertEquals(array(
array(<API key>, ' test'),
array(<API key>, "\n")
), $result, 'result');
echo 'test done';
?>
--EXPECT
test done
|
using System.Data.Entity.Migrations;
namespace Cake.EntityFramework.TestProject.Postgres.Migrations
{
public partial class V7 : DbMigration
{
public override void Up()
{
}
public override void Down()
{
}
}
}
|
using System;
using System.Collections.Generic;
using System.IO;
#if !WINDOWS_UWP
using System.Net;
using System.Net.Http;
#endif // !WINDOWS_UWP
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
#if WINDOWS_UWP
using Windows.Foundation;
using Windows.Security.Credentials;
using Windows.Storage.Streams;
using Windows.Web.Http;
using Windows.Web.Http.Filters;
using Windows.Web.Http.Headers;
#endif
namespace Microsoft.Tools.WindowsDevicePortal
{
<content>
Wrappers for App Deployment methods.
</content>
public partial class DevicePortal
{
<summary>
API to retrieve list of installed packages.
</summary>
public static readonly string <API key> = "api/app/packagemanager/packages";
<summary>
Install state API.
</summary>
public static readonly string InstallStateApi = "api/app/packagemanager/state";
<summary>
API for package management.
</summary>
public static readonly string PackageManagerApi = "api/app/packagemanager/package";
<summary>
App Install Status handler.
</summary>
public event <API key> AppInstallStatus;
<summary>
Gets the collection of applications installed on the device.
</summary>
<returns>AppPackages object containing the list of installed application packages.</returns>
public async Task<AppPackages> <API key>()
{
return await this.GetAsync<AppPackages>(<API key>);
}
<summary>
Installs an application
</summary>
<param name="appName">Friendly name (ex: Hello World) of the application. If this parameter is not provided, the name of the package is assumed to be the app name.</param>
<param name="packageFileName">Full name of the application package file.</param>
<param name="dependencyFileNames">List containing the full names of any required dependency files.</param>
<param name="certificateFileName">Full name of the optional certificate file.</param>
<param name="<API key>">How frequently we should check the installation state.</param>
<param name="timeoutInMinutes">Operation timeout.</param>
<param name="<API key>">Indicate whether or not the previous app version should be uninstalled prior to installing.</param>
<remarks>InstallApplication sends <API key> events to indicate the current progress in the installation process.
Some applications may opt to not register for the AppInstallStatus event and await on InstallApplication.</remarks>
<returns>Task for tracking completion of install initialization.</returns>
public async Task <API key>(
string appName,
string packageFileName,
List<string> dependencyFileNames,
string certificateFileName = null,
short <API key> = 500,
short timeoutInMinutes = 15,
bool <API key> = true)
{
string <API key> = string.Empty;
try
{
FileInfo packageFile = new FileInfo(packageFileName);
// If appName was not provided, use the package file name
if (string.IsNullOrEmpty(appName))
{
appName = packageFile.Name;
}
// Uninstall the application's previous version, if one exists.
if (<API key>)
{
<API key> = string.Format("Uninstalling any previous version of {0}", appName);
this.<API key>(
<API key>.InProgress,
<API key>.<API key>,
<API key>);
AppPackages installedApps = await this.<API key>();
foreach (PackageInfo package in installedApps.Packages)
{
if (package.Name == appName)
{
await this.<API key>(package.FullName);
break;
}
}
}
// Create the API endpoint and generate a unique boundary string.
Uri uri;
string boundaryString;
this.<API key>(
packageFile.Name,
out uri,
out boundaryString);
<API key> = string.Format("Copying: {0}", packageFile.Name);
this.<API key>(
<API key>.InProgress,
<API key>.CopyingFile,
<API key>);
var content = new <API key>();
content.Add(packageFile.FullName);
content.AddRange(dependencyFileNames);
content.Add(certificateFileName);
await this.PostAsync(uri, content);
// Poll the status until complete.
<API key> status = <API key>.InProgress;
do
{
<API key> = string.Format("Installing {0}", appName);
this.<API key>(
<API key>.InProgress,
<API key>.Installing,
<API key>);
await Task.Delay(TimeSpan.FromMilliseconds(<API key>));
status = await this.<API key>().ConfigureAwait(false);
}
while (status == <API key>.InProgress);
<API key> = string.Format("{0} installed successfully", appName);
this.<API key>(
<API key>.Completed,
<API key>.Idle,
<API key>);
}
catch (Exception e)
{
<API key> dpe = e as <API key>;
if (dpe != null)
{
this.<API key>(
<API key>.Failed,
<API key>.Idle,
string.Format("Failed to install {0}: {1}", appName, dpe.Reason));
}
else
{
this.<API key>(
<API key>.Failed,
<API key>.Idle,
string.Format("Failed to install {0}: {1}", appName, <API key>));
}
}
}
<summary>
Uninstalls the specified application.
</summary>
<param name="packageName">The name of the application package to uninstall.</param>
<returns>Task tracking the uninstall operation.</returns>
public async Task <API key>(string packageName)
{
await this.DeleteAsync(
PackageManagerApi,
/ NOTE: When uninstalling an app package, the package name is not Hex64 encoded.
string.Format("package={0}", packageName));
}
<summary>
Builds the application installation Uri and generates a unique boundary string for the multipart form data.
</summary>
<param name="packageName">The name of the application package.</param>
<param name="uri">The endpoint for the install request.</param>
<param name="boundaryString">Unique string used to separate the parts of the multipart form data.</param>
private void <API key>(
string packageName,
out Uri uri,
out string boundaryString)
{
uri = Utilities.BuildEndpoint(
this.deviceConnection.Connection,
PackageManagerApi,
string.Format("package={0}", packageName));
boundaryString = Guid.NewGuid().ToString();
}
<summary>
Sends application install status.
</summary>
<param name="status">Status of the installation.</param>
<param name="phase">Current installation phase (ex: Uninstalling previous version)</param>
<param name="message">Optional error message describing the install status.</param>
private void <API key>(
<API key> status,
<API key> phase,
string message = "")
{
this.AppInstallStatus?.Invoke(
this,
new <API key>(status, phase, message));
}
#region Data contract
<summary>
Object representing a list of Application Packages
</summary>
[DataContract]
public class AppPackages
{
<summary>
Gets a list of the packages
</summary>
[DataMember(Name = "InstalledPackages")]
public List<PackageInfo> Packages { get; private set; }
<summary>
Presents a user readable representation of a list of AppPackages
</summary>
<returns>User readable list of AppPackages.</returns>
public override string ToString()
{
string output = "Packages:\n";
foreach (PackageInfo package in this.Packages)
{
output += package;
}
return output;
}
}
<summary>
Object representing the install state
</summary>
[DataContract]
public class InstallState
{
<summary>
Gets install state code
</summary>
[DataMember(Name = "Code")]
public int Code { get; private set; }
<summary>
Gets message text
</summary>
[DataMember(Name = "CodeText")]
public string CodeText { get; private set; }
<summary>
Gets reason for state
</summary>
[DataMember(Name = "Reason")]
public string Reason { get; private set; }
<summary>
Gets a value indicating whether this was successful
</summary>
[DataMember(Name = "Success")]
public bool WasSuccessful { get; private set; }
}
<summary>
object representing the package information
</summary>
[DataContract]
public class PackageInfo
{
<summary>
Gets package name
</summary>
[DataMember(Name = "Name")]
public string Name { get; private set; }
<summary>
Gets package family name
</summary>
[DataMember(Name = "PackageFamilyName")]
public string FamilyName { get; private set; }
<summary>
Gets package full name
</summary>
[DataMember(Name = "PackageFullName")]
public string FullName { get; private set; }
<summary>
Gets package relative Id
</summary>
[DataMember(Name = "PackageRelativeId")]
public string AppId { get; private set; }
<summary>
Gets package publisher
</summary>
[DataMember(Name = "Publisher")]
public string Publisher { get; private set; }
<summary>
Gets package version
</summary>
[DataMember(Name = "Version")]
public PackageVersion Version { get; private set; }
<summary>
Gets package origin, a measure of how the app was installed.
<API key> = 0,
<API key> = 1,
PackageOrigin_Inbox = 2,
PackageOrigin_Store = 3,
<API key> = 4,
<API key> = 5,
<API key> = 6
</summary>
[DataMember(Name = "PackageOrigin")]
public int PackageOrigin { get; private set; }
<summary>
Helper method to determine if the app was sideloaded and therefore can be used with e.g. <API key>
</summary>
<returns> True if the package is sideloaded. </returns>
public bool IsSideloaded()
{
return this.PackageOrigin == 4 || this.PackageOrigin == 5;
}
<summary>
Get a string representation of the package
</summary>
<returns>String representation</returns>
public override string ToString()
{
return string.Format("\t{0}\n\t\t{1}\n", this.FullName, this.AppId);
}
}
<summary>
Object representing a package version
</summary>
[DataContract]
public class PackageVersion
{
<summary>
Gets version build
</summary>
[DataMember(Name = "Build")]
public int Build { get; private set; }
<summary>
Gets package Major number
</summary>
[DataMember(Name = "Major")]
public int Major { get; private set; }
<summary>
Gets package minor number
</summary>
[DataMember(Name = "Minor")]
public int Minor { get; private set; }
<summary>
Gets package revision
</summary>
[DataMember(Name = "Revision")]
public int Revision { get; private set; }
<summary>
Gets package version
</summary>
public Version Version
{
get { return new Version(this.Major, this.Minor, this.Build, this.Revision); }
}
<summary>
Get a string representation of a version
</summary>
<returns>String representation</returns>
public override string ToString()
{
return Version.ToString();
}
}
#endregion // Data contract
}
}
|
'use strict';
module.exports = function generate_format(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
if (it.opts.format === false) {
if ($breakOnError) {
out += ' if (true) { ';
}
return out;
}
var $isData = it.opts.v5 && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $unknownFormats = it.opts.unknownFormats,
$allowUnknown = Array.isArray($unknownFormats);
if ($isData) {
var $format = 'format' + $lvl;
out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { ';
if (it.async) {
out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';
}
out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
}
out += ' (';
if ($unknownFormats === true || $allowUnknown) {
out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';
if ($allowUnknown) {
out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';
}
out += ') || ';
}
out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? ';
if (it.async) {
out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';
} else {
out += ' ' + ($format) + '(' + ($data) + ') ';
}
out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';
} else {
var $format = it.formats[$schema];
if (!$format) {
if ($unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1)) {
throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"');
} else {
if (!$allowUnknown) {
console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"');
if ($unknownFormats !== 'ignore') console.warn('In the next major version it will throw exception. See option unknownFormats for more information');
}
if ($breakOnError) {
out += ' if (true) { ';
}
return out;
}
}
var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;
if ($isObject) {
var $async = $format.async === true;
$format = $format.validate;
}
if ($async) {
if (!it.async) throw new Error('async format in sync schema');
var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';
out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { ';
} else {
out += ' if (! ';
var $formatRef = 'formats' + it.util.getProperty($schema);
if ($isObject) $formatRef += '.validate';
if (typeof $format == 'function') {
out += ' ' + ($formatRef) + '(' + ($data) + ') ';
} else {
out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';
}
out += ') { ';
}
}
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';
if ($isData) {
out += '' + ($schemaValue);
} else {
out += '' + (it.util.toQuotedString($schema));
}
out += ' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should match format "';
if ($isData) {
out += '\' + ' + ($schemaValue) + ' + \'';
} else {
out += '' + (it.util.escapeQuotes($schema));
}
out += '"\' ';
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + (it.util.toQuotedString($schema));
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}
|
package org.luban.common.plugin;
import org.luban.common.network.URL;
/**
*
*
* @author hexiaofeng
* @version 1.0.0
* @since 12-12-12 8:47
*/
public interface ServicePlugin {
/**
*
*
* @return
*/
String getType();
/**
* URL
*
* @param url
*/
void setUrl(URL url);
}
|
#!/usr/bin/env python2
import ee
# Initialize the Earth Engine
ee.Initialize()
# Small rectangle used to generate the image, over the Amazonian forest.
# The location is above the Rondonia (West of Bresil).
rectangle = ee.Geometry.Rectangle(-68, -7, -65, -8)
# Get the MODIS dataset.
collection = ee.ImageCollection('MODIS/MOD13A1')
# Select the EVI, since it is more accurate on this dataset. You can also
# use the NDVI band here.
collection = collection.select(['EVI'])
# Get two dataset, one over the year 2000 and the other one over 2015
ndvi2000 = collection.filterDate('2000-01-01', '2000-12-31').median()
ndvi2015 = collection.filterDate('2015-01-01', '2015-12-31').median()
# Substract the two datasets to see the evolution between both of them.
difference = ndvi2015.subtract(ndvi2000)
# Use a mask to avoid showing data on rivers.
# TODO(funkysayu) move this mask to blue color.
classifiedImage = ee.Image('MODIS/051/MCD12Q1/2001_01_01')
mask = classifiedImage.select(['Land_Cover_Type_1'])
maskedDifference = difference.updateMask(mask)
# Convert it to RGB image.
visualized = maskedDifference.visualize(
min=-2000,
max=2000,
palette='FF0000, 000000, 00FF00',
)
# Finally generate the PNG.
print visualized.getDownloadUrl({
'region': rectangle.toGeoJSONString(),
'scale': 500,
'format': 'png',
})
|
require File.expand_path("../../../test_helper", __FILE__)
describe Flipflop::Strategies::DefaultStrategy do
before do
Flipflop::FeatureSet.current.replace do
Flipflop.configure do
feature :one, default: true
feature :two
end
end
end
describe "with defaults" do
subject do
Flipflop::Strategies::DefaultStrategy.new.freeze
end
it "should have default name" do
assert_equal "default", subject.name
end
it "should have title derived from name" do
assert_equal "Default", subject.title
end
it "should have no default description" do
assert_equal "Uses feature default status.", subject.description
end
it "should not be switchable" do
assert_equal false, subject.switchable?
end
it "should have unique key" do
assert_match /^\w+$/, subject.key
end
describe "with explicitly defaulted feature" do
it "should have feature enabled" do
assert_equal true, subject.enabled?(:one)
end
end
describe "with implicitly defaulted feature" do
it "should not have feature enabled" do
assert_equal false, subject.enabled?(:two)
end
end
end
end
|
require 'forwardable'
require 'puppet/node'
require 'puppet/resource/catalog'
require 'puppet/util/errors'
require 'puppet/resource/<API key>'
# Maintain a graph of scopes, along with a bunch of data
# about the individual catalog we're compiling.
class Puppet::Parser::Compiler
extend Forwardable
include Puppet::Util
include Puppet::Util::Errors
include Puppet::Util::MethodHelper
include Puppet::Resource::<API key>
def self.compile(node)
$<API key> = nil
node.environment.check_for_reparse
if node.environment.<API key>?
errmsg = [
"The '<API key>' setting is true, and this '#{node.environment}'",
"has an environment.conf manifest that conflicts with the 'default_manifest' setting.",
"Compilation has been halted in order to avoid running a catalog which may be using",
"unexpected manifests. For more information, see",
"http://docs.puppetlabs.com/puppet/latest/reference/environments.html",
]
raise(Puppet::Error, errmsg.join(' '))
end
new(node).compile {|resulting_catalog| resulting_catalog.to_resource }
rescue Puppet::ParseErrorWithIssue => detail
detail.node = node.name
Puppet.log_exception(detail)
raise
rescue => detail
message = "#{detail} on node #{node.name}"
Puppet.log_exception(detail, message)
raise Puppet::Error, message, detail.backtrace
end
attr_reader :node, :facts, :collections, :catalog, :resources, :relationships, :topscope
# The injector that provides lookup services, or nil if accessed before the compiler has started compiling and
# bootstrapped. The injector is initialized and available before any manifests are evaluated.
# @return [Puppet::Pops::Binder::Injector, nil] The injector that provides lookup services for this compiler/environment
# @api public
attr_accessor :injector
# Access to the configured loaders for 4x
# @return [Puppet::Pops::Loader::Loaders] the configured loaders
# @api private
attr_reader :loaders
# The injector that provides lookup services during the creation of the {#injector}.
# @return [Puppet::Pops::Binder::Injector, nil] The injector that provides lookup services during injector creation
# for this compiler/environment
# @api private
attr_accessor :boot_injector
# Add a collection to the global list.
def_delegator :@collections, :<<, :add_collection
def_delegator :@relationships, :<<, :add_relationship
# Store a resource override.
def add_override(override)
# If possible, merge the override in immediately.
if resource = @catalog.resource(override.ref)
resource.merge(override)
else
# Otherwise, store the override for later; these
# get evaluated in Resource#finish.
@resource_overrides[override.ref] << override
end
end
def add_resource(scope, resource)
@resources << resource
# Note that this will fail if the resource is not unique.
@catalog.add_resource(resource)
if not resource.class? and resource[:stage]
raise ArgumentError, "Only classes can set 'stage'; normal resources like #{resource} cannot change run stage"
end
# Stages should not be inside of classes. They are always a
# top-level container, regardless of where they appear in the
# manifest.
return if resource.stage?
# This adds a resource to the class it lexically appears in in the
# manifest.
unless resource.class?
return @catalog.add_edge(scope.resource, resource)
end
end
# Do we use nodes found in the code, vs. the external node sources?
def_delegator :<API key>, :nodes?, :ast_nodes?
# Store the fact that we've evaluated a class
def add_class(name)
@catalog.add_class(name) unless name == ""
end
# Return a list of all of the defined classes.
def_delegator :@catalog, :classes, :classlist
# Compiler our catalog. This mostly revolves around finding and evaluating classes.
# This is the main entry into our catalog.
def compile
Puppet.override( @context_overrides , "For compiling #{node.name}") do
@catalog.<API key> = environment
# Set the client's parameters into the top scope.
Puppet::Util::Profiler.profile("Compile: Set node parameters", [:compiler, :set_node_params]) { set_node_parameters }
Puppet::Util::Profiler.profile("Compile: Created settings scope", [:compiler, :<API key>]) { <API key> }
if is_binder_active?
# create injector, if not already created - this is for 3x that does not trigger
# lazy loading of injector via context
Puppet::Util::Profiler.profile("Compile: Created injector", [:compiler, :create_injector]) { injector }
end
Puppet::Util::Profiler.profile("Compile: Evaluated main", [:compiler, :evaluate_main]) { evaluate_main }
Puppet::Util::Profiler.profile("Compile: Evaluated AST node", [:compiler, :evaluate_ast_node]) { evaluate_ast_node }
Puppet::Util::Profiler.profile("Compile: Evaluated node classes", [:compiler, :<API key>]) { <API key> }
Puppet::Util::Profiler.profile("Compile: Evaluated generators", [:compiler, :evaluate_generators]) { evaluate_generators }
Puppet::Util::Profiler.profile("Compile: Finished catalog", [:compiler, :finish_catalog]) { finish }
fail_on_unevaluated
if block_given?
yield @catalog
else
@catalog
end
end
end
# Constructs the overrides for the context
def context_overrides()
if Puppet.future_parser?(environment)
{
:current_environment => environment,
:global_scope => @topscope, # 4x placeholder for new global scope
:loaders => lambda {|| loaders() }, # 4x loaders
:injector => lambda {|| injector() } # 4x API - via context instead of via compiler
}
else
{
:current_environment => environment,
}
end
end
def_delegator :@collections, :delete, :delete_collection
# Return the node's environment.
def environment
node.environment
end
# Evaluate all of the classes specified by the node.
# Classes with parameters are evaluated as if they were declared.
# Classes without parameters or with an empty set of parameters are evaluated
# as if they were included. This means classes with an empty set of
# parameters won't conflict even if the class has already been included.
def <API key>
if @node.classes.is_a? Hash
classes_with_params, <API key> = @node.classes.partition {|name,params| params and !params.empty?}
# The results from Hash#partition are arrays of pairs rather than hashes,
# so we have to convert to the forms evaluate_classes expects (Hash, and
# Array of class names)
classes_with_params = Hash[classes_with_params]
<API key>.map!(&:first)
else
classes_with_params = {}
<API key> = @node.classes
end
evaluate_classes(classes_with_params, @node_scope || topscope)
evaluate_classes(<API key>, @node_scope || topscope)
end
# Evaluate each specified class in turn. If there are any classes we can't
# find, raise an error. This method really just creates resource objects
# that point back to the classes, and then the resources are themselves
# evaluated later in the process.
# Sometimes we evaluate classes with a fully qualified name already, in which
# case, we tell scope.find_hostclass we've pre-qualified the name so it
# doesn't need to search its namespaces again. This gets around a weird
# edge case of duplicate class names, one at top scope and one nested in our
# namespace and the wrong one (or both!) getting selected. See ticket #13349
# for more detail. --jeffweiss 26 apr 2012
def evaluate_classes(classes, scope, lazy_evaluate = true, fqname = false)
raise Puppet::DevError, "No source for scope passed to evaluate_classes" unless scope.source
class_parameters = nil
# if we are a param class, save the classes hash
# and transform classes to be the keys
if classes.class == Hash
class_parameters = classes
classes = classes.keys
end
hostclasses = classes.collect do |name|
scope.find_hostclass(name, :assume_fqname => fqname) or raise Puppet::Error, "Could not find class #{name} for #{node.name}"
end
if class_parameters
resources = <API key>(scope, hostclasses, class_parameters)
if !lazy_evaluate
resources.each(&:evaluate)
end
resources
else
already_included, newly_included = <API key>(scope, hostclasses)
if !lazy_evaluate
newly_included.each(&:evaluate)
end
already_included + newly_included
end
end
def <API key>
@relationships.each { |rel| rel.evaluate(catalog) }
end
# Return a resource by either its ref or its type and title.
def_delegator :@catalog, :resource, :findresource
def initialize(node, options = {})
@node = node
set_options(options)
initvars
end
# Create a new scope, with either a specified parent scope or
# using the top scope.
def newscope(parent, options = {})
parent ||= topscope
scope = Puppet::Parser::Scope.new(self, options)
scope.parent = parent
scope
end
# Return any overrides for the given resource.
def resource_overrides(resource)
@resource_overrides[resource.ref]
end
def injector
create_injector if @injector.nil?
@injector
end
def loaders
@loaders ||= Puppet::Pops::Loaders.new(environment)
end
def boot_injector
<API key>(nil) if @boot_injector.nil?
@boot_injector
end
# Creates the boot injector from registered system, default, and injector config.
# @return [Puppet::Pops::Binder::Injector] the created boot injector
# @api private Cannot be 'private' since it is called from the BindingsComposer.
def <API key>(env_boot_bindings)
<API key>()
pb = Puppet::Pops::Binder
boot_contribution = pb::SystemBindings.<API key>(env_boot_bindings)
final_contribution = pb::SystemBindings.final_contribution
binder = pb::Binder.new(pb::BindingsFactory.layered_bindings(final_contribution, boot_contribution))
@boot_injector = pb::Injector.new(binder)
end
# Answers if Puppet Binder should be active or not, and if it should and is not active, then it is activated.
# @return [Boolean] true if the Puppet Binder should be activated
def is_binder_active?
should_be_active = Puppet[:binder] || Puppet.future_parser?
if should_be_active
# TODO: this should be in a central place, not just for ParserFactory anymore...
Puppet::Parser::ParserFactory.<API key>()
@@binder_loaded ||= false
unless @@binder_loaded
require 'puppet/pops'
require 'puppetx'
@@binder_loaded = true
end
end
should_be_active
end
private
def <API key>(scope, hostclasses, parameters)
hostclasses.collect do |klass|
klass.ensure_in_catalog(scope, parameters[klass.name] || {})
end
end
def <API key>(scope, hostclasses)
already_included = []
newly_included = []
hostclasses.each do |klass|
class_scope = scope.class_scope(klass)
if class_scope
already_included << class_scope.resource
else
newly_included << klass.ensure_in_catalog(scope)
end
end
[already_included, newly_included]
end
# If ast nodes are enabled, then see if we can find and evaluate one.
def evaluate_ast_node
return unless ast_nodes?
# Now see if we can find the node.
astnode = nil
@node.names.each do |name|
break if astnode = <API key>.node(name.to_s.downcase)
end
unless (astnode ||= <API key>.node("default"))
raise Puppet::ParseError, "Could not find default node or by name with '#{node.names.join(", ")}'"
end
# Create a resource to model this node, and then add it to the list
# of resources.
resource = astnode.ensure_in_catalog(topscope)
resource.evaluate
@node_scope = topscope.class_scope(astnode)
end
# Evaluate our collections and return true if anything returned an object.
# The 'true' is used to continue a loop, so it's important.
def <API key>
return false if @collections.empty?
exceptwrap do
# We have to iterate over a dup of the array because
# collections can delete themselves from the list, which
# changes its length and causes some collections to get missed.
Puppet::Util::Profiler.profile("Evaluated collections", [:compiler, :<API key>]) do
found_something = false
@collections.dup.each do |collection|
found_something = true if collection.evaluate
end
found_something
end
end
end
# Make sure all of our resources have been evaluated into native resources.
# We return true if any resources have, so that we know to continue the
# evaluate_generators loop.
def <API key>
exceptwrap do
Puppet::Util::Profiler.profile("Evaluated definitions", [:compiler, :<API key>]) do
!<API key>.each do |resource|
resource.evaluate
end.empty?
end
end
end
# Iterate over collections and resources until we're sure that the whole
# compile is evaluated. This is necessary because both collections
# and defined resources can generate new resources, which themselves could
# be defined resources.
def evaluate_generators
count = 0
loop do
done = true
Puppet::Util::Profiler.profile("Iterated (#{count + 1}) on generators", [:compiler, :<API key>]) do
# Call collections first, then definitions.
done = false if <API key>
done = false if <API key>
end
break if done
count += 1
if count > 1000
raise Puppet::ParseError, "Somehow looped more than 1000 times while evaluating host catalog"
end
end
end
# Find and evaluate our main object, if possible.
def evaluate_main
@main = <API key>.find_hostclass([""], "") || <API key>.add(Puppet::Resource::Type.new(:hostclass, ""))
@topscope.source = @main
@main_resource = Puppet::Parser::Resource.new("class", :main, :scope => @topscope, :source => @main)
@topscope.resource = @main_resource
add_resource(@topscope, @main_resource)
@main_resource.evaluate
end
# Make sure the entire catalog is evaluated.
def fail_on_unevaluated
<API key>
<API key>
end
# If there are any resource overrides remaining, then we could
# not find the resource they were supposed to override, so we
# want to throw an exception.
def <API key>
remaining = @resource_overrides.values.flatten.collect(&:ref)
if !remaining.empty?
fail Puppet::ParseError,
"Could not find resource(s) #{remaining.join(', ')} for overriding"
end
end
# Make sure we don't have any remaining collections that specifically
# look for resources, because we want to consider those to be
# parse errors.
def <API key>
if Puppet.future_parser?
remaining = @collections.collect(&:<API key>).flatten.compact
else
remaining = @collections.collect(&:resources).flatten.compact
end
if !remaining.empty?
raise Puppet::ParseError, "Failed to realize virtual resources #{remaining.join(', ')}"
end
end
# Make sure all of our resources and such have done any last work
# necessary.
def finish
<API key>
resources.each do |resource|
# Add in any resource overrides.
if overrides = resource_overrides(resource)
overrides.each do |over|
resource.merge(over)
end
# Remove the overrides, so that the configuration knows there
# are none left.
overrides.clear
end
resource.finish if resource.respond_to?(:finish)
end
<API key>
end
def <API key>
unless main = catalog.resource(:class, :main)
raise "Couldn't find main"
end
names = Puppet::Type.metaparams.select do |name|
!Puppet::Parser::Resource.<API key>?(name)
end
data = {}
catalog.walk(main, :out) do |source, target|
if source_data = data[source] || metaparams_as_data(source, names)
# only store anything in the data hash if we've actually got
# data
data[source] ||= source_data
source_data.each do |param, value|
target[param] = value if target[param].nil?
end
data[target] = source_data.merge(metaparams_as_data(target, names))
end
target.tag(*(source.tags))
end
end
def metaparams_as_data(resource, params)
data = nil
params.each do |param|
unless resource[param].nil?
# Because we could be creating a hash for every resource,
# and we actually probably don't often have any data here at all,
# we're optimizing a bit by only creating a hash if there's
# any data to put in it.
data ||= {}
data[param] = resource[param]
end
end
data
end
# Set up all of our internal variables.
def initvars
# The list of overrides. This is used to cache overrides on objects
# that don't exist yet. We store an array of each override.
@resource_overrides = Hash.new do |overs, ref|
overs[ref] = []
end
# The list of collections that have been created. This is a global list,
# but they each refer back to the scope that created them.
@collections = []
# The list of relationships to evaluate.
@relationships = []
# For maintaining the relationship between scopes and their resources.
@catalog = Puppet::Resource::Catalog.new(@node.name, @node.environment)
# MOVED HERE - SCOPE IS NEEDED (MOVE-SCOPE)
# Create the initial scope, it is needed early
@topscope = Puppet::Parser::Scope.new(self)
# Need to compute overrides here, and remember them, because we are about to
# enter the magic zone of <API key> and intial import.
# Expensive entries in the context are bound lazily.
@context_overrides = context_overrides()
# This construct ensures that initial import (triggered by instantiating
# the structure '<API key>') has a configured context
# It cannot survive the initvars method, and is later reinstated
# as part of compiling...
Puppet.override( @context_overrides , "For initializing compiler") do
# THE MAGIC STARTS HERE ! This triggers parsing, loading etc.
@catalog.version = <API key>.version
end
@catalog.add_resource(Puppet::Parser::Resource.new("stage", :main, :scope => @topscope))
# local resource array to maintain resource ordering
@resources = []
# Make sure any external node classes are in our class list
if @node.classes.class == Hash
@catalog.add_class(*@node.classes.keys)
else
@catalog.add_class(*@node.classes)
end
end
# Set the node's parameters into the top-scope as variables.
def set_node_parameters
node.parameters.each do |param, value|
@topscope[param.to_s] = value
end
# These might be nil.
catalog.client_version = node.parameters["clientversion"]
catalog.server_version = node.parameters["serverversion"]
if Puppet[:trusted_node_data]
@topscope.set_trusted(node.trusted_data)
end
if(Puppet[:immutable_node_data])
facts_hash = node.facts.nil? ? {} : node.facts.values
@topscope.set_facts(facts_hash)
end
end
def <API key>
settings_type = Puppet::Resource::Type.new :hostclass, "settings"
environment.<API key>.add(settings_type)
settings_resource = Puppet::Parser::Resource.new("class", "settings", :scope => @topscope)
@catalog.add_resource(settings_resource)
settings_type.evaluate_code(settings_resource)
scope = @topscope.class_scope(settings_type)
env = environment
Puppet.settings.each do |name, setting|
next if name == :name
scope[name.to_s] = env[name]
end
end
# Return an array of all of the unevaluated resources. These will be definitions,
# which need to get evaluated into native resources.
def <API key>
# The order of these is significant for speed due to short-circuting
resources.reject { |resource| resource.evaluated? or resource.virtual? or resource.builtin_type? }
end
# Creates the injector from bindings found in the current environment.
# @return [void]
# @api private
def create_injector
<API key>()
composer = Puppet::Pops::Binder::BindingsComposer.new()
layered_bindings = composer.compose(topscope)
@injector = Puppet::Pops::Binder::Injector.new(Puppet::Pops::Binder::Binder.new(layered_bindings))
end
def <API key>
unless is_binder_active?
raise ArgumentError, "The Puppet Binder is only available when either '--binder true' or '--parser future' is used"
end
end
end
|
package nxt.http;
import nxt.Nxt;
import nxt.Transaction;
import nxt.util.Convert;
import org.json.simple.JSONObject;
import org.json.simple.JSONStreamAware;
import javax.servlet.http.HttpServletRequest;
import static nxt.http.JSONResponses.<API key>;
import static nxt.http.JSONResponses.MISSING_TRANSACTION;
import static nxt.http.JSONResponses.UNKNOWN_TRANSACTION;
public final class GetTransaction extends APIServlet.APIRequestHandler {
static final GetTransaction instance = new GetTransaction();
private GetTransaction() {
super("transaction", "hash");
}
@Override
JSONStreamAware processRequest(HttpServletRequest req) {
String transactionIdString = Convert.emptyToNull(req.getParameter("transaction"));
String transactionHash = Convert.emptyToNull(req.getParameter("hash"));
if (transactionIdString == null && transactionHash == null) {
return MISSING_TRANSACTION;
}
Long transactionId = null;
Transaction transaction;
try {
if (transactionIdString != null) {
transactionId = Convert.parseUnsignedLong(transactionIdString);
transaction = Nxt.getBlockchain().getTransaction(transactionId);
} else {
transaction = Nxt.getBlockchain().getTransaction(transactionHash);
if (transaction == null) {
return UNKNOWN_TRANSACTION;
}
}
} catch (RuntimeException e) {
return <API key>;
}
JSONObject response;
if (transaction == null) {
transaction = Nxt.<API key>().<API key>(transactionId);
if (transaction == null) {
return UNKNOWN_TRANSACTION;
}
response = transaction.getJSONObject();
} else {
response = transaction.getJSONObject();
response.put("block", Convert.toUnsignedLong(transaction.getBlockId()));
response.put("confirmations", Nxt.getBlockchain().getLastBlock().getHeight() - transaction.getHeight());
response.put("blockTimestamp", transaction.getBlockTimestamp());
}
response.put("sender", Convert.toUnsignedLong(transaction.getSenderId()));
response.put("hash", transaction.getHash());
return response;
}
}
|
# modification, are permitted provided that the following conditions
# are met:
# the documentation and/or other materials provided with the
# distribution.
# "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
# 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.
from Cryptodome.Util.py3compat import bord
from Cryptodome.Util._raw_api import (<API key>,
VoidPointer, SmartPointer,
<API key>,
get_raw_buffer, c_size_t,
expect_byte_string)
_raw_keccak_lib = <API key>("Cryptodome.Hash._keccak",
"""
int keccak_init(void **state,
size_t capacity_bytes,
uint8_t padding_byte);
int keccak_destroy(void *state);
int keccak_absorb(void *state,
const uint8_t *in,
size_t len);
int keccak_squeeze(const void *state,
uint8_t *out,
size_t len);
int keccak_digest(void *state, uint8_t *digest, size_t len);
""")
class Keccak_Hash(object):
"""Class that implements a Keccak hash
"""
def __init__(self, data, digest_bytes, update_after_digest):
#: The size of the resulting hash in bytes.
self.digest_size = digest_bytes
self.<API key> = update_after_digest
self._digest_done = False
state = VoidPointer()
result = _raw_keccak_lib.keccak_init(state.address_of(),
c_size_t(self.digest_size * 2),
0x01)
if result:
raise ValueError("Error %d while instantiating keccak" % result)
self._state = SmartPointer(state.get(),
_raw_keccak_lib.keccak_destroy)
if data:
self.update(data)
def update(self, data):
"""Continue hashing of a message by consuming the next chunk of data.
Repeated calls are equivalent to a single call with the concatenation
of all the arguments. In other words:
m.update(a); m.update(b)
is equivalent to:
m.update(a+b)
:Parameters:
data : byte string
The next chunk of the message being hashed.
"""
if self._digest_done and not self.<API key>:
raise TypeError("You can only call 'digest' or 'hexdigest' on this object")
expect_byte_string(data)
result = _raw_keccak_lib.keccak_absorb(self._state.get(),
data,
c_size_t(len(data)))
if result:
raise ValueError("Error %d while updating keccak" % result)
return self
def digest(self):
"""Return the **binary** (non-printable) digest of the message that has been hashed so far.
You cannot update the hash anymore after the first call to ``digest``
(or ``hexdigest``).
:Return: A byte string of `digest_size` bytes.
It may contain non-ASCII characters, including null bytes.
"""
self._digest_done = True
bfr = <API key>(self.digest_size)
result = _raw_keccak_lib.keccak_digest(self._state.get(),
bfr,
c_size_t(self.digest_size))
if result:
raise ValueError("Error %d while squeezing keccak" % result)
return get_raw_buffer(bfr)
def hexdigest(self):
"""Return the **printable** digest of the message that has been hashed so far.
This method does not change the state of the hash object.
:Return: A string of 2* `digest_size` characters. It contains only
hexadecimal ASCII digits.
"""
return "".join(["%02x" % bord(x) for x in self.digest()])
def new(self, **kwargs):
if "digest_bytes" not in kwargs and "digest_bits" not in kwargs:
kwargs["digest_bytes"] = self.digest_size
return new(**kwargs)
def new(**kwargs):
"""Return a fresh instance of the hash object.
:Keywords:
data : byte string
Optional. The very first chunk of the message to hash.
It is equivalent to an early call to ``update()``.
digest_bytes : integer
The size of the digest, in bytes (28, 32, 48, 64).
digest_bits : integer
The size of the digest, in bits (224, 256, 384, 512).
update_after_digest : boolean
Optional. By default, a hash object cannot be updated anymore after
the digest is computed. When this flag is ``True``, such check
is no longer enforced.
:Return: A `Keccak_Hash` object
"""
data = kwargs.pop("data", None)
update_after_digest = kwargs.pop("update_after_digest", False)
digest_bytes = kwargs.pop("digest_bytes", None)
digest_bits = kwargs.pop("digest_bits", None)
if None not in (digest_bytes, digest_bits):
raise TypeError("Only one digest parameter must be provided")
if (None, None) == (digest_bytes, digest_bits):
raise TypeError("Digest size (bits, bytes) not provided")
if digest_bytes is not None:
if digest_bytes not in (28, 32, 48, 64):
raise ValueError("'digest_bytes' must be: 28, 32, 48 or 64")
else:
if digest_bits not in (224, 256, 384, 512):
raise ValueError("'digest_bytes' must be: 224, 256, 384 or 512")
digest_bytes = digest_bits
if kwargs:
raise TypeError("Unknown parameters: " + str(kwargs))
return Keccak_Hash(data, digest_bytes, update_after_digest)
|
title: Kathryn Borel
summary: Writer and editor (The Believer, American Dad!)
categories:
- editor
- mac
- writer
Who are you, and what do you do?
I am [Kathryn Borel, Jr](http:
What hardware do you use?
Everything I do is done on a 13-inch [MacBook Air][macbook-air], and I just received a [Das Keyboard Model S mechanical keyboard][<API key>] that makes a very satisfying clickety-clack sound of the desktop computers of yesteryear. I like to think the reward of the clack makes me a more decisive writer and thinker.
Counterintuitively I'll plug in a pair of [Bose QuietComfort headphones][quietcomfort-15] while I write.
When I'm being an analog guy I use a red Moleskine (yearly Xmas present from my parents) and the Lamy fountain pen my best friend gave me as a maid of honor gift, which I love despite me being left-handed and constantly dragging my hand through the ink and making smears.
And what software?
[Final Draft 9 Pro Edition][final-draft] for screenwriting; [TextEdit][] for all other stuff. TextEdit has an appealing unfussiness -- fewer options and no margins and the small screen all make the act of writing feel less precious and therefore less daunting.
What would be your dream setup?
I really really REALLY wish there were a reliable transcription program for when I have to transcribe the interviews I do for The Believer. I also would like a disgusting, fart-trapping leather club chair and someone to pour me small glasses of wine when I work at night.
[final-draft]: http://store.finaldraft.com/final-draft-10.html "Popular screenwriting software."
[macbook-air]: https:
[<API key>]: https:
[quietcomfort-15]: http:
[textedit]: https://support.apple.com/en-us/HT2523 "A text editor included with Mac OS X."
|
module Octokit
class Client
module Gists
# List gists for a user or all public gists
# @param username [String] An optional user to filter listing
# @return [Array<Hashie::Mash>] A list of gists
# @example Fetch all gists for defunkt
# Octokit.gists('defunkt')
# @example Fetch all public gists
# Octokit.gists
def gists(username=nil, options={})
if username.nil?
get 'gists', options
else
get "users/#{username}/gists", options
end
end
alias :list_gists :gists
# List public gists
# @return [Array<Hashie::Mash>] A list of gists
# @example Fetch all public gists
# Octokit.public_gists
def public_gists(options={})
get 'gists/public', options
end
# @return [Array<Hashie::Mash>] A list of gists
def starred_gists(options={})
get 'gists/starred', options
end
# Get a single gist
# @param gist [String] ID of gist to fetch
# @return [Hash::Mash] Gist information
def gist(gist, options={})
get "gists/#{Gist.new gist}", options
end
# Create a gist
# @param options [Hash] Gist information.
# @option options [String] :description
# @option options [Boolean] :public Sets gist visibility
# @option options [Array<Hash>] :files Files that make up this gist. Keys
# should be the filename, the value a Hash with a :content key with text
# content of the Gist.
# @return [Hashie::Mash] Newly created gist info
def create_gist(options={})
post 'gists', options
end
# Edit a gist
# @param options [Hash] Gist information.
# @option options [String] :description
# @option options [Boolean] :public Sets gist visibility
# @option options [Array<Hash>] :files Files that make up this gist. Keys
# should be the filename, the value a Hash with a :content key with text
# content of the Gist.
# NOTE: All files from the previous version of the
# gist are carried over by default if not included in the hash. Deletes
# can be performed by including the filename with a null hash.
# @return
# [Hashie::Mash] Newly created gist info
def edit_gist(gist, options={})
patch "gists/#{Gist.new gist}", options
end
# Star a gist
# @param gist [String] Gist ID
# @return [Boolean] Indicates if gist is starred successfully
def star_gist(gist, options={})
<API key>(:put, "gists/#{Gist.new gist}/star", options)
end
# Unstar a gist
# @param gist [String] Gist ID
# @return [Boolean] Indicates if gist is unstarred successfully
def unstar_gist(gist, options={})
<API key>(:delete, "gists/#{Gist.new gist}/star", options)
end
# Check if a gist is starred
# @param gist [String] Gist ID
# @return [Boolean] Indicates if gist is starred
def gist_starred?(gist, options={})
<API key>(:get, "gists/#{Gist.new gist}/star", options)
end
# Fork a gist
# @param gist [String] Gist ID
# @return [Hashie::Mash] Data for the new gist
def fork_gist(gist, options={})
post "gists/#{Gist.new gist}/forks", options
end
# Delete a gist
# @param gist [String] Gist ID
# @return [Boolean] Indicating success of deletion
def delete_gist(gist, options={})
<API key>(:delete, "gists/#{Gist.new gist}", options)
end
# List gist comments
# @param gist_id [String] Gist Id.
# @return [Array<Hashie::Mash>] Array of hashes representing comments.
# @example
# Octokit.gist_comments('3528ae645')
def gist_comments(gist_id, options={})
get "gists/#{gist_id}/comments", options
end
# Get gist comment
# @param gist_id [String] Id of the gist.
# @param gist_comment_id [Integer] Id of the gist comment.
# @return [Hashie::Mash] Hash representing gist comment.
# @example
# Octokit.gist_comment('208sdaz3', 1451398)
def gist_comment(gist_id, gist_comment_id, options={})
get "gists/#{gist_id}/comments/#{gist_comment_id}", options
end
# Create gist comment
# Requires authenticated client.
# @param gist_id [String] Id of the gist.
# @param comment [String] Comment contents.
# @return [Hashie::Mash] Hash representing the new comment.
# @see Octokit::Client
# @example
# @client.create_gist_comment('3528645', 'This is very helpful.')
def create_gist_comment(gist_id, comment, options={})
options.merge!({:body => comment})
post "gists/#{gist_id}/comments", options
end
# Update gist comment
# Requires authenticated client
# @param gist_id [String] Id of the gist.
# @param gist_comment_id [Integer] Id of the gist comment to update.
# @param comment [String] Updated comment contents.
# @return [Hashie::Mash] Hash representing the updated comment.
# @see Octokit::Client
# @example
# @client.update_gist_comment('208sdaz3', '3528645', ':heart:')
def update_gist_comment(gist_id, gist_comment_id, comment, options={})
options.merge!({:body => comment})
patch "gists/#{gist_id}/comments/#{gist_comment_id}", options
end
# Delete gist comment
# Requires authenticated client.
# @param gist_id [String] Id of the gist.
# @param gist_comment_id [Integer] Id of the gist comment to delete.
# @return [Boolean] True if comment deleted, false otherwise.
# @see Octokit::Client
# @example
# @client.delete_gist_comment('208sdaz3', '586399')
def delete_gist_comment(gist_id, gist_comment_id, options={})
<API key>(:delete, "gists/#{gist_id}/comments/#{gist_comment_id}", options)
end
end
end
end
|
#ifndef __IUPGTK_DRV_H
#define __IUPGTK_DRV_H
#ifdef __cplusplus
extern "C" {
#endif
#define iupCOLORDoubleTO8(_x) ((unsigned char)(_x*255)) /* 1.0*255 = 255 */
#define iupCOLOR8ToDouble(_x) ((double)_x/255.0)
/* common */
gboolean <API key>(GtkWidget *widget, GdkEventCrossing *evt, Ihandle* ih);
gboolean <API key>(GtkWidget *widget, GdkEventMotion *evt, Ihandle *ih);
gboolean iupgtkButtonEvent(GtkWidget *widget, GdkEventButton *evt, Ihandle *ih);
gboolean iupgtkShowHelp(GtkWidget *widget, GtkWidgetHelpType *arg1, Ihandle* ih);
int <API key>(Ihandle* ih, GtkLabel* label, const char* value);
void <API key>(Ihandle* ih);
void iupgdkColorSet(GdkColor* color, unsigned char r, unsigned char g, unsigned char b);
void iupgtkSetBgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b);
void iupgtkSetFgColor(InativeHandle* handle, unsigned char r, unsigned char g, unsigned char b);
void iupgtkAddToParent(Ihandle* ih);
const char* <API key>(GtkWidget* widget);
void iupgtkSetPosSize(GtkContainer* parent, GtkWidget* widget, int x, int y, int width, int height);
GdkWindow* iupgtkGetWindow(GtkWidget *widget);
void <API key>(GdkWindow *window, int *x, int *y, GdkModifierType *mask);
int iupgtkIsVisible(GtkWidget* widget);
GtkWidget* <API key>(int has_window);
void <API key>(GtkWidget* container, GtkWidget* widget);
void <API key>(GtkWidget* container, GtkWidget* widget, int x, int y);
/* str */
void iupgtkStrRelease(void);
char* <API key>(const char* str);
char* <API key>(const char* str, int *len);
char* <API key>(const char* str);
char* <API key>(const char* str);
char* <API key>(const char* str);
void <API key>(int utf8mode);
int <API key>(void);
/* focus */
gboolean <API key>(GtkWidget *widget, GdkEventFocus *evt, Ihandle* ih);
void iupgtkSetCanFocus(GtkWidget *widget, int can);
/* key */
gboolean iupgtkKeyPressEvent(GtkWidget *widget, GdkEventKey *evt, Ihandle* ih);
gboolean <API key>(GtkWidget *widget, GdkEventKey *evt, Ihandle* ih);
void <API key>(guint state, unsigned int but, char* status, int doubleclick);
int iupgtkKeyDecode(GdkEventKey *evt);
/* font */
<API key>* <API key>(const char* value);
char* <API key>(Ihandle *ih);
char* <API key>(Ihandle *ih);
char* <API key>(Ihandle *ih);
void <API key>(Ihandle* ih, gpointer object);
void <API key>(Ihandle *ih, GtkWidget* widget);
PangoLayout* <API key>(const char* value);
/* There are PANGO_SCALE Pango units in one device unit.
For an output backend where a device unit is a pixel,
a size value of 10 * PANGO_SCALE gives 10 pixels. */
#define <API key>(_x) (((_x) + PANGO_SCALE/2) / PANGO_SCALE)
#define <API key>(_x) ((_x) * PANGO_SCALE)
/* open */
char* <API key>(Ihandle* ih);
void <API key>(void* visual, void* colormap);
void* <API key>(GtkWidget* widget);
void <API key>(GtkWidget* widget, void* gc);
/* dialog */
gboolean <API key>(GtkWidget *widget, GdkEvent *evt, Ihandle *ih);
#ifdef __cplusplus
}
#endif
#endif
|
/*body > section > section > section > div > section > div > div.row > div > div*/
fieldset.contact {
position: relative;
left: 6%;
}
.input {
position: relative;
z-index: 1;
display: inline-block;
margin: 1em;
max-width: 350px;
width: calc(100% - 2em);
vertical-align: top;
}
.input .title {
width: 85%;
}
.input .title, .input.input-secondary.title {
max-width: 100%;
width: 92%;
}
.input.input-secondary.title.input-filled {
left: 5%;
}
.input_field {
position: relative;
display: block;
float: right;
padding: 0.8em;
width: 60%;
border: none;
border-radius: 0;
background: #f0f0f0;
color: #aaa;
font-weight: bold;
-webkit-appearance: none; /* for box shadows to show on iOS */
}
.input_field:focus {
outline: none;
}
.submit-project {
left: 13%;
position: relative;
}
.input_label {
display: inline-block;
float: right;
padding: 0 1em;
width: 40%;
color: #6a7989;
font-weight: bold;
font-size: 70.25%;
-<API key>: antialiased;
-<API key>: grayscale;
-<API key>: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.input_label-content {
position: relative;
display: block;
padding: 1.6em 0;
width: 100%;
}
.graphic {
position: absolute;
top: 0;
left: 0;
fill: none;
}
.icon {
color: #ddd;
font-size: 150%;
}
.input-secondary {
margin: 0.75rem 0 0 1.4rem;
}
.<API key> {
width: 100%;
background: transparent;
padding: 1.3rem 0 0 0;
margin-bottom: 2em;
color: #006400;
font-size: 1.5em;
}
textarea.<API key> {
left: 2%;
height: 50px;
background: transparent;
padding: 0.3em 0 0 0.3rem;
margin-bottom: 2em;
border: #023A31 solid 3px;
}
textarea.<API key>::before {
content: 'Talk to us!';
position: absolute;
}
textarea.<API key>::after {
width: 100%;
height: 7px;
content: 'Talk to us!';
position: absolute;
left: 0;
top: 100%;
}
textarea.<API key>:active {
}
.contact-form textarea {
width: 96%;
height: 120px;
padding: 1.5%;
background-color: transparent;
margin: 1% 0 0 1.4rem;
border: 0.1rem solid #023A31;
border-bottom: 1rem solid #023A31;
color: darkgreen;
font-size: 1.75rem;
font-weight: 600;
/*line-height: ;*/
-webkit-transition: -webkit-transform 0.3s, all 1s;
transition: transform 0.3s, all 1s;
}
.contact-form textarea.ng-valid.ng-dirty:active, .contact-form textarea.ng-valid.ng-dirty:focus {
border-top: #78FA89;
border-right: #78FA89;
border-left: #78FA89;
border-bottom: 0.25rem solid #023A31;
}
.contact-form textarea:focus, .contact-form textarea:active {
border-bottom: none;
-<API key>: 0 0;
transform-origin: 0 0;
-webkit-transition: -webkit-transform 0.3s, all 1s;
transition: transform 0.3s, all 1s;
}
.<API key> {
width: 100%;
position: absolute;
text-align: left;
font-size: 1em;
padding: 10px 0 5px;
pointer-events: none;
}
.<API key>::after {
content: '';
position: absolute;
width: 100%;
height: 7px;
background: #023A31;
left: 0;
top: 100%;
-<API key>: 50% 100%;
transform-origin: 50% 100%;
-webkit-transition: -webkit-transform 0.3s, background-color 0.3s;
transition: transform 0.3s, background-color 0.3s;
}
.<API key> {
padding: 0;
-<API key>: 0 0;
transform-origin: 0 0;
-webkit-transition: -webkit-transform 0.3s, color 0.3s;
transition: transform 0.3s, color 0.3s;
}
.<API key>:focus + .<API key>::after,
.input-filled .<API key>::after {
background: #006400;
-webkit-transform: scale3d(1.25, 0.25, 1);
transform: scale3d(1.25, 0.25, 1);
}
.<API key>:focus + .<API key> .<API key>,
.input-filled .<API key> .<API key> {
color: #006400;
-webkit-transform: translateY(3.0em) scale3d(0.955, 0.955, 1.5);
transform: translateY(3.0em) scale3d(0.955, 0.955, 1.5);
}
span.input.input-secondary .title {
max-width: 100%;
}
.input_label.<API key> .title {
/*left: 10%;*/
}
.grow.btn-contact {
position: relative;
left: 2%;
margin-top: 3%;
}
.grow.btn-contact:hover {
background: rgba(240, 240, 240, 0.8);
border-color: #023a31;
color: #023a31;
-webkit-transition: -webkit-transform 0.3s, all 0.5s;
transition: transform 0.3s, all 0.5s;
}
.tab-pane {
padding: 4%;
}
|
require(
[
'gui/Button'
],
function (Button) {
return;
var button = new Button({
main: $('#ui-button')
});
button.render();
}
);
|
source $setup
tar -xf $src
mkdir build
cd build
../libsigsegv-$version/configure \
--host=$host \
--prefix=$out \
--enable-static=yes \
--enable-shared=no
make
make install
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AsanaNet
{
[Serializable]
public class AsanaTeam : AsanaObject, IAsanaData
{
[AsanaDataAttribute("name")]
public string Name { get; private set; }
public bool IsObjectLocal { get { return true; } }
public void Complete()
{
throw new <API key>();
}
static public implicit operator AsanaTeam(Int64 ID)
{
return Create(typeof(AsanaTeam), ID) as AsanaTeam;
}
}
}
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sr" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Fuguecoin</source>
<translation>О Fuguecoin-у</translation>
</message>
<message>
<location line="+39"/>
<source><b>Fuguecoin</b> version</source>
<translation><b>Fuguecoin</b> верзија</translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http:
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http:
<translation type="unfinished"/>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The Fuguecoin developers</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Адресар</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Кликните два пута да промените адресу и/или етикету</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Прави нову адресу</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Копира изабрану адресу на системски клипборд</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Нова адреса</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Fuguecoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Ово су Ваше Fuguecoin адресе за примање уплата. Можете да сваком пошиљаоцу дате другачију адресу да би пратили ко је вршио уплате.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>Prikaži &QR kod</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Fuguecoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Fuguecoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Избриши</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Fuguecoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Извоз података из адресара</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Зарезом одвојене вредности (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Грешка током извоза</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Није могуће писати у фајл %1.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Етикета</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Адреса</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(без етикете)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Унесите лозинку</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Нова лозинка</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Поновите нову лозинку</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Унесите нову лозинку за приступ новчанику.<br/>Молимо Вас да лозинка буде <b>10 или више насумице одабраних знакова</b>, или <b>осам или више речи</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Шифровање новчаника</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Ова акција захтева лозинку Вашег новчаника да би га откључала.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Откључавање новчаника</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Ова акција захтева да унесете лозинку да би дешифловала новчаник.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Дешифровање новчаника</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Промена лозинке</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Унесите стару и нову лозинку за шифровање новчаника.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Одобрите шифровање новчаника</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!</source>
<translation>Упозорење: Ако се ваш новчаник шифрује а потом изгубите лозинкзу, ви ћете <b>ИЗГУБИТИ СВЕ BITCOIN-Е</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Да ли сте сигурни да желите да се новчаник шифује?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Новчаник је шифрован</translation>
</message>
<message>
<location line="-56"/>
<source>Fuguecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
<translation>Fuguecoin će se sad zatvoriti da bi završio proces enkripcije. Zapamti da enkripcija tvog novčanika ne može u potpunosti da zaštiti tvoje bitcoine da ne budu ukradeni od malawarea koji bi inficirao tvoj kompjuter.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Неуспело шифровање новчаника</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Настала је унутрашња грешка током шифровања новчаника. Ваш новчаник није шифрован.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Лозинке које сте унели се не подударају.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Неуспело откључавање новчаника</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Лозинка коју сте унели за откључавање новчаника је нетачна.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Неуспело дешифровање новчаника</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Лозинка за приступ новчанику је успешно промењена.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Синхронизација са мрежом у току...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Општи преглед</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Погледајте општи преглед новчаника</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Трансакције</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Претражите историјат трансакција</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Уредите запамћене адресе и њихове етикете</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Прегледајте листу адреса на којима прихватате уплате</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>I&zlaz</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Напустите програм</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Fuguecoin</source>
<translation>Прегледајте информације о Fuguecoin-у</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>О &Qt-у</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Прегледајте информације о Qt-у</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>П&оставке...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>&Шифровање новчаника...</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>&Backup новчаника</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>Промени &лозинку...</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Fuguecoin address</source>
<translation>Пошаљите новац на bitcoin адресу</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Fuguecoin</source>
<translation>Изаберите могућности bitcoin-а</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Мењање лозинке којом се шифрује новчаник</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Fuguecoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>новчаник</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About Fuguecoin</source>
<translation>&О Fuguecoin-у</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Fuguecoin addresses to prove you own them</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Fuguecoin addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Фајл</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Подешавања</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>П&омоћ</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Трака са картицама</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source>Fuguecoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Fuguecoin network</source>
<translation><numerusform>%n активна веза са Fuguecoin мрежом</numerusform><numerusform>%n активне везе са Fuguecoin мрежом</numerusform><numerusform>%n активних веза са Fuguecoin мрежом</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Ажурно</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Ажурирање у току...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Послана трансакција</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Придошла трансакција</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Datum: %1⏎ Iznos: %2⏎ Tip: %3⏎ Adresa: %4⏎</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Fuguecoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Новчаник јс <b>шифрован</b> и тренутно <b>откључан</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Новчаник јс <b>шифрован</b> и тренутно <b>закључан</b></translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Fuguecoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Измени адресу</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Етикета</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Адреса</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Унешена адреса "%1" се већ налази у адресару.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Fuguecoin address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Немогуће откључати новчаник.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Fuguecoin-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>верзија</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Korišćenje:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Поставке</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start Fuguecoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start Fuguecoin on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Fuguecoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the Fuguecoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Fuguecoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Јединица за приказивање износа:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show Fuguecoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Fuguecoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Форма</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Fuguecoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Непотврђено:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>новчаник</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Недавне трансакције</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start bitcoin: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Zatraži isplatu</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Iznos:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>&Етикета</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Poruka:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Snimi kao...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the Fuguecoin-Qt help message to get a list with possible Fuguecoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>Fuguecoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Fuguecoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the Fuguecoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Fuguecoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Слање новца</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Ukloni sva polja sa transakcijama</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Потврди акцију слања</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&Пошаљи</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Да ли сте сигурни да желите да пошаљете %1?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>и</translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Форма</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. <API key>)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Етикета</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Izaberite adresu iz adresara</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Fuguecoin address (e.g. <API key>)</source>
<translation>Unesite Fuguecoin adresu (n.pr. <API key>)</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../forms/<API key>.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. <API key>)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Fuguecoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. <API key>)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Fuguecoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../<API key>.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Fuguecoin address (e.g. <API key>)</source>
<translation>Unesite Fuguecoin adresu (n.pr. <API key>)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter Fuguecoin signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Fuguecoin developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Otvorite do %1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/nepotvrdjeno</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 potvrde</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>datum</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>етикета</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>iznos</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, nije još uvek uspešno emitovan</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>nepoznato</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../forms/<API key>.ui" line="+14"/>
<source>Transaction details</source>
<translation>detalji transakcije</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ovaj odeljak pokazuje detaljan opis transakcije</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../<API key>.cpp" line="+225"/>
<source>Date</source>
<translation>datum</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>tip</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Адреса</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>iznos</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Otvoreno do %1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Offline * van mreže (%1 potvrdjenih)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>Nepotvrdjeno (%1 of %2 potvrdjenih)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Potvrdjena (%1 potvrdjenih)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Ovaj blok nije primljen od ostalih čvorova (nodova) i verovatno neće biti prihvaćen!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Generisan ali nije prihvaćen</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Primljen sa</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Primljeno od</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Poslat ka</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Isplata samom sebi</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Minirano</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(n/a)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Status vaše transakcije. Predjite mišem preko ovog polja da bi ste videli broj konfirmacija</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Datum i vreme primljene transakcije.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Tip transakcije</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Destinacija i adresa transakcije</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Iznos odbijen ili dodat balansu.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Sve</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Danas</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>ove nedelje</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Ovog meseca</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Prošlog meseca</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Ove godine</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Opseg...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Primljen sa</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Poslat ka</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Vama - samom sebi</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Minirano</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Drugi</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Navedite adresu ili naziv koji bi ste potražili</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Min iznos</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>kopiraj adresu</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>kopiraj naziv</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>kopiraj iznos</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>promeni naziv</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Izvezi podatke o transakcijama</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Зарезом одвојене вредности (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Potvrdjen</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>datum</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>tip</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Етикета</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Адреса</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>iznos</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Грешка током извоза</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Није могуће писати у фајл %1.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Opseg:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>do</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Слање новца</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Fuguecoin version</source>
<translation>Fuguecoin верзија</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Korišćenje:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or bitcoind</source>
<translation>Pošalji naredbu na -server ili bitcoinid
</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Listaj komande</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Zatraži pomoć za komande</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Opcije</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: bitcoin.conf)</source>
<translation>Potvrdi željeni konfiguracioni fajl (podrazumevani:bitcoin.conf)</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: bitcoind.pid)</source>
<translation>Konkretizuj pid fajl (podrazumevani: bitcoind.pid)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Gde je konkretni data direktorijum </translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 8333 or testnet: 18333)</source>
<translation>Slušaj konekcije na <port> (default: 8333 or testnet: 18333)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Održavaj najviše <n> konekcija po priključku (default: 125)
</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Prihvati komandnu liniju i JSON-RPC komande</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Radi u pozadini kao daemon servis i prihvati komande</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Koristi testnu mrežu</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Fuguecoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Fuguecoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Fuguecoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Fuguecoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>Korisničko ime za JSON-RPC konekcije</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>Lozinka za JSON-RPC konekcije</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Dozvoli JSON-RPC konekcije sa posebne IP adrese</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Pošalji komande to nodu koji radi na <ip> (default: 127.0.0.1)</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Odredi veličinu zaštićenih ključeva na <n> (default: 100)</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Ponovo skeniraj lanac blokova za nedostajuće transakcije iz novčanika</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Koristi OpenSSL (https) za JSON-RPC konekcije</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>privatni ključ za Server (podrazumevan: server.pem)</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Prihvatljive cifre (podrazumevano: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Ova poruka Pomoći</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>učitavam adrese....</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Fuguecoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Fuguecoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Učitavam blok indeksa...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Fuguecoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Новчаник се учитава...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Ponovo skeniram...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Završeno učitavanje</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS>
|
load File.dirname(__FILE__) + '/production.rb'
if File.exists? File.dirname(__FILE__) + '/../application.local.rb'
require File.dirname(__FILE__) + '/../application.local.rb'
end
|
from typing import Dict
import tempfile
from dxlclient.client_config import DxlClientConfig
from dxlclient.client import DxlClient
from dxlclient.broker import Broker
from dxlclient.message import Event
import demistomock as demisto
from CommonServerPython import *
from <API key> import *
INTEGRATION_NAME = "McAfee DXL"
CONNECT_RETRIES = 1
RECONNECT_DELAY = 1
RECONNECT_DELAY_MAX = 10
class EventSender:
TRUST_LEVEL = {
'NOT_SET': '0',
'KNOWN_MALICIOUS': '1',
'<API key>': '15',
'MIGHT_BE_MALICIOUS': '30',
'UNKNOWN': '50',
'MIGHT_BE_TRUSTED': '70',
'MOST_LIKELY_TRUSTED': '85',
'KNOWN_TRUSTED': '99',
'<API key>': '100'
}
broker_ca_bundle = tempfile.NamedTemporaryFile().name
cert_file = tempfile.NamedTemporaryFile().name
private_key = tempfile.NamedTemporaryFile().name
def __init__(self, params: Dict):
with open(self.broker_ca_bundle, "w") as text_file:
text_file.write(params['broker_ca_bundle'])
with open(self.cert_file, "w") as text_file:
text_file.write(params['cert_file'])
with open(self.private_key, "w") as text_file:
text_file.write(params['private_key'])
if 'broker_urls' in params:
self.broker_urls = params['broker_urls'].split(',')
self.push_ip_topic = params.get('push_ip_topic')
self.push_url_topic = params.get('push_url_topic')
self.push_domain_topic = params.get('push_domain_topic')
self.push_hash_topic = params.get('push_hash_topic')
self.client = DxlClient(self.get_client_config())
self.client.connect()
def __del__(self):
self.client.disconnect()
def push_ip(self, ip, trust_level, topic):
if not is_ip_valid(ip):
raise ValueError(f'argument ip {ip} is not a valid IP')
trust_level_key = self.TRUST_LEVEL[trust_level]
if topic:
self.push_ip_topic = topic
self.send_event(self.push_ip_topic, f'ip:{ip};trust_level:{trust_level_key}')
return f'Successfully pushed ip {ip} with trust level {trust_level}'
def push_url(self, url, trust_level, topic):
trust_level_key = self.TRUST_LEVEL[trust_level]
if topic:
self.push_url_topic = topic
self.send_event(self.push_url_topic, f'url:{url};trust_level:{trust_level_key}')
return f'Successfully pushed url {url} with trust level {trust_level}'
def push_domain(self, domain, trust_level, topic):
trust_level_key = self.TRUST_LEVEL[trust_level]
if topic:
self.push_domain_topic = topic
self.send_event(self.push_domain_topic, f'domain:{domain};trust_level:{trust_level_key}')
return f'Successfully pushed domain {domain} with trust level {trust_level}'
def push_hash(self, hash_obj, trust_level, topic):
trust_level_key = self.TRUST_LEVEL[trust_level]
if topic:
self.push_ip_topic = topic
self.send_event(self.push_hash_topic, f'hash:{hash_obj};trust_level:{trust_level_key}')
return f'Successfully pushed hash {hash_obj} with trust level {trust_level}'
def get_client_config(self):
config = DxlClientConfig(
broker_ca_bundle=self.broker_ca_bundle,
cert_file=self.cert_file,
private_key=self.private_key,
brokers=[Broker.parse(url) for url in self.broker_urls]
)
config.connect_retries = CONNECT_RETRIES
config.reconnect_delay = RECONNECT_DELAY
config.reconnect_delay_max = RECONNECT_DELAY_MAX
return config
def send_event(self, topic, payload):
if not topic:
raise Exception(f'Error in {demisto.command()} topic field is required')
event = Event(topic)
event.payload = str(payload).encode()
self.client.send_event(event)
def send_event_wrapper(self, topic, payload):
self.send_event(topic, payload)
return 'Successfully sent event'
def <API key>():
if '
return_error(
"The private key content seems to be incorrect as it doesn't start with
if '
return_error(
"The private key content seems to be incorrect as it doesn't end with
if '
return_error("The client certificates content seem to be "
"incorrect as they don't start with '
if '
return_error(
"The client certificates content seem to be incorrect as it doesn't end with
if not demisto.params()['broker_ca_bundle'].lstrip(" ").startswith('
return_error(
"The broker certificate seem to be incorrect as they don't start with '
if not demisto.params()['broker_ca_bundle'].rstrip(" ").endswith('
return_error(
"The broker certificate seem to be incorrect as they don't end with '
def main():
args = demisto.args()
command = demisto.command()
try:
event_sender = EventSender(demisto.params())
result = ''
if command == 'test-module':
event_sender.send_event('TEST', 'test')
result = 'ok'
elif command == 'dxl-send-event':
result = event_sender.send_event_wrapper(args.get('topic'), args.get('payload'))
elif command == 'dxl-push-ip':
result = event_sender.push_ip(args.get('ip'),
args.get('trust_level'),
args.get('topic'))
elif command == 'dxl-push-url':
result = event_sender.push_url(args.get('url'),
args.get('trust_level'),
args.get('topic'))
elif command == 'dxl-push-domain':
result = event_sender.push_domain(args.get('domain'),
args.get('trust_level'),
args.get('topic'))
elif command == 'dxl-push-hash':
result = event_sender.push_hash(args.get('hash'),
args.get('trust_level'),
args.get('topic'))
else:
raise Exception(f'{demisto.command()} is not a command')
return_outputs(result)
except Exception as error:
<API key>()
return_error(f'error in {INTEGRATION_NAME} {str(error)}.', error)
if __name__ in ('__builtin__', 'builtins'):
main()
|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Web.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using <API key>.Serialization;
namespace <API key>
{
public class Configuration
{
private readonly Dictionary<string, IResourceMapping> <API key> = new Dictionary<string, IResourceMapping>();
private readonly Dictionary<Type, IResourceMapping> <API key> = new Dictionary<Type, IResourceMapping>();
private readonly Dictionary<Type, <API key>> <API key> = new Dictionary<Type, <API key>>();
public void AddMapping(IResourceMapping resourceMapping)
{
<API key>[resourceMapping.ResourceType] = resourceMapping;
<API key>[resourceMapping.<API key>] = resourceMapping;
}
public bool IsMappingRegistered(Type type)
{
if (typeof(IEnumerable).IsAssignableFrom(type) && type.IsGenericType)
{
return <API key>.ContainsKey(type.GetGenericArguments()[0]);
}
return <API key>.ContainsKey(type);
}
public IResourceMapping GetMapping(Type type)
{
IResourceMapping mapping;
<API key>.TryGetValue(type, out mapping);
return mapping;
}
public <API key> <API key>(Type type)
{
<API key>.TryGetValue(type, out var <API key>);
return <API key>;
}
public void Apply(HttpConfiguration configuration)
{
var serializer = GetJsonSerializer();
var helper = new <API key>();
var transformer = new JsonApiTransformer { Serializer = serializer, <API key> = helper };
var filter = new JsonApiActionFilter(transformer, this);
configuration.Filters.Add(filter);
var formatter = new JsonApiFormatter(this, serializer);
configuration.Formatters.Add(formatter);
}
private static JsonSerializer GetJsonSerializer()
{
var serializerSettings = new <API key>();
serializerSettings.ContractResolver= new <API key>();
serializerSettings.Converters.Add(new <API key>());
serializerSettings.Converters.Add(new StringEnumConverter() { CamelCaseText = true});
#if DEBUG
serializerSettings.Formatting = Formatting.Indented;
#endif
var jsonSerializer = JsonSerializer.Create(serializerSettings);
return jsonSerializer;
}
public void <API key>(Type type, <API key> <API key>)
{
<API key>.Add(type, <API key>);
}
}
}
|
module SlotMachine
# A Slot defines a slot in a slotted. A bit like a variable name but for objects.
# PS: for the interested: A "development" of Smalltalk was the
# prototype based language (read: JavaScript equivalent)
# Slots are the instance names of objects. But since the language is dynamic
# what is it that we can say about instance names at runtime?
# Start with a Slotted, like the Message (in register one), we know all it's
# variables. But there is a Message in there, and for that we know the instances
# too. And off course for _all_ objects we know where the type is.
# The definiion is an array of symbols that we can resolve to SlotLoad
# Instructions. Or in the case of constants to ConstantLoad
class Slot
attr_reader :name , :next_slot
# initialize with just the name of the slot. Add more to the chain with set_next
def initialize( name )
raise "No name" unless name
@name = name
end
#set the next_slot , but always at the end of the chain
def set_next(slot)
if(@next_slot)
@next_slot.set_next(slot)
else
@next_slot = slot
end
end
# return the length of chain, ie 1 plus however many more next_slots there are
def length
return 1 unless @next_slot
1 + @next_slot.length
end
# name of all the slots, with dot syntax
def to_s
names = name.to_s
names += ".#{@next_slot}" if @next_slot
names
end
end
end
|
order: 0
title:
`jsx
import { Steps } from 'antd';
const Step = Steps.Step;
ReactDOM.render(
<Steps current={1}>
<Step title="" description="" />
<Step title="" description="" />
<Step title="" description="" />
<Step title="" description="" />
</Steps>
, mountNode);
`
|
var GUID = (function () {
function _GUID() {
return UUIDcreatePart(4) +
UUIDcreatePart(2) +
UUIDcreatePart(2) +
UUIDcreatePart(2) +
UUIDcreatePart(6);
};
function UUIDcreatePart(length) {
var uuidpart = "";
for (var i = 0; i < length; i++) {
var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
if (uuidchar.length == 1) {
uuidchar = "0" + uuidchar;
}
uuidpart += uuidchar;
}
return uuidpart;
}
return {
newGuid: _GUID
};
})();
var dataSource = (function () {
var tablesStorageKey = "<API key>";
var globalData = [];
var tables = [
{
Id: 5,
Name: "Contact",
Schema: [
{
k: "name",
t: 1
},
{
k: "companyname",
t: 1
},
{
k: "position",
t: 1
}
],
Created: "2016-08-12T07:32:46.69"
},
{
Id: 6,
Name: "Profile",
Schema: [
{
k: "Name",
t: 1
},
{
k: "Age",
t: 2
},
{
k: "Gender",
t: 4
},
{
k: "Rating",
t: 3
},
{
k: "Created",
t: 5
}
],
Created: "2016-09-28T21:53:40.19"
}
];
function _loadData(){
globalData = JSON.parse(localStorage[tablesStorageKey] || "[]");
}
function _save()
{
localStorage[tablesStorageKey] = JSON.stringify(globalData);
}
function _getSchema(tableId) {
for (var t = 0; t < tables.length; t++)
if (tableId === tables[t].Id) return tables[t].Schema;
}
function _find(data) {
var skip = data.start;
var take = data.length;
return {
draw: data.draw,
recordsTotal: globalData.length,
recordsFiltered: globalData.length,
data: globalData.slice(skip, take + skip)
};
}
function _insert(data) {
var id = GUID.newGuid();
globalData.push([id, data.Name, data.Age, data.Gender, data.Rating, data.Created]);
_save()
return {
IsOk: true,
id: id
};
}
function _update(data) {
for (var t = 0; t < globalData.length; t++)
if (data._id === globalData[t][0]) {
globalData[t] = [data._id, data.Name, data.Age, data.Gender, data.Rating, data.Created];
_save()
return {
IsOk: true
};
}
return {
IsOk: false
};
}
function _delete(id) {
for (var t = 0; t < globalData.length; t++)
if (id === globalData[t][0]) {
globalData = globalData.filter(item => item !== globalData[t]);
_save();
return {
IsOk: true
};
}
return {
IsOk: false
};
}
_loadData();
return {
getSchema: _getSchema,
find: _find,
insert: _insert,
update: _update,
delete: _delete
};
})();
|
<?php
namespace yii\log;
use Yii;
use yii\base\Component;
/**
* Logger records logged messages in memory and sends them to different targets if [[dispatcher]] is set.
*
* A Logger instance can be accessed via `Yii::getLogger()`. You can call the method [[log()]] to record a single log message.
* For convenience, a set of shortcut methods are provided for logging messages of various severity levels
* via the [[Yii]] class:
*
* - [[Yii::trace()]]
* - [[Yii::error()]]
* - [[Yii::warning()]]
* - [[Yii::info()]]
* - [[Yii::beginProfile()]]
* - [[Yii::endProfile()]]
*
* For more details and usage information on Logger, see the [guide article on logging](guide:runtime-logging).
*
* When the application ends or [[flushInterval]] is reached, Logger will call [[flush()]]
* to send logged messages to different log targets, such as [[FileTarget|file]], [[EmailTarget|email]],
* or [[DbTarget|database]], with the help of the [[dispatcher]].
*
* @property-read array $dbProfiling The first element indicates the number of SQL statements executed, and
* the second element the total time spent in SQL execution. This property is read-only.
* @property-read float $elapsedTime The total elapsed time in seconds for current request. This property is
* read-only.
* @property-read array $profiling The profiling results. Each element is an array consisting of these
* elements: `info`, `category`, `timestamp`, `trace`, `level`, `duration`, `memory`, `memoryDiff`. The `memory`
* and `memoryDiff` values are available since version 2.0.11. This property is read-only.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class Logger extends Component
{
/**
* Error message level. An error message is one that indicates the abnormal termination of the
* application and may require developer's handling.
*/
const LEVEL_ERROR = 0x01;
/**
* Warning message level. A warning message is one that indicates some abnormal happens but
* the application is able to continue to run. Developers should pay attention to this message.
*/
const LEVEL_WARNING = 0x02;
/**
* Informational message level. An informational message is one that includes certain information
* for developers to review.
*/
const LEVEL_INFO = 0x04;
/**
* Tracing message level. An tracing message is one that reveals the code execution flow.
*/
const LEVEL_TRACE = 0x08;
/**
* Profiling message level. This indicates the message is for profiling purpose.
*/
const LEVEL_PROFILE = 0x40;
/**
* Profiling message level. This indicates the message is for profiling purpose. It marks the
* beginning of a profiling block.
*/
const LEVEL_PROFILE_BEGIN = 0x50;
/**
* Profiling message level. This indicates the message is for profiling purpose. It marks the
* end of a profiling block.
*/
const LEVEL_PROFILE_END = 0x60;
/**
* @var array logged messages. This property is managed by [[log()]] and [[flush()]].
* Each log message is of the following structure:
*
* ```
* [
* [0] => message (mixed, can be a string or some complex data, such as an exception object)
* [1] => level (integer)
* [2] => category (string)
* [3] => timestamp (float, obtained by microtime(true))
* [4] => traces (array, debug backtrace, contains the application code call stacks)
* [5] => memory usage in bytes (int, obtained by memory_get_usage()), available since version 2.0.11.
* ]
* ```
*/
public $messages = [];
/**
* @var int how many messages should be logged before they are flushed from memory and sent to targets.
* Defaults to 1000, meaning the [[flush]] method will be invoked once every 1000 messages logged.
* Set this property to be 0 if you don't want to flush messages until the application terminates.
* This property mainly affects how much memory will be taken by the logged messages.
* A smaller value means less memory, but will increase the execution time due to the overhead of [[flush()]].
*/
public $flushInterval = 1000;
/**
* @var int how much call stack information (file name and line number) should be logged for each message.
* If it is greater than 0, at most that number of call stacks will be logged. Note that only application
* call stacks are counted.
*/
public $traceLevel = 0;
/**
* @var Dispatcher the message dispatcher
*/
public $dispatcher;
/**
* Initializes the logger by registering [[flush()]] as a shutdown function.
*/
public function init()
{
parent::init();
<API key>(function () {
// make regular flush before other shutdown functions, which allows session data collection and so on
$this->flush();
// make sure log entries written by shutdown functions are also flushed
// ensure "flush()" is called last when there are multiple shutdown functions
<API key>([$this, 'flush'], true);
});
}
/**
* Logs a message with the given type and category.
* If [[traceLevel]] is greater than 0, additional call stack information about
* the application code will be logged as well.
* @param string|array $message the message to be logged. This can be a simple string or a more
* complex data structure that will be handled by a [[Target|log target]].
* @param int $level the level of the message. This must be one of the following:
* `Logger::LEVEL_ERROR`, `Logger::LEVEL_WARNING`, `Logger::LEVEL_INFO`, `Logger::LEVEL_TRACE`,
* `Logger::LEVEL_PROFILE_BEGIN`, `Logger::LEVEL_PROFILE_END`.
* @param string $category the category of the message.
*/
public function log($message, $level, $category = 'application')
{
$time = microtime(true);
$traces = [];
if ($this->traceLevel > 0) {
$count = 0;
$ts = debug_backtrace(<API key>);
array_pop($ts); // remove the last trace since it would be the entry script, not very useful
foreach ($ts as $trace) {
if (isset($trace['file'], $trace['line']) && strpos($trace['file'], YII2_PATH) !== 0) {
unset($trace['object'], $trace['args']);
$traces[] = $trace;
if (++$count >= $this->traceLevel) {
break;
}
}
}
}
$this->messages[] = [$message, $level, $category, $time, $traces, memory_get_usage()];
if ($this->flushInterval > 0 && count($this->messages) >= $this->flushInterval) {
$this->flush();
}
}
/**
* Flushes log messages from memory to targets.
* @param bool $final whether this is a final call during a request.
*/
public function flush($final = false)
{
$messages = $this->messages;
// new messages could be logged while the existing ones are being handled by targets
$this->messages = [];
if ($this->dispatcher instanceof Dispatcher) {
$this->dispatcher->dispatch($messages, $final);
}
}
/**
* Returns the total elapsed time since the start of the current request.
* This method calculates the difference between now and the timestamp
* defined by constant `YII_BEGIN_TIME` which is evaluated at the beginning
* of [[\yii\BaseYii]] class file.
* @return float the total elapsed time in seconds for current request.
*/
public function getElapsedTime()
{
return microtime(true) - YII_BEGIN_TIME;
}
/**
* Returns the profiling results.
*
* By default, all profiling results will be returned. You may provide
* `$categories` and `$excludeCategories` as parameters to retrieve the
* results that you are interested in.
*
* @param array $categories list of categories that you are interested in.
* You can use an asterisk at the end of a category to do a prefix match.
* For example, 'yii\db\*' will match categories starting with 'yii\db\',
* such as 'yii\db\Connection'.
* @param array $excludeCategories list of categories that you want to exclude
* @return array the profiling results. Each element is an array consisting of these elements:
* `info`, `category`, `timestamp`, `trace`, `level`, `duration`, `memory`, `memoryDiff`.
* The `memory` and `memoryDiff` values are available since version 2.0.11.
*/
public function getProfiling($categories = [], $excludeCategories = [])
{
$timings = $this->calculateTimings($this->messages);
if (empty($categories) && empty($excludeCategories)) {
return $timings;
}
foreach ($timings as $i => $timing) {
$matched = empty($categories);
foreach ($categories as $category) {
$prefix = rtrim($category, '*');
if (($timing['category'] === $category || $prefix !== $category) && strpos($timing['category'], $prefix) === 0) {
$matched = true;
break;
}
}
if ($matched) {
foreach ($excludeCategories as $category) {
$prefix = rtrim($category, '*');
foreach ($timings as $i => $timing) {
if (($timing['category'] === $category || $prefix !== $category) && strpos($timing['category'], $prefix) === 0) {
$matched = false;
break;
}
}
}
}
if (!$matched) {
unset($timings[$i]);
}
}
return array_values($timings);
}
/**
* Returns the statistical results of DB queries.
* The results returned include the number of SQL statements executed and
* the total time spent.
* @return array the first element indicates the number of SQL statements executed,
* and the second element the total time spent in SQL execution.
*/
public function getDbProfiling()
{
$timings = $this->getProfiling(['yii\db\Command::query', 'yii\db\Command::execute']);
$count = count($timings);
$time = 0;
foreach ($timings as $timing) {
$time += $timing['duration'];
}
return [$count, $time];
}
/**
* Calculates the elapsed time for the given log messages.
* @param array $messages the log messages obtained from profiling
* @return array timings. Each element is an array consisting of these elements:
* `info`, `category`, `timestamp`, `trace`, `level`, `duration`, `memory`, `memoryDiff`.
* The `memory` and `memoryDiff` values are available since version 2.0.11.
*/
public function calculateTimings($messages)
{
$timings = [];
$stack = [];
foreach ($messages as $i => $log) {
list($token, $level, $category, $timestamp, $traces) = $log;
$memory = isset($log[5]) ? $log[5] : 0;
$log[6] = $i;
$hash = md5(json_encode($token));
if ($level == self::LEVEL_PROFILE_BEGIN) {
$stack[$hash] = $log;
} elseif ($level == self::LEVEL_PROFILE_END) {
if (isset($stack[$hash])) {
$timings[$stack[$hash][6]] = [
'info' => $stack[$hash][0],
'category' => $stack[$hash][2],
'timestamp' => $stack[$hash][3],
'trace' => $stack[$hash][4],
'level' => count($stack) - 1,
'duration' => $timestamp - $stack[$hash][3],
'memory' => $memory,
'memoryDiff' => $memory - (isset($stack[$hash][5]) ? $stack[$hash][5] : 0),
];
unset($stack[$hash]);
}
}
}
ksort($timings);
return array_values($timings);
}
/**
* Returns the text display of the specified level.
* @param int $level the message level, e.g. [[LEVEL_ERROR]], [[LEVEL_WARNING]].
* @return string the text display of the level
*/
public static function getLevelName($level)
{
static $levels = [
self::LEVEL_ERROR => 'error',
self::LEVEL_WARNING => 'warning',
self::LEVEL_INFO => 'info',
self::LEVEL_TRACE => 'trace',
self::LEVEL_PROFILE_BEGIN => 'profile begin',
self::LEVEL_PROFILE_END => 'profile end',
self::LEVEL_PROFILE => 'profile',
];
return isset($levels[$level]) ? $levels[$level] : 'unknown';
}
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>Introduction to OpenFL | HaxeFlixel 2D Game Framework</title>
<meta name="description" content="HaxeFlixel is a 2D Game framework that lets you create cross-platform games easier with free, open source technology!"/>
<meta name="keywords" content="gamedev, game development, cross-platform, haxe, flixel"/>
<meta name="author" content=""/>
<meta name="viewport" content="width=device-width"/>
<link rel="shortcut icon" href="/images/favicon.ico">
<!--[if lt IE 9]>
<script async src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]
<link rel="stylesheet" href="/styles/style.css" />
</head>
<body>
<header>
<nav>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand"><img src="/images/haxeflixel-header.png" alt="HaxeFlixel" /></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li >
<a href="/demos">Demos</a>
</li>
<li class="dropdown" >
<a href="/showcase" class="dropdown-toggle" data-toggle="dropdown">Showcase <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="/showcase/games">Games</a>
</li>
<li>
<a href="/showcase/jams">Jams</a>
</li>
</ul>
</li>
<li >
<a href="/blog">Blog</a>
</li>
<li class='active'>
<a href="/documentation">Docs</a>
</li>
<li>
<a href="http://api.haxeflixel.com">API</a>
</li>
<li >
<a href="/forum">Forum</a>
</li>
</ul>
<form class="navbar-form search-form" role="search" action="http://google.com/search" method="get">
<div class="form-group">
<input type="search" name="q" class="form-control" placeholder="Search">
<input type="hidden" name="q" value="site:http://haxeflixel.com">
</div>
</form>
</div>
</div>
</div>
</nav>
</header>
<div class="container container-main">
<div class="row">
<div class="col-md-3">
<div class="doc-nav affix">
<ul class="nav">
<li>
<h4><a href="/documentation/getting-started">Getting Started</a><h4>
</li>
<li>
<h4><a href="/documentation/community">Community</a><h4>
</li>
<li class= about="/documentation/community">
<a href="/documentation/community"> Community </a>
</li>
<li class= about="/documentation/about">
<a href="/documentation/about"> About </a>
</li>
<li class= about="/documentation/why-haxe">
<a href="/documentation/why-haxe"> Why a Haxe Version </a>
</li>
<li class= about="/documentation/<API key>">
<a href="/documentation/<API key>"> Introduction to Haxe </a>
</li>
<li class=active about="/documentation/<API key>">
<a href="/documentation/<API key>"> Introduction to OpenFL </a>
</li>
<li class= about="/documentation/contributing">
<a href="/documentation/contributing"> Contributing </a>
</li>
<li class= about="/documentation/code-contributions">
<a href="/documentation/code-contributions"> Code Contributions </a>
</li>
<li class= about="/documentation/code-style">
<a href="/documentation/code-style"> Code Style </a>
</li>
<li class= about="/documentation/website-docs">
<a href="/documentation/website-docs"> HaxeFlixel Website </a>
</li>
<li class= about="/documentation/haxeflixel-3-x">
<a href="/documentation/haxeflixel-3-x"> HaxeFlixel 3.x </a>
</li>
<li class= about="/documentation/upgrade-guide">
<a href="/documentation/upgrade-guide"> Upgrade Guide </a>
</li>
<li class= about="/documentation/flixel-addons">
<a href="/documentation/flixel-addons"> Flixel Addons </a>
</li>
<li class= about="/documentation/flixel-tools">
<a href="/documentation/flixel-tools"> Flixel Tools </a>
</li>
<li class= about="/documentation/<API key>">
<a href="/documentation/<API key>"> Install development Flixel </a>
</li>
<li>
<h4><a href="/documentation/haxeflixel-handbook">HaxeFlixel Handbook</a><h4>
</li>
<li>
<h4><a href="/documentation/resources">Resources</a><h4>
</li>
<li>
<h4><a href="/documentation/tutorials">Tutorials</a><h4>
</li>
</ul>
</div>
</div>
<div class="col-md-9 doc-content" role="main">
<h1 class="title">Introduction to OpenFL</h1>
<a href="https://github.com/HaxeFlixel/flixel-docs/blob/master/documentation/01_community/<API key>.html.md" class="btn btn-sm btn-edit" target="_blank"><span class="glyphicon glyphicon-pencil"></span> Edit </a>
<p><img src="/images/openfl.jpg" width="100%" /></p>
<p>The <a href="http:
<p>OpenFL has a history of providing the Flash API wherever possible however it is also used to extend upon that API. OpenFL is powered with the Haxe Toolkit's cross-compiler that lets it produce native code such as C++ for its target platforms.</p>
<p>OpenFL has a an active community of developers building games for the web, consoles, desktop and mobile devices. OpenFL is free to use and modify and it is currently being developed <a href="http:
<p>OpenFL targets include native cross-compiled C++ for Desktop and Mobile targets as well as web targets such as Flash, Html5 and experimental Emscripten. OpenFL is written primarily in the Haxe language as well as platform specific code integrating with SDKs and native APIs.</p>
<p>OpenFL provides HaxeFlixel with a familiar Flash API as well as an extended set of features for Native targets. This includes the use of GPU accelerated texture batching through drawTiles, multi-threading and more.</p>
<br>
<hr>
<ul class="pager">
<li class="previous">
<a href="/documentation/<API key>">< Introduction to Haxe</a>
</li>
<li class="next">
<a href="/documentation/contributing">Contributing ></a>
</li>
</ul>
</div>
</div>
</div>
<footer>
<div class="footer-main">
<div class=" container">
<div class="footer-social">
<iframe width="120px" scrolling="0" height="20px" frameborder="0"
allowtransparency="true"
src="http://ghbtns.com/github-btn.html?user=HaxeFlixel&repo=flixel&type=watch&count=true&size=small"></iframe>
<a href="https://twitter.com/haxeflixel" class="<TwitterConsumerkey>" data-show-count="true"
data-lang="en" data-size="small">Follow @haxeflixel</a>
<script>!function (d, s, id)
{
var js, fjs = d.<API key> (s)[0];
if (!d.getElementById (id))
{
js = d.createElement (s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore (js, fjs);
}
} (document, "script", "twitter-wjs");</script>
</div>
<div class="footer-powered-by">
<p>HaxeFlixel is powered by</p>
<a href="http://haxe.org"><img src="/images/haxe.svg" alt="Haxe" title="Haxe"></a>
+
<a href="http://openfl.org"><img class="openfl-footer-logo" src="/images/openfl.svg" alt="OpenFL" title="OpenFL"></a>
+
<a href="http://flixel.org"><img class="flixel-footer-logo" src="/images/flixel.svg" alt="Flixel" title="Flixel"></a>
</div>
</div>
</div>
</footer>
<script >(function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','
ga('create', 'UA-35511281-1');
ga('send', 'pageview');</script><script defer="defer" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script defer="defer" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script><script defer="defer" src="/vendor/<TwitterConsumerkey>/js/dropdown.js"></script><script defer="defer" src="/vendor/<TwitterConsumerkey>/js/transition.js"></script><script defer="defer" src="/vendor/<TwitterConsumerkey>/js/collapse.js"></script>
</body>
</html>
|
package com.github.scribejava.apis.examples;
import com.github.scribejava.apis.EtsyApi;
import com.github.scribejava.core.builder.ServiceBuilder;
import com.github.scribejava.core.model.OAuth1AccessToken;
import com.github.scribejava.core.model.OAuth1RequestToken;
import com.github.scribejava.core.model.OAuthRequest;
import com.github.scribejava.core.model.Response;
import com.github.scribejava.core.model.Verb;
import com.github.scribejava.core.oauth.OAuth10aService;
import java.io.IOException;
import java.util.Scanner;
import java.util.concurrent.ExecutionException;
public class EtsyExample {
private static final String <API key> = "https://openapi.etsy.com/v2/users/__SELF__";
private EtsyExample() {
}
@SuppressWarnings("PMD.SystemPrintln")
public static void main(String[] args) throws <API key>, ExecutionException, IOException {
// Replace with your api and secret key
final OAuth10aService service = new ServiceBuilder("your api key")
.apiSecret("your secret key")
.build(EtsyApi.instance());
final Scanner in = new Scanner(System.in);
System.out.println("=== Etsy's OAuth Workflow ===");
System.out.println();
// Obtain the Request Token
System.out.println("Fetching the Request Token...");
final OAuth1RequestToken requestToken = service.getRequestToken();
System.out.println("Got the Request Token!");
System.out.println();
System.out.println("Now go and authorize ScribeJava here:");
System.out.println(service.getAuthorizationUrl(requestToken));
System.out.println("And paste the verifier here");
System.out.print(">>");
final String oauthVerifier = in.nextLine();
System.out.println();
// Trade the Request Token and Verifier for the Access Token
System.out.println("Trading the Request Token for an Access Token...");
final OAuth1AccessToken accessToken = service.getAccessToken(requestToken, oauthVerifier);
System.out.println("Got the Access Token!");
System.out.println("(The raw response looks like this: " + accessToken.getRawResponse() + "')");
System.out.println();
// Now let's go and ask for a protected resource!
System.out.println("Now we're going to access a protected resource...");
final OAuthRequest request = new OAuthRequest(Verb.GET, <API key>);
service.signRequest(accessToken, request);
final Response response = service.execute(request);
System.out.println("Got it! Lets see what we found...");
System.out.println();
System.out.println(response.getBody());
System.out.println();
System.out.println("That's it man! Go and build something awesome with ScribeJava! :)");
}
}
|
<?php
namespace Tapestry\Providers;
use Exception;
use Tapestry\Tapestry;
use Tapestry\Entities\Configuration;
use Tapestry\Modules\Kernel\DefaultKernel;
use Tapestry\Modules\Kernel\KernelInterface;
use League\Container\ServiceProvider\<API key>;
use League\Container\ServiceProvider\<API key>;
class <API key> extends <API key> implements <API key>
{
/**
* @var array
*/
protected $provides = [
KernelInterface::class,
];
/**
* Use the register method to register items with the container via the
* protected $this->container property or the `getContainer` method
* from the ContainerAwareTrait.
*
* @return void
*/
public function register()
{
}
/**
* Method will be invoked on registration of a service provider implementing
* this interface. Provides ability for eager loading of Service Providers.
* @return void
* @throws Exception
*/
public function boot()
{
$container = $this->getContainer();
/** @var Tapestry $tapestry */
$tapestry = $container->get(Tapestry::class);
$configuration = $container->get(Configuration::class);
$kernelPath = $tapestry['<API key>'].DIRECTORY_SEPARATOR.'kernel.php';
if (! file_exists($kernelPath)) {
$kernelPath = $tapestry['<API key>'].DIRECTORY_SEPARATOR.'Kernel.php';
}
if (file_exists($kernelPath)) {
$kernelClassName = $configuration->get('kernel', DefaultKernel::class);
if (! class_exists($kernelClassName)) {
include $kernelPath;
}
if (! class_exists($kernelClassName)) {
throw new Exception('['.$kernelClassName.'] kernel file not found.');
}
$container->share(KernelInterface::class, $kernelClassName)->withArgument(
$container->get(Tapestry::class)
);
} else {
$container->share(KernelInterface::class, DefaultKernel::class)->withArgument(
$container->get(Tapestry::class)
);
}
/** @var KernelInterface $kernel */
$kernel = $container->get(KernelInterface::class);
$kernel->register();
}
}
|
<?php
namespace App;
use Illuminate\Support\Facades\Route;
/*
* Clearboard Routes
*/
Route::group(['middleware' => ['web']], function () {
Route::get('/', function() {
return view('clearboard.index.viewindex', ['forums' => Forum::all()]);
});
Route::get('/forum/{fid}-{_}', 'ForumController@view');
Route::get('/thread/{tid}-{_}', 'ThreadController@view');
Route::get('/profile/{uid}-{_}', 'ProfileController@view');
Route::get('/forum', function() {
return redirect('/');
});
// Route for processing markdown to HTML.
Route::post('/ajax/markdown', 'MarkdownController@postParse');
Route::post('/ajax/markdown_inline', 'MarkdownController@postInlineParse'); // for parsing inline markdown
// Posting routes
Route::post('/ajax/new_post', 'PostController@createApi')->middleware('auth');
Route::post('/ajax/new_thread', 'ThreadController@createApi')->middleware('auth');
Route::get('/newthread/{forumid}', 'ThreadController@create')->middleware('auth');
// Account Settings
Route::get('/settings/{userid}', 'SettingsController@view');
Route::get('/settings', 'SettingsController@view')->middleware('auth');
// Registration
Route::get('/register', function(){
return view('clearboard.register.register');
});
Route::post('/ajax/register', 'RegisterController@postRegister');
// Authentication routes
Route::group(array('prefix' => '/auth'), function() {
Route::post('/login', 'Auth\AuthController@postAjaxLogin');
Route::get('/logout', 'Auth\AuthController@getLogout')->middleware('get_csrf');
Route::post('/sudo', 'Auth\AuthController@postSudo');
Route::get('/ping', function () { return ''; }); // a simple request that returns nothing to update the existence of a user.
});
// Introduction route. Probably will be a way to disable at some point.
Route::get('/clearboard/welcome', function () {
return view('clearboard.welcome');
});
});
|
(function() {
'use strict';
angular
.module('app.core')
.constant('STATIC_URL', '/static/js/');
})();
|
<gd-annotation-app></gd-annotation-app>
|
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// to whom the Software is furnished to do so, subject to the following conditions:
// substantial portions of the Software.
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// 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.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Avalonia;
using AvaloniaEdit.Document;
using AvaloniaEdit.Editing;
using AvaloniaEdit.Utils;
using Avalonia.Media;
namespace AvaloniaEdit.Rendering
{
<summary>
Helper for creating a PathGeometry.
</summary>
public sealed class <API key>
{
<summary>
Gets/sets the radius of the rounded corners.
</summary>
public double CornerRadius { get; set; }
<summary>
Gets/Sets whether to align to whole pixels.
If BorderThickness is set to 0, the geometry is aligned to whole pixels.
If BorderThickness is set to a non-zero value, the outer edge of the border is aligned
to whole pixels.
The default value is <c>false</c>.
</summary>
public bool AlignToWholePixels { get; set; }
<summary>
Gets/sets the border thickness.
This property only has an effect if <c>AlignToWholePixels</c> is enabled.
When using the resulting geometry to paint a border, set this property to the border thickness.
Otherwise, leave the property set to the default value <c>0</c>.
</summary>
public double BorderThickness { get; set; }
<summary>
Gets/Sets whether to extend the rectangles to full width at line end.
</summary>
public bool <API key> { get; set; }
<summary>
Adds the specified segment to the geometry.
</summary>
public void AddSegment(TextView textView, ISegment segment)
{
if (textView == null)
throw new <API key>(nameof(textView));
var pixelSize = PixelSnapHelpers.GetPixelSize(textView);
foreach (var r in GetRectsForSegment(textView, segment, <API key>))
{
AddRectangle(pixelSize, r);
}
}
<summary>
Adds a rectangle to the geometry.
</summary>
<remarks>
This overload will align the coordinates according to
<see cref="AlignToWholePixels"/>.
Use the <see cref="AddRectangle(double,double,double,double)"/>-overload instead if the coordinates should not be aligned.
</remarks>
public void AddRectangle(TextView textView, Rect rectangle)
{
AddRectangle(PixelSnapHelpers.GetPixelSize(textView), rectangle);
}
private void AddRectangle(Size pixelSize, Rect r)
{
if (AlignToWholePixels)
{
var halfBorder = 0.5 * BorderThickness;
AddRectangle(PixelSnapHelpers.Round(r.X - halfBorder, pixelSize.Width) + halfBorder,
PixelSnapHelpers.Round(r.Y - halfBorder, pixelSize.Height) + halfBorder,
PixelSnapHelpers.Round(r.Right + halfBorder, pixelSize.Width) - halfBorder,
PixelSnapHelpers.Round(r.Bottom + halfBorder, pixelSize.Height) - halfBorder);
}
else
{
AddRectangle(r.X, r.Y, r.Right, r.Bottom);
}
}
<summary>
Calculates the list of rectangle where the segment in shown.
This method usually returns one rectangle for each line inside the segment
(but potentially more, e.g. when bidirectional text is involved).
</summary>
public static IEnumerable<Rect> GetRectsForSegment(TextView textView, ISegment segment, bool <API key> = false)
{
if (textView == null)
throw new <API key>(nameof(textView));
if (segment == null)
throw new <API key>(nameof(segment));
return <API key>(textView, segment, <API key>);
}
private static IEnumerable<Rect> <API key>(TextView textView, ISegment segment, bool <API key>)
{
var segmentStart = segment.Offset;
var segmentEnd = segment.Offset + segment.Length;
segmentStart = segmentStart.CoerceValue(0, textView.Document.TextLength);
segmentEnd = segmentEnd.CoerceValue(0, textView.Document.TextLength);
TextViewPosition start;
TextViewPosition end;
if (segment is SelectionSegment sel)
{
start = new TextViewPosition(textView.Document.GetLocation(sel.StartOffset), sel.StartVisualColumn);
end = new TextViewPosition(textView.Document.GetLocation(sel.EndOffset), sel.EndVisualColumn);
}
else
{
start = new TextViewPosition(textView.Document.GetLocation(segmentStart));
end = new TextViewPosition(textView.Document.GetLocation(segmentEnd));
}
foreach (var vl in textView.VisualLines)
{
var vlStartOffset = vl.FirstDocumentLine.Offset;
if (vlStartOffset > segmentEnd)
break;
var vlEndOffset = vl.LastDocumentLine.Offset + vl.LastDocumentLine.Length;
if (vlEndOffset < segmentStart)
continue;
int segmentStartVc;
segmentStartVc = segmentStart < vlStartOffset ? 0 : vl.<API key>(start, <API key>);
int segmentEndVc;
if (segmentEnd > vlEndOffset)
segmentEndVc = <API key> ? int.MaxValue : vl.<API key>;
else
segmentEndVc = vl.<API key>(end, <API key>);
foreach (var rect in ProcessTextLines(textView, vl, segmentStartVc, segmentEndVc))
yield return rect;
}
}
<summary>
Calculates the rectangles for the visual column segment.
This returns one rectangle for each line inside the segment.
</summary>
public static IEnumerable<Rect> <API key>(TextView textView, VisualLine line, int startVc, int endVc)
{
if (textView == null)
throw new <API key>(nameof(textView));
if (line == null)
throw new <API key>(nameof(line));
return ProcessTextLines(textView, line, startVc, endVc);
}
private static IEnumerable<Rect> ProcessTextLines(TextView textView, VisualLine visualLine, int segmentStartVc, int segmentEndVc)
{
var lastTextLine = visualLine.TextLines.Last();
var scrollOffset = textView.ScrollOffset;
for (var i = 0; i < visualLine.TextLines.Count; i++)
{
var line = visualLine.TextLines[i];
var y = visualLine.<API key>(line, VisualYPosition.LineTop);
var visualStartCol = visualLine.<API key>(line);
var visualEndCol = visualStartCol + line.Length;
if (line == lastTextLine)
visualEndCol -= 1; // 1 position for the TextEndOfParagraph
// TODO: ?
//else
// visualEndCol -= line.<API key>;
if (segmentEndVc < visualStartCol)
break;
if (lastTextLine != line && segmentStartVc > visualEndCol)
continue;
var <API key> = Math.Max(segmentStartVc, visualStartCol);
var segmentEndVcInLine = Math.Min(segmentEndVc, visualEndCol);
y -= scrollOffset.Y;
var lastRect = Rect.Empty;
if (<API key> == segmentEndVcInLine)
{
// GetTextBounds crashes for length=0, so we'll handle this case with <API key>
// We need to return a rectangle to ensure empty lines are still visible
var pos = visualLine.<API key>(line, <API key>);
pos -= scrollOffset.X;
// The following special cases are necessary to get rid of empty rectangles at the end of a TextLine if "Show Spaces" is active.
// If not excluded once, the same rectangle is calculated (and added) twice (since the offset could be mapped to two visual positions; end/start of line), if there is no trailing whitespace.
// Skip this TextLine segment, if it is at the end of this line and this line is not the last line of the VisualLine and the selection continues and there is no trailing whitespace.
if (segmentEndVcInLine == visualEndCol && i < visualLine.TextLines.Count - 1 && segmentEndVc > segmentEndVcInLine && line.<API key> == 0)
continue;
if (<API key> == visualStartCol && i > 0 && segmentStartVc < <API key> && visualLine.TextLines[i - 1].<API key> == 0)
continue;
lastRect = new Rect(pos, y, textView.<API key>, line.Height);
}
else
{
if (<API key> <= visualEndCol)
{
var b = line.GetTextBounds(<API key>, segmentEndVcInLine - <API key>);
var left = b.X - scrollOffset.X;
var right = b.Right - scrollOffset.X;
if (!lastRect.IsEmpty)
yield return lastRect;
// left>right is possible in RTL languages
lastRect = new Rect(Math.Min(left, right), y, Math.Abs(right - left), line.Height);
}
}
// If the segment ends in virtual space, extend the last rectangle with the rectangle the portion of the selection
// after the line end.
// Also, when word-wrap is enabled and the segment continues into the next line, extend lastRect up to the end of the line.
if (segmentEndVc > visualEndCol)
{
double left, right;
if (segmentStartVc > visualLine.<API key>)
{
// segmentStartVC is in virtual space
left = visualLine.<API key>(lastTextLine, segmentStartVc);
}
else
{
// Otherwise, we already processed the rects from segmentStartVC up to visualEndCol,
// so we only need to do the remainder starting at visualEndCol.
// For word-wrapped lines, visualEndCol doesn't include the whitespace hidden by the wrap,
// so we'll need to include it here.
// For the last line, visualEndCol already includes the whitespace.
left = line == lastTextLine ? line.<API key> : line.Width;
}
// TODO: !!!!!!!!!!!!!!!!!! SCROLL !!!!!!!!!!!!!!!!!!
//if (line != lastTextLine || segmentEndVC == int.MaxValue) {
// // If word-wrap is enabled and the segment continues into the next line,
// // or if the <API key> option is used (segmentEndVC == int.MaxValue),
// // we select the full width of the viewport.
// right = Math.Max(((IScrollInfo)textView).ExtentWidth, ((IScrollInfo)textView).ViewportWidth);
//} else {
right = visualLine.<API key>(lastTextLine, segmentEndVc);
var extendSelection = new Rect(Math.Min(left, right), y, Math.Abs(right - left), line.Height);
if (!lastRect.IsEmpty)
{
if (extendSelection.Intersects(lastRect))
{
lastRect.Union(extendSelection);
yield return lastRect;
}
else
{
// If the end of the line is in an RTL segment, keep lastRect and extendSelection separate.
yield return lastRect;
yield return extendSelection;
}
}
else
yield return extendSelection;
}
else
yield return lastRect;
}
}
private readonly PathFigures _figures = new PathFigures();
private PathFigure _figure;
private int _insertionIndex;
private double _lastTop, _lastBottom;
private double _lastLeft, _lastRight;
<summary>
Adds a rectangle to the geometry.
</summary>
<remarks>
This overload assumes that the coordinates are aligned properly
(see <see cref="AlignToWholePixels"/>).
Use the <see cref="AddRectangle(TextView,Rect)"/>-overload instead if the coordinates are not yet aligned.
</remarks>
public void AddRectangle(double left, double top, double right, double bottom)
{
if (!top.IsClose(_lastBottom))
{
CloseFigure();
}
if (_figure == null)
{
_figure = new PathFigure { StartPoint = new Point(left, top + CornerRadius) };
if (Math.Abs(left - right) > CornerRadius)
{
_figure.Segments.Add(MakeArc(left + CornerRadius, top, SweepDirection.Clockwise));
_figure.Segments.Add(MakeLineSegment(right - CornerRadius, top));
_figure.Segments.Add(MakeArc(right, top + CornerRadius, SweepDirection.Clockwise));
}
_figure.Segments.Add(MakeLineSegment(right, bottom - CornerRadius));
_insertionIndex = _figure.Segments.Count;
//figure.Segments.Add(MakeArc(left, bottom - cornerRadius, SweepDirection.Clockwise));
}
else
{
if (!_lastRight.IsClose(right))
{
var cr = right < _lastRight ? -CornerRadius : CornerRadius;
var dir1 = right < _lastRight ? SweepDirection.Clockwise : SweepDirection.CounterClockwise;
var dir2 = right < _lastRight ? SweepDirection.CounterClockwise : SweepDirection.Clockwise;
_figure.Segments.Insert(_insertionIndex++, MakeArc(_lastRight + cr, _lastBottom, dir1));
_figure.Segments.Insert(_insertionIndex++, MakeLineSegment(right - cr, top));
_figure.Segments.Insert(_insertionIndex++, MakeArc(right, top + CornerRadius, dir2));
}
_figure.Segments.Insert(_insertionIndex++, MakeLineSegment(right, bottom - CornerRadius));
_figure.Segments.Insert(_insertionIndex, MakeLineSegment(_lastLeft, _lastTop + CornerRadius));
if (!_lastLeft.IsClose(left))
{
var cr = left < _lastLeft ? CornerRadius : -CornerRadius;
var dir1 = left < _lastLeft ? SweepDirection.CounterClockwise : SweepDirection.Clockwise;
var dir2 = left < _lastLeft ? SweepDirection.Clockwise : SweepDirection.CounterClockwise;
_figure.Segments.Insert(_insertionIndex, MakeArc(_lastLeft, _lastBottom - CornerRadius, dir1));
_figure.Segments.Insert(_insertionIndex, MakeLineSegment(_lastLeft - cr, _lastBottom));
_figure.Segments.Insert(_insertionIndex, MakeArc(left + cr, _lastBottom, dir2));
}
}
_lastTop = top;
_lastBottom = bottom;
_lastLeft = left;
_lastRight = right;
}
private ArcSegment MakeArc(double x, double y, SweepDirection dir)
{
var arc = new ArcSegment
{
Point = new Point(x, y),
Size = new Size(CornerRadius, CornerRadius),
SweepDirection = dir
};
return arc;
}
private static LineSegment MakeLineSegment(double x, double y)
{
return new LineSegment { Point = new Point(x, y) };
}
<summary>
Closes the current figure.
</summary>
public void CloseFigure()
{
if (_figure != null)
{
_figure.Segments.Insert(_insertionIndex, MakeLineSegment(_lastLeft, _lastTop + CornerRadius));
if (Math.Abs(_lastLeft - _lastRight) > CornerRadius)
{
_figure.Segments.Insert(_insertionIndex, MakeArc(_lastLeft, _lastBottom - CornerRadius, SweepDirection.Clockwise));
_figure.Segments.Insert(_insertionIndex, MakeLineSegment(_lastLeft + CornerRadius, _lastBottom));
_figure.Segments.Insert(_insertionIndex, MakeArc(_lastRight - CornerRadius, _lastBottom, SweepDirection.Clockwise));
}
_figure.IsClosed = true;
_figures.Add(_figure);
_figure = null;
}
}
<summary>
Creates the geometry.
Returns null when the geometry is empty!
</summary>
public Geometry CreateGeometry()
{
CloseFigure();
return _figures.Count != 0 ? new PathGeometry { Figures = _figures } : null;
}
}
}
|
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot?-ru2f3j');
src:url('fonts/icomoon.eot?#iefix-ru2f3j') format('embedded-opentype'),
url('fonts/icomoon.woff?-ru2f3j') format('woff'),
url('fonts/icomoon.ttf?-ru2f3j') format('truetype'),
url('fonts/icomoon.svg?-ru2f3j#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"], [class*=" icon-"] {
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-<API key>: antialiased;
-<API key>: grayscale;
}
.icon-twitter:before {
content: "\21";
}
.icon-facebook:before {
content: "\22";
}
|
namespace Nancy.Swagger.Tests
{
public class TestModel
{
public int SomeInt { get; set; }
public long SomeLong { get; set; }
public long? SomeNullableLong { get; set; }
}
}
|
class Fitbit::Activity < Fitbit::Data
attr_accessor :activityId, :activityParentId, :activityParentName, :calories, :description,
:distance, :duration, :hasStartTime, :isFavorite, :logId, :name, :startTime, :steps
def initialize(activity_data, <API key>)
@activityId = activity_data['activityId']
@activityParentId = activity_data['activityParentId']
@activityParentName = activity_data['activityParentName']
@calories = activity_data['calories']
@description = activity_data['description']
@distance = "#{activity_data['distance']} #{<API key>[:distance]}" if activity_data['distance']
@duration = Time.at(activity_data['duration']/1000).utc.strftime("%H:%M:%S") if activity_data['duration']
@hasStartTime = activity_data['hasStartTime']
@logId = activity_data['logId']
@name = activity_data['name']
@startTime = activity_data['startTime']
@steps = activity_data['steps']
# Uncomment to view the data that is returned by the Fitbit service
# ActiveRecord::Base.logger.info activity_data
end
def self.fetch_all_on_date(user, date)
activity_objects = []
if user.present? && user.linked?
activities = user.fitbit_data.activities_on_date(date)['activities']
activity_objects = activities.map {|a| Fitbit::Activity.new(a, user.<API key>) }
end
activity_objects
end
def self.log_activity(user, activity)
if user.present? && user.linked?
user.fitbit_data.log_activity(activity)
end
end
end
# Sample response from fitbit.com api
#{"activityId"=>17151,
# "activityParentId"=>90013,
# "activityParentName"=>"Walking",
# "calories"=>54,
# "description"=>"less than 2 mph, strolling very slowly",
# "distance"=>0.5,
# "duration"=>1200000,
# "hasStartTime"=>true,
# "isFavorite"=>true,
# "logId"=>21537078,
# "name"=>"Walking",
# "startTime"=>"11:45",
# "steps"=>1107}
|
$(document).ready(function(){
//Grabs url path
var url = window.location.pathname;
//Grabs current file name from URL
var url = url.substring(url.lastIndexOf('/')+1);
// now grab every link from the navigation
$('#navigation a').each(function(){
//Grab the current elements href tag value
var link = $(this).attr("href");
//Test if the url value and element value matches
if(url === link){
//Adds class to the current item
$(this).parent('li').addClass('active');
}
});
});
|
.<API key> {
background: -<API key>(top, rgba(175, 175, 175, 1), rgba(170, 170, 170, 1));
box-shadow: inset .1em .1em .5em #aaa, inset -.1em -.1em .5em #aaa;
}
|
.timbr_highlight {
border-radius: 4px 4px 4px 4px;
-moz-border-radius: 4px 4px 4px 4px;
-<API key>: 4px 4px 4px 4px;
}
.timbr_border1 {
border: 3px dashed #ff0000;
}
.timbr_border2 {
border: 3px dashed #ff0099;
}
.timbr_border3 {
border: 3px dashed #a900b8;
}
.timbr_border4 {
border: 3px dashed #3c00ff;
}
.timbr_border5 {
border: 3px dashed #040080;
}
.timbr_border6 {
border: 3px dashed #3595fc;
}
.timbr_border7 {
border: 3px dashed #00fff2;
}
.timbr_border8 {
border: 3px dashed #00e388;
}
.timbr_border9 {
border: 3px dashed #00bd1c;
}
.timbr_border10 {
border: 3px dashed #f5d11b;
}
.timbr_border11 {
border: 3px dashed #d17e02;
}
.timbr_border12 {
border: 3px dashed #59362a
}
.dis{
display: none;
}
|
var fixDate = function(date) {
return date.Format('2006-01-02 15:04:05');
};
var entries = executeCommand('getEntries', {});
dbotCommands = [];
userCommands = [];
for (var i = 0; i < entries.length; i++) {
if (typeof entries[i].Contents == 'string' && entries[i].Contents.indexOf('!') === 0 && entries[i].Contents.indexOf('!<API key>') !== 0) {
if (entries[i].Metadata.User) {
if (args.source === 'All' || args.source === 'Manual') {
userCommands.push({
'Time': fixDate(entries[i].Metadata.Created),
'Entry ID': entries[i].ID,
'User': entries[i].Metadata.User,
'Command': entries[i].Contents
});
}
} else {
if (args.source === 'All' || args.source === 'Playbook') {
dbotCommands.push({
'Time': fixDate(entries[i].Metadata.Created),
'Entry ID': entries[i].ID,
'Playbook (Task)': entries[i].Metadata.EntryTask.PlaybookName + " (" + entries[i].Metadata.EntryTask.TaskName + ")",
'Command': entries[i].Contents
});
}
}
}
}
var md = '';
if (dbotCommands.length > 0) {
md += tableToMarkdown('DBot Executed Commands', dbotCommands, ['Time', 'Entry ID', 'Playbook (Task)', 'Command']) + '\n';
}
if (userCommands.length > 0) {
md += tableToMarkdown('User Executed Commands', userCommands, ['Time', 'Entry ID', 'User', 'Command']) + '\n';
}
if (md === '') {
md = 'No commands found\n';
}
return {ContentsFormat: formats.markdown, Type: entryTypes.note, Contents: md};
|
public class A extends B {
public A() {}
}
|
<?php
// AdminBundle:Inquiry:inquiry.html.twig
return array (
);
|
<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
<head>
{% include _head.html %}
</head>
<body class="post">
{% include _browser-upgrade.html %}
{% include _navigation.html %}
{% if page.image.feature %}
<div class="image-wrap">
<img src=
{% if page.image.feature contains 'http' %}
"{{ page.image.feature }}"
{% else %}
"{{ site.url }}/images/{{ page.image.feature }}"
{% endif %}
alt="{{ page.title }} feature image">
{% if page.image.credit %}
<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>
{% endif %}
</div><!-- /.image-wrap -->
{% endif %}
<div id="main" role="main">
<div class="article-author-side">
{% include _author-bio.html %}
</div>
<article class="post" dir="rtl">
<div class="headline-wrap">
{% if page.link %}
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
{% else %}
<h1><a href="{{ site.url }}{{ page.url }}" rel="bookmark" title="{{ page.title }}">{{ page.title }}</a></h1>
{% endif %}
</div><!--/ .headline-wrap -->
<div class="article-wrap">
{{ content }}
<hr />
<footer role="contentinfo" dir="ltr">
{% if page.share != false %}{% include _social-share.html %}{% endif %}
<p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %}.</p>
</footer>
</div><!-- /.article-wrap -->
{% if site.owner.disqus-shortname and page.comments == true %}
<section id="disqus_thread"></section><!-- /#disqus_thread -->
{% endif %}
</article>
</div><!-- /#main -->
<div class="footer-wrap">
{% if site.related_posts.size > 0 %}
<div class="related-articles">
<h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/posts/">View all posts</a>)</small></h4>
<ul>
{% for post in site.related_posts limit:3 %}
<li><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
<hr />
</div><!-- /.related-articles -->
{% endif %}
<footer>
{% include _footer.html %}
</footer>
</div><!-- /.footer-wrap -->
{% include _scripts.html %}
</body>
</html>
|
package easyupload.entity;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
@Entity
public class FileUpload {
public FileUpload(String filename, byte[] file, String mimeType) {
this.file = file;
this.filename = filename;
this.mimeType = mimeType;
}
public FileUpload() {
// Default Constructor
}
@Id
private String filename;
@Lob
private byte[] file;
private String mimeType;
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public byte[] getFile() {
return file;
}
public void setFile(byte[] file) {
this.file = file;
}
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
}
|
# guh Changes
## 2.0.1
- Updated typings to match Typings 1.0
## 2.0.0
- Renamed from Basis to guh
- Rewrite from the ground-up
- Moved build system core to `guh-core` package
- Switched from LiveReload to BrowserSync
- Switched from Ruby Sass to libsass
- Now requires Node ^5.0
- More flexible configuration format
- Local configuration support
- Added CLI
- `guh new` to generate
- `guh build` to build
## 1.2.1
- Fixed version number in `package.json`
- Fixed server script build references
## 1.2.0
- Added extra optional arguments to `gulp build` to build only specific modules
## 1.1.1
- Updated dependencies
## 1.1.0
- Cleaned up typings folder
- Updated dependencies
## 1.0.1
- Fix TS glob pattern in default config
## 1.0.0
- Initial release
|
"""Tests for wheel binary packages and .dist-info."""
import os
import pytest
from mock import patch, Mock
from pip._vendor import pkg_resources
from pip import pep425tags, wheel
from pip.exceptions import <API key>, UnsupportedWheel
from pip.utils import unpack_file
def <API key>(tmpdir):
with open(str(tmpdir.join("entry_points.txt")), "w") as fp:
fp.write("""
[console_scripts]
pip = pip.main:pip
""")
assert wheel.get_entrypoints(str(tmpdir.join("entry_points.txt"))) == (
{"pip": "pip.main:pip"},
{},
)
def <API key>():
class dist(object):
def get_metadata_lines(self, record):
return ['file.py,,',
'file.pyc,,',
'file.so,,',
'nopyc.py']
location = ''
d = dist()
paths = list(wheel.<API key>(d))
expected = ['file.py',
'file.pyc',
'file.so',
'nopyc.py',
'nopyc.pyc']
assert paths == expected
# Avoid an easy 'unique generator' bug
paths2 = list(wheel.<API key>(d))
assert paths2 == paths
def test_wheel_version(tmpdir, data):
future_wheel = 'futurewheel-1.9-py2.py3-none-any.whl'
broken_wheel = 'brokenwheel-1.0-py2.py3-none-any.whl'
future_version = (1, 9)
unpack_file(data.packages.join(future_wheel),
tmpdir + 'future', None, None)
unpack_file(data.packages.join(broken_wheel),
tmpdir + 'broken', None, None)
assert wheel.wheel_version(tmpdir + 'future') == future_version
assert not wheel.wheel_version(tmpdir + 'broken')
def <API key>():
name = 'test'
vc = wheel.VERSION_COMPATIBLE
# Major version is higher - should be incompatible
higher_v = (vc[0] + 1, vc[1])
# test raises with correct error
with pytest.raises(UnsupportedWheel) as e:
wheel.check_compatibility(higher_v, name)
assert 'is not compatible' in str(e)
# Should only log.warn - minor version is greator
higher_v = (vc[0], vc[1] + 1)
wheel.check_compatibility(higher_v, name)
# These should work fine
wheel.check_compatibility(wheel.VERSION_COMPATIBLE, name)
# E.g if wheel to install is 1.0 and we support up to 1.2
lower_v = (vc[0], max(0, vc[1] - 1))
wheel.check_compatibility(lower_v, name)
class TestWheelFile(object):
def <API key>(self):
w = wheel.Wheel('simple-1.1.1-py2-none-any.whl')
assert w.name == 'simple'
assert w.version == '1.1.1'
assert w.pyversions == ['py2']
assert w.abis == ['none']
assert w.plats == ['any']
def <API key>(self):
w = wheel.Wheel('simple-1.1-py2.py3-abi1.abi2-any.whl')
assert w.name == 'simple'
assert w.version == '1.1'
assert w.pyversions == ['py2', 'py3']
assert w.abis == ['abi1', 'abi2']
assert w.plats == ['any']
def <API key>(self):
# pip doesn't do anything with build tags, but theoretically, we might
# see one, in this case the build tag = '4'
w = wheel.Wheel('simple-1.1-4-py2-none-any.whl')
assert w.name == 'simple'
assert w.version == '1.1'
assert w.pyversions == ['py2']
assert w.abis == ['none']
assert w.plats == ['any']
def <API key>(self):
w = wheel.Wheel('<API key>.whl')
assert w.version == '1'
def <API key>(self):
with pytest.raises(<API key>):
wheel.Wheel('<API key>.whl')
def <API key>(self):
with pytest.raises(<API key>):
wheel.Wheel('invalid.whl')
def <API key>(self):
"""
Test single-version wheel is known to be supported
"""
w = wheel.Wheel('simple-0.1-py2-none-any.whl')
assert w.supported(tags=[('py2', 'none', 'any')])
def <API key>(self):
"""
Test multi-version wheel is known to be supported
"""
w = wheel.Wheel('simple-0.1-py2.py3-none-any.whl')
assert w.supported(tags=[('py3', 'none', 'any')])
def <API key>(self):
"""
Test unsupported wheel is known to be unsupported
"""
w = wheel.Wheel('simple-0.1-py2-none-any.whl')
assert not w.supported(tags=[('py1', 'none', 'any')])
@patch('sys.platform', 'darwin')
@patch('pip.pep425tags.get_abbr_impl', lambda: 'cp')
@patch('pip.pep425tags.get_platform', lambda: 'macosx_10_9_intel')
def <API key>(self):
"""
Wheels built for OS X 10.6 are supported on 10.9
"""
tags = pep425tags.get_supported(['27'], False)
w = wheel.Wheel('simple-0.<API key>.whl')
assert w.supported(tags=tags)
w = wheel.Wheel('simple-0.<API key>.whl')
assert w.supported(tags=tags)
@patch('sys.platform', 'darwin')
@patch('pip.pep425tags.get_abbr_impl', lambda: 'cp')
@patch('pip.pep425tags.get_platform', lambda: 'macosx_10_6_intel')
def <API key>(self):
"""
Wheels built for OS X 10.9 are not supported on 10.6
"""
tags = pep425tags.get_supported(['27'], False)
w = wheel.Wheel('simple-0.<API key>.whl')
assert not w.supported(tags=tags)
@patch('sys.platform', 'darwin')
@patch('pip.pep425tags.get_abbr_impl', lambda: 'cp')
def <API key>(self):
"""
Multi-arch wheels (intel) are supported on components (i386, x86_64)
"""
with patch('pip.pep425tags.get_platform',
lambda: '<API key>'):
universal = pep425tags.get_supported(['27'], False)
with patch('pip.pep425tags.get_platform',
lambda: 'macosx_10_5_intel'):
intel = pep425tags.get_supported(['27'], False)
with patch('pip.pep425tags.get_platform',
lambda: 'macosx_10_5_x86_64'):
x64 = pep425tags.get_supported(['27'], False)
with patch('pip.pep425tags.get_platform',
lambda: 'macosx_10_5_i386'):
i386 = pep425tags.get_supported(['27'], False)
with patch('pip.pep425tags.get_platform',
lambda: 'macosx_10_5_ppc'):
ppc = pep425tags.get_supported(['27'], False)
with patch('pip.pep425tags.get_platform',
lambda: 'macosx_10_5_ppc64'):
ppc64 = pep425tags.get_supported(['27'], False)
w = wheel.Wheel('simple-0.<API key>.whl')
assert w.supported(tags=intel)
assert w.supported(tags=x64)
assert w.supported(tags=i386)
assert not w.supported(tags=universal)
assert not w.supported(tags=ppc)
assert not w.supported(tags=ppc64)
w = wheel.Wheel('simple-0.<API key>.whl')
assert w.supported(tags=universal)
assert w.supported(tags=intel)
assert w.supported(tags=x64)
assert w.supported(tags=i386)
assert w.supported(tags=ppc)
assert w.supported(tags=ppc64)
@patch('sys.platform', 'darwin')
@patch('pip.pep425tags.get_abbr_impl', lambda: 'cp')
def <API key>(self):
"""
Single-arch wheels (x86_64) are not supported on multi-arch (intel)
"""
with patch('pip.pep425tags.get_platform',
lambda: '<API key>'):
universal = pep425tags.get_supported(['27'], False)
with patch('pip.pep425tags.get_platform',
lambda: 'macosx_10_5_intel'):
intel = pep425tags.get_supported(['27'], False)
w = wheel.Wheel('simple-0.<API key>.whl')
assert not w.supported(tags=intel)
assert not w.supported(tags=universal)
w = wheel.Wheel('simple-0.<API key>.whl')
assert not w.supported(tags=intel)
assert not w.supported(tags=universal)
def <API key>(self):
"""
Test results from `support_index_min`
"""
tags = [
('py2', 'none', 'TEST'),
('py2', 'TEST', 'any'),
('py2', 'none', 'any'),
]
w = wheel.Wheel('simple-0.1-py2-none-any.whl')
assert w.support_index_min(tags=tags) == 2
w = wheel.Wheel('simple-0.1-py2-none-TEST.whl')
assert w.support_index_min(tags=tags) == 0
def <API key>(self):
"""
Test `support_index_min` returns None, when wheel not supported
"""
w = wheel.Wheel('simple-0.1-py2-none-any.whl')
assert w.support_index_min(tags=[]) is None
def <API key>(self):
from pip import utils
from tempfile import mkdtemp
from shutil import rmtree
filepath = '../data/packages/meta-1.0-py2.py3-none-any.whl'
if not os.path.exists(filepath):
pytest.skip("%s does not exist" % filepath)
try:
tmpdir = mkdtemp()
utils.unpack_file(filepath, tmpdir, 'application/zip', None)
assert os.path.isdir(os.path.join(tmpdir, 'meta-1.0.dist-info'))
finally:
rmtree(tmpdir)
pass
def <API key>(self, data):
"""
Test the "wheel is purelib/platlib" code.
"""
packages = [
("pure_wheel", data.packages.join("pure_wheel-1.7"), True),
("plat_wheel", data.packages.join("plat_wheel-1.7"), False),
]
for name, path, expected in packages:
assert wheel.root_is_purelib(name, path) == expected
def <API key>(self):
"""
Test that we convert '_' to '-' for versions parsed out of wheel
filenames
"""
w = wheel.Wheel('simple-0.1_1-py2-none-any.whl')
assert w.version == '0.1-1'
class TestPEP425Tags(object):
def <API key>(self):
"""
Test that pep425tags still works when sysconfig is broken.
Can be a problem on Python 2.7
Issue #1074.
"""
import pip.pep425tags
def raises_ioerror(var):
raise IOError("I have the wrong path!")
with patch('pip.pep425tags.sysconfig.get_config_var', raises_ioerror):
assert len(pip.pep425tags.get_supported())
class TestMoveWheelFiles(object):
"""
Tests for moving files from wheel src to scheme paths
"""
def prep(self, data, tmpdir):
self.name = 'sample'
self.wheelpath = data.packages.join(
'sample-1.2.0-py2.py3-none-any.whl')
self.req = pkg_resources.Requirement.parse('sample')
self.src = os.path.join(tmpdir, 'src')
self.dest = os.path.join(tmpdir, 'dest')
unpack_file(self.wheelpath, self.src, None, None)
self.scheme = {
'scripts': os.path.join(self.dest, 'bin'),
'purelib': os.path.join(self.dest, 'lib'),
'data': os.path.join(self.dest, 'data'),
}
self.src_dist_info = os.path.join(
self.src, 'sample-1.2.0.dist-info')
self.dest_dist_info = os.path.join(
self.scheme['purelib'], 'sample-1.2.0.dist-info')
def assert_installed(self):
# lib
assert os.path.isdir(
os.path.join(self.scheme['purelib'], 'sample'))
# dist-info
metadata = os.path.join(self.dest_dist_info, 'METADATA')
assert os.path.isfile(metadata)
# data files
data_file = os.path.join(self.scheme['data'], 'my_data', 'data_file')
assert os.path.isfile(data_file)
# package data
pkg_data = os.path.join(
self.scheme['purelib'], 'sample', 'package_data.dat')
assert os.path.isfile(pkg_data)
def test_std_install(self, data, tmpdir):
self.prep(data, tmpdir)
wheel.move_wheel_files(
self.name, self.req, self.src, scheme=self.scheme)
self.assert_installed()
def <API key>(self, data, tmpdir):
"""
Test that empty dirs are not installed
"""
self.prep(data, tmpdir)
src_empty_dir = os.path.join(
self.src_dist_info, 'empty_dir', 'empty_dir')
os.makedirs(src_empty_dir)
assert os.path.isdir(src_empty_dir)
wheel.move_wheel_files(
self.name, self.req, self.src, scheme=self.scheme)
self.assert_installed()
assert not os.path.isdir(
os.path.join(self.dest_dist_info, 'empty_dir'))
class TestWheelBuilder(object):
def <API key>(self, caplog):
with patch('pip.wheel.WheelBuilder._build_one') as mock_build_one:
wheel_req = Mock(is_wheel=True, editable=False)
reqset = Mock(requirements=Mock(values=lambda: [wheel_req]),
wheel_download_dir='/wheel/dir')
wb = wheel.WheelBuilder(reqset, Mock())
wb.build()
assert "due to already being wheel" in caplog.text()
assert mock_build_one.mock_calls == []
def <API key>(self, caplog):
with patch('pip.wheel.WheelBuilder._build_one') as mock_build_one:
editable_req = Mock(editable=True, is_wheel=False)
reqset = Mock(requirements=Mock(values=lambda: [editable_req]),
wheel_download_dir='/wheel/dir')
wb = wheel.WheelBuilder(reqset, Mock())
wb.build()
assert "due to being editable" in caplog.text()
assert mock_build_one.mock_calls == []
|
<?php
namespace PHPExiftool\Driver\Tag\MIEGeo;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class Country extends AbstractTag
{
protected $Id = 'Country';
protected $Name = 'Country';
protected $FullName = 'MIE::Geo';
protected $GroupName = 'MIE-Geo';
protected $g0 = 'MIE';
protected $g1 = 'MIE-Geo';
protected $g2 = 'Location';
protected $Type = 'string';
protected $Writable = true;
protected $Description = 'Country';
}
|
'use strict';
var canUseDOM = require('./canUseDOM');
var one = function() {
};
var on = function() {
};
var off = function() {
};
if (canUseDOM) {
var bind = window.addEventListener ? 'addEventListener' : 'attachEvent';
var unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent';
var prefix = bind !== 'addEventListener' ? 'on' : '';
one = function(node, eventNames, eventListener) {
var typeArray = eventNames.split(' ');
var recursiveFunction = function(e) {
e.target.removeEventListener(e.type, recursiveFunction);
return eventListener(e);
};
for (var i = typeArray.length - 1; i >= 0; i
this.on(node, typeArray[i], recursiveFunction);
}
};
/**
* Bind `node` event `eventName` to `eventListener`.
*
* @param {Element} node
* @param {String} eventName
* @param {Function} eventListener
* @param {Boolean} capture
* @return {Obejct}
* @api public
*/
on = function(node, eventName, eventListener, capture) {
node[bind](prefix + eventName, eventListener, capture || false);
return {
off: function() {
node[unbind](prefix + eventName, eventListener, capture || false);
}
};
}
/**
* Unbind `node` event `eventName`'s callback `eventListener`.
*
* @param {Element} node
* @param {String} eventName
* @param {Function} eventListener
* @param {Boolean} capture
* @return {Function}
* @api public
*/
off = function(node, eventName, eventListener, capture) {
node[unbind](prefix + eventName, eventListener, capture || false);
return eventListener;
};
}
module.exports = {
one: one,
on: on,
off: off
};
|
'use strict';
describe('angular', function() {
var element;
afterEach(function(){
dealoc(element);
});
describe('case', function() {
it('should change case', function() {
expect(lowercase('ABC90')).toEqual('abc90');
expect(manualLowercase('ABC90')).toEqual('abc90');
expect(uppercase('abc90')).toEqual('ABC90');
expect(manualUppercase('abc90')).toEqual('ABC90');
});
});
describe("copy", function() {
it("should return same object", function () {
var obj = {};
var arr = [];
expect(copy({}, obj)).toBe(obj);
expect(copy([], arr)).toBe(arr);
});
it("should copy Date", function() {
var date = new Date(123);
expect(copy(date) instanceof Date).toBeTruthy();
expect(copy(date).getTime()).toEqual(123);
expect(copy(date) === date).toBeFalsy();
});
it("should deeply copy an array into an existing array", function() {
var src = [1, {name:"value"}];
var dst = [{key:"v"}];
expect(copy(src, dst)).toBe(dst);
expect(dst).toEqual([1, {name:"value"}]);
expect(dst[1]).toEqual({name:"value"});
expect(dst[1]).not.toBe(src[1]);
});
it("should deeply copy an array into a new array", function() {
var src = [1, {name:"value"}];
var dst = copy(src);
expect(src).toEqual([1, {name:"value"}]);
expect(dst).toEqual(src);
expect(dst).not.toBe(src);
expect(dst[1]).not.toBe(src[1]);
});
it('should copy empty array', function() {
var src = [];
var dst = [{key: "v"}];
expect(copy(src, dst)).toEqual([]);
expect(dst).toEqual([]);
});
it("should deeply copy an object into an existing object", function() {
var src = {a:{name:"value"}};
var dst = {b:{key:"v"}};
expect(copy(src, dst)).toBe(dst);
expect(dst).toEqual({a:{name:"value"}});
expect(dst.a).toEqual(src.a);
expect(dst.a).not.toBe(src.a);
});
it("should deeply copy an object into an existing object", function() {
var src = {a:{name:"value"}};
var dst = copy(src, dst);
expect(src).toEqual({a:{name:"value"}});
expect(dst).toEqual(src);
expect(dst).not.toBe(src);
expect(dst.a).toEqual(src.a);
expect(dst.a).not.toBe(src.a);
});
it("should copy primitives", function() {
expect(copy(null)).toEqual(null);
expect(copy('')).toBe('');
expect(copy('lala')).toBe('lala');
expect(copy(123)).toEqual(123);
expect(copy([{key:null}])).toEqual([{key:null}]);
});
it('should throw an exception if a Scope is being copied', inject(function($rootScope) {
expect(function() { copy($rootScope.$new()); }).
toThrow("[ng:cpws] Can't copy! Making copies of Window or Scope instances is not supported.");
}));
it('should throw an exception if a Window is being copied', function() {
expect(function() { copy(window); }).
toThrow("[ng:cpws] Can't copy! Making copies of Window or Scope instances is not supported.");
});
it('should throw an exception when source and destination are equivalent', function() {
var src, dst;
src = dst = {key: 'value'};
expect(function() { copy(src, dst); }).toThrow("[ng:cpi] Can't copy! Source and destination are identical.");
src = dst = [2, 4];
expect(function() { copy(src, dst); }).toThrow("[ng:cpi] Can't copy! Source and destination are identical.");
});
it('should not copy the private $$hashKey', function() {
var src,dst;
src = {};
hashKey(src);
dst = copy(src);
expect(hashKey(dst)).not.toEqual(hashKey(src));
});
it('should retain the previous $$hashKey', function() {
var src,dst,h;
src = {};
dst = {};
// force creation of a hashkey
h = hashKey(dst);
hashKey(src);
dst = copy(src,dst);
// make sure we don't copy the key
expect(hashKey(dst)).not.toEqual(hashKey(src));
// make sure we retain the old key
expect(hashKey(dst)).toEqual(h);
});
});
describe("extend", function() {
it('should not copy the private $$hashKey', function() {
var src,dst;
src = {};
dst = {};
hashKey(src);
dst = extend(dst,src);
expect(hashKey(dst)).not.toEqual(hashKey(src));
});
it('should retain the previous $$hashKey', function() {
var src,dst,h;
src = {};
dst = {};
h = hashKey(dst);
hashKey(src);
dst = extend(dst,src);
// make sure we don't copy the key
expect(hashKey(dst)).not.toEqual(hashKey(src));
// make sure we retain the old key
expect(hashKey(dst)).toEqual(h);
});
it('should work when extending with itself', function() {
var src,dst,h;
dst = src = {};
h = hashKey(dst);
dst = extend(dst,src);
// make sure we retain the old key
expect(hashKey(dst)).toEqual(h);
});
});
describe('shallow copy', function() {
it('should make a copy', function() {
var original = {key:{}};
var copy = shallowCopy(original);
expect(copy).toEqual(original);
expect(copy.key).toBe(original.key);
});
it('should not copy $$ properties nor prototype properties', function() {
var original = {$$some: true, $$: true};
var clone = {};
expect(shallowCopy(original, clone)).toBe(clone);
expect(clone.$$some).toBeUndefined();
expect(clone.$$).toBeUndefined();
});
});
describe('elementHTML', function() {
it('should dump element', function() {
expect(startingTag('<div attr="123">something<span></span></div>')).
toEqual('<div attr="123">');
});
});
describe('equals', function() {
it('should return true if same object', function() {
var o = {};
expect(equals(o, o)).toEqual(true);
expect(equals(o, {})).toEqual(true);
expect(equals(1, '1')).toEqual(false);
expect(equals(1, '2')).toEqual(false);
});
it('should recurse into object', function() {
expect(equals({}, {})).toEqual(true);
expect(equals({name:'misko'}, {name:'misko'})).toEqual(true);
expect(equals({name:'misko', age:1}, {name:'misko'})).toEqual(false);
expect(equals({name:'misko'}, {name:'misko', age:1})).toEqual(false);
expect(equals({name:'misko'}, {name:'adam'})).toEqual(false);
expect(equals(['misko'], ['misko'])).toEqual(true);
expect(equals(['misko'], ['adam'])).toEqual(false);
expect(equals(['misko'], ['misko', 'adam'])).toEqual(false);
});
it('should ignore undefined member variables during comparison', function() {
var obj1 = {name: 'misko'},
obj2 = {name: 'misko', undefinedvar: undefined};
expect(equals(obj1, obj2)).toBe(true);
expect(equals(obj2, obj1)).toBe(true);
});
it('should ignore $ member variables', function() {
expect(equals({name:'misko', $id:1}, {name:'misko', $id:2})).toEqual(true);
expect(equals({name:'misko'}, {name:'misko', $id:2})).toEqual(true);
expect(equals({name:'misko', $id:1}, {name:'misko'})).toEqual(true);
});
it('should ignore functions', function() {
expect(equals({func: function() {}}, {bar: function() {}})).toEqual(true);
});
it('should work well with nulls', function() {
expect(equals(null, '123')).toBe(false);
expect(equals('123', null)).toBe(false);
var obj = {foo:'bar'};
expect(equals(null, obj)).toBe(false);
expect(equals(obj, null)).toBe(false);
expect(equals(null, null)).toBe(true);
});
it('should work well with undefined', function() {
expect(equals(undefined, '123')).toBe(false);
expect(equals('123', undefined)).toBe(false);
var obj = {foo:'bar'};
expect(equals(undefined, obj)).toBe(false);
expect(equals(obj, undefined)).toBe(false);
expect(equals(undefined, undefined)).toBe(true);
});
it('should treat two NaNs as equal', function() {
expect(equals(NaN, NaN)).toBe(true);
});
it('should compare Scope instances only by identity', inject(function($rootScope) {
var scope1 = $rootScope.$new(),
scope2 = $rootScope.$new();
expect(equals(scope1, scope1)).toBe(true);
expect(equals(scope1, scope2)).toBe(false);
expect(equals($rootScope, scope1)).toBe(false);
expect(equals(undefined, scope1)).toBe(false);
}));
it('should compare Window instances only by identity', function() {
expect(equals(window, window)).toBe(true);
expect(equals(window, window.parent)).toBe(false);
expect(equals(window, undefined)).toBe(false);
});
it('should compare dates', function() {
expect(equals(new Date(0), new Date(0))).toBe(true);
expect(equals(new Date(0), new Date(1))).toBe(false);
expect(equals(new Date(0), 0)).toBe(false);
expect(equals(0, new Date(0))).toBe(false);
});
it('should correctly test for keys that are present on Object.prototype', function() {
// MS IE8 just doesn't work for this kind of thing, since "for ... in" doesn't return
// things like hasOwnProperty even if it is explicitly defined on the actual object!
if (msie<=8) return;
expect(equals({}, {hasOwnProperty: 1})).toBe(false);
expect(equals({}, {toString: null})).toBe(false);
});
});
describe('size', function() {
it('should return the number of items in an array', function() {
expect(size([])).toBe(0);
expect(size(['a', 'b', 'c'])).toBe(3);
});
it('should return the number of properties of an object', function() {
expect(size({})).toBe(0);
expect(size({a:1, b:'a', c:noop})).toBe(3);
});
it('should return the number of own properties of an object', function() {
var obj = inherit({protoProp: 'c', protoFn: noop}, {a:1, b:'a', c:noop});
expect(size(obj)).toBe(5);
expect(size(obj, true)).toBe(3);
});
it('should return the string length', function() {
expect(size('')).toBe(0);
expect(size('abc')).toBe(3);
});
it('should not rely on length property of an object to determine its size', function() {
expect(size({length:99})).toBe(1);
});
});
describe('parseKeyValue', function() {
it('should parse a string into key-value pairs', function() {
expect(parseKeyValue('')).toEqual({});
expect(parseKeyValue('simple=pair')).toEqual({simple: 'pair'});
expect(parseKeyValue('first=1&second=2')).toEqual({first: '1', second: '2'});
expect(parseKeyValue('escaped%20key=escaped%20value')).
toEqual({'escaped key': 'escaped value'});
expect(parseKeyValue('emptyKey=')).toEqual({emptyKey: ''});
expect(parseKeyValue('flag1&key=value&flag2')).
toEqual({flag1: true, key: 'value', flag2: true});
});
it('should ignore key values that are not valid URI components', function() {
expect(function() { parseKeyValue('%'); }).not.toThrow();
expect(parseKeyValue('%')).toEqual({});
expect(parseKeyValue('invalid=%')).toEqual({ invalid: undefined });
expect(parseKeyValue('invalid=%&valid=good')).toEqual({ invalid: undefined, valid: 'good' });
});
it('should parse a string into key-value pairs with duplicates grouped in an array', function() {
expect(parseKeyValue('')).toEqual({});
expect(parseKeyValue('duplicate=pair')).toEqual({duplicate: 'pair'});
expect(parseKeyValue('first=1&first=2')).toEqual({first: ['1','2']});
expect(parseKeyValue('escaped%20key=escaped%20value&&escaped%20key=escaped%20value2')).
toEqual({'escaped key': ['escaped value','escaped value2']});
expect(parseKeyValue('flag1&key=value&flag1')).
toEqual({flag1: [true,true], key: 'value'});
expect(parseKeyValue('flag1&flag1=value&flag1=value2&flag1')).
toEqual({flag1: [true,'value','value2',true]});
});
});
describe('toKeyValue', function() {
it('should serialize key-value pairs into string', function() {
expect(toKeyValue({})).toEqual('');
expect(toKeyValue({simple: 'pair'})).toEqual('simple=pair');
expect(toKeyValue({first: '1', second: '2'})).toEqual('first=1&second=2');
expect(toKeyValue({'escaped key': 'escaped value'})).
toEqual('escaped%20key=escaped%20value');
expect(toKeyValue({emptyKey: ''})).toEqual('emptyKey=');
});
it('should serialize true values into flags', function() {
expect(toKeyValue({flag1: true, key: 'value', flag2: true})).toEqual('flag1&key=value&flag2');
});
it('should serialize duplicates into duplicate param strings', function() {
expect(toKeyValue({key: [323,'value',true]})).toEqual('key=323&key=value&key');
expect(toKeyValue({key: [323,'value',true, 1234]})).
toEqual('key=323&key=value&key&key=1234');
});
});
describe('forEach', function() {
it('should iterate over *own* object properties', function() {
function MyObj() {
this.bar = 'barVal';
this.baz = 'bazVal';
}
MyObj.prototype.foo = 'fooVal';
var obj = new MyObj(),
log = [];
forEach(obj, function(value, key) { log.push(key + ':' + value)});
expect(log).toEqual(['bar:barVal', 'baz:bazVal']);
});
it('should handle JQLite and jQuery objects like arrays', function() {
var jqObject = jqLite("<p><span>s1</span><span>s2</span></p>").find("span"),
log = [];
forEach(jqObject, function(value, key) { log.push(key + ':' + value.innerHTML)});
expect(log).toEqual(['0:s1', '1:s2']);
});
it('should handle NodeList objects like arrays', function() {
var nodeList = jqLite("<p><span>a</span><span>b</span><span>c</span></p>")[0].childNodes,
log = [];
forEach(nodeList, function(value, key) { log.push(key + ':' + value.innerHTML)});
expect(log).toEqual(['0:a', '1:b', '2:c']);
});
it('should handle HTMLCollection objects like arrays', function() {
document.body.innerHTML = "<p>" +
"<a name='x'>a</a>" +
"<a name='y'>b</a>" +
"<a name='x'>c</a>" +
"</p>";
var htmlCollection = document.getElementsByName('x'),
log = [];
forEach(htmlCollection, function(value, key) { log.push(key + ':' + value.innerHTML)});
expect(log).toEqual(['0:a', '1:c']);
});
it('should handle arguments objects like arrays', function() {
var args,
log = [];
(function(){ args = arguments}('a', 'b', 'c'));
forEach(args, function(value, key) { log.push(key + ':' + value)});
expect(log).toEqual(['0:a', '1:b', '2:c']);
});
it('should handle objects with length property as objects', function() {
var obj = {
'foo' : 'bar',
'length': 2
},
log = [];
forEach(obj, function(value, key) { log.push(key + ':' + value)});
expect(log).toEqual(['foo:bar', 'length:2']);
});
it('should handle objects of custom types with length property as objects', function() {
function CustomType() {
this.length = 2;
this.foo = 'bar'
}
var obj = new CustomType(),
log = [];
forEach(obj, function(value, key) { log.push(key + ':' + value)});
expect(log).toEqual(['length:2', 'foo:bar']);
});
});
describe('sortedKeys', function() {
it('should collect keys from object', function() {
expect(sortedKeys({c:0, b:0, a:0})).toEqual(['a', 'b', 'c']);
});
});
describe('encodeUriSegment', function() {
it('should correctly encode uri segment and not encode chars defined as pchar set in rfc3986',
function() {
//don't encode alphanum
expect(encodeUriSegment('asdf1234asdf')).
toEqual('asdf1234asdf');
//don't encode unreserved'
expect(encodeUriSegment("-_.!~*'() -_.!~*'()")).
toEqual("-_.!~*'()%20-_.!~*'()");
//don't encode the rest of pchar'
expect(encodeUriSegment(':@&=+$, :@&=+$,')).
toEqual(':@&=+$,%20:@&=+$,');
//encode '/', ';' and ' ''
expect(encodeUriSegment('/; /;')).
toEqual('%2F%3B%20%2F%3B');
});
});
describe('encodeUriQuery', function() {
it('should correctly encode uri query and not encode chars defined as pchar set in rfc3986',
function() {
//don't encode alphanum
expect(encodeUriQuery('asdf1234asdf')).
toEqual('asdf1234asdf');
//don't encode unreserved
expect(encodeUriQuery("-_.!~*'() -_.!~*'()")).
toEqual("-_.!~*'()+-_.!~*'()");
//don't encode the rest of pchar
expect(encodeUriQuery(':@$, :@$,')).
toEqual(':@$,+:@$,');
//encode '&', ';', '=', '+', and '
expect(encodeUriQuery('&;=+
toEqual('%26%3B%3D%2B%23+%26%3B%3D%2B%23');
//encode ' ' as '+'
expect(encodeUriQuery(' ')).
toEqual('++');
//encode ' ' as '%20' when a flag is used
expect(encodeUriQuery(' ', true)).
toEqual('%20%20');
//do not encode `null` as '+' when flag is used
expect(encodeUriQuery('null', true)).
toEqual('null');
//do not encode `null` with no flag
expect(encodeUriQuery('null')).
toEqual('null');
});
});
describe('angularInit', function() {
var bootstrapSpy;
var element;
beforeEach(function() {
element = {
getElementById: function (id) {
return element.getElementById[id] || [];
},
querySelectorAll: function(arg) {
return element.querySelectorAll[arg] || [];
},
getAttribute: function(name) {
return element[name];
}
};
bootstrapSpy = jasmine.createSpy('bootstrapSpy');
});
it('should do nothing when not found', function() {
angularInit(element, bootstrapSpy);
expect(bootstrapSpy).not.toHaveBeenCalled();
});
it('should look for ngApp directive as attr', function() {
var appElement = jqLite('<div ng-app="ABC"></div>')[0];
element.querySelectorAll['[ng-app]'] = [appElement];
angularInit(element, bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, ['ABC']);
});
it('should look for ngApp directive in id', function() {
var appElement = jqLite('<div id="ng-app" data-ng-app="ABC"></div>')[0];
jqLite(document.body).append(appElement);
angularInit(element, bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, ['ABC']);
});
it('should look for ngApp directive in className', function() {
var appElement = jqLite('<div data-ng-app="ABC"></div>')[0];
element.querySelectorAll['.ng\\:app'] = [appElement];
angularInit(element, bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, ['ABC']);
});
it('should look for ngApp directive using querySelectorAll', function() {
var appElement = jqLite('<div x-ng-app="ABC"></div>')[0];
element.querySelectorAll['[ng\\:app]'] = [ appElement ];
angularInit(element, bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, ['ABC']);
});
it('should bootstrap using class name', function() {
var appElement = jqLite('<div class="ng-app: ABC;"></div>')[0];
angularInit(jqLite('<div></div>').append(appElement)[0], bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, ['ABC']);
});
it('should bootstrap anonymously', function() {
var appElement = jqLite('<div x-ng-app></div>')[0];
element.querySelectorAll['[x-ng-app]'] = [ appElement ];
angularInit(element, bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, []);
});
it('should bootstrap anonymously using class only', function() {
var appElement = jqLite('<div class="ng-app"></div>')[0];
angularInit(jqLite('<div></div>').append(appElement)[0], bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, []);
});
it('should bootstrap if the annotation is on the root element', function() {
var appElement = jqLite('<div class="ng-app"></div>')[0];
angularInit(appElement, bootstrapSpy);
expect(bootstrapSpy).<API key>(appElement, []);
});
it('should complain if app module cannot be found', function() {
var appElement = jqLite('<div ng-app="doesntexist"></div>')[0];
expect(function() {
angularInit(appElement, bootstrap);
}).toThrowMatching(
/\[\$injector:modulerr] Failed to instantiate module doesntexist due to:\n.*\[\$injector:nomod] Module 'doesntexist' is not available! You either misspelled the module name or forgot to load it\./
);
});
});
describe('angular service', function() {
it('should override services', function() {
module(function($provide){
$provide.value('fake', 'old');
$provide.value('fake', 'new');
});
inject(function(fake) {
expect(fake).toEqual('new');
});
});
it('should inject dependencies specified by $inject and ignore function argument name', function() {
expect(angular.injector([function($provide){
$provide.factory('svc1', function() { return 'svc1'; });
$provide.factory('svc2', ['svc1', function(s) { return 'svc2-' + s; }]);
}]).get('svc2')).toEqual('svc2-svc1');
});
});
describe('isDate', function() {
it('should return true for Date object', function() {
expect(isDate(new Date())).toBe(true);
});
it('should return false for non Date objects', function() {
expect(isDate([])).toBe(false);
expect(isDate('')).toBe(false);
expect(isDate(23)).toBe(false);
expect(isDate({})).toBe(false);
});
});
describe('compile', function() {
it('should link to existing node and create scope', inject(function($rootScope, $compile) {
var template = angular.element('<div>{{greeting = "hello world"}}</div>');
element = $compile(template)($rootScope);
$rootScope.$digest();
expect(template.text()).toEqual('hello world');
expect($rootScope.greeting).toEqual('hello world');
}));
it('should link to existing node and given scope', inject(function($rootScope, $compile) {
var template = angular.element('<div>{{greeting = "hello world"}}</div>');
element = $compile(template)($rootScope);
$rootScope.$digest();
expect(template.text()).toEqual('hello world');
}));
it('should link to new node and given scope', inject(function($rootScope, $compile) {
var template = jqLite('<div>{{greeting = "hello world"}}</div>');
var compile = $compile(template);
var templateClone = template.clone();
element = compile($rootScope, function(clone){
templateClone = clone;
});
$rootScope.$digest();
expect(template.text()).toEqual('{{greeting = "hello world"}}');
expect(element.text()).toEqual('hello world');
expect(element).toEqual(templateClone);
expect($rootScope.greeting).toEqual('hello world');
}));
it('should link to cloned node and create scope', inject(function($rootScope, $compile) {
var template = jqLite('<div>{{greeting = "hello world"}}</div>');
element = $compile(template)($rootScope, noop);
$rootScope.$digest();
expect(template.text()).toEqual('{{greeting = "hello world"}}');
expect(element.text()).toEqual('hello world');
expect($rootScope.greeting).toEqual('hello world');
}));
});
describe('nodeName_', function() {
it('should correctly detect node name with "namespace" when xmlns is defined', function() {
var div = jqLite('<div xmlns:ngtest="http://angularjs.org/">' +
'<ngtest:foo ngtest:attr="bar"></ngtest:foo>' +
'</div>')[0];
expect(nodeName_(div.childNodes[0])).toBe('NGTEST:FOO');
expect(div.childNodes[0].getAttribute('ngtest:attr')).toBe('bar');
});
if (!msie || msie >= 9) {
it('should correctly detect node name with "namespace" when xmlns is NOT defined', function() {
var div = jqLite('<div xmlns:ngtest="http://angularjs.org/">' +
'<ngtest:foo ngtest:attr="bar"></ng-test>' +
'</div>')[0];
expect(nodeName_(div.childNodes[0])).toBe('NGTEST:FOO');
expect(div.childNodes[0].getAttribute('ngtest:attr')).toBe('bar');
});
}
});
describe('nextUid()', function() {
it('should return new id per call', function() {
var seen = {};
var count = 100;
while(count
var current = nextUid();
expect(current.match(/[\d\w]+/)).toBeTruthy();
expect(seen[current]).toBeFalsy();
seen[current] = true;
}
});
});
describe('version', function() {
it('version should have full/major/minor/dot/codeName properties', function() {
expect(version).toBeDefined();
expect(version.full).toBe('"NG_VERSION_FULL"');
expect(version.major).toBe("NG_VERSION_MAJOR");
expect(version.minor).toBe("NG_VERSION_MINOR");
expect(version.dot).toBe("NG_VERSION_DOT");
expect(version.codeName).toBe('"NG_VERSION_CODENAME"');
});
});
describe('bootstrap', function() {
it('should bootstrap app', function(){
var element = jqLite('<div>{{1+2}}</div>');
var injector = angular.bootstrap(element);
expect(injector).toBeDefined();
expect(element.injector()).toBe(injector);
dealoc(element);
});
it("should complain if app module can't be found", function() {
var element = jqLite('<div>{{1+2}}</div>');
expect(function() {
angular.bootstrap(element, ['doesntexist']);
}).toThrowMatching(
/\[\$injector:modulerr\] Failed to instantiate module doesntexist due to:\n.*\[\$injector:nomod\] Module 'doesntexist' is not available! You either misspelled the module name or forgot to load it\./);
expect(element.html()).toBe('{{1+2}}');
dealoc(element);
});
describe('deferred bootstrap', function() {
var originalName = window.name,
element;
beforeEach(function() {
window.name = '';
element = jqLite('<div>{{1+2}}</div>');
});
afterEach(function() {
dealoc(element);
window.name = originalName;
});
it('should wait for extra modules', function() {
window.name = 'NG_DEFER_BOOTSTRAP!';
angular.bootstrap(element);
expect(element.html()).toBe('{{1+2}}');
angular.resumeBootstrap();
expect(element.html()).toBe('3');
expect(window.name).toEqual('');
});
it('should load extra modules', function() {
element = jqLite('<div>{{1+2}}</div>');
window.name = 'NG_DEFER_BOOTSTRAP!';
var bootstrapping = jasmine.createSpy('bootstrapping');
angular.bootstrap(element, [bootstrapping]);
expect(bootstrapping).not.toHaveBeenCalled();
expect(element.injector()).toBeUndefined();
angular.module('addedModule', []).value('foo', 'bar');
angular.resumeBootstrap(['addedModule']);
expect(bootstrapping).<API key>();
expect(element.injector().get('foo')).toEqual('bar');
});
it('should not defer bootstrap without window.name cue', function() {
angular.bootstrap(element, []);
angular.module('addedModule', []).value('foo', 'bar');
expect(function() {
element.injector().get('foo');
}).toThrow('[$injector:unpr] Unknown provider: fooProvider <- foo');
expect(element.injector().get('$http')).toBeDefined();
});
it('should restore the original window.name after bootstrap', function() {
window.name = 'NG_DEFER_BOOTSTRAP!my custom name';
angular.bootstrap(element);
expect(element.html()).toBe('{{1+2}}');
angular.resumeBootstrap();
expect(element.html()).toBe('3');
expect(window.name).toEqual('my custom name');
});
});
});
describe('startingElementHtml', function(){
it('should show starting element tag only', function(){
expect(startingTag('<ng-abc x="2A"><div>text</div></ng-abc>')).
toBe('<ng-abc x="2A">');
});
});
describe('startingTag', function() {
it('should allow passing in Nodes instead of Elements', function() {
var txtNode = document.createTextNode('some text');
expect(startingTag(txtNode)).toBe('some text');
});
});
describe('snake_case', function(){
it('should convert to snake_case', function() {
expect(snake_case('ABC')).toEqual('a_b_c');
expect(snake_case('alanBobCharles')).toEqual('alan_bob_charles');
});
});
describe('fromJson', function() {
it('should delegate to JSON.parse', function() {
var spy = spyOn(JSON, 'parse').andCallThrough();
expect(fromJson('{}')).toEqual({});
expect(spy).toHaveBeenCalled();
});
});
describe('toJson', function() {
it('should delegate to JSON.stringify', function() {
var spy = spyOn(JSON, 'stringify').andCallThrough();
expect(toJson({})).toEqual('{}');
expect(spy).toHaveBeenCalled();
});
it('should format objects pretty', function() {
expect(toJson({a: 1, b: 2}, true)).
toBeOneOf('{\n "a": 1,\n "b": 2\n}', '{\n "a":1,\n "b":2\n}');
expect(toJson({a: {b: 2}}, true)).
toBeOneOf('{\n "a": {\n "b": 2\n }\n}', '{\n "a":{\n "b":2\n }\n}');
});
it('should not serialize properties starting with $', function() {
expect(toJson({$few: 'v', $$some:'value'}, false)).toEqual('{}');
});
it('should not serialize $window object', function() {
expect(toJson(window)).toEqual('"$WINDOW"');
});
it('should not serialize $document object', function() {
expect(toJson(document)).toEqual('"$DOCUMENT"');
});
it('should not serialize scope instances', inject(function($rootScope) {
expect(toJson({key: $rootScope})).toEqual('{"key":"$SCOPE"}');
}));
});
});
|
<!
@license
Copyright (c) 2016 The Jviz Project Authors. All rights reserved.
The Jviz Project is under the MIT License. See https:
<!-- Import components -->
<link rel="import" href="../../../polymer/polymer.html">
<link rel="import" href="../../../jviz-styles/jviz-styles.html">
<!-- Import jviz elements -->
<link rel="import" href="../../jviz.html">
<link rel="import" href="../jviz-btn/jviz-btn.html">
<link rel="import" href="../jviz-input/jviz-input.html">
<link rel="import" href="../jviz-select/jviz-select.html">
<!-- Import table components -->
<link rel="import" href="./jviz-table-column.html">
<!-- Table component -->
<dom-module id="jviz-table">
<template>
<style>
/* Main element */
:host
{
display: block;
margin-top: 0px;
margin-bottom: 10px;
}
/* Table header */
:host .header
{
display: block;
}
:host .header .title
{
@apply --jviz-heading-3;
}
/* Main table container */
:host .main
{
display: block;
width: 100%;
overflow-x: auto;
overflow-y: auto;
}
/* Table element */
:host .table
{
display: table;
min-width: 100%;
table-layout: auto;
@apply(--jviz-font);
color: var(--jviz-navy);
border-collapse: collapse;
border-width: 0px;
}
/* Table head */
:host .head
{
display: table-header-group;
width: 100%;
position: relative;
height: 40px;
background-color: var(--jviz-grey-2);
}
/* Table head row */
:host .head .row
{
display: table-row;
transition: all 0.3s;
}
/* Table head cell */
:host .head .cell
{
display: table-cell;
transition: all 0.3s;
vertical-align: top;
user-select: none;
-<API key>: none;
-webkit-user-select: none;
-moz-user-select: none;
font-weight: bold;
line-height: 24px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
padding: 10px;
}
:host .head .cell:first-of-type
{
<API key>: 5px !important;
}
:host .head .cell:last-of-type
{
<API key>: 5px !important;
}
:host .head .sortable
{
background-size: 15px 30px;
background-position: right center;
background-repeat: no-repeat;
}
:host .head .order-none
{
background-image: url('./img/tab_order_none.svg');
}
:host .head .order-asc
{
background-image: url('./img/tab_order_asc.svg');
}
:host .head .order-desc
{
background-image: url('./img/tab_order_desc.svg');
}
:host .head .checkbox
{
width: 26px;
padding-right: 10px;
padding-left: 10px;
padding-top: 12px;
padding-bottom: 12px;
}
/* Table body */
:host .body
{
display: table-row-group;
}
/* Table body row */
:host .body .row
{
display: table-row;
transition: all 0.3s;
}
:host .body .row:nth-child(even)
{
background-color: var(--jviz-grey-4);
}
:host .body .row:nth-child(odd)
{
background-color: var(--jviz-grey-3);
}
/* Table body cell */
:host .body .row .cell
{
display: table-cell;
transition: all 0.3s;
padding: 10px;
}
:host .body .row:last-of-type .cell:first-of-type
{
<API key>: 5px !important;
}
:host .body .row:last-of-type .cell:last-of-type
{
<API key>: 5px !important;
}
/* Page control */
:host .page
{
display: block;
width: 100%;
height: 30px;
margin-top: 10px;
margin-bottom: 10px;
}
:host .page .content-left
{
display: inline-block;
float: left;
}
:host .page .content-right
{
display: inline-block;
float: right;
}
:host .page .text
{
display: inline-block;
height: 30px;
line-height: 30px;
vertical-align: top;
}
:host .page .text-rows
{
padding-right: 5px;
}
:host .page .text-page
{
padding-left: 6px;
padding-right: 6px;
}
:host .page .space
{
display: inline-block;
width: 15px;
}
</style>
<!-- Columns -->
<content select="jviz-table-column"></content>
<div class="header">
<div class="title">{{ header }}</div>
</div>
<div id="main" class="main">
<!-- Table container -->
<div id="table" class="table">
<!-- Table head -->
<div id="head" class="head">
<div class="row">
<template is="dom-if" if="{{ selectable }}">
<div class="cell checkbox"></div>
</template>
<template id="headerRow" is="dom-repeat" items="{{ _columns }}">
<template is="dom-if" if="{{ item.sortable }}">
<div class="cell sortable order-none" data-key$="{{ item.key }}" data-index$="{{ item.index }}" on-tap="_tap_head_cell">
{{ item.header }}
</div>
</template>
<template is="dom-if" if="{{ !item.sortable }}">
<div class="cell" data-key$="{{ item.key }}" data-index$="{{ item.index }}" on-tap="_tap_head_cell">
{{ item.header }}
</div>
</template>
</template>
</div>
</div>
<!-- Table body -->
<div id="body" class="body">
<template id="bodyRow" is="dom-repeat" items="{{ _keys_displayed }}" as="row">
<div class="row">
<template is="dom-if" if="{{ selectable }}">
<div class="cell checkbox"></div>
</template>
<template is="dom-repeat" items="{{ _columns }}" index-as="column">
<div class="cell" data-row$="{{ row }}" data-column$="{{ column }}" on-tap="_tap_body_cell">
{{ value(row, column) }}
</div>
</template>
</div>
</template>
</div>
</div>
</div>
<!-- Page control -->
<div class="page">
<div class="content-left">
<div class="text text-rows">
Showing <b>{{ _get_range_start(page, pageSize, rows) }}</b> to
<b>{{ _get_range_end(page, pageSize, rows) }}</b> of <b>{{ rows }}</b> rows.
</div>
</div>
<div class="content-right">
<div class="text text-rows">Rows per page:</div>
<jviz-select id="entries" width="60px">
<option value="10">10</option>
</jviz-select>
<div class="space"></div>
<jviz-btn color="grey" icon="chevron-left" text="Prev" on-tap="prev_page" icon-align="left"></jviz-btn>
<div class="text text-page">Page <b>{{ page }}</b> of <b>{{ _page_end }}</b></div>
<jviz-btn color="grey" icon="chevron-right" text="Next" on-tap="next_page" icon-align="right"></jviz-btn>
</div>
</div>
</template>
</dom-module>
<!-- Table logic -->
<script>
//Initialize the table element
var jviz_table = { is: 'jviz-table' };
//Properties
jviz_table.properties = {};
//Table private properties
jviz_table.properties._sort_keys = { type: Array, value: [] };
jviz_table.properties._sort_order = { type: Array, value: [] };
jviz_table.properties._columns = { type: Array, value: [] };
jviz_table.properties._keys_displayed = { type: Array, value: [] };
jviz_table.properties._keys_selected = { type: Array, value: [] };
jviz_table.properties._keys_filtered = { type: Array, value: [] };
jviz_table.properties._keys_sorted = { type: Array, value: [] };
jviz_table.properties._page_start = { type: Number, value: 1 };
jviz_table.properties._page_end = { type: Number, value: 1 };
//Table public api
jviz_table.properties.selectable = { type: Boolean, reflectToAttribute: true, value: false };
jviz_table.properties.header = { type: String, reflectToAttribute: true };
jviz_table.properties.default = { type: String, reflectToAttribute: true, value: '' };
jviz_table.properties.rows = { type: Number, value: 0 };
jviz_table.properties.pageSize = { type: Number, reflectToAttribute: true, value: 10, observer: '_update_page_size' };
jviz_table.properties.page = { type: Number, reflectToAttribute: true, value: 1, observer: '_update_page' };
jviz_table.properties.pageEntries = { type: String, reflectToAttribute: true, value: '10', observer: '<API key>' };
//Table public lists
jviz_table.properties.columns = { type: Array, value: [], observer: '_update_columns' };
jviz_table.properties.data = { type: Array, value: [], observer: '_update_data' };
//Observers
jviz_table.observers = [ '_get_pages(rows, pageSize)' ];
//Table is attached
jviz_table.attached = function()
{
//Save this
var self = this;
//Save the actual columns
this.columns = this.<API key>('jviz-table-column');
//Add the entries event listener
this.$.entries.addEventListener('change:value', function()
{
//Update the page size
self.pageSize = parseInt(self.$.entries.value);
});
};
//Update the columns
jviz_table._update_columns = function()
{
//Save this
var self = this;
//Display in console
console.debug('Update columns information');
//Initialize the columns list
var list = [];
//Read all the columns
this.columns.forEach(function(col, index)
{
//Check if column is visible
if(col.visible === false){ return; }
//Save the column information
list.push({ header: col.header, key: col.key, sortable: col.sortable, index: index });
});
//Reset the columns list
this._columns = list;
//Update the columns images
jviz.time_out(50, function()
{
//Update the columns images
return self._images_sort();
});
};
//Update the data
jviz_table._update_data = function()
{
//Display in console
console.debug('Update data information');
//Clear the filter
this._clear_filter();
//Fire the update data event
var event = this.fire('update-data', { data: this.data });
//Check if the prevent default has been set
if(event.defaultPrevented === false)
{
//Display all the data
//this.display(0, this.data.length - 1);
this.page = 1;
}
};
//Update the entries number
jviz_table.<API key> = function(value)
{
//Initialize the entries list
var entries = [];
//Split the entries by comma
value.split(',').forEach(function(el)
{
//Initialize the option object
var obj = { value: el, text: el, selected: false };
//Save the option to the entries list
entries.push(obj);
});
//Update the entries values
this.$.entries.options = entries;
//Check the number of entries
if(entries.length > 0)
{
//Set the page size as the first entry value
this.pageSize = parseInt(entries[0].value);
}
};
//Update the page size
jviz_table._update_page_size = function()
{
//Save the actual value
this.$.entries.value = this.pageSize.toString();
};
//Calculate the number of pages
jviz_table._get_pages = function()
{
//Calculate the number of pages
this._page_end = this.rows / this.pageSize;
//Parse the number of pages
this._page_end = (Math.floor(this._page_end) === this._page_end) ? this._page_end : Math.floor(this._page_end) + 1;
//Check for empty page
if(this._page_end === 0){ this._page_end = 1; }
//Check the actual page
if(this.page === 1)
{
//Update the actual page
this._update_page();
}
else
{
//Reset the actual page
this.page = 1;
}
};
//Update the actual page
jviz_table._update_page = function()
{
//Get the start position
//var start = (this.page - 1) * this.pageSize;
//Get the end position
//var end = (this.page) * this.pageSize - 1;
//Display the data
//this.display(start, end);
//Draw the table
this.reload();
};
//Get the start range value
jviz_table._get_range_start = function()
{
//Return the start range value
return (this.page - 1) * this.pageSize + 1;
};
//Get the end range
jviz_table._get_range_end = function()
{
//Return the end range value
return Math.min(this.rows, this.page * this.pageSize);
};
//Get a data value
jviz_table.value = function(row_index, column_index)
{
//Get the column key
var column_key = this.columns[column_index].key;
//Get the column parse method
var column_parse = this.columns[column_index].parse;
//Get the real index
//var index = this._keys_displayed[row_index];
//Get the data value
var value = (typeof this.data[row_index][column_key] === 'undefined') ? this.default : this.data[row_index][column_key];
//Check if the parse method is defined
if(column_parse)
{
//Parse the column data
var new_value = jviz.exec(column_parse, window, value, column_key, this.data[row_index], row_index);
//Check the new value
if(typeof new_value !== 'undefined')
{
//Save the new value
value = new_value;
}
}
//Return the data value
return value;
};
//Display a subset of data
jviz_table.display = function(start, end)
{
/*
//Check for no start position
if(typeof start !== 'number'){ var start = 0; }
//Check for no end position
if(typeof end !== 'number'){ var end = this.rows - 1; }
//Check the start value
if(start < 0){ start = 0; }
//Check the end value
if(end < 0){ end = 0; }
//Save the start value
this._row_start = Math.min(start, end);
//Save the end value
this._row_end = Math.max(start, end);
*/
//Display the data
//this._display();
this.reload();
};
//Reload the table
jviz_table.reload = function()
{
//Check if data exists
if(typeof this.data !== 'object'){ return; }
//Reset the displayed keys
this._keys_displayed = [];
//Check for no data to show
if(this.data.length > 0)
{
//Get the computed start position
//var start = Math.max(0, this._row_start);
var start = this._get_range_start() - 1;
//Get the computed end position
//var end = Math.min(this.rows - 1, this._row_end);
var end = this._get_range_end() - 1;
//Display in console (debug)
console.log('Draw ' + start + ' - ' + end);
//Build the displayed keys array
//this._keys_displayed = jviz.array.range(start, end, 1);
this._keys_displayed = this._keys_sorted.slice(start, end + 1);
}
//Render the table
//this.$.bodyRow.render();
//this._display_data();
};
//Reset all
jviz_table.reset = function()
{
//Clear the data
this.data = [];
};
//Select a row
jviz_table.select = function(index, notify)
{
};
//Select all rows
jviz_table.select_all = function(notify)
{
};
//Deselect a row
jviz_table.deselect = function(index, notify)
{
};
//Deselect all rows
jviz_table.deselect_all = function(notify)
{
};
//Toggle the selection
jviz_table.toggle = function()
{
};
//Sort the data
jviz_table.sort = function(conditions)
{
//Save this
var self = this;
//Check for undefined conditions
if(typeof conditions !== 'object'){ var conditions = []; }
//Check if the conditions is an array
if(jviz.is.array(conditions) === false){ conditions = [ conditions ]; }
//Clear the sort
this._clear_sort();
//Reset the sort keys
//this._reset_sort();
//Read all the conditions
conditions.forEach(function(el)
{
//Check if the key and the order is defined
if(typeof el.key !== 'string' || typeof el.order !== 'string'){ return; }
//Save the key value
self._sort_keys.push(el.key);
//Save the order value
self._sort_order.push(el.order);
});
//Apply the sort conditions
this._apply_sort();
};
//Sort the data
jviz_table._apply_sort = function()
{
//Save this
var self = this;
//Reset the keys order
this._reset_sort();
//Check the sort keys
if(this._sort_keys.length !== 0)
{
//Sort the order array
this._keys_sorted.sort(function(a, b)
{
//Compare all keys
for(var i = 0; i < self._sort_keys.length; i++)
{
//Get the column key
var key = self._sort_keys[i];
//Get the order
var order = self._sort_order[i];
//Check if que difference is numeric
var numeric = !isNaN(+self.data[a][key] - +self.data[b][key]);
//Get the values
var value1 = (numeric === true) ? +self.data[a][key] : self.data[a][key].toLowerCase();
var value2 = (numeric === true) ? +self.data[b][key] : self.data[b][key].toLowerCase();
//Check the values
if(value1 < value2)
{
//Check the order
return (order === 'desc') ? 1 : -1;
}
else if(value1 > value2)
{
//Check the order
return (order === 'desc') ? -1 : 1;
}
}
//Default, return 0
return 0;
});
}
//Display the sort images
this._images_sort();
//Display again the data
//this._display();
this.reload();
};
//Display the sort images
jviz_table._images_sort = function()
{
//Save this
var self = this;
//Iterate over all sortable and visible columns
this.$.head.querySelectorAll('.sortable').forEach(function(col)
{
//Remove the asc order
col.classList.remove('order-asc');
//Remove the desc order
col.classList.remove('order-desc');
//Get the column key
var key = col.dataset.key;
//Get the key index in the sort array
var index = self._sort_keys.indexOf(key);
//Check if key exists
if(index === -1)
{
//Add the none order
col.classList.add('order-none');
}
else
{
//Remove the order none
col.classList.remove('order-none');
//Add the order
col.classList.add('order-' + self._sort_order[index]);
}
});
};
//Reset the sort
jviz_table._reset_sort = function()
{
//Reset the sorted keys
this._keys_sorted = this._keys_filtered.concat([]);
};
//Clear the sort
jviz_table._clear_sort = function()
{
//Reset the sorted keys
//this._reset_sort();
//Clear the sort keys
this._sort_keys = [];
//Clear the sort order
this._sort_order = [];
};
//Add a new sort key
jviz_table._add_sort = function(key)
{
//Save the key
this._sort_keys.push(key);
//Add the order value
this._sort_order.push('asc');
};
//Change the sort order for a key
jviz_table._change_sort = function(key)
{
//Get the key index
var index = this._sort_keys.indexOf(key);
//Check for not found
if(index === -1){ return false; }
//Change the order
if(this._sort_order[index] === 'asc')
{
//Change the order to desc
this._sort_order[index] = 'desc';
}
else
{
//Remove the item
this._remove_sort(key);
}
};
//Remove a sort key
jviz_table._remove_sort = function(key)
{
//Get the index
var index = this._sort_keys.indexOf(key);
//Check for not found
if(index === -1){ return; }
//Remove from the keys array
this._sort_keys.splice(index, 1);
//Remove from the order array
this._sort_order.splice(index, 1);
};
//Filter the data
jviz_table.filter = function(condition)
{
//Save this
var self = this;
//Check the condition
if(typeof condition !== 'function'){ return this._clear_filter(); }
//Reset the filtered array
this._keys_filtered = [];
//Read all the data
this.data.forEach(function(el, index)
{
//Call the condition function
var valid = condition(el, index);
//Check for no valid
if(typeof valid === 'boolean' && valid === false){ return; }
//Save the index
self._keys_filtered.push(index);
});
//Save the number of rows
this.rows = this._keys_filtered.length;
//Reset the sorted keys
//this._reset_sort();
//Order again the data
this._apply_sort();
};
//Clear the filters
jviz_table._clear_filter = function()
{
//Clear the filter keys
//this._keys_filtered = Array.apply(null, Array(this.data.length)).map(function(v, i){ return i; });
this._keys_filtered = jviz.array.range(0, this.data.length - 1, 1);
//Save the number of rows
this.rows = this._keys_filtered.length;
//Reset the sorted keys
this._reset_sort();
//Apply the sort conditions
this._apply_sort();
};
//Clicked on a header cell
jviz_table._tap_head_cell = function(e)
{
//Display the column index in console
console.debug(e.target.dataset.key);
//Get the column key value
var column_key = e.target.dataset.key;
//Get the column index
var column_index = e.target.dataset.index;
//Check if this column is sortable
if(this.columns[column_index].sortable === false){ return; }
//Check if exists
var column_exists = this._sort_keys.indexOf(column_key) !== -1;
//Check for shift key pressed
if(e.detail.sourceEvent.shiftKey === true)
{
//Display in console
console.debug('Shift pressed');
//Check if column exists
if(column_exists === true)
{
//Display in console
console.debug('Key ' + column_key + ' exists, change the order');
//Change the order
this._change_sort(column_key);
}
else
{
//Display in console
console.debug('Key ' + column_key + ' does not exists, adding');
//Add the new key
this._add_sort(column_key);
}
}
else
{
//Display in console
console.debug('Shift not pressed');
//Check the number of keys sorted
if(this._sort_keys.length === 0)
{
//Display in console
console.debug('Sort is empty. Adding ' + column_key);
//Add the new sort key
this._add_sort(column_key);
}
else if(this._sort_keys.length === 1 && column_exists === true)
{
//Display in console
console.debug('Sort key ' + column_key + ' exists, change the key order...');
//Change the key order
this._change_sort(column_key);
}
else
{
//Display in console
console.debug('Remove all sort keys');
//Reset the sort arrays
this._clear_sort();
//Add the new sort key
this._add_sort(column_key);
}
}
//Sort the data
this._apply_sort();
};
//Clicked on a body cell
jviz_table._tap_body_cell = function(e)
{
//Get the cell div
var cell = e.path[0];
//Check for undefined dataset row and column
if(typeof cell.dataset.row === 'undefined' || typeof cell.dataset.column === 'undefined'){ return; }
//Get the row index
var row_index = parseInt(cell.dataset.row);
//Get the row data
var row_data = this.data[row_index];
//Get the column index
var column_index = parseInt(cell.dataset.column);
//Get the column key
var column_key = this.columns[column_index].key;
//Get the value
var value = row_data[column_key];
//Emit the tap cell
this.fire('tap:body:cell', { value: value, row: row_data, column: column_key, row_index: row_index, column_index: column_index });
};
//Next page
jviz_table.next_page = function()
{
//Check the page
this.page = (this._page_end <= this.page) ? this._page_end : this.page + 1;
};
//Prev page
jviz_table.prev_page = function()
{
//Check the page
this.page = (this.page <= this._page_start) ? this._page_start : this.page - 1;
};
//Go to the first page
jviz_table.first_page = function()
{
//Open the first page
this.page = this._page_start;
};
//Go to the last page
jviz_table.last_page = function()
{
//Open the last page
this.page = this._page_end;
};
//Register the table element
Polymer(jviz_table);
</script>
|
#ifndef ASF_H
#define ASF_H
/*
* This file includes all API header files for the selected drivers from ASF.
* Note: There might be duplicate includes required by more than one driver.
*
* The file is automatically generated and will be re-written when
* running the ASF driver selector tool. Any changes will be discarded.
*/
// From module: Common SAM compiler driver
#include <compiler.h>
#include <status_codes.h>
// From module: Generic board support
#include <board.h>
// From module: Generic components of unit test framework
#include <unit_test/suite.h>
// From module: IOPORT - General purpose I/O service
#include <ioport.h>
// From module: Interrupt management - SAM implementation
#include <interrupt.h>
// From module: PMC - Power Management Controller
#include <pmc.h>
#include <sleep.h>
// From module: Part identification macros
#include <parts.h>
// From module: SAM FPU driver
#include <fpu.h>
// From module: SAM4E EK LED support enabled
#include <led.h>
// From module: SAM4E startup code
#include <exceptions.h>
// From module: Standard serial I/O (stdio) - SAM implementation
#include <stdio_serial.h>
// From module: System Clock Control - SAM4E implementation
#include <sysclk.h>
// From module: UART - Univ. Async Rec/Trans
#include <uart.h>
// From module: USART - Serial interface - SAM implementation for devices with both UART and USART
#include <serial.h>
// From module: USART - Univ. Syn Async Rec/Trans
#include <usart.h>
#endif // ASF_H
|
package corehttp
// TODO: move to IPNS
const WebUIPath = "/ipfs/<API key>"
// this is a list of all past webUI paths.
var WebUIPaths = []string{
WebUIPath,
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
"/ipfs/<API key>",
}
var WebUIOption = RedirectOption("webui", WebUIPath)
|
class X where
foo :: Int
-- Y is something
-- nice.
class Y where
bar :: Int
|
module.exports = {
// Valid `level` configs:
// i.e. the minimum log level to capture with sails.log.*()
// 'error' : Display calls to `.error()`
// 'warn' : Display calls from `.error()` to `.warn()`
// 'debug' : Display calls from `.error()`, `.warn()` to `.debug()`
// 'info' : Display calls from `.error()`, `.warn()`, `.debug()` to `.info()`
// 'verbose': Display calls from `.error()`, `.warn()`, `.debug()`, `.info()` to `.verbose()`
log: {
level: 'info'
}
};
|
package org.cs3.prolog.connector.cterm;
import org.cs3.prolog.connector.internal.cterm.parser.ASTNode;
/**
* Represents a Prolog string.
*/
public class CString extends CTerm {
public CString(ASTNode node) {
super(node);
}
}
|
#include <unordered_set>
#include "fakeit/Invocation.hpp"
namespace fakeit {
struct <API key> {
virtual void clear() = 0;
virtual ~<API key>() NO_THROWS { }
};
struct <API key> {
virtual void <API key>(std::unordered_set<fakeit::Invocation *> &into) const = 0;
virtual ~<API key>() NO_THROWS { }
};
struct <API key> : public <API key> {
<API key>(<API key> *inner) :
_inner(inner) {
}
void <API key>(std::unordered_set<fakeit::Invocation *> &into) const override {
_inner-><API key>(into);
}
private:
std::shared_ptr<<API key>> _inner;
};
struct <API key> : public <API key> {
<API key>(<API key> decorated) : _decorated(decorated) {
}
void <API key>(std::unordered_set<fakeit::Invocation *> &into) const override {
std::unordered_set<fakeit::Invocation *> all;
_decorated.<API key>(all);
for (fakeit::Invocation *i : all) {
if (!i->isVerified()) {
into.insert(i);
}
}
}
private:
<API key> _decorated;
};
struct <API key> : public <API key> {
<API key>(std::vector<<API key> *> &sources) : _sources(sources) {
}
void <API key>(std::unordered_set<fakeit::Invocation *> &into) const override {
std::unordered_set<fakeit::Invocation *> tmp;
for (<API key> *source : _sources) {
source-><API key>(tmp);
}
filter(tmp, into);
}
protected:
bool shouldInclude(fakeit::Invocation *) const {
return true;
}
private:
std::vector<<API key> *> _sources;
void filter(std::unordered_set<Invocation *> &source, std::unordered_set<Invocation *> &target) const {
for (Invocation *i:source) {
if (shouldInclude(i)) {
target.insert(i);
}
}
}
};
}
|
#!/usr/bin/python
# Test the handling of toolset.add-requirements
import BoostBuild
t = BoostBuild.Tester(pass_toolset=0, <API key>=False)
t.write('jamroot.jam', '''
import toolset ;
import errors ;
rule test-rule ( properties * )
{
return <define><API key> ;
}
toolset.add-requirements
<define>TEST_MACRO
<conditional>@test-rule
<link>shared:<define>TEST_CONDITIONAL
;
rule check-requirements ( target : sources * : properties * )
{
local macros = TEST_MACRO TEST_CONDITIONAL <API key> ;
for local m in $(macros)
{
if ! <define>$(m) in $(properties)
{
errors.error $(m) not defined ;
}
}
}
make test : : @check-requirements ;
''')
t.run_build_system()
t.cleanup()
|
package org.lib4j.test;
import java.util.HashMap;
import java.util.Map;
import javax.xml.XMLConstants;
import javax.xml.transform.Source;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.<API key>;
import javax.xml.xpath.XPathFactory;
import org.junit.Assert;
import org.junit.ComparisonFailure;
import org.lib4j.xml.dom.DOMStyle;
import org.lib4j.xml.dom.DOMs;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xmlunit.builder.Input;
import org.xmlunit.diff.Comparison;
import org.xmlunit.diff.ComparisonListener;
import org.xmlunit.diff.ComparisonResult;
import org.xmlunit.diff.DOMDifferenceEngine;
import org.xmlunit.diff.DifferenceEngine;
public class AssertXml {
private XPath newXPath() {
final XPath xPath = XPathFactory.newInstance().newXPath();
xPath.setNamespaceContext(new <API key>(<API key>));
return xPath;
}
public static AssertXml compare(final Element controlElement, final Element testElement) {
final Map<String,String> <API key> = new HashMap<>();
<API key>.put("xsi", "http:
final NamedNodeMap attributes = controlElement.getAttributes();
for (int i = 0; i < attributes.getLength(); i++) {
final Attr attribute = (Attr)attributes.item(i);
if (XMLConstants.<API key>.equals(attribute.getNamespaceURI()) && "xmlns".equals(attribute.getPrefix()))
<API key>.put(attribute.getLocalName(), attribute.getNodeValue());
}
return new AssertXml(<API key>, controlElement, testElement);
}
private final Map<String,String> <API key>;
private final Element controlElement;
private final Element testElement;
private AssertXml(final Map<String,String> <API key>, final Element controlElement, final Element testElement) {
if (!controlElement.getPrefix().equals(testElement.getPrefix()))
throw new <API key>("Prefixes of control and test elements must be the same: " + controlElement.getPrefix() + " != " + testElement.getPrefix());
this.<API key> = <API key>;
this.controlElement = controlElement;
this.testElement = testElement;
}
public void addAttribute(final Element element, final String xpath, final String name, final String value) throws <API key> {
final XPathExpression expression = newXPath().compile(xpath);
final NodeList nodes = (NodeList)expression.evaluate(element, XPathConstants.NODESET);
for (int i = 0; i < nodes.getLength(); ++i) {
final Node node = nodes.item(i);
if (!(node instanceof Element))
throw new <API key>("Only support addition of attributes to elements");
final Element target = (Element)node;
final int colon = name.indexOf(':');
final String namespaceURI = colon == -1 ? node.getNamespaceURI() : node.getOwnerDocument().lookupNamespaceURI(name.substring(0, colon));
target.setAttributeNS(namespaceURI, name, value);
}
}
public void remove(final Element element, final String ... xpaths) throws <API key> {
for (final String xpath : xpaths) {
final XPathExpression expression = newXPath().compile(xpath);
final NodeList nodes = (NodeList)expression.evaluate(element, XPathConstants.NODESET);
for (int i = 0; i < nodes.getLength(); ++i) {
final Node node = nodes.item(i);
if (node instanceof Attr) {
final Attr attribute = (Attr)node;
attribute.getOwnerElement().removeAttributeNode(attribute);
}
else {
node.getParentNode().removeChild(node);
}
}
}
}
public void replace(final Element element, final String xpath, final String name, final String value) throws <API key> {
final XPathExpression expression = newXPath().compile(xpath);
final NodeList nodes = (NodeList)expression.evaluate(element, XPathConstants.NODESET);
for (int i = 0; i < nodes.getLength(); ++i) {
final Node node = nodes.item(i);
if (node instanceof Attr) {
final Attr attribute = (Attr)node;
if (name == null) {
attribute.setValue(value);
}
else {
final int colon = name.indexOf(':');
final String namespaceURI = colon == -1 ? attribute.getNamespaceURI() : attribute.getOwnerDocument().lookupNamespaceURI(name.substring(0, colon));
final Element owner = attribute.getOwnerElement();
owner.removeAttributeNode(attribute);
owner.setAttributeNS(namespaceURI, name, value);
}
}
else {
throw new <API key>("Only support replacement of attribute values");
}
}
}
public void replace(final Element element, final String xpath, final String value) throws <API key> {
replace(element, xpath, null, value);
}
public void assertEqual() {
final String prefix = controlElement.getPrefix();
final String controlXml = DOMs.domToString(controlElement, DOMStyle.INDENT, DOMStyle.INDENT_ATTRS);
final String testXml = DOMs.domToString(testElement, DOMStyle.INDENT, DOMStyle.INDENT_ATTRS);
final Source controlSource = Input.fromString(controlXml).build();
final Source testSource = Input.fromString(testXml).build();
final DifferenceEngine diffEngine = new DOMDifferenceEngine();
diffEngine.<API key>(new ComparisonListener() {
@Override
public void comparisonPerformed(final Comparison comparison, final ComparisonResult result) {
final String controlXPath = comparison.getControlDetails().getXPath() == null ? null : comparison.getControlDetails().getXPath().replaceAll("/([^@])", "/" + prefix + ":$1");
if (controlXPath == null || controlXPath.matches("^.*\\/@[:a-z]+$") || controlXPath.contains("text()"))
return;
try {
Assert.assertEquals(controlXml, testXml);
}
catch (final ComparisonFailure e) {
final StackTraceElement[] stackTrace = e.getStackTrace();
int i;
for (i = 3; i < stackTrace.length; i++)
if (!stackTrace[i].getClassName().startsWith("org.xmlunit.diff"))
break;
final StackTraceElement[] filtered = new StackTraceElement[stackTrace.length - ++i];
System.arraycopy(stackTrace, i, filtered, 0, stackTrace.length - i);
e.setStackTrace(filtered);
throw e;
}
Assert.fail(comparison.toString());
}
});
diffEngine.compare(controlSource, testSource);
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_66-internal) on Tue Dec 08 09:28:01 GMT 2015 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.apache.jena.sparql.expr.E_Lang (Apache Jena ARQ)</title>
<meta name="date" content="2015-12-08">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.jena.sparql.expr.E_Lang (Apache Jena ARQ)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/apache/jena/sparql/expr/E_Lang.html" title="class in org.apache.jena.sparql.expr">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/jena/sparql/expr/class-use/E_Lang.html" target="_top">Frames</a></li>
<li><a href="E_Lang.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.apache.jena.sparql.expr.E_Lang" class="title">Uses of Class<br>org.apache.jena.sparql.expr.E_Lang</h2>
</div>
<div class="classUseContainer">No usage of org.apache.jena.sparql.expr.E_Lang</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/apache/jena/sparql/expr/E_Lang.html" title="class in org.apache.jena.sparql.expr">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/jena/sparql/expr/class-use/E_Lang.html" target="_top">Frames</a></li>
<li><a href="E_Lang.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Licenced under the Apache License, Version 2.0</small></p>
</body>
</html>
|
<?php
/**
* <API key> adds a panel to the web debug toolbar with Propel information.
*
* @package symfony
* @subpackage debug
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: <API key>.class.php 27284 2010-01-28 18:34:57Z Kris.Wallsmith $
*/
class <API key> extends sfWebDebugPanel
{
/**
* Get the title/icon for the panel
*
* @return string $html
*/
public function getTitle()
{
if ($sqlLogs = $this->getSqlLogs())
{
return '<img src="'.$this->webDebug->getOption('image_root_path').'/database.png" alt="SQL queries" /> '.count($sqlLogs);
}
}
/**
* Get the verbal title of the panel
*
* @return string $title
*/
public function getPanelTitle()
{
return 'SQL queries';
}
/**
* Get the html content of the panel
*
* @return string $html
*/
public function getPanelContent()
{
return '
<div id="<API key>">
<h3>Propel Version: '.Propel::VERSION.'</h3>
<ol>'.implode("\n", $this->getSqlLogs()).'</ol>
</div>
';
}
/**
* Listens to debug.web.load_panels and adds this panel.
*/
static public function <API key>(sfEvent $event)
{
$event->getSubject()->setPanel('db', new self($event->getSubject()));
}
/**
* Builds the sql logs and returns them as an array.
*
* @return array
*/
protected function getSqlLogs()
{
$config = $this-><API key>();
$outerGlue = $config->getParameter('debugpdo.logging.outerglue', ' | ');
$innerGlue = $config->getParameter('debugpdo.logging.innerglue', ': ');
$flagSlow = $config->getParameter('debugpdo.logging.details.slow.enabled', false);
$threshold = $config->getParameter('debugpdo.logging.details.slow.threshold', DebugPDO::<API key>);
$html = array();
foreach ($this->webDebug->getLogger()->getLogs() as $log)
{
if ('sfPropelLogger' != $log['type'])
{
continue;
}
$details = array();
$slowQuery = false;
$parts = explode($outerGlue, $log['message']);
foreach ($parts as $i => $part)
{
// is this a key-glue-value fragment ?
if (preg_match('/^(\w+)'.preg_quote($innerGlue, '/').'(.*)/', $part, $match))
{
$details[] = $part;
unset($parts[$i]);
// check for slow query
if ('time' == $match[1])
{
if ($flagSlow && (float) $match[2] > $threshold)
{
$slowQuery = true;
if ($this->getStatus() > sfLogger::NOTICE)
{
$this->setStatus(sfLogger::NOTICE);
}
}
}
}
}
// all stuff that has not been eaten by the loop should be the query string
$query = join($outerGlue, $parts);
$query = $this->formatSql(htmlspecialchars($query, ENT_QUOTES, sfConfig::get('sf_charset')));
$backtrace = isset($log['debug_backtrace']) && count($log['debug_backtrace']) ? ' '.$this-><API key>($log['debug_backtrace']) : '';
$html[] = sprintf('
<li%s>
<p class="<API key>">%s</p>
<div class="<API key>">%s%s</div>
</li>',
$slowQuery ? ' class="sfWebDebugWarning"' : '',
$query,
implode(', ', $details),
$backtrace
);
}
return $html;
}
/**
* Returns the current PropelConfiguration.
*
* @return PropelConfiguration
*/
protected function <API key>()
{
return Propel::getConfiguration(PropelConfiguration::TYPE_OBJECT);
}
}
|
# <API key>: true
require_relative 'helper'
describe 'Digest class' do
it 'raises error with invalid digest_class' do
assert_raises ArgumentError do
Dalli::Client.new('foo', { expires_in: 10, digest_class: Object })
end
end
end
|
using UnityEngine;
using System.Collections;
using System.Runtime.Serialization;
namespace StrumpyShaderEditor
{
[DataContract(Namespace = "http://strumpy.net/ShaderEditor/")]
public abstract class ChannelReference {
[DataMember] private string nodeIdentifier;
[DataMember] private uint channelId;
public ChannelReference( string nodeIdentifier, uint channelId )
{
this.nodeIdentifier = nodeIdentifier;
this.channelId = channelId;
}
public string NodeIdentifier
{
get{ return nodeIdentifier; }
set{ nodeIdentifier = value; }
}
public uint ChannelId
{
get{ return channelId; }
}
}
}
|
var partialsTemp = [
"login",
"profile"
];
exports.partialRender = function (req, res) {
var pageIndex = req.params[0];
if (partialsTemp.indexOf("" + pageIndex) > -1) {
res.render("partials/" + pageIndex, {});
} else {
res.render("common/404", {});
}
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.