answer
stringlengths 15
1.25M
|
|---|
.home-layout {
padding-top: 50px;
padding-bottom: 50px;
text-align: center;
background: url('https://scontent-ord1-1.xx.fbcdn.net/hphotos-xta1/t31.0-8/<API key>.jpg') no-repeat center center fixed;
background-size: cover;
height: 855px;
}
.home-row {
position: relative;
padding-top: 20%;
padding-bottom: 20%;
}
#home-logo {
font-family: 'Oswald', sans-serif;
font-size: 4em;
}
#home-motto {
font-family: 'Lora', serif;
font-size: 25px;
}
#home-links {
float: none;
margin: 0 auto;
}
.about-layout {
padding-top: 50px;
height: 855px;
}
.about-image {
width: 300px;
}
.portfolio-layout {
padding-top: 50px;
/*height: 855px;*/
}
.portfolio-img {
width: 300px;
height: 280px;
box-shadow: 3px 3px 6px #888888;
}
.contact-layout {
padding-top: 50px;
height: 500px;
}
footer {
padding-top: 10px;
background-color: #85adad;
}
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
|
var _ = require("underscore"),
Events = require("./Events"),
querystring = require("querystring"),
httpClient = require("./httpClient"),
utils = require("./utils"),
logger = require("config-logger");
var environments = {
sandbox: {
restHost: "api-sandbox.oanda.com",
streamHost: "stream-sandbox.oanda.com",
secure: false
},
practice: {
restHost: "api-fxpractice.oanda.com",
streamHost: "stream-fxpractice.oanda.com"
},
live: {
restHost: "api-fxtrade.oanda.com",
streamHost: "stream-fxtrade.oanda.com"
}
};
var <API key> = 15,
<API key> = 1000;
/*
* config.environment
* config.accessToken
* config.username (Sandbox only)
*/
function OandaAdapter (config) {
config.environment = config.environment || "practice";
// this.accountId = accountId;
this.accessToken = config.accessToken;
this.restHost = environments[config.environment].restHost;
this.streamHost = environments[config.environment].streamHost;
this.secure = environments[config.environment].secure;
if (config.environment === "sandbox") {
this.username = config.username;
}
this.subscriptions = {};
this._eventsBuffer = [];
this._pricesBuffer = [];
this._sendRESTRequest = utils.rateLimit(this._sendRESTRequest, this, 1000 / <API key>, <API key>);
}
Events.mixin(OandaAdapter.prototype);
/*
* Subscribes to events for all accounts authorized by the token
*/
OandaAdapter.prototype.subscribeEvents = function (listener, context) {
var <API key> = this.getHandlers("event");
this.off("event", listener, context);
this.on("event", listener, context);
if (<API key>.length === 0) {
this._streamEvents();
}
};
OandaAdapter.prototype.unsubscribeEvents = function (listener, context) {
this.off("event", listener, context);
this._streamEvents();
};
OandaAdapter.prototype._streamEvents = function () {
var subscriptionCount = this.getHandlers("event").length;
if (this.eventsRequest) {
this.eventsRequest.abort();
}
if (subscriptionCount === 0) {
return;
}
clearTimeout(this.eventsTimeout);
this.eventsTimeout = setTimeout(this.<API key>.bind(this), 20000);
this.eventsRequest = httpClient.sendRequest({
hostname: this.streamHost,
method: "GET",
path: "/v1/events",
headers: {
Authorization: "Bearer " + this.accessToken,
Connection: "Keep-Alive"
},
secure: this.secure
},
this._onEventsResponse.bind(this),
this._onEventsData.bind(this)
);
};
OandaAdapter.prototype._onEventsResponse = function (error, body, statusCode) {
if (statusCode !== 200) {
if (body && body.disconnect) {
this.trigger("message", null, "Events streaming API disconnected.\nOanda code " + body.disconnect.code + ": " + body.disconnect.message);
} else {
this.trigger("message", null, "Events streaming API disconnected with status " + statusCode);
}
}
clearTimeout(this.eventsTimeout);
this.eventsTimeout = setTimeout(this.<API key>.bind(this), 20000);
};
OandaAdapter.prototype._onEventsData = function (data) {
// Single chunks sometimes contain more than one event. Each always end with /r/n. Whole chunk therefore not JSON parsable, so must split.
// Also, an event may be split accross data chunks, so must buffer.
data.split(/\r\n/).forEach(function (line) {
var update;
if (line) {
this._eventsBuffer.push(line);
try {
update = JSON.parse(this._eventsBuffer.join(""));
} catch (error) {
if (this._eventsBuffer.length <= 5) {
// Wait for next line.
return;
}
logger.error("Unable to parse Oanda events subscription update", this._eventsBuffer.join("\n"), error);
this._eventsBuffer = [];
return;
}
this._eventsBuffer = [];
if (update.heartbeat) {
clearTimeout(this.eventsTimeout);
this.eventsTimeout = setTimeout(this.<API key>.bind(this), 20000);
return;
}
this.trigger("event", update);
}
}, this);
};
OandaAdapter.prototype.<API key> = function () {
logger.warn("OandaAdapter: No heartbeat received from events stream for 20 seconds. Reconnecting.");
this._streamEvents();
};
OandaAdapter.prototype.getAccounts = function (callback) {
this._sendRESTRequest({
method: "GET",
path: "/v1/accounts" + (this.username ? "?username=" + this.username : "")
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
if (body.accounts) {
callback(null, body.accounts);
} else {
callback("Unexpected accounts response");
}
});
};
OandaAdapter.prototype.getAccount = function (accountId, callback) {
this._sendRESTRequest({
method: "GET",
path: "/v1/accounts/" + accountId
}, callback);
};
OandaAdapter.prototype.getInstruments = function (accountId, callback) {
this._sendRESTRequest({
method: "GET",
path: "/v1/instruments?accountId=" + accountId + "&fields=" + ["instrument", "displayName", "pip", "maxTradeUnits", "precision", "maxTrailingStop", "minTrailingStop", "marginRate", "halted"].join("%2C"),
},
function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
if (body.instruments) {
callback(null, body.instruments);
} else {
callback("Unexpected instruments response");
}
});
};
OandaAdapter.prototype.getPrice = function (symbol, callback) {
var multiple = _.isArray(symbol);
if (multiple) {
symbol = symbol.join("%2C");
}
this._sendRESTRequest({
method: "GET",
path: "/v1/prices?instruments=" + symbol
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
if (body && body.prices[0]) {
callback(null, multiple ? body.prices : body.prices[0]);
} else {
callback("Unexpected price response for " + symbol);
}
});
};
OandaAdapter.prototype.subscribePrice = function (accountId, symbol, listener, context) {
var <API key> = this.getHandlers("price/" + symbol);
// Price stream needs an accountId to be passed for streaming prices, though prices for a connection are same anyway
if (!this.streamPrices) {
this.streamPrices = _.throttle(this._streamPrices.bind(this, accountId));
}
this.off("price/" + symbol, listener, context);
this.on("price/" + symbol, listener, context);
if (<API key>.length === 0) {
this.streamPrices();
}
};
OandaAdapter.prototype.unsubscribePrice = function (symbol, listener, context) {
this.off("price/" + symbol, listener, context);
this.streamPrices();
};
// Kills rates streaming keep alive request for account and creates a new one whenever subsciption list changes. Should always be throttled.
OandaAdapter.prototype._streamPrices = function (accountId) {
var changed;
this.priceSubscriptions = Object.keys(this.getHandlers()).reduce(function (memo, event) {
var match = event.match("^price/(.+)$");
if (match) {
memo.push(match[1]);
}
return memo;
}, []).sort().join("%2C");
changed = !this.<API key> || this.priceSubscriptions !== this.<API key>;
this.<API key> = this.priceSubscriptions;
if (!changed) {
return;
}
if (this.pricesRequest) {
this.pricesRequest.abort();
}
if (this.priceSubscriptions === "") {
return;
}
clearTimeout(this.pricesTimeout);
this.pricesTimeout = setTimeout(this.<API key>.bind(this), 10000);
this.pricesRequest = httpClient.sendRequest({
hostname: this.streamHost,
method: "GET",
path: "/v1/prices?accountId=" + accountId + "&instruments=" + this.priceSubscriptions,
headers: {
Authorization: "Bearer " + this.accessToken,
Connection: "Keep-Alive"
},
secure: this.secure
},
this._onPricesResponse.bind(this, accountId),
this._onPricesData.bind(this)
);
};
OandaAdapter.prototype._onPricesResponse = function (accountId, error, body, statusCode) {
if (statusCode !== 200) {
if (body && body.disconnect) {
this.trigger("message", accountId, "Prices streaming API disconnected.\nOanda code " + body.disconnect.code + ": " + body.disconnect.message);
} else {
this.trigger("message", accountId, "Prices streaming API disconnected with status " + statusCode);
}
}
clearTimeout(this.pricesTimeout);
this.pricesTimeout = setTimeout(this.<API key>.bind(this), 10000);
};
OandaAdapter.prototype._onPricesData = function (data) {
// Single data chunks sometimes contain more than one tick. Each always end with /r/n. Whole chunk therefore not JSON parsable, so must split.
// A tick may also be split accross data chunks, so must buffer
data.split(/\r\n/).forEach(function (line) {
var update;
if (line) {
this._pricesBuffer.push(line);
try {
update = JSON.parse(this._pricesBuffer.join(""));
} catch (error) {
if (this._pricesBuffer.length <= 5) {
// Wait for next update.
return;
}
// Drop if cannot produce object after 5 updates
logger.error("Unable to parse Oanda price subscription update", this._pricesBuffer.join("\n"), error);
this._pricesBuffer = [];
return;
}
this._pricesBuffer = [];
if (update.heartbeat) {
clearTimeout(this.pricesTimeout);
this.pricesTimeout = setTimeout(this.<API key>.bind(this), 10000);
return;
}
if (update.tick) {
update.tick.time = new Date(update.tick.time);
this.trigger("price/" + update.tick.instrument, update.tick);
}
}
}, this);
};
OandaAdapter.prototype.<API key> = function () {
logger.warn("OandaAdapter: No heartbeat received from prices stream for 10 seconds. Reconnecting.");
delete this.<API key>;
this._streamPrices();
};
OandaAdapter.prototype.getCandles = function (instrument, options, callback)
{
options = _.extend(options, {instrument: instrument});
this._sendRESTRequest({
method: "GET",
path: "/v1/candles?" + querystring.stringify(options),
headers: {
Authorization: "Bearer " + this.accessToken,
"<API key>": "UNIX"
}
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
if (body && body.candles) {
callback(null, body.candles);
} else if (body === "") {
// Body is an empty string if there are no candles to return
callback(null, []);
} else {
callback("Unexpected candles response for " + symbol);
}
});
};
OandaAdapter.prototype.getOpenPositions = function (accountId, callback) {
this._sendRESTRequest({
method: "GET",
path: "/v1/accounts/" + accountId + "/positions"
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
if (body && body.positions) {
callback(null, body.positions);
} else {
callback("Unexpected response for open positions");
}
});
};
OandaAdapter.prototype.getOpenTrades = function (accountId, callback) {
this._sendRESTRequest({
method: "GET",
path: "/v1/accounts/" + accountId + "/trades"
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
if (body && body.trades) {
callback(null, body.trades);
} else {
callback("Unexpected response for open trades");
}
});
};
OandaAdapter.prototype.createOrder = function (accountId, order, callback) {
if (!order.instrument) {
return callback("'instrument' is a required field");
}
if (!order.units) {
return callback("'units' is a required field");
}
if (!order.side) {
return callback("'side' is a required field. Specify 'buy' or 'sell'");
}
if (!order.type) {
return callback("'type' is a required field. Specify 'market', 'marketIfTouched', 'stop' or 'limit'");
}
if ((order.type !== "market") && !order.expiry) {
return callback("'expiry' is a required field for order type '" + order.type + "'");
}
if ((order.type !== "market") && !order.price) {
return callback("'price' is a required field for order type '" + order.type + "'");
}
this._sendRESTRequest({
method: "POST",
path: "/v1/accounts/" + accountId + "/orders",
data: order,
headers: {
Authorization: "Bearer " + this.accessToken,
"Content-Type": "application/<API key>"
},
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
callback(null, body);
});
};
OandaAdapter.prototype.closeTrade = function (accountId, tradeId, callback) {
this._sendRESTRequest({
method: "DELETE",
path: "/v1/accounts/" + accountId + "/trades/" + tradeId
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
if (body) {
callback(null, body);
} else {
callback("Unexpected response for open positions");
}
});
};
OandaAdapter.prototype.getOrders = function (accountId, callback)
{
this._sendRESTRequest({
method: "GET",
path: "/v1/accounts/" + accountId + "/orders",
headers: {
Authorization: "Bearer " + this.accessToken,
"Content-Type": "application/<API key>"
},
}, function (error, body, statusCode) {
if (error) {
if (body && body.message) {
logger.error("Response from Oanda", statusCode + " Error: " + body.message + " (OANDA error code " + body.code + ")");
return callback(body.message);
}
return callback(error);
}
callback(null, body);
});
};
OandaAdapter.prototype._sendRESTRequest = function (request, callback) {
request.hostname = this.restHost;
request.headers = request.headers || {
Authorization: "Bearer " + this.accessToken
};
request.secure = this.secure;
httpClient.sendRequest(request, callback);
};
OandaAdapter.prototype.kill = function () {
if (this.pricesRequest) {
this.pricesRequest.abort();
}
if (this.eventsRequest) {
this.eventsRequest.abort();
}
this.off();
};
module.exports = OandaAdapter;
|
require "mscorlib"
require "System, Version=2.0.0.0, Culture=neutral, PublicKey<API key>
require "System.Collections.Generic, Version=2.0.0.0, Culture=neutral, PublicKey<API key>
require "System.Linq, Version=2.0.0.0, Culture=neutral, PublicKey<API key>
require "System.Text, Version=2.0.0.0, Culture=neutral, PublicKey<API key>
module CodeBuilder.DataSource.Exporter
require "PhysicalDataModel, Version=2.0.0.0, Culture=neutral, PublicKey<API key>
class <API key> < BaseExporter, IExporter
def Export(connectionString)
if connectionString == nil then
raise <API key>.new("connectionString", "Argument is null")
end
model = Model.new()
model.Database = "SqlServer2000"
return model
end
def GetTables()
return nil
end
def GetViews()
return nil
end
def GetColumns()
return nil
end
def GetKeys()
return nil
end
def GetPrimaryKeys()
return nil
end
end
end
|
package com.semmle.jcorn;
import com.semmle.js.ast.Position;
public class SyntaxError extends RuntimeException {
private static final long serialVersionUID = -<API key>;
private final Position position;
public SyntaxError(String msg, Position loc, int raisedAt) {
super(msg);
this.position = loc;
}
public Position getPosition() {
return position;
}
}
|
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Spincommerce Guía de Estilos">
<meta name="keywords" content="">
<meta name="author" content="Spincommerce">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,300,600,400italic' rel='stylesheet' type='text/css'>
<title>
Scaffolding · Spincommerce
</title>
<link rel="stylesheet" href="/<API key>/docs.css">
<!-- Favicons -->
<link rel="<API key>" href="/<API key>/img/<API key>.png">
<link rel="icon" href="/<API key>/favicon.ico">
</head>
<body>
<header class="masthead">
<div class="row">
<a href="/<API key>/" class="masthead-logo">
<span class="isotype"></span>
SpinCommerce
</a>
<nav class="masthead-nav">
<a href="/<API key>/scaffolding">Docs</a>
<a href="/<API key>/about">About</a>
<a href="https://github.com/Corpspin/<API key>" target="_blank">GitHub</a>
</nav>
</div>
</header>
<div class="row">
<div class="docs-layout">
<div class="medium-3 column">
<nav class="menu docs-menu">
<a class="menu-item selected" href="/<API key>/scaffolding/">
Scaffolding
</a>
<a class="menu-item " href="/<API key>/layout/">
Layout
</a>
<a class="menu-item " href="/<API key>/type/">
Type
</a>
<a class="menu-item " href="/<API key>/buttons/">
Buttons
</a>
<a class="menu-item " href="/<API key>/icons/">
Icons
</a>
<a class="menu-item " href="/<API key>/utilities/">
Utilities
</a>
<a class="menu-item " href="/<API key>/guidelines/">
Code guidelines
</a>
</nav>
<nav class="menu docs-menu">
<a class="menu-item " href="/<API key>/branding/">
Branding
</a>
<a class="menu-item " href="/<API key>/colors/">
Colors
</a>
<a class="menu-item " href="/<API key>/fonts/">
Fonts
</a>
</nav>
</div>
<div class="medium-9 column markdown-body">
<h1 class="page-title">
Scaffolding
</h1>
<div class="markdown-body">
<p>Scaffolding refers to the global resets and dependencies that SpinCommerce is built upon.</p>
<h2 id="contents">Contents</h2>
<ul id="markdown-toc">
<li><a href="#contents" id="<API key>">Contents</a></li>
<li><a href="#html5-doctype" id="<API key>">HTML5 doctype</a></li>
<li><a href="#box-sizing" id="<API key>">Box-sizing</a></li>
<li><a href="#built-on-normalize" id="<API key>">Built on Normalize</a></li>
<li><a href="#<API key>" id="<API key>">Based on Foundation 5</a></li>
</ul>
<h2 id="html5-doctype">HTML5 doctype</h2>
<p>SpinCommerce makes use of certain HTML elements and CSS properties that <strong>require</strong> the use of the HTML5 doctype. Include it at the beginning of all your pages.</p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="cp"><!DOCTYPE html></span>
<span class="nt"><html</span> <span class="na">lang=</span><span class="s">"es"</span><span class="nt">></span>
<span class="nt"></html></span></code></pre></figure>
<h2 id="box-sizing">Box-sizing</h2>
<p>We reset <code class="highlighter-rouge">box-sizing</code> to <code class="highlighter-rouge">border-box</code> for every element in SpinCommerce. This allows us to more easily assign widths to elements that also have <code class="highlighter-rouge">padding</code> and <code class="highlighter-rouge">border</code>s.</p>
<h2 id="built-on-normalize">Built on Normalize</h2>
<p>For improved cross-browser rendering, we use <a href="http://necolas.github.io/normalize.css/">Normalize.css</a> to correct small inconsistencies across browsers and devices.</p>
<h2 id="<API key>">Based on Foundation 5</h2>
<p>SpinCommerce is based on Foundation 5. <a href="http://foundation.zurb.com/sites/docs/v/5.5.3/">Read Docs</a>.</p>
</div>
</div>
</div>
<footer class="footer column small-12">
Copyright SpinCommerce 2016.<br>
Created and maintained by SpinCommerce team. <strong>Currently v0.1.</strong>
</footer>
</div>
<script src="/<API key>/js/anchor.min.js"></script>
<script>
var selector = '.markdown-body h2, .markdown-body h3';
anchors.options = {
placement: 'left',
class: 'anchor-link'
};
anchors.add(selector);
</script>
</body>
</html>
|
var nums = [];
for (var i = 0; i < 100; ++i) {
nums[i] = Math.floor(Math.random() * 101);
}
insertionsort(nums);
dispArr(nums);
print();
putstr("Enter a value to count: ");
var val = parseInt(readline());
var retVal = count(nums, val);
print("Found " + retVal + " occurrences of " + val + ".");
|
import imageContainer from '../server/api/helpers/imageContainer';
const entries = [
{
html: '<img src="/img/60x30.png" alt="60x30" class="zoom" data-zoom-src="/img/60x30-original.png">',
},
{
html: `<div>
<img src="/img/20x50.jpg">
</div>
<img src="/img/40x10.svg" alt="40x10">`,
},
{
html: '<div>Hello, World!</div>',
},
];
describe('ImageContainer', () => {
const modifiedEntries = imageContainer(entries, __dirname);
it('Parses one image', () => {
expect(modifiedEntries[0].html).toContain('<div class="imageContainer" style="width: 60px;">');
expect(modifiedEntries[0].html).toContain('<div style="padding-bottom: 50%">');
});
it('Parses multiple images', () => {
expect(modifiedEntries[1].html).toContain('<div class="imageContainer" style="width: 20px;">');
expect(modifiedEntries[1].html).toContain('<div style="padding-bottom: 250%">');
expect(modifiedEntries[1].html).toContain('<div class="imageContainer" style="width: 40px;">');
expect(modifiedEntries[1].html).toContain('<div style="padding-bottom: 25%">');
});
it('Doesn’t parse things it shouldn’t', () => {
expect(modifiedEntries[2].html.length).toEqual(entries[2].html.length);
});
it('Doesn’t crash when passing in an empty array', () => {
const emptyEntries = [];
expect(emptyEntries).toEqual(imageContainer(emptyEntries));
});
});
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `Unsigned` trait in crate `num`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Unsigned">
<title>num::traits::Unsigned - Rust</title>
<link rel="stylesheet" type="text/css" href="../../main.css">
<link rel="shortcut icon" href="http:
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]
<section class="sidebar">
<a href='../../num/index.html'><img src='http:
<p class='location'><a href='../index.html'>num</a>::<wbr><a href='index.html'>traits</a></p><script>window.sidebarCurrent = {name: 'Unsigned', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</section>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press 'S' to search, '?' for more options..."
type="search">
</div>
</form>
</nav>
<section id='main' class="content trait">
<h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>num</a>::<wbr><a href='index.html'>traits</a>::<wbr><a class='trait' href=''>Unsigned</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>−</span>]
</a>
</span><a id='src-16766' class='srclink' href='../../src/num/traits.rs.html#420' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait Unsigned: <a class='trait' href='../../num/traits/trait.Num.html' title='num::traits::Num'>Num</a> { }</pre><div class='docblock'><p>A trait for values which cannot be negative</p>
</div>
<h2 id='implementors'>Implementors</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl <a class='trait' href='../../num/traits/trait.Unsigned.html' title='num::traits::Unsigned'>Unsigned</a> for <a class='struct' href='../../num/bigint/struct.BigUint.html' title='num::bigint::BigUint'>BigUint</a></code></li>
<li><code>impl <a class='trait' href='../../num/traits/trait.Unsigned.html' title='num::traits::Unsigned'>Unsigned</a> for <a href='http://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></li>
<li><code>impl <a class='trait' href='../../num/traits/trait.Unsigned.html' title='num::traits::Unsigned'>Unsigned</a> for <a href='http://doc.rust-lang.org/nightly/std/primitive.u8.html'>u8</a></code></li>
<li><code>impl <a class='trait' href='../../num/traits/trait.Unsigned.html' title='num::traits::Unsigned'>Unsigned</a> for <a href='http://doc.rust-lang.org/nightly/std/primitive.u16.html'>u16</a></code></li>
<li><code>impl <a class='trait' href='../../num/traits/trait.Unsigned.html' title='num::traits::Unsigned'>Unsigned</a> for <a href='http://doc.rust-lang.org/nightly/std/primitive.u32.html'>u32</a></code></li>
<li><code>impl <a class='trait' href='../../num/traits/trait.Unsigned.html' title='num::traits::Unsigned'>Unsigned</a> for <a href='http://doc.rust-lang.org/nightly/std/primitive.u64.html'>u64</a></code></li>
</ul><script type="text/javascript" async
src="../../implementors/num/traits/trait.Unsigned.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<div id="help" class="hidden">
<div class="shortcuts">
<h1>Keyboard shortcuts</h1>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h1>Search tricks</h1>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>typedef</code> (or
<code>tdef</code>).
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code>)
</p>
</div>
</div>
<script>
window.rootPath = "../../";
window.currentCrate = "num";
window.playgroundUrl = "http://play.rust-lang.org/";
</script>
<script src="../../jquery.js"></script>
<script src="../../main.js"></script>
<script src="../../playpen.js"></script>
<script async src="../../search-index.js"></script>
</body>
</html>
|
import unittest
from polycircles import polycircles
from nose.tools import assert_equal, assert_almost_equal
class <API key>(unittest.TestCase):
"""Tests the various output methods: KML style, WKT, lat-lon and lon-lat."""
def setUp(self):
self.latitude = 32.074322
self.longitude = 34.792081
self.radius_meters = 100
self.number_of_vertices = 36
self.polycircle = \
polycircles.Polycircle(latitude=self.latitude,
longitude=self.longitude,
radius=self.radius_meters,
number_of_vertices=self.number_of_vertices)
def test_lat_lon_output(self):
"""Asserts that the vertices in the lat-lon output are in the
right order (lat before long)."""
for vertex in self.polycircle.to_lat_lon():
assert_almost_equal(vertex[0], self.latitude, places=2)
assert_almost_equal(vertex[1], self.longitude, places=2)
def test_lon_lat_output(self):
"""Asserts that the vertices in the lat-lon output are in the
right order (lat before long)."""
for vertex in self.polycircle.to_lon_lat():
assert_almost_equal(vertex[0], self.longitude, places=2)
assert_almost_equal(vertex[1], self.latitude, places=2)
def <API key>(self):
"""Asserts that the "vertices" property is identical to the return
value of to_lat_lon()."""
assert_equal(self.polycircle.vertices, self.polycircle.to_lat_lon())
def <API key>(self):
"""Asserts that the return value of to_kml() property is identical to
the return value of to_lon_lat()."""
assert_equal(self.polycircle.to_kml(), self.polycircle.to_lon_lat())
if __name__ == '__main__':
unittest.main()
|
@CHARSET "UTF-8";
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em,
font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td {
border:0pt none;
font-family:inherit;
font-size: 100%;
font-style:inherit;
font-weight:inherit;
margin:0pt;
padding:0pt;
vertical-align:baseline;
}
body{
background: #fff;
line-height:14px;
font-size: 11px;
font-family: Tahoma, Arial, Verdana, Helvetica, sans-serif;
margin:0pt;
overflow: hidden;
cursor: default !Important;
}
html,body{
height:100%;
}
.clear{
clear: both;
height: 0;
visibility: hidden;
display: block;
}
a{
text-decoration: none;
}
#main{
height: 100%;
background: transparent url(images/background.jpg) no-repeat scroll center center;
overflow: none;
}
#main div.icon{
min-width: 48px;
min-height: 48px;
padding: 0px 14px 8px;
border: 1px solid transparent;
margin: 0pt auto;
text-align: left;
position: absolute;
display: none;
}
#main div.icon:hover{
background-color: #0a2c5e !Important;
border: 1px solid #3b567e;
}
#main div.icon.active{
background-color: #0a2c5e !Important;
border: 1px solid #3b567e;
}
#main div.icon div.name{
margin-top: 52px;
text-align: center;
color: #fff;
}
#main #mipc{
background: transparent url(images/mipc.png) no-repeat scroll center 4px;
top: 32px;
left: 32px;
}
#main #home{
background: transparent url(images/homeNeXT.png) no-repeat scroll center 4px;
top: 128px;
left: 32px;
}
#main #usb{
background: transparent url(images/usb.png) no-repeat scroll center 4px;
top: 224px;
left: 32px;
}
#main #trash{
background: transparent url(images/trash.png) no-repeat scroll center 4px;
}
#main #taskbar{
width: 100%;
height: 42px;
line-height: 42px;
background: #e6e6e6 url(images/taskbar.jpg) repeat-x left top;
position: absolute;
left: 0;
bottom: 0px;
padding: 4px 0px 1px 0px;
display: none;
}
#main #taskbar #start{
float: left;
background: transparent url(images/start.png) no-repeat 4px -3px;
width: 64px;
margin: 0 4px 0 0;
padding: 0 2px 0 42px;
font-size: 18px;
font-style: italic;
font-weight: 700;
text-align: center;
}
#main #taskbar #start:hover{
background-color: #fff;
}
#main #taskbar #clock{
float: right;
background: #e6e6e6 url(images/clock.jpg) no-repeat 4px center;
padding: 0 8px 0 50px;
font-size: 12px;
border-left: 2px solid #f9f9f9;
font-weight: 700;
text-align: center;
}
|
package betterwithaddons.crafting.recipes;
import betterwithaddons.crafting.ICraftingResult;
import betterwithaddons.util.ItemUtil;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class PackingRecipe
{
public ICraftingResult output;
public List<Ingredient> inputs;
public PackingRecipe(List<Ingredient> inputs, ICraftingResult output) {
this.output = output;
this.inputs = inputs;
}
public ICraftingResult getOutput(List<ItemStack> inputs, IBlockState compressState) {
return this.output.copy();
}
public boolean consume(List<ItemStack> inputs, IBlockState compressState, boolean simulate)
{
inputs = new ArrayList<>(inputs);
for (Ingredient ingredient : this.inputs) {
boolean matches = false;
Iterator<ItemStack> iterator = inputs.iterator();
while(iterator.hasNext()) {
ItemStack checkStack = iterator.next();
if(ingredient.apply(checkStack)) {
if(!simulate)
checkStack.shrink(ItemUtil.getSize(ingredient));
iterator.remove();
matches = true;
}
}
if(!matches)
return false;
}
return true;
}
}
|
<?php
namespace Frontend42;
return [
'migration' => [
'directory' => [
__NAMESPACE__ => __DIR__ . '/../../data/migrations'
],
],
];
|
#pragma once
#include "platform.h"
#include "value.h"
#include "vm.h"
#include "result.h"
#include <memory>
#include <vector>
namespace imq
{
class IMQ_API ScriptFunction : public QFunction
{
public:
ScriptFunction(const String& funcName, Context* outerCtx, const std::shared_ptr<VBlock> block, const std::vector<String>& argNames);
virtual ~ScriptFunction();
virtual Result execute(VMachine* vm, int32_t argCount, QValue* args, QValue* result) override;
virtual size_t GC_getSize() const override;
virtual bool GC_isDynamic() const override { return false; }
protected:
virtual void GC_markChildren() override;
private:
ScriptFunction(const ScriptFunction& other) = default;
ScriptFunction& operator=(const ScriptFunction& other) = default;
String funcName;
Context* outerCtx;
std::shared_ptr<VBlock> block;
std::vector<String> argNames;
};
class IMQ_API DefineFunctionExpr : public VExpression
{
public:
DefineFunctionExpr(const String& funcName, VBlock* block, const std::vector<String>& argNames, const VLocation& loc);
DefineFunctionExpr(VBlock* block, const std::vector<String>& argNames, const VLocation& loc);
virtual ~DefineFunctionExpr();
virtual String getName() const override;
virtual Result execute(Context* context, QValue* result) override;
private:
String funcName;
VBlock* initialBlock;
std::shared_ptr<VBlock> block;
std::vector<String> argNames;
};
}
|
#include "cf_internal.h"
#define CACHE_SIZE 1024
#define INDEX(i) ((i) % CACHE_SIZE)
static frame_cache_t* <API key>(cf_session_t* s)
{
frame_cache_t* cache = calloc(1, sizeof(frame_cache_t));
cache->wait_timer = s->proc->rtt + 2 * s->proc->rtt_val;
cache->state = buffer_waiting;
cache->frame_timer = 100;
cache->size = CACHE_SIZE;
cache->frames = calloc(cache->size, sizeof(cf_frame_t));
return cache;
}
static inline void <API key>(cf_session_t* session, frame_cache_t* c, cf_frame_t* frame)
{
int i;
if (frame->seg_number == 0)
return;
for (i = 0; i < frame->seg_number; ++i){
if (frame->segments[i] != NULL){
slab_free(session->mem, frame->segments[i]);
frame->segments[i] = NULL;
}
}
free(frame->segments);
log_debug("buffer clean frame, frame id = %u, ts = %llu\n", frame->fid, frame->ts);
frame->ts = 0;
frame->frame_type = 0;
frame->seg_number = 0;
c->min_fid = frame->fid;
}
static void <API key>(cf_session_t* s, frame_cache_t* cache)
{
uint32_t i;
for (i = 0; i < cache->size; ++i)
<API key>(s, cache, &cache->frames[i]);
free(cache->frames);
free(cache);
}
static void <API key>(cf_session_t* s, frame_cache_t* cache)
{
uint32_t i;
for (i = 0; i < cache->size; ++i)
<API key>(s, cache, &cache->frames[i]);
cache->min_fid = 0;
cache->max_fid = 0;
cache->play_ts = 0;
cache->frame_ts = 0;
cache->max_ts = 100;
cache->frame_timer = 100;
cache->state = buffer_waiting;
cache->wait_timer = SU_MAX(100, s->proc->rtt + 2 * s->proc->rtt_val);
cache->loss_flag = 0;
}
static void <API key>(cf_session_t* s, frame_cache_t* c, uint32_t fid)
{
uint32_t pos, i;
for (pos = c->max_fid + 1; pos <= fid; pos++)
<API key>(s, c, &c->frames[INDEX(pos)]);
if (fid < c->min_fid + c->size)
return;
for (pos = c->min_fid + 1; pos < c->max_fid; ++pos){
if (c->frames[INDEX(pos)].frame_type == 1)
break;
}
for (i = c->min_fid + 1; i < pos; ++i)
<API key>(s, c, &c->frames[INDEX(i)]);
}
static int <API key>(cf_session_t* s, frame_cache_t* c, cf_seg_video_t* seg)
{
cf_frame_t* frame;
int ret = -1;
if (seg->index >= seg->total){
assert(0);
return ret;
}
else if (seg->fid <= c->min_fid)
return ret;
if (seg->fid > c->max_fid){
if (c->max_fid > 0)
<API key>(s, c, seg->fid);
else if (c->min_fid == 0)
c->min_fid = seg->fid - 1;
if (c->max_fid >= 0 && c->max_fid < seg->fid && c->max_ts < seg->ts){
c->frame_timer = (seg->ts - c->max_ts) / (seg->fid - c->max_fid);
if (c->frame_timer < 20)
c->frame_timer = 20;
else if (c->frame_timer > 200)
c->frame_timer = 200;
}
c->max_ts = seg->ts;
c->max_fid = seg->fid;
}
log_debug("buffer put video frame, frame = %u, seq = %u, ts = %u\n", seg->fid, seg->seq, seg->ts);
frame = &(c->frames[INDEX(seg->fid)]);
frame->fid = seg->fid;
frame->frame_type = seg->ftype;
frame->ts = seg->ts;
if (frame->seg_number == 0){
frame->seg_number = seg->total;
frame->segments = calloc(frame->seg_number, sizeof(seg));
frame->segments[seg->index] = seg;
ret = 0;
}
else{
if (frame->segments[seg->index] == NULL){
frame->segments[seg->index] = seg;
ret = 0;
}
}
return ret;
}
static void <API key>(cf_session_t* s, frame_cache_t* c)
{
uint64_t max_ts, min_ts;
if (c->max_fid > c->min_fid){
max_ts = c->frames[INDEX(c->max_fid)].ts;
min_ts = c->frames[INDEX(c->min_fid + 1)].ts;
if (min_ts > 0 && max_ts > min_ts + (c->wait_timer * 5 / 4) && c->max_fid >= c->min_fid + 1){
c->state = buffer_playing;
c->play_ts = GET_SYS_MS();
c->frame_ts = max_ts - (c->wait_timer * 5 / 4);
}
}
}
static inline void <API key>(cf_session_t* s, frame_cache_t* c)
{
if (c->max_fid <= c->min_fid){
c->state = buffer_waiting;
log_debug("buffer waiting ...........\n");
}
}
static inline int <API key>(cf_session_t* s, cf_frame_t* frame)
{
int i;
for (i = 0; i < frame->seg_number; ++i)
if (frame->segments[i] == NULL)
return -1;
return 0;
}
static inline void <API key>(cf_session_t* s, frame_cache_t* c)
{
uint64_t cur_ts = GET_SYS_MS();
if (cur_ts > c->play_ts){
c->frame_ts = (uint32_t)(cur_ts - c->play_ts) + c->frame_ts;
c->play_ts = cur_ts;
}
}
static int <API key>(cf_session_t* s, frame_cache_t* c, uint8_t* data, size_t* sizep)
{
uint32_t pos;
size_t size;
int ret, i;
cf_frame_t* frame;
uint64_t max_ts;
if (c->state == buffer_waiting)
<API key>(s, c);
else
<API key>(s, c);
if (c->state != buffer_playing){
size = 0;
ret = -1;
goto err;
}
<API key>(s, c);
max_ts = c->frames[INDEX(c->max_fid)].ts;
pos = INDEX(c->min_fid + 1);
frame = &c->frames[pos];
if (frame->ts <= c->frame_ts && <API key>(s, frame) == 0){
size = 0;
for (i = 0; i < frame->seg_number; ++i){
memcpy(data + size, frame->segments[i]->data, frame->segments[i]->data_size);
size += frame->segments[i]->data_size;
}
if (frame->ts + c->wait_timer * 5 / 4 >= max_ts || c->min_fid + 1 == c->max_fid)
c->frame_ts = frame->ts;
else
c->frame_ts = max_ts - c->wait_timer * 5 / 4;
<API key>(s, c, frame);
ret = 0;
}
else{
size = 0;
ret = -1;
}
err:
*sizep = size;
return ret;
}
static uint32_t <API key>(cf_session_t* s, frame_cache_t* c)
{
int i;
cf_frame_t* frame;
cf_seg_video_t* seg;
frame = &c->frames[INDEX(c->min_fid)];
for (i = 0; i < frame->seg_number; ++i){
seg = frame->segments[i];
if (seg != NULL)
return seg->seq - seg->index - 1;
}
return 0;
}
typedef struct
{
uint64_t ts;
int count;
}wb_loss_t;
static inline void loss_free(skiplist_item_t key, skiplist_item_t val)
{
free(val.ptr);
}
<API key>* <API key>(cf_session_t* s)
{
<API key>* r = calloc(1, sizeof(<API key>));
r->loss = skiplist_create(id_compare, loss_free);
r->cache = <API key>(s);
r->cache_ts = GET_SYS_MS();
return r;
}
void <API key>(cf_session_t* s, <API key>* r)
{
if (r == NULL)
return;
assert(r->cache && r->loss);
skiplist_destroy(r->loss);
<API key>(s, r->cache);
free(r);
}
void <API key>(cf_session_t* s, <API key>* r)
{
<API key>(s, r->cache);
skiplist_clear(r->loss);
r->base_uid = 0;
r->base_seq = 0;
r->actived = 0;
r->max_seq = 0;
r->ack_ts = GET_SYS_MS();
r->active_ts = r->ack_ts;
r->loss_count = 0;
}
int <API key>(cf_session_t* s, <API key>* r, uint32_t start_seq, uint16_t rate, uint32_t base_uid)
{
if (r->actived == 1)
return -1;
if (start_seq > 0){
r->base_seq = start_seq;
r->max_seq = r->base_seq;
}
r->actived = 1;
r->base_seq = start_seq;
r->base_uid = base_uid;
if (rate > 0)
r->cache->frame_timer = SU_MAX(20, 1000 / rate);
r->active_ts = GET_SYS_MS();
return 0;
}
static void <API key>(cf_session_t* s, <API key>* r, uint32_t seq)
{
uint32_t i;
skiplist_item_t key, val;
skiplist_iter_t* iter;
key.u32 = seq;
skiplist_remove(r->loss, key);
for (i = r->max_seq + 1; i < seq; ++i){
key.u32 = i;
iter = skiplist_search(r->loss, key);
if (iter == NULL){
wb_loss_t* l = calloc(1, sizeof(wb_loss_t));
l->ts = GET_SYS_MS() - s->proc->rtt;
l->count = 0;
val.ptr = l;
skiplist_insert(r->loss, key, val);
}
}
}
static inline void video_send_segment(cf_session_t* s, cf_segment_ack_t* ack)
{
cf_header_t header;
CF_INIT_HEADER(header, SEG_ACK, s->rid, s->uid);
cf_encode_msg(&s->sstrm, &header, ack);
processor_send(s, s->proc, &s->sstrm, &s->proc->server_node);
}
static void video_real_ack(cf_session_t* s, <API key>* r, int hb)
{
uint64_t cur_ts;
cf_segment_ack_t ack;
skiplist_iter_t* iter;
skiplist_item_t key;
wb_loss_t* l;
uint32_t min_seq, delay;
int max_count = 0;
cur_ts = GET_SYS_MS();
if (r->ack_ts + 10 < cur_ts){
min_seq = <API key>(s, r->cache);
if (min_seq > r->base_seq){
for (key.u32 = r->base_seq + 1; key.u32 <= min_seq; ++key.u32)
skiplist_remove(r->loss, key);
r->base_seq = min_seq;
}
ack.base_uid = r->base_uid;
ack.base = r->base_seq;
ack.loss_num = 0;
SKIPLIST_FOREACH(r->loss, iter){
l = (wb_loss_t*)iter->val.ptr;
if (iter->key.u32 <= r->base_seq)
continue;
if (l->ts + s->proc->rtt + s->proc->rtt_val <= cur_ts && ack.loss_num < LOSS_SISE){
ack.loss[ack.loss_num++] = iter->key.u32;
l->ts = cur_ts;
r->loss_count++;
l->count++;
}
if (l->count > max_count)
max_count = l->count;
}
if (ack.loss_num > 0 || hb == 0)
video_send_segment(s, &ack);
r->ack_ts = cur_ts;
}
/*if (r->active_ts + 10000 < cur_ts)*/{
if (max_count > 1){
delay = (max_count * 16 + 7) * (s->proc->rtt + s->proc->rtt_val) / 16;
if (delay > r->cache->wait_timer)
r->cache->wait_timer = SU_MIN(delay, 5000);
}
else if (skiplist_size(r->loss) > 0)
r->cache->wait_timer = SU_MAX((s->proc->rtt + s->proc->rtt_val * 2), r->cache->wait_timer);
}
r->cache->wait_timer = SU_MAX(r->cache->frame_timer, r->cache->wait_timer);
}
int <API key>(cf_session_t* s, <API key>* r, cf_seg_video_t* seg)
{
uint32_t seq;
cf_seg_video_t* tmp;
if (r->max_seq == 0 && seg->ftype == 0)
return -1;
seq = seg->seq;
if (r->actived == 0 || seg->seq <= r->base_seq || (r->max_seq > 0 && seq > r->max_seq + 2000)){
return -1;
}
if (r->max_seq == 0 && seg->seq > seg->index){
r->max_seq = seg->seq - seg->index - 1;
r->base_seq = seg->seq - seg->index - 1;
}
<API key>(s, r, seq);
tmp = calloc(1, sizeof(cf_seg_video_t));
*tmp = *seg;
if (<API key>(s, r->cache, tmp) != 0){
free(tmp);
return -1;
}
if (seq == r->base_seq + 1)
r->base_seq = seq;
r->max_seq = SU_MAX(r->max_seq, seq);
video_real_ack(s, r, 0);
return 0;
}
int <API key>(cf_session_t* s, <API key>* r, uint8_t* data, size_t* sizep)
{
if (r->actived == 0)
return -1;
return <API key>(s, r->cache, data, sizep);
}
void <API key>(cf_session_t* s, <API key>* r)
{
video_real_ack(s, r, 1);
if (r->cache_ts + SU_MAX(s->proc->rtt + s->proc->rtt_val, 1000) < GET_SYS_MS()){
if (r->loss_count == 0)
r->cache->wait_timer = SU_MAX(r->cache->wait_timer * 7 / 8, r->cache->frame_timer);
else if (r->cache->wait_timer > 2 * (s->proc->rtt + s->proc->rtt_val))
r->cache->wait_timer = SU_MAX(r->cache->wait_timer * 15 / 16, r->cache->frame_timer);
r->cache_ts = GET_SYS_MS();
r->loss_count = 0;
}
}
|
{{ Form::label('title', __('validation.attributes.title'), ['class' => 'label']) }}
<div class="mb-4">
{{ Form::text('title', old('title', $category->title), ['class' => 'input' . ($errors->has('title') ? ' has-error' : ''), 'required' => true]) }}
@if ($errors->has('title'))
<div class="invalid-feedback">
{{ $errors->first('title') }}
</div>
@endif
</div>
@include('shared._form_color', ['item' => $category])
{{ Form::button($submitTitle, ['type' => 'submit', 'class' => 'btn btn-primary']) }}
|
// Karma configuration
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['mocha', 'chai', 'sinon'],
// list of files / patterns to load in the browser
files: [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/scripts*.js',
'test/mock*.js',
'test/spec*.js'
|
using System.ComponentModel;
namespace LinqAn.Google.Dimensions
{
<summary>
DCM creative type name of the DCM click matching the Google Analytics session (premium only).
</summary>
[Description("DCM creative type name of the DCM click matching the Google Analytics session (premium only).")]
public class <API key>: Dimension
{
<summary>
Instantiates a <seealso cref="<API key>" />.
</summary>
public <API key>(): base("DFA Creative Type (GA Model)",false,"ga:<API key>")
{
}
}
}
|
#include <QDebug>
#include <QFileDialog>
#include <QListWidgetItem>
#include <QMessageBox>
#include <QProcess>
#include <QWidget>
#include "app.h"
#include "import.h"
#include "ui_import.h"
Import::Import(App* app) :
app(app),
platform(-1) {
this->ui.setupUi(this);
connect(this->ui.toolFilepath, SIGNAL(clicked()), this, SLOT(onFilepathTool()));
connect(this->ui.start, SIGNAL(clicked()), this, SLOT(onStart()));
connect(this->ui.filepath, SIGNAL(textChanged(const QString&)), this, SLOT(onFilepathChange()));
connect(&importProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(onImportFinished()));
}
Import::~Import() {
this->ui.filepath->setText("");
this->ui.start->setEnabled(false);
}
void Import::reset() {
}
void Import::onFilepathTool() {
QFileDialog fileDialog(this);
fileDialog.setOption(QFileDialog::DontUseNativeDialog, true);
connect(&fileDialog, SIGNAL(fileSelected(const QString&)), this, SLOT(onSelectedFilepath(const QString&)));
fileDialog.exec();
}
void Import::onSelectedFilepath(const QString& filepath) {
this->ui.filepath->setText(filepath);
}
void Import::onFilepathChange() {
if (this->ui.filepath->text().length() > 0) {
this->ui.start->setEnabled(true);
} else {
this->ui.start->setEnabled(false);
}
}
void Import::onStart() {
this->ui.start->setEnabled(false);
// close the db to not corrupt it.
this->app->getDb()->close();
QString mehtadataPath = app->mehtadataPath();
if (mehtadataPath.length() == 0) {
QMessageBox::critical(NULL, "Can't find mehtadata", "The import can't be executed because the exe mehtadata is not found.");
return;
}
// start the import
importProcess.setProgram(mehtadataPath);
QStringList arguments;
arguments << "-db" << this->app->getDb()->filename << "-import-es";
QProcessEnvironment env;
env.insert("PLATFORM_ID", QString::number(this->platform));
env.insert("GAMELIST", this->ui.filepath->text()) ;
importProcess.<API key>(env);
importProcess.setArguments(arguments);
importProcess.start();
qDebug() << "OK";
qDebug() << arguments;
}
void Import::onImportFinished() {
this->ui.start->setEnabled(true);
this->app->getDb()->open(this->app->getDb()->filename);
this->app->getSelectedPlatform().id = -1;
this->app->onPlatformSelected(this->app->getCurrentItem(), NULL);
this->hide();
}
|
import {Component} from '@angular/core';
@Component({
selector: "recomendaciones",
templateUrl: "app/components/htmls/<API key>/recomendaciones.html",
styleUrls: ["app/components/htmls/htmlStyles.css"]
})
export class <API key> {};
|
Please take a read at this article so we can help you better, we are always happy to support you at our [chat](https://gitter.im/beto-rodriguez/Live-Charts), normally we respond you really fast.
Features
We are open to add new features to this library, but before suggesting one, ensure it is not implemented yet, There are a lot of examples showing the already supported features in the library, in the [website](http:
After you are sure it is not implemented, open a [new issue](https://github.com/beto-rodriguez/Live-Charts/issues/new) that contains:
* What you are trying to do and cannot be solved with the [latest](https:
* Since this is a visual library always adding an image with the expected result is helpful.
Bugs
A bug should be ascertainable with the [latest](https:
A good way to say thanks for this library is doing good reports, the better you report the faster we can fix it. the next list is ordered by "ease to attend" for the developers of the library, you can choose any of these methods to give us your feedback.
* Create a repository that illustrates the issue, please use as less dependencies as possible.
* If you are not very familiar with git, you could simply send us a mail with an example project that illustrates the issue at support@lvcharts.net
* Simply open a [new issue](https://github.com/beto-rodriguez/Live-Charts/issues/new) following the sugested structure.
* Comment it in out [chat](https://gitter.im/beto-rodriguez/Live-Charts).
Pull Request
Please do suggest whatever you think is necessary to improve, name your PR with a clear name of what you have done, explain a bit about it and you are done, we will review your code and merge it if we think it is appropiated.
Notice that by doing a PR you must respect and agree our [license](https:
|
package com.github.anba.es6draft.runtime.types.builtins;
import java.lang.invoke.MethodHandle;
import java.lang.reflect.Method;
import com.github.anba.es6draft.runtime.ExecutionContext;
import com.github.anba.es6draft.runtime.Realm;
import com.github.anba.es6draft.runtime.types.Constructor;
/**
* <h1>9 Ordinary and Exotic Objects Behaviours</h1>
* <ul>
* <li>9.3 Built-in Function Objects
* </ul>
*/
public abstract class BuiltinConstructor extends BuiltinFunction implements Constructor {
private MethodHandle constructMethod;
/**
* Constructs a new built-in constructor function.
*
* @param realm
* the realm object
* @param name
* the function name
* @param arity
* the function arity
*/
protected BuiltinConstructor(Realm realm, String name, int arity) {
super(realm, name, arity);
}
/**
* Returns `(? extends BuiltinConstructor, ExecutionContext, Constructor, Object[]) {@literal ->} ScriptObject`
* method-handle.
*
* @return the call method handle
*/
public MethodHandle getConstructMethod() {
if (constructMethod == null) {
try {
Method method = getClass().getDeclaredMethod("construct", ExecutionContext.class, Constructor.class,
Object[].class);
constructMethod = lookup().unreflect(method);
} catch (<API key> e) {
throw new RuntimeException(e);
}
}
return constructMethod;
}
}
|
// AAAreaspline.h
// AAChartKit
#import <Foundation/Foundation.h>
@class AADataLabels;
@interface AAAreaspline : NSObject
<API key>(strong, AAAreaspline, AADataLabels *, dataLabels)
@end
|
/*
* Reading a variable.
*/
if (typeof print !== 'function') { print = console.log; }
function test() {
function outer() {
var o = 123;
return function inner() {
var i;
var t;
for (i = 0; i < 1e6; i++) {
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o; t = o;
}
};
}
var f = outer();
f();
}
try {
test();
} catch (e) {
print(e.stack || e);
throw e;
}
|
# <API key>: true
require "cases/helper"
require "models/user"
require "models/visitor"
class SecurePasswordTest < ActiveModel::TestCase
setup do
# Used only to speed up tests
@original_min_cost = ActiveModel::SecurePassword.min_cost
ActiveModel::SecurePassword.min_cost = true
@user = User.new
@visitor = Visitor.new
# Simulate loading an existing user from the DB
@existing_user = User.new
@existing_user.password_digest = BCrypt::Password.create("password", cost: BCrypt::Engine::MIN_COST)
end
teardown do
ActiveModel::SecurePassword.min_cost = @original_min_cost
end
test "automatically include ActiveModel::Validations when validations are enabled" do
assert_respond_to @user, :valid?
end
test "don't include ActiveModel::Validations when validations are disabled" do
<API key> @visitor, :valid?
end
test "create a new user with validations and valid password/confirmation" do
@user.password = "password"
@user.<API key> = "password"
assert @user.valid?(:create), "user should be valid"
@user.password = "a" * 72
@user.<API key> = "a" * 72
assert @user.valid?(:create), "user should be valid"
end
test "create a new user with validation and a spaces only password" do
@user.password = " " * 72
assert @user.valid?(:create), "user should be valid"
end
test "create a new user with validation and a blank password" do
@user.password = ""
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["can't be blank"], @user.errors[:password]
end
test "create a new user with validation and a nil password" do
@user.password = nil
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["can't be blank"], @user.errors[:password]
end
test "create a new user with validation and password length greater than 72" do
@user.password = "a" * 73
@user.<API key> = "a" * 73
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["is too long (maximum is 72 characters)"], @user.errors[:password]
end
test "create a new user with validation and a blank password confirmation" do
@user.password = "password"
@user.<API key> = ""
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["doesn't match Password"], @user.errors[:<API key>]
end
test "create a new user with validation and a nil password confirmation" do
@user.password = "password"
@user.<API key> = nil
assert @user.valid?(:create), "user should be valid"
end
test "create a new user with validation and an incorrect password confirmation" do
@user.password = "password"
@user.<API key> = "something else"
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["doesn't match Password"], @user.errors[:<API key>]
end
test "update an existing user with validation and no change in password" do
assert @existing_user.valid?(:update), "user should be valid"
end
test "update an existing user with validations and valid password/confirmation" do
@existing_user.password = "password"
@existing_user.<API key> = "password"
assert @existing_user.valid?(:update), "user should be valid"
@existing_user.password = "a" * 72
@existing_user.<API key> = "a" * 72
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a blank password" do
@existing_user.password = ""
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a spaces only password" do
@user.password = " " * 72
assert @user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a blank password and <API key>" do
@existing_user.password = ""
@existing_user.<API key> = ""
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a nil password" do
@existing_user.password = nil
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["can't be blank"], @existing_user.errors[:password]
end
test "updating an existing user with validation and password length greater than 72" do
@existing_user.password = "a" * 73
@existing_user.<API key> = "a" * 73
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["is too long (maximum is 72 characters)"], @existing_user.errors[:password]
end
test "updating an existing user with validation and a blank password confirmation" do
@existing_user.password = "password"
@existing_user.<API key> = ""
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["doesn't match Password"], @existing_user.errors[:<API key>]
end
test "updating an existing user with validation and a nil password confirmation" do
@existing_user.password = "password"
@existing_user.<API key> = nil
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and an incorrect password confirmation" do
@existing_user.password = "password"
@existing_user.<API key> = "something else"
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["doesn't match Password"], @existing_user.errors[:<API key>]
end
test "updating an existing user with validation and a blank password digest" do
@existing_user.password_digest = ""
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["can't be blank"], @existing_user.errors[:password]
end
test "updating an existing user with validation and a nil password digest" do
@existing_user.password_digest = nil
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["can't be blank"], @existing_user.errors[:password]
end
test "setting a blank password should not change an existing password" do
@existing_user.password = ""
assert @existing_user.password_digest == "password"
end
test "setting a nil password should clear an existing password" do
@existing_user.password = nil
assert_nil @existing_user.password_digest
end
test "authenticate" do
@user.password = "secret"
assert_not @user.authenticate("wrong")
assert @user.authenticate("secret")
end
test "Password digest cost defaults to bcrypt default cost when min_cost is false" do
ActiveModel::SecurePassword.min_cost = false
@user.password = "secret"
assert_equal BCrypt::Engine::DEFAULT_COST, @user.password_digest.cost
end
test "Password digest cost honors bcrypt cost attribute when min_cost is false" do
begin
<API key> = BCrypt::Engine.cost
ActiveModel::SecurePassword.min_cost = false
BCrypt::Engine.cost = 5
@user.password = "secret"
assert_equal BCrypt::Engine.cost, @user.password_digest.cost
ensure
BCrypt::Engine.cost = <API key>
end
end
test "Password digest cost can be set to bcrypt min cost to speed up tests" do
ActiveModel::SecurePassword.min_cost = true
@user.password = "secret"
assert_equal BCrypt::Engine::MIN_COST, @user.password_digest.cost
end
end
|
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstring>
#include "../include/globals.hpp"
#include "../include/classes.hpp"
#include "../include/functions.hpp"
struct cell{
double xStart;
double yStart;
double zStart;
};
int main(int argc, char** argv)
{
int a;
int run=0;
gsl_rng_set(r,98);
<API key>(gas_in,-1,5);
<API key>(gas_out,-1,5);
<API key>(gas_real_in,-1,5);
Particle *cube = new Particle[N];
std::list<Particle*> gas;
std::list<Particle*> gasHistory;
double* rCM = new double[3];
double* rCMtemp = new double[3];
double* vCM = new double[3];
double energy = 0;
InitPositions(cube);
calcCM(cube,rCMStart,vCM);
calcCM(cube,rCM,vCM);
InitVelocities(cube);
<API key>(cube);
/*
*for(run=0;run<10000;run++)
*{
* if(run%500==0)
* printf("(INIT) Zeitschritt %d\n",run);
* VelocityVerlet(cube,0,NULL);
* if(run%100 == 0)
* rescaleVelocities(cube);
* if(run%100 == 0)
* GenerateOutput(cube,gas,run);
*}
*/
gsl_histogram *cells = gsl_histogram_alloc(100);
<API key>(cells,0,50);
double lcx = floor(L/rCutOff);
double rcx = L/lcx;
double c = 0;
double ci[3] = {0,0,0};
for(int i=0;i<N;i++)
{
for(int k=0;k<3;k++)
ci[k] = floor(cube[i].r[k]/rcx);
c = ci[0]*lcx*lcx+ci[1]*lcx+ci[2];
std::cout << c << std::endl;
<API key>(cells,c);
}
FILE* celldata = fopen("cell_list_test.dat","w");
<API key>(celldata,cells,"%f","%f");
fclose(celldata);
return 0;
}
|
<?php
namespace Sigcotweb\AplicativoBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\<API key>;
class Configuration implements <API key>
{
/**
* {@inheritDoc}
*/
public function <API key>()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('aplicativo');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
return $treeBuilder;
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
using _03BarracksFactory.Contracts;
namespace P03_BarraksWars.Core.Commands
{
class RetireCommand : Command
{
public RetireCommand(string[] data, IRepository repository, IUnitFactory unitFactory)
: base(data, repository, unitFactory)
{
}
public override string Execute()
{
try
{
this.Repository.RemoveUnit(this.Data[1]);
return $"{this.Data[1]} retured!";
}
catch (<API key> ex)
{
return ex.Message;
}
}
}
}
|
(function( window, undefined ) {
var Globalize;
if ( typeof require !== "undefined" &&
typeof exports !== "undefined" &&
typeof module !== "undefined" ) {
// Assume CommonJS
Globalize = require( "globalize" );
} else {
// Global variable
Globalize = window.Globalize;
}
Globalize.addCultureInfo( "id", "default", {
name: "id",
englishName: "Indonesian",
nativeName: "Bahasa Indonesia",
language: "id",
numberFormat: {
",": ".",
".": ",",
percent: {
",": ".",
".": ","
},
currency: {
decimals: 0,
",": ".",
".": ",",
symbol: "Rp"
}
},
calendars: {
standard: {
firstDay: 1,
days: {
names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],
namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"],
namesShort: ["M","S","S","R","K","J","S"]
},
months: {
names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""],
namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""]
},
AM: null,
PM: null,
patterns: {
d: "dd/MM/yyyy",
D: "dd MMMM yyyy",
t: "H:mm",
T: "H:mm:ss",
f: "dd MMMM yyyy H:mm",
F: "dd MMMM yyyy H:mm:ss",
M: "dd MMMM",
Y: "MMMM yyyy"
}
}
}
});
}( this ));
|
package de.codecentric.awesome.recommendation.core;
import java.util.HashMap;
import java.util.Map;
public class <API key> {
private static <API key> ourInstance = new <API key>();
private String <API key> = "P999";
// Map<User, Product>
private final Map<String, String> recommendationMap = new HashMap<String, String>();
public static <API key> getInstance() {
return ourInstance;
}
private <API key>() {
recommendationMap.put("P00T", "P001");
recommendationMap.put("P001", "P002");
recommendationMap.put("P002", "P003");
recommendationMap.put("P003", "P003");
}
public Product getRecommendation (Product product) {
return new Product((recommendationMap.containsKey(product.getId()) ? recommendationMap.get(product.getId()) : <API key>));
}
}
|
import omit from 'lodash/omit';
import get from 'lodash/get';
import isFunction from 'lodash/isFunction';
import { <API key> } from '../common/rollbar';
// Rollbar script exposes this global immediately, whether or not its already initialized
export const <API key> = () => !!get(global, 'Rollbar');
export default function ClientRollbarLogger({ token, environment, codeVersion }) {
// Rollbar may already be initialized, but thats ok
global.Rollbar.configure({
accessToken: token,
environment,
captureUncaught: true,
<API key>: true,
payload: {
environment,
javascript: {
code_version: codeVersion,
source_map_enabled: true,
},
},
});
}
/**
* Transport logs to Rollbar
* @param {Object} data
* @returns {undefined}
*/
ClientRollbarLogger.prototype.write = function (data = {}) {
const rollbarLevelName = <API key>(data.level);
const scopeData = omit(data, ['err', 'level']);
const payload = Object.assign({ level: rollbarLevelName }, scopeData);
// https://rollbar.com/docs/notifier/rollbar.js/#rollbarlog
const logFn = global.Rollbar[rollbarLevelName];
if (isFunction(logFn)) {
logFn.call(global.Rollbar, data.msg, data.err, payload);
} else {
global.Rollbar.error(data.msg, data.err, payload);
}
};
|
# coding: utf-8
""" General utilities. """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import collections
import sys
import logging
import multiprocessing
# Third-party
import numpy as np
__all__ = ['get_pool']
# Create logger
logger = logging.getLogger(__name__)
class SerialPool(object):
def close(self):
return
def map(self, *args, **kwargs):
return map(*args, **kwargs)
def get_pool(mpi=False, threads=None):
if mpi:
from emcee.utils import MPIPool
# Initialize the MPI pool
pool = MPIPool()
# Make sure the thread we're running on is the master
if not pool.is_master():
pool.wait()
sys.exit(0)
logger.debug("Running with MPI...")
elif threads > 1:
logger.debug("Running with multiprocessing on {} cores..."
.format(threads))
pool = multiprocessing.Pool(threads)
else:
logger.debug("Running serial...")
pool = SerialPool()
return pool
def gram_schmidt(y):
""" Modified Gram-Schmidt orthonormalization of the matrix y(n,n) """
n = y.shape[0]
if y.shape[1] != n:
raise ValueError("Invalid shape: {}".format(y.shape))
mo = np.zeros(n)
# Main loop
for i in range(n):
# Remove component in direction i
for j in range(i):
esc = np.sum(y[j]*y[i])
y[i] -= y[j]*esc
# Normalization
mo[i] = np.linalg.norm(y[i])
y[i] /= mo[i]
return mo
class use_backend(object):
def __init__(self, backend):
import matplotlib.pyplot as plt
from IPython.core.interactiveshell import InteractiveShell
from IPython.core.pylabtools import backend2gui
self.shell = InteractiveShell.instance()
self.old_backend = backend2gui[str(plt.get_backend())]
self.new_backend = backend
def __enter__(self):
gui, backend = self.shell.enable_matplotlib(self.new_backend)
def __exit__(self, type, value, tb):
gui, backend = self.shell.enable_matplotlib(self.old_backend)
def inherit_docs(cls):
for name, func in vars(cls).items():
if not func.__doc__:
for parent in cls.__bases__:
try:
parfunc = getattr(parent, name)
except AttributeError: # parent doesn't have function
break
if parfunc and getattr(parfunc, '__doc__', None):
func.__doc__ = parfunc.__doc__
break
return cls
class ImmutableDict(collections.Mapping):
def __init__(self, somedict):
self._dict = dict(somedict) # make a copy
self._hash = None
def __getitem__(self, key):
return self._dict[key]
def __len__(self):
return len(self._dict)
def __iter__(self):
return iter(self._dict)
def __hash__(self):
if self._hash is None:
self._hash = hash(frozenset(self._dict.items()))
return self._hash
def __eq__(self, other):
return self._dict == other._dict
|
{% extends 'layout.server.view.html' %}
{% block content %}
<div ui-view></div>
{% endblock %}
|
##  PdfRasterizer Plugin for Xamarin and Windows
Simple cross platform plugin that renders PDF files to images for easier integration.
Setup
* Available on NuGet: http:
* Install into your PCL project and Client projects.
**Platform Support**
|Platform|Supported|Version|
|
|Xamarin.iOS|Yes|iOS 6+|
|Xamarin.iOS Unified|Yes|iOS 6+|
|Xamarin.Android|Yes|API 21+|
|Windows Store RT|Yes|8.1+|
|Windows 10 UWP|Yes|10+|
|Windows Phone Silverlight|No||
|Windows Phone RT|No||
|Xamarin.Mac|No||
API Usage
Call **CrossPdfRasterizer.Current** from any project or PCL to gain access to APIs.
A `.pdf` document rasterization will render all of its pages as `.png` images in the local storage of the application (by default in the `/.pdf/` subfolder). Local and distant document can be prodvided. If the provided document path starts with `http:
# Example
csharp
try
{
const string documentUrl = "https://developer.xamarin.com/guides/xamarin-forms/getting-started/<API key>/offline.pdf";
const bool forceRasterize = false;
var rasterizer = CrossPdfRasterizer.Current;
var document = await rasterizer.Rasterize(documentUrl,forceRasterize);
var pageImages = document.Pages.Select((p) => p.Path);
}
catch(Exception ex)
{
Debug.WriteLine("Unable to rasterize provided document: " + ex);
}
# API
csharp
<summary>
The directory where all the rasterized PDF's sub-directories containing page images are created (default: "/.pdf/").
</summary>
string <API key> { get; set; }
csharp
<summary>
Renders a local PDF file as a set of page images into the local storage.
</summary>
<param name="pdfPath">The relative path to the PDF file in local storage, or a distant url. If a distant Url is provided, the document will be downloaded first in the temporary folder of the application.</param>
<param name="cachePirority">Indicates whether the already rasterized version should be taken, or images must be forced to be rasterized again.</param>
<returns>A document containing all the pages with their paths.</returns>
Task<PdfDocument> Rasterize(string pdfPath, bool cachePirority = true);
csharp
<summary>
Gets the locally rendered document if it has already been rasterized, else it returns null.
</summary>
<param name="pdfPath"></param>
<returns></returns>
Task<PdfDocument> GetRasterized(string pdfPath);
> Why is the rasterizer only available for Android version prior to Lollipop ?
Because the `PdfRenderer` was introduced only in this version. I didn't found any free solution to have the same result of older versions of Android. If you have a solution don't hesitate to contact me !
Roadmap / Ideas
* Adding custoization for generation location.
* Adding more document meta-data (with maybe the original document available too)
* Adding PDF drawing generation functionality (*iOS and Android only*)
* Creating a Xamarin.Forms SimplePdfViewer
Contributors
* [aloisdeniel](https://github.com/aloisdeniel)
Thanks!
License
Licensed under main repo license
|
#include <pthread.h>
#include <assert.h>
int g = 17; // matches expected precise read
pthread_mutex_t A = <API key>;
pthread_mutex_t B = <API key>;
pthread_mutex_t C = <API key>;
void *t_fun(void *arg) {
pthread_mutex_lock(&B);
pthread_mutex_lock(&C);
g = 42;
<API key>(&B);
g = 17;
<API key>(&C);
return NULL;
}
int main(void) {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
pthread_mutex_lock(&C);
assert(g == 17);
<API key>(&A);
<API key>(&B);
<API key>(&C);
return 0;
}
|
import EmberObject from '@ember/object';
import { htmlSafe } from '@ember/string';
import RSVP from 'rsvp';
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import {
render,
settled,
find,
click
} from '@ember/test-helpers';
import hbs from '<API key>';
const { resolve } = RSVP;
module('Integration | Component | school session types list', function(hooks) {
setupRenderingTest(hooks);
test('it renders', async function(assert) {
assert.expect(19);
let assessmentOption = EmberObject.create({
id: 1,
name: 'formative'
});
let sessionType1 = EmberObject.create({
id: 1,
school: 1,
title: 'not needed anymore',
assessment: false,
assessmentOption: resolve(null),
safeCalendarColor: htmlSafe('#ffffff'),
sessionCount: 2,
active: false,
});
let sessionType2 = EmberObject.create({
id: 2,
school: 1,
title: 'second',
assessment: true,
assessmentOption: resolve(assessmentOption),
safeCalendarColor: htmlSafe('#123456'),
sessionCount: 0,
active: true,
});
let sessionType3 = EmberObject.create({
id: 2,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
safeCalendarColor: htmlSafe('#cccccc'),
sessionCount: 2,
active: true,
});
this.set('sessionTypes', [sessionType1, sessionType2, sessionType3]);
this.set('nothing', parseInt);
await render(hbs`{{<API key>
sessionTypes=sessionTypes
manageSessionType=(action nothing)
}}`);
const rows = 'table tbody tr';
const firstSessionType = `${rows}:nth-of-type(1)`;
const firstTitle = `${firstSessionType} td:nth-of-type(1)`;
const firstSessionCount = `${firstSessionType} td:nth-of-type(2)`;
const firstAssessment = `${firstSessionType} td:nth-of-type(3) svg`;
const <API key> = `${firstSessionType} td:nth-of-type(4)`;
const firstColorBox = `${firstSessionType} td:nth-of-type(6) .box`;
const secondSessionType = `${rows}:nth-of-type(2)`;
const secondTitle = `${secondSessionType} td:nth-of-type(1)`;
const secondSessionCount = `${secondSessionType} td:nth-of-type(2)`;
const secondAssessment = `${secondSessionType} td:nth-of-type(3) svg`;
const <API key> = `${secondSessionType} td:nth-of-type(4)`;
const secondColorBox = `${secondSessionType} td:nth-of-type(6) .box`;
const thirdSessionType = `${rows}:nth-of-type(3)`;
const thirdTitle = `${thirdSessionType} td:nth-of-type(1)`;
const thirdSessionCount = `${thirdSessionType} td:nth-of-type(2)`;
const thirdAssessment = `${thirdSessionType} td:nth-of-type(3) svg`;
const <API key> = `${thirdSessionType} td:nth-of-type(4)`;
const thirdColorBox = `${thirdSessionType} td:nth-of-type(6) .box`;
assert.dom(firstTitle).hasText('first');
assert.dom(firstSessionCount).hasText('2');
assert.dom(firstAssessment).hasClass('no');
assert.dom(firstAssessment).hasClass('fa-ban');
assert.dom(<API key>).hasText('');
assert.equal(find(firstColorBox).style.getPropertyValue('background-color').trim(), ('rgb(204, 204, 204)'));
assert.dom(secondTitle).hasText('second');
assert.dom(secondSessionCount).hasText('0');
assert.dom(secondAssessment).hasClass('yes');
assert.dom(secondAssessment).hasClass('fa-check');
assert.dom(<API key>).hasText('formative');
assert.equal(find(secondColorBox).style.getPropertyValue('background-color').trim(), ('rgb(18, 52, 86)'));
assert.ok(find(thirdTitle).textContent.trim().startsWith('not needed anymore'));
assert.ok(find(thirdTitle).textContent.trim().endsWith('(inactive)'));
assert.dom(thirdSessionCount).hasText('2');
assert.dom(thirdAssessment).hasClass('no');
assert.dom(thirdAssessment).hasClass('fa-ban');
assert.dom(<API key>).hasText('');
assert.equal(find(thirdColorBox).style.getPropertyValue('background-color').trim(), ('rgb(255, 255, 255)'));
});
test('clicking edit fires action', async function(assert) {
assert.expect(1);
let sessionType = EmberObject.create({
id: 1,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff'
});
this.set('sessionTypes', [sessionType]);
this.set('manageSessionType', sessionTypeId => {
assert.equal(sessionTypeId, 1);
});
await render(hbs`{{<API key>
sessionTypes=sessionTypes
manageSessionType=(action manageSessionType)
}}`);
await settled();
const rows = 'table tbody tr';
const edit = `${rows}:nth-of-type(1) td:nth-of-type(7) .fa-edit`;
await click(edit);
});
test('clicking title fires action', async function(assert) {
assert.expect(1);
let sessionType = EmberObject.create({
id: 1,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff'
});
this.set('sessionTypes', [sessionType]);
this.set('manageSessionType', sessionTypeId => {
assert.equal(sessionTypeId, 1);
});
await render(hbs`{{<API key>
sessionTypes=sessionTypes
manageSessionType=(action manageSessionType)
}}`);
await settled();
const rows = 'table tbody tr';
const title = `${rows}:nth-of-type(1) td:nth-of-type(1) a`;
await click(title);
});
test('session types without sessions can be deleted', async function(assert) {
assert.expect(4);
let unlinkedSessionType = EmberObject.create({
id: 1,
school: 1,
title: 'unlinked',
active: true,
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff',
sessionCount: 0,
deleteRecord(){
assert.ok(true, 'was deleted');
return resolve();
}
});
let linkedSessionType = EmberObject.create({
id: 1,
school: 1,
title: 'linked',
active: true,
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff',
sessionCount: 5,
deleteRecord(){
assert.ok(true, 'was deleted');
return resolve();
}
});
this.set('sessionTypes', [linkedSessionType, unlinkedSessionType]);
this.set('nothing', parseInt);
await render(hbs`{{<API key>
sessionTypes=sessionTypes
manageSessionType=(action nothing)
canDelete=true
}}`);
await settled();
const rows = 'table tbody tr';
const linkedTitle = `${rows}:nth-of-type(1) td:nth-of-type(1)`;
const unlinkedTitle = `${rows}:nth-of-type(2) td:nth-of-type(1)`;
const linkedTrash = `${rows}:nth-of-type(1) td:nth-of-type(7) .fa-trash.disabled`;
const unlinkedTrash = `${rows}:nth-of-type(2) td:nth-of-type(7) .fa-trash.enabled`;
assert.dom(linkedTitle).hasText('linked', 'linked is first');
assert.dom(unlinkedTitle).hasText('unlinked', 'unlinked is second');
assert.dom(linkedTrash).exists({ count: 1 }, 'linked has a disabled trash can');
assert.dom(unlinkedTrash).exists({ count: 1 }, 'unlinked has an enabled trash can');
});
test('clicking delete deletes the record', async function(assert) {
assert.expect(2);
let sessionType = EmberObject.create({
id: 1,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff',
sessionCount: 0,
deleteRecord(){
assert.ok(true, 'was deleted');
},
save(){
assert.ok(true, 'was deleted');
return resolve();
},
});
this.set('sessionTypes', [sessionType]);
this.set('nothing', parseInt);
await render(hbs`{{<API key>
sessionTypes=sessionTypes
manageSessionType=(action nothing)
canDelete=true
}}`);
await settled();
const rows = 'table tbody tr';
const trash = `${rows}:nth-of-type(1) td:nth-of-type(7) .fa-trash`;
await click(trash);
await settled();
});
});
|
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
using Dependinator.Common.<API key>;
using Dependinator.Common.<API key>.Private;
using Dependinator.Common.SettingsHandling;
using Dependinator.Utils;
using Dependinator.Utils.Dependencies;
using Dependinator.Utils.ErrorHandling;
using Dependinator.Utils.Net;
using Dependinator.Utils.OsSystem;
using Dependinator.Utils.Serialization;
using Dependinator.Utils.Threading;
using Microsoft.Win32;
namespace Dependinator.Common.Installation.Private
{
[SingleInstance]
internal class <API key> : <API key>
{
private static readonly TimeSpan IdleTimerInterval = TimeSpan.FromMinutes(1);
private static readonly TimeSpan <API key> = TimeSpan.FromMinutes(10);
private static readonly string latestUri =
"https://api.github.com/repos/michael-reichenauer/Dependinator/releases/latest";
private static readonly string UserAgent = "Dependinator";
private readonly ModelMetadata modelMetadata;
private readonly ISettingsService settingsService;
private readonly <API key> <API key>;
private DispatcherTimer idleTimer;
private DateTime lastIdleCheck = DateTime.MaxValue;
public <API key>(
<API key> <API key>,
ISettingsService settingsService,
ModelMetadata modelMetadata)
{
this.<API key> = <API key>;
this.settingsService = settingsService;
this.modelMetadata = modelMetadata;
}
public event EventHandler <API key>;
public void <API key>()
{
idleTimer = new DispatcherTimer();
idleTimer.Tick += <API key>;
idleTimer.Interval = IdleTimerInterval;
idleTimer.Start();
SystemEvents.PowerModeChanged += OnPowerModeChange;
}
public async Task <API key>()
{
if (settingsService.Get<Options>().DisableAutoUpdate)
{
return;
}
if (await <API key>())
{
await <API key>();
await <API key>();
}
}
private async Task<bool> <API key>()
{
Version remoteVersion = await <API key>();
Version currentVersion = Version.Parse(ProgramInfo.Version);
Version installedVersion = ProgramInfo.GetInstalledVersion();
Version setupVersion = ProgramInfo.GetSetupVersion();
LogVersion(currentVersion, installedVersion, remoteVersion, setupVersion);
return installedVersion < remoteVersion && setupVersion < remoteVersion;
}
private async Task<bool> <API key>()
{
try
{
Log.Info($"Downloading remote setup {latestUri} ...");
LatestInfo latestInfo = <API key>();
if (latestInfo == null)
{
// No installed version.
return false;
}
using (<API key> httpClient = <API key>())
{
await DownloadSetupAsync(httpClient, latestInfo);
return true;
}
}
catch (Exception e) when (e.IsNotFatal())
{
Log.Error($"Failed to install new version {e}");
}
return false;
}
private static async Task<string> DownloadSetupAsync(
<API key> httpClient, LatestInfo latestInfo)
{
Asset setupFileInfo = latestInfo.assets.First(a => a.name == $"{ProgramInfo.Name}Setup.exe");
string downloadUrl = setupFileInfo.<API key>;
Log.Info($"Downloading {latestInfo.tag_name} from {downloadUrl} ...");
Timing t = Timing.Start();
httpClient.ProgressChanged += (totalFileSize, <API key>, progressPercentage) =>
{
Log.Info($"Downloading {latestInfo.tag_name} {progressPercentage}% (time: {t.Elapsed}) ...");
};
string setupPath = ProgramInfo.GetSetupFilePath();
if (File.Exists(setupPath))
{
File.Delete(setupPath);
}
await httpClient.StartDownloadAsync(downloadUrl, setupPath);
Log.Info($"Downloaded {latestInfo.tag_name} to {setupPath}");
return setupPath;
}
private async Task<Version> <API key>()
{
try
{
M<LatestInfo> latestInfo = await GetLatestInfoAsync();
if (latestInfo.IsOk && latestInfo.Value.tag_name != null)
{
Version version = Version.Parse(latestInfo.Value.tag_name.Substring(1));
return version;
}
}
catch (Exception e) when (e.IsNotFatal())
{
Log.Warn($"Failed to get latest version {e}");
}
return new Version(0, 0, 0, 0);
}
private async Task<M<LatestInfo>> GetLatestInfoAsync()
{
try
{
using (HttpClient httpClient = new HttpClient())
{
httpClient.<API key>.Add("user-agent", UserAgent);
// Try get cached information about latest remote version
string eTag = <API key>();
if (!string.IsNullOrEmpty(eTag))
{
// There is cached information, lets use the ETag when checking to follow
// GitHub Rate Limiting method.
httpClient.<API key>.IfNoneMatch.Clear();
httpClient.<API key>.IfNoneMatch.Add(new <API key>(eTag));
}
HttpResponseMessage response = await httpClient.GetAsync(latestUri);
if (response.StatusCode == HttpStatusCode.NotModified || response.Content == null)
{
return <API key>();
}
string latestInfoText = await response.Content.ReadAsStringAsync();
Log.Debug("New version info");
if (response.Headers.ETag != null)
{
eTag = response.Headers.ETag.Tag;
<API key>(eTag, latestInfoText);
}
return Json.As<LatestInfo>(latestInfoText);
}
}
catch (Exception e) when (e.IsNotFatal())
{
Log.Exception(e, "Failed to download latest setup");
return Error.From(e);
}
}
private LatestInfo <API key>()
{
ProgramSettings programSettings = settingsService.Get<ProgramSettings>();
return Json.As<LatestInfo>(programSettings.LatestVersionInfo);
}
private string <API key>()
{
ProgramSettings programSettings = settingsService.Get<ProgramSettings>();
return programSettings.<API key>;
}
private void <API key>(string eTag, string latestInfoText)
{
if (string.IsNullOrEmpty(eTag)) return;
// Cache the latest version info
settingsService.Edit<ProgramSettings>(s =>
{
s.<API key> = eTag;
s.LatestVersionInfo = latestInfoText;
});
}
private static void LogVersion(Version current, Version installed, Version remote, Version setup)
{
Log.Usage(
$"Version current: {current}, installed: {installed}, remote: {remote}, setup {setup}");
}
private void <API key>()
{
if (<API key>())
{
<API key>?.Invoke(this, EventArgs.Empty);
}
}
private void OnPowerModeChange(object sender, <API key> e)
{
Log.Info($"Power mode {e.Mode}");
if (e.Mode == PowerModes.Resume)
{
if (<API key>())
{
Log.Info("Newer version is installed, restart ...");
if (<API key>.StartInstance(modelMetadata.ModelFilePath))
{
// Newer version is started, close this instance
Application.Current.Shutdown(0);
}
}
}
}
private void <API key>(object sender, EventArgs e)
{
TimeSpan timeSinceCheck = DateTime.UtcNow - lastIdleCheck;
bool wasSleeping = false;
if (timeSinceCheck > IdleTimerInterval + TimeSpan.FromMinutes(1))
{
// The timer did not tick within the expected timeout, thus computer was probably sleeping.
Log.Info($"Idle timer timeout, was: {timeSinceCheck}");
wasSleeping = true;
}
lastIdleCheck = DateTime.UtcNow;
TimeSpan idleTime = SystemIdle.<API key>();
if (wasSleeping || idleTime > <API key>)
{
if (<API key>())
{
if (<API key>.StartInstance(modelMetadata.ModelFilePath))
{
// Newer version is started, close this instance
Application.Current.Shutdown(0);
}
}
}
}
private static bool <API key>()
{
Version currentVersion = Version.Parse(ProgramInfo.Version);
Version installedVersion = ProgramInfo.GetInstalledVersion();
Log.Debug($"Current version: {currentVersion} installed version: {installedVersion}");
return currentVersion < installedVersion;
}
private static <API key> <API key>()
{
<API key> client = new <API key>();
client.<API key> = TimeSpan.FromSeconds(30);
client.HttpClient.Timeout = TimeSpan.FromSeconds(60 * 5);
client.HttpClient.<API key>.Add("user-agent", UserAgent);
return client;
}
// Type used when parsing latest version information json
public class LatestInfo
{
public Asset[] assets;
public string tag_name;
}
// Type used when parsing latest version information json
internal class Asset
{
public string <API key>;
public int download_count;
public string name;
}
}
}
|
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
// define the schema for our user model
var authUserSchema = mongoose.Schema({
unique_ID : String,
username : String,
password : String,
role : String,
first_name : String,
last_name : String
});
// generating a hash
authUserSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
};
// checking if password is valid
authUserSchema.methods.validPassword = function(password) {
return bcrypt.compareSync(password, this.password);
};
// create the model for users and expose it to our app
module.exports = mongoose.model('authUser', authUserSchema);
|
<?php
namespace fm\KitBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class KitBundle extends Bundle
{
}
|
from notifications_utils.clients.antivirus.antivirus_client import (
AntivirusClient,
)
from notifications_utils.clients.redis.redis_client import RedisClient
from notifications_utils.clients.zendesk.zendesk_client import ZendeskClient
antivirus_client = AntivirusClient()
zendesk_client = ZendeskClient()
redis_client = RedisClient()
|
'use strict';
var Lib = require('../../lib');
// The contour extraction is great, except it totally fails for constraints because we
// need weird range loops and flipped contours instead of the usual format. This function
// does some weird manipulation of the extracted pathinfo data such that it magically
// draws contours correctly *as* constraints.
module.exports = function(pathinfo, operation) {
var i, pi0, pi1;
var op0 = function(arr) { return arr.reverse(); };
var op1 = function(arr) { return arr; };
switch(operation) {
case '][':
case ')[':
case '](':
case ')(':
var tmp = op0;
op0 = op1;
op1 = tmp;
// It's a nice rule, except this definitely *is* what's intended here.
/* eslint-disable: no-fallthrough */
case '[]':
case '[)':
case '(]':
case '()':
/* eslint-enable: no-fallthrough */
if(pathinfo.length !== 2) {
Lib.warn('Contour data invalid for the specified inequality range operation.');
return;
}
// In this case there should be exactly two contour levels in pathinfo. We
// simply concatenate the info into one pathinfo and flip all of the data
// in one. This will draw the contour as closed.
pi0 = pathinfo[0];
pi1 = pathinfo[1];
for(i = 0; i < pi0.edgepaths.length; i++) {
pi0.edgepaths[i] = op0(pi0.edgepaths[i]);
}
for(i = 0; i < pi0.paths.length; i++) {
pi0.paths[i] = op0(pi0.paths[i]);
}
while(pi1.edgepaths.length) {
pi0.edgepaths.push(op1(pi1.edgepaths.shift()));
}
while(pi1.paths.length) {
pi0.paths.push(op1(pi1.paths.shift()));
}
pathinfo.pop();
break;
case '>=':
case '>':
if(pathinfo.length !== 1) {
Lib.warn('Contour data invalid for the specified inequality operation.');
return;
}
// In this case there should be exactly two contour levels in pathinfo. We
// simply concatenate the info into one pathinfo and flip all of the data
// in one. This will draw the contour as closed.
pi0 = pathinfo[0];
for(i = 0; i < pi0.edgepaths.length; i++) {
pi0.edgepaths[i] = op0(pi0.edgepaths[i]);
}
for(i = 0; i < pi0.paths.length; i++) {
pi0.paths[i] = op0(pi0.paths[i]);
}
break;
}
};
|
module.exports = {
defersToPromises : function(defers) {
if(Array.isArray(defers)) {
return defers.map(function(defer) {
return defer && defer.promise ?
defer.promise :
defer;
});
}
var res = {};
Object.keys(defers).forEach(function(key) {
res[key] = defers[key] && defers[key].promise ?
defers[key].promise :
defer;
});
return res;
}
};
|
export default (sequelize, DataTypes) => {
const Product = sequelize.define('Product', {
name: DataTypes.STRING,
description: DataTypes.TEXT,
price: DataTypes.FLOAT,
releasedate: DataTypes.DATE
}, {
classMethods: {
associate: models => {
Product.belongsToMany(models.Cart, {through: 'ProductCart'});
Product.belongsToMany(models.Platform, {through: 'ProductPlatform'});
Product.belongsTo(models.SpecialEdition);
}
}
});
return Product;
};
|
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>lora imoti</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/modern-business.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/pgwslideshow.css" rel="stylesheet">
<link href="css/pgwslideshow.min.css" rel="stylesheet">
<link href="css/pgwslideshow_light.css" rel="stylesheet">
<link href="css/pgwslideshow_light.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#<API key>">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Lora imoti</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="<API key>">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="about.html">About</a>
</li>
<li>
<a href="team.html">Team</a>
</li>
<li>
<a href="services.html">Services</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Portfolio <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="portfolio-1-col.html">1 Column Portfolio</a>
</li>
<li>
<a href="portfolio-2-col.html">2 Column Portfolio</a>
</li>
<li>
<a href="portfolio-3-col.html">3 Column Portfolio</a>
</li>
<li>
<a href="portfolio-4-col.html">4 Column Portfolio</a>
</li>
</ul>
</li>
<li>
<a href="search.php">Search</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Top <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="naem.html">Naem</a>
</li>
<li>
<a href="prodava.html">Prodava</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Naem <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="ednostaen.html">Ednostaen</a>
</li>
<li>
<a href="dvustaen.html">Dvustaen</a>
</li>
<li>
<a href="tristaen.html">Tristaen</a>
</li>
<li>
<a href="mnogostaen.html">Mnogostaen</a>
</li>
<li>
<a href="mezonet.html">Mezonet</a>
</li>
<li>
<a href="Ofis.html">Ofis</a>
</li>
<li>
<a href="magazin.html">Magazin</a>
</li>
<li>
<a href="zavedenie.html">Zavedenie</a>
</li>
<li>
<a href="kashta.html">Kashta</a>
</li>
<li>
<a href="sklad.html">Sklad</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Prodava <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="1_Ednostaen.html">Ednostaen</a>
</li>
<li>
<a href="2_Dvustaen.html">Dvustaen</a>
</li>
<li>
<a href="3_Tristaen.html">Tristaen</a>
</li>
<li>
<a href="4_Mnogostaen.html">Mnogostaen</a>
</li>
<li>
<a href="5_Mezonet.html">Mezonet</a>
</li>
<li>
<a href="6_Ofis.html">Ofis</a>
</li>
<li>
<a href="7_Magazin.html">Magazin</a>
</li>
<li>
<a href="8_Zavedenie.html">Zavedenie</a>
</li>
<li>
<a href="9_Kashta.html">Kashta</a>
</li>
<li>
<a href="10_Sklad.html">Sklad</a>
</li>
</ul>
</li>
<li>
<a href="contact.html">Contact</a>
</li>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Naem dvustaen apartament
</h1>
</div>
<div class="row">
<div class="col-md-4">
<a href="dvustaen-vraska-1.html">
<img class="img-responsive img-hover" src="img/hol.jpg" alt="">
</a>
<h3>
<a href="dvustaenn-vraska-1.html">Centar</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-2.html">
<img class="img-responsive img-hover" src="img/holluk.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-2.html">Malchika</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-3.html">
<img class="img-responsive img-hover" src="img/kuhnq.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-3.html">Gagarin</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
</div>
<!-- /.row -->
<!-- Projects Row -->
<div class="row">
<div class="col-md-4">
<a href="dvustaen-vraska-4.html">
<img class="img-responsive img-hover" src="img/doc.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vrask-4.html">Belomorski</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-5.html">
<img class="img-responsive img-hover" src="img/ofice.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-5.html">Marasha</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-6.html">
<img class="img-responsive img-hover" src="img/docum.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-6.html">Centar</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
</div>
</div>
<!-- Pagination -->
<div class="row text-center">
<div class="col-lg-12">
<ul class="pagination">
<li>
<a href="#">«</a>
</li>
<li class="active">
<a href="
</li>
<li>
<a href="
</li>
<li>
<a href="
</li>
<li>
<a href="
</li>
<li>
<a href="
</li>
<li>
<a href="#">»</a>
</li>
</ul>
</div>
</div>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
|
<?php
namespace Glucose\Exceptions\User;
class <API key> extends \Glucose\Exceptions\Entity\<API key> {
}
|
Arktrail
=====
You are the captain of a futuristic interstellar ark that quite honestly, left space-dock months too early.
Will you patch up your ship and survive the long journey between worlds to finish the space gate you are tasked to build, or will your ship succumb to the perils of interstellar space?
Current version uses LibGDX 1.3.1 and Artemis-odb 1.7.1<br/>
Originally coded in 48 hours for Ludum Dare 30!
The MIT License (MIT)
## Links
*Play it here:*
http:
*Coding Timelapse:*
http://youtu.be/A6wYyjA10tA
*More of my games:*
http:
|
import { SET_SORT_ORDER } from '../constants/actions';
export default function (state = 'ASCENDING', action) {
switch (action.type) {
case SET_SORT_ORDER:
return action.order;
default:
return state;
}
}
|
<app-header></app-header>
<app-slider></app-slider>
<<div class="container text-center">
<h1 id="title">Delicious Recipes</h1>
<p>Angular</p>
<h4>The Tranquil Gazelles</h4>
<img [src]="gazelles" class="img-circle" alt="Us">
<p>We have created a fictional food SPA.</p>
</div>
<div class="latest-recipes row eq-height">
<h3 class="col-sm-12" id="enjoy">Enjoy Our Recipes</h3>
<div *ngFor="let recipe of allRecipes; let i=index" class="col-sm-12 col-md-3 eq-height" (click)="redirectToDetails(recipe?.key)">
<div *ngIf="i<8" class="recipe-container"> <!-- shows only 8 recipes -->
<img src="{{recipe.img}}" alt="recipe image">
<p><strong>{{recipe.title}}</strong></p>
</div>
</div>
</div>
<app-footer></app-footer>
|
import mongoose from 'mongoose';
const <API key> = new mongoose.Schema({
id: String,
name: String,
displayName: String,
email: String,
securities: [{
symbol: String,
allocation: {type: Number, min: 0, max: 100},
}]
});
<API key>.add({
subGroups: [<API key>],
modelPortfolios: [<API key>],
});
export default mongoose.model('ModelPortfolio', <API key>);
|
import React, { Component } from 'react';
class Home extends Component {
render () {
return (
<div>
<h1>Home</h1>
<p>Bienvenidos!!!</p>
<pre>{`
{
path: '/',
pathExact: true,
component: Home
},
{
path: '/pageOne',
pathExact: true,
component: PageOne
},
{
path: '/pageTwo',
pathExact: true,
component: PageTwo
},
{
path: '/pageThree',
pathExact: true,
auth: true,
component: PageThree,
routes: [
// PAGE 3/ADD
{
path: '/pageThree/add',
pathExact: true,
auth: true,
component: PageThreeAdd
},
// PAGE 4
{
path: '/pageFour/:id/:action',
auth: true,
component: PageFour
}
]
},
// 404 NOT FOUND
{
component: NotFound
}
`}
</pre>
</div>
);
}
}
export default Home;
|
<ion-view view-title="{{ctrl.guideTitle}}">
<ion-content>
<div class="list">
<div class="card-panel grey lighten-4" ng-repeat="guide in ctrl.guides">
<div ng-repeat="guideline in guide.guidelines">
<div class="item-text-wrap">{{guideline.text}}</div>
</div>
</div>
</div>
</ion-content>
</ion-view>
|
define('findScriptUrls', [], function () {
return function(pattern) {
var type = typeof pattern, i, tags = document.querySelectorAll("script"), matches = [], src;
for (i = 0; i < tags.length; i++) {
src = tags[i].src || "";
if (type === "string") {
if (src.indexOf(pattern) !== -1) {
matches.push(src);
}
} else if (pattern.test(src)) {
matches.push(src);
}
}
return matches;
};
});
|
<h2>Sprzątanie pobojowisk</h2>
<?php
f('jednostki_miasto');
$jednostki = jednostki_miasto($gracz);
if(!empty($_POST['cel']) && !empty($_POST['u'])){
f('sprzatanie_wyslij');
echo sprzatanie_wyslij($jednostki,$_POST['cel'],$_POST['u'],$gracz);
$gracz = gracz($gracz['gracz']);
f('jednostki_miasto');
$jednostki = jednostki_miasto($gracz);
} elseif(!empty($_GET['przerwij'])){
f('sprzatanie_przerwij');
echo sprzatanie_przerwij($gracz,$_GET['przerwij']);
$gracz = gracz($gracz['gracz']);
}
if(!empty($jednostki)){
$razem = 0;
$echo ="
<p>
<br style='clear:both'/>
<form action ='?a=sprzatanie' method='post'>
<table>
<tr>
<td>cel </td>
<td><input type='text' name='cel' class='input2' value ='".$_GET['cel']."'></td>
</tr>
";
foreach($jednostki as $oddzial){
if($oddzial['ilosc'] > 0){
$razem = 1;
$echo .="
<tr>
<td>".$oddzial['nazwa']." ( ".$oddzial['ilosc']." ) <span style='float:right'> udźwig: ".$oddzial['udzwig']."</span></td>
<td> <input type='text' class='input2' name='u[".$oddzial['id']."]' ></td>
</tr>
";
}
}
$echo .="
<tr>
<th colspan='2'><input type='submit' class='submit' value='wyślij'></th>
</tr>
</table>
</form>
</p>";
if($razem == 0){
echo "<p class='error'>Nie posiadasz jednostek</p>";
} else {
echo $echo;
}
} else echo "<p class='error'>Brak jednostek w grze</p>";
$wyslane = mysql_query("select * from osadnicy_sprzatanie inner join osadnicy_miasta on do_miasto = miasto where z_miasto = ".$gracz['aktywne_miasto']." order by koniec asc");
if(mysql_num_rows($wyslane) > 0){
echo "<hr/>Akcje<br/>
<table>
<tr>
<th>cel</th>
<th></th>
</tr>
";
$czas = time();
while($akcja = mysql_fetch_array($wyslane)){
$pozostalo = $akcja['koniec'] - $czas;
if($akcja['status'] == 0){
$tekst = "wyprawa kieruje się do miasta <i><b>".$akcja['nazwa']."</b></i>";
$opcja = " <a href='?a=sprzatanie&przerwij=".$akcja['id']."'>X</a>";
} else {
$tekst = "wyprawa powraca z miasta <i><b>".$akcja['nazwa']."</b></i>";
$opcja = "";
}
echo "
<tr align='center'>
<td>".$tekst."</td>
<td>
<span id='sp".$akcja['id']."'></span>
<script type='text/javascript'>liczCzas('sp".$akcja['id']."',".$pozostalo.");</script>
".$opcja."
</td>
</tr>";
}
echo "</table>";
}
?>
|
package net.tmachq.Ported_Blocks.tileentities.renderers;
import java.io.DataInputStream;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.<API key>;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
import net.tmachq.Ported_Blocks.models.SailModel;
public class <API key> extends <API key> {
private final SailModel model;
public <API key>() {
this.model = new SailModel();
}
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) {
int rotation = 180;
switch (te.getBlockMetadata() % 4) {
case 0:
rotation = 0;
break;
case 3:
rotation = 90;
break;
case 2:
rotation = 180;
break;
case 1:
rotation = 270;
break;
}
GL11.glPushMatrix();
int i = te.getBlockMetadata();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("Ported_Blocks:textures/texturemaps/Sail_HD.png"));
GL11.glScalef(1.0F, -1F, -1F);
model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
private void adjustLightFixture(World world, int i, int j, int k, Block block) {
Tessellator tess = Tessellator.instance;
float brightness = block.getBlockBrightness(world, i, j, k);
int skyLight = world.<API key>(i, j, k, 0);
int modulousModifier = skyLight % 65536;
int divModifier = skyLight / 65536;
tess.setColorOpaque_F(brightness, brightness, brightness);
OpenGlHelper.<API key>(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier);
}
}
|
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
START_ATF_NAMESPACE
enum MENUPARTS
{
MENUPartFiller0 = 0x0,
MP_MENUITEM = 0x1,
MP_MENUDROPDOWN = 0x2,
MP_MENUBARITEM = 0x3,
MP_MENUBARDROPDOWN = 0x4,
MP_CHEVRON = 0x5,
MP_SEPARATOR = 0x6,
};
END_ATF_NAMESPACE
|
// Karma configuration
// Generated on 2015-05-11 using
// generator-karma 0.8.3
module.exports = function(config) {
'use strict';
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// base path, that will be used to resolve files and exclude
basePath: '../',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'app/scripts*.js',
'test/mock*.js',
'test/spec*.js'
],
// list of files / patterns to exclude
exclude: [],
// web server port
port: 8080,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [
'PhantomJS'
],
// Which plugins to enable
plugins: [
'<API key>',
'karma-jasmine'
],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
colors: true,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,
// Uncomment the following lines if you are using grunt's server to run the tests
// proxies: {
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
});
};
|
var <API key> =
{
0: "dfrsw~",
1: "drs",
2: "dfrs~",
3: "rs",
4: "w"
};
var indexSectionNames =
{
0: "all",
1: "classes",
2: "functions",
3: "variables",
4: "pages"
};
var indexSectionLabels =
{
0: "All",
1: "Classes",
2: "Functions",
3: "Variables",
4: "Pages"
};
|
layout: post
title: 1212 TIL
excerpt: ""
tags: [TIL]
categories: [TIL]
link:
comments: true
pinned: true
image:
feature:
## Today Check List
- [ ] S3
- [ ] DB
- [ ] express
## Tomorrow Check List
## Today I learned
Spring
Controller .
* https://netframework.tistory.com/entry/25-View-%EB%8D%B0%EC%9D%B4%ED%84%B0%EC%9D%98-Controller-%EC%A0%84%EB%8B%AC-%EB%B0%A9%EB%B2%95
String JSON
* https://zzznara2.tistory.com/673
* https://blog.opid.kr/248
## Today's Algorithm
|
class DeviseCreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
## Database authenticatable
t.boolean :admin
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :<API key>
t.datetime :<API key>
## Rememberable
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string :current_sign_in_ip
t.string :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :<API key>
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
t.timestamps null: false
end
add_index :users, :email, unique: true
add_index :users, :<API key>, unique: true
# add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end
end
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Authentication extends CI_Controller {
function index(){
$value = $this->input->cookie('remember_me');
if ($value == 'true') {
$arr = array(
'user' => $this->input->cookie('user'),
'real_name' => $this->input->cookie('real_name'),
'user_id' => $this->input->cookie('user_id'),
);
$this->session->set_userdata($arr);
}
$this->load->view('login_view');
}
function create_user(){
$this->load->library('myencryption');
$arr = array('username'=>$this->myencryption->encode('admin'),
'password'=>$this->myencryption->encode('123'));
$this->db->insert('user',$arr);
}
function resetPassword(){
$this->load->library('myencryption');
$this->load->library('form_validation');
$this->form_validation->set_rules('resetmail','Reset email','valid_email');
$this->form_validation-><API key>('<div class="alert alert-warning">','</div>');
if ($this->form_validation->run() == false) {
$this->load->view('login_view');
}else{
$mail = $this->input->post('resetmail');
$this->db->where('email_address',trim(strtolower($mail)));
$result = $this->db->get('user');
if ($result->num_rows() == 1 ){
function get_random_password($chars_min=8, $chars_max=10, $use_upper_case=true, $include_numbers=true, $<API key>=false){
$length = rand($chars_min, $chars_max);
$selection = '<API key>';
if($include_numbers) {
$selection .= "1234567890";
}
if($<API key>) {
$selection .= "!@\"
}
$password = "";
for($i=0; $i<$length; $i++) {
$current_letter = $use_upper_case ? (rand(0,1) ? strtoupper($selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))];
$password .= $current_letter;
}
return $password;
}
$newpass = get_random_password();
$this->db->where('email_address',trim(strtolower($mail)));
$newpass1 = $this->myencryption->encode($newpass);
$this->db->update('user',array('password'=>$newpass1));
if ($this->db->affected_rows() == 1){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => 'thythona168@gmail.com',
'smtp_pass' => 'Broskomsot123',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email',$config);
$this->email->set_newline("\r\n");
// Set to, from, message, etc.
$this->email->from('thythona168@gmail.com', 'Rest password MSC');
$this->email->to($mail);
$this->email->subject('New Password');
$this->email->message('Your New Password is : '.$newpass);
if (! $this->email->send()) {
$arr['message'] = '<div class="alert alert-warning" style="text-align:left">Reset password failed. please try again later.</div>';
$this->load->view('login_view',$arr);
}else{
$arr['message'] = '<div class="alert alert-success" style="text-align:left">Reset password successful. Please check your email for the new password</div>';
$this->load->view('login_view',$arr);
}
}
}else{
$arr['message'] = '<div class="alert alert-warning">Given reset email dose not exist!</div>';
$this->load->view('login_view',$arr);
}
}
}
function validation(){
$this->load->library('myencryption');
$this->load->library('form_validation');
$this->form_validation->set_rules('username','Username','required');
$this->form_validation->set_rules('password','Password','required');
$this->form_validation-><API key>('<div class="alert alert-warning">','</div>');
if ($this->form_validation->run() == false ) {
$this->load->view('login_view');
}else{
$username = $this->input->post('username');
$password = $this->input->post('password');
$rememberme = $this->input->post('rememberme');
$this->db->where('username',$this->myencryption->encode($username));
$this->db->where('password',$this->myencryption->encode($password));
$result = $this->db->get('user');
if ($result->num_rows()==1) {
$value = $result->row();
if ($rememberme == 'on'){
$arr = array('user'=>TRUE,'real_name'=>$value->real_name,'user_id'=>$value->id);
$this->session->set_userdata($arr);
$cookie = array(
'name' => 'remember_me',
'value' => 'true',
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
$cookie = array(
'name' => 'user',
'value' => TRUE,
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
$cookie = array(
'name' => 'real_name',
'value' => $value->real_name,
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
$cookie = array(
'name' => 'user_id',
'value' => $value->id,
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
}else{
$arr = array('user'=>TRUE,'real_name'=>$value->real_name,'user_id'=>$value->id);
$this->session->set_userdata($arr);
$cookie = array(
'name' => 'remember_me',
'value' => 'false',
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
}
redirect('home');
}else{
$arr['message'] = '<div class="alert alert-danger" style="text-align:left">Incorrect username or password !!! </div>';
$this->load->view('login_view',$arr);
}
}
}
}
|
var pub = {},
Q,
Knex;
module.exports = function ($inject) {
$inject = $inject || {};
Q = $inject.Q;
Knex = $inject.Knex;
return pub;
};
pub.get = function(tableName) {
var q = Q.defer();
pub.getMetadata(tableName)
.then(function(relations) {
q.resolve(relations[0]);
});
return q.promise;
};
pub.getMetadata = function(tableName) {
return Knex.knex.raw('SELECT ' +
'KCU1.CONSTRAINT_NAME AS FK_CONSTRAINT_NAME, ' +
'KCU1.COLUMN_NAME AS FK_COLUMN_NAME, ' +
'KCU2.CONSTRAINT_NAME AS <API key>, ' +
'KCU2.TABLE_NAME AS <API key>, ' +
'KCU2.COLUMN_NAME AS <API key> ' +
'FROM INFORMATION_SCHEMA.<API key> AS RC ' +
'INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KCU1 ' +
'ON KCU1.CONSTRAINT_CATALOG = RC.CONSTRAINT_CATALOG ' +
'AND KCU1.CONSTRAINT_SCHEMA = RC.CONSTRAINT_SCHEMA ' +
'AND KCU1.CONSTRAINT_NAME = RC.CONSTRAINT_NAME ' +
'AND KCU1.TABLE_NAME = RC.TABLE_NAME ' +
'INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KCU2 ' +
'ON KCU2.CONSTRAINT_CATALOG = RC.<API key> ' +
'AND KCU2.CONSTRAINT_SCHEMA = RC.<API key> ' +
'AND KCU2.CONSTRAINT_NAME = RC.<API key> ' +
'AND KCU2.ORDINAL_POSITION = KCU1.ORDINAL_POSITION ' +
'AND KCU2.TABLE_NAME = RC.<API key> ' +
'WHERE kcu1.table_name = ?', tableName);
};
|
using System.Web.Mvc;
using FFLTask.SRV.ServiceInterface;
using FFLTask.UI.PC.Filter;
using FFLTask.SRV.ViewModel.Account;
using FFLTask.SRV.ViewModel.Shared;
namespace FFLTask.UI.PC.Controllers
{
public class RegisterController : BaseController
{
private IRegisterService _registerService;
public RegisterController(IRegisterService registerService)
{
_registerService = registerService;
}
#region URL: /Register
[HttpGet]
[CheckCookieEnabled]
public ActionResult Index()
{
return View(new RegisterModel());
}
[HttpPost]
public ActionResult Index(RegisterModel model)
{
if (!ModelState.IsValid)
{
return View(model);
}
model.ImageCode = imageCodeHelper.CheckResult();
if (model.ImageCode.ImageCodeError != ImageCodeError.NoError)
{
return View(model);
}
if (_registerService.GetUserByName(model.UserName) > 0)
{
ModelState.AddModelError("UserName", "*");
return View(model);
}
int userId = _registerService.Do(model);
userHelper.SetUserId(userId.ToString());
return RedirectToAction("Profile", "User");
}
#endregion
#region Ajax
public JsonResult IsUserNameExist(string name)
{
bool duplicated = _registerService.GetUserByName(name) > 0;
return Json(duplicated);
}
#endregion
}
}
|
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('name')->unique();
$table->string('empresa')->unique();
$table->string('first_name');
$table->string('last_name');
$table->string('email')->unique()->nullable();
$table->string('password', 60);
$table->integer('role_id');
$table->rememberToken()->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
|
# <API key>: true
require 'fieldhand/metadata_format'
module Fieldhand
# A parser for ListMetadataFormats responses.
class <API key>
attr_reader :response_parser
# Return a parser for the given response parser.
def initialize(response_parser)
@response_parser = response_parser
end
# Return an array of `MetadataFormat`s found in the response.
def items
response_parser.
root.
locate('ListMetadataFormats/metadataFormat').
map { |item| MetadataFormat.new(item, response_parser.response_date) }
end
end
end
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Botos</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{
color: #28fe14;
background-color: black;
font-family: "Courier New";
font-size: 15pt;
cursor: default
}
</style>
<script type="text/javascript">
document.ondragstart = function(){return false;}
document.oncontextmenu = function(){return false;}
document.onselectstart = function(){return false;}
</script>
</head>
<body>
|
namespace System.Resources
{
// Intentionally excluding visibility so it defaults to internal except for
// the one public version in System.Resources.ResourceManager which defines
// another version of this partial class with the public visibility
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
sealed partial class <API key> : Attribute
{
private readonly string _culture;
public <API key>(string cultureName)
{
if (cultureName == null)
throw new <API key>("cultureName");
_culture = cultureName;
}
public string CultureName
{
get { return _culture; }
}
}
}
|
namespace CodeGraphModel
{
using System.Collections.Generic;
using System.Runtime.Serialization;
[DataContract]
public class Symbol : Entity
{
[DataMember]
public string Name { get; set; }
[DataMember]
public string SymbolType { get; set; }
[DataMember]
public bool IsExternal { get; set; }
[DataMember]
public int LineStart { get; set; }
[DataMember]
public int LineEnd { get; set; }
[DataMember]
public int ColumnStart { get; set; }
[DataMember]
public int ColumnEnd { get; set; }
[DataMember]
public string FileUId { get; set; }
[DataMember]
public List<SymbolReference> References { get; set; }
public override string ToString()
{
return string.Format("[Name: {0}, Type: {1}, UId: {2}]", Name, Type, UId);
}
public override bool IsValid()
{
return this.Type == EntityType.Symbol;
}
}
public class SymbolResponse
{
[DataMember]
public string uid;
[DataMember]
public string name;
[DataMember]
public string type;
[DataMember]
public string fileUid;
[DataMember]
public int lineStart;
[DataMember]
public int lineEnd;
[DataMember]
public int columnStart;
[DataMember]
public int columnEnd;
}
}
|
// Compiled by ClojureScript 1.7.170 {}
goog.provide('figwheel.client.file_reloading');
goog.require('cljs.core');
goog.require('goog.string');
goog.require('goog.Uri');
goog.require('goog.net.jsloader');
goog.require('cljs.core.async');
goog.require('goog.object');
goog.require('clojure.set');
goog.require('clojure.string');
goog.require('figwheel.client.utils');
figwheel.client.file_reloading.queued_file_reload;
if(typeof figwheel.client.file_reloading.<API key> !== 'undefined'){
} else {
figwheel.client.file_reloading.<API key> = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
}
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(url){
return figwheel.client.utils.<API key>.call(null,"figwheel.js-reload",url);
});
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(files){
return figwheel.client.utils.<API key>.call(null,"figwheel.before-js-reload",files);
});
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(m){
var or__16826__auto__ = (cljs.core.map_QMARK_.call(null,m)) && (typeof new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(m) === 'string') && (((new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(m) == null)) || (typeof new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(m) === 'string')) && (cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(m),new cljs.core.Keyword(null,"namespace","namespace",-377510372)));
if(or__16826__auto__){
return or__16826__auto__;
} else {
cljs.core.println.call(null,"Error not namespace-file-map",cljs.core.pr_str.call(null,m));
return false;
}
});
figwheel.client.file_reloading.add_cache_buster = (function figwheel$client$file_reloading$add_cache_buster(url){
return goog.Uri.parse(url).makeUnique();
});
figwheel.client.file_reloading.name__GT_path = (function figwheel$client$file_reloading$name__GT_path(ns){
return (goog.dependencies_.nameToPath[ns]);
});
figwheel.client.file_reloading.provided_QMARK_ = (function figwheel$client$file_reloading$provided_QMARK_(ns){
return (goog.dependencies_.written[figwheel.client.file_reloading.name__GT_path.call(null,ns)]);
});
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(url){
if(cljs.core.truth_(goog.string.startsWith(url,"../"))){
return clojure.string.replace.call(null,url,"../","");
} else {
return [cljs.core.str("goog/"),cljs.core.str(url)].join('');
}
});
figwheel.client.file_reloading.immutable_ns_QMARK_ = (function figwheel$client$file_reloading$immutable_ns_QMARK_(name){
var or__16826__auto__ = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 9, ["svgpan.SvgPan",null,"far.out",null,"testDep.bar",null,"someprotopackage.TestPackageTypes",null,"goog",null,"an.existing.path",null,"cljs.core",null,"ns",null,"dup.base",null], null), null).call(null,name);
if(cljs.core.truth_(or__16826__auto__)){
return or__16826__auto__;
} else {
return cljs.core.some.call(null,cljs.core.partial.call(null,goog.string.startsWith,name),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, ["goog.","cljs.","clojure.","fake.","proto2."], null));
}
});
figwheel.client.file_reloading.get_requires = (function figwheel$client$file_reloading$get_requires(ns){
return cljs.core.set.call(null,cljs.core.filter.call(null,(function (p1__23844_SHARP_){
return cljs.core.not.call(null,figwheel.client.file_reloading.immutable_ns_QMARK_.call(null,p1__23844_SHARP_));
}),goog.object.getKeys((goog.dependencies_.requires[figwheel.client.file_reloading.name__GT_path.call(null,ns)]))));
});
if(typeof figwheel.client.file_reloading.dependency_data !== 'undefined'){
} else {
figwheel.client.file_reloading.dependency_data = cljs.core.atom.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"dependents","dependents",136812837),cljs.core.PersistentArrayMap.EMPTY], null));
}
figwheel.client.file_reloading.path_to_name_BANG_ = (function figwheel$client$file_reloading$path_to_name_BANG_(path,name){
return cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependency_data,cljs.core.update_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),path], null),cljs.core.fnil.call(null,clojure.set.union,cljs.core.PersistentHashSet.EMPTY),cljs.core.PersistentHashSet.fromArray([name], true));
});
/**
* Setup a path to name dependencies map.
* That goes from path -> #{ ns-names }
*/
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(){
var nameToPath = goog.object.filter(goog.dependencies_.nameToPath,(function (v,k,o){
return goog.string.startsWith(v,"../");
}));
return goog.object.forEach(nameToPath,((function (nameToPath){
return (function (v,k,o){
return figwheel.client.file_reloading.path_to_name_BANG_.call(null,v,k);
});})(nameToPath))
);
});
/**
* returns a set of namespaces defined by a path
*/
figwheel.client.file_reloading.path__GT_name = (function figwheel$client$file_reloading$path__GT_name(path){
return cljs.core.get_in.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.dependency_data),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),path], null));
});
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(ns,parent_ns){
return cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependency_data,cljs.core.update_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dependents","dependents",136812837),ns], null),cljs.core.fnil.call(null,clojure.set.union,cljs.core.PersistentHashSet.EMPTY),cljs.core.PersistentHashSet.fromArray([parent_ns], true));
});
/**
* This reverses the goog.dependencies_.requires for looking up ns-dependents.
*/
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(){
var requires = goog.object.filter(goog.dependencies_.requires,(function (v,k,o){
return goog.string.startsWith(k,"../");
}));
return goog.object.forEach(requires,((function (requires){
return (function (v,k,_){
return goog.object.forEach(v,((function (requires){
return (function (v_SINGLEQUOTE_,k_SINGLEQUOTE_,___$1){
var seq__23849 = cljs.core.seq.call(null,figwheel.client.file_reloading.path__GT_name.call(null,k));
var chunk__23850 = null;
var count__23851 = (0);
var i__23852 = (0);
while(true){
if((i__23852 < count__23851)){
var n = cljs.core._nth.call(null,chunk__23850,i__23852);
figwheel.client.file_reloading.<API key>.call(null,k_SINGLEQUOTE_,n);
var G__23853 = seq__23849;
var G__23854 = chunk__23850;
var G__23855 = count__23851;
var G__23856 = (i__23852 + (1));
seq__23849 = G__23853;
chunk__23850 = G__23854;
count__23851 = G__23855;
i__23852 = G__23856;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq.call(null,seq__23849);
if(temp__4425__auto__){
var seq__23849__$1 = temp__4425__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23849__$1)){
var c__17629__auto__ = cljs.core.chunk_first.call(null,seq__23849__$1);
var G__23857 = cljs.core.chunk_rest.call(null,seq__23849__$1);
var G__23858 = c__17629__auto__;
var G__23859 = cljs.core.count.call(null,c__17629__auto__);
var G__23860 = (0);
seq__23849 = G__23857;
chunk__23850 = G__23858;
count__23851 = G__23859;
i__23852 = G__23860;
continue;
} else {
var n = cljs.core.first.call(null,seq__23849__$1);
figwheel.client.file_reloading.<API key>.call(null,k_SINGLEQUOTE_,n);
var G__23861 = cljs.core.next.call(null,seq__23849__$1);
var G__23862 = null;
var G__23863 = (0);
var G__23864 = (0);
seq__23849 = G__23861;
chunk__23850 = G__23862;
count__23851 = G__23863;
i__23852 = G__23864;
continue;
}
} else {
return null;
}
}
break;
}
});})(requires))
);
});})(requires))
);
});
figwheel.client.file_reloading.ns__GT_dependents = (function figwheel$client$file_reloading$ns__GT_dependents(ns){
return cljs.core.get_in.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.dependency_data),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dependents","dependents",136812837),ns], null));
});
figwheel.client.file_reloading.build_topo_sort = (function figwheel$client$file_reloading$build_topo_sort(get_deps){
var get_deps__$1 = cljs.core.memoize.call(null,get_deps);
var <API key> = ((function (get_deps__$1){
return (function figwheel$client$file_reloading$build_topo_sort_$<API key>(x,depth,state){
var deps = get_deps__$1.call(null,x);
if(cljs.core.empty_QMARK_.call(null,deps)){
return null;
} else {
return topo_sort_STAR_.call(null,deps,depth,state);
}
});})(get_deps__$1))
;
var topo_sort_STAR_ = ((function (get_deps__$1){
return (function() {
var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_ = null;
var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1 = (function (deps){
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.call(null,deps,(0),cljs.core.atom.call(null,cljs.core.sorted_map.call(null)));
});
var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3 = (function (deps,depth,state){
cljs.core.swap_BANG_.call(null,state,cljs.core.update_in,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [depth], null),cljs.core.fnil.call(null,cljs.core.into,cljs.core.PersistentHashSet.EMPTY),deps);
var seq__23903_23910 = cljs.core.seq.call(null,deps);
var chunk__23904_23911 = null;
var count__23905_23912 = (0);
var i__23906_23913 = (0);
while(true){
if((i__23906_23913 < count__23905_23912)){
var dep_23914 = cljs.core._nth.call(null,chunk__23904_23911,i__23906_23913);
<API key>.call(null,dep_23914,(depth + (1)),state);
var G__23915 = seq__23903_23910;
var G__23916 = chunk__23904_23911;
var G__23917 = count__23905_23912;
var G__23918 = (i__23906_23913 + (1));
seq__23903_23910 = G__23915;
chunk__23904_23911 = G__23916;
count__23905_23912 = G__23917;
i__23906_23913 = G__23918;
continue;
} else {
var <API key> = cljs.core.seq.call(null,seq__23903_23910);
if(<API key>){
var seq__23903_23920__$1 = <API key>;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23903_23920__$1)){
var <API key> = cljs.core.chunk_first.call(null,seq__23903_23920__$1);
var G__23922 = cljs.core.chunk_rest.call(null,seq__23903_23920__$1);
var G__23923 = <API key>;
var G__23924 = cljs.core.count.call(null,<API key>);
var G__23925 = (0);
seq__23903_23910 = G__23922;
chunk__23904_23911 = G__23923;
count__23905_23912 = G__23924;
i__23906_23913 = G__23925;
continue;
} else {
var dep_23926 = cljs.core.first.call(null,seq__23903_23920__$1);
<API key>.call(null,dep_23926,(depth + (1)),state);
var G__23927 = cljs.core.next.call(null,seq__23903_23920__$1);
var G__23928 = null;
var G__23929 = (0);
var G__23930 = (0);
seq__23903_23910 = G__23927;
chunk__23904_23911 = G__23928;
count__23905_23912 = G__23929;
i__23906_23913 = G__23930;
continue;
}
} else {
}
}
break;
}
if(cljs.core._EQ_.call(null,depth,(0))){
return elim_dups_STAR_.call(null,cljs.core.reverse.call(null,cljs.core.vals.call(null,cljs.core.deref.call(null,state))));
} else {
return null;
}
});
figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_ = function(deps,depth,state){
switch(arguments.length){
case 1:
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1.call(this,deps);
case 3:
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3.call(this,deps,depth,state);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1;
figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.cljs$core$IFn$_invoke$arity$3 = figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3;
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_;
})()
;})(get_deps__$1))
;
var elim_dups_STAR_ = ((function (get_deps__$1){
return (function figwheel$client$file_reloading$build_topo_sort_$_elim_dups_STAR_(p__23907){
var vec__23909 = p__23907;
var x = cljs.core.nth.call(null,vec__23909,(0),null);
var xs = cljs.core.nthnext.call(null,vec__23909,(1));
if((x == null)){
return cljs.core.List.EMPTY;
} else {
return cljs.core.cons.call(null,x,figwheel$client$file_reloading$build_topo_sort_$_elim_dups_STAR_.call(null,cljs.core.map.call(null,((function (vec__23909,x,xs,get_deps__$1){
return (function (p1__23865_SHARP_){
return clojure.set.difference.call(null,p1__23865_SHARP_,x);
});})(vec__23909,x,xs,get_deps__$1))
,xs)));
}
});})(get_deps__$1))
;
return topo_sort_STAR_;
});
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(ns){
var <API key> = figwheel.client.file_reloading.build_topo_sort.call(null,figwheel.client.file_reloading.get_requires);
return cljs.core.apply.call(null,cljs.core.concat,<API key>.call(null,cljs.core.set.call(null,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [ns], null))));
});
figwheel.client.file_reloading.get_all_dependents = (function figwheel$client$file_reloading$get_all_dependents(nss){
var <API key> = figwheel.client.file_reloading.build_topo_sort.call(null,figwheel.client.file_reloading.ns__GT_dependents);
return cljs.core.reverse.call(null,cljs.core.apply.call(null,cljs.core.concat,<API key>.call(null,cljs.core.set.call(null,nss))));
});
figwheel.client.file_reloading.unprovide_BANG_ = (function figwheel$client$file_reloading$unprovide_BANG_(ns){
var path = figwheel.client.file_reloading.name__GT_path.call(null,ns);
goog.object.remove(goog.dependencies_.visited,path);
goog.object.remove(goog.dependencies_.written,path);
return goog.object.remove(goog.dependencies_.written,[cljs.core.str(goog.basePath),cljs.core.str(path)].join(''));
});
figwheel.client.file_reloading.resolve_ns = (function figwheel$client$file_reloading$resolve_ns(ns){
return [cljs.core.str(goog.basePath),cljs.core.str(figwheel.client.file_reloading.name__GT_path.call(null,ns))].join('');
});
figwheel.client.file_reloading.addDependency = (function figwheel$client$file_reloading$addDependency(path,provides,requires){
var seq__23943 = cljs.core.seq.call(null,provides);
var chunk__23944 = null;
var count__23945 = (0);
var i__23946 = (0);
while(true){
if((i__23946 < count__23945)){
var prov = cljs.core._nth.call(null,chunk__23944,i__23946);
figwheel.client.file_reloading.path_to_name_BANG_.call(null,path,prov);
var seq__23947_23955 = cljs.core.seq.call(null,requires);
var chunk__23948_23956 = null;
var count__23949_23957 = (0);
var i__23950_23958 = (0);
while(true){
if((i__23950_23958 < count__23949_23957)){
var req_23959 = cljs.core._nth.call(null,chunk__23948_23956,i__23950_23958);
figwheel.client.file_reloading.<API key>.call(null,req_23959,prov);
var G__23960 = seq__23947_23955;
var G__23961 = chunk__23948_23956;
var G__23962 = count__23949_23957;
var G__23963 = (i__23950_23958 + (1));
seq__23947_23955 = G__23960;
chunk__23948_23956 = G__23961;
count__23949_23957 = G__23962;
i__23950_23958 = G__23963;
continue;
} else {
var <API key> = cljs.core.seq.call(null,seq__23947_23955);
if(<API key>){
var seq__23947_23965__$1 = <API key>;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23947_23965__$1)){
var <API key> = cljs.core.chunk_first.call(null,seq__23947_23965__$1);
var G__23967 = cljs.core.chunk_rest.call(null,seq__23947_23965__$1);
var G__23968 = <API key>;
var G__23969 = cljs.core.count.call(null,<API key>);
var G__23970 = (0);
seq__23947_23955 = G__23967;
chunk__23948_23956 = G__23968;
count__23949_23957 = G__23969;
i__23950_23958 = G__23970;
continue;
} else {
var req_23971 = cljs.core.first.call(null,seq__23947_23965__$1);
figwheel.client.file_reloading.<API key>.call(null,req_23971,prov);
var G__23972 = cljs.core.next.call(null,seq__23947_23965__$1);
var G__23973 = null;
var G__23974 = (0);
var G__23975 = (0);
seq__23947_23955 = G__23972;
chunk__23948_23956 = G__23973;
count__23949_23957 = G__23974;
i__23950_23958 = G__23975;
continue;
}
} else {
}
}
break;
}
var G__23976 = seq__23943;
var G__23977 = chunk__23944;
var G__23978 = count__23945;
var G__23979 = (i__23946 + (1));
seq__23943 = G__23976;
chunk__23944 = G__23977;
count__23945 = G__23978;
i__23946 = G__23979;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq.call(null,seq__23943);
if(temp__4425__auto__){
var seq__23943__$1 = temp__4425__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23943__$1)){
var c__17629__auto__ = cljs.core.chunk_first.call(null,seq__23943__$1);
var G__23980 = cljs.core.chunk_rest.call(null,seq__23943__$1);
var G__23981 = c__17629__auto__;
var G__23982 = cljs.core.count.call(null,c__17629__auto__);
var G__23983 = (0);
seq__23943 = G__23980;
chunk__23944 = G__23981;
count__23945 = G__23982;
i__23946 = G__23983;
continue;
} else {
var prov = cljs.core.first.call(null,seq__23943__$1);
figwheel.client.file_reloading.path_to_name_BANG_.call(null,path,prov);
var seq__23951_23984 = cljs.core.seq.call(null,requires);
var chunk__23952_23985 = null;
var count__23953_23986 = (0);
var i__23954_23987 = (0);
while(true){
if((i__23954_23987 < count__23953_23986)){
var req_23988 = cljs.core._nth.call(null,chunk__23952_23985,i__23954_23987);
figwheel.client.file_reloading.<API key>.call(null,req_23988,prov);
var G__23989 = seq__23951_23984;
var G__23990 = chunk__23952_23985;
var G__23991 = count__23953_23986;
var G__23992 = (i__23954_23987 + (1));
seq__23951_23984 = G__23989;
chunk__23952_23985 = G__23990;
count__23953_23986 = G__23991;
i__23954_23987 = G__23992;
continue;
} else {
var <API key>$1 = cljs.core.seq.call(null,seq__23951_23984);
if(<API key>$1){
var seq__23951_23994__$1 = <API key>$1;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23951_23994__$1)){
var <API key> = cljs.core.chunk_first.call(null,seq__23951_23994__$1);
var G__23996 = cljs.core.chunk_rest.call(null,seq__23951_23994__$1);
var G__23997 = <API key>;
var G__23998 = cljs.core.count.call(null,<API key>);
var G__23999 = (0);
seq__23951_23984 = G__23996;
chunk__23952_23985 = G__23997;
count__23953_23986 = G__23998;
i__23954_23987 = G__23999;
continue;
} else {
var req_24000 = cljs.core.first.call(null,seq__23951_23994__$1);
figwheel.client.file_reloading.<API key>.call(null,req_24000,prov);
var G__24001 = cljs.core.next.call(null,seq__23951_23994__$1);
var G__24002 = null;
var G__24003 = (0);
var G__24004 = (0);
seq__23951_23984 = G__24001;
chunk__23952_23985 = G__24002;
count__23953_23986 = G__24003;
i__23954_23987 = G__24004;
continue;
}
} else {
}
}
break;
}
var G__24005 = cljs.core.next.call(null,seq__23943__$1);
var G__24006 = null;
var G__24007 = (0);
var G__24008 = (0);
seq__23943 = G__24005;
chunk__23944 = G__24006;
count__23945 = G__24007;
i__23946 = G__24008;
continue;
}
} else {
return null;
}
}
break;
}
});
figwheel.client.file_reloading.figwheel_require = (function figwheel$client$file_reloading$figwheel_require(src,reload){
goog.require = figwheel$client$file_reloading$figwheel_require;
if(cljs.core._EQ_.call(null,reload,"reload-all")){
var seq__24013_24017 = cljs.core.seq.call(null,figwheel.client.file_reloading.<API key>.call(null,src));
var chunk__24014_24018 = null;
var count__24015_24019 = (0);
var i__24016_24020 = (0);
while(true){
if((i__24016_24020 < count__24015_24019)){
var ns_24021 = cljs.core._nth.call(null,chunk__24014_24018,i__24016_24020);
figwheel.client.file_reloading.unprovide_BANG_.call(null,ns_24021);
var G__24022 = seq__24013_24017;
var G__24023 = chunk__24014_24018;
var G__24024 = count__24015_24019;
var G__24025 = (i__24016_24020 + (1));
seq__24013_24017 = G__24022;
chunk__24014_24018 = G__24023;
count__24015_24019 = G__24024;
i__24016_24020 = G__24025;
continue;
} else {
var <API key> = cljs.core.seq.call(null,seq__24013_24017);
if(<API key>){
var seq__24013_24027__$1 = <API key>;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__24013_24027__$1)){
var <API key> = cljs.core.chunk_first.call(null,seq__24013_24027__$1);
var G__24029 = cljs.core.chunk_rest.call(null,seq__24013_24027__$1);
var G__24030 = <API key>;
var G__24031 = cljs.core.count.call(null,<API key>);
var G__24032 = (0);
seq__24013_24017 = G__24029;
chunk__24014_24018 = G__24030;
count__24015_24019 = G__24031;
i__24016_24020 = G__24032;
continue;
} else {
var ns_24033 = cljs.core.first.call(null,seq__24013_24027__$1);
figwheel.client.file_reloading.unprovide_BANG_.call(null,ns_24033);
var G__24034 = cljs.core.next.call(null,seq__24013_24027__$1);
var G__24035 = null;
var G__24036 = (0);
var G__24037 = (0);
seq__24013_24017 = G__24034;
chunk__24014_24018 = G__24035;
count__24015_24019 = G__24036;
i__24016_24020 = G__24037;
continue;
}
} else {
}
}
break;
}
} else {
}
if(cljs.core.truth_(reload)){
figwheel.client.file_reloading.unprovide_BANG_.call(null,src);
} else {
}
return goog.<API key>(src);
});
/**
* Reusable browser REPL bootstrapping. Patches the essential functions
* in goog.base to support re-loading of namespaces after page load.
*/
figwheel.client.file_reloading.bootstrap_goog_base = (function figwheel$client$file_reloading$bootstrap_goog_base(){
if(cljs.core.truth_(COMPILED)){
return null;
} else {
goog.<API key> = (function (){var or__16826__auto__ = goog.require__;
if(cljs.core.truth_(or__16826__auto__)){
return or__16826__auto__;
} else {
return goog.require;
}
})();
goog.isProvided_ = (function (name){
return false;
});
figwheel.client.file_reloading.<API key>.call(null);
figwheel.client.file_reloading.<API key>.call(null);
goog.<API key> = goog.addDependency;
goog.addDependency = (function() {
var G__24038__delegate = function (args){
cljs.core.apply.call(null,figwheel.client.file_reloading.addDependency,args);
return cljs.core.apply.call(null,goog.<API key>,args);
};
var G__24038 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__24039__i = 0, G__24039__a = new Array(arguments.length - 0);
while (G__24039__i < G__24039__a.length) {G__24039__a[G__24039__i] = arguments[G__24039__i + 0]; ++G__24039__i;}
args = new cljs.core.IndexedSeq(G__24039__a,0);
}
return G__24038__delegate.call(this,args);};
G__24038.cljs$lang$maxFixedArity = 0;
G__24038.cljs$lang$applyTo = (function (arglist__24040){
var args = cljs.core.seq(arglist__24040);
return G__24038__delegate(args);
});
G__24038.cljs$core$IFn$_invoke$arity$variadic = G__24038__delegate;
return G__24038;
})()
;
goog.constructNamespace_("cljs.user");
goog.global.<API key> = figwheel.client.file_reloading.queued_file_reload;
return goog.require = figwheel.client.file_reloading.figwheel_require;
}
});
figwheel.client.file_reloading.patch_goog_base = (function figwheel$client$file_reloading$patch_goog_base(){
if(typeof figwheel.client.file_reloading.bootstrapped_cljs !== 'undefined'){
return null;
} else {
figwheel.client.file_reloading.bootstrapped_cljs = (function (){
figwheel.client.file_reloading.bootstrap_goog_base.call(null);
return true;
})()
;
}
});
figwheel.client.file_reloading.reload_file_STAR_ = (function (){var pred__24042 = cljs.core._EQ_;
var expr__24043 = figwheel.client.utils.host_env_QMARK_.call(null);
if(cljs.core.truth_(pred__24042.call(null,new cljs.core.Keyword(null,"node","node",581201198),expr__24043))){
var path_parts = ((function (pred__24042,expr__24043){
return (function (p1__24041_SHARP_){
return clojure.string.split.call(null,p1__24041_SHARP_,/[\/\\]/);
});})(pred__24042,expr__24043))
;
var sep = (cljs.core.truth_(cljs.core.re_matches.call(null,/win.*/,process.platform))?"\\":"/");
var root = clojure.string.join.call(null,sep,cljs.core.pop.call(null,cljs.core.pop.call(null,path_parts.call(null,__dirname))));
return ((function (path_parts,sep,root,pred__24042,expr__24043){
return (function (request_url,callback){
var cache_path = clojure.string.join.call(null,sep,cljs.core.cons.call(null,root,path_parts.call(null,figwheel.client.file_reloading.<API key>.call(null,request_url))));
(require.cache[cache_path] = null);
return callback.call(null,(function (){try{return require(cache_path);
}catch (e24045){if((e24045 instanceof Error)){
var e = e24045;
figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Figwheel: Error loading file "),cljs.core.str(cache_path)].join(''));
figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),e.stack);
return false;
} else {
throw e24045;
}
}})());
});
;})(path_parts,sep,root,pred__24042,expr__24043))
} else {
if(cljs.core.truth_(pred__24042.call(null,new cljs.core.Keyword(null,"html","html",-998796897),expr__24043))){
return ((function (pred__24042,expr__24043){
return (function (request_url,callback){
var deferred = goog.net.jsloader.load(figwheel.client.file_reloading.add_cache_buster.call(null,request_url),{"cleanupWhenDone": true});
deferred.addCallback(((function (deferred,pred__24042,expr__24043){
return (function (){
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [true], null));
});})(deferred,pred__24042,expr__24043))
);
return deferred.addErrback(((function (deferred,pred__24042,expr__24043){
return (function (){
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [false], null));
});})(deferred,pred__24042,expr__24043))
);
});
;})(pred__24042,expr__24043))
} else {
return ((function (pred__24042,expr__24043){
return (function (a,b){
throw "Reload not defined for this platform";
});
;})(pred__24042,expr__24043))
}
}
})();
figwheel.client.file_reloading.reload_file = (function figwheel$client$file_reloading$reload_file(p__24046,callback){
var map__24049 = p__24046;
var map__24049__$1 = ((((!((map__24049 == null)))?((((map__24049.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24049.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24049):map__24049);
var file_msg = map__24049__$1;
var request_url = cljs.core.get.call(null,map__24049__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596));
figwheel.client.utils.debug_prn.call(null,[cljs.core.str("FigWheel: Attempting to load "),cljs.core.str(request_url)].join(''));
return figwheel.client.file_reloading.reload_file_STAR_.call(null,request_url,((function (map__24049,map__24049__$1,file_msg,request_url){
return (function (success_QMARK_){
if(cljs.core.truth_(success_QMARK_)){
figwheel.client.utils.debug_prn.call(null,[cljs.core.str("FigWheel: Successfully loaded "),cljs.core.str(request_url)].join(''));
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.assoc.call(null,file_msg,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),true)], null));
} else {
figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Figwheel: Error loading file "),cljs.core.str(request_url)].join(''));
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [file_msg], null));
}
});})(map__24049,map__24049__$1,file_msg,request_url))
);
});
if(typeof figwheel.client.file_reloading.reload_chan !== 'undefined'){
} else {
figwheel.client.file_reloading.reload_chan = cljs.core.async.chan.call(null);
}
if(typeof figwheel.client.file_reloading.on_load_callbacks !== 'undefined'){
} else {
figwheel.client.file_reloading.on_load_callbacks = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
}
if(typeof figwheel.client.file_reloading.dependencies_loaded !== 'undefined'){
} else {
figwheel.client.file_reloading.dependencies_loaded = cljs.core.atom.call(null,cljs.core.PersistentVector.EMPTY);
}
figwheel.client.file_reloading.blocking_load = (function figwheel$client$file_reloading$blocking_load(url){
var out = cljs.core.async.chan.call(null);
figwheel.client.file_reloading.reload_file.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"request-url","request-url",2100346596),url], null),((function (out){
return (function (file_msg){
cljs.core.async.put_BANG_.call(null,out,file_msg);
return cljs.core.async.close_BANG_.call(null,out);
});})(out))
);
return out;
});
if(typeof figwheel.client.file_reloading.reloader_loop !== 'undefined'){
} else {
figwheel.client.file_reloading.reloader_loop = (function (){var c__20950__auto__ = cljs.core.async.chan.call(null,(1));
cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto__){
return (function (){
var f__20951__auto__ = (function (){var <API key> = ((function (c__20950__auto__){
return (function (state_24073){
var state_val_24074 = (state_24073[(1)]);
if((state_val_24074 === (7))){
var inst_24069 = (state_24073[(2)]);
var state_24073__$1 = state_24073;
var <API key> = state_24073__$1;
(<API key>[(2)] = inst_24069);
(<API key>[(1)] = (3));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (1))){
var state_24073__$1 = state_24073;
var <API key> = state_24073__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (4))){
var inst_24053 = (state_24073[(7)]);
var inst_24053__$1 = (state_24073[(2)]);
var state_24073__$1 = (function (){var statearr_24077 = state_24073;
(statearr_24077[(7)] = inst_24053__$1);
return statearr_24077;
})();
if(cljs.core.truth_(inst_24053__$1)){
var <API key> = state_24073__$1;
(<API key>[(1)] = (5));
} else {
var <API key> = state_24073__$1;
(<API key>[(1)] = (6));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (6))){
var state_24073__$1 = state_24073;
var <API key> = state_24073__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (7));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (3))){
var inst_24071 = (state_24073[(2)]);
var state_24073__$1 = state_24073;
return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24073__$1,inst_24071);
} else {
if((state_val_24074 === (2))){
var state_24073__$1 = state_24073;
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24073__$1,(4),figwheel.client.file_reloading.reload_chan);
} else {
if((state_val_24074 === (11))){
var inst_24065 = (state_24073[(2)]);
var state_24073__$1 = (function (){var statearr_24081 = state_24073;
(statearr_24081[(8)] = inst_24065);
return statearr_24081;
})();
var <API key> = state_24073__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (9))){
var inst_24057 = (state_24073[(9)]);
var inst_24059 = (state_24073[(10)]);
var inst_24061 = inst_24059.call(null,inst_24057);
var state_24073__$1 = state_24073;
var <API key> = state_24073__$1;
(<API key>[(2)] = inst_24061);
(<API key>[(1)] = (11));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (5))){
var inst_24053 = (state_24073[(7)]);
var inst_24055 = figwheel.client.file_reloading.blocking_load.call(null,inst_24053);
var state_24073__$1 = state_24073;
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24073__$1,(8),inst_24055);
} else {
if((state_val_24074 === (10))){
var inst_24057 = (state_24073[(9)]);
var inst_24063 = cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependencies_loaded,cljs.core.conj,inst_24057);
var state_24073__$1 = state_24073;
var <API key> = state_24073__$1;
(<API key>[(2)] = inst_24063);
(<API key>[(1)] = (11));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (8))){
var inst_24059 = (state_24073[(10)]);
var inst_24053 = (state_24073[(7)]);
var inst_24057 = (state_24073[(2)]);
var inst_24058 = cljs.core.deref.call(null,figwheel.client.file_reloading.on_load_callbacks);
var inst_24059__$1 = cljs.core.get.call(null,inst_24058,inst_24053);
var state_24073__$1 = (function (){var statearr_24085 = state_24073;
(statearr_24085[(9)] = inst_24057);
(statearr_24085[(10)] = inst_24059__$1);
return statearr_24085;
})();
if(cljs.core.truth_(inst_24059__$1)){
var <API key> = state_24073__$1;
(<API key>[(1)] = (9));
} else {
var <API key> = state_24073__$1;
(<API key>[(1)] = (10));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
}
}
}
}
}
}
}
}
}
}
});})(c__20950__auto__))
;
return ((function (<API key>,c__20950__auto__){
return (function() {
var figwheel$client$file_reloading$<API key> = null;
var figwheel$client$file_reloading$<API key> = (function (){
var statearr_24091 = [null,null,null,null,null,null,null,null,null,null,null];
(statearr_24091[(0)] = figwheel$client$file_reloading$<API key>);
(statearr_24091[(1)] = (1));
return statearr_24091;
});
var figwheel$client$file_reloading$<API key> = (function (state_24073){
while(true){
var <API key> = (function (){try{while(true){
var <API key> = <API key>.call(null,state_24073);
if(cljs.core.<API key>.call(null,<API key>,new cljs.core.Keyword(null,"recur","recur",-437573268))){
continue;
} else {
return <API key>;
}
break;
}
}catch (e24092){if((e24092 instanceof Object)){
var ex__20842__auto__ = e24092;
var <API key> = state_24073;
(<API key>[(5)] = ex__20842__auto__);
cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24073);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
throw e24092;
}
}})();
if(cljs.core.<API key>.call(null,<API key>,new cljs.core.Keyword(null,"recur","recur",-437573268))){
var G__24106 = state_24073;
state_24073 = G__24106;
continue;
} else {
return <API key>;
}
break;
}
});
figwheel$client$file_reloading$<API key> = function(state_24073){
switch(arguments.length){
case 0:
return figwheel$client$file_reloading$<API key>.call(this);
case 1:
return figwheel$client$file_reloading$<API key>.call(this,state_24073);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$<API key>.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$<API key>;
figwheel$client$file_reloading$<API key>.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$<API key>;
return figwheel$client$file_reloading$<API key>;
})()
;})(<API key>,c__20950__auto__))
})();
var <API key> = (function (){var statearr_24094 = f__20951__auto__.call(null);
(statearr_24094[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto__);
return statearr_24094;
})();
return cljs.core.async.impl.ioc_helpers.<API key>.call(null,<API key>);
});})(c__20950__auto__))
);
return c__20950__auto__;
})();
}
figwheel.client.file_reloading.queued_file_reload = (function figwheel$client$file_reloading$queued_file_reload(url){
return cljs.core.async.put_BANG_.call(null,figwheel.client.file_reloading.reload_chan,url);
});
figwheel.client.file_reloading.<API key> = (function figwheel$client$file_reloading$<API key>(p__24107,callback){
var map__24110 = p__24107;
var map__24110__$1 = ((((!((map__24110 == null)))?((((map__24110.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24110.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24110):map__24110);
var file_msg = map__24110__$1;
var namespace = cljs.core.get.call(null,map__24110__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var request_url = figwheel.client.file_reloading.resolve_ns.call(null,namespace);
cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.on_load_callbacks,cljs.core.assoc,request_url,((function (request_url,map__24110,map__24110__$1,file_msg,namespace){
return (function (<API key>){
cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.on_load_callbacks,cljs.core.dissoc,request_url);
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.merge.call(null,file_msg,cljs.core.select_keys.call(null,<API key>,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375)], null)))], null));
});})(request_url,map__24110,map__24110__$1,file_msg,namespace))
);
return figwheel.client.file_reloading.figwheel_require.call(null,cljs.core.name.call(null,namespace),true);
});
figwheel.client.file_reloading.reload_file_QMARK_ = (function figwheel$client$file_reloading$reload_file_QMARK_(p__24112){
var map__24115 = p__24112;
var map__24115__$1 = ((((!((map__24115 == null)))?((((map__24115.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24115.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24115):map__24115);
var file_msg = map__24115__$1;
var namespace = cljs.core.get.call(null,map__24115__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var meta_pragmas = cljs.core.get.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.<API key>),cljs.core.name.call(null,namespace));
var and__16814__auto__ = cljs.core.not.call(null,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179).cljs$core$IFn$_invoke$arity$1(meta_pragmas));
if(and__16814__auto__){
var or__16826__auto__ = new cljs.core.Keyword(null,"figwheel-always","figwheel-always",799819691).cljs$core$IFn$_invoke$arity$1(meta_pragmas);
if(cljs.core.truth_(or__16826__auto__)){
return or__16826__auto__;
} else {
var or__16826__auto____$1 = new cljs.core.Keyword(null,"figwheel-load","figwheel-load",1316089175).cljs$core$IFn$_invoke$arity$1(meta_pragmas);
if(cljs.core.truth_(or__16826__auto____$1)){
return or__16826__auto____$1;
} else {
return figwheel.client.file_reloading.provided_QMARK_.call(null,cljs.core.name.call(null,namespace));
}
}
} else {
return and__16814__auto__;
}
});
figwheel.client.file_reloading.js_reload = (function figwheel$client$file_reloading$js_reload(p__24117,callback){
var map__24120 = p__24117;
var map__24120__$1 = ((((!((map__24120 == null)))?((((map__24120.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24120.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24120):map__24120);
var file_msg = map__24120__$1;
var request_url = cljs.core.get.call(null,map__24120__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596));
var namespace = cljs.core.get.call(null,map__24120__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
if(cljs.core.truth_(figwheel.client.file_reloading.reload_file_QMARK_.call(null,file_msg))){
return figwheel.client.file_reloading.<API key>.call(null,file_msg,callback);
} else {
figwheel.client.utils.debug_prn.call(null,[cljs.core.str("Figwheel: Not trying to load file "),cljs.core.str(request_url)].join(''));
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [file_msg], null));
}
});
figwheel.client.file_reloading.reload_js_file = (function figwheel$client$file_reloading$reload_js_file(file_msg){
var out = cljs.core.async.chan.call(null);
figwheel.client.file_reloading.js_reload.call(null,file_msg,((function (out){
return (function (url){
cljs.core.async.put_BANG_.call(null,out,url);
return cljs.core.async.close_BANG_.call(null,out);
});})(out))
);
return out;
});
/**
* Returns a chanel with one collection of loaded filenames on it.
*/
figwheel.client.file_reloading.load_all_js_files = (function figwheel$client$file_reloading$load_all_js_files(files){
var out = cljs.core.async.chan.call(null);
var <API key> = cljs.core.async.chan.call(null,(1));
cljs.core.async.impl.dispatch.run.call(null,((function (<API key>,out){
return (function (){
var f__20951__auto__ = (function (){var <API key> = ((function (<API key>,out){
return (function (state_24190){
var state_val_24191 = (state_24190[(1)]);
if((state_val_24191 === (1))){
var inst_24168 = cljs.core.nth.call(null,files,(0),null);
var inst_24169 = cljs.core.nthnext.call(null,files,(1));
var inst_24170 = files;
var state_24190__$1 = (function (){var statearr_24192 = state_24190;
(statearr_24192[(7)] = inst_24168);
(statearr_24192[(8)] = inst_24169);
(statearr_24192[(9)] = inst_24170);
return statearr_24192;
})();
var <API key> = state_24190__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (2))){
var inst_24173 = (state_24190[(10)]);
var inst_24170 = (state_24190[(9)]);
var inst_24173__$1 = cljs.core.nth.call(null,inst_24170,(0),null);
var inst_24174 = cljs.core.nthnext.call(null,inst_24170,(1));
var inst_24175 = (inst_24173__$1 == null);
var inst_24176 = cljs.core.not.call(null,inst_24175);
var state_24190__$1 = (function (){var statearr_24194 = state_24190;
(statearr_24194[(11)] = inst_24174);
(statearr_24194[(10)] = inst_24173__$1);
return statearr_24194;
})();
if(inst_24176){
var <API key> = state_24190__$1;
(<API key>[(1)] = (4));
} else {
var <API key> = state_24190__$1;
(<API key>[(1)] = (5));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (3))){
var inst_24188 = (state_24190[(2)]);
var state_24190__$1 = state_24190;
return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24190__$1,inst_24188);
} else {
if((state_val_24191 === (4))){
var inst_24173 = (state_24190[(10)]);
var inst_24178 = figwheel.client.file_reloading.reload_js_file.call(null,inst_24173);
var state_24190__$1 = state_24190;
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24190__$1,(7),inst_24178);
} else {
if((state_val_24191 === (5))){
var inst_24184 = cljs.core.async.close_BANG_.call(null,out);
var state_24190__$1 = state_24190;
var <API key> = state_24190__$1;
(<API key>[(2)] = inst_24184);
(<API key>[(1)] = (6));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (6))){
var inst_24186 = (state_24190[(2)]);
var state_24190__$1 = state_24190;
var <API key> = state_24190__$1;
(<API key>[(2)] = inst_24186);
(<API key>[(1)] = (3));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (7))){
var inst_24174 = (state_24190[(11)]);
var inst_24180 = (state_24190[(2)]);
var inst_24181 = cljs.core.async.put_BANG_.call(null,out,inst_24180);
var inst_24170 = inst_24174;
var state_24190__$1 = (function (){var statearr_24199 = state_24190;
(statearr_24199[(9)] = inst_24170);
(statearr_24199[(12)] = inst_24181);
return statearr_24199;
})();
var <API key> = state_24190__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
}
}
}
}
}
}
});})(<API key>,out))
;
return ((function (<API key>,<API key>,out){
return (function() {
var figwheel$client$file_reloading$load_all_js_files_$<API key> = null;
var figwheel$client$file_reloading$load_all_js_files_$<API key> = (function (){
var statearr_24204 = [null,null,null,null,null,null,null,null,null,null,null,null,null];
(statearr_24204[(0)] = figwheel$client$file_reloading$load_all_js_files_$<API key>);
(statearr_24204[(1)] = (1));
return statearr_24204;
});
var figwheel$client$file_reloading$load_all_js_files_$<API key> = (function (state_24190){
while(true){
var <API key> = (function (){try{while(true){
var <API key> = <API key>.call(null,state_24190);
if(cljs.core.<API key>.call(null,<API key>,new cljs.core.Keyword(null,"recur","recur",-437573268))){
continue;
} else {
return <API key>;
}
break;
}
}catch (e24205){if((e24205 instanceof Object)){
var ex__20842__auto__ = e24205;
var <API key> = state_24190;
(<API key>[(5)] = ex__20842__auto__);
cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24190);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
throw e24205;
}
}})();
if(cljs.core.<API key>.call(null,<API key>,new cljs.core.Keyword(null,"recur","recur",-437573268))){
var G__24216 = state_24190;
state_24190 = G__24216;
continue;
} else {
return <API key>;
}
break;
}
});
figwheel$client$file_reloading$load_all_js_files_$<API key> = function(state_24190){
switch(arguments.length){
case 0:
return figwheel$client$file_reloading$load_all_js_files_$<API key>.call(this);
case 1:
return figwheel$client$file_reloading$load_all_js_files_$<API key>.call(this,state_24190);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$load_all_js_files_$<API key>.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$load_all_js_files_$<API key>;
figwheel$client$file_reloading$load_all_js_files_$<API key>.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$load_all_js_files_$<API key>;
return figwheel$client$file_reloading$load_all_js_files_$<API key>;
})()
;})(<API key>,<API key>,out))
})();
var <API key> = (function (){var statearr_24207 = f__20951__auto__.call(null);
(statearr_24207[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = <API key>);
return statearr_24207;
})();
return cljs.core.async.impl.ioc_helpers.<API key>.call(null,<API key>);
});})(<API key>,out))
);
return cljs.core.async.into.call(null,cljs.core.PersistentVector.EMPTY,out);
});
figwheel.client.file_reloading.eval_body = (function figwheel$client$file_reloading$eval_body(p__24217,opts){
var map__24221 = p__24217;
var map__24221__$1 = ((((!((map__24221 == null)))?((((map__24221.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24221.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24221):map__24221);
var eval_body__$1 = cljs.core.get.call(null,map__24221__$1,new cljs.core.Keyword(null,"eval-body","eval-body",-907279883));
var file = cljs.core.get.call(null,map__24221__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
if(cljs.core.truth_((function (){var and__16814__auto__ = eval_body__$1;
if(cljs.core.truth_(and__16814__auto__)){
return typeof eval_body__$1 === 'string';
} else {
return and__16814__auto__;
}
})())){
var code = eval_body__$1;
try{figwheel.client.utils.debug_prn.call(null,[cljs.core.str("Evaling file "),cljs.core.str(file)].join(''));
return figwheel.client.utils.eval_helper.call(null,code,opts);
}catch (e24223){var e = e24223;
return figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Unable to evaluate "),cljs.core.str(file)].join(''));
}} else {
return null;
}
});
figwheel.client.file_reloading.expand_files = (function figwheel$client$file_reloading$expand_files(files){
var deps = figwheel.client.file_reloading.get_all_dependents.call(null,cljs.core.map.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372),files));
return cljs.core.filter.call(null,cljs.core.comp.call(null,cljs.core.not,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, ["figwheel.connect",null], null), null),new cljs.core.Keyword(null,"namespace","namespace",-377510372)),cljs.core.map.call(null,((function (deps){
return (function (n){
var temp__4423__auto__ = cljs.core.first.call(null,cljs.core.filter.call(null,((function (deps){
return (function (p1__24224_SHARP_){
return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(p1__24224_SHARP_),n);
});})(deps))
,files));
if(cljs.core.truth_(temp__4423__auto__)){
var file_msg = temp__4423__auto__;
return file_msg;
} else {
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"namespace","namespace",-377510372),new cljs.core.Keyword(null,"namespace","namespace",-377510372),n], null);
}
});})(deps))
,deps));
});
figwheel.client.file_reloading.sort_files = (function figwheel$client$file_reloading$sort_files(files){
if((cljs.core.count.call(null,files) <= (1))){
return files;
} else {
var keep_files = cljs.core.set.call(null,cljs.core.keep.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372),files));
return cljs.core.filter.call(null,cljs.core.comp.call(null,keep_files,new cljs.core.Keyword(null,"namespace","namespace",-377510372)),figwheel.client.file_reloading.expand_files.call(null,files));
}
});
figwheel.client.file_reloading.get_figwheel_always = (function figwheel$client$file_reloading$get_figwheel_always(){
return cljs.core.map.call(null,(function (p__24229){
var vec__24230 = p__24229;
var k = cljs.core.nth.call(null,vec__24230,(0),null);
var v = cljs.core.nth.call(null,vec__24230,(1),null);
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"namespace","namespace",-377510372),k,new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"namespace","namespace",-377510372)], null);
}),cljs.core.filter.call(null,(function (p__24231){
var vec__24232 = p__24231;
var k = cljs.core.nth.call(null,vec__24232,(0),null);
var v = cljs.core.nth.call(null,vec__24232,(1),null);
return new cljs.core.Keyword(null,"figwheel-always","figwheel-always",799819691).cljs$core$IFn$_invoke$arity$1(v);
}),cljs.core.deref.call(null,figwheel.client.file_reloading.<API key>)));
});
figwheel.client.file_reloading.reload_js_files = (function figwheel$client$file_reloading$reload_js_files(p__24236,p__24237){
var map__24484 = p__24236;
var map__24484__$1 = ((((!((map__24484 == null)))?((((map__24484.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24484.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24484):map__24484);
var opts = map__24484__$1;
var before_jsload = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"before-jsload","before-jsload",-847513128));
var on_jsload = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"on-jsload","on-jsload",-395756602));
var reload_dependents = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"reload-dependents","reload-dependents",-956865430));
var map__24485 = p__24237;
var map__24485__$1 = ((((!((map__24485 == null)))?((((map__24485.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24485.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24485):map__24485);
var msg = map__24485__$1;
var files = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"files","files",-472457450));
var figwheel_meta = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"figwheel-meta","figwheel-meta",-225970237));
var <API key> = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"<API key>","<API key>",523804171));
if(cljs.core.empty_QMARK_.call(null,figwheel_meta)){
} else {
cljs.core.reset_BANG_.call(null,figwheel.client.file_reloading.<API key>,figwheel_meta);
}
var c__20950__auto__ = cljs.core.async.chan.call(null,(1));
cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (){
var f__20951__auto__ = (function (){var <API key> = ((function (c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (state_24638){
var state_val_24639 = (state_24638[(1)]);
if((state_val_24639 === (7))){
var inst_24501 = (state_24638[(7)]);
var inst_24500 = (state_24638[(8)]);
var inst_24502 = (state_24638[(9)]);
var inst_24499 = (state_24638[(10)]);
var inst_24507 = cljs.core._nth.call(null,inst_24500,inst_24502);
var inst_24508 = figwheel.client.file_reloading.eval_body.call(null,inst_24507,opts);
var inst_24509 = (inst_24502 + (1));
var tmp24640 = inst_24501;
var tmp24641 = inst_24500;
var tmp24642 = inst_24499;
var inst_24499__$1 = tmp24642;
var inst_24500__$1 = tmp24641;
var inst_24501__$1 = tmp24640;
var inst_24502__$1 = inst_24509;
var state_24638__$1 = (function (){var statearr_24643 = state_24638;
(statearr_24643[(7)] = inst_24501__$1);
(statearr_24643[(8)] = inst_24500__$1);
(statearr_24643[(9)] = inst_24502__$1);
(statearr_24643[(11)] = inst_24508);
(statearr_24643[(10)] = inst_24499__$1);
return statearr_24643;
})();
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (20))){
var inst_24542 = (state_24638[(12)]);
var inst_24550 = figwheel.client.file_reloading.sort_files.call(null,inst_24542);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24550);
(<API key>[(1)] = (21));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (27))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (28));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (1))){
var inst_24491 = (state_24638[(13)]);
var inst_24488 = before_jsload.call(null,files);
var inst_24489 = figwheel.client.file_reloading.<API key>.call(null,files);
var inst_24490 = (function (){return ((function (inst_24491,inst_24488,inst_24489,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (p1__24233_SHARP_){
return new cljs.core.Keyword(null,"eval-body","eval-body",-907279883).cljs$core$IFn$_invoke$arity$1(p1__24233_SHARP_);
});
;})(inst_24491,inst_24488,inst_24489,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var inst_24491__$1 = cljs.core.filter.call(null,inst_24490,files);
var inst_24492 = cljs.core.not_empty.call(null,inst_24491__$1);
var state_24638__$1 = (function (){var statearr_24647 = state_24638;
(statearr_24647[(13)] = inst_24491__$1);
(statearr_24647[(14)] = inst_24489);
(statearr_24647[(15)] = inst_24488);
return statearr_24647;
})();
if(cljs.core.truth_(inst_24492)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (2));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (3));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (24))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (25));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (39))){
var inst_24592 = (state_24638[(16)]);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24592);
(<API key>[(1)] = (40));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (46))){
var inst_24633 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24633);
(<API key>[(1)] = (31));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (4))){
var inst_24536 = (state_24638[(2)]);
var inst_24537 = cljs.core.List.EMPTY;
var inst_24538 = cljs.core.reset_BANG_.call(null,figwheel.client.file_reloading.dependencies_loaded,inst_24537);
var inst_24539 = (function (){return ((function (inst_24536,inst_24537,inst_24538,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (p1__24234_SHARP_){
var and__16814__auto__ = new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(p1__24234_SHARP_);
if(cljs.core.truth_(and__16814__auto__)){
return cljs.core.not.call(null,new cljs.core.Keyword(null,"eval-body","eval-body",-907279883).cljs$core$IFn$_invoke$arity$1(p1__24234_SHARP_));
} else {
return and__16814__auto__;
}
});
;})(inst_24536,inst_24537,inst_24538,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var inst_24540 = cljs.core.filter.call(null,inst_24539,files);
var inst_24541 = figwheel.client.file_reloading.get_figwheel_always.call(null);
var inst_24542 = cljs.core.concat.call(null,inst_24540,inst_24541);
var state_24638__$1 = (function (){var statearr_24653 = state_24638;
(statearr_24653[(17)] = inst_24536);
(statearr_24653[(18)] = inst_24538);
(statearr_24653[(12)] = inst_24542);
return statearr_24653;
})();
if(cljs.core.truth_(reload_dependents)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (16));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (17));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (15))){
var inst_24526 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24526);
(<API key>[(1)] = (12));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (21))){
var inst_24552 = (state_24638[(19)]);
var inst_24552__$1 = (state_24638[(2)]);
var inst_24553 = figwheel.client.file_reloading.load_all_js_files.call(null,inst_24552__$1);
var state_24638__$1 = (function (){var statearr_24657 = state_24638;
(statearr_24657[(19)] = inst_24552__$1);
return statearr_24657;
})();
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24638__$1,(22),inst_24553);
} else {
if((state_val_24639 === (31))){
var inst_24636 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24638__$1,inst_24636);
} else {
if((state_val_24639 === (32))){
var inst_24592 = (state_24638[(16)]);
var inst_24597 = inst_24592.cljs$lang$protocol_mask$partition0$;
var inst_24598 = (inst_24597 & (64));
var inst_24599 = inst_24592.cljs$core$ISeq$;
var inst_24600 = (inst_24598) || (inst_24599);
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24600)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (35));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (36));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (40))){
var inst_24613 = (state_24638[(20)]);
var inst_24612 = (state_24638[(2)]);
var inst_24613__$1 = cljs.core.get.call(null,inst_24612,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179));
var inst_24614 = cljs.core.get.call(null,inst_24612,new cljs.core.Keyword(null,"not-required","not-required",-950359114));
var inst_24615 = cljs.core.not_empty.call(null,inst_24613__$1);
var state_24638__$1 = (function (){var statearr_24660 = state_24638;
(statearr_24660[(20)] = inst_24613__$1);
(statearr_24660[(21)] = inst_24614);
return statearr_24660;
})();
if(cljs.core.truth_(inst_24615)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (41));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (42));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (33))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = false);
(<API key>[(1)] = (34));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (13))){
var inst_24512 = (state_24638[(22)]);
var inst_24516 = cljs.core.chunk_first.call(null,inst_24512);
var inst_24517 = cljs.core.chunk_rest.call(null,inst_24512);
var inst_24518 = cljs.core.count.call(null,inst_24516);
var inst_24499 = inst_24517;
var inst_24500 = inst_24516;
var inst_24501 = inst_24518;
var inst_24502 = (0);
var state_24638__$1 = (function (){var statearr_24664 = state_24638;
(statearr_24664[(7)] = inst_24501);
(statearr_24664[(8)] = inst_24500);
(statearr_24664[(9)] = inst_24502);
(statearr_24664[(10)] = inst_24499);
return statearr_24664;
})();
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (22))){
var inst_24552 = (state_24638[(19)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24555__$1 = (state_24638[(2)]);
var inst_24556__$1 = cljs.core.filter.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),inst_24555__$1);
var inst_24557 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555__$1;
var res = inst_24556__$1;
return ((function (all_files,res_SINGLEQUOTE_,res,inst_24552,inst_24560,inst_24556,inst_24555,inst_24555__$1,inst_24556__$1,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (p1__24235_SHARP_){
return cljs.core.not.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375).cljs$core$IFn$_invoke$arity$1(p1__24235_SHARP_));
});
;})(all_files,res_SINGLEQUOTE_,res,inst_24552,inst_24560,inst_24556,inst_24555,inst_24555__$1,inst_24556__$1,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var inst_24558 = cljs.core.filter.call(null,inst_24557,inst_24555__$1);
var inst_24559 = cljs.core.deref.call(null,figwheel.client.file_reloading.dependencies_loaded);
var inst_24560__$1 = cljs.core.filter.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),inst_24559);
var inst_24561 = cljs.core.not_empty.call(null,inst_24560__$1);
var state_24638__$1 = (function (){var statearr_24666 = state_24638;
(statearr_24666[(26)] = inst_24558);
(statearr_24666[(23)] = inst_24560__$1);
(statearr_24666[(24)] = inst_24556__$1);
(statearr_24666[(25)] = inst_24555__$1);
return statearr_24666;
})();
if(cljs.core.truth_(inst_24561)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (23));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (24));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (36))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = false);
(<API key>[(1)] = (37));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (41))){
var inst_24613 = (state_24638[(20)]);
var inst_24617 = cljs.core.comp.call(null,figwheel.client.file_reloading.name__GT_path,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var inst_24618 = cljs.core.map.call(null,inst_24617,inst_24613);
var inst_24619 = cljs.core.pr_str.call(null,inst_24618);
var inst_24620 = [cljs.core.str("figwheel-no-load meta-data: "),cljs.core.str(inst_24619)].join('');
var inst_24621 = figwheel.client.utils.log.call(null,inst_24620);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24621);
(<API key>[(1)] = (43));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (43))){
var inst_24614 = (state_24638[(21)]);
var inst_24624 = (state_24638[(2)]);
var inst_24625 = cljs.core.not_empty.call(null,inst_24614);
var state_24638__$1 = (function (){var statearr_24671 = state_24638;
(statearr_24671[(27)] = inst_24624);
return statearr_24671;
})();
if(cljs.core.truth_(inst_24625)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (44));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (45));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (29))){
var inst_24552 = (state_24638[(19)]);
var inst_24558 = (state_24638[(26)]);
var inst_24592 = (state_24638[(16)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24588 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: NOT loading these files ");
var inst_24591 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var <API key> = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24592,inst_24560,inst_24556,inst_24555,inst_24588,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (p__24590){
var map__24674 = p__24590;
var map__24674__$1 = ((((!((map__24674 == null)))?((((map__24674.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24674.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24674):map__24674);
var namespace = cljs.core.get.call(null,map__24674__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var meta_data = cljs.core.get.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.<API key>),cljs.core.name.call(null,namespace));
if((meta_data == null)){
return new cljs.core.Keyword(null,"not-required","not-required",-950359114);
} else {
if(cljs.core.truth_(meta_data.call(null,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179)))){
return new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179);
} else {
return new cljs.core.Keyword(null,"not-required","not-required",-950359114);
}
}
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24592,inst_24560,inst_24556,inst_24555,inst_24588,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var inst_24592__$1 = cljs.core.group_by.call(null,inst_24591,inst_24558);
var inst_24594 = (inst_24592__$1 == null);
var inst_24595 = cljs.core.not.call(null,inst_24594);
var state_24638__$1 = (function (){var statearr_24676 = state_24638;
(statearr_24676[(16)] = inst_24592__$1);
(statearr_24676[(28)] = inst_24588);
return statearr_24676;
})();
if(inst_24595){
var <API key> = state_24638__$1;
(<API key>[(1)] = (32));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (33));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (44))){
var inst_24614 = (state_24638[(21)]);
var inst_24627 = cljs.core.map.call(null,new cljs.core.Keyword(null,"file","file",-1269645878),inst_24614);
var inst_24628 = cljs.core.pr_str.call(null,inst_24627);
var inst_24629 = [cljs.core.str("not required: "),cljs.core.str(inst_24628)].join('');
var inst_24630 = figwheel.client.utils.log.call(null,inst_24629);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24630);
(<API key>[(1)] = (46));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (6))){
var inst_24533 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24533);
(<API key>[(1)] = (4));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (28))){
var inst_24558 = (state_24638[(26)]);
var inst_24585 = (state_24638[(2)]);
var inst_24586 = cljs.core.not_empty.call(null,inst_24558);
var state_24638__$1 = (function (){var statearr_24681 = state_24638;
(statearr_24681[(29)] = inst_24585);
return statearr_24681;
})();
if(cljs.core.truth_(inst_24586)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (29));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (30));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (25))){
var inst_24556 = (state_24638[(24)]);
var inst_24572 = (state_24638[(2)]);
var inst_24573 = cljs.core.not_empty.call(null,inst_24556);
var state_24638__$1 = (function (){var statearr_24684 = state_24638;
(statearr_24684[(30)] = inst_24572);
return statearr_24684;
})();
if(cljs.core.truth_(inst_24573)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (26));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (27));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (34))){
var inst_24607 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24607)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (38));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (39));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (17))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = <API key>);
(<API key>[(1)] = (18));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (3))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (4));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (12))){
var inst_24529 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24529);
(<API key>[(1)] = (9));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (2))){
var inst_24491 = (state_24638[(13)]);
var inst_24498 = cljs.core.seq.call(null,inst_24491);
var inst_24499 = inst_24498;
var inst_24500 = null;
var inst_24501 = (0);
var inst_24502 = (0);
var state_24638__$1 = (function (){var statearr_24692 = state_24638;
(statearr_24692[(7)] = inst_24501);
(statearr_24692[(8)] = inst_24500);
(statearr_24692[(9)] = inst_24502);
(statearr_24692[(10)] = inst_24499);
return statearr_24692;
})();
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (23))){
var inst_24552 = (state_24638[(19)]);
var inst_24558 = (state_24638[(26)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24563 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: loaded these dependencies");
var inst_24565 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var <API key> = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24563,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (p__24564){
var map__24694 = p__24564;
var map__24694__$1 = ((((!((map__24694 == null)))?((((map__24694.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24694.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24694):map__24694);
var request_url = cljs.core.get.call(null,map__24694__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596));
return clojure.string.replace.call(null,request_url,goog.basePath,"");
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24563,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var inst_24566 = cljs.core.reverse.call(null,inst_24560);
var inst_24567 = cljs.core.map.call(null,inst_24565,inst_24566);
var inst_24568 = cljs.core.pr_str.call(null,inst_24567);
var inst_24569 = figwheel.client.utils.log.call(null,inst_24568);
var state_24638__$1 = (function (){var statearr_24696 = state_24638;
(statearr_24696[(31)] = inst_24563);
return statearr_24696;
})();
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24569);
(<API key>[(1)] = (25));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (35))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = true);
(<API key>[(1)] = (37));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (19))){
var inst_24542 = (state_24638[(12)]);
var inst_24548 = figwheel.client.file_reloading.expand_files.call(null,inst_24542);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24548);
(<API key>[(1)] = (21));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (11))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (12));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (9))){
var inst_24531 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24531);
(<API key>[(1)] = (6));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (5))){
var inst_24501 = (state_24638[(7)]);
var inst_24502 = (state_24638[(9)]);
var inst_24504 = (inst_24502 < inst_24501);
var inst_24505 = inst_24504;
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24505)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (7));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (8));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (14))){
var inst_24512 = (state_24638[(22)]);
var inst_24521 = cljs.core.first.call(null,inst_24512);
var inst_24522 = figwheel.client.file_reloading.eval_body.call(null,inst_24521,opts);
var inst_24523 = cljs.core.next.call(null,inst_24512);
var inst_24499 = inst_24523;
var inst_24500 = null;
var inst_24501 = (0);
var inst_24502 = (0);
var state_24638__$1 = (function (){var statearr_24704 = state_24638;
(statearr_24704[(32)] = inst_24522);
(statearr_24704[(7)] = inst_24501);
(statearr_24704[(8)] = inst_24500);
(statearr_24704[(9)] = inst_24502);
(statearr_24704[(10)] = inst_24499);
return statearr_24704;
})();
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (45))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (46));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (26))){
var inst_24552 = (state_24638[(19)]);
var inst_24558 = (state_24638[(26)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24575 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: loaded these files");
var inst_24577 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var <API key> = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (p__24576){
var map__24707 = p__24576;
var map__24707__$1 = ((((!((map__24707 == null)))?((((map__24707.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24707.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24707):map__24707);
var namespace = cljs.core.get.call(null,map__24707__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var file = cljs.core.get.call(null,map__24707__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
if(cljs.core.truth_(namespace)){
return figwheel.client.file_reloading.name__GT_path.call(null,cljs.core.name.call(null,namespace));
} else {
return file;
}
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var inst_24578 = cljs.core.map.call(null,inst_24577,inst_24556);
var inst_24579 = cljs.core.pr_str.call(null,inst_24578);
var inst_24580 = figwheel.client.utils.log.call(null,inst_24579);
var inst_24581 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var <API key> = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,inst_24577,inst_24578,inst_24579,inst_24580,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function (){
figwheel.client.file_reloading.<API key>.call(null,res);
return cljs.core.apply.call(null,on_jsload,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [res], null));
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,<API key>,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,inst_24577,inst_24578,inst_24579,inst_24580,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var inst_24582 = setTimeout(inst_24581,(10));
var state_24638__$1 = (function (){var statearr_24709 = state_24638;
(statearr_24709[(33)] = inst_24575);
(statearr_24709[(34)] = inst_24580);
return statearr_24709;
})();
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24582);
(<API key>[(1)] = (28));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (16))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = reload_dependents);
(<API key>[(1)] = (18));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (38))){
var inst_24592 = (state_24638[(16)]);
var inst_24609 = cljs.core.apply.call(null,cljs.core.hash_map,inst_24592);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24609);
(<API key>[(1)] = (40));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (30))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (31));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (10))){
var inst_24512 = (state_24638[(22)]);
var inst_24514 = cljs.core.chunked_seq_QMARK_.call(null,inst_24512);
var state_24638__$1 = state_24638;
if(inst_24514){
var <API key> = state_24638__$1;
(<API key>[(1)] = (13));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (14));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (18))){
var inst_24546 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24546)){
var <API key> = state_24638__$1;
(<API key>[(1)] = (19));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (20));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (42))){
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = null);
(<API key>[(1)] = (43));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (37))){
var inst_24604 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var <API key> = state_24638__$1;
(<API key>[(2)] = inst_24604);
(<API key>[(1)] = (34));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (8))){
var inst_24512 = (state_24638[(22)]);
var inst_24499 = (state_24638[(10)]);
var inst_24512__$1 = cljs.core.seq.call(null,inst_24499);
var state_24638__$1 = (function (){var statearr_24720 = state_24638;
(statearr_24720[(22)] = inst_24512__$1);
return statearr_24720;
})();
if(inst_24512__$1){
var <API key> = state_24638__$1;
(<API key>[(1)] = (10));
} else {
var <API key> = state_24638__$1;
(<API key>[(1)] = (11));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
});})(c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
;
return ((function (<API key>,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>){
return (function() {
var figwheel$client$file_reloading$reload_js_files_$<API key> = null;
var figwheel$client$file_reloading$reload_js_files_$<API key> = (function (){
var statearr_24726 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];
(statearr_24726[(0)] = figwheel$client$file_reloading$reload_js_files_$<API key>);
(statearr_24726[(1)] = (1));
return statearr_24726;
});
var figwheel$client$file_reloading$reload_js_files_$<API key> = (function (state_24638){
while(true){
var <API key> = (function (){try{while(true){
var <API key> = <API key>.call(null,state_24638);
if(cljs.core.<API key>.call(null,<API key>,new cljs.core.Keyword(null,"recur","recur",-437573268))){
continue;
} else {
return <API key>;
}
break;
}
}catch (e24727){if((e24727 instanceof Object)){
var ex__20842__auto__ = e24727;
var <API key> = state_24638;
(<API key>[(5)] = ex__20842__auto__);
cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24638);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
throw e24727;
}
}})();
if(cljs.core.<API key>.call(null,<API key>,new cljs.core.Keyword(null,"recur","recur",-437573268))){
var G__24789 = state_24638;
state_24638 = G__24789;
continue;
} else {
return <API key>;
}
break;
}
});
figwheel$client$file_reloading$reload_js_files_$<API key> = function(state_24638){
switch(arguments.length){
case 0:
return figwheel$client$file_reloading$reload_js_files_$<API key>.call(this);
case 1:
return figwheel$client$file_reloading$reload_js_files_$<API key>.call(this,state_24638);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$reload_js_files_$<API key>.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$reload_js_files_$<API key>;
figwheel$client$file_reloading$reload_js_files_$<API key>.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$reload_js_files_$<API key>;
return figwheel$client$file_reloading$reload_js_files_$<API key>;
})()
;})(<API key>,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
})();
var <API key> = (function (){var statearr_24729 = f__20951__auto__.call(null);
(statearr_24729[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto__);
return statearr_24729;
})();
return cljs.core.async.impl.ioc_helpers.<API key>.call(null,<API key>);
});})(c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,<API key>))
);
return c__20950__auto__;
});
figwheel.client.file_reloading.current_links = (function figwheel$client$file_reloading$current_links(){
return Array.prototype.slice.call(document.<API key>("link"));
});
figwheel.client.file_reloading.truncate_url = (function figwheel$client$file_reloading$truncate_url(url){
return clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,cljs.core.first.call(null,clojure.string.split.call(null,url,/\?/)),[cljs.core.str(location.protocol),cljs.core.str("//")].join(''),""),".*://",""),/^\/\//,""),/[^\\/]*/,"");
});
figwheel.client.file_reloading.matches_file_QMARK_ = (function figwheel$client$file_reloading$matches_file_QMARK_(p__24792,link){
var map__24795 = p__24792;
var map__24795__$1 = ((((!((map__24795 == null)))?((((map__24795.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24795.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24795):map__24795);
var file = cljs.core.get.call(null,map__24795__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
var temp__4425__auto__ = link.href;
if(cljs.core.truth_(temp__4425__auto__)){
var link_href = temp__4425__auto__;
var match = clojure.string.join.call(null,"/",cljs.core.take_while.call(null,cljs.core.identity,cljs.core.map.call(null,((function (link_href,temp__4425__auto__,map__24795,map__24795__$1,file){
return (function (p1__24790_SHARP_,p2__24791_SHARP_){
if(cljs.core._EQ_.call(null,p1__24790_SHARP_,p2__24791_SHARP_)){
return p1__24790_SHARP_;
} else {
return false;
}
});})(link_href,temp__4425__auto__,map__24795,map__24795__$1,file))
,cljs.core.reverse.call(null,clojure.string.split.call(null,file,"/")),cljs.core.reverse.call(null,clojure.string.split.call(null,figwheel.client.file_reloading.truncate_url.call(null,link_href),"/")))));
var match_length = cljs.core.count.call(null,match);
var file_name_length = cljs.core.count.call(null,cljs.core.last.call(null,clojure.string.split.call(null,file,"/")));
if((match_length >= file_name_length)){
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"link","link",-1769163468),link,new cljs.core.Keyword(null,"link-href","link-href",-250644450),link_href,new cljs.core.Keyword(null,"match-length","match-length",1101537310),match_length,new cljs.core.Keyword(null,"current-url-length","current-url-length",380404083),cljs.core.count.call(null,figwheel.client.file_reloading.truncate_url.call(null,link_href))], null);
} else {
return null;
}
} else {
return null;
}
});
figwheel.client.file_reloading.get_correct_link = (function figwheel$client$file_reloading$get_correct_link(f_data){
var temp__4425__auto__ = cljs.core.first.call(null,cljs.core.sort_by.call(null,(function (p__24801){
var map__24802 = p__24801;
var map__24802__$1 = ((((!((map__24802 == null)))?((((map__24802.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24802.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24802):map__24802);
var match_length = cljs.core.get.call(null,map__24802__$1,new cljs.core.Keyword(null,"match-length","match-length",1101537310));
var current_url_length = cljs.core.get.call(null,map__24802__$1,new cljs.core.Keyword(null,"current-url-length","current-url-length",380404083));
return (current_url_length - match_length);
}),cljs.core.keep.call(null,(function (p1__24797_SHARP_){
return figwheel.client.file_reloading.matches_file_QMARK_.call(null,f_data,p1__24797_SHARP_);
}),figwheel.client.file_reloading.current_links.call(null))));
if(cljs.core.truth_(temp__4425__auto__)){
var res = temp__4425__auto__;
return new cljs.core.Keyword(null,"link","link",-1769163468).cljs$core$IFn$_invoke$arity$1(res);
} else {
return null;
}
});
figwheel.client.file_reloading.clone_link = (function figwheel$client$file_reloading$clone_link(link,url){
var clone = document.createElement("link");
clone.rel = "stylesheet";
clone.media = link.media;
clone.disabled = link.disabled;
clone.href = figwheel.client.file_reloading.add_cache_buster.call(null,url);
return clone;
});
figwheel.client.file_reloading.create_link = (function figwheel$client$file_reloading$create_link(url){
var link = document.createElement("link");
link.rel = "stylesheet";
link.href = figwheel.client.file_reloading.add_cache_buster.call(null,url);
return link;
});
figwheel.client.file_reloading.add_link_to_doc = (function figwheel$client$file_reloading$add_link_to_doc(var_args){
var args24804 = [];
var <API key> = arguments.length;
var <API key> = (0);
while(true){
if((<API key> < <API key>)){
args24804.push((arguments[<API key>]));
var G__24809 = (<API key> + (1));
<API key> = G__24809;
continue;
} else {
}
break;
}
var G__24806 = args24804.length;
switch (G__24806) {
case 1:
return figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args24804.length)].join('')));
}
});
figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$1 = (function (new_link){
return (document.<API key>("head")[(0)]).appendChild(new_link);
});
figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$2 = (function (orig_link,klone){
var parent = orig_link.parentNode;
if(cljs.core._EQ_.call(null,orig_link,parent.lastChild)){
parent.appendChild(klone);
} else {
parent.insertBefore(klone,orig_link.nextSibling);
}
return setTimeout(((function (parent){
return (function (){
return parent.removeChild(orig_link);
});})(parent))
,(300));
});
figwheel.client.file_reloading.add_link_to_doc.cljs$lang$maxFixedArity = 2;
figwheel.client.file_reloading.distictify = (function figwheel$client$file_reloading$distictify(key,seqq){
return cljs.core.vals.call(null,cljs.core.reduce.call(null,(function (p1__24811_SHARP_,p2__24812_SHARP_){
return cljs.core.assoc.call(null,p1__24811_SHARP_,cljs.core.get.call(null,p2__24812_SHARP_,key),p2__24812_SHARP_);
}),cljs.core.PersistentArrayMap.EMPTY,seqq));
});
figwheel.client.file_reloading.reload_css_file = (function figwheel$client$file_reloading$reload_css_file(p__24813){
var map__24816 = p__24813;
var map__24816__$1 = ((((!((map__24816 == null)))?((((map__24816.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24816.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24816):map__24816);
var f_data = map__24816__$1;
var file = cljs.core.get.call(null,map__24816__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
var temp__4425__auto__ = figwheel.client.file_reloading.get_correct_link.call(null,f_data);
if(cljs.core.truth_(temp__4425__auto__)){
var link = temp__4425__auto__;
return figwheel.client.file_reloading.add_link_to_doc.call(null,link,figwheel.client.file_reloading.clone_link.call(null,link,link.href));
} else {
return null;
}
});
figwheel.client.file_reloading.reload_css_files = (function figwheel$client$file_reloading$reload_css_files(p__24818,files_msg){
var map__24825 = p__24818;
var map__24825__$1 = ((((!((map__24825 == null)))?((((map__24825.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24825.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24825):map__24825);
var opts = map__24825__$1;
var on_cssload = cljs.core.get.call(null,map__24825__$1,new cljs.core.Keyword(null,"on-cssload","on-cssload",1825432318));
if(cljs.core.truth_(figwheel.client.utils.html_env_QMARK_.call(null))){
var seq__24827_24831 = cljs.core.seq.call(null,figwheel.client.file_reloading.distictify.call(null,new cljs.core.Keyword(null,"file","file",-1269645878),new cljs.core.Keyword(null,"files","files",-472457450).cljs$core$IFn$_invoke$arity$1(files_msg)));
var chunk__24828_24832 = null;
var count__24829_24833 = (0);
var i__24830_24834 = (0);
while(true){
if((i__24830_24834 < count__24829_24833)){
var f_24835 = cljs.core._nth.call(null,chunk__24828_24832,i__24830_24834);
figwheel.client.file_reloading.reload_css_file.call(null,f_24835);
var G__24836 = seq__24827_24831;
var G__24837 = chunk__24828_24832;
var G__24838 = count__24829_24833;
var G__24839 = (i__24830_24834 + (1));
seq__24827_24831 = G__24836;
chunk__24828_24832 = G__24837;
count__24829_24833 = G__24838;
i__24830_24834 = G__24839;
continue;
} else {
var <API key> = cljs.core.seq.call(null,seq__24827_24831);
if(<API key>){
var seq__24827_24841__$1 = <API key>;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__24827_24841__$1)){
var <API key> = cljs.core.chunk_first.call(null,seq__24827_24841__$1);
var G__24843 = cljs.core.chunk_rest.call(null,seq__24827_24841__$1);
var G__24844 = <API key>;
var G__24845 = cljs.core.count.call(null,<API key>);
var G__24846 = (0);
seq__24827_24831 = G__24843;
chunk__24828_24832 = G__24844;
count__24829_24833 = G__24845;
i__24830_24834 = G__24846;
continue;
} else {
var f_24847 = cljs.core.first.call(null,seq__24827_24841__$1);
figwheel.client.file_reloading.reload_css_file.call(null,f_24847);
var G__24848 = cljs.core.next.call(null,seq__24827_24841__$1);
var G__24849 = null;
var G__24850 = (0);
var G__24851 = (0);
seq__24827_24831 = G__24848;
chunk__24828_24832 = G__24849;
count__24829_24833 = G__24850;
i__24830_24834 = G__24851;
continue;
}
} else {
}
}
break;
}
return setTimeout(((function (map__24825,map__24825__$1,opts,on_cssload){
return (function (){
return on_cssload.call(null,new cljs.core.Keyword(null,"files","files",-472457450).cljs$core$IFn$_invoke$arity$1(files_msg));
});})(map__24825,map__24825__$1,opts,on_cssload))
,(100));
} else {
return null;
}
});
//# sourceMappingURL=file_reloading.js.map?rel=1449036926031
|
export default class State {
constructor($rootScope) {
this.$rootScope = $rootScope;
this.state = [];
}
setData(data) {
console.log('state set data', data)
this.state = data;
this.$rootScope.$apply();
}
getData() {
//console.log('state get data', state)
return this.state;
}
}
|
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 9 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/<API key>/tiles/{z}/{x}/{y}?access_token=pk.<API key>.<API key>" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 10 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/<API key>/tiles/{z}/{x}/{y}?access_token=pk.<API key>.<API key>" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 11 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/<API key>/tiles/{z}/{x}/{y}?access_token=pk.<API key>.<API key>" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 12 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/<API key>/tiles/{z}/{x}/{y}?access_token=pk.<API key>.<API key>" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 13 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/<API key>/tiles/{z}/{x}/{y}?access_token=pk.<API key>.<API key>" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 14 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/<API key>/tiles/{z}/{x}/{y}?access_token=pk.<API key>.<API key>" -f jpg
|
<?php
namespace P2\Bundle\BootstrapBundle\Form\Extension;
/**
* Class FormTypeExtension
* @package P2\Bundle\BootstrapBundle\Form\Extension
*/
class FormTypeExtension extends <API key>
{
/**
* {@inheritDoc}
*/
public function getExtendedType()
{
return 'form';
}
}
|
layout: post
date: 2015-10-14
title: "Allure Quinceanera Dresses - Style Q400 2015 Sleeveless Floor-Length Ballgown"
category: Allure
tags: [Allure,Ballgown,Sweetheart,Floor-Length,Sleeveless,2015]
Allure Quinceanera Dresses - Style Q400
Just **$266.99**
2015 Sleeveless Floor-Length Ballgown
<table><tr><td>BRANDS</td><td>Allure</td></tr><tr><td>Silhouette</td><td>Ballgown</td></tr><tr><td>Neckline</td><td>Sweetheart</td></tr><tr><td>Hemline/Train</td><td>Floor-Length</td></tr><tr><td>Sleeve</td><td>Sleeveless</td></tr><tr><td>Years</td><td>2015</td></tr></table>
<a href="https:
<!-- break --><a href="https:
<a href="https:
Buy it: [https:
|
var request = require('request');
var Client = (function () {
function Client() {
this.options = {
"url": "",
"method": "GET",
"bodyParams": {},
"gzip": true,
"json": true
};
}
Client.prototype.connect = function (parent) {
var config = parent.config;
this.configure(config);
this._connector = parent;
parent.logger.trace('Connected to google custom search');
};
Client.prototype.disconnect = function (parent) {
this.config = {};
this.url = '';
this._connector = parent;
parent.logger.trace('Disconnected from google custom search');
};
Client.prototype.configure = function (config) {
if (!config || !config.key)
throw new Error('Configuration is not set.');
this.key = config.key;
this.config = config;
if (config.cx)
this.cx = config.cx;
else if (config.cref)
this.cref = config.cref;
if (!this.cx && !this.cref)
throw new Error('You must provide either cx or cref parameter in your configuration!');
this.url = 'https:
if (this.cx)
this.url += '&cx=' + this.cx;
else if (this.cref)
this.url += '&cref=' + this.cref;
this.baseUrl = this.url;
return true;
};
Client.prototype.setParameters = function (v) {
if (!v.where)
throw "You need to set a where clause and provide a query ('q') parameter";
if (typeof v.where === 'string' || v.where instanceof String)
v.where = JSON.parse(v.where);
if (!v.where.q) {
throw "You need to provide a query ('q') parameter in where clause.";
}
this._parseParameters(v);
this._creteQuery();
this.url = this.baseUrl + this._query;
return this;
};
Client.prototype.query = function (callback) {
this.options.url = this.url;
return request(this.options, callback);
};
Client.prototype.prepareResults = function (results, model) {
var tmp_results = [];
if (results && results.length) {
for (var i = 0; i < results.length; i++) {
var p_model = this.<API key>(model, results[i]);
tmp_results.push(p_model);
}
}
return tmp_results;
};
Client.prototype._creteQuery = function () {
var params = this._params;
var i = 0;
for (var key in params) {
if (i === 0) {
this._query = '&' + key + '=' + params[key];
}
else {
this._query += '&' + key + '=' + params[key];
}
i++;
}
return this._query;
};
Client.prototype._parseParameters = function (v) {
if (!v.per_page)
v.where.num = 10;
else
v.where.num = v.per_page;
if (!v.skip)
v.where.start = 1;
else
v.where.start = v.skip;
if (v.limit)
v.where.num = v.limit - v.where.start;
if (v.page) {
v.where.start = ((v.page - 1) * v.per_page + 1);
}
if (v.order)
v.where.sort = v.order;
if (v.linkSite)
v.where.linkSite = v.linkSite;
if (v.lowRange)
v.where.lowRange = v.lowRange;
if (v.relatedSite)
v.where.relatedSite = v.relatedSite;
if (v.searchType)
v.where.searchType = v.searchType;
if (v.siteSearch)
v.where.siteSearch = v.siteSearch;
if (v.siteSearchFilter)
v.where.siteSearchFilter = v.siteSearchFilter;
this._params = v.where;
return true;
};
Client.prototype.<API key> = function (Model, data) {
var model = Model.instance(data, true);
model.setPrimaryKey(data.cacheId);
return model;
};
return Client;
})();
exports.Client = Client;
//# sourceMappingURL=client.js.map
|
#encoding:UTF-8
# ISS017 - Character Improve 1.1
# ** ISS - Character Improve
# ** Date Created : 08/04/2011
# ** Date Modified : 08/10/2011
# ** For Game : Code JIFZ
# ** ID : 017
# ** Version : 1.1
# ** Requires : ISS000 - Core(1.9 or above)
($imported ||= {})["<API key>"] = true
# ** ISS
module ISS
install_script(17, :system)
end
# ** Game_Character
class Game_Character
# * Public Instance Variables
attr_accessor :sox, :soy, :soz
# * alias-method :initialize
alias :<API key> :initialize unless $@
def initialize(*args, &block)
@sox, @soy, @soz = 0, 0, 0
<API key>(*args, &block)
end
# * alias-method :screen_x
alias :iss017_gmc_screen_x :screen_x unless $@
def screen_x(*args, &block)
return iss017_gmc_screen_x(*args, &block) + @sox
end
# * alias-method :screen_y
alias :iss017_gmc_screen_y :screen_y unless $@
def screen_y(*args, &block)
return iss017_gmc_screen_y(*args, &block) + @soy
end
# * alias-method :screen_z
alias :iss017_gmc_screen_z :screen_z unless $@
def screen_z(*args, &block)
return iss017_gmc_screen_z(*args, &block) + @soz
end
end
# ** END OF FILE
|
function* generatorFn() {
yield 'foo';
yield 'bar';
return 'baz';
}
let generatorObject1 = generatorFn();
let generatorObject2 = generatorFn();
console.log(generatorObject1.next()); // { done: false, value: 'foo' }
console.log(generatorObject2.next()); // { done: false, value: 'foo' }
console.log(generatorObject2.next()); // { done: false, value: 'bar' }
console.log(generatorObject1.next()); // { done: false, value: 'bar' }
<API key>.js
|
<div class="four wide column center aligned votes">
<div class="ui statistic">
<div class="value">
{{ article.votes }}
</div>
<div class="label">
Points
</div>
</div>
</div>
<div class="twelve wide column">
<a class="ui large header" href="{{ article.link }}">
{{ article.title }}
</a>
<div class="meta">({{ article.domain() }})</div>
<ul class="ui big horizontal list votes">
<li class="item">
<a href="" (click)="voteUp()">
<i class="arrow up icon"></i>
upvote
</a>
<li class="item">
<a href="" (click)="voteDown()">
<i class="arrow up icon"></i>
downvote
</a>
</li>
</ul>
</div>
|
#pragma once
#include "animations/display.h"
#include "animations/AnimationProgram.h"
#include "animations/PaintPixel.h"
#include "blewiz/BLECharacteristic.h"
#include "freertos/task.h"
class BadgeService : public BLEService {
public:
BadgeService(Display &display, AnimationProgram &animationProgram);
virtual ~BadgeService();
void init();
void setPaintPixel(PaintPixel *paintPixel) { this->paintPixel = paintPixel; }
void onStarted() override;
void onConnect() override;
void onDisconnect() override;
private:
Display &display;
AnimationProgram &animationProgram;
PaintPixel *paintPixel;
BLECharacteristic <API key>;
BLEDescriptor <API key>;
BLECharacteristic <API key>;
BLECharacteristic <API key>;
BLECharacteristic <API key>;
BLECharacteristic <API key>;
BLECharacteristic <API key>;
BLECharacteristic <API key>;
BLECharacteristic <API key>;
static void batteryTask(void *parameters);
TaskHandle_t taskHandle;
std::vector<uint8_t> paintFrame;
};
|
/*
Document : colors
Author : Little Neko
Description: template colors
*/
/** tabs **/
.panel-default>.panel-heading {background:#EB7F37; }
.panel-default>.panel-heading:hover {background:#fff; }
.panel-default>.panel-heading:hover a {color:#EB7F37; }
.panel-title>a {color:#fff;}
.panel-title>a:hover {text-decoration: none;}
body {
color:#777;
background: #fff;
}
blockquote small {
color:inherit;
}
h1, h2, h3, h4, h5, h6 {
color:#222;
}
h2 {
color:#888;
}
h2 i {color:#999}
h2.subTitle:after, h1.noSubtitle:after{
background-color:#EB7F37;
}
/*** parallax sections ***/
.paralaxText blockquote:before, .paralaxText blockquote:after {
color:#fff;
}
#home, #paralaxSlice1, #paralaxSlice2, #paralaxSlice3, #paralaxSlice4 {
background-color:#EB7F37;
}
#home {
background-image:url('../images/theme-pics/paralax-grey-3.jpg');
}
#paralaxSlice1 {
background-image: url('../images/theme-pics/paralax-1.jpg');
}
#paralaxSlice2 {
background-image: url('../images/theme-pics/paralax-grey-2.jpg');
}
#paralaxSlice3 {
background-image: url('../images/theme-pics/paralax-grey-3.jpg');
}
#paralaxSlice4 {
background-image: url('../images/theme-pics/paralax-4.jpg');
}
.paralaxText blockquote, .paralaxText h1, .paralaxText h2, .paralaxText h3, .paralaxText p, .paralaxText i{
color:#fff;
}
a {
color:#EB7F37;
}
a:hover, .scrollspyNav .active a {
color:#EB7F37;
}
ul.iconsList li a {
color:#555
}
ul.iconsList li a:hover, ul.iconsList i {
color:#EB7F37
}
/*** buttons ***/
.btn {
background:#EB7F37;
color:#fff;
border:2px solid #fff;
}
.btn:hover {
color:#EB7F37;
border-color:#eee;
text-shadow:none;
background:#fff
}
.btn-primary {
background: #006dcc;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
background: #555;
}
.btn-info {
background: #49AFCD;
}
.btn-success {
background: #5BB75B;
}
.btn-warning {
background: #FAA732;
}
.btn-danger {
background: #DA4F49;
}
.btn-link, .btn-link:active, .btn-link[disabled], .btn-link:hover {
background:none;
border:none;
-moz-box-shadow: none;
-webkit-box-shadow:none;
box-shadow: none;
color:#49AFCD;
}
.btnWrapper {
border:1px solid #ccc;
}
#mainHeader{
background-color: white;
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}
#mainMenu ul li a, #resMainMenu ul li a {
color:#444;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
background: #EB7F37;
color:#fff;
}
footer {
color:#777;
background:#eee;
}
#footerRights {
background-color:#fff;
color:#999;
}
p.credits {
color:#555;
}
p.credits a {
color:#EB7F37;
}
#home h1 {color:#FFFFFF;}
/*** FLEX ***/
.flexslider {
box-shadow:none;
}
.slides .txt div {
background:#444;
color:#FFFFFF;
}
.flexslider .flex-direction-nav a {
background-color:#EB7F37;
}
.flexslider .flex-control-paging li a:hover, #sliderWrapper .flex-control-paging li a.flex-active{
background: #fff;
border:2px solid #fff;
}
.flexslider .flex-control-paging li a {
background: transparent;
border:2px solid rgba(255,255,255,0.5);
}
.flexslider .flex-control-nav {
background:transparent;
}
.flexslider h1 {
color:#fff;
background-color:#EB7F37;
}
.flexslider h2 {
color:#fff;
background-color:#333;
}
.flexslider .caption p {
background-color:#fff;
color:#555
}
/*** flexHome ***/
#flexHome h1 { color:#fff;
background:none;
}
#flexHome h2 { color:#fff;
background:none;
}
/*** END FLEX SLIDER ***/
nav#filter a {
background-color: #EEE;
color:#555;
}
nav#filter a:hover, nav#filter a.current {
background-color: #EB7F37;
color:#fff;
}
li.filterTitle {
color:#4F6266;
}
section#projectDescription {
background-color:#F8F8F8
}
.mask{background-color: #EB7F37;}
/*** hover images ***/
.iconLinks a span {color:#fff;}
/*** pricing table ***/
.pricingBloc {
background-color:#fff;
border:1px solid rgba(0, 0, 0, 0.2);
}
.pricingBloc ul li {
border-bottom:1px solid #ddd;
color:#444!important;
}
.pricingBloc ul li:last-child {
border-bottom:none;
}
.pricingBloc h2 {
background-color:#555;
color:#888!important;
border:none;
}
.pricingBloc h3 {
background-color:#777;
color:#fff!important;
}
.pricingBloc p {
background-color:#eee;
color:#444!important;
}
.pricingBloc.focusPlan {
margin-top:0;
border-color:#D1D1D1;
}
.pricingBloc.focusPlan h2{
background-color:#333;
color:#fff!important;
}
.pricingBloc.focusPlan h3 {
background-color:#EB7F37;
padding:1.25em;
color:#fff!important;
}
/*** Form ***/
.form-control:focus{
border: none;
background-color:#ddd;
box-shadow:none;
-webkit-box-shadow:none;
-moz-box-shadow:none;
}
.form-control {
color: #444;
background-color:#ededed;
border:none;
}
.error {color: #B94A48;
background-color: #F2DEDE;
border-color: #EED3D7;}
label.error {color:#fff;
background-color: #B94A48;
border:none}
#projectQuote, #projectQuote h3{background:#ddd;color:#444;}
/*** Feature box **/
.boxFeature i{color:#EB7F37;}
/*** slices ***/
.slice{
background-color:#fff;
}
/*** call to action ***/
.ctaBox {border:2px solid rgba(0,0,0,0.05);}
.ctaBoxFullwidth{border:none}
.ctaBox blockquote {
color:#fff;
}
/*color1*/
.color1, .slice.color1, .bulle.color1, .ctaBox.color1{
background-color:#F7F7F7;
color:#444;
}
.color1 h1, .color1 h2, .color1 h3, .color1 h4, .color1 blockquote, .color1 a{
color:#444;
}
.color1 a.btn{color:#fff;}
.color1 a.btn:hover{color:#EB7F37;}
/*color4*/
.color4, .slice.color4, .bulle.color4, .ctaBox.color4{
background-color:#EB7F37;
color:#fff;
}
.color4 h1, .color4 h2, .color4 h3, .color4 h4, .color4 blockquote, .color4 a {
color:#fff;
}
.color4 h2.subTitle:after, .color4 h1.noSubtitle:after {
background:#fff;
}
/*** icons ***/
.iconRounded {border:2px solid #EB7F37;color:#EB7F37;background-color:#fff;}
.iconRounded:hover, .color1 .iconRounded:hover{background-color:#EB7F37;color:#fff;}
.color1 .iconRounded {color:#EB7F37;}
.color4 .iconRounded {background-color:#FFF;color:#EB7F37;}
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi_VN" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>bitcoinlite</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The bitcoinlite developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<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>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Tạo một địa chỉ mới</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-46"/>
<source>These are your bitcoinlite 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 type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a bitcoinlite 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="-14"/>
<source>Verify a message to ensure it was signed with a specified bitcoinlite 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 type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation type="unfinished"/>
</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 type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+35"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</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="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-58"/>
<source>bitcoinlite will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+280"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+242"/>
<source>Synchronizing with network...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-308"/>
<source>&Overview</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-13"/>
<source>&Receive coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-7"/>
<source>&Send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Show information about bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+250"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-247"/>
<source>&Export...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Send coins to a bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Modify configuration options for bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+10"/>
<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="-5"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-200"/>
<source>bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+178"/>
<source>&About bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>&File</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Actions toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+9"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+60"/>
<source>bitcoinlite client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to bitcoinlite network</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+40"/>
<source>Downloaded %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+413"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-403"/>
<source>%n second(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="-284"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+288"/>
<source>%n minute(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Up to date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Catching up...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Last received block was generated %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<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="+5"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid bitcoinlite address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<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 numerus="yes">
<location line="+76"/>
<source>%n second(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+18"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+109"/>
<source>A fatal error occurred. bitcoinlite can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+90"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+551"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+66"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation type="unfinished"/>
</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 type="unfinished"/>
</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="+20"/>
<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 type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid bitcoinlite address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation type="unfinished"/>
</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="+420"/>
<location line="+12"/>
<source>bitcoinlite-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</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 type="unfinished"/>
</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. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start bitcoinlite after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start bitcoinlite on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Detach databases at shutdown</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the bitcoinlite 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 bitcoinlite 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 bitcoinlite.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</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 bitcoinlite 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="+7"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</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="+55"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+149"/>
<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 bitcoinlite.</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 type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+231"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the bitcoinlite network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-160"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-107"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<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="+20"/>
<source>Total:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-108"/>
<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 line="-29"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+113"/>
<location line="+1"/>
<source>out of sync</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 type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</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="+348"/>
<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 bitcoinlite-Qt help message to get a list with possible bitcoinlite 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>bitcoinlite - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>bitcoinlite 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 bitcoinlite 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="-33"/>
<source>Welcome to the bitcoinlite 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="+182"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>123.456 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a bitcoinlite address (e.g. <API key>)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<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>
<message>
<location line="+251"/>
<source>WARNING: Invalid bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</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="+24"/>
<location filename="../sendcoinsentry.cpp" line="+25"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to send the payment to (e.g. <API key>)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</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 bitcoinlite address (e.g. <API key>)</source>
<translation type="unfinished"/>
</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"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<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="+203"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<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="+24"/>
<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 bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<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"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<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 bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<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 bitcoinlite address (e.g. <API key>)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter bitcoinlite 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>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+19"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+8"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</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></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation type="unfinished"/>
</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 type="unfinished"/>
</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></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 20 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="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation type="unfinished"/>
</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="-211"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../forms/<API key>.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../<API key>.cpp" line="+226"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+190"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+55"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+144"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+206"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+33"/>
<source>bitcoinlite version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or bitcoinlited</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: bitcoinlite.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: bitcoinlited.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 21347 or testnet: 31347)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Stake your coins to support network and gain reward (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Detach block and address databases. Increases shutdown time (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<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="-5"/>
<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="-87"/>
<source>Listen for JSON-RPC connections on <port> (default: 21348 or testnet: 31348)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Error: Transaction creation failed </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-8"/>
<source>Importing blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Importing bootstrap blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<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="+117"/>
<source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<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="+61"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong bitcoinlite will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<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="-18"/>
<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="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-90"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+83"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-82"/>
<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="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<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="+1"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<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="+28"/>
<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="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<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="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+57"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=bitcoinliterpc
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 "bitcoinlite Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</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="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<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>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<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 type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+53"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-158"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+95"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot obtain a lock on data directory %s. bitcoinlite is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-98"/>
<source>bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+140"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart bitcoinlite to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<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="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: could not start node</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Unable to bind to %s on this computer. bitcoinlite is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-97"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot initialize keypool</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<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>
|
// var isWaiting = false;
// var isRunning = false;
// var seconds = 10;
// var countdownTimer;
// var finalCountdown = false;
function GameTimer(game) {
this.seconds = game.timelimit;
this.secondPassed = function() {
if (this.seconds === 0 && !game.gameOver) {
game.endGame();
} else if (!game.gameOver) {
this.seconds
$("#timer_num").html(this.seconds);
}
}
var countdownTimer = setInterval('t.secondPassed()', 1000);
}
|
Click With Me Now
===========
This is an integration between Interactive Intelligence's CIC platform and Click With Me Now.
See the [wiki](https://github.com/<API key>/ClickWithMeNow/wiki) for more information.
Visit CWMN at http://clickwithmenow.com
|
package uk.gov.prototype.vitruvius.parser.validator;
import java.util.List;
public class ValidationMessage {
private String message;
private ValidationType type;
public ValidationMessage() {
}
public ValidationMessage(String message, ValidationType type) {
this.message = message;
this.type = type;
}
public String getMessage() {
return message;
}
public ValidationType getType() {
return type;
}
@Override
public String toString() {
return "ValidationMessage{" +
"message='" + message + '\'' +
", type=" + type +
'}';
}
public enum ValidationType {
ERROR,
WARNING
}
public static ValidationMessage createErrorMessage(String message) {
return new ValidationMessage(message, ValidationType.ERROR);
}
public static ValidationMessage createWarning(String message) {
return new ValidationMessage(message, ValidationType.WARNING);
}
public static boolean hasErrors(List<ValidationMessage> messages) {
for (ValidationMessage validationMessage : messages) {
if (validationMessage.getType() == ValidationType.ERROR) {
return true;
}
}
return false;
}
}
|
/* global Cervus */
const material = new Cervus.materials.PhongMaterial({
requires: [
Cervus.components.Render,
Cervus.components.Transform
],
texture: Cervus.core.image_loader('../textures/4.png'),
normal_map: Cervus.core.image_loader('../textures/normal2.jpg')
});
const phong_material = new Cervus.materials.PhongMaterial({
requires: [
Cervus.components.Render,
Cervus.components.Transform
]
});
const game = new Cervus.core.Game({
width: window.innerWidth,
height: window.innerHeight,
// clear_color: 'f0f'
// fps: 1
});
game.camera.get_component(Cervus.components.Move).keyboard_controlled = true;
// game.camera.get_component(Cervus.components.Move).mouse_controlled = true;
// By default all entities face the user.
// Rotate the camera to see the scene.
const camera_transform = game.camera.get_component(Cervus.components.Transform);
camera_transform.position = [0, 2, 5];
camera_transform.rotate_rl(Math.PI);
// game.camera.keyboard_controlled = true;
const plane = new Cervus.shapes.Plane();
const plane_transform = plane.get_component(Cervus.components.Transform);
const plane_render = plane.get_component(Cervus.components.Render);
plane_transform.scale = [100, 1, 100];
plane_render.material = phong_material;
plane_render.color = "#eeeeee";
game.add(plane);
const cube = new Cervus.shapes.Box();
const cube_transform = cube.get_component(Cervus.components.Transform);
const cube_render = cube.get_component(Cervus.components.Render);
cube_render.material = material;
cube_render.color = "#00ff00";
cube_transform.position = [0, 0.5, -1];
const group = new Cervus.core.Entity({
components: [
new Cervus.components.Transform()
]
});
game.add(group);
group.add(cube);
game.on('tick', () => {
// group.get_component(Cervus.components.Transform).rotate_rl(16/1000);
game.light.get_component(Cervus.components.Transform).position = game.camera.get_component(Cervus.components.Transform).position;
});
|
#!/bin/mksh
set -eu
printf "%s\n\n" 'Content-type: text/plain'
# Optional with use of 'check_interval'
WANTED_INTERVAL='10'
USER="$( /usr/bin/whoami )"
HOMES_DIR='/home'
WWW_DIR="/var/www/virtual/${USER}"
HOME="${HOMES_DIR}/${USER}"
VAR_DIR="${HOME}/var/git-publish"
SRC_DIR="${HOME}/git"
function identify_service {
case "${HTTP_USER_AGENT}" in
send_post_manual)
printf "%s\n" 'Service identified as send_post_manual. Hi!'
. "${VAR_DIR}"/read_post_manual
;;
|
#!/usr/bin/env python
import pygame
pygame.display.init()
pygame.font.init()
modes_list = pygame.display.list_modes()
#screen = pygame.display.set_mode(modes_list[0], pygame.FULLSCREEN) # the highest resolution with fullscreen
screen = pygame.display.set_mode(modes_list[-1]) # the lowest resolution
background_color = (255, 255, 255)
screen.fill(background_color)
font = pygame.font.Font(pygame.font.get_default_font(), 22)
text_surface = font.render("Hello world!", True, (0,0,0))
screen.blit(text_surface, (0,0)) # paste the text at the top left corner of the window
pygame.display.flip() # display the image
while True: # main loop (event loop)
event = pygame.event.wait()
if(event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE)):
break
|
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
// copies or substantial portions of the Software.
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// 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.
#pragma once
#include <memory>
#include <vector>
#include <mutex>
#include <vulkan/vulkan.h>
#include <pumex/Export.h>
#include <pumex/PerObjectData.h>
namespace pumex
{
class Descriptor;
class RenderContext;
struct PUMEX_EXPORT DescriptorValue
{
enum Type { Undefined, Image, Buffer };
DescriptorValue();
DescriptorValue(VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range);
DescriptorValue(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout);
Type vType;
union
{
<API key> bufferInfo;
<API key> imageInfo;
};
};
// Resource is an object stored in a descriptor ( SampledImage, UniformBuffer, etc. )
class PUMEX_EXPORT Resource : public std::<API key><Resource>
{
public:
Resource(PerObjectBehaviour perObjectBehaviour, <API key> <API key>);
virtual ~Resource();
void addDescriptor(std::shared_ptr<Descriptor> descriptor);
void removeDescriptor(std::shared_ptr<Descriptor> descriptor);
// <API key>() is called to inform the scenegraph that validate() needs to be called
virtual void <API key>();
// notifyDescriptors() is called from within validate() when some serious change in resource occured
// ( getDescriptorValue() will return new values, so <API key> must be called by DescriptorSet ).
virtual void notifyDescriptors(const RenderContext& renderContext);
virtual std::pair<bool,VkDescriptorType> <API key>();
virtual void validate(const RenderContext& renderContext) = 0;
virtual DescriptorValue getDescriptorValue(const RenderContext& renderContext) = 0;
protected:
mutable std::mutex mutex;
std::vector<std::weak_ptr<Descriptor>> descriptors;
PerObjectBehaviour perObjectBehaviour;
<API key> <API key>;
uint32_t activeCount;
};
}
|
/**
* Correct `block` display not defined in IE 8/9.
*/
/* line 11, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 8/9.
*/
/* line 30, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
audio,
canvas,
video {
display: inline-block;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
/* line 41, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9.
* Hide the `template` element in IE, Safari, and Firefox < 22.
*/
/* line 51, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
[hidden],
template {
display: none;
}
/* line 56, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
script {
display: none !important;
}
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
/* line 70, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-<API key>: 100%;
}
/**
* Remove default margin.
*/
/* line 80, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
body {
margin: 0;
}
/**
* Remove the gray background color from active links in IE 10.
*/
/* line 92, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
a {
background: transparent;
}
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
/* line 100, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
/* line 108, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
a:active,
a:hover {
outline: 0;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/
/* line 122, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
*/
/* line 131, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
/* line 139, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
/* line 148, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
*/
/* line 156, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 8/9.
*/
/* line 166, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
mark {
background: #ff0;
color: #000;
}
/**
* Correct font family set oddly in Safari 5 and Chrome.
*/
/* line 175, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
/* line 187, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
pre {
white-space: pre-wrap;
}
/**
* Set consistent quote types.
*/
/* line 195, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/**
* Address inconsistent and variable font size in all browsers.
*/
/* line 203, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
/* line 211, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
/* line 219, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
sup {
top: -0.5em;
}
/* line 223, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
sub {
bottom: -0.25em;
}
/**
* Remove border when inside `a` element in IE 8/9.
*/
/* line 235, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
img {
border: 0;
}
/**
* Correct overflow displayed oddly in IE 9.
*/
/* line 243, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
svg:not(:root) {
overflow: hidden;
}
/**
* Address margin not present in IE 8/9 and Safari 5.
*/
/* line 255, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
figure {
margin: 0;
}
/**
* Define consistent border, margin, and padding.
*/
/* line 267, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
/* line 278, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
legend {
border: 0;
padding: 0;
}
/**
* 1. Correct font family not being inherited in all browsers.
* 2. Correct font size not being inherited in all browsers.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
*/
/* line 289, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
input,
select,
textarea {
font-family: inherit;
font-size: 100%;
margin: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
/* line 303, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
/* line 315, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
/* line 328, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
/**
* Re-set default cursor for disabled elements.
*/
/* line 340, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to `content-box` in IE 8/9.
* 2. Remove excess padding in IE 8/9.
*/
/* line 350, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
/* line 362, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
/* line 374, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
input[type="search"]::-<API key>,
input[type="search"]::-<API key> {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
/* line 383, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 8/9.
* 2. Improve readability and alignment in all browsers.
*/
/* line 394, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
textarea {
overflow: auto;
vertical-align: top;
}
/**
* Remove most spacing between table cells.
*/
/* line 407, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
table {
border-collapse: collapse;
border-spacing: 0;
}
|
yii-lazy-image
===========
Lazy image loader for the Yii framework. It is implemented as a static class which leverages [jQuery Unveil](http://luis-almeida.github.io/unveil/) to load images lazily. The interface is the same as `CHtml::image()` so existing code can easily be adapted to use it.
## Usage
Require the project in your `composer.json`, then use it like this:
php
echo \yiilazyimage\components\LazyImage::image($url, $alt, $htmlOptions);
This project is licensed under the MIT license
|
import asyncio
import asyncio.subprocess
import datetime
import logging
from collections import OrderedDict, defaultdict
from typing import Any, Awaitable, Dict, List, Optional, Union # noqa
from urllib.parse import urlparse
from aiohttp import web
import yacron.version
from yacron.config import (
JobConfig,
parse_config,
ConfigError,
parse_config_string,
WebConfig,
)
from yacron.job import RunningJob, JobRetryState
from crontab import CronTab # noqa
logger = logging.getLogger("yacron")
WAKEUP_INTERVAL = datetime.timedelta(minutes=1)
def naturaltime(seconds: float, future=False) -> str:
assert future
if seconds < 120:
return "in {} second{}".format(
int(seconds), "s" if seconds >= 2 else ""
)
minutes = seconds / 60
if minutes < 120:
return "in {} minute{}".format(
int(minutes), "s" if minutes >= 2 else ""
)
hours = minutes / 60
if hours < 48:
return "in {} hour{}".format(int(hours), "s" if hours >= 2 else "")
days = hours / 24
return "in {} day{}".format(int(days), "s" if days >= 2 else "")
def get_now(timezone: Optional[datetime.tzinfo]) -> datetime.datetime:
return datetime.datetime.now(timezone)
def next_sleep_interval() -> float:
now = get_now(datetime.timezone.utc)
target = now.replace(second=0) + WAKEUP_INTERVAL
return (target - now).total_seconds()
def create_task(coro: Awaitable) -> asyncio.Task:
return asyncio.get_event_loop().create_task(coro)
def web_site_from_url(runner: web.AppRunner, url: str) -> web.BaseSite:
parsed = urlparse(url)
if parsed.scheme == "http":
assert parsed.hostname is not None
assert parsed.port is not None
return web.TCPSite(runner, parsed.hostname, parsed.port)
elif parsed.scheme == "unix":
return web.UnixSite(runner, parsed.path)
else:
logger.warning(
"Ignoring web listen url %s: scheme %r not supported",
url,
parsed.scheme,
)
raise ValueError(url)
class Cron:
def __init__(
self, config_arg: Optional[str], *, config_yaml: Optional[str] = None
) -> None:
# list of cron jobs we /want/ to run
self.cron_jobs = OrderedDict() # type: Dict[str, JobConfig]
# list of cron jobs already running
# name -> list of RunningJob
self.running_jobs = defaultdict(
list
) # type: Dict[str, List[RunningJob]]
self.config_arg = config_arg
if config_arg is not None:
self.update_config()
if config_yaml is not None:
# config_yaml is for unit testing
config, _, _ = parse_config_string(config_yaml, "")
self.cron_jobs = OrderedDict((job.name, job) for job in config)
self.<API key> = None # type: Optional[asyncio.Task]
self._stop_event = asyncio.Event()
self._jobs_running = asyncio.Event()
self.retry_state = {} # type: Dict[str, JobRetryState]
self.web_runner = None # type: Optional[web.AppRunner]
self.web_config = None # type: Optional[WebConfig]
async def run(self) -> None:
self.<API key> = create_task(
self.<API key>()
)
startup = True
while not self._stop_event.is_set():
try:
web_config = self.update_config()
await self.start_stop_web_app(web_config)
except ConfigError as err:
logger.error(
"Error in configuration file(s), so not updating "
"any of the config.:\n%s",
str(err),
)
except Exception: # pragma: nocover
logger.exception("please report this as a bug (1)")
await self.spawn_jobs(startup)
startup = False
sleep_interval = next_sleep_interval()
logger.debug("Will sleep for %.1f seconds", sleep_interval)
try:
await asyncio.wait_for(self._stop_event.wait(), sleep_interval)
except asyncio.TimeoutError:
pass
logger.info("Shutting down (after currently running jobs finish)...")
while self.retry_state:
cancel_all = [
self.cancel_job_retries(name) for name in self.retry_state
]
await asyncio.gather(*cancel_all)
await self.<API key>
if self.web_runner is not None:
logger.info("Stopping http server")
await self.web_runner.cleanup()
def signal_shutdown(self) -> None:
logger.debug("Signalling shutdown")
self._stop_event.set()
def update_config(self) -> Optional[WebConfig]:
if self.config_arg is None:
return None
config, web_config = parse_config(self.config_arg)
self.cron_jobs = OrderedDict((job.name, job) for job in config)
return web_config
async def _web_get_version(self, request: web.Request) -> web.Response:
return web.Response(text=yacron.version.version)
async def _web_get_status(self, request: web.Request) -> web.Response:
out = []
for name, job in self.cron_jobs.items():
running = self.running_jobs.get(name, None)
if running:
out.append(
{
"job": name,
"status": "running",
"pid": [
runjob.proc.pid
for runjob in running
if runjob.proc is not None
],
}
)
else:
crontab = job.schedule # type: Union[CronTab, str]
now = get_now(job.timezone)
out.append(
{
"job": name,
"status": "scheduled",
"scheduled_in": (
crontab.next(now=now, default_utc=job.utc)
if isinstance(crontab, CronTab)
else str(crontab)
),
}
)
if request.headers.get("Accept") == "application/json":
return web.json_response(out)
else:
lines = []
for jobstat in out: # type: Dict[str, Any]
if jobstat["status"] == "running":
status = "running (pid: {pid})".format(
pid=", ".join(str(pid) for pid in jobstat["pid"])
)
else:
status = "scheduled ({})".format(
(
jobstat["scheduled_in"]
if type(jobstat["scheduled_in"]) is str
else naturaltime(
jobstat["scheduled_in"], future=True
)
)
)
lines.append(
"{name}: {status}".format(
name=jobstat["job"], status=status
)
)
return web.Response(text="\n".join(lines))
async def _web_start_job(self, request: web.Request) -> web.Response:
name = request.match_info["name"]
try:
job = self.cron_jobs[name]
except KeyError:
raise web.HTTPNotFound()
await self.maybe_launch_job(job)
return web.Response()
async def start_stop_web_app(self, web_config: Optional[WebConfig]):
if self.web_runner is not None and (
web_config is None or web_config != self.web_config
):
# assert self.web_runner is not None
logger.info("Stopping http server")
await self.web_runner.cleanup()
self.web_runner = None
if (
web_config is not None
and web_config["listen"]
and self.web_runner is None
):
app = web.Application()
app.add_routes(
[
web.get("/version", self._web_get_version),
web.get("/status", self._web_get_status),
web.post("/jobs/{name}/start", self._web_start_job),
]
)
self.web_runner = web.AppRunner(app)
await self.web_runner.setup()
for addr in web_config["listen"]:
site = web_site_from_url(self.web_runner, addr)
logger.info("web: started listening on %s", addr)
try:
await site.start()
except ValueError:
pass
self.web_config = web_config
async def spawn_jobs(self, startup: bool) -> None:
for job in self.cron_jobs.values():
if self.job_should_run(startup, job):
await self.<API key>(job)
@staticmethod
def job_should_run(startup: bool, job: JobConfig) -> bool:
if (
startup
and isinstance(job.schedule, str)
and job.schedule == "@reboot"
):
logger.debug(
"Job %s (%s) is scheduled for startup (@reboot)",
job.name,
job.schedule_unparsed,
)
return True
elif isinstance(job.schedule, CronTab):
crontab = job.schedule # type: CronTab
if crontab.test(get_now(job.timezone).replace(second=0)):
logger.debug(
"Job %s (%s) is scheduled for now",
job.name,
job.schedule_unparsed,
)
return True
else:
logger.debug(
"Job %s (%s) not scheduled for now",
job.name,
job.schedule_unparsed,
)
return False
else:
return False
async def <API key>(self, job: JobConfig) -> None:
await self.cancel_job_retries(job.name)
assert job.name not in self.retry_state
retry = job.onFailure["retry"]
logger.debug("Job %s retry config: %s", job.name, retry)
if retry["maximumRetries"]:
retry_state = JobRetryState(
retry["initialDelay"],
retry["backoffMultiplier"],
retry["maximumDelay"],
)
self.retry_state[job.name] = retry_state
await self.maybe_launch_job(job)
async def maybe_launch_job(self, job: JobConfig) -> None:
if self.running_jobs[job.name]:
logger.warning(
"Job %s: still running and concurrencyPolicy is %s",
job.name,
job.concurrencyPolicy,
)
if job.concurrencyPolicy == "Allow":
pass
elif job.concurrencyPolicy == "Forbid":
return
elif job.concurrencyPolicy == "Replace":
for running_job in self.running_jobs[job.name]:
await running_job.cancel()
else:
raise AssertionError # pragma: no cover
logger.info("Starting job %s", job.name)
running_job = RunningJob(job, self.retry_state.get(job.name))
await running_job.start()
self.running_jobs[job.name].append(running_job)
logger.info("Job %s spawned", job.name)
self._jobs_running.set()
# continually watches for the running jobs, clean them up when they exit
async def <API key>(self) -> None:
# job -> wait task
wait_tasks = {} # type: Dict[RunningJob, asyncio.Task]
while self.running_jobs or not self._stop_event.is_set():
try:
for jobs in self.running_jobs.values():
for job in jobs:
if job not in wait_tasks:
wait_tasks[job] = create_task(job.wait())
if not wait_tasks:
try:
await asyncio.wait_for(self._jobs_running.wait(), 1)
except asyncio.TimeoutError:
pass
continue
self._jobs_running.clear()
# wait for at least one task with timeout
done_tasks, _ = await asyncio.wait(
wait_tasks.values(),
timeout=1.0,
return_when=asyncio.FIRST_COMPLETED,
)
done_jobs = set()
for job, task in list(wait_tasks.items()):
if task in done_tasks:
done_jobs.add(job)
for job in done_jobs:
task = wait_tasks.pop(job)
try:
task.result()
except Exception: # pragma: no cover
logger.exception("please report this as a bug (2)")
jobs_list = self.running_jobs[job.config.name]
jobs_list.remove(job)
if not jobs_list:
del self.running_jobs[job.config.name]
fail_reason = job.fail_reason
logger.info(
"Job %s exit code %s; has stdout: %s, "
"has stderr: %s; fail_reason: %r",
job.config.name,
job.retcode,
str(bool(job.stdout)).lower(),
str(bool(job.stderr)).lower(),
fail_reason,
)
if fail_reason is not None:
await self.handle_job_failure(job)
else:
await self.handle_job_success(job)
except asyncio.CancelledError:
raise
except Exception: # pragma: no cover
logger.exception("please report this as a bug (3)")
await asyncio.sleep(1)
async def handle_job_failure(self, job: RunningJob) -> None:
if self._stop_event.is_set():
return
if job.stdout:
logger.info(
"Job %s STDOUT:\n%s", job.config.name, job.stdout.rstrip()
)
if job.stderr:
logger.info(
"Job %s STDERR:\n%s", job.config.name, job.stderr.rstrip()
)
await job.report_failure()
# Handle retries...
state = job.retry_state
if state is None or state.cancelled:
await job.<API key>()
return
logger.debug(
"Job %s has been retried %i times", job.config.name, state.count
)
if state.task is not None:
if state.task.done():
await state.task
else:
state.task.cancel()
retry = job.config.onFailure["retry"]
if (
state.count >= retry["maximumRetries"]
and retry["maximumRetries"] != -1
):
await self.cancel_job_retries(job.config.name)
await job.<API key>()
else:
retry_delay = state.next_delay()
state.task = create_task(
self.schedule_retry_job(
job.config.name, retry_delay, state.count
)
)
async def schedule_retry_job(
self, job_name: str, delay: float, retry_num: int
) -> None:
logger.info(
"Cron job %s scheduled to be retried (#%i) " "in %.1f seconds",
job_name,
retry_num,
delay,
)
await asyncio.sleep(delay)
try:
job = self.cron_jobs[job_name]
except KeyError:
logger.warning(
"Cron job %s was scheduled for retry, but "
"disappeared from the configuration",
job_name,
)
await self.maybe_launch_job(job)
async def handle_job_success(self, job: RunningJob) -> None:
await self.cancel_job_retries(job.config.name)
await job.report_success()
async def cancel_job_retries(self, name: str) -> None:
try:
state = self.retry_state.pop(name)
except KeyError:
return
state.cancelled = True
if state.task is not None:
if state.task.done():
await state.task
else:
state.task.cancel()
|
layout: single
title: ""
date: 2018-10-10 21:30:00 +0800
categories: [Leetcode]
tags: [Greedy, Array]
permalink: /problems/<API key>/
## 1013. (Easy)
{% raw %}
<p> <code>arr</code> <strong></strong> <code>true</code> <code>false</code></p>
<p> <code>i + 1 < j</code> <code>(arr[0] + arr[1] + ... + arr[i] == arr[i + 1] + arr[i + 2] + ... + arr[j - 1] == arr[j] + arr[j + 1] + ... + arr[arr.length - 1])</code> </p>
<p> </p>
<p><strong> 1</strong></p>
<pre>
<strong></strong>arr = [0,2,1,-6,6,-7,9,1,2,0,1]
<strong></strong>true
<strong></strong>0 + 2 + 1 = -6 + 6 - 7 + 9 + 1 = 2 + 0 + 1
</pre>
<p><strong> 2</strong></p>
<pre>
<strong></strong>arr = [0,2,1,-6,6,7,9,-1,2,0,1]
<strong></strong>false
</pre>
<p><strong> 3</strong></p>
<pre>
<strong></strong>arr = [3,3,6,5,-2,2,5,1,-9,4]
<strong></strong>true
<strong></strong>3 + 3 = 6 = 5 - 2 + 2 + 5 + 1 - 9 + 4
</pre>
<p> </p>
<p><strong></strong></p>
<ul>
<li><code>3 <= arr.length <= 5 * 10<sup>4</sup></code></li>
<li><code>-10<sup>4</sup> <= arr[i] <= 10<sup>4</sup></code></li>
</ul>
{% endraw %}
[[](https://github.com/awesee/leetcode/tree/main/tag/greedy/README.md)]
[[](https://github.com/awesee/leetcode/tree/main/tag/array/README.md)]
|
const SELECTOR_BOOK_IMAGE = '#default > div > div > div > div > section > div:nth-child(2) > ol > li:nth-child(1) > article > div.image_container > a > img';
const puppeteer = require('puppeteer');
let scrapeSite1 = async (browser) => {
const page = await browser.newPage();
await page.goto('http://books.toscrape.com/');
await page.waitFor(1000);
await page.click(SELECTOR_BOOK_IMAGE);
await page.waitFor(2000);
const result = await page.evaluate(() => {
let title = document.querySelector('h1').innerText;
let price = document.querySelector('.price_color').innerText;
return {
title,
price
}
});
return result;
}
let scrape = async () => {
const browser = await puppeteer.launch({ headless: false });
const result = await Promise.all([
scrapeSite1(browser),
scrapeSite1(browser),
scrapeSite1(browser),
scrapeSite1(browser),
scrapeSite1(browser)
]);
await browser.close();
return result;
};
scrape().then((value) => {
console.log(value); // Success!
});
|
# Command Bus
- [Introduction](#introduction)
- [Creating Commamnds](#creating-commands)
- [Dispatching Commamnds](#<API key>)
- [Queued Commands](#queued-commands)
<a name="introduction"></a>
## Introduction
The Laravel command bus provides a convenient method of encapsulating tasks your application needs to perform into simple, easy to understand "commands". To help us understand the purpose of commands, let's pretend we are building an application that allows users to purchase podcasts.
When a user purchases a podcast, there are a variety of things that need to happen. For example, we may need to charge the user's credit card, add a record to our database that represents the purchase, and send a confirmation e-mail of the purchase. Perhaps we also need to perform some kind of validation as to whether the user is allowed to purchase podcasts.
We could put all of this logic inside a controller method; however, this has several disadvantages. The first disadvantage is that our controller probably handles several other incoming HTTP actions, and including complicated logic in each controller method will soon bloat our controller and make it harder to read. Secondly, it is difficult to re-use the purchase podcast logic outside of the controller context. Thirdly, it is more difficult to unit-test the command as we must also generate a stub HTTP request and make a full request to the application to test the purchase podcast logic.
Instead of putting this logic in the controller, we may choose to encapsulte it within a "command" object, such as a `PurchasePodcast` command.
<a name="creating-commands"></a>
## Creating Commands
The Artisan CLI can generate new command classes using the `make:command` command:
php artisan make:command PurchasePodcast
The newly generated class will be placed in the `app/Commands` directory. By default, the command contains two methods: the constructor and the `handle` method. Of course, the constructor allows you to pass any relevant objects to the command, while the `handle` method executes the command. For example:
class PurchasePodcast extends Command implements SelfHandling {
protected $user, $podcast;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(User $user, Podcast $pocast)
{
$this->user = $user;
$this->podcast = $podcast;
}
/**
* Execute the command.
*
* @return void
*/
public function handle()
{
// Handle the logic to purchase the podcast...
event(new PodcastWasPurchased($this->user, $this->podcast));
}
}
The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/master/container). For example:
/**
* Execute the command.
*
* @return void
*/
public function handle(BillingGateway $billing)
{
// Handle the logic to purchase the podcast...
}
<a name="<API key>"></a>
## Dispatching Commands
So, once we have created a command, how do we dispatch it? Of course, we could call the `handle` method directly; however, dispatching the command through the Laravel "command bus" has several advantages which we will discuss later.
If you glance at your application's base controller, you will see the `DispatchesCommands` trait. This trait allows us to call the `dispatch` method from any of our controllers. For example:
public function purchasePodcast($podcastId)
{
$this->dispatch(
new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId))
);
}
The command bus will take care of executing the command and calling the IoC container to inject any needed dependencies into the `handle` method.
You may add the `Illuminate\Foundation\Bus\DispatchesCommands` trait to any class you wish. If you would like to receive a command bus instance through the constructor of any of your classes, you may type-hint the `Illuminate\Contracts\Bus\Dispatcher` interface. Finally, you may also use the `Bus` facade to quickly dispatch commands:
Bus::dispatch(
new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId))
);
Mapping Command Properties From Requests
It is very common to map HTTP request variables into commands. So, instead of forcing you to do this manually for each request, Laravel provides some helper methods to make it a cinch. Let's take a look at the `dispatchFrom` method available on the `DispatchesCommands` trait:
$this->dispatchFrom('Command\Class\Name', $request);
This method will examine the constructor of the command class it is given, and then extract variables from the HTTP request (or any other `ArrayAccess` object) to fill the needed constructor parameters of the command. So, if our command class accepts a `firstName` variable in its constructor, the command bus will attempt to pull the `firstName` parameter from the HTTP request.
You may also pass an array as the third argument to the `dispatchFrom` method. This array will be used to fill any constructor parameters that are not available on the request:
$this->dispatchFrom('Command\Class\Name', $request, [
'firstName' => 'Taylor',
]);
<a name="queued-commands"></a>
## Queued Commands
The command bus is not just for synchronous jobs that run during the current request cycle, but also serves as the primary way to build queued jobs in Laravel. So, how do we instruct command bus to queue our job for background processing instead of running it synchronously? It's easy. Firstly, when generating a new command, just add the `--queued` flag to the command:
php artisan make:command PurchasePodcast --queued
As you will see, this adds a few more features to the command, namely the `Illuminate\Contracts\Queue\ShouldBeQueued` interface and the `SerializesModels` trait. These instruct the command bus to queue the command, as well as gracefully serialize and deserialize any Eloquent models your command stores as properties.
If you would like to convert an existing command into a queued command, simply implement the `Illuminate\Contracts\Queue\ShouldBeQueued` interface on the class manually. It contains no methods, and merely serves as a "marker interface" for the dispatcher.
Then, just write your command normally. When you dispatch it to the bus that bus will automatically queue the command for background processing. It doesn't get any easier than that.
For more information on interacting with queued commands, view the full [queue documentation](/docs/master/queues).
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Soluble\FlexStore\Source\<API key> | Soluble API</title>
<link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../../../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../../../css/sami.css">
<script src="../../../js/jquery-1.11.1.min.js"></script>
<script src="../../../js/bootstrap.min.js"></script>
<script src="../../../js/typeahead.min.js"></script>
<script src="../../../sami.js"></script>
</head>
<body id="class" data-name="class:<API key>" data-root-path="../../../">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form id="search-form" action="../../../search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../../index.html">Soluble API</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../traits.html">Traits</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
<li><a href="../../../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="<API key>">
<ol class="breadcrumb">
<li><span class="label label-default">interface</span></li>
<li><a href="../../../Soluble.html">Soluble</a></li>
<li><a href="../../../Soluble/FlexStore.html">FlexStore</a></li>
<li><a href="../../../Soluble/FlexStore/Source.html">Source</a></li>
<li><API key></li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1><API key></h1>
</div>
<p> interface
<strong><API key></strong></p>
<h2>Methods</h2>
<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#<API key>">getQueryString</a>()
<p>Return underlying query (sql) string</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="<API key>">
<div class="location">at line 10</div>
<code> string
<strong>getQueryString</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Return underlying query (sql) string</p> </div>
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
</div>
</div>
</div>
</body>
</html>
|
<?php
class <API key> implements <API key>
{
private static $<API key> = array(
'var_dump',
'print_r',
'var_export',
'trigger_error',
'header',
'<API key>',
'xdebug_debug_zval',
'<API key>',
'xdebug_var_dump',
'xdebug_break',
'set_error_handler',
'<API key>',
);
/**
* Returns an array of tokens this test wants to listen for.
*
* @return array
*/
public function register()
{
return array(
T_STRING,
);
}
/**
* Processes this test, when one of its tokens is encountered.
*
* @param <API key> $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token in
* the stack passed in $tokens.
*
* @return void
*/
public function process(<API key> $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
$content = $tokens[$stackPtr]['content'];
if (in_array(strtolower($content), self::$<API key>)) {
//Checking previous token as it could be a static method or object method
$previousTokenPtr = $phpcsFile->findPrevious(<API key>::$emptyTokens, $stackPtr - 1, null, true);
if (!is_null($previousTokenPtr)) {
switch($tokens[$previousTokenPtr]['code']) {
case T_OBJECT_OPERATOR:
case T_DOUBLE_COLON:
return;
}
}
$error = 'Disallowed function "%s" was called';
$data = array($content);
$phpcsFile->addError($error, $stackPtr, '<API key>', $data);
}
}
}
|
using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;
namespace MailUI.Converters
{
[ValueConversion(typeof(DirectoryInfo), typeof(FileInfo[]))]
public class <API key> : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
{
return null;
}
if (value is DirectoryInfo)
{
return ((DirectoryInfo) value).GetFiles();
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new <API key>();
}
}
}
|
#region Lock Object against files
#region Initial File Creation
$File = 'C:\users\proxb\desktop\test.log'
'1,2,3,4' | Out-File $File
#endregion Initial File Creation
#region Take lock and attempt to update file in runspace
$LockTaken = $null
[System.Threading.Monitor]::TryEnter($File, [ref]$LockTaken)
If ($LockTaken) {
[powershell]::Create().AddScript({
Param($File,$RSHost)
$LockTaken = $Null
[System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken)
If ($LockTaken) {
'5,6,7,8' | Out-File $File -Append
} Else {
$RSHost.ui.WriteWarningLine("[RUNSPACE1] Unable to take lock and update file!")
}
}).AddArgument($File).AddArgument($Host).Invoke()
[System.Threading.Monitor]::Exit($File)
}
#endregion Take lock and attempt to update file in runspace
#region Take lock in Runspace and update file
[powershell]::Create().AddScript({
Param($File,$RSHost)
$LockTaken = $Null
[System.Threading.Monitor]::TryEnter($File,[ref]$LockTaken)
If ($LockTaken) {
'9,10,11,12' | Out-File $File -Append
} Else {
$RSHost.ui.WriteWarningLine("[RUNSPACE2] Unable to take lock and update file!")
}
}).AddArgument($File).AddArgument($Host).Invoke()
$LockTaken = $null
[System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken)
If ($LockTaken) {
'13,14,15,16' | Out-File $File -Append
} Else {
Write-Warning "[HOST] Unable to take lock and update file!"
}
#endregion Take lock in Runspace and update file
#endregion Lock Object against files
|
<?php
namespace GS\UsuarioBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Lecturaconproposito
*
* @ORM\Table(name="lecturaconproposito", indexes={@ORM\Index(name="<API key>", columns={"bibliografia"})})
* @ORM\Entity
*/
class Lecturaconproposito
{
/**
* @var string
*
* @ORM\Column(name="<API key>", type="string", length=10, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $<API key>;
/**
* @var string
*
* @ORM\Column(name="propositoGeneral", type="text", nullable=false)
*/
private $propositogeneral;
/**
* @var string
*
* @ORM\Column(name="tituloSubcapitulos", type="text", nullable=true)
*/
private $titulosubcapitulos;
/**
* @var boolean
*
* @ORM\Column(name="resumen", type="boolean", nullable=false)
*/
private $resumen;
/**
* @var boolean
*
* @ORM\Column(name="<API key>", type="boolean", nullable=false)
*/
private $<API key>;
/**
* @var boolean
*
* @ORM\Column(name="glosario", type="boolean", nullable=false)
*/
private $glosario;
/**
* @var string
*
* @ORM\Column(name="secciones", type="text", nullable=true)
*/
private $secciones;
/**
* @var string
*
* @ORM\Column(name="<API key>", type="text", nullable=true)
*/
private $<API key>;
/**
* @var string
*
* @ORM\Column(name="resumenLectura", type="text", nullable=true)
*/
private $resumenlectura;
/**
* @var string
*
* @ORM\Column(name="lecturaProposito", type="text", nullable=true)
*/
private $lecturaproposito;
/**
* @var string
*
* @ORM\Column(name="resumenSeccion", type="text", nullable=true)
*/
private $resumenseccion;
/**
* @var string
*
* @ORM\Column(name="preguntas", type="text", nullable=true)
*/
private $preguntas;
/**
* @var string
*
* @ORM\Column(name="recomendaciones", type="text", nullable=true)
*/
private $recomendaciones;
/**
* @var \DateTime
*
* @ORM\Column(name="fechaRegistro", type="datetime", nullable=false)
*/
private $fecharegistro;
/**
* @var \Bibliografia
*
* @ORM\ManyToOne(targetEntity="Bibliografia")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="bibliografia", <API key>="idbibliografia")
* })
*/
private $bibliografia;
/**
* Get <API key>
*
* @return string
*/
public function <API key>()
{
return $this-><API key>;
}
/**
* Set propositogeneral
*
* @param string $propositogeneral
* @return Lecturaconproposito
*/
public function setPropositogeneral($propositogeneral)
{
$this->propositogeneral = $propositogeneral;
return $this;
}
/**
* Get propositogeneral
*
* @return string
*/
public function getPropositogeneral()
{
return $this->propositogeneral;
}
/**
* Set titulosubcapitulos
*
* @param string $titulosubcapitulos
* @return Lecturaconproposito
*/
public function <API key>($titulosubcapitulos)
{
$this->titulosubcapitulos = $titulosubcapitulos;
return $this;
}
/**
* Get titulosubcapitulos
*
* @return string
*/
public function <API key>()
{
return $this->titulosubcapitulos;
}
/**
* Set resumen
*
* @param boolean $resumen
* @return Lecturaconproposito
*/
public function setResumen($resumen)
{
$this->resumen = $resumen;
return $this;
}
/**
* Get resumen
*
* @return boolean
*/
public function getResumen()
{
return $this->resumen;
}
/**
* Set <API key>
*
* @param boolean $<API key>
* @return Lecturaconproposito
*/
public function <API key>($<API key>)
{
$this-><API key> = $<API key>;
return $this;
}
/**
* Get <API key>
*
* @return boolean
*/
public function <API key>()
{
return $this-><API key>;
}
/**
* Set glosario
*
* @param boolean $glosario
* @return Lecturaconproposito
*/
public function setGlosario($glosario)
{
$this->glosario = $glosario;
return $this;
}
/**
* Get glosario
*
* @return boolean
*/
public function getGlosario()
{
return $this->glosario;
}
/**
* Set secciones
*
* @param string $secciones
* @return Lecturaconproposito
*/
public function setSecciones($secciones)
{
$this->secciones = $secciones;
return $this;
}
/**
* Get secciones
*
* @return string
*/
public function getSecciones()
{
return $this->secciones;
}
/**
* Set <API key>
*
* @param string $<API key>
* @return Lecturaconproposito
*/
public function <API key>($<API key>)
{
$this-><API key> = $<API key>;
return $this;
}
/**
* Get <API key>
*
* @return string
*/
public function <API key>()
{
return $this-><API key>;
}
/**
* Set resumenlectura
*
* @param string $resumenlectura
* @return Lecturaconproposito
*/
public function setResumenlectura($resumenlectura)
{
$this->resumenlectura = $resumenlectura;
return $this;
}
/**
* Get resumenlectura
*
* @return string
*/
public function getResumenlectura()
{
return $this->resumenlectura;
}
/**
* Set lecturaproposito
*
* @param string $lecturaproposito
* @return Lecturaconproposito
*/
public function setLecturaproposito($lecturaproposito)
{
$this->lecturaproposito = $lecturaproposito;
return $this;
}
/**
* Get lecturaproposito
*
* @return string
*/
public function getLecturaproposito()
{
return $this->lecturaproposito;
}
/**
* Set resumenseccion
*
* @param string $resumenseccion
* @return Lecturaconproposito
*/
public function setResumenseccion($resumenseccion)
{
$this->resumenseccion = $resumenseccion;
return $this;
}
/**
* Get resumenseccion
*
* @return string
*/
public function getResumenseccion()
{
return $this->resumenseccion;
}
/**
* Set preguntas
*
* @param string $preguntas
* @return Lecturaconproposito
*/
public function setPreguntas($preguntas)
{
$this->preguntas = $preguntas;
return $this;
}
/**
* Get preguntas
*
* @return string
*/
public function getPreguntas()
{
return $this->preguntas;
}
/**
* Set recomendaciones
*
* @param string $recomendaciones
* @return Lecturaconproposito
*/
public function setRecomendaciones($recomendaciones)
{
$this->recomendaciones = $recomendaciones;
return $this;
}
/**
* Get recomendaciones
*
* @return string
*/
public function getRecomendaciones()
{
return $this->recomendaciones;
}
/**
* Set fecharegistro
*
* @param \DateTime $fecharegistro
* @return Lecturaconproposito
*/
public function setFecharegistro($fecharegistro)
{
$this->fecharegistro = $fecharegistro;
return $this;
}
/**
* Get fecharegistro
*
* @return \DateTime
*/
public function getFecharegistro()
{
return $this->fecharegistro;
}
/**
* Set bibliografia
*
* @param \GS\UsuarioBundle\Entity\Bibliografia $bibliografia
* @return Lecturaconproposito
*/
public function setBibliografia(\GS\UsuarioBundle\Entity\Bibliografia $bibliografia = null)
{
$this->bibliografia = $bibliografia;
return $this;
}
/**
* Get bibliografia
*
* @return \GS\UsuarioBundle\Entity\Bibliografia
*/
public function getBibliografia()
{
return $this->bibliografia;
}
}
|
import pytest
@pytest.fixture
def <API key>(testapp, lab, award):
item = {
'award': award['@id'],
'lab': lab['@id'],
'<API key>': {
'assembly': 'GRCh38',
'chromosome': '11',
'start': 20000,
'end': 21000
},
'purpose': 'repression',
'category': 'deletion',
'method': 'CRISPR',
'zygosity': 'homozygous'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(testapp, lab, award):
item = {
'award': award['@id'],
'lab': lab['@id'],
'<API key>': {
'assembly': 'GRCh38',
'chromosome': '11',
'start': 20000,
'end': 21000
},
'purpose': 'repression',
'category': 'deletion',
'method': 'RNAi'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(testapp, lab, award, source, gene):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'introduced_gene': gene['@id'],
'purpose': 'expression',
'method': 'CRISPR',
'reagents': [
{
'source': source['@id'],
'identifier': 'sigma:ABC123'
}
]
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def crispr_deletion(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'deletion',
'purpose': 'repression',
'method': 'CRISPR'
}
@pytest.fixture
def crispr_deletion_1(testapp, lab, award, target):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'deletion',
'purpose': 'repression',
'method': 'CRISPR',
'<API key>': target['@id'],
'guide_rna_sequences': ['ACCGGAGA']
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def tale_deletion(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'deletion',
'purpose': 'repression',
'method': 'TALEN',
'zygosity': 'heterozygous'
}
@pytest.fixture
def crispr_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'CRISPR'
}
@pytest.fixture
def bombardment_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'<API key>': ['bombardment']
}
@pytest.fixture
def recomb_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'site-specific recombination'
}
@pytest.fixture
def transfection_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'<API key>': ['stable transfection']
}
@pytest.fixture
def crispri(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'CRISPR'
}
@pytest.fixture
def rnai(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'RNAi'
}
@pytest.fixture
def mutagen(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'mutagenesis',
'purpose': 'repression',
'method': 'mutagen treatment'
}
@pytest.fixture
def tale_replacement(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'replacement',
'purpose': 'characterization',
'method': 'TALEN',
'zygosity': 'heterozygous'
}
@pytest.fixture
def mpra(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'<API key>': ['transduction']
}
@pytest.fixture
def starr_seq(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'episome',
'purpose': 'characterization',
'<API key>': ['transient transfection']
}
@pytest.fixture
def introduced_elements(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'episome',
'purpose': 'characterization',
'<API key>': ['transient transfection'],
'introduced_elements': 'genomic DNA regions'
}
@pytest.fixture
def crispr_tag_1(testapp, lab, award, ctcf):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'CRISPR',
'<API key>': ctcf['@id'],
'introduced_tags': [{'name': 'mAID-mClover', 'location': 'C-terminal'}]
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def mpra_1(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'<API key>': ['transduction'],
'introduced_elements': 'synthesized DNA',
'<API key>': 'random'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def recomb_tag_1(testapp, lab, award, target, treatment_5, document):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'site-specific recombination',
'<API key>': target['@id'],
'<API key>': 'random',
'category': 'insertion',
'treatments': [treatment_5['@id']],
'documents': [document['@id']],
'introduced_tags': [{'name': 'eGFP', 'location': 'C-terminal'}]
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def rnai_1(testapp, lab, award, source, target):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'RNAi',
'reagents': [{'source': source['@id'], 'identifier': 'addgene:12345'}],
'rnai_sequences': ['ATTACG'],
'<API key>': target['@id']
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(lab, award):
return {
'modification_type': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'<API key>': 'some description'
}
@pytest.fixture
def <API key>(lab, award):
return {
'modification_type': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'<API key>': 'some description',
'<API key>': 'homozygous',
'<API key>': 'tagging',
'<API key>': [],
'<API key>': [{
'chromosome': '11',
'start': 5309435,
'end': 5309451
}]
}
@pytest.fixture
def crispr_gm(lab, award, source):
return {
'lab': lab['uuid'],
'award': award['uuid'],
'source': source['uuid'],
'guide_rna_sequences': [
"ACA",
"GCG"
],
'insert_sequence': 'TCGA',
'aliases': ['encode:crispr_technique1'],
'@type': ['Crispr', '<API key>', 'Item'],
'@id': '/crisprs/<API key>/',
'uuid': '<API key>'
}
@pytest.fixture
def <API key>(lab, award, crispr_gm):
return {
'modification_type': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
'zygosity': 'homozygous',
'treatments': [],
'source': 'sigma',
'product_id': '12345',
'<API key>': [crispr_gm],
'modified_site': [{
'assembly': 'GRCh38',
'chromosome': '11',
'start': 5309435,
'end': 5309451
}]
}
@pytest.fixture
def <API key>(lab, award, crispr_gm, source):
return {
'purpose': 'validation',
'category': 'deeltion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"<API key>": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "placeholder_id",
"source": source['uuid']
}
]
}
@pytest.fixture
def <API key>(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"<API key>": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "placeholder_id",
"source": "/sources/sigma/"
}
]
}
@pytest.fixture
def <API key>(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"<API key>": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "ABC123",
"source": "/sources/sigma/"
}
]
}
@pytest.fixture
def <API key>(testapp):
item = {
'name': 'addgene',
'title': 'Addgene',
'status': 'released'
}
return testapp.post_json('/source', item).json['@graph'][0]
@pytest.fixture
def <API key>(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"<API key>": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "12345",
"source": "/sources/addgene/"
}
]
}
@pytest.fixture
def <API key>(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"<API key>": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "12345",
"source": "/sources/addgene/",
"url": "http:
},
{
"identifier": "67890",
"source": "/sources/addgene/",
"url": "http:
}
]
}
@pytest.fixture
def <API key>(lab, award):
return {
'purpose': 'analysis',
'category': 'interference',
'award': award['uuid'],
'lab': lab['uuid'],
"method": "CRISPR",
}
@pytest.fixture
def <API key>(
testapp,
lab,
award,
document,
target_ATF5_genes,
target_promoter):
item = {
'award': award['@id'],
'documents': [document['@id']],
'lab': lab['@id'],
'category': 'insertion',
'purpose': 'tagging',
'<API key>': ['stable transfection'],
'introduced_tags': [{'name':'eGFP', 'location': 'C-terminal', 'promoter_used': target_promoter['@id']}],
'<API key>': target_ATF5_genes['@id']
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(
testapp,
lab,
award,
document,
target):
item = {
'award': award['@id'],
'documents': [document['@id']],
'lab': lab['@id'],
'category': 'insertion',
'purpose': 'tagging',
'<API key>': ['stable transfection'],
'introduced_tags': [{'name':'eGFP', 'location': 'N-terminal'}],
'<API key>': target['@id']
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(
testapp,
lab,
award,
document,
target):
item = {
'award': award['@id'],
'documents': [document['@id']],
'lab': lab['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'RNAi',
'<API key>': target['@id']
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def crispr_knockout(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'knockout',
'purpose': 'characterization',
'method': 'CRISPR'
}
@pytest.fixture
def <API key>(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'knockout',
'purpose': 'repression',
'method': 'site-specific recombination',
'<API key>': {
"assembly": "GRCh38",
"chromosome": "11",
"start": 60000,
"end": 62000
}
}
@pytest.fixture
def <API key>(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'<API key>': ['stable transfection'],
'<API key>': 'random',
'introduced_elements': 'synthesized DNA'
}
@pytest.fixture
def <API key>(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'method': 'CRISPR',
'<API key>': 'random',
'introduced_elements': 'synthesized DNA'
}
@pytest.fixture
def <API key>(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'CRISPR cutting',
'purpose': 'characterization',
'method': 'CRISPR'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'CRISPRa',
'purpose': 'characterization',
'method': 'CRISPR'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'CRISPR dCas',
'purpose': 'characterization',
'method': 'CRISPR'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def HR_knockout(lab, award, target):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'knockout',
'purpose': 'repression',
'method': 'homologous recombination',
'<API key>': target['@id']
}
@pytest.fixture
def CRISPR_introduction(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'expression',
'<API key>': ['transient transfection']
}
@pytest.fixture
def <API key>(lab, award, human_donor_1):
return {
'lab': lab['@id'],
'award': award['@id'],
'donor': human_donor_1['@id'],
'category': 'insertion',
'purpose': 'expression',
'method': 'transient transfection'
}
@pytest.fixture
def transgene_insertion(testapp, lab, award, ctcf):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'in vivo enhancer characterization',
'<API key>': ['mouse pronuclear microinjection'],
'<API key>': ctcf['@id'],
'introduced_sequence': 'ATCGTA'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'expression',
'<API key>': ['transduction'],
'introduced_elements': 'gRNAs and CRISPR machinery',
'MOI': 'high',
'guide_type': 'sgRNA'
}
return testapp.post_json('/<API key>', item).json['@graph'][0]
@pytest.fixture
def <API key>(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'expression',
'<API key>': ['transduction'],
'introduced_elements': 'gRNAs and CRISPR machinery',
}
@pytest.fixture
def <API key>(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'disruption',
'purpose': 'characterization',
'method': 'CRISPR'
}
@pytest.fixture
def <API key>(testapp, lab, award, ctcf):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'transgene insertion',
'purpose': 'in vivo enhancer characterization',
'<API key>': ['mouse pronuclear microinjection'],
'<API key>': ctcf['@id'],
'introduced_sequence': 'ATCGTA'
}
@pytest.fixture
def <API key>(testapp, lab, award):
return{
'lab': lab['@id'],
'award': award['@id'],
'category': 'activation',
'purpose': 'characterization',
'method': 'CRISPR'
}
@pytest.fixture
def <API key>(testapp, lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'binding',
'purpose': 'characterization',
'method': 'CRISPR'
}
|
class SessionsController < <API key>
def new
end
def create
user = User.find_by(email: params[:session][:email])
if user && user.authenticate(params[:session][:password])
log_in(user)
redirect_to user
else
render :new
end
end
def destroy
log_out
redirect_to root_url
end
end
|
<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http:
<head>
<meta charset="utf-8"/>
</head>
<body>
<div id="wrapper">
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header"> -
<small></small>
<small class="pull-right">
<button type="button" class="btn btn-primary" id="page_back"></button>
</small>
</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12 col-md-12">
<form id="demoform" role="form">
<div class="form-group" id="valid_organize">
<label></label>
<select multiple="multiple" size="10" name="duallistbox_demo1[]" id="select_organize">
</select>
<p class="text-danger hidden" id="organize_error_msg"></p>
</div>
<div class="form-group" id="valid_teacher">
<label></label>
<select multiple="multiple" size="10" name="duallistbox_demo2[]" id="select_teacher">
</select>
<p class="text-danger hidden" id="teacher_error_msg"></p>
</div>
<div class="form-group" id="<API key>">
<label></label>
<select multiple="multiple" size="10" name="duallistbox_demo3[]" id="<API key>">
</select>
<p class="text-danger hidden" id="<API key>"></p>
</div>
<br/>
<div class="text-center">
<button type="button" id="save" class="btn btn-default btn-block"></button>
</div>
</form>
</div>
</div>
<!-- /.row -->
<footer class="footer" th:include="footer::footer">
<p class="text-muted">© Company 2016</p>
</footer>
<!-- /.footer -->
<script id="organize-template" type="text/<API key>">
{{#each listResult}}
<option value="{{organize_value}}">{{organize_name}}</option>
{{/each}}
</script>
<script id="teacher-template" type="text/<API key>">
{{#each listResult}}
<option value="{{teacher_value}}">{{teacher_name}}</option>
{{/each}}
</script>
<script id="<API key>" type="text/<API key>">
{{#each listResult}}
<option value="{{internshipReleaseId}}">{{internship_title}}</option>
{{/each}}
</script>
<script th:inline="javascript">
var init_page_param = {
'internshipReleaseId': /*[[${internshipReleaseId}]]*/ ''
};
</script>
<input type="hidden" class="dy_script" value="/js/internship/distribution/<API key>.js"/>
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
</body>
</html>
|
package com.longluo.demo.widget.swipelistview;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.<API key>;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.widget.ListAdapter;
import android.widget.ListView;
import com.longluo.demo.R;
import java.util.List;
/**
* ListView subclass that provides the swipe functionality
*/
public class SwipeListView extends ListView {
/**
* log tag
*/
public final static String TAG = "SwipeListView";
/**
* whether debug
*/
public final static boolean DEBUG = false;
/**
* Used when user want change swipe list mode on some rows
*/
public final static int SWIPE_MODE_DEFAULT = -1;
/**
* Disables all swipes
*/
public final static int SWIPE_MODE_NONE = 0;
/**
* Enables both left and right swipe
*/
public final static int SWIPE_MODE_BOTH = 1;
/**
* Enables right swipe
*/
public final static int SWIPE_MODE_RIGHT = 2;
/**
* Enables left swipe
*/
public final static int SWIPE_MODE_LEFT = 3;
/**
* Binds the swipe gesture to reveal a view behind the row (Drawer style)
*/
public final static int SWIPE_ACTION_REVEAL = 0;
/**
* Dismisses the cell when swiped over
*/
public final static int <API key> = 1;
/**
* Marks the cell as checked when swiped and release
*/
public final static int SWIPE_ACTION_CHOICE = 2;
/**
* No action when swiped
*/
public final static int SWIPE_ACTION_NONE = 3;
/**
* Default ids for front view
*/
public final static String <API key> = "swipelist_frontview";
/**
* Default id for back view
*/
public final static String <API key> = "swipelist_backview";
/**
* Indicates no movement
*/
private final static int TOUCH_STATE_REST = 0;
/**
* State scrolling x position
*/
private final static int <API key> = 1;
/**
* State scrolling y position
*/
private final static int <API key> = 2;
private int touchState = TOUCH_STATE_REST;
private float lastMotionX;
private float lastMotionY;
private int touchSlop;
int swipeFrontView = 0;
int swipeBackView = 0;
/**
* Internal listener for common swipe events
*/
private <API key> <API key>;
/**
* Internal touch listener
*/
private <API key> touchListener;
/**
* If you create a View programmatically you need send back and front identifier
*
* @param context Context
* @param swipeBackView Back Identifier
* @param swipeFrontView Front Identifier
*/
public SwipeListView(Context context, int swipeBackView, int swipeFrontView) {
super(context);
this.swipeFrontView = swipeFrontView;
this.swipeBackView = swipeBackView;
init(null);
}
/**
* @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet)
*/
public SwipeListView(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
}
/**
* @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet, int)
*/
public SwipeListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(attrs);
}
/**
* Init ListView
*
* @param attrs AttributeSet
*/
private void init(AttributeSet attrs) {
int swipeMode = SWIPE_MODE_BOTH;
boolean <API key> = true;
boolean <API key> = true;
long swipeAnimationTime = 0;
float swipeOffsetLeft = 0;
float swipeOffsetRight = 0;
int <API key> = 0;
int <API key> = 0;
int swipeActionLeft = SWIPE_ACTION_REVEAL;
int swipeActionRight = SWIPE_ACTION_REVEAL;
if (attrs != null) {
TypedArray styled = getContext().<API key>(attrs, R.styleable.SwipeListView);
swipeMode = styled.getInt(R.styleable.<API key>, SWIPE_MODE_BOTH);
swipeActionLeft = styled.getInt(R.styleable.<API key>, SWIPE_ACTION_REVEAL);
swipeActionRight = styled.getInt(R.styleable.<API key>, SWIPE_ACTION_REVEAL);
swipeOffsetLeft = styled.getDimension(R.styleable.<API key>, 0);
swipeOffsetRight = styled.getDimension(R.styleable.<API key>, 0);
<API key> = styled.getBoolean(R.styleable.<API key>, true);
swipeAnimationTime = styled.getInteger(R.styleable.<API key>, 0);
<API key> = styled.getBoolean(R.styleable.<API key>, true);
<API key> = styled.getResourceId(R.styleable.<API key>, 0);
<API key> = styled.getResourceId(R.styleable.<API key>, 0);
swipeFrontView = styled.getResourceId(R.styleable.<API key>, 0);
swipeBackView = styled.getResourceId(R.styleable.<API key>, 0);
styled.recycle();
}
if (swipeFrontView == 0 || swipeBackView == 0) {
swipeFrontView = getContext().getResources().getIdentifier(<API key>, "id", getContext().getPackageName());
swipeBackView = getContext().getResources().getIdentifier(<API key>, "id", getContext().getPackageName());
if (swipeFrontView == 0 || swipeBackView == 0) {
throw new RuntimeException(String.format("You forgot the attributes swipeFrontView or swipeBackView. You can add this attributes or use '%s' and '%s' identifiers", <API key>, <API key>));
}
}
final ViewConfiguration configuration = ViewConfiguration.get(getContext());
touchSlop = <API key>.<API key>(configuration);
touchListener = new <API key>(this, swipeFrontView, swipeBackView);
if (swipeAnimationTime > 0) {
touchListener.setAnimationTime(swipeAnimationTime);
}
touchListener.setRightOffset(swipeOffsetRight);
touchListener.setLeftOffset(swipeOffsetLeft);
touchListener.setSwipeActionLeft(swipeActionLeft);
touchListener.setSwipeActionRight(swipeActionRight);
touchListener.setSwipeMode(swipeMode);
touchListener.<API key>(<API key>);
touchListener.<API key>(<API key>);
touchListener.<API key>(<API key>);
touchListener.<API key>(<API key>);
setOnTouchListener(touchListener);
setOnScrollListener(touchListener.makeScrollListener());
}
/**
* Recycle cell. This method should be called from getView in Adapter when use SWIPE_ACTION_CHOICE
*
* @param convertView parent view
* @param position position in list
*/
public void recycle(View convertView, int position) {
touchListener.<API key>(convertView.findViewById(swipeFrontView), position);
touchListener.<API key>(convertView.findViewById(swipeFrontView), position);
// Clean pressed state (if dismiss is fire from a cell, to this cell, with a press drawable, in a swipelistview
// when this cell will be recycle it will still have his pressed state. This ensure the pressed state is
// cleaned.
for (int j = 0; j < ((ViewGroup) convertView).getChildCount(); ++j) {
View nextChild = ((ViewGroup) convertView).getChildAt(j);
nextChild.setPressed(false);
}
}
/**
* Get if item is selected
*
* @param position position in list
* @return
*/
public boolean isChecked(int position) {
return touchListener.isChecked(position);
}
/**
* Get positions selected
*
* @return
*/
public List<Integer> <API key>() {
return touchListener.<API key>();
}
/**
* Count selected
*
* @return
*/
public int getCountSelected() {
return touchListener.getCountSelected();
}
/**
* Unselected choice state in item
*/
public void <API key>() {
touchListener.<API key>();
}
/**
* @see android.widget.ListView#setAdapter(android.widget.ListAdapter)
*/
@Override
public void setAdapter(ListAdapter adapter) {
super.setAdapter(adapter);
touchListener.resetItems();
if (null != adapter) {
adapter.<API key>(new DataSetObserver() {
@Override
public void onChanged() {
super.onChanged();
onListChanged();
touchListener.resetItems();
}
});
}
}
/**
* Dismiss item
*
* @param position Position that you want open
*/
public void dismiss(int position) {
int height = touchListener.dismiss(position);
if (height > 0) {
touchListener.<API key>(height);
} else {
int[] dismissPositions = new int[1];
dismissPositions[0] = position;
onDismiss(dismissPositions);
touchListener.<API key>();
}
}
/**
* Dismiss items selected
*/
public void dismissSelected() {
List<Integer> list = touchListener.<API key>();
int[] dismissPositions = new int[list.size()];
int height = 0;
for (int i = 0; i < list.size(); i++) {
int position = list.get(i);
dismissPositions[i] = position;
int auxHeight = touchListener.dismiss(position);
if (auxHeight > 0) {
height = auxHeight;
}
}
if (height > 0) {
touchListener.<API key>(height);
} else {
onDismiss(dismissPositions);
touchListener.<API key>();
}
touchListener.returnOldActions();
}
/**
* Open ListView's item
*
* @param position Position that you want open
*/
public void openAnimate(int position) {
touchListener.openAnimate(position);
}
/**
* Close ListView's item
*
* @param position Position that you want open
*/
public void closeAnimate(int position) {
touchListener.closeAnimate(position);
}
/**
* Notifies onDismiss
*
* @param <API key> All dismissed positions
*/
protected void onDismiss(int[] <API key>) {
if (<API key> != null) {
<API key>.onDismiss(<API key>);
}
}
/**
* Start open item
*
* @param position list item
* @param action current action
* @param right to right
*/
protected void onStartOpen(int position, int action, boolean right) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onStartOpen(position, action, right);
}
}
/**
* Start close item
*
* @param position list item
* @param right
*/
protected void onStartClose(int position, boolean right) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onStartClose(position, right);
}
}
/**
* Notifies onClickFrontView
*
* @param position item clicked
*/
protected void onClickFrontView(int position) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onClickFrontView(position);
}
}
/**
* Notifies onClickBackView
*
* @param position back item clicked
*/
protected void onClickBackView(int position) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onClickBackView(position);
}
}
/**
* Notifies onOpened
*
* @param position Item opened
* @param toRight If should be opened toward the right
*/
protected void onOpened(int position, boolean toRight) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onOpened(position, toRight);
}
}
/**
* Notifies onClosed
*
* @param position Item closed
* @param fromRight If open from right
*/
protected void onClosed(int position, boolean fromRight) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onClosed(position, fromRight);
}
}
/**
* Notifies onChoiceChanged
*
* @param position position that choice
* @param selected if item is selected or not
*/
protected void onChoiceChanged(int position, boolean selected) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onChoiceChanged(position, selected);
}
}
/**
* User start choice items
*/
protected void onChoiceStarted() {
if (<API key> != null) {
<API key>.onChoiceStarted();
}
}
/**
* User end choice items
*/
protected void onChoiceEnded() {
if (<API key> != null) {
<API key>.onChoiceEnded();
}
}
/**
* User is in first item of list
*/
protected void onFirstListItem() {
if (<API key> != null) {
<API key>.onFirstListItem();
}
}
/**
* User is in last item of list
*/
protected void onLastListItem() {
if (<API key> != null) {
<API key>.onLastListItem();
}
}
/**
* Notifies onListChanged
*/
protected void onListChanged() {
if (<API key> != null) {
<API key>.onListChanged();
}
}
/**
* Notifies onMove
*
* @param position Item moving
* @param x Current position
*/
protected void onMove(int position, float x) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
<API key>.onMove(position, x);
}
}
protected int changeSwipeMode(int position) {
if (<API key> != null && position != ListView.INVALID_POSITION) {
return <API key>.onChangeSwipeMode(position);
}
return SWIPE_MODE_DEFAULT;
}
/**
* Sets the Listener
*
* @param <API key> Listener
*/
public void <API key>(<API key> <API key>) {
this.<API key> = <API key>;
}
/**
* Resets scrolling
*/
public void resetScrolling() {
touchState = TOUCH_STATE_REST;
}
/**
* Set offset on right
*
* @param offsetRight Offset
*/
public void setOffsetRight(float offsetRight) {
touchListener.setRightOffset(offsetRight);
}
/**
* Set offset on left
*
* @param offsetLeft Offset
*/
public void setOffsetLeft(float offsetLeft) {
touchListener.setLeftOffset(offsetLeft);
}
/**
* Set if all items opened will be closed when the user moves the ListView
*
* @param <API key>
*/
public void <API key>(boolean <API key>) {
touchListener.<API key>(<API key>);
}
/**
* Sets if the user can open an item with long pressing on cell
*
* @param <API key>
*/
public void <API key>(boolean <API key>) {
touchListener.<API key>(<API key>);
}
/**
* Set swipe mode
*
* @param swipeMode
*/
public void setSwipeMode(int swipeMode) {
touchListener.setSwipeMode(swipeMode);
}
/**
* Return action on left
*
* @return Action
*/
public int getSwipeActionLeft() {
return touchListener.getSwipeActionLeft();
}
/**
* Set action on left
*
* @param swipeActionLeft Action
*/
public void setSwipeActionLeft(int swipeActionLeft) {
touchListener.setSwipeActionLeft(swipeActionLeft);
}
/**
* Return action on right
*
* @return Action
*/
public int getSwipeActionRight() {
return touchListener.getSwipeActionRight();
}
/**
* Set action on right
*
* @param swipeActionRight Action
*/
public void setSwipeActionRight(int swipeActionRight) {
touchListener.setSwipeActionRight(swipeActionRight);
}
/**
* Sets animation time when user drops cell
*
* @param animationTime milliseconds
*/
public void setAnimationTime(long animationTime) {
touchListener.setAnimationTime(animationTime);
}
/**
* @see android.widget.ListView#<API key>(android.view.MotionEvent)
*/
@Override
public boolean <API key>(MotionEvent ev) {
int action = MotionEventCompat.getActionMasked(ev);
final float x = ev.getX();
final float y = ev.getY();
if (isEnabled() && touchListener.isSwipeEnabled()) {
if (touchState == <API key>) {
return touchListener.onTouch(this, ev);
}
switch (action) {
case MotionEvent.ACTION_MOVE:
checkInMoving(x, y);
return touchState == <API key>;
case MotionEvent.ACTION_DOWN:
super.<API key>(ev);
touchListener.onTouch(this, ev);
touchState = TOUCH_STATE_REST;
lastMotionX = x;
lastMotionY = y;
return false;
case MotionEvent.ACTION_CANCEL:
touchState = TOUCH_STATE_REST;
break;
case MotionEvent.ACTION_UP:
touchListener.onTouch(this, ev);
return touchState == <API key>;
default:
break;
}
}
return super.<API key>(ev);
}
/**
* Check if the user is moving the cell
*
* @param x Position X
* @param y Position Y
*/
private void checkInMoving(float x, float y) {
final int xDiff = (int) Math.abs(x - lastMotionX);
final int yDiff = (int) Math.abs(y - lastMotionY);
final int touchSlop = this.touchSlop;
boolean xMoved = xDiff > touchSlop;
boolean yMoved = yDiff > touchSlop;
if (xMoved) {
touchState = <API key>;
lastMotionX = x;
lastMotionY = y;
}
if (yMoved) {
touchState = <API key>;
lastMotionX = x;
lastMotionY = y;
}
}
/**
* Close all opened items
*/
public void closeOpenedItems() {
touchListener.closeOpenedItems();
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.