answer
stringlengths 15
1.25M
|
|---|
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:deletion)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, :js => true) do
DatabaseCleaner.strategy = :deletion
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end
|
s="the quick brown fox jumped over the lazy dog"
t = s.split(" ")
for v in t:
print(v)
r = s.split("e")
for v in r:
print(v)
x = s.split()
for v in x:
print(v)
# 2-arg version of split not supported
# y = s.split(" ",7)
# for v in y:
# print v
|
<!DOCTYPE html>
<html>
<head>
<title>Zefu Li</title>
<link rel="stylesheet" type="text/css" href="official.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="official.js"></script>
</head>
<body>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#blog">Blog</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<header class="header">
<div id="home"><a href="home"></a>Home</div>
<div id="text">Hi, I am Zefu Li</marquee></div>
<img class="human"src="http:
<div class="wifi"><i class="fa fa-feed" aria-hidden="true"></i></div>
<div class="questionmark"><i class="fa fa-question" aria-hidden="true"></i></div>
<div class="exclamationmark"><i class="fa fa-exclamation" aria-hidden="true"></i></div>
</header>
<div id="about"><a href="about"></a>About
<p>I am currently a senior at Oakland Charter High School. I am passionate about technology especially when it comes to computer science, I also like to solve problems and I will keep thinking about the solutions unless I solved them, I guess I am a little stubborn. Information Technology has started a significant revolution and influenced the world over a decade, therefore I decided to pursue a computer science degree. Technology will keep changing the world and moving us forward, that’s what I believe and I am so glad that I am part of the next generation of tech talent. </p></div>
<div id="blog"><a href="blog"></a>Blog
<h1>My Journey In dev/Mission</h1>
<h2>Coming Soon</h2>
</div>
<div id="contact"><a href="contact"></a>Contact
<a id="Linkedin" href="https:
<a id="github" href="https:
</div>
</body>
</html>
|
module Xronor
class DSL
module Checker
class ValidationError < StandardError
end
def required(name, value)
invalid = false
if value
case value
when String
invalid = value.strip.empty?
when Array, Hash
invalid = value.empty?
end
else
invalid = true
end
raise ValidationError.new("'#{name}' is required") if invalid
end
end
end
end
|
var mongoose = require('mongoose');
var statuses = ['open', 'closed', 'as_expected'];
var priorities = ['major','regular','minor','enhancement'];
var Comment = new mongoose.Schema(
{
comment: String,
username: String,
name: String,
dca: {type: Date, default: Date.now}
}
);
var Bug = new mongoose.Schema(
{
id: {type: String},
name: {type: String, required: true},
desc: String,
status: {type: String, default: 'open'},
priority: {type: String, default: 'regular'},
username: { type: String, required: true},
reported_by: {type: String},
company: {type: String, required: true},
comments: [Comment],
dca: {type: Date, default: Date.now},
dua: Date
}
);
Bug.pre('save', function(next) {
if (this.id === undefined) {
this.id = (new Date()).getTime().toString();
}
now = new Date();
this.dua = now;
next();
});
module.exports = mongoose.model('Bug', Bug);
|
#include "EngineImplDefine.h"
void BlendColor::Init(D3DCOLOR defaultColor, D3DCOLOR disabledColor, D3DCOLOR hiddenColor)
{
for (decltype(States.size()) i = 0; i != States.size(); ++i)
{
States[i] = defaultColor;
}
States[STATE_DISABLED] = disabledColor;
States[STATE_HIDDEN] = hiddenColor;
Current = hiddenColor;
}
void BlendColor::Blend(CONTROL_STATE iState, float fElapsedTime, float fRate)
{
D3DXCOLOR destColor = States[iState];
D3DXColorLerp(&Current, &Current, &destColor, 1.0f - powf(fRate, 30 * fElapsedTime));
}
void FontTexElement::SetTexture(UINT iTexture, RECT * prcTexture, D3DCOLOR defaultTextureColor)
{
this->iTexture = iTexture;
if (prcTexture)
rcTexture = *prcTexture;
else
SetRectEmpty(&rcTexture);
TextureColor.Init(defaultTextureColor);
}
void FontTexElement::SetFont(UINT iFont, D3DCOLOR defaultFontColor, DWORD dwTextFormat)
{
this->iFont = iFont;
this->dwTextFormat = dwTextFormat;
FontColor.Init(defaultFontColor);
}
void FontTexElement::Refresh()
{
TextureColor.Current = TextureColor.States[STATE_HIDDEN];
FontColor.Current = FontColor.States[STATE_HIDDEN];
}
|
class <API key> < ActiveRecord::Migration
def change
add_column :request_schemata, :name, :string, null: false, default: ""
end
end
|
ActionController::Routing::Routes.draw do |map|
map.resources :companies,
:member => {
:<API key> => :get, :delete_member => :post, :add_members => :post,
:<API key> => :get, :delete_project => :post, :add_projects => :post
}
end
|
// ViewController.h
// MKDevice
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (nonatomic, strong) IBOutlet UIButton *button;
- (IBAction)onAction:(id)sender;
@end
|
class <API key> < ActiveRecord::Migration
def change
add_column :components, :version, :float
end
end
|
package is.hail.expr.ir.functions
import is.hail.annotations.{Region, <API key>}
import is.hail.asm4s
import is.hail.asm4s._
import is.hail.expr.ir._
import is.hail.types.physical._
import is.hail.types.virtual._
import is.hail.utils._
import java.util.Locale
import java.time.{Instant, ZoneId}
import java.time.temporal.ChronoField
import is.hail.expr.JSONAnnotationImpex
import org.apache.spark.sql.Row
import org.json4s.JValue
import org.json4s.jackson.JsonMethods
import scala.collection.mutable
object StringFunctions extends RegistryFunctions {
def reverse(s: String): String = {
val sb = new StringBuilder
sb.append(s)
sb.reverseContents().result()
}
def upper(s: String): String = s.toUpperCase
def lower(s: String): String = s.toLowerCase
def strip(s: String): String = s.trim()
def contains(s: String, t: String): Boolean = s.contains(t)
def startswith(s: String, t: String): Boolean = s.startsWith(t)
def endswith(s: String, t: String): Boolean = s.endsWith(t)
def firstMatchIn(s: String, regex: String): IndexedSeq[String] = {
regex.r.findFirstMatchIn(s).map(_.subgroups.toArray.toFastIndexedSeq).orNull
}
def regexMatch(regex: String, s: String): Boolean = regex.r.findFirstIn(s).isDefined
def concat(s: String, t: String): String = s + t
def replace(str: String, pattern1: String, pattern2: String): String =
str.replaceAll(pattern1, pattern2)
def split(s: String, p: String): IndexedSeq[String] = s.split(p, -1)
def translate(s: String, d: Map[String, String]): String = {
val charD = new mutable.HashMap[Char, String]
d.foreach { case (k, v) =>
if (k.length != 1)
fatal(s"translate: mapping keys must be one character, found '$k'")
charD += ((k(0), v))
}
val sb = new StringBuilder
var i = 0
while (i < s.length) {
val charI = s(i)
charD.get(charI) match {
case Some(replacement) => sb.append(replacement)
case None => sb.append(charI)
}
i += 1
}
sb.result()
}
def splitLimited(s: String, p: String, n: Int): IndexedSeq[String] = s.split(p, n)
def arrayMkString(a: IndexedSeq[String], sep: String): String = a.mkString(sep)
def setMkString(s: Set[String], sep: String): String = s.mkString(sep)
def escapeString(s: String): String = StringEscapeUtils.escapeString(s)
def softBounds(i: IR, len: IR): IR =
If(i < -len, 0, If(i < 0, i + len, If(i >= len, len, i)))
private val locale: Locale = Locale.US
def strftime(fmtStr: String, epochSeconds: Long, zoneId: String): String =
DateFormatUtils.parseDateFormat(fmtStr, locale).withZone(ZoneId.of(zoneId))
.format(Instant.ofEpochSecond(epochSeconds))
def strptime(timeStr: String, fmtStr: String, zoneId: String): Long =
DateFormatUtils.parseDateFormat(fmtStr, locale).withZone(ZoneId.of(zoneId))
.parse(timeStr)
.getLong(ChronoField.INSTANT_SECONDS)
def registerAll(): Unit = {
val thisClass = getClass
registerPCode1("length", TString, TInt32, (_: Type, _: PType) => PInt32()) { case (r: EmitRegion, cb, rt, s: PStringCode) =>
PCode(rt, s.loadString().invoke[Int]("length"))
}
registerCode3("substring", TString, TInt32, TInt32, TString, {
(_: Type, _: PType, _: PType, _: PType) => PCanonicalString()
}) {
case (r: EmitRegion, rt, (sT: PString, s: Code[Long]), (startT, start: Code[Int]), (endT, end: Code[Int])) =>
unwrapReturn(r, rt)(asm4s.coerce[String](wrapArg(r, sT)(s)).invoke[Int, Int, String]("substring", start, end))
}
registerIR3("slice", TString, TInt32, TInt32, TString) { (_, str, start, end) =>
val len = Ref(genUID(), TInt32)
val s = Ref(genUID(), TInt32)
val e = Ref(genUID(), TInt32)
Let(len.name, invoke("length", TInt32, str),
Let(s.name, softBounds(start, len),
Let(e.name, softBounds(end, len),
invoke("substring", TString, str, s, If(e < s, s, e)))))
}
registerIR2("index", TString, TInt32, TString) { (_, s, i) =>
val len = Ref(genUID(), TInt32)
val idx = Ref(genUID(), TInt32)
Let(len.name, invoke("length", TInt32, s),
Let(idx.name,
If((i < -len) || (i >= len),
Die(invoke("concat", TString,
Str("string index out of bounds: "),
invoke("concat", TString,
invoke("str", TString, i),
invoke("concat", TString, Str(" / "), invoke("str", TString, len)))), TInt32, -1),
If(i < 0, i + len, i)),
invoke("substring", TString, s, idx, idx + 1)))
}
registerIR2("sliceRight", TString, TInt32, TString) { (_, s, start) => invoke("slice", TString, s, start, invoke("length", TInt32, s)) }
registerIR2("sliceLeft", TString, TInt32, TString) { (_, s, end) => invoke("slice", TString, s, I32(0), end) }
registerCode1("str", tv("T"), TString, (_: Type, _: PType) => PCanonicalString()) { case (r, rt, (aT, a)) =>
val annotation = boxArg(r, aT)(a)
val str = r.mb.getType(aT.virtualType).invoke[Any, String]("str", annotation)
unwrapReturn(r, rt)(str)
}
registerEmitCode1("showStr", tv("T"), TString, {
(_: Type, _: PType) => PCanonicalString(true)
}) { case (r, rt, a) =>
val annotation = Code(a.setup, a.m).muxAny(Code._null(boxedTypeInfo(a.pt)), boxArg(r, a.pt)(a.v))
val str = r.mb.getType(a.pt.virtualType).invoke[Any, String]("showStr", annotation)
EmitCode.present(PCode(rt, unwrapReturn(r, rt)(str)))
}
registerEmitCode2("showStr", tv("T"), TInt32, TString, {
(_: Type, _: PType, truncType: PType) => PCanonicalString(truncType.required)
}) { case (r, rt, a, trunc) =>
val annotation = Code(a.setup, a.m).muxAny(Code._null(boxedTypeInfo(a.pt)), boxArg(r, a.pt)(a.v))
val str = r.mb.getType(a.pt.virtualType).invoke[Any, Int, String]("showStr", annotation, trunc.value[Int])
EmitCode(trunc.setup, trunc.m, PCode(rt, unwrapReturn(r, rt)(str)))
}
registerEmitCode1("json", tv("T"), TString, (_: Type, _: PType) => PCanonicalString(true)) { case (r, rt, a) =>
val bti = boxedTypeInfo(a.pt)
val annotation = Code(a.setup, a.m).muxAny(Code._null(bti), boxArg(r, a.pt)(a.v))
val json = r.mb.getType(a.pt.virtualType).invoke[Any, JValue]("toJSON", annotation)
val str = Code.invokeScalaObject1[JValue, String](JsonMethods.getClass, "compact", json)
EmitCode(Code._empty, false, PCode(rt, unwrapReturn(r, rt)(str)))
}
<API key>("reverse", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"reverse")
<API key>("upper", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"upper")
<API key>("lower", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"lower")
<API key>("strip", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"strip")
<API key>("contains", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "contains")
<API key>("translate", TString, TDict(TString, TString), TString, {
case (_: Type, _: PType, _: PType) => PCanonicalString()
})(thisClass, "translate")
<API key>("startswith", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "startswith")
<API key>("endswith", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "endswith")
<API key>("regexMatch", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "regexMatch")
<API key>("concat", TString, TString, TString, {
case (_: Type, _: PType, _: PType) => PCanonicalString()
})(thisClass, "concat")
<API key>("split", TString, TString, TArray(TString), {
case (_: Type, _: PType, _: PType) =>
PCanonicalArray(PCanonicalString(true))
})(thisClass, "split")
<API key>("split", TString, TString, TInt32, TArray(TString), {
case (_: Type, _: PType, _: PType, _: PType) =>
PCanonicalArray(PCanonicalString(true))
})(thisClass, "splitLimited")
<API key>("replace", TString, TString, TString, TString, {
case (_: Type, _: PType, _: PType, _: PType) => PCanonicalString()
})(thisClass, "replace")
<API key>("mkString", TSet(TString), TString, TString, {
case (_: Type, _: PType, _: PType) => PCanonicalString()
})(thisClass, "setMkString")
<API key>("mkString", TArray(TString), TString, TString, {
case (_: Type, _: PType, _: PType) => PCanonicalString()
})(thisClass, "arrayMkString")
registerIEmitCode2("firstMatchIn", TString, TString, TArray(TString), {
case(_: Type, _: PType, _: PType) => PCanonicalArray(PCanonicalString(true))
}) { case (cb: EmitCodeBuilder, region: Value[Region], rt: PArray,
s: (() => IEmitCode), r: (() => IEmitCode)) =>
s().flatMap(cb) { case sc: PStringCode =>
r().flatMap(cb) { case rc: PStringCode =>
val out = cb.newLocal[IndexedSeq[String]]("out",
Code.invokeScalaObject2[String, String, IndexedSeq[String]](
thisClass, "firstMatchIn", sc.loadString(), rc.loadString()))
IEmitCode(cb, out.isNull, {
val len = cb.newLocal[Int]("len", out.invoke[Int]("size"))
val srvb: <API key> = new <API key>(cb.emb, rt, region)
val elt = cb.newLocal[String]("elt")
val value = Code(
srvb.start(len),
Code.whileLoop(srvb.arrayIdx < len,
elt := out.invoke[Int, String]("apply", srvb.arrayIdx),
elt.ifNull(
srvb.setMissing(),
srvb.addString(elt)),
srvb.advance()),
srvb.end())
PCode(rt, value)
})
}
}
}
registerEmitCode2("hamming", TString, TString, TInt32, {
case(_: Type, _: PType, _: PType) => PInt32()
}) { case (r: EmitRegion, rt, e1: EmitCode, e2: EmitCode) =>
EmitCode.fromI(r.mb) { cb =>
e1.toI(cb).flatMap(cb) { case (sc1: PStringCode) =>
e2.toI(cb).flatMap(cb) { case (sc2: PStringCode) =>
val n = cb.newLocal("hamming_n", 0)
val i = cb.newLocal("hamming_i", 0)
val v1 = sc1.asBytes().memoize(cb, "hamming_bytes_1")
val v2 = sc2.asBytes().memoize(cb, "hamming_bytes_2")
val m = v1.loadLength().cne(v2.loadLength())
IEmitCode(cb, m, {
cb.whileLoop(i < v1.loadLength(), {
cb.ifx(v1.loadByte(i).cne(v2.loadByte(i)),
cb.assign(n, n + 1))
cb.assign(i, i + 1)
})
PCode(rt, n)
})
}
}
}
}
<API key>("escapeString", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass, "escapeString")
<API key>("strftime", TString, TInt64, TString, TString, {
case(_: Type, _: PType, _: PType, _: PType) => PCanonicalString()
})(thisClass, "strftime")
<API key>("strptime", TString, TString, TString, TInt64, {
case (_: Type, _: PType, _: PType, _: PType) => PInt64()
})(thisClass, "strptime")
registerPCode("parse_json", Array(TString), TTuple(tv("T")),
(rType: Type, _: Seq[PType]) => PType.canonical(rType, true), typeParameters = Array(tv("T"))) { case (er, cb, resultType, Array(s: PStringCode)) =>
PCode(resultType, StringFunctions.unwrapReturn(er, resultType)(
Code.invokeScalaObject2[String, Type, Row](JSONAnnotationImpex.getClass, "irImportAnnotation",
s.loadString(), er.mb.ecb.getType(resultType.virtualType.asInstanceOf[TTuple].types(0)))
))
}
}
}
|
using GalaSoft.MvvmLight;
namespace Operation.WPF.ViewModels
{
public interface IViewModelFactory
{
T ResolveViewModel<T>() where T : ViewModelBase;
}
}
|
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MageTurret : Turret
{
[SerializeField]
float range;
[SerializeField]
float baseDamage = 0.00f;
float currentDamage = 0.00f;
[SerializeField]
float damageIncrease;
[SerializeField]
float attackCooldown;
float currentCooldown;
[SerializeField]
float damageMultiplier;
float currentMultiplier;
bool isAttacking;
[SerializeField]
List<Enemy> enemiesCanAttack;
Enemy oldClosestEnemy;
Enemy closestEnemy;
Enemy target;
[Header("AttackRay")]
[SerializeField]
Transform raySpawnPoint;
[SerializeField]
LineRenderer lr;
[SerializeField]
ParticleSystem partSystemTurret;
[SerializeField]
ParticleSystem finalRaySystem;
void Start()
{
enemiesCanAttack = new List<Enemy>();
currentDamage = baseDamage;
currentMultiplier = damageMultiplier;
}
public override void PooledStart()
{
enemiesCanAttack = new List<Enemy>();
currentDamage = baseDamage;
currentMultiplier = damageMultiplier;
}
void Update()
{
if (enemiesCanAttack.Count > 0)
{
if (isAttacking)
{
Attack();
return;
}
finalRaySystem.Stop();
currentCooldown -= Time.deltaTime;
if (currentCooldown <= 0)
{
FindClosestTarget();
currentCooldown = attackCooldown;
}
}
else
{
lr.enabled = false;
}
}
void Attack()
{
if (currentDamage <= 200)
{
currentDamage += damageIncrease * currentMultiplier;
}
target.TakeDamage(currentDamage);
if (target.isDead)
{
ClearDeadTarget();
return;
}
currentMultiplier += damageIncrease;
lr.enabled = true;
lr.SetPosition(0, raySpawnPoint.position);
lr.SetPosition(1, target.transform.position);
finalRaySystem.Play();
finalRaySystem.transform.position = lr.GetPosition(1);
}
void ClearDeadTarget()
{
lr.enabled = false;
enemiesCanAttack.Remove(target);
target = null;
currentDamage = baseDamage;
currentMultiplier = damageMultiplier;
isAttacking = false;
finalRaySystem.Stop();
}
void ClearTarget()
{
target.ClearDamage();
lr.enabled = false;
enemiesCanAttack.Remove(target);
target = null;
currentDamage = baseDamage;
currentMultiplier = damageMultiplier;
isAttacking = false;
finalRaySystem.Stop();
}
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Enemy"))
{
enemiesCanAttack.Add(other.GetComponent<Enemy>());
if (target == null)
{
FindClosestTarget();
}
}
}
void OnTriggerExit(Collider other)
{
if (other.CompareTag("Enemy"))
{
if (target != null && Vector3.Distance(target.transform.
position, transform.position) > range)
{
ClearTarget();
}
enemiesCanAttack.Remove(other.GetComponent<Enemy>());
}
}
public override void Sell()
{
base.Sell();
EndSell();
}
protected virtual void FindClosestTarget()
{
for (int i = 0; i < enemiesCanAttack.Count; i++)
{
if (closestEnemy != null)
{
if (Vector3.Distance(transform.position, enemiesCanAttack[i].transform.position) <=
Vector3.Distance(transform.position, closestEnemy.transform.position))
{
closestEnemy = enemiesCanAttack[i];
}
}
else closestEnemy = enemiesCanAttack[i];
target = closestEnemy.GetComponent<Enemy>();
oldClosestEnemy = closestEnemy;
isAttacking = true;
}
}
void OnDrawGizmos()
{
Color color = Color.blue;
Gizmos.color = color;
Gizmos.DrawWireSphere(transform.position, range);
}
}
|
import torch
from hypergan.train_hooks.base_train_hook import BaseTrainHook
class <API key>(BaseTrainHook):
def __init__(self, gan=None, config=None, trainer=None):
super().__init__(config=config, gan=gan, trainer=trainer)
self.d_grads = None
self.g_grads = None
def gradients(self, d_grads, g_grads):
if self.d_grads is None:
self.d_grads = [torch.zeros_like(_g) for _g in d_grads]
self.g_grads = [torch.zeros_like(_g) for _g in g_grads]
new_d_grads = [g.clone() for g in d_grads]
new_g_grads = [g.clone() for g in g_grads]
d_grads = [_g - self.config.gamma * _g2 for _g, _g2 in zip(d_grads, self.d_grads)]
g_grads = [_g - self.config.gamma * _g2 for _g, _g2 in zip(g_grads, self.g_grads)]
self.d_grads = new_d_grads
self.g_grads = new_g_grads
return [d_grads, g_grads]
|
#include "Namespace_Base.h"
#include <co/Coral.h>
#include <co/IComponent.h>
#include <co/IPort.h>
#include <co/IInterface.h>
namespace co {
co::IInterface* <API key>::getInterface()
{
return co::typeOf<co::INamespace>::get();
}
co::IPort* <API key>::getFacet()
{
co::IComponent* component = static_cast<co::IComponent*>( co::getType( "co.Namespace" ) );
assert( component );
co::IPort* facet = static_cast<co::IPort*>( component->getMember( "namespace" ) );
assert( facet );
return facet;
}
Namespace_Base::Namespace_Base()
{
// empty
}
Namespace_Base::~Namespace_Base()
{
// empty
}
co::IObject* Namespace_Base::getProvider()
{
return this;
}
void Namespace_Base::serviceRetain()
{
incrementRefCount();
}
void Namespace_Base::serviceRelease()
{
decrementRefCount();
}
co::IComponent* Namespace_Base::getComponent()
{
co::IType* type = co::getType( "co.Namespace" );
assert( type->getKind() == co::TK_COMPONENT );
return static_cast<co::IComponent*>( type );
}
co::IService* Namespace_Base::getServiceAt( co::IPort* port )
{
checkValidPort( port );
co::IService* res = NULL;
switch( port->getIndex() )
{
case 0: res = static_cast<co::INamespace*>( this ); break;
default: <API key>();
}
return res;
}
void Namespace_Base::setServiceAt( co::IPort* receptacle, co::IService* service )
{
<API key>( receptacle );
<API key>();
CORAL_UNUSED( service );
}
} // namespace co
|
/*** AppView ***/
define(function(require, exports, module) {
var View = require('famous/core/View');
var Surface = require('famous/core/Surface');
var Transform = require('famous/core/Transform');
var StateModifier = require('famous/modifiers/StateModifier');
var SlideshowView = require('views/SlideshowView');
function ProjectView() {
View.apply(this, arguments);
}
ProjectView.prototype = Object.create(View.prototype);
ProjectView.prototype.constructor = ProjectView;
ProjectView.DEFAULT_OPTIONS = {};
module.exports = ProjectView;
});
|
# Development Guidelines
This document describes tools, tasks and workflow that one needs to be familiar with in order to effectively maintain
this project. If you use this package within your own software as is but don't plan on modifying it, this guide is
**not** for you.
## Tools
* [Phing](http:
can run phing but using the command line script `./vendor/bin/phing` or you can put it on your PATH.
* [Composer](https://getcomposer.org/): used to manage dependencies for the project.
* [Box](http://box-project.org/): used to generate a phar archive, which is useful for users who
don't use Composer in their own project.
## Tasks
Testing
This project's tests are written as PHPUnit test cases. Common tasks:
* `./vendor/bin/phing test` - run the test suite.
Releasing
In order to create a release, the following should be completed in order.
1. Ensure all the tests are passing (`./vendor/bin/phing test`) and that there is enough test coverage.
1. Make sure you are on the `master` branch of the repository, with all changes merged/commited already.
1. Update the version number in the source code and the README. See [Versioning](#versioning) for information
about selecting an appropriate version number. Files to inspect for possible need to change:
- src/OpenTok/Util/Client.php
- tests/OpenTok/OpenTokTest.php
- tests/OpenTok/ArchiveTest.php
- README.md (only needs to change when MINOR version is changing)
1. Commit the version number change with the message "Update to version x.x.x", substituting the new version number.
1. Create a git tag: `git tag -a vx.x.x -m "Release vx.x.x"`
1. Change the version number for future development by incrementing the PATH number and adding
"-alpha.1" in each file except samples and documentation. Then make another commit with the
message "Begin development on next version".
1. Push the changes to the source repository: `git push origin master; git push --tags origin`s
1. Generate a phar archive for distribution using [Box](https://github.com/box-project/box2): `box build`. Be sure that the
dependencies in the `/vendor` directory are current before building. Upload it to the GitHub Release. Add
release notes with a description of changes and fixes.
## Workflow
Versioning
The project uses [semantic versioning](http://semver.org/) as a policy for incrementing version numbers. For planned
work that will go into a future version, there should be a Milestone created in the Github Issues named with the version
number (e.g. "v2.2.1").
During development the version number should end in "-alpha.x" or "-beta.x", where x is an increasing number starting from 1.
Branches
* `master` - the main development branch.
* `feat.foo` - feature branches. these are used for longer running tasks that cannot be accomplished in one commit.
once merged into master, these branches should be deleted.
* `vx.x.x` - if development for a future version/milestone has begun while master is working towards a sooner
release, this is the naming scheme for that branch. once merged into master, these branches should be deleted.
Tags
* `vx.x.x` - commits are tagged with a final version number during release.
Issues
Issues are labelled to help track their progress within the pipeline.
* no label - these issues have not been triaged.
* `bug` - confirmed bug. aim to have a test case that reproduces the defect.
* `enhancement` - contains details/discussion of a new feature. it may not yet be approved or placed into a
release/milestone.
* `wontfix` - closed issues that were never addressed.
* `duplicate` - closed issue that is the same to another referenced issue.
* `question` - purely for discussion
Management
When in doubt, find the maintainers and ask.
|
<?php
namespace Demo\Example;
/**
* Human class example
*/
class HumanDemo
{
/**
* Eat something
*/
public function eat()
{
echo "Eating...", PHP_EOL;
}
/**
* Clean the teeth
*/
public function cleanTeeth()
{
echo "Cleaning teeth...", PHP_EOL;
}
/**
* Washing up
*/
public function washUp()
{
echo "Washing up...", PHP_EOL;
}
/**
* Working
*/
public function work()
{
echo "Working...", PHP_EOL;
}
/**
* Go to sleep
*/
public function sleep()
{
echo "Go to sleep...", PHP_EOL;
}
}
|
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
using Migrap.AspNet.Multitenant;
using System;
using System.Collections.Generic;
namespace Migrap.AspNet.Routing {
public class <API key> : IRouteConstraint {
public const string TenantKey = "tenant";
private readonly ISet<string> _tenants = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
private readonly ITenantService _tenantService;
public <API key>(ITenantService tenantService) {
_tenantService = tenantService;
}
public bool Match(HttpContext httpContext, IRouter route, string routeKey, IDictionary<string, object> values, RouteDirection routeDirection) {
var address = httpContext.Request.Headers["Host"][0].Split('.');
if(address.Length < 2) {
return false;
}
var tenant = address[0];
if(!values.ContainsKey("tenant")) {
values.Add("tenant", tenant);
}
return true;
}
}
}
|
import numpy as np
__author__ = 'David John Gagne <djgagne@ou.edu>'
def main():
# Contingency Table from Wilks (2011) Table 8.3
table = np.array([[50, 91, 71],
[47, 2364, 170],
[54, 205, 3288]])
mct = <API key>(table, n_classes=table.shape[0],
class_names=np.arange(table.shape[0]).astype(str))
print(mct.peirce_skill_score())
print(mct.gerrity_score())
class <API key>(object):
"""
This class is a container for a contingency table containing more than 2 classes.
The contingency table is stored in table as a numpy array with the rows corresponding to forecast categories,
and the columns corresponding to observation categories.
"""
def __init__(self, table=None, n_classes=2, class_names=("1", "0")):
self.table = table
self.n_classes = n_classes
self.class_names = class_names
if table is None:
self.table = np.zeros((self.n_classes, self.n_classes), dtype=int)
def __add__(self, other):
assert self.n_classes == other.n_classes, "Number of classes does not match"
return <API key>(self.table + other.table,
n_classes=self.n_classes,
class_names=self.class_names)
def peirce_skill_score(self):
"""
Multiclass Peirce Skill Score (also Hanssen and Kuipers score, True Skill Score)
"""
n = float(self.table.sum())
nf = self.table.sum(axis=1)
no = self.table.sum(axis=0)
correct = float(self.table.trace())
return (correct / n - (nf * no).sum() / n ** 2) / (1 - (no * no).sum() / n ** 2)
def gerrity_score(self):
"""
Gerrity Score, which weights each cell in the contingency table by its observed relative frequency.
:return:
"""
k = self.table.shape[0]
n = float(self.table.sum())
p_o = self.table.sum(axis=0) / n
p_sum = np.cumsum(p_o)[:-1]
a = (1.0 - p_sum) / p_sum
s = np.zeros(self.table.shape, dtype=float)
for (i, j) in np.ndindex(*s.shape):
if i == j:
s[i, j] = 1.0 / (k - 1.0) * (np.sum(1.0 / a[0:j]) + np.sum(a[j:k - 1]))
elif i < j:
s[i, j] = 1.0 / (k - 1.0) * (np.sum(1.0 / a[0:i]) - (j - i) + np.sum(a[j:k - 1]))
else:
s[i, j] = s[j, i]
return np.sum(self.table / float(self.table.sum()) * s)
def heidke_skill_score(self):
n = float(self.table.sum())
nf = self.table.sum(axis=1)
no = self.table.sum(axis=0)
correct = float(self.table.trace())
return (correct / n - (nf * no).sum() / n ** 2) / (1 - (nf * no).sum() / n ** 2)
if __name__ == "__main__":
main()
|
.navbar-brand {
font-family: "Bungee", cursive;
font-size: 200%;
padding: 0; }
#image_billiard {
height: 70px;
padding: 15px;
width: auto;
float: left; }
.brand-text {
float: right;
padding-top: 25px;
padding-left: 10px; }
.navbar-default {
height: 70px; }
.navbar-default .navbar-nav > li > a {
padding-top: 20px;
padding-bottom: 20px;
line-height: 30px; }
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
color: white;
background-color: transparent; }
form#id_search_group {
margin-top: 16px; }
.jumbotron {
padding-top: 6rem;
padding-bottom: 6rem;
margin-bottom: 0;
background-color: white; }
.jumbotron .container {
max-width: 80rem; }
#lower_container {
background-color: #f7f7f7; }
|
"use strict";
var ArrayCollection_1 = require('./ArrayCollection');
exports.ArrayCollection = ArrayCollection_1.ArrayCollection;
var ArrayList_1 = require('./ArrayList');
exports.ArrayList = ArrayList_1.ArrayList;
var SequenceBase_1 = require('./SequenceBase');
exports.SequenceBase = SequenceBase_1.SequenceBase;
var Buckets_1 = require('./Buckets');
exports.Buckets = Buckets_1.Buckets;
var Collection_1 = require('./Collection');
exports.Collection = Collection_1.Collection;
var Dictionary_1 = require('./Dictionary');
exports.Dictionary = Dictionary_1.Dictionary;
exports.Pair = Dictionary_1.Pair;
var Hash_1 = require('./Hash');
exports.HashFunc = Hash_1.HashFunc;
exports.DefaultHashFunc = Hash_1.DefaultHashFunc;
var HashSet_1 = require('./HashSet');
exports.HashSet = HashSet_1.HashSet;
var Iterable_1 = require('./Iterable');
exports.Iterable = Iterable_1.Iterable;
var LinkedList_1 = require('./LinkedList');
exports.LinkedList = LinkedList_1.LinkedList;
var Native_1 = require('./Native');
exports.NativeIndex = Native_1.NativeIndex;
exports.NativeMap = Native_1.NativeMap;
var Sequence_1 = require('./Sequence');
exports.Sequence = Sequence_1.Sequence;
var Stack_1 = require('./Stack');
exports.Stack = Stack_1.Stack;
var Util_1 = require('./Util');
exports.Util = Util_1.Util;
//# sourceMappingURL=index.js.map
|
<!-- dx-header -->
# IDR for ChIP-seq (DNAnexus Platform App)
Generate peaks that pass the IDR threshold
This is the source code for an app that runs on the DNAnexus Platform.
For more information about how to run or modify it, see
https://wiki.dnanexus.com/.
<!-- /dx-header -->
Take peaks. Generate pseudoreplicates and pool controls (as appropriate). Run the IDR framework.
<!
TODO: This app directory was automatically generated by dx-app-wizard;
please edit this Readme.md file to include essential documentation about
your app that would be helpful to users. (Also see the
Readme.developer.md.) Once you're done, you can remove these TODO
comments.
For more info, see https://wiki.dnanexus.com/Developer-Portal.
|
<span class="S-prose">
{% for item in site.data.testimonials %}{% if forloop.last %}
{% assign testimonial = item[1] %}
<figure class="O-block <API key>">
<blockquote>“{{ testimonial.content }}”</blockquote>
<figcaption class="C-quote-person">
<img class="<API key>" alt="photo of {{ testimonial.name }}" src="{{ testimonial.avatar_url | prepend: site.<API key> }}">
{{ testimonial.name }}
<span class="<API key>">
{{ testimonial.role }}
at
{% if testimonial.company %}
{% if testimonial.company_url %}
<a href="{{ testimonial.company_url }}">{{ testimonial.company }}</a>
{% else %}
{{ testimonial.company }}
{% endif %}
{% endif %}
</span>
</figcaption>
</figure>
<!-- <a class="C-button T-transparent" href="#">See the project</a> -->
{% endif %}{% endfor %}
</span>
|
<?php
class fCore
{
// The following constants allow for nice looking callbacks to static methods
const backtrace = 'fCore::backtrace';
const call = 'fCore::call';
const callback = 'fCore::callback';
const checkOS = 'fCore::checkOS';
const checkVersion = 'fCore::checkVersion';
const configureSMTP = 'fCore::configureSMTP';
const debug = 'fCore::debug';
const detectOpcodeCache = 'fCore::detectOpcodeCache';
const disableContext = 'fCore::disableContext';
const dump = 'fCore::dump';
const enableDebugging = 'fCore::enableDebugging';
const <API key> = 'fCore::<API key>';
const enableErrorHandling = 'fCore::enableErrorHandling';
const <API key> = 'fCore::<API key>';
const expose = 'fCore::expose';
const getDebug = 'fCore::getDebug';
const handleError = 'fCore::handleError';
const handleException = 'fCore::handleException';
const <API key> = 'fCore::<API key>';
const reset = 'fCore::reset';
const <API key> = 'fCore::<API key>';
const startErrorCapture = 'fCore::startErrorCapture';
const stopErrorCapture = 'fCore::stopErrorCapture';
/**
* A regex to match errors to capture
*
* @var string
*/
static private $<API key> = NULL;
/**
* The previous error handler
*
* @var callback
*/
static private $<API key> = NULL;
/**
* The types of errors to capture
*
* @var integer
*/
static private $<API key> = NULL;
/**
* An array of errors that have been captured
*
* @var array
*/
static private $captured_errors = NULL;
/**
* If the context info has been shown
*
* @var boolean
*/
static private $context_shown = FALSE;
/**
* If global debugging is enabled
*
* @var boolean
*/
static private $debug = NULL;
/**
* A callback to pass debug messages to
*
* @var callback
*/
static private $debug_callback = NULL;
/**
* If dynamic constants should be created
*
* @var boolean
*/
static private $dynamic_constants = FALSE;
/**
* Error destination
*
* @var string
*/
static private $error_destination = 'html';
/**
* An array of errors to be send to the destination upon page completion
*
* @var array
*/
static private $error_message_queue = array();
/**
* Exception destination
*
* @var string
*/
static private $<API key> = 'html';
/**
* Exception handler callback
*
* @var mixed
*/
static private $<API key> = NULL;
/**
* Exception handler callback parameters
*
* @var array
*/
static private $<API key> = array();
/**
* The message generated by the uncaught exception
*
* @var string
*/
static private $exception_message = NULL;
/**
* If this class is handling errors
*
* @var boolean
*/
static private $handles_errors = FALSE;
/**
* If this class is handling exceptions
*
* @var boolean
*/
static private $handles_exceptions = FALSE;
/**
* If the context info should be shown with errors/exceptions
*
* @var boolean
*/
static private $show_context = TRUE;
/**
* An SMTP connection for sending error and exception emails
*
* @var fSMTP
*/
static private $smtp_connection = NULL;
/**
* The email address to send error emails from
*
* @var string
*/
static private $smtp_from_email = NULL;
static public function backtrace($remove_lines=0, $backtrace=NULL)
{
if ($remove_lines !== NULL && !is_numeric($remove_lines)) {
$remove_lines = 0;
}
settype($remove_lines, 'integer');
$doc_root = realpath($_SERVER['DOCUMENT_ROOT']);
$doc_root .= (substr($doc_root, -1) != DIRECTORY_SEPARATOR) ? DIRECTORY_SEPARATOR : '';
if ($backtrace === NULL) {
$backtrace = debug_backtrace();
}
while ($remove_lines > 0) {
array_shift($backtrace);
$remove_lines
}
$backtrace = array_reverse($backtrace);
$bt_string = '';
$i = 0;
foreach ($backtrace as $call) {
if ($i) {
$bt_string .= "\n";
}
if (isset($call['file'])) {
$bt_string .= str_replace($doc_root, '{doc_root}' . DIRECTORY_SEPARATOR, $call['file']) . '(' . $call['line'] . '): ';
} else {
$bt_string .= '[internal function]: ';
}
if (isset($call['class'])) {
$bt_string .= $call['class'] . $call['type'];
}
if (isset($call['class']) || isset($call['function'])) {
$bt_string .= $call['function'] . '(';
$j = 0;
if (!isset($call['args'])) {
$call['args'] = array();
}
foreach ($call['args'] as $arg) {
if ($j) {
$bt_string .= ', ';
}
if (is_bool($arg)) {
$bt_string .= ($arg) ? 'true' : 'false';
} elseif (is_null($arg)) {
$bt_string .= 'NULL';
} elseif (is_array($arg)) {
$bt_string .= 'Array';
} elseif (is_object($arg)) {
$bt_string .= 'Object(' . get_class($arg) . ')';
} elseif (is_string($arg)) {
// Shorten the UTF-8 string if it is too long
if (strlen(utf8_decode($arg)) > 18) {
// If we can't match as unicode, try single byte
if (!preg_match('#^(.{0,15})#us', $arg, $short_arg)) {
preg_match('#^(.{0,15})#s', $arg, $short_arg);
}
$arg = $short_arg[0] . '...';
}
$bt_string .= "'" . $arg . "'";
} else {
$bt_string .= (string) $arg;
}
$j++;
}
$bt_string .= ')';
}
$i++;
}
return $bt_string;
}
static public function call($callback, $parameters=array())
{
// Fix PHP 5.0 and 5.1 static callback syntax
if (is_string($callback) && strpos($callback, '::') !== FALSE) {
$callback = explode('::', $callback);
}
$parameters = array_slice(func_get_args(), 1);
if (sizeof($parameters) == 1 && is_array($parameters[0])) {
$parameters = $parameters[0];
}
return <API key>($callback, $parameters);
}
/**
* Translates a Class::method style static method callback to array style for compatibility with PHP 5.0 and 5.1 and built-in PHP functions
*
* @param callback $callback The callback to translate
* @return array The translated callback
*/
static public function callback($callback)
{
if (is_string($callback) && strpos($callback, '::') !== FALSE) {
return explode('::', $callback);
}
return $callback;
}
/**
* Checks an error/exception destination to make sure it is valid
*
* @param string $destination The destination for the exception. An email, file or the string `'html'`.
* @return string|boolean `'email'`, `'file'`, `'html'` or `FALSE`
*/
static private function checkDestination($destination)
{
if ($destination == 'html') {
return 'html';
}
if (preg_match('~^(?: # Allow leading whitespace
(?:[^\x00-\x20\(\)<>@,;:\\\\"\.\[\]]+|"[^"\\\\\n\r]+") # An "atom" or a quoted string
(?:\.[ \t]*(?:[^\x00-\x20\(\)<>@,;:\\\\"\.\[\]]+|"[^"\\\\\n\r]+"[ \t]*))* # A . plus another "atom" or a quoted string, any number of times
)@(?: # The @ symbol
(?:[a-z0-9\\-]+\.)+[a-z]{2,}| # Domain name
(?:(?:[01]?\d?\d|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d?\d|2[0-4]\d|25[0-5]) # (or) IP addresses
)
(?:\s*,\s* # Any number of other emails separated by a comma with surrounding spaces
(?:
(?:[^\x00-\x20\(\)<>@,;:\\\\"\.\[\]]+|"[^"\\\\\n\r]+")
(?:\.[ \t]*(?:[^\x00-\x20\(\)<>@,;:\\\\"\.\[\]]+|"[^"\\\\\n\r]+"[ \t]*))*
)@(?:
(?:[a-z0-9\\-]+\.)+[a-z]{2,}|
(?:(?:[01]?\d?\d|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d?\d|2[0-4]\d|25[0-5])
)
)*$~xiD', $destination)) {
return 'email';
}
$path_info = pathinfo($destination);
$dir_exists = file_exists($path_info['dirname']);
$dir_writable = ($dir_exists) ? is_writable($path_info['dirname']) : FALSE;
$file_exists = file_exists($destination);
$file_writable = ($file_exists) ? is_writable($destination) : FALSE;
if (!$dir_exists || ($dir_exists && ((!$file_exists && !$dir_writable) || ($file_exists && !$file_writable)))) {
return FALSE;
}
return 'file';
}
/**
* Returns is the current OS is one of the OSes passed as a parameter
*
* Valid OS strings are:
* - `'linux'`
* - `'aix'`
* - `'bsd'`
* - `'freebsd'`
* - `'netbsd'`
* - `'openbsd'`
* - `'osx'`
* - `'solaris'`
* - `'windows'`
*
* @param string $os The operating system to check - see method description for valid OSes
* @param string ...
* @return boolean If the current OS is included in the list of OSes passed as parameters
*/
static public function checkOS($os)
{
$oses = func_get_args();
$valid_oses = array('linux', 'aix', 'bsd', 'freebsd', 'openbsd', 'netbsd', 'osx', 'solaris', 'windows');
if ($invalid_oses = array_diff($oses, $valid_oses)) {
throw new <API key>(
'One or more of the OSes specified, %$1s, is invalid. Must be one of: %2$s.',
join(' ', $invalid_oses),
join(', ', $valid_oses)
);
}
$uname = php_uname('s');
if (stripos($uname, 'linux') !== FALSE) {
return in_array('linux', $oses);
} elseif (stripos($uname, 'aix') !== FALSE) {
return in_array('aix', $oses);
} elseif (stripos($uname, 'netbsd') !== FALSE) {
return in_array('netbsd', $oses) || in_array('bsd', $oses);
} elseif (stripos($uname, 'openbsd') !== FALSE) {
return in_array('openbsd', $oses) || in_array('bsd', $oses);
} elseif (stripos($uname, 'freebsd') !== FALSE) {
return in_array('freebsd', $oses) || in_array('bsd', $oses);
} elseif (stripos($uname, 'solaris') !== FALSE || stripos($uname, 'sunos') !== FALSE) {
return in_array('solaris', $oses);
} elseif (stripos($uname, 'windows') !== FALSE) {
return in_array('windows', $oses);
} elseif (stripos($uname, 'darwin') !== FALSE) {
return in_array('osx', $oses);
}
throw new <API key>('Unable to determine the current OS');
}
/**
* Checks to see if the running version of PHP is greater or equal to the version passed
*
* @return boolean If the running version of PHP is greater or equal to the version passed
*/
static public function checkVersion($version)
{
static $running_version = NULL;
if ($running_version === NULL) {
$running_version = preg_replace(
'#^(\d+\.\d+\.\d+).*$#D',
'\1',
PHP_VERSION
);
}
return version_compare($running_version, $version, '>=');
}
/**
* Composes text using fText if loaded
*
* @param string $message The message to compose
* @param mixed $component A string or number to insert into the message
* @param mixed ...
* @return string The composed and possible translated message
*/
static private function compose($message)
{
$args = array_slice(func_get_args(), 1);
if (class_exists('fText', FALSE)) {
return <API key>(
array('fText', 'compose'),
array($message, $args)
);
} else {
return vsprintf($message, $args);
}
}
/**
* Sets an fSMTP object to be used for sending error and exception emails
*
* @param fSMTP $smtp The SMTP connection to send emails over
* @param string $from_email The email address to use in the `From:` header
* @return void
*/
static public function configureSMTP($smtp, $from_email)
{
self::$smtp_connection = $smtp;
self::$smtp_from_email = $from_email;
}
/**
* Prints a debugging message if global or code-specific debugging is enabled
*
* @param string $message The debug message
* @param boolean $force If debugging should be forced even when global debugging is off
* @return void
*/
static public function debug($message, $force=FALSE)
{
if ($force || self::$debug) {
if (self::$debug_callback) {
call_user_func(self::$debug_callback, $message);
} else {
self::expose($message);
}
}
}
static public function detectOpcodeCache()
{
$apc = ini_get('apc.enabled');
$eaccelerator = ini_get('eaccelerator.enable');
$mmcache = ini_get('mmcache.enable');
$phpexpress = function_exists('phpexpress');
$xcache = ini_get('xcache.size') > 0 && ini_get('xcache.cacher');
$zend_accelerator = ini_get('zend_accelerator.enabled');
$zend_plus = ini_get('zend_optimizerplus.enable');
return $apc || $eaccelerator || $mmcache || $phpexpress || $xcache || $zend_accelerator || $zend_plus;
}
static public function dump($data)
{
if (is_bool($data)) {
return ($data) ? '{true}' : '{false}';
} elseif (is_null($data)) {
return '{null}';
} elseif ($data === '') {
return '{empty_string}';
} elseif (is_array($data) || is_object($data)) {
ob_start();
var_dump($data);
$output = ob_get_contents();
ob_end_clean();
// Make the var dump more like a print_r
$output = preg_replace('#=>\n( )+(?=[a-zA-Z]|&)#m', ' => ', $output);
$output = str_replace('string(0) ""', '{empty_string}', $output);
$output = preg_replace('#=> (&)?NULL#', '=> \1{null}', $output);
$output = preg_replace('#=> (&)?bool\((false|true)\)#', '=> \1{\2}', $output);
$output = preg_replace('#string\(\d+\) "#', '', $output);
$output = preg_replace('#"(\n( )*)(?=\[|\})#', '\1', $output);
$output = preg_replace('#(?:float|int)\((-?\d+(?:.\d+)?)\)#', '\1', $output);
$output = preg_replace('#((?: )+)\["(.*?)"\]#', '\1[\2]', $output);
$output = preg_replace('#(?:&)?array\(\d+\) \{\n((?: )*)((?: )(?=\[)|(?=\}))#', "Array\n\\1(\n\\1\\2", $output);
$output = preg_replace('/object\((\w+)\)#\d+ \(\d+\) {\n((?: )*)((?: )(?=\[)|(?=\}))/', "\\1 Object\n\\2(\n\\2\\3", $output);
$output = preg_replace('#^((?: )+)}(?=\n|$)#m', "\\1)\n", $output);
$output = substr($output, 0, -2) . ')';
// Fix indenting issues with the var dump output
$output_lines = explode("\n", $output);
$new_output = array();
$stack = 0;
foreach ($output_lines as $line) {
if (preg_match('#^((?: )*)([^ ])#', $line, $match)) {
$spaces = strlen($match[1]);
if ($spaces && $match[2] == '(') {
$stack += 1;
}
$new_output[] = str_pad('', ($spaces)+(4*$stack)) . $line;
if ($spaces && $match[2] == ')') {
$stack -= 1;
}
} else {
$new_output[] = str_pad('', ($spaces)+(4*$stack)) . $line;
}
}
return join("\n", $new_output);
} else {
return (string) $data;
}
}
/**
* Disables including the context information with exception and error messages
*
* The context information includes the following superglobals:
*
* - `$_SERVER`
* - `$_POST`
* - `$_GET`
* - `$_SESSION`
* - `$_FILES`
* - `$_COOKIE`
*
* @return void
*/
static public function disableContext()
{
self::$show_context = FALSE;
}
/**
* Enables debug messages globally, i.e. they will be shown for any call to ::debug()
*
* @param boolean $flag If debugging messages should be shown
* @return void
*/
static public function enableDebugging($flag)
{
self::$debug = (boolean) $flag;
}
static public function <API key>()
{
if (!self::$handles_errors) {
throw new <API key>(
'Dynamic constants can not be enabled unless error handling has been enabled via %s',
__CLASS__ . '::enableErrorHandling()'
);
}
self::$dynamic_constants = TRUE;
}
static public function enableErrorHandling($destination)
{
if (!self::checkDestination($destination)) {
return;
}
self::$error_destination = $destination;
self::$handles_errors = TRUE;
set_error_handler(self::callback(self::handleError));
}
/**
* Turns on developer-friendly uncaught exception handling that includes context information including a backtrace and superglobal dumps
*
* Any uncaught exception will be redirected to the destination specified,
* and the page will execute the `$closing_code` callback before exiting.
* The destination will receive a message with the exception messaage, a
* full backtrace and dumps of the following superglobals to aid in
* debugging:
*
* - `$_SERVER`
* - `$_POST`
* - `$_GET`
* - `$_SESSION`
* - `$_FILES`
* - `$_COOKIE`
*
* The superglobal dumps are only done once per page, however a backtrace
* in included for each error.
*
* If an email address is specified for the destination, only one email
* will be sent per script execution.
*
* If an email address is specified for the destination, only one email
* will be sent per script execution. If both exception and
* [enableErrorHandling() error handling] are set to the same
* email address, the email will contain both exceptions and errors.
*
* @param string $destination The destination for the exception and context information - an email address, a file path or the string `'html'`
* @param callback $closing_code This callback will happen after the exception is handled and before page execution stops. Good for printing a footer. If no callback is provided and the exception extends fException, fException::printMessage() will be called.
* @param array $parameters The parameters to send to `$closing_code`
* @return void
*/
static public function <API key>($destination, $closing_code=NULL, $parameters=array())
{
if (!self::checkDestination($destination)) {
return;
}
self::$handles_exceptions = TRUE;
self::$<API key> = $destination;
self::$<API key> = $closing_code;
if (!is_object($parameters)) {
settype($parameters, 'array');
} else {
$parameters = array($parameters);
}
self::$<API key> = $parameters;
<API key>(self::callback(self::handleException));
}
/**
* Prints the ::dump() of a value
*
* The dump will be printed in a `<pre>` tag with the class `exposed` if
* PHP is running anywhere but via the command line (cli). If PHP is
* running via the cli, the data will be printed, followed by a single
* line break (`\n`).
*
* If multiple parameters are passed, they are exposed as an array.
*
* @param mixed $data The value to show
* @param mixed ...
* @return void
*/
static public function expose($data)
{
$args = func_get_args();
if (count($args) > 1) {
$data = $args;
}
if (PHP_SAPI != 'cli') {
echo '<pre class="exposed">' . htmlspecialchars((string) self::dump($data), ENT_QUOTES) . '</pre>';
} else {
echo self::dump($data) . "\n";
}
}
/**
* Generates some information about the context of an error or exception
*
* @return string A string containing `$_SERVER`, `$_GET`, `$_POST`, `$_FILES`, `$_SESSION` and `$_COOKIE`
*/
static private function generateContext()
{
return self::compose('Context') . "\n
"\n\n\$_SERVER: " . self::dump($_SERVER) .
"\n\n\$_POST: " . self::dump($_POST) .
"\n\n\$_GET: " . self::dump($_GET) .
"\n\n\$_FILES: " . self::dump($_FILES) .
"\n\n\$_SESSION: " . self::dump((isset($_SESSION)) ? $_SESSION : NULL) .
"\n\n\$_COOKIE: " . self::dump($_COOKIE);
}
/**
* If debugging is enabled
*
* @param boolean $force If debugging is forced
* @return boolean If debugging is enabled
*/
static public function getDebug($force=FALSE)
{
return self::$debug || $force;
}
/**
* Handles an error, creating the necessary context information and sending it to the specified destination
*
* @internal
*
* @param integer $error_number The error type
* @param string $error_string The message for the error
* @param string $error_file The file the error occured in
* @param integer $error_line The line the error occured on
* @param array $error_context A references to all variables in scope at the occurence of the error
* @return void
*/
static public function handleError($error_number, $error_string, $error_file=NULL, $error_line=NULL, $error_context=NULL)
{
if (self::$dynamic_constants && $error_number == E_NOTICE) {
if (preg_match("#^Use of undefined constant (\w+) - assumed '\w+'\$#D", $error_string, $matches)) {
define($matches[1], $matches[1]);
return;
}
}
$capturing = is_array(self::$captured_errors);
$level_match = (bool) (error_reporting() & $error_number);
if (!$capturing && !$level_match) {
return;
}
$doc_root = realpath($_SERVER['DOCUMENT_ROOT']);
$doc_root .= (substr($doc_root, -1) != '/' && substr($doc_root, -1) != '\\') ? '/' : '';
$backtrace = self::backtrace(1);
// Remove the reference to handleError
$backtrace = preg_replace('#: fCore::handleError\(.*?\)$#', '', $backtrace);
$error_string = preg_replace('# \[<a href=\'.*?</a>\]: #', ': ', $error_string);
// This was added in 5.2
if (!defined('E_RECOVERABLE_ERROR')) {
define('E_RECOVERABLE_ERROR', 4096);
}
// These were added in 5.3
if (!defined('E_DEPRECATED')) {
define('E_DEPRECATED', 8192);
}
if (!defined('E_USER_DEPRECATED')) {
define('E_USER_DEPRECATED', 16384);
}
switch ($error_number) {
case E_WARNING: $type = self::compose('Warning'); break;
case E_NOTICE: $type = self::compose('Notice'); break;
case E_USER_ERROR: $type = self::compose('User Error'); break;
case E_USER_WARNING: $type = self::compose('User Warning'); break;
case E_USER_NOTICE: $type = self::compose('User Notice'); break;
case E_STRICT: $type = self::compose('Strict'); break;
case E_RECOVERABLE_ERROR: $type = self::compose('Recoverable Error'); break;
case E_DEPRECATED: $type = self::compose('Deprecated'); break;
case E_USER_DEPRECATED: $type = self::compose('User Deprecated'); break;
}
if ($capturing) {
$type_to_capture = (bool) (self::$<API key> & $error_number);
$string_to_capture = !self::$<API key> || (self::$<API key> && preg_match(self::$<API key>, $error_string));
if ($type_to_capture && $string_to_capture) {
self::$captured_errors[] = array(
'number' => $error_number,
'type' => $type,
'string' => $error_string,
'file' => str_replace($doc_root, '{doc_root}/', $error_file),
'line' => $error_line,
'backtrace' => $backtrace,
'context' => $error_context
);
return;
}
// If the old handler is not this method, then we must have been trying to match a regex and failed
// so we pass the error on to the original handler to do its thing
if (self::$<API key> != array('fCore', 'handleError')) {
if (self::$<API key> === NULL) {
return FALSE;
}
return call_user_func(self::$<API key>, $error_number, $error_string, $error_file, $error_line, $error_context);
// If we get here, this method is the error handler, but we don't want to actually report the error so we return
} elseif (!$level_match) {
return;
}
}
$error = $type . "\n" . str_pad('', strlen($type), '-') . "\n" . $backtrace . "\n" . $error_string;
self::<API key>('error', $error);
}
/**
* Handles an uncaught exception, creating the necessary context information, sending it to the specified destination and finally executing the closing callback
*
* @internal
*
* @param object $exception The uncaught exception to handle
* @return void
*/
static public function handleException($exception)
{
$message = ($exception->getMessage()) ? $exception->getMessage() : '{no message}';
if ($exception instanceof fException) {
$trace = $exception->formatTrace();
} else {
$trace = $exception->getTraceAsString();
}
$code = ($exception->getCode()) ? ' (code ' . $exception->getCode() . ')' : '';
$info = $trace . "\n" . $message . $code;
$headline = self::compose("Uncaught") . " " . get_class($exception);
$info_block = $headline . "\n" . str_pad('', strlen($headline), '-') . "\n" . trim($info);
self::<API key>('exception', $info_block);
if (self::$<API key> === NULL) {
if (self::$<API key> != 'html' && $exception instanceof fException) {
$exception->printMessage();
}
return;
}
try {
self::call(self::$<API key>, self::$<API key>);
} catch (Exception $e) {
trigger_error(
self::compose(
'An exception was thrown in the %s closing code callback',
'<API key>()'
),
E_USER_ERROR
);
}
}
/**
* Registers a callback to handle debug messages instead of the default action of calling ::expose() on the message
*
* @param callback $callback A callback that accepts a single parameter, the string debug message to handle
* @return void
*/
static public function <API key>($callback)
{
self::$debug_callback = self::callback($callback);
}
/**
* Resets the configuration of the class
*
* @internal
*
* @return void
*/
static public function reset()
{
if (self::$handles_errors) {
<API key>();
}
if (self::$handles_exceptions) {
<API key>();
}
if (is_array(self::$captured_errors)) {
<API key>();
}
self::$<API key> = NULL;
self::$<API key> = NULL;
self::$<API key> = NULL;
self::$captured_errors = NULL;
self::$context_shown = FALSE;
self::$debug = NULL;
self::$debug_callback = NULL;
self::$dynamic_constants = FALSE;
self::$error_destination = 'html';
self::$error_message_queue = array();
self::$<API key> = 'html';
self::$<API key> = NULL;
self::$<API key> = array();
self::$exception_message = NULL;
self::$handles_errors = FALSE;
self::$handles_exceptions = FALSE;
self::$show_context = TRUE;
}
/**
* Sends an email or writes a file with messages generated during the page execution
*
* This method prevents multiple emails from being sent or a log file from
* being written multiple times for one script execution.
*
* @internal
*
* @return void
*/
static public function <API key>()
{
$subject = self::compose(
'[%1$s] One or more errors or exceptions occured at %2$s',
isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : php_uname('n'),
date('Y-m-d H:i:s')
);
$messages = array();
if (self::$error_message_queue) {
$message = join("\n\n", self::$error_message_queue);
$messages[self::$error_destination] = $message;
}
if (self::$exception_message) {
if (isset($messages[self::$<API key>])) {
$messages[self::$<API key>] .= "\n\n";
} else {
$messages[self::$<API key>] = '';
}
$messages[self::$<API key>] .= self::$exception_message;
}
foreach ($messages as $destination => $message) {
if (self::$show_context) {
$message .= "\n\n" . self::generateContext();
}
if (self::checkDestination($destination) == 'email') {
if (self::$smtp_connection) {
$email = new fEmail();
foreach (explode(',', $destination) as $recipient) {
$email->addRecipient($recipient);
}
$email->setFromEmail(self::$smtp_from_email);
$email->setSubject($subject);
$email->setBody($message);
$email->send(self::$smtp_connection);
} else {
mail($destination, $subject, $message);
}
} else {
$handle = fopen($destination, 'a');
fwrite($handle, $subject . "\n\n");
fwrite($handle, $message . "\n\n");
fclose($handle);
}
}
}
/**
* Handles sending a message to a destination
*
* If the destination is an email address or file, the messages will be
* spooled up until the end of the script execution to prevent multiple
* emails from being sent or a log file being written to multiple times.
*
* @param string $type If the message is an error or an exception
* @param string $message The message to send to the destination
* @return void
*/
static private function <API key>($type, $message)
{
$destination = ($type == 'exception') ? self::$<API key> : self::$error_destination;
if ($destination == 'html') {
if (self::$show_context && !self::$context_shown) {
self::expose(self::generateContext());
self::$context_shown = TRUE;
}
self::expose($message);
return;
}
static $registered_function = FALSE;
if (!$registered_function) {
<API key>(self::callback(self::<API key>));
$registered_function = TRUE;
}
if ($type == 'error') {
self::$error_message_queue[] = $message;
} else {
self::$exception_message = $message;
}
}
/**
* Temporarily enables capturing error messages
*
* @param integer $types The error types to capture - this should be as specific as possible - defaults to all (E_ALL | E_STRICT)
* @param string $regex A PCRE regex to match against the error message
* @return void
*/
static public function startErrorCapture($types=NULL, $regex=NULL)
{
if ($types === NULL) {
$types = E_ALL | E_STRICT;
}
self::$<API key> = $types;
self::$captured_errors = array();
self::$<API key> = set_error_handler(self::callback(self::handleError));
self::$<API key> = $regex;
}
/**
* Stops capturing error messages, returning all that have been captured
*
* @param string $regex A PCRE regex to filter messages by
* @return array The captured error messages
*/
static public function stopErrorCapture($regex=NULL)
{
$captures = self::$captured_errors;
self::$<API key> = NULL;
self::$<API key> = NULL;
self::$<API key> = NULL;
self::$captured_errors = NULL;
<API key>();
if ($regex) {
$new_captures = array();
foreach ($captures as $capture) {
if (!preg_match($regex, $capture['string'])) { continue; }
$new_captures[] = $capture;
}
$captures = $new_captures;
}
return $captures;
}
/**
* Forces use as a static class
*
* @return fCore
*/
private function __construct() { }
}
|
package com.blinkboxbooks.android.list;
import android.content.Context;
import android.database.ContentObserver;
import android.database.Cursor;
import android.database.MergeCursor;
import android.support.v4.content.AsyncTaskLoader;
import android.util.SparseArray;
import com.blinkboxbooks.android.model.Book;
import com.blinkboxbooks.android.model.BookItem;
import com.blinkboxbooks.android.model.Bookmark;
import com.blinkboxbooks.android.model.Query;
import com.blinkboxbooks.android.model.helper.BookHelper;
import com.blinkboxbooks.android.model.helper.BookmarkHelper;
import com.blinkboxbooks.android.util.LogUtils;
import com.crashlytics.android.Crashlytics;
import java.util.ArrayList;
import java.util.List;
/*
* A loader that queries the {@link ContentResolver} and returns a {@link Cursor}.
* This class implements the {@link Loader} protocol in a standard way for
* querying cursors, building on {@link AsyncTaskLoader} to perform the cursor
* query on a background thread so that it does not block the application's UI.
*
* <p>A LibraryLoader must be built with the full information for the query to
* perform.
*/
public class LibraryLoader extends AsyncTaskLoader<List<BookItem>> {
final <API key> mObserver;
List<BookItem> mBookItems;
private List<Query> mQueryList;
/**
* Creates an empty unspecified CursorLoader. You must follow this with
* calls to {@link #setQueryList(List<Query>)} to specify the query to
* perform.
*/
public LibraryLoader(Context context) {
super(context);
mObserver = new <API key>();
}
/**
* Creates a fully-specified LibraryLoader.
*/
public LibraryLoader(Context context, List<Query> queryList) {
super(context);
mObserver = new <API key>();
mQueryList = queryList;
}
public void setQueryList(List<Query> queryList) {
mQueryList = queryList;
}
/* Runs on a worker thread */
@Override
public List<BookItem> loadInBackground() {
Cursor cursor = null;
List<Cursor> cursorList = new ArrayList<Cursor>();
for (Query query : mQueryList) {
cursor = getContext().getContentResolver().query(query.uri, query.projection, query.selection, query.selectionArgs, query.sortOrder);
if (cursor != null) {
// Ensure the cursor window is filled
cursor.getCount();
// <API key>(cursor, mObserver);
cursorList.add(cursor);
}
}
Cursor[] cursorArray = new Cursor[cursorList.size()];
List<BookItem> bookItemList;
if (cursorList.size() > 0) {
bookItemList = createBookItems(new MergeCursor(cursorList.toArray(cursorArray)));
for (Cursor c : cursorList) {
c.close();
}
} else {
// Return an empty book list
bookItemList = new ArrayList<BookItem>();
}
return bookItemList;
}
/**
* Registers an observer to get notifications from the content provider
* when the cursor needs to be refreshed.
*/
void <API key>(Cursor cursor, ContentObserver observer) {
cursor.<API key>(mObserver);
}
/* Runs on the UI thread */
@Override
public void deliverResult(List<BookItem> bookItems) {
if (isReset()) {
// An async query came in while the loader is stopped
return;
}
mBookItems = bookItems;
if (isStarted()) {
super.deliverResult(bookItems);
}
}
/**
* Starts an asynchronous load of the book list data. When the result is ready the callbacks
* will be called on the UI thread. If a previous load has been completed and is still valid
* the result may be passed to the callbacks immediately.
* <p/>
* Must be called from the UI thread
*/
@Override
protected void onStartLoading() {
if (mBookItems != null) {
deliverResult(mBookItems);
}
if (takeContentChanged() || mBookItems == null) {
forceLoad();
}
}
/**
* Must be called from the UI thread
*/
@Override
protected void onStopLoading() {
// Attempt to cancel the current load task if possible.
cancelLoad();
}
@Override
protected void onReset() {
super.onReset();
// Ensure the loader is stopped
onStopLoading();
}
/**
* Takes a list of books from the Cursor and arranges them into a list of BookItem objects
*/
private List<BookItem> createBookItems(Cursor cursor) {
// Check for error cases
if (cursor == null || cursor.isClosed()) {
String error = String.format("Trying to create a new library item list with %s cursor.", cursor == null ? "null" : "closed");
Crashlytics.logException(new Exception(error));
LogUtils.stack();
List<BookItem> bookItems = new ArrayList<BookItem>();
return bookItems;
}
cursor.moveToFirst();
Book book;
Bookmark bookmark;
BookItem bookItem;
List<BookItem> booksList = new ArrayList<BookItem>();
while (!cursor.isAfterLast()) {
book = BookHelper.createBook(cursor);
bookmark = BookmarkHelper.createBookmark(cursor);
bookItem = new BookItem(book, bookmark, "", "", null);
booksList.add(bookItem);
cursor.moveToNext();
}
return booksList;
}
}
|
<?php
return array (
'id' => '<API key>',
'fallback' => 'samsung_d500_ver1',
'capabilities' =>
array (
'max_data_rate' => '40',
),
);
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><API key>: Not compatible </title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- 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/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.13.2 / <API key> - 1.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
<API key>
<small>
1.1
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-11-25 05:11:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-25 05:11:20 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 3 Virtual package relying on a GMP lib system installation
coq 8.13.2 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "pierre-yves@strub.nu"
homepage: "https://github.com/math-comp/multinomials-ssr"
bug-reports: "https://github.com/math-comp/multinomials-ssr/issues"
dev-repo: "git+https://github.com/math-comp/multinomials.git"
license: "CeCILL-B"
authors: ["Pierre-Yves Strub"]
build: [
[make "INSTMODE=global" "config"]
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/SsrMultinomials"]
depends: [
"ocaml"
"coq" {>= "8.5"}
"<API key>" {>= "1.6" & < "1.8.0~"}
"<API key>" {>= "1.6" & < "1.8.0~"}
"<API key>" {>= "1.0.0" & < "1.1.0~"}
"coq-mathcomp-finmap" {>= "1.0.0" & < "1.1.0~"}
]
tags: [
"keyword:multinomials"
"keyword:monoid algebra"
"category:Math/Algebra/Multinomials"
"category:Math/Algebra/Monoid algebra"
"date:2016"
"logpath:SsrMultinomials"
]
synopsis: "A multivariate polynomial library for the Mathematical Components Library"
flags: light-uninstall
url {
src: "https://github.com/math-comp/multinomials/archive/1.1.tar.gz"
checksum: "md5=<API key>"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install </h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action <API key>.1.1 coq.8.13.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.13.2).
The following dependencies couldn't be met:
- <API key> -> coq-mathcomp-finmap < 1.1.0~ -> <API key> < 1.8~ -> coq < 8.10~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.1.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
using System;
using System.Net.Http;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Castle.Core;
using DotJEM.Json.Storage.Adapter;
using DotJEM.Pipelines;
using DotJEM.Web.Host.Diagnostics.Performance;
using DotJEM.Web.Host.Providers.Concurrency;
using DotJEM.Web.Host.Providers.Services.DiffMerge;
using Newtonsoft.Json.Linq;
namespace DotJEM.Web.Host.Providers.Services
{
public interface IContentService
{
IStorageArea StorageArea { get; }
Task<JObject> GetAsync(Guid id, string contentType);
Task<JObject> PostAsync(string contentType, JObject entity);
Task<JObject> PutAsync(Guid id, string contentType, JObject entity);
Task<JObject> PatchAsync(Guid id, string contentType, JObject entity);
Task<JObject> DeleteAsync(Guid id, string contentType);
}
//TODO: Apply Pipeline for all requests.
[Interceptor(typeof(<API key>))]
public class ContentService : IContentService
{
private readonly IStorageArea area;
private readonly <API key> manager;
private readonly IPipelines pipelines;
private readonly <API key> merger;
public IStorageArea StorageArea => area;
public ContentService(IStorageArea area,
<API key> manager,
IPipelines pipelines,
IJsonMergeVisitor merger)
{
this.area = area;
this.manager = manager;
this.pipelines = pipelines;
this.merger = new ContentMergeService(merger, area);
}
public Task<JObject> GetAsync(Guid id, string contentType)
{
HttpGetContext context = new (contentType, id);
ICompiledPipeline<JObject> pipeline = pipelines
.For(context, ctx => Task.Run(() => area.Get(ctx.Id)));
return pipeline.Invoke();
}
public async Task<JObject> PostAsync(string contentType, JObject entity)
{
HttpPostContext context = new (contentType, entity);
ICompiledPipeline<JObject> pipeline = pipelines
.For(context, ctx => Task.Run(() => area.Insert(ctx.ContentType, ctx.Entity)));
entity = await pipeline.Invoke().ConfigureAwait(false);
manager.QueueUpdate(entity);
return entity;
}
public async Task<JObject> PutAsync(Guid id, string contentType, JObject entity)
{
JObject prev = area.Get(id);
entity = merger.EnsureMerge(id, entity, prev);
HttpPutContext context = new (contentType, id, entity, prev);
ICompiledPipeline<JObject> pipeline = pipelines
.For(context, ctx => Task.Run(() => area.Update(ctx.Id, ctx.Entity)));
entity = await pipeline.Invoke().ConfigureAwait(false);
manager.QueueUpdate(entity);
return entity;
}
public async Task<JObject> PatchAsync(Guid id, string contentType, JObject entity)
{
JObject prev = area.Get(id);
//TODO: This can be done better by simply merging the prev into the entity but skipping
// values that are present in the entity. However, we might wan't to inclide the raw patch
// content in the pipeline as well, so we need to consider pro/cons
JObject clone = (JObject)prev.DeepClone();
clone.Merge(entity);
entity = clone;
entity = merger.EnsureMerge(id, entity, prev);
HttpPatchContext context = new (contentType, id, entity, prev);
ICompiledPipeline<JObject> pipeline = pipelines
.For(context, ctx => Task.Run(() => area.Update(ctx.Id, ctx.Entity)));
entity = await pipeline.Invoke().ConfigureAwait(false);
manager.QueueUpdate(entity);
return entity;
}
public async Task<JObject> DeleteAsync(Guid id, string contentType)
{
JObject prev = area.Get(id);
if (prev == null)
return null;
HttpDeleteContext context = new (contentType, id, prev);
ICompiledPipeline<JObject> pipeline = pipelines
.For(context, ctx => Task.Run(() => area.Delete(ctx.Id)));
JObject deleted = await pipeline.Invoke().ConfigureAwait(false);
//Note: This may pose a bit of a problem, because we don't lock so far out (performance),
// this can theoretically happen if two threads or two nodes are trying to delete the
// same object at the same time.
if (deleted == null)
return null;
manager.QueueDelete(deleted);
return deleted;
}
}
public class HttpPipelineContext : PipelineContext
{
public HttpPipelineContext(string method, string contentType)
{
this.Set(nameof(method), method);
this.Set(nameof(contentType), contentType);
}
}
public class HttpGetContext : HttpPipelineContext
{
public string ContentType => (string)Get("contentType");
public Guid Id => (Guid) Get("id");
public HttpGetContext(string contentType, Guid id)
: base("GET", contentType)
{
Set(nameof(id), id);
}
}
public class HttpPostContext : HttpPipelineContext
{
public string ContentType => (string)Get("contentType");
public JObject Entity => (JObject)Get("entity");
public HttpPostContext( string contentType, JObject entity)
: base("POST", contentType)
{
Set(nameof(entity), entity);
}
}
public class HttpPutContext : HttpPipelineContext
{
public string ContentType => (string)Get("contentType");
public Guid Id => (Guid) Get("id");
public JObject Entity => (JObject)Get("entity");
public JObject Previous => (JObject)Get("previous");
public HttpPutContext(string contentType, Guid id, JObject entity, JObject previous)
: base("PUT", contentType)
{
Set(nameof(id), id);
Set(nameof(entity), entity);
Set(nameof(previous), previous);
}
}
public class HttpPatchContext : HttpPipelineContext
{
public string ContentType => (string)Get("contentType");
public Guid Id => (Guid)Get("id");
public JObject Entity => (JObject)Get("entity");
public JObject Previous => (JObject)Get("previous");
public HttpPatchContext(string contentType, Guid id, JObject entity, JObject previous)
: base("PATCH", contentType)
{
Set(nameof(id), id);
Set(nameof(entity), entity);
Set(nameof(previous), previous);
}
}
public class HttpDeleteContext : HttpPipelineContext
{
public string ContentType => (string)Get("contentType");
public Guid Id => (Guid)Get("id");
public HttpDeleteContext(string contentType, Guid id, JObject previous)
: base("DELETE", contentType)
{
Set(nameof(id), id);
Set(nameof(previous), previous);
}
}
}
|
package com.gdgand.rxjava.rxjavasample.hotandcold;
import android.app.Application;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.<API key>;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.<API key>;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.module.ApplicationModule;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.module.DataModule;
public class SampleApplication extends Application {
private <API key> <API key>;
@Override
public void onCreate() {
super.onCreate();
<API key> = createComponent();
}
private <API key> createComponent() {
return <API key>.builder()
.applicationModule(new ApplicationModule(this))
.dataModule(new DataModule())
.build();
}
public <API key> <API key>() {
return <API key>;
}
}
|
'use strict'
var solc = require('solc/wrapper')
var compileJSON = function () { return '' }
var missingInputs = []
module.exports = function (self) {
self.addEventListener('message', function (e) {
var data = e.data
switch (data.cmd) {
case 'loadVersion':
delete self.Module
// NOTE: workaround some browsers?
self.Module = undefined
compileJSON = null
self.importScripts(data.data)
var compiler = solc(self.Module)
compileJSON = function (input) {
try {
return compiler.<API key>(input, function (path) {
missingInputs.push(path)
return { 'error': 'Deferred import' }
})
} catch (exception) {
return JSON.stringify({ error: 'Uncaught JavaScript exception:\n' + exception })
}
}
self.postMessage({
cmd: 'versionLoaded',
data: compiler.version()
})
break
case 'compile':
missingInputs.length = 0
self.postMessage({cmd: 'compiled', job: data.job, data: compileJSON(data.input), missingInputs: missingInputs})
break
}
}, false)
}
|
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { SettingsComponent } from './settings.component';
describe('HomeComponent', () => {
let component: SettingsComponent;
let fixture: ComponentFixture<SettingsComponent>;
beforeEach(async(() => {
TestBed.<API key>({
declarations: [ SettingsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SettingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
|
//Express, Mongo & Environment specific imports
var express = require('express');
var morgan = require('morgan');
var serveStatic = require('serve-static');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var compression = require('compression');
var errorHandler = require('errorhandler');
var mongo = require('./api/config/db');
var env = require('./api/config/env');
// Controllers/Routes import
var BookController = require('./api/controller/BookController');
//MongoDB setup
mongo.createConnection(env.mongoUrl);
//Express setup
var app = express();
//Express middleware
app.use(morgan('short'));
app.use(serveStatic(__dirname + '/app'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(compression());
var environment = process.env.NODE_ENV || 'development';
if ('development' == environment) {
app.use(errorHandler({ dumpExceptions: true, showStack: true }));
var ImportController = require('./api/controller/ImportController');
app.get('/import', ImportController.import);
app.get('/import/reset', ImportController.reset);
}
// Route definitions
app.get('/api/books', BookController.list);
app.get('/api/books/:id', BookController.show);
app.post('api/books', BookController.create);
app.put('/api/books/:id', BookController.update);
app.delete('/api/books/:id', BookController.remove);
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Books app listening at http://%s:%s', host, port);
console.log("Configured MongoDB URL: " + env.mongoUrl);
});
|
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.<API key>(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var <API key> = (function () {
function <API key>() {
}
<API key>.prototype.ngOnInit = function () {
};
__decorate([
core_1.Input(),
__metadata('design:type', Object)
], <API key>.prototype, "<API key>", void 0);
<API key> = __decorate([
core_1.Component({
selector: '<API key>',
styleUrls: ['./conversation-header.component.scss'],
templateUrl: './conversation-header.component.html'
}),
__metadata('design:paramtypes', [])
], <API key>);
return <API key>;
}());
exports.<API key> = <API key>;
//# sourceMappingURL=conversation-header.component.js.map
|
const describe = require("mocha").describe;
const it = require("mocha").it;
const assert = require("chai").assert;
const HttpError = require("./HttpError");
describe("HttpError", function () {
it("should be instance of Error", function () {
const testSubject = new HttpError();
assert.isOk(testSubject instanceof Error);
});
});
|
import { inject, injectable } from 'inversify';
import TYPES from '../../di/types';
import * as i from '../../i';
import { RunOptions } from '../../models';
import { IInputConfig } from '../../user-extensibility';
import { BaseInputManager } from '../base-input-manager';
var NestedError = require('nested-error-stacks');
@injectable()
export class CustomInputManager extends BaseInputManager {
constructor(
@inject(TYPES.HandlerService) private handlerService: i.IHandlerService
) {
super();
}
async ask(config: IInputConfig, options: RunOptions): Promise<{ [key: string]: any }> {
try {
const handler: Function = await this.handlerService
.resolveAndLoad(this.tmplRootPath, config.handler);
return handler(config);
} catch (ex) {
throw new NestedError("Error running handler for input configuration", ex);
}
}
}
|
<?php
if (!file_exists('./../include/config.php')){
header('Location:install.php');
}
include('./../include/config.php');
include('./../include/functions.php');
if (isset($_POST['step']))
$step = intval($_POST['step']);
else{
$step = 0;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>SPC - DB Upgrade</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./../css/spc.css" type="text/css" media="screen" />
<link rel="icon" type="image/png" href="./../favicon.png" />
<style type="text/css">
body{
font-size: 16px;
}
h1, h2{
color: #ff0056;
margin: 6px;
}
h1{
font-size: 60px;
}
dt{
color: #999;
}
dd, dl{
margin-left: 10px;
}
p{
margin-left: 10px;
margin-bottom: 10px;
}
.code{
border: 1px solid #ff0056;
padding: 6px;
}
</style>
</head>
<body>
<div id="wrap">
<h1>Welcome to Simple Photos Contest DataBase Upgrader</h1>
<?php
switch($step){
case 0: ?>
<form class="large" method="POST" action="upgrade.php">
<p><em>This installer will be displayed in english only</em>.</p>
<p>It's <b>highly recommended</b> to do an SQL backup before upgrading.</p>
<div class="form_buttons">
<input type="submit" value="Upgrade" name="submit"/>
<input type="hidden" name="step" value="1"/>
</div>
<?php
break;
case 1 :?>
<form class="large" method="POST" action="../index.php">
<p>Upgrade from <a href="#"><?php
if(!isset($settings->spc_version) or $settings->spc_version=="")
echo "Unknown(2.0?)";
else
echo $settings->spc_version;
?></a> to <a href="#" title="<?php echo SPC_VERSION; ?>"><?php echo SPC_VERSION_DB; ?></a></p>
<?php
if(!isset($settings->spc_version) or $settings->spc_version=="")
$ver = 0;
else
$ver = $settings->spc_version;
function sqlalter($command){
global $bd;
if (!mysqli_query($bd,"ALTER TABLE ".$command)) {
die("Error : ". mysqli_error($bd));
}
}
switch($ver)
{
case SPC_VERSION_DB:
echo " <p>No upgraded needed</p>";
break;
case 0:
sqlalter("`contests` ADD `icon` VARCHAR(200) NOT NULL");
sqlalter("`settings` ADD `language_auto` BOOLEAN NOT NULL") ;
sqlalter("`settings` ADD `homepage` BOOLEAN NOT NULL") ;
sqlalter("`settings` ADD `auth_method` INT(2) NOT NULL , ADD `spc_version` VARCHAR(8) NOT NULL") ;
sqlalter("`image_ip` CHANGE `ip_add` `ip_add` BIGINT NULL DEFAULT NULL;");
//case "3.0 A2":
if (!mysqli_query($bd, "UPDATE `settings` SET `spc_version`='".SPC_VERSION_DB."' WHERE 1")) {
die("Error : ". mysqli_error($bd));
}
echo " <p>Done!</a></p>";
break;
default:
echo " <p>Your version were not found. </p>";
break;
}
?>
<div class="form_buttons">
<input type="submit" value="Home" name="submit"/>
<input type="hidden" name="step" value="1"/>
</div>
</form>
<?php
break;
}
?>
</form>
</div>
<script>
var noTiling = true;
</script>
<script type="text/javascript" src="./../js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="./../js/jquery.freetile.min.js"></script>
<script type="text/javascript" src="./../js/contest.js"></script>
</body>
</html>
|
<html><body>
<h4>Windows 10 x64 (18362.329)</h4><br>
<h2><API key></h2>
<font face="arial"> +0x000 ImpersonationData : Uint8B<br>
+0x000 ImpersonationToken : Ptr64 Void<br>
+0x000 ImpersonationLevel : Pos 0, 2 Bits<br>
+0x000 EffectiveOnly : Pos 2, 1 Bit<br>
</font></body></html>
|
package io.blitz.curl.exception;
/**
* Exceptions thrown when a validation error occur during a test execution
* @author ghermeto
*/
public class ValidationException extends BlitzException {
/**
* Constructs an instance of <code>ValidationException</code> with the
* specified error and reason message.
* @param reason the detailed error message.
*/
public ValidationException(String reason) {
super("validation", reason);
}
}
|
<html><body>
<h4>Windows 10 x64 (19041.508)</h4><br>
<h2><API key></h2>
<font face="arial"> <API key> = 0n0<br>
<API key> = 0n4<br>
<API key> = 0n8<br>
<API key> = 0n12<br>
<API key> = 0n15<br>
</font></body></html>
|
/**
* The plugin global configuration object.
* @external "jQuery.vulcanup"
* @property {String} version - The plugin version.
* @property {settings} defaults - The default configuration.
* @property {Object} templates - The default templates.
*/
require('./jup-validation');
const templates = require('./templates');
const constants = require('./constants');
const defaults = require('./defaults');
const methods = require('./methods');
const utils = require('./utils');
const version = '1.0.0-beta';
$(document).on('drop dragover', function (e) {
e.preventDefault();
});
/**
* Invoke on a `<input type="file">` to set it as a file uploader.
*
* By default the configuration is {@link settings} but you can pass an object
* to configure it as you want.
*
* Listen to event changes on the same input, review demo to see how to implement them
* and what parameters they receive:
*
* **`vulcanup-val`** - On validation error. Receives as parameter an object with the error message.
*
* **`vulcanup-upload`** - On file started to being uploaded.
*
* **`vulcanup-progress`** - On upload progress update. Receives as parameter the progress number.
*
* **`vulcanup-error`** - On server error. Receives as parameter an object with details.
*
* **`vulcanup-change`** - On file change. This is triggered when the user uploads
* a file in the server, when it is deleted or when it is changed programmatically.
* Receives as parameter an object with the new file details.
*
* **`vulcanup-delete`** - On file deleted. Receives as parameter the deleted file details.
*
* **`vulcanup-uploaded`** - On file uploaded in the server.
*
* **`vulcanup-complete`** - On upload process completed. This is fired when the
* XHR is finished, regardless of fail or success.
*
* @function external:"jQuery.fn".vulcanup
*
* @param {settings} [settings] - Optional configuration.
*
* @example
* $('input[type=file]').vulcanup({
* url: '/initial/file/url.ext'
* });
*/
jQuery.fn.vulcanup = function (settings) {
'use strict';
const $input = $(this).first();
if (typeof settings === 'string') {
if (methods[settings]) {
if (!$input.data(`vulcanup-config`)) {
throw new Error(`vulcanup element is not instantiated, cannot invoke methods`);
}
const args = Array.prototype.slice.call(arguments, 1);
return methods[settings].apply($input, args);
} else {
throw new Error(`vulcanup method unrecognized "${settings}".`);
}
}
if ($input.data(`vulcanup-config`)) return this;
// CONFIGURATION
let id = $input.attr('id');
if (!id) {
id = 'vulcanup-'+ (new Date()).getTime();
$input.attr('id', id);
}
if ($input.attr('multiple') !== undefined) {
throw new Error('Input type file cannot be multiple');
}
const conf = $.extend(true, {}, defaults, settings, {
_id: id,
fileupload: {
fileInput: $input
}
});
// File type validation.
if (conf.types[conf.type]) {
conf._type = conf.types[conf.type];
conf.fileupload.acceptFileTypes = conf._type.formats;
} else {
throw new Error('A valid type of file is required');
}
$input.data(`vulcanup-config`, conf);
// DOM
const $container = $(utils.format(templates.main, conf));
const $validations = $(utils.format(templates.validations, conf));
const $remove = $container.find('.vulcanup__remove');
const $dropzone = $container.find('.vulcanup__dropzone');
const $msg = $container.find('.vulcanup__msg');
$remove.attr('title', utils.format(conf.messages.REMOVE, conf._type));
$input.addClass('vulcanup-input <API key>');
$input.after($container);
$container.after($validations);
conf.fileupload.dropZone = $container;
conf._$validations = $validations;
conf._$container = $container;
conf._$dropzone = $dropzone;
conf._$msg = $msg;
if (conf.type === 'image') {
$container.addClass('vulcanup_isimage');
}
if (conf.imageContain) {
$container.addClass('<API key>');
}
if (!conf.enableReupload) {
$container.addClass('vulcanup_noreupload');
}
if (conf.canRemove) {
$container.addClass('vulcanup_canremove');
}
// EVENTS
$input.
// On click.
on('click', function (e) {
if (conf._uploading || (conf._url && !conf.enableReupload)) {
e.preventDefault();
return false;
}
}).
// On user error.
on('<API key>', function (e, info) {
const err = info.files[0].error;
methods.setValidation.call($input, err);
}).
// On send.
on('fileuploadsend', function (e, data) {
methods.setUploading.call($input);
}).
// On server progress.
on('<API key>', function (e, data) {
const progress = parseInt(data.loaded / data.total * 100, 10);
methods.updateProgress.call($input, progress);
}).
// On server success.
on('fileuploaddone', function (e, data) {
const files = data.files;
const result = data.result;
if (conf.handler) {
const info = conf.handler(result);
if (typeof info !== 'object') {
methods.setError.call($input);
throw new Error('handler should return file object info');
}
if (typeof info.url !== 'string') {
methods.setError.call($input);
throw new Error('handler should return file url property');
}
methods.setUploaded.call($input, {
url: info.url,
file: files[0]
});
}
else if (result && result.files && result.files.length) {
methods.setUploaded.call($input, {
url: result.files[0].url,
file: files[0]
});
}
else {
methods.setError.call($input);
}
}).
// On server error.
on('fileuploadfail', function (e, data) {
methods.setError.call($input);
});
$dropzone.
on('dragenter dragover', e => {
$container.addClass('vulcanup_dragover');
}).
on('dragleave drop', e => {
$container.removeClass('vulcanup_dragover');
});
$container.find('.vulcanup__remove').on('click', function (e) {
e.preventDefault();
$input.trigger(`vulcanup-delete`, { url: conf._url, name: conf._name });
$input.trigger(`vulcanup-change`, { url: null, name: null });
methods.updateProgress.call($input, 0, {silent: true});
methods.setUpload.call($input);
return false;
});
// CREATING AND SETTING
$input.fileupload(conf.fileupload);
if (conf.url) {
methods.setUploaded.call(this, {
url: conf.url,
name: conf.name,
initial: true
});
} else {
methods.setUpload.call(this);
}
return this;
};
module.exports = jQuery.vulcanup = { version, defaults, templates };
|
const test = require('tape')
const nlp = require('../_lib')
test('match min-max', function(t) {
let doc = nlp('hello1 one hello2').match('#Value{7,9}')
t.equal(doc.out(), '', 'match was too short')
doc = nlp('hello1 one two three four five hello2').match('#Value{3}')
t.equal(doc.out(), 'one two three', 'exactly three')
doc = nlp('hello1 one two three four five hello2').match('#Value{3,3}')
t.equal(doc.out(), 'one two three', 'still exactly three')
doc = nlp('hello1 one two three four five hello2').match('#Value{3,}')
t.equal(doc.out(), 'one two three four five', 'minimum three')
doc = nlp('hello1 one two three four five hello2').match('hello1 .{3}')
t.equal(doc.out(), 'hello1 one two three', 'unspecific greedy exact length')
doc = nlp('hello1 one two').match('hello1 .{3}')
t.equal(doc.out(), '', 'unspecific greedy not long enough')
t.end()
})
|
# encoding: utf-8
require 'webmock/rspec'
require 'vcr'
require_relative '../lib/spotifiery'
VCR.configure do |config|
config.<API key> = 'spec/fixtures/vcr_cassettes'
config.hook_into :webmock
end
|
using System.IO;
using System.Runtime.InteropServices;
internal static class Example
{
[STAThread()]
public static void Main()
{
SolidEdgeFramework.Application objApplication = null;
SolidEdgeAssembly.AssemblyDocument objAssemblyDocument = null;
SolidEdgeAssembly.StructuralFrames objStructuralFrames = null;
// SolidEdgeAssembly.StructuralFrame objStructuralFrame = null;
try
{
OleMessageFilter.Register();
objApplication = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
objAssemblyDocument = objApplication.ActiveDocument;
objStructuralFrames = objAssemblyDocument.StructuralFrames;
// Loop through all of the structural frames.
foreach (SolidEdgeAssembly.StructuralFrame objStructuralFrame in objStructuralFrames)
{
objStructuralFrame.<API key>();
objStructuralFrame.DeleteHoleLocation();
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
OleMessageFilter.Revoke();
}
}
}
|
#!/usr/bin/env ruby
require 'json'
SRC_RANDOM = Random.new(1984)
MAX_VALUES = Hash.new(1).update "rcat" => 50, "vcat" => 50, "infq" => 5, "kws" => 10
MRG_VALUES = {
"dev" => ["oth","oth","oth","oth","oth","oth"],
"bwsm" => ["ff", "sf", "op", "ng", "kq", "an", "ms", "kk", "mo"],
"pos" => [2, 4, 5, 6, 7],
"mob" => [0] * 8,
"loc" => ["en","en","en","en","en","en","en","en","en","en","en","en","es","es","es","es"],
}
targets = []
attrs = {}
File.open(File.expand_path("../targets.json", __FILE__)) do |file|
targets = JSON.load(file)
end
targets.each do |target|
target['rules'].each do |rule|
attrs[rule['attr']] ||= []
attrs[rule['attr']].concat rule['values']
end
end
attrs.keys.each do |name|
attrs[name] = attrs[name].sort.uniq
attrs[name].concat(MRG_VALUES[name] || [])
end
File.open(File.expand_path("../facts.json", __FILE__), "w") do |file|
10000.times do |_|
fact = {}
attrs.each do |name, values|
vals = if MAX_VALUES[name] == 1
values.sample
else
values.sample(SRC_RANDOM.rand(MAX_VALUES[name])+1)
end
fact[name] = vals
end
file.puts JSON.dump(fact)
end
end
p attrs.keys
|
#Upselling
2016-06-01
Upselling is a sales technique whereby a seller induces the customer to purchase more expensive items, upgrades or other add-ons in an attempt to make a more profitable sale. While it usually involves marketing more profitable services or products, it can be simply exposing the customer to other options that were perhaps not considered. (A different technique is cross-selling in which a seller tries to sell something else.) In practice, large businesses usually combine upselling and cross-selling to maximize profit. In doing so, an organization must ensure that its relationship with the client is not disrupted.
Business models as freemium or premium could enter in this techniques.
***Tags***: Marketing, Business
# See also
[Business Intelligence](/<API key>), [Business models](/business_models), [Cross-selling](/cross-selling)
|
package com.lht.dot.ui.view;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import com.bumptech.glide.Glide;
public class <API key> extends RecyclerView {
View mDispatchToView;
public <API key>(Context context) {
super(context);
init();
}
public <API key>(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init();
}
private void init() {
setOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void <API key>(RecyclerView recyclerView, int newState) {
super.<API key>(recyclerView, newState);
switch (newState) {
case RecyclerView.<API key>:
Glide.with(getContext()).pauseRequests();
break;
case RecyclerView.<API key>:
case RecyclerView.SCROLL_STATE_IDLE:
Glide.with(getContext()).resumeRequests();
break;
}
}
});
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
if(mDispatchToView==null){
return super.dispatchTouchEvent(event);
}else{
return mDispatchToView.dispatchTouchEvent(event);
}
}
public View getDispatchToView() {
return mDispatchToView;
}
public void setDispatchToView(View dispatchToView) {
this.mDispatchToView = dispatchToView;
}
public void clearDispatchToView() {
setDispatchToView(null);
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GPS.SimpleMVC.Views;
namespace GPS.SimpleMVC.Tests.<API key>
{
public interface ITestView : ISimpleView
{
Guid UID { get; set; }
string Name { get; set; }
string Value { get; set; }
event Func<Guid, Guid, Task> LoadDataAsync;
event Action<ITestView> DataBound;
void Databind();
}
}
|
function ones(rows, columns) {
columns = columns || rows;
if (typeof rows === 'number' && typeof columns === 'number') {
const matrix = [];
for (let i = 0; i < rows; i++) {
matrix.push([]);
for (let j = 0; j < columns; j++) {
matrix[i].push(1);
}
}
return matrix;
}
throw new TypeError('Matrix dimensions should be integers.');
}
module.exports = ones;
|
<?php
namespace LolApi\Classes\TournamentProvider;
/**
* <API key>
*
* @author Javier
*/
class <API key> {
// ~ maptype ~
const <API key>='SUMMONERS_RIFT';
const <API key>='TWISTED_TREELINE';
const <API key>='HOWLING_ABYSS';
// ~ pickType ~
const PICKTYPE_BLIND_PICK='BLIND_PICK';
const PICKTYPE_DRAFT_MODE='DRAFT_MODE';
const PICKTYPE_ALL_RANDOM='ALL_RANDOM';
const <API key>='TOURNAMENT_DRAFT';
// ~ SPECTATORTYPE ~
const SPECTATORTYPE_NONE='NONE';
const <API key>='LOBBYONLY';
const SPECTATORTYPE_ALL='';
/**
* Optional list of participants in order to validate the players eligible
* to join the lobby. NOTE: We currently do not enforce participants at the
* team level, but rather the aggregate of teamOne and teamTwo. We may add
* the ability to enforce at the team level in the future.
* @var SummonerIdParams
*/
public $allowedSummonerIds;
/**
* The map type of the game. Valid values are SUMMONERS_RIFT, TWISTED_TREELINE, and HOWLING_ABYSS.
* @var string
*/
public $mapType;
/**
* Optional string that may contain any data in any format, if specified at all. Used to denote any custom information about the game.
* @var string
*/
public $metadata;
/**
* The pick type of the game. Valid values are BLIND_PICK, DRAFT_MODE, ALL_RANDOM, TOURNAMENT_DRAFT.
* @var string
*/
public $pickType;
/**
* The spectator type of the game. Valid values are NONE, LOBBYONLY, ALL.
* @var string
*/
public $spectatorType;
/**
* The team size of the game. Valid values are 1-5.
* @var int
*/
public $teamSize;
function __construct($d) {
$this->allowedSummonerIds = new SummonerIdParams($d->allowedSummonerIds);
$this->mapType = $d->mapType;
$this->metadata = $d->metadata;
$this->pickType = $d->pickType;
$this->spectatorType = $d->spectatorType;
$this->teamSize = $d->teamSize;
}
}
|
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.rawgit.com/konvajs/konva/1.4.0/konva.min.js"></script>
<meta charset="utf-8">
<title>Konva Animate Position Demo</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #F0F0F0;
}
</style>
</head>
<body>
<div id="container"></div>
<script>
var width = window.innerWidth;
var height = window.innerHeight;
var stage = new Konva.Stage({
container: 'container',
width: width,
height: height
});
var layer = new Konva.Layer();
var hexagon = new Konva.RegularPolygon({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
sides: 6,
radius: 20,
fill: 'red',
stroke: 'black',
strokeWidth: 4
});
layer.add(hexagon);
stage.add(layer);
var amplitude = 100;
var period = 2000;
// in ms
var centerX = stage.getWidth() / 2;
var anim = new Konva.Animation(function(frame) {
hexagon.setX(amplitude * Math.sin(frame.time * 2 * Math.PI / period) + centerX);
}, layer);
anim.start();
</script>
</body>
</html>
|
package com.adamkowalewski.opw.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author Adam Kowalewski
*/
@Entity
@Table(name = "opw_link", catalog = "opw", schema = "")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "OpwLink.findAll", query = "SELECT o FROM OpwLink o"),
@NamedQuery(name = "OpwLink.findById", query = "SELECT o FROM OpwLink o WHERE o.id = :id"),
@NamedQuery(name = "OpwLink.findByLabel", query = "SELECT o FROM OpwLink o WHERE o.label = :label"),
@NamedQuery(name = "OpwLink.findByUrl", query = "SELECT o FROM OpwLink o WHERE o.url = :url"),
@NamedQuery(name = "OpwLink.findByComment", query = "SELECT o FROM OpwLink o WHERE o.comment = :comment"),
@NamedQuery(name = "OpwLink.findByActive", query = "SELECT o FROM OpwLink o WHERE o.active = :active"),
@NamedQuery(name = "OpwLink.findByDateCreated", query = "SELECT o FROM OpwLink o WHERE o.dateCreated = :dateCreated")})
public class OpwLink implements Serializable {
@Column(name = "dateCreated")
@Temporal(TemporalType.TIMESTAMP)
private Date dateCreated;
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id", nullable = false)
private Integer id;
@Size(max = 128)
@Column(name = "label", length = 128)
private String label;
@Size(max = 256)
@Column(name = "url", length = 256)
private String url;
@Size(max = 256)
@Column(name = "comment", length = 256)
private String comment;
@Column(name = "active")
private Boolean active;
@JoinColumn(name = "opw_user_id", <API key> = "id", nullable = false)
@ManyToOne(optional = false)
private OpwUser opwUserId;
@JoinColumn(name = "opw_wynik_id", <API key> = "id", nullable = false)
@ManyToOne(optional = false)
private OpwWynik opwWynikId;
public OpwLink() {
}
public OpwLink(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Boolean getActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
}
public OpwUser getOpwUserId() {
return opwUserId;
}
public void setOpwUserId(OpwUser opwUserId) {
this.opwUserId = opwUserId;
}
public OpwWynik getOpwWynikId() {
return opwWynikId;
}
public void setOpwWynikId(OpwWynik opwWynikId) {
this.opwWynikId = opwWynikId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof OpwLink)) {
return false;
}
OpwLink other = (OpwLink) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.adamkowalewski.opw.entity.OpwLink[ id=" + id + " ]";
}
public Date getDateCreated() {
return dateCreated;
}
public void setDateCreated(Date dateCreated) {
this.dateCreated = dateCreated;
}
}
|
<?php
namespace MF\<API key>;
use Doctrine\ORM\QueryBuilder;
interface Modifier
{
public function __invoke(QueryBuilder $queryBuilder): QueryBuilder;
}
|
package backup
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// <API key> is the open API 2.0 Specs for Azure RecoveryServices Backup service
type <API key> struct {
BaseClient
}
// <API key> creates an instance of the <API key>
// client.
func <API key>(subscriptionID string) <API key> {
return <API key>(DefaultBaseURI, subscriptionID)
}
// <API key> creates an instance of the
// <API key> client using a custom endpoint. Use this when interacting with an Azure
// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func <API key>(baseURI string, subscriptionID string) <API key> {
return <API key>{NewWithBaseURI(baseURI, subscriptionID)}
}
// Get provides the status of the asynchronous operations like backup, restore. The status can be in progress,
// completed
// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations
// create jobs. This method returns the list of jobs associated with operation.
// Parameters:
// vaultName - the name of the recovery services vault.
// resourceGroupName - the name of the resource group where the recovery services vault is present.
// policyName - backup policy name whose operation's status needs to be fetched.
// operationID - operation ID which represents an operation whose status needs to be fetched.
func (client <API key>) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result OperationStatus, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/<API key>.Get")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, policyName, operationID)
if err != nil {
err = autorest.NewErrorWithError(err, "backup.<API key>", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "backup.<API key>", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "backup.<API key>", "Get", resp, "Failure responding to request")
return
}
return
}
// GetPreparer prepares the Get request.
func (client <API key>) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"operationId": autorest.Encode("path", operationID),
"policyName": autorest.Encode("path", policyName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vaultName": autorest.Encode("path", vaultName),
}
const APIVersion = "2021-12-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client <API key>) GetSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client <API key>) GetResponder(resp *http.Response) (result OperationStatus, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
|
package servicebus
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// QueuesClient is the client for the Queues methods of the Servicebus service.
type QueuesClient struct {
BaseClient
}
// NewQueuesClient creates an instance of the QueuesClient client.
func NewQueuesClient(subscriptionID string) QueuesClient {
return <API key>(DefaultBaseURI, subscriptionID)
}
// <API key> creates an instance of the QueuesClient client using a custom endpoint. Use this when
// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func <API key>(baseURI string, subscriptionID string) QueuesClient {
return QueuesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or updates a Service Bus queue. This operation is idempotent.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
// parameters - parameters supplied to create or update a queue resource.
func (client QueuesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, parameters SBQueue) (result SBQueue, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.CreateOrUpdate")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "CreateOrUpdate", err.Error())
}
req, err := client.<API key>(ctx, resourceGroupName, namespaceName, queueName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
resp, err := client.<API key>(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdate", resp, "Failure sending request")
return
}
result, err = client.<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdate", resp, "Failure responding to request")
return
}
return
}
// <API key> prepares the CreateOrUpdate request.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, parameters SBQueue) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
parameters.SystemData = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// <API key> sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) <API key>(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// <API key> handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client QueuesClient) <API key>(resp *http.Response) (result SBQueue, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// <API key> creates an authorization rule for a queue.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
// <API key> - the authorization rule name.
// parameters - the shared access authorization rule.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string, parameters SBAuthorizationRule) (result SBAuthorizationRule, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.<API key>")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: <API key>,
Constraints: []validation.Constraint{{Target: "<API key>, Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "<API key>, Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.SB<API key>, Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.SB<API key>.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "<API key>", err.Error())
}
req, err := client.CreateOrUpdate<API key>(ctx, resourceGroupName, namespaceName, queueName, <API key>, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", nil, "Failure preparing request")
return
}
resp, err := client.CreateOrUpdate<API key>(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure sending request")
return
}
result, err = client.CreateOrUpdate<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure responding to request")
return
}
return
}
// CreateOrUpdate<API key> prepares the <API key> request.
func (client QueuesClient) CreateOrUpdate<API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string, parameters SBAuthorizationRule) (*http.Request, error) {
pathParameters := map[string]interface{}{
"<API key>: autorest.Encode("path", <API key>),
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
parameters.SystemData = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{<API key>}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// CreateOrUpdate<API key> sends the <API key> request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) CreateOrUpdate<API key>(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// CreateOrUpdate<API key> handles the response to the <API key> request. The method always
// closes the http.Response Body.
func (client QueuesClient) CreateOrUpdate<API key>(resp *http.Response) (result SBAuthorizationRule, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete deletes a queue from the specified namespace in a resource group.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
func (client QueuesClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result autorest.Response, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.Delete")
defer func() {
sc := -1
if result.Response != nil {
sc = result.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "Delete", err.Error())
}
req, err := client.DeletePreparer(ctx, resourceGroupName, namespaceName, queueName)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "Delete", nil, "Failure preparing request")
return
}
resp, err := client.DeleteSender(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "Delete", resp, "Failure sending request")
return
}
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "Delete", resp, "Failure responding to request")
return
}
return
}
// DeletePreparer prepares the Delete request.
func (client QueuesClient) DeletePreparer(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) DeleteSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client QueuesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// <API key> deletes a queue authorization rule.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
// <API key> - the authorization rule name.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string) (result autorest.Response, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.<API key>")
defer func() {
sc := -1
if result.Response != nil {
sc = result.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: <API key>,
Constraints: []validation.Constraint{{Target: "<API key>, Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "<API key>, Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "<API key>", err.Error())
}
req, err := client.Delete<API key>(ctx, resourceGroupName, namespaceName, queueName, <API key>)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", nil, "Failure preparing request")
return
}
resp, err := client.Delete<API key>(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure sending request")
return
}
result, err = client.Delete<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure responding to request")
return
}
return
}
// Delete<API key> prepares the <API key> request.
func (client QueuesClient) Delete<API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"<API key>: autorest.Encode("path", <API key>),
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{<API key>}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// Delete<API key> sends the <API key> request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) Delete<API key>(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// Delete<API key> handles the response to the <API key> request. The method always
// closes the http.Response Body.
func (client QueuesClient) Delete<API key>(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Get returns a description for the specified queue.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
func (client QueuesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result SBQueue, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.Get")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "Get", err.Error())
}
req, err := client.GetPreparer(ctx, resourceGroupName, namespaceName, queueName)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "Get", resp, "Failure responding to request")
return
}
return
}
// GetPreparer prepares the Get request.
func (client QueuesClient) GetPreparer(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) GetSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client QueuesClient) GetResponder(resp *http.Response) (result SBQueue, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// <API key> gets an authorization rule for a queue by rule name.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
// <API key> - the authorization rule name.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string) (result SBAuthorizationRule, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.<API key>")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: <API key>,
Constraints: []validation.Constraint{{Target: "<API key>, Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "<API key>, Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "<API key>", err.Error())
}
req, err := client.Get<API key>(ctx, resourceGroupName, namespaceName, queueName, <API key>)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", nil, "Failure preparing request")
return
}
resp, err := client.Get<API key>(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure sending request")
return
}
result, err = client.Get<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure responding to request")
return
}
return
}
// Get<API key> prepares the <API key> request.
func (client QueuesClient) Get<API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"<API key>: autorest.Encode("path", <API key>),
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{<API key>}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// Get<API key> sends the <API key> request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) Get<API key>(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// Get<API key> handles the response to the <API key> request. The method always
// closes the http.Response Body.
func (client QueuesClient) Get<API key>(resp *http.Response) (result SBAuthorizationRule, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// <API key> gets all authorization rules for a queue.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result SB<API key>, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.<API key>")
defer func() {
sc := -1
if result.sarlr.Response.Response != nil {
sc = result.sarlr.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "<API key>", err.Error())
}
result.fn = client.list<API key>
req, err := client.List<API key>(ctx, resourceGroupName, namespaceName, queueName)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", nil, "Failure preparing request")
return
}
resp, err := client.List<API key>(req)
if err != nil {
result.sarlr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure sending request")
return
}
result.sarlr, err = client.List<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure responding to request")
return
}
if result.sarlr.hasNextLink() && result.sarlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
}
// List<API key> prepares the <API key> request.
func (client QueuesClient) List<API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// List<API key> sends the <API key> request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) List<API key>(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// List<API key> handles the response to the <API key> request. The method always
// closes the http.Response Body.
func (client QueuesClient) List<API key>(resp *http.Response) (result SB<API key>, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// list<API key> retrieves the next set of results, if any.
func (client QueuesClient) list<API key>(ctx context.Context, lastResults SB<API key>) (result SB<API key>, err error) {
req, err := lastResults.sB<API key>(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "list<API key>, nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.List<API key>(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "list<API key>, resp, "Failure sending next results request")
}
result, err = client.List<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "list<API key>, resp, "Failure responding to next results request")
}
return
}
// List<API key> enumerates all values, automatically crossing page boundaries as required.
func (client QueuesClient) List<API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result SB<API key>, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.<API key>")
defer func() {
sc := -1
if result.Response().Response.Response != nil {
sc = result.page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.page, err = client.<API key>(ctx, resourceGroupName, namespaceName, queueName)
return
}
// ListByNamespace gets the queues within a namespace.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// skip - skip is only used if a previous operation returned a partial result. If a previous response contains
// a nextLink element, the value of the nextLink element will include a skip parameter that specifies a
// starting point to use for subsequent calls.
// top - may be used to limit the number of results to the most recent N usageDetails.
func (client QueuesClient) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result <API key>, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.ListByNamespace")
defer func() {
sc := -1
if result.sqlr.Response.Response != nil {
sc = result.sqlr.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: skip,
Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil},
{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
}}}},
{TargetValue: top,
Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil},
{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "ListByNamespace", err.Error())
}
result.fn = client.<API key>
req, err := client.<API key>(ctx, resourceGroupName, namespaceName, skip, top)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", nil, "Failure preparing request")
return
}
resp, err := client.<API key>(req)
if err != nil {
result.sqlr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", resp, "Failure sending request")
return
}
result.sqlr, err = client.<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", resp, "Failure responding to request")
return
}
if result.sqlr.hasNextLink() && result.sqlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
}
// <API key> prepares the ListByNamespace request.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
if skip != nil {
queryParameters["$skip"] = autorest.Encode("query", *skip)
}
if top != nil {
queryParameters["$top"] = autorest.Encode("query", *top)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// <API key> sends the ListByNamespace request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) <API key>(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// <API key> handles the response to the ListByNamespace request. The method always
// closes the http.Response Body.
func (client QueuesClient) <API key>(resp *http.Response) (result SBQueueListResult, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// <API key> retrieves the next set of results, if any.
func (client QueuesClient) <API key>(ctx context.Context, lastResults SBQueueListResult) (result SBQueueListResult, err error) {
req, err := lastResults.<API key>(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.<API key>(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure sending next results request")
}
result, err = client.<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "<API key>", resp, "Failure responding to next results request")
}
return
}
// <API key> enumerates all values, automatically crossing page boundaries as required.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result <API key>, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.ListByNamespace")
defer func() {
sc := -1
if result.Response().Response.Response != nil {
sc = result.page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.page, err = client.ListByNamespace(ctx, resourceGroupName, namespaceName, skip, top)
return
}
// ListKeys primary and secondary connection strings to the queue.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
// <API key> - the authorization rule name.
func (client QueuesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string) (result AccessKeys, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.ListKeys")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: <API key>,
Constraints: []validation.Constraint{{Target: "<API key>, Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "<API key>, Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "ListKeys", err.Error())
}
req, err := client.ListKeysPreparer(ctx, resourceGroupName, namespaceName, queueName, <API key>)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListKeys", nil, "Failure preparing request")
return
}
resp, err := client.ListKeysSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListKeys", resp, "Failure sending request")
return
}
result, err = client.ListKeysResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListKeys", resp, "Failure responding to request")
return
}
return
}
// ListKeysPreparer prepares the ListKeys request.
func (client QueuesClient) ListKeysPreparer(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"<API key>: autorest.Encode("path", <API key>),
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{<API key>}/ListKeys", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListKeysSender sends the ListKeys request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) ListKeysSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// ListKeysResponder handles the response to the ListKeys request. The method always
// closes the http.Response Body.
func (client QueuesClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// RegenerateKeys regenerates the primary or secondary connection strings to the queue.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
// <API key> - the authorization rule name.
// parameters - parameters supplied to regenerate the authorization rule.
func (client QueuesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string, parameters <API key>) (result AccessKeys, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.RegenerateKeys")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: namespaceName,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: queueName,
Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: <API key>,
Constraints: []validation.Constraint{{Target: "<API key>, Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "<API key>, Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "RegenerateKeys", err.Error())
}
req, err := client.<API key>(ctx, resourceGroupName, namespaceName, queueName, <API key>, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "RegenerateKeys", nil, "Failure preparing request")
return
}
resp, err := client.<API key>(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "RegenerateKeys", resp, "Failure sending request")
return
}
result, err = client.<API key>(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "RegenerateKeys", resp, "Failure responding to request")
return
}
return
}
// <API key> prepares the RegenerateKeys request.
func (client QueuesClient) <API key>(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, <API key> string, parameters <API key>) (*http.Request, error) {
pathParameters := map[string]interface{}{
"<API key>: autorest.Encode("path", <API key>),
"namespaceName": autorest.Encode("path", namespaceName),
"queueName": autorest.Encode("path", queueName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2021-06-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues/{queueName}/authorizationRules/{<API key>}/regenerateKeys", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// <API key> sends the RegenerateKeys request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) <API key>(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.<API key>(client.Client))
}
// <API key> handles the response to the RegenerateKeys request. The method always
// closes the http.Response Body.
func (client QueuesClient) <API key>(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
azure.<API key>(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
|
<?php
return array (
'id' => 'docomo_n2701c_ver1',
'fallback' => '<API key>',
'capabilities' =>
array (
'columns' => '11',
'max_image_width' => '121',
'rows' => '11',
'resolution_width' => '176',
'resolution_height' => '198',
'max_image_height' => '190',
'flash_lite_version' => '',
),
);
|
<?php
namespace HMLB\Date\Tests\Localization;
use HMLB\Date\Date;
use HMLB\Date\Tests\AbstractTestCase;
class ItTest extends AbstractTestCase
{
public function <API key>()
{
Date::setLocale('it');
$scope = $this;
$this->wrapWithTestNow(
function () use ($scope) {
$d = Date::now()->addYear();
$scope->assertSame('1 anno da adesso', $d->diffForHumans());
$d = Date::now()->addYears(2);
$scope->assertSame('2 anni da adesso', $d->diffForHumans());
}
);
}
}
|
var poppy = popcorn( [ vid_elem_ref | 'id_string' ] );
poppy
// pass-through video control methods
.load()
.play()
.pause()
// property setters
.currentTime( time ) // skip forward or backwards `time` seconds
.playbackRate( rate )
.volume( delta )
.mute( [ state ] )
// sugar?
.rewind() // to beginning + stop??
.loop( [ state ] ) // toggle looping
// queuing (maybe unnecessary):
// enqueue method w/ optional args
.queue( 'method', args )
// enqueue arbitrary callback
.queue(function(next){ /* do stuff */ next(); })
// clear the queue
.clearQueue()
// execute arbitrary code @ time
poppy.exec( 1.23, function(){
// exec code
});
// plugin factory sample
popcorn.plugin( 'myPlugin' [, super_plugin ], init_options );
// call plugin (defined above)
poppy.myPlugin( time, options );
// define subtitle plugin
popcorn.plugin( 'subtitle', {
});
poppy
.subtitle( 1.5, {
html: '<p>SUPER AWESOME MEANING</p>',
duration: 5
})
.subtitle({
start: 1.5,
end: 6.5,
html: '<p>SUPER AWESOME MEANING</p>'
})
.subtitle([
{
start: 1.5,
html: '<p>SUPER AWESOME MEANING</p>'
},
{
start: 2.5,
end: 3.5,
html: '<p>OTHER NEAT TEXT</p>'
}
])
.data([
{
subtitle: [
{
start: 1.5,
html: '<p>SUPER AWESOME MEANING</p>'
},
{
start: 2.5,
end: 3.5,
html: '<p>OTHER NEAT TEXT</p>'
}
]
}
]);
// jQuery-dependent plugin, using $.ajax - extend popcorn.data
popcorn.plugin( 'data', popcorn.data, {
_setup: function( options ) {
// called when plugin is first registered (?)
},
_add: function( options ) {
// called when popcorn.data is called
// this == plugin (?)
if ( typeof options === 'string' ) {
$.ajax({
url: options
// stuff
});
} else {
return this.super.data.apply( this, arguments );
}
}
});
poppy.data( '/data.php' ) // data.php returns JSON?
/*
poppy.twitter( dom_elem | 'id_of_dom_elem', options ); // multiple twitters?? FAIL
poppy.twitter( 'load', options );
*/
var widget1 = $(dom_elem).twitter( options ); // ui widget factory initializes twitter widget
poppy.jQuery( 5.9, {
elem: widget1,
method: 'twitter',
args: [ 'search', '@cowboy' ]
})
poppy.jQuery( time, selector, methodname [, args... ] );
poppy.jQuery( 5.9, widget1, 'twitter', 'search', '@cowboy' );
poppy.jQuery( 5.9, '.div', 'css', 'color', 'red' );
poppy.jQuery( 5.9, '#form', 'submit' );
// sugar methods for jQuery
$(selector).popcorn( time, methodname [, args... ] );
$(selector).popcorn( time, fn );
// another idea, using jQuery special events api
$(selector).bind( 'popcorn', { time: 5.9 }, function(e){
$(this).css( 'color', 'red' );
});
// does $.fn[ methodname ].apply( $(selector), args );
|
#if defined(MUPARSER_DLL)
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#define <API key>
#define <API key>
#include <windows.h>
#endif
#include <cassert>
#include "muParserDLL.h"
#include "muParser.h"
#include "muParserInt.h"
#include "muParserError.h"
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 26812)
#endif
#define MU_TRY \
try \
{
#define MU_CATCH \
} \
catch (muError_t &e) \
{ \
ParserTag *pTag = static_cast<ParserTag*>(a_hParser); \
pTag->exc = e; \
pTag->bError = true; \
if (pTag->errHandler) \
(pTag->errHandler)(a_hParser); \
} \
catch (...) \
{ \
ParserTag *pTag = static_cast<ParserTag*>(a_hParser); \
pTag->exc = muError_t(mu::ecINTERNAL_ERROR); \
pTag->bError = true; \
if (pTag->errHandler) \
(pTag->errHandler)(a_hParser); \
}
/** \file
\brief This file contains the implementation of the DLL interface of muparser.
*/
typedef mu::ParserBase::exception_type muError_t;
typedef mu::ParserBase muParser_t;
int g_nBulkSize;
class ParserTag
{
public:
ParserTag(int nType)
: pParser((nType == muBASETYPE_FLOAT)
? (mu::ParserBase*)new mu::Parser()
: (nType == muBASETYPE_INT) ? (mu::ParserBase*)new mu::ParserInt() : nullptr)
, exc()
, errHandler(nullptr)
, bError(false)
, m_nParserType(nType)
{}
~ParserTag()
{
delete pParser;
}
mu::ParserBase* pParser;
mu::ParserBase::exception_type exc;
muErrorHandler_t errHandler;
bool bError;
private:
ParserTag(const ParserTag& ref);
ParserTag& operator=(const ParserTag& ref);
int m_nParserType;
};
static muChar_t s_tmpOutBuf[2048];
// unexported functions
inline muParser_t* AsParser(muParserHandle_t a_hParser)
{
return static_cast<ParserTag*>(a_hParser)->pParser;
}
inline ParserTag* AsParserTag(muParserHandle_t a_hParser)
{
return static_cast<ParserTag*>(a_hParser);
}
#if defined(_WIN32)
BOOL APIENTRY DllMain(HANDLE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
// exported functions
API_EXPORT(void) mupSetVarFactory(muParserHandle_t a_hParser, muFacFun_t a_pFactory, void* pUserData)
{
MU_TRY
muParser_t* p(AsParser(a_hParser));
p->SetVarFactory(a_pFactory, pUserData);
MU_CATCH
}
/** \brief Create a new Parser instance and return its handle. */
API_EXPORT(muParserHandle_t) mupCreate(int nBaseType)
{
switch (nBaseType)
{
case muBASETYPE_FLOAT: return (void*)(new ParserTag(muBASETYPE_FLOAT));
case muBASETYPE_INT: return (void*)(new ParserTag(muBASETYPE_INT));
default: return nullptr;
}
}
/** \brief Release the parser instance related with a parser handle. */
API_EXPORT(void) mupRelease(muParserHandle_t a_hParser)
{
MU_TRY
ParserTag* p = static_cast<ParserTag*>(a_hParser);
delete p;
MU_CATCH
}
API_EXPORT(const muChar_t*) mupGetVersion(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
#ifndef _UNICODE
sprintf(s_tmpOutBuf, "%s", p->GetVersion().c_str());
#else
wsprintf(s_tmpOutBuf, _T("%s"), p->GetVersion().c_str());
#endif
return s_tmpOutBuf;
MU_CATCH
return _T("");
}
/** \brief Evaluate the expression. */
API_EXPORT(muFloat_t) mupEval(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
return p->Eval();
MU_CATCH
return 0;
}
API_EXPORT(muFloat_t*) mupEvalMulti(muParserHandle_t a_hParser, int* nNum)
{
MU_TRY
if (nNum == nullptr)
throw std::runtime_error("Argument is null!");
muParser_t* const p(AsParser(a_hParser));
return p->Eval(*nNum);
MU_CATCH
return 0;
}
API_EXPORT(void) mupEvalBulk(muParserHandle_t a_hParser, muFloat_t* a_res, int nSize)
{
MU_TRY
muParser_t* p(AsParser(a_hParser));
p->Eval(a_res, nSize);
MU_CATCH
}
API_EXPORT(void) mupSetExpr(muParserHandle_t a_hParser, const muChar_t* a_szExpr)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->SetExpr(a_szExpr);
MU_CATCH
}
API_EXPORT(void) mupRemoveVar(muParserHandle_t a_hParser, const muChar_t* a_szName)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->RemoveVar(a_szName);
MU_CATCH
}
/** \brief Release all parser variables.
\param a_hParser Handle to the parser instance.
*/
API_EXPORT(void) mupClearVar(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->ClearVar();
MU_CATCH
}
/** \brief Release all parser variables.
\param a_hParser Handle to the parser instance.
*/
API_EXPORT(void) mupClearConst(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->ClearConst();
MU_CATCH
}
/** \brief Clear all user defined operators.
\param a_hParser Handle to the parser instance.
*/
API_EXPORT(void) mupClearOprt(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->ClearOprt();
MU_CATCH
}
API_EXPORT(void) mupClearFun(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->ClearFun();
MU_CATCH
}
API_EXPORT(void) mupDefineFun0(muParserHandle_t a_hParser,
const muChar_t* a_szName,
muFun0_t a_pFun,
muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun1_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun2_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun3_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun4_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun5_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun6_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun7_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun8_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun9_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun10_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun0(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun0_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun1_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun2_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun3_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun4_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun5_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun6_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun7_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun8_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun9_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun10_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineStrFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun1_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineStrFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun2_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineStrFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun3_t a_pFun)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, false);
MU_CATCH
}
API_EXPORT(void) mupDefineMultFun(muParserHandle_t a_hParser, const muChar_t* a_szName, muMultFun_t a_pFun, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineOprt(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun2_t a_pFun, muInt_t a_nPrec, muInt_t a_nOprtAsct, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineOprt(a_szName, a_pFun, a_nPrec, (mu::EOprtAssociativity)a_nOprtAsct, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineVar(muParserHandle_t a_hParser, const muChar_t* a_szName, muFloat_t* a_pVar)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineVar(a_szName, a_pVar);
MU_CATCH
}
API_EXPORT(void) mupDefineBulkVar(muParserHandle_t a_hParser, const muChar_t* a_szName, muFloat_t* a_pVar)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineVar(a_szName, a_pVar);
MU_CATCH
}
API_EXPORT(void) mupDefineConst(muParserHandle_t a_hParser, const muChar_t* a_szName, muFloat_t a_fVal)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineConst(a_szName, a_fVal);
MU_CATCH
}
API_EXPORT(void) mupDefineStrConst(muParserHandle_t a_hParser, const muChar_t* a_szName, const muChar_t* a_szVal)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineStrConst(a_szName, a_szVal);
MU_CATCH
}
API_EXPORT(const muChar_t*) mupGetExpr(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
// C# explodes when pMsg is returned directly. For some reason it can't access
// the memory where the message lies directly.
#ifndef _UNICODE
sprintf(s_tmpOutBuf, "%s", p->GetExpr().c_str());
#else
wsprintf(s_tmpOutBuf, _T("%s"), p->GetExpr().c_str());
#endif
return s_tmpOutBuf;
MU_CATCH
return _T("");
}
API_EXPORT(void) <API key>(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun1_t a_pOprt, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefinePostfixOprt(a_szName, a_pOprt, a_bAllowOpt != 0);
MU_CATCH
}
API_EXPORT(void) mupDefineInfixOprt(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun1_t a_pOprt, muBool_t a_bAllowOpt)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->DefineInfixOprt(a_szName, a_pOprt, a_bAllowOpt != 0);
MU_CATCH
}
// Define character sets for identifiers
API_EXPORT(void) mupDefineNameChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset)
{
muParser_t* const p(AsParser(a_hParser));
p->DefineNameChars(a_szCharset);
}
API_EXPORT(void) mupDefineOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset)
{
muParser_t* const p(AsParser(a_hParser));
p->DefineOprtChars(a_szCharset);
}
API_EXPORT(void) <API key>(muParserHandle_t a_hParser, const muChar_t* a_szCharset)
{
muParser_t* const p(AsParser(a_hParser));
p-><API key>(a_szCharset);
}
/** \brief Get the number of variables defined in the parser.
\param a_hParser [in] Must be a valid parser handle.
\return The number of used variables.
\sa mupGetExprVar
*/
API_EXPORT(int) mupGetVarNum(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
const mu::varmap_type VarMap = p->GetVar();
return (int)VarMap.size();
MU_CATCH
return 0; // never reached
}
/** \brief Return a variable that is used in an expression.
\param a_hParser [in] A valid parser handle.
\param a_iVar [in] The index of the variable to return.
\param a_szName [out] Pointer to the variable name.
\param a_pVar [out] Pointer to the variable.
\throw nothrow
Prior to calling this function call mupGetExprVarNum in order to get the
number of variables in the expression. If the parameter a_iVar is greater
than the number of variables both a_szName and a_pVar will be set to zero.
As a side effect this function will trigger an internal calculation of the
expression undefined variables will be set to zero during this calculation.
During the calculation user defined callback functions present in the expression
will be called, this is unavoidable.
*/
API_EXPORT(void) mupGetVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_szName, muFloat_t** a_pVar)
{
// A static buffer is needed for the name since i can't return the
// pointer from the map.
static muChar_t szName[1024];
MU_TRY
muParser_t* const p(AsParser(a_hParser));
const mu::varmap_type VarMap = p->GetVar();
if (a_iVar >= VarMap.size())
{
*a_szName = 0;
*a_pVar = 0;
return;
}
mu::varmap_type::const_iterator item;
item = VarMap.begin();
for (unsigned i = 0; i < a_iVar; ++i)
++item;
#ifndef _UNICODE
strncpy(szName, item->first.c_str(), sizeof(szName));
#else
wcsncpy(szName, item->first.c_str(), sizeof(szName));
#endif
szName[sizeof(szName) - 1] = 0;
*a_szName = &szName[0];
*a_pVar = item->second;
return;
MU_CATCH
* a_szName = 0;
*a_pVar = 0;
}
/** \brief Get the number of variables used in the expression currently set in the parser.
\param a_hParser [in] Must be a valid parser handle.
\return The number of used variables.
\sa mupGetExprVar
*/
API_EXPORT(int) mupGetExprVarNum(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
const mu::varmap_type VarMap = p->GetUsedVar();
return (int)VarMap.size();
MU_CATCH
return 0; // never reached
}
/** \brief Return a variable that is used in an expression.
Prior to calling this function call mupGetExprVarNum in order to get the
number of variables in the expression. If the parameter a_iVar is greater
than the number of variables both a_szName and a_pVar will be set to zero.
As a side effect this function will trigger an internal calculation of the
expression undefined variables will be set to zero during this calculation.
During the calculation user defined callback functions present in the expression
will be called, this is unavoidable.
\param a_hParser [in] A valid parser handle.
\param a_iVar [in] The index of the variable to return.
\param a_szName [out] Pointer to the variable name.
\param a_pVar [out] Pointer to the variable.
\throw nothrow
*/
API_EXPORT(void) mupGetExprVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_szName, muFloat_t** a_pVar)
{
// A static buffer is needed for the name since i can't return the
// pointer from the map.
static muChar_t szName[1024];
MU_TRY
muParser_t* const p(AsParser(a_hParser));
const mu::varmap_type VarMap = p->GetUsedVar();
if (a_iVar >= VarMap.size())
{
*a_szName = 0;
*a_pVar = 0;
return;
}
mu::varmap_type::const_iterator item;
item = VarMap.begin();
for (unsigned i = 0; i < a_iVar; ++i)
++item;
#ifndef _UNICODE
strncpy(szName, item->first.c_str(), sizeof(szName));
#else
wcsncpy(szName, item->first.c_str(), sizeof(szName));
#endif
szName[sizeof(szName) - 1] = 0;
*a_szName = &szName[0];
*a_pVar = item->second;
return;
MU_CATCH
* a_szName = 0;
*a_pVar = 0;
}
/** \brief Return the number of constants defined in a parser. */
API_EXPORT(int) mupGetConstNum(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
const mu::valmap_type ValMap = p->GetConst();
return (int)ValMap.size();
MU_CATCH
return 0; // never reached
}
API_EXPORT(void) mupSetArgSep(muParserHandle_t a_hParser, const muChar_t cArgSep)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->SetArgSep(cArgSep);
MU_CATCH
}
API_EXPORT(void) mupResetLocale(muParserHandle_t a_hParser)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->ResetLocale();
MU_CATCH
}
API_EXPORT(void) mupSetDecSep(muParserHandle_t a_hParser, const muChar_t cDecSep)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->SetDecSep(cDecSep);
MU_CATCH
}
API_EXPORT(void) mupSetThousandsSep(muParserHandle_t a_hParser, const muChar_t cThousandsSep)
{
MU_TRY
muParser_t* const p(AsParser(a_hParser));
p->SetThousandsSep(cThousandsSep);
MU_CATCH
}
/** \brief Retrieve name and value of a single parser constant.
\param a_hParser [in] a valid parser handle
\param a_iVar [in] Index of the constant to query
\param a_pszName [out] pointer to a null terminated string with the constant name
\param [out] The constant value
*/
API_EXPORT(void) mupGetConst(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t* a_fVal)
{
// A static buffer is needed for the name since i can't return the
// pointer from the map.
static muChar_t szName[1024];
MU_TRY
muParser_t* const p(AsParser(a_hParser));
const mu::valmap_type ValMap = p->GetConst();
if (a_iVar >= ValMap.size())
{
*a_pszName = 0;
*a_fVal = 0;
return;
}
mu::valmap_type::const_iterator item;
item = ValMap.begin();
for (unsigned i = 0; i < a_iVar; ++i)
++item;
#ifndef _UNICODE
strncpy(szName, item->first.c_str(), sizeof(szName));
#else
wcsncpy(szName, item->first.c_str(), sizeof(szName));
#endif
szName[sizeof(szName) - 1] = 0;
*a_pszName = &szName[0];
*a_fVal = item->second;
return;
MU_CATCH
* a_pszName = 0;
*a_fVal = 0;
}
/** \brief Add a custom value recognition function. */
API_EXPORT(void) mupAddValIdent(muParserHandle_t a_hParser, muIdentFun_t a_pFun)
{
MU_TRY
muParser_t* p(AsParser(a_hParser));
p->AddValIdent(a_pFun);
MU_CATCH
}
/** \brief Query if an error occurred.
After querying the internal error bit will be reset. So a consecutive call
will return false.
*/
API_EXPORT(muBool_t) mupError(muParserHandle_t a_hParser)
{
bool bError(AsParserTag(a_hParser)->bError);
AsParserTag(a_hParser)->bError = false;
return bError;
}
/** \brief Reset the internal error flag. */
API_EXPORT(void) mupErrorReset(muParserHandle_t a_hParser)
{
AsParserTag(a_hParser)->bError = false;
}
API_EXPORT(void) mupSetErrorHandler(muParserHandle_t a_hParser, muErrorHandler_t a_pHandler)
{
AsParserTag(a_hParser)->errHandler = a_pHandler;
}
/** \brief Return the message associated with the last error. */
API_EXPORT(const muChar_t*) mupGetErrorMsg(muParserHandle_t a_hParser)
{
ParserTag* const p(AsParserTag(a_hParser));
const muChar_t* pMsg = p->exc.GetMsg().c_str();
// C# explodes when pMsg is returned directly. For some reason it can't access
// the memory where the message lies directly.
#ifndef _UNICODE
sprintf(s_tmpOutBuf, "%s", pMsg);
#else
wsprintf(s_tmpOutBuf, _T("%s"), pMsg);
#endif
return s_tmpOutBuf;
}
/** \brief Return the message associated with the last error. */
API_EXPORT(const muChar_t*) mupGetErrorToken(muParserHandle_t a_hParser)
{
ParserTag* const p(AsParserTag(a_hParser));
const muChar_t* pToken = p->exc.GetToken().c_str();
// C# explodes when pMsg is returned directly. For some reason it can't access
// the memory where the message lies directly.
#ifndef _UNICODE
sprintf(s_tmpOutBuf, "%s", pToken);
#else
wsprintf(s_tmpOutBuf, _T("%s"), pToken);
#endif
return s_tmpOutBuf;
}
/** \brief Return the code associated with the last error.
*/
API_EXPORT(int) mupGetErrorCode(muParserHandle_t a_hParser)
{
return AsParserTag(a_hParser)->exc.GetCode();
}
/** \brief Return the position associated with the last error. */
API_EXPORT(int) mupGetErrorPos(muParserHandle_t a_hParser)
{
return (int)AsParserTag(a_hParser)->exc.GetPos();
}
API_EXPORT(muFloat_t*) mupCreateVar()
{
return new muFloat_t(0);
}
API_EXPORT(void) mupReleaseVar(muFloat_t* ptr)
{
delete ptr;
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#endif // MUPARSER_DLL
|
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v0.10.22 - v0.10.23: v8::internal::SmiTagging< 4 > Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v0.10.22 - v0.10.23
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="<API key>">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><b>internal</b></li><li class="navelem"><a class="el" href="<API key>.html">SmiTagging< 4 ></a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pub-static-attribs">Static Public Attributes</a> |
<a href="<API key>.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">v8::internal::SmiTagging< 4 > Struct Template Reference</div> </div>
</div><!--header
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static int </td><td class="memItemRight" valign="bottom"><b>SmiToInt</b> (internal::Object *value)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static const int </td><td class="memItemRight" valign="bottom"><b>kSmiShiftSize</b> = 0</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static const int </td><td class="memItemRight" valign="bottom"><b>kSmiValueSize</b> = 31</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static const uintptr_t </td><td class="memItemRight" valign="bottom"><b><API key></b> = 0x1</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static const int </td><td class="memItemRight" valign="bottom"><b>kPointerToSmiShift</b> = 0</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>deps/v8/include/<a class="el" href="v8_8h_source.html">v8.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 11 2015 23:45:06 for V8 API Reference Guide for node.js v0.10.22 - v0.10.23 by &
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
|
using System;
using System.IO;
using Xunit;
namespace OpenSage.Tests.Data
{
internal static class TestUtility
{
public static T DoRoundtripTest<T>(
Func<Stream> getOriginalStream,
Func<Stream, T> parseCallback,
Action<T, Stream> serializeCallback,
bool <API key> = false)
{
byte[] <API key>;
using (var <API key> = new MemoryStream())
using (var entryStream = getOriginalStream())
{
entryStream.CopyTo(<API key>);
<API key> = <API key>.ToArray();
}
T parsedFile = default;
try
{
using (var entryStream = new MemoryStream(<API key>, false))
{
parsedFile = parseCallback(entryStream);
}
}
catch
{
File.WriteAllBytes("original.bin", <API key>);
throw;
}
byte[] serializedBytes;
using (var serializedStream = new MemoryStream())
{
serializeCallback(parsedFile, serializedStream);
serializedBytes = serializedStream.ToArray();
}
if (<API key>.Length != serializedBytes.Length)
{
File.WriteAllBytes("original.bin", <API key>);
File.WriteAllBytes("serialized.bin", serializedBytes);
}
Assert.Equal(<API key>.Length, serializedBytes.Length);
if (!<API key>)
{
AssertUtility.Equal(<API key>, serializedBytes);
}
return parsedFile;
}
}
}
|
<?php
namespace Symfony\Bundle\<API key>\Command;
use Doctrine\ODM\MongoDB\Mapping\MappingException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Show information about mapped documents
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Jonathan H. Wage <jonwage@gmail.com>
*/
class <API key> extends DoctrineODMCommand
{
protected function configure()
{
$this
->setName('doctrine:mongodb:mapping:info')
->addOption('dm', null, InputOption::VALUE_OPTIONAL, 'The document manager to use for this command.')
->setDescription('Show basic information about all mapped documents.')
->setHelp(<<<EOT
The <info>doctrine:mapping:info</info> shows basic information about which
documents exist and possibly if their mapping information contains errors or not.
<info>./app/console doctrine:mapping:info</info>
If you are using multiple document managers you can pick your choice with the <info>--dm</info> option:
<info>./app/console doctrine:mapping:info --dm=default</info>
EOT
);
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$documentManagerName = $input->getOption('dm') ?
$input->getOption('dm') :
$this->container->getParameter('doctrine.odm.mongodb.<API key>');
$<API key> = sprintf('doctrine.odm.mongodb.%s_document_manager', $documentManagerName);
/* @var $documentManager Doctrine\ODM\MongoDB\DocumentManager */
$documentManager = $this->container->get($<API key>);
$documentClassNames = $documentManager->getConfiguration()
-><API key>()
->getAllClassNames();
if (!$entityClassNames) {
throw new \Exception(
'You do not have any mapped Doctrine MongoDB ODM documents for any of your bundles. '.
'Create a class inside the Document namespace of any of your bundles and provide '.
'mapping information for it with Annotations directly in the classes doc blocks '.
'or with XML/YAML in your bundles Resources/config/doctrine/metadata/mongodb directory.'
);
}
$output->write(sprintf("Found <info>%d</info> documents mapped in document manager <info>%s</info>:\n",
count($documentClassNames), $documentManagerName), true);
foreach ($documentClassNames AS $documentClassName) {
try {
$cm = $documentManager->getClassMetadata($documentClassName);
$output->write("<info>[OK]</info> " . $documentClassName, true);
} catch(MappingException $e) {
$output->write("<error>[FAIL]</error> " . $documentClassName, true);
$output->write("<comment>" . $e->getMessage()."</comment>", true);
$output->write("", true);
}
}
}
}
|
#!/bin/bash
# This script overcomes a yucky bug in simplescalar's GCC, which
# prevents it from working on the user filesystem (due to a problem
# with the transition to 64-bit). Luckily /tmp is implemented differently
# and doesn'thave this problem so we copy the tree there and do the make there.
TMPNAME=/tmp/SSCA2v2.2-$USER
rm -rf $TMPNAME
# make clean here to avoid confusion
make clean
echo Copying the tree to $TMPNAME so we can build it there
cp -rf ../SSCA2v2.2 $TMPNAME
# now make it in the /tmp directory
pushd $TMPNAME
make CC=/homes/phjk/simplescalar/bin/gcc AR=/homes/phjk/simplescalar/bin/<API key> RANLIB=/homes/phjk/simplescalar/bin/<API key>
popd
# and link the binary back here
ln -s $TMPNAME/SSCA2
|
<!
Smart Data Platform - Reference Implementation
This page shows how to receive and visualize the data stream from
a sensor in real-time.
In particular data is received using Socket.IO, which provides an
abstraction layer to Websocket API.
Data visualizzation is based on D3js library (<http://d3js.org).
<!DOCTYPE html>
<html>
<head>
<!-- javascript for provides realtime communication between your node.js server and clients-->
<script src="stomp.js" charset="utf-8"></script>
<!-- CSS file -->
<link rel="stylesheet" href="style.css" type="text/css">
<!-- javascript D3js for speedometer-->
<script type="text/javascript" src="http://iop.io/js/vendor/d3.v3.min.js"></script>
<script type="text/javascript" src="http://iop.io/js/vendor/polymer/PointerEvents/pointerevents.js"></script>
<script type="text/javascript" src="http://iop.io/js/vendor/polymer/PointerGestures/pointergestures.js"></script>
<script type="text/javascript" src="http://iop.io/js/iopctrl.js"></script>
<title>Smart Data Platform - Reference Implementation</title>
</head>
<body>
<div style="background-color:#fff;width:100%;">
<div>
<br>
<span style="border:3px solid #0080C0; color:#0080C0; padding:5px; font-size:40px; font-style:italic; font-weight:bold; width:89%;">
Smart Data Platform - Reference Implementation
</span>
<br><br>
</div>
<span id="connect"> </span>
<h1>Visualisation of temperature</h1>
<pre>
<div style="background-color:#000;width:81%;">
<font color=#0080C0 size=4>
<span id="message5"> </span>
<span id="message4"> </span>
<span id="message3"> </span>
<span id="message2"> </span>
<span id="message1"> </span>
</font>
</div>
</pre>
<!-- Inserted at field "message" the json received from the client. Used only for debug -->
<!-- <span id="message"> </span> -->
<div style="border:0px solid blue" id="speedometer"/>
</div>
<script>
var arrayTemp = new Array();
var arrayTime = new Array();
var _length = 0;
// function that create and manage the window and server connection
window.onload = function () {
// IP address of server
var ip = location.host;
ip="localhost";
// connect to server
var client = Stomp.client("ws://" +ip + ":61614");
d3.select("#connect").html("Status: Disconnected");
client.connect("guest", "password",
function(frame) {
d3.select("#connect").html("Status: Connected");
client.subscribe("/topic/output.sandbox.*", function(message) {
// Inserted at field "message" the json received from the client. Used only for debug
// d3.select("#message").html(message);
// create a json from messagge received
var json = message.body;
obj = JSON.parse(json);
// parser the json for print the value and time
// check if the value is into the range of speedometer
if(obj.values[0].components.c0 <= 50 && obj.values[0].components.c0 >= -50){
segDisplay.value(obj.values[0].components.c0);// setup the value of display
gauge.value(obj.values[0].components.c0); // setup the value of speedometer
if(_length < 5){//fill the array
_length = _length +1;
arrayTemp.push(obj.values[0].components.c0);
var dateS = obj.values[0].time.split("Z");
var date = new Date(dateS[0]);
arrayTime.push(date.toString());
printArray();
}else{//manage the dinamic array
arrayTemp = arrayTemp.slice(1,5);
arrayTime = arrayTime.slice(1,5);
arrayTemp.push(obj.values[0].components.c0);
var dateS = obj.values[0].time.split("Z");
var date = new Date(dateS[0]);
arrayTime.push(date.toString());
printArray();
}
}
});
},
function() {
//Error callback
d3.select("#connect").html("Status: Error");
}
);
};
// print the array in the pre
function printArray(){
d3.select("#message5").html(" TEMPERATURE " + arrayTemp[0].valueOf() + " TIME " + arrayTime[0].valueOf()+ " ");
d3.select("#message4").html(" TEMPERATURE " + arrayTemp[1].valueOf() + " TIME " + arrayTime[1].valueOf()+ " ");
d3.select("#message3").html(" TEMPERATURE " + arrayTemp[2].valueOf() + " TIME " + arrayTime[2].valueOf()+ " ");
d3.select("#message2").html(" TEMPERATURE " + arrayTemp[3].valueOf() + " TIME " + arrayTime[3].valueOf()+ " ");
d3.select("#message1").html(" TEMPERATURE " + arrayTemp[4].valueOf() + " TIME " + arrayTime[4].valueOf()+ " ");
}
// init speedometer setup
// create speedometer
var svg = d3.select("#speedometer")
.append("svg:svg")
.attr("width", 800)
.attr("height", 400);
// create speedometer
var gauge = iopctrl.arcslider()
.radius(180)
.events(false)
.indicator(iopctrl.<API key>);
// add components at speedometer
gauge.axis().orient("in") // position number into gauge
.normalize(true)
.ticks(10) // set the number how integer
.tickSubdivide(9) // interval of decimals
.tickSize(10, 8, 10) // subdivides the gauge
.tickPadding(8) // padding
.scale(d3.scale.linear()
.domain([-50, 50])//range of speedometer
.range([-3*Math.PI/4, 3*Math.PI/4])); //create the circoference
// create a numeric display
var segDisplay = iopctrl.segdisplay()
.width(180)
.digitCount(5)
.negative(true)
.decimals(2);
// picutre the display
svg.append("g")
.attr("class", "segdisplay")
.attr("transform", "translate(130, 350)")
.call(segDisplay);
// attach the speedometer at the window
svg.append("g")
.attr("class", "gauge")
.call(gauge);
// end speedometer setup
</script>
</body>
</html>
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Topup extends MY_Controller {
public function __construct()
{
parent::__construct();
$this->load->model(array('admin_model','user_model'));
<API key>($role_id = array(1));
}
public function index()
{
$session_data = $this->session->userdata('user_logged_in');
$role_id = $session_data['role_id'];
$user_id = $session_data['user_id'];
if($role_id == 1)
{
$this->load->library('form_validation');
$this->form_validation->set_rules('amount', 'Amount', 'trim|is_numeric|required|xss_clean|callback_amountchk');
$amount = $this->input->post('amount');
if($this->form_validation->run() == FALSE)
{
$data['title'] = 'Dashboard';
$data['content'] = 'super_admin/admin_home';
$this->load->view($this->layout_client,$data);
}
else
{
$topup_data=array(
'admin_id' => $user_id,
'topup_amount' => $amount,
'topup_status' => 1
);
$topup_id = topupAdminData($topup_data);
if($topup_id){
redirect('super_admin/admin_home');
return "topup sucess";
}
else
{
return "topup unsuccess";
}
}
}else
{
var_dump("incorrect url");
die();
}
}
public function amountchk()
{
if($this->input->post('amount')<0)
{
$this->form_validation->set_message('amount', 'Cant enter lessthan 0');
}
}
}
|
define(['myweb/jquery'], function ($) {
'use strict';
var error = function (message) {
$('.form-feedback').removeClass('form-success').addClass('form-error').text(message).fadeIn(200);
};
var success = function (message) {
$('.form-feedback').removeClass('form-error').addClass('form-success').text(message).fadeIn(200);
};
var clear = function () {
$('.form-feedback').hide().removeClass('form-success form-error').empty();
};
return {
error: error,
success: success,
clear: clear
};
});
|
# encoding: UTF-8
include Vorax
describe 'tablezip layout' do
before(:each) do
@sp = Sqlplus.new('sqlplus')
@sp.default_convertor = :tablezip
@prep = [VORAX_CSTR,
"set tab off",
"set linesize 10000",
"set markup html on",
"set echo off",
"set pause off",
"set define &",
"set termout on",
"set verify off",
"set pagesize 4"].join("\n")
@result = ""
end
it 'should work with multiple statements' do
@sp.exec("select dummy d from dual;\nselect * from departments where id <= 2;", :prep => @prep)
@result << @sp.read_output(32767) while @sp.busy?
expected = <<OUTPUT
SQL>
D
-
X
SQL>
ID NAME DESCRIPTION
1 Bookkeeping This department is responsible for:
- financial reporting
- analysis
- other boring tasks
2 Marketing
SQL>
SQL>
OUTPUT
#puts @result
@result.should eq(expected)
end
it 'should work with multi line records' do
@sp.exec("select * from departments where id <= 10;", :prep => @prep)
@result << @sp.read_output(32767) while @sp.busy?
expected = <<OUTPUT
SQL>
ID NAME DESCRIPTION
1 Bookkeeping This department is responsible for:
- financial reporting
- analysis
- other boring tasks
2 Marketing
3 Deliveries
4 CRM
ID NAME DESCRIPTION
5 Legal Stuff
6 Management The bad guys department
7 Cooking
8 Public Relations
ID NAME DESCRIPTION
9 Aquisitions
10 Cleaning
10 rows selected.
SQL>
SQL>
OUTPUT
#puts @result
@result.should eq(expected)
end
it 'should work with accept prompts' do
begin
pack_file = Tempfile.new(['vorax', '.sql'])
@sp.exec("accept var prompt \"Enter var: \"\nprompt &var", :prep => @prep, :pack_file => pack_file.path)
Timeout::timeout(10) {
@result << @sp.read_output(32767) while @result !~ /Enter var: \z/
@sp.send_text("muci\n")
@result << @sp.read_output(32767) while @result !~ /muci\n\z/
}
ensure
pack_file.unlink
end
end
it 'should work with <pre> tags' do
@sp.exec("set autotrace traceonly explain\nselect * from dual;", :prep => @prep)
@result << @sp.read_output(32767) while @sp.busy?
@result.should match(/SELECT STATEMENT/)
end
after(:each) do
@sp.terminate
end
end
|
from django.contrib.admin.models import LogEntry
from django.contrib.auth.models import User, Group, Permission
from simple_history import register
from celsius.tools import <API key>
register(User)
register(Group)
<API key>(User)
<API key>(Group)
<API key>(Permission)
<API key>(LogEntry)
|
<!DOCTYPE html>
<!--[if IE 8]> <html class="ie ie8"> <![endif]-->
<!--[if IE 9]> <html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!--> <html> <!--<![endif]-->
<head>
<!-- Basic -->
<meta charset="utf-8">
<title>VirUCA</title>
<meta name="keywords" content="" />
<meta name="description" content="">
<meta name="author" content="">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Web Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800%7CShadows+Into+Light" rel="stylesheet" type="text/css">
<!-- Libs CSS -->
<link rel="stylesheet" href="<?=base_url()?>vendor/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="<?=base_url()?>vendor/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="<?=base_url()?>vendor/owl-carousel/owl.carousel.css" media="screen">
<link rel="stylesheet" href="<?=base_url()?>vendor/owl-carousel/owl.theme.css" media="screen">
<link rel="stylesheet" href="<?=base_url()?>vendor/magnific-popup/magnific-popup.css" media="screen">
<link rel="stylesheet" href="<?=base_url()?>vendor/isotope/jquery.isotope.css" media="screen">
<link rel="stylesheet" href="<?=base_url()?>vendor/mediaelement/mediaelementplayer.css" media="screen">
<!-- Theme CSS -->
<link rel="stylesheet" href="<?=base_url()?>css/theme.css">
<link rel="stylesheet" href="<?=base_url()?>css/theme-elements.css">
<link rel="stylesheet" href="<?=base_url()?>css/theme-blog.css">
<link rel="stylesheet" href="<?=base_url()?>css/theme-shop.css">
<link rel="stylesheet" href="<?=base_url()?>css/theme-animate.css">
<link rel="stylesheet" href="<?=base_url()?>css/panel.css?id=124">
<link rel="stylesheet" href="<?=base_url()?>css/tooltip.css">
<!-- Responsive CSS -->
<link rel="stylesheet" href="<?=base_url()?>css/theme-responsive.css" />
<!-- Skin CSS -->
<link rel="stylesheet" href="<?=base_url()?>css/skins/default.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="<?=base_url()?>css/custom.css">
<!-- Custom Loader -->
<link rel="stylesheet" href="<?=base_url()?>css/loader.css">
<!-- Libs -->
<script src="<?=base_url()?>vendor/jquery.js"></script>
<!-- Custom JS -->
<script src="<?=base_url()?>js/custom.js"></script>
<!-- Head Libs -->
<script src="<?=base_url()?>vendor/modernizr.js"></script>
<!--[if IE]>
<link rel="stylesheet" href="css/ie.css">
<![endif]
<!--[if lte IE 8]>
<script src="vendor/respond.js"></script>
<![endif]
<script type="text/javascript">
function AddFicha(idDiv, Texto) {
document.getElementById(idDiv).innerHTML += Texto;
}
</script>
</head>
<body>
<div id="preloader"><div id="loader"> </div></div>
<div class="body">
<?php $this->load->view('menuj_view');?>
<div role="main" class="main">
<div class="container">
<?php if($this->session->flashdata('respuesta_ok')) { ?>
<div class="modal">
<div class="ventana">
<div class="alert alert-success">
<?php echo $this->session->flashdata('respuesta_ok');?>
</div>
<span class="cerrar">Cerrar</span>
</div>
</div>
<?php } ?>
<?php if($this->session->flashdata('respuesta_ko')) { ?>
<div class="modal">
<div class="ventana">
<div class="alert alert-danger">
<?php echo $this->session->flashdata('respuesta_ko'); ?>
<span class="cerrar">Cerrar</span>
</div>
</div>
</div>
<?php } ?>
<!-- Fin errores -->
<?php
foreach ($partida as $jugador) {
$nJugadores = $jugador->nGrupos;
$iId_Partida = $jugador->iId;
$iTurno = $jugador->iTurno;
$iId_Panel = $jugador->iId_Panel;
$bFinalizada = $jugador->bFinalizada;
}
?>
<?php if ($bFinalizada) {
echo "<br><blockquote><strong>La partida ha finalizado</strong>. En la siguiente tabla puedes ver cómo han quedado los grupos</blockquote>";
}
?>
<div class="featured-box <API key>">
<div class="box-content">
<?php
echo "<div>";
// Hay que restablecer la partida.
foreach ($resumen as $equipo) {
echo "<div style='float:left; padding-left:30px;'>";
if ($equipo->iGrupo == $iTurno)
echo "<span class='rojo'><b>Grupo ".$equipo->iGrupo."</b></span><br>";
else
echo "<span>Grupo ".$equipo->iGrupo."</span><br>";
echo "<img src='".base_url()."/assets/img/".$equipo->iGrupo.".png' aling='center'><br>";
if ($equipo->iCasilla == 0)
echo "Inicio";
else {
// Comprobamos si hay que poner las medallas y regalos.
echo "<div style='padding-top:5px;''>";
switch ($equipo->iPosJuego) {
case '1':
echo "<img src='".base_url()."/assets/img/gold.png' aling='center'><br>";
break;
case '2':
echo "<img src='".base_url()."/assets/img/silver.png' aling='center'><br>";
break;
case '3':
echo "<img src='".base_url()."/assets/img/bronze.png' aling='center'><br>";
break;
default:
if ($equipo->iPosJuego != 0)
echo "<img src='".base_url()."/assets/img/gift.png' aling='center'><br>";
break;
}
echo "</div>";
if ($equipo->iPosJuego == 0)
echo $equipo->iCasilla;
}
echo "</div>";
}
echo "</div>";
?>
<br class="clear">
</div>
</div>
<!-- panel -->
<?php
// Botones
if ($bFinalizada == 0) { ?>
<input type="hidden" data-bb="pregunta">
<input type="button" class="btn btn-warning"
data-bb="confirm"
data-pn="<?=$iId_Panel;?>"
data-id="<?=$iId_Partida;?>"
data-gr="<?=$iTurno;?>"
value="Tirar Dado">
<input type="button" class="btn btn-warning"
data-bb="confirm2"
data-id="<?=$iId_Partida;?>"
value="Finalizar partida">
<input type="button" class="btn btn-warning" value="Salir"
onclick="location.href='<?=base_url()?>index.php/jugar/salir/<?=$iId_Partida?>'">
<?php } else { ?>
<input type="button" class="btn btn-warning" value="Listado de partidas"
onclick="location.href='<?=base_url()?>index.php/partidas'">
<?php }
if (!$bFinalizada) {
// Pintamos el panel
$contCasilla = 1;
echo "<br class='clear'><br><div data-toggle='tooltip' title='Inicio' class='test fade' style='float:left;'>
<img src='".base_url()."/assets/img/inicio.png' aling='center'></div>";
foreach ($casillas as $casilla) {
// Pinto la casilla.
echo "<div data-toggle='tooltip' title='".$casilla->sCategoria."' id='casilla".$contCasilla."' class='test circulo fade' style='background:".$casilla->sColor."; border: 1px dotted black;'>";
echo "<h4 style='margin:0 !important;' class='fuego'><b>".$contCasilla."</b></h4>";
switch ($casilla->eFuncion) {
case 'Viento':
echo "<div style='padding-left:30px;'><img src='".base_url()."/assets/img/wind.png' aling='center'></div>";
break;
case 'Retroceder':
echo "<div style='padding-left:30px;'><img src='".base_url()."/assets/img/syringe.png' aling='center'></div>";
default:
# code...
break;
}
echo "</div>";
$contCasilla++;
}
echo "<div data-toggle='tooltip' title='Meta!' class='test fade' style='float:left;'>
<img src='".base_url()."/assets/img/meta.png' aling='center'></div>";
// Ahora colocamos las fichas en sus celdas.
echo "<div>";
// Hay que restablecer la partida.
foreach ($resumen as $equipo) {
if ($equipo->iCasilla != 0) {
// Hay que colocar la ficha en la celda.
$ficha = '<div class=ficha><img src='.base_url().'assets/img/'.$equipo->iGrupo.'.png?id=6></div>';
echo "<script>";
echo "AddFicha('casilla$equipo->iCasilla', '$ficha')";
echo "</script>";
}
}
?>
<br class="clear">
<hr class="short">
<!-- Leyenda -->
<blockquote>
<h4>Leyenda.</h4>
<ul>
<li><img src="<?=base_url()?>assets/img/6.png" align="middle"> Indica, según tu color, la posición en la que estás en el juego.</li>
<li><img src="<?=base_url()?>assets/img/syringe.png" align="middle"> Si aciertas la pregunta, guardas la posición, si no la aciertas vuelves a la casilla de <b>inicio</b></li>
<li><img src="<?=base_url()?>assets/img/wind.png" align="middle"> Si aciertas la pregunta, vas a la siguiente casilla de <b>viento</b>. Si no aciertas, vuelves a la casilla anterior.</li>
</ul>
</blockquote>
<!-- Resumen de la partida -->
<?php
} // Cierra el if de la partida finalizada.
if ($bFinalizada == 0) { ?>
<input type="hidden" data-bb="pregunta">
<input type="button" class="btn btn-warning"
data-bb="confirm"
data-pn="<?=$iId_Panel;?>"
data-id="<?=$iId_Partida;?>"
data-gr="<?=$iTurno;?>"
value="Tirar Dado">
<input type="button" class="btn btn-warning"
data-bb="confirm2"
data-id="<?=$iId_Partida;?>"
value="Finalizar partida">
<input type="button" class="btn btn-warning" value="Salir"
onclick="location.href='<?=base_url()?>index.php/jugar/salir/<?=$iId_Partida?>'">
<?php } else { ?>
<input type="button" class="btn btn-warning" value="Listado de partidas"
onclick="location.href='<?=base_url()?>index.php/partidas'">
<?php } ?>
</div>
</div>
<?php $this->load->view('footer');?>
</div>
<script src="<?=base_url()?>vendor/jquery.appear.js"></script>
<script src="<?=base_url()?>vendor/jquery.easing.js"></script>
<script src="<?=base_url()?>vendor/jquery.cookie.js"></script>
<script src="<?=base_url()?>vendor/bootstrap/js/bootstrap.js"></script>
<?php if ($this->session->flashdata('respuesta_ok') || $this->session->flashdata('respuesta_ko')) {
echo "<script type='text/javascript'>";
echo "$(document).ready(function(){";
echo "$('.modal').fadeIn();";
echo "$('.cerrar').click(function(){";
echo "$('.modal').fadeOut(300);";
echo "});});";
echo "</script>";
}
?>
<script type="text/javascript">
$(window).load(function() {
$('#preloader').fadeOut('slow');
$('body').css({'overflow':'visible'});
});
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<!-- BOOT BOX -->
<script src="<?=base_url()?>js/bootbox/boot.activate.js"></script>
<script src="<?=base_url()?>js/bootbox/bootbox.min.js"></script>
<script type="text/javascript">
function aleatorio(a,b) {return Math.round(Math.random()*(b-a)+parseInt(a));}
bootbox.setDefaults({
locale: "es"
});
$(function() {
var cajas = {};
var forzar = {};
$(document).on("click", "input[data-bb]", function(e) {
e.preventDefault();
var type = $(this).data("bb");
// Partida en curso
var iId_Partida = $(this).data("id");
// Grupo que tiene el turno
var iId_Grupo = $(this).data("gr");
// Panel
var iId_Panel = $(this).data("pn");
if (typeof cajas[type] === 'function') {
cajas[type](iId_Partida, iId_Grupo, iId_Panel);
} else {
if (typeof forzar[type] === 'function')
forzar[type](iId_Partida, iId_Grupo, iId_Panel);
}
});
cajas.confirm = function(id, gr, pn) {
var tirada = aleatorio(1,6);
//var tirada = 1;
var innerTxt = "";
innerTxt = innerTxt + '<div style="float:left; padding-left:5px; width:150px;"><img src="'
+ '<?=base_url()?>' + 'assets/img/dado'+tirada+'.png' + '"></div>';
innerTxt = innerTxt + '<div style="float:left; padding-left:10px; width:300px;"><blockquote><b>Grupo '+ gr +'</b>, has avanzado <b>'+tirada+'</b> posicion/es, a continuación vamos a formularte una pregunta ... ¿Preparado? </blockquote></div>';
innerTxt += "<br class='clear'>";
bootbox.confirm(innerTxt, function(result) {
if (result == true) {
location.href = '<?=base_url()?>index.php/jugar/'
+ id
+ '/'
+ pn
+ '/'
+ gr
+ '/'
+ tirada;
}
});
};
cajas.confirm2 = function(id, gr, pn) {
var innerTxt = "Si finalizas la partida, no podrás volver a jugarla, el ranking de los jugadores quedará como hasta ahora. ¿Estás seguro/a que desea finalizar la partida de todos modos?";
innerTxt += "<br class='clear'>";
bootbox.confirm(innerTxt, function(result) {
if (result == true) {
location.href = '<?=base_url()?>index.php/jugar/finalizar/'
+ id;
}
});
};
});
</script>
<!-- FIN BOOT -->
</body>
</html>
|
namespace <API key>.Models
{
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public class User
{
private ICollection<UserProfile> userProfiles;
public User()
{
this.userProfiles = new HashSet<UserProfile>();
}
public virtual ICollection<UserProfile> UserProfiles
{
get { return userProfiles; }
set { userProfiles = value; }
}
}
}
|
const gulp = require('gulp'),
zip = require('gulp-zip');
/**
* Metadata about the plugin.
*
* @var object
*/
const plugin = {
name: 'example-plugin',
directory: '.'
}
gulp.task('distribute', function () {
let paths = [
'vendor/twig*',
'vendor/composer*',
'vendor/autoload.php',
'src*'
]
let src = gulp.src(paths, {
base: './'
})
let archive = src.pipe(zip(`${plugin.name}.zip`))
return archive.pipe(gulp.dest(plugin.directory))
});
|
namespace RouteExtreme.Web
{
using System;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Microsoft.Owin.Security.Google;
using Owin;
using RouteExtreme.Models;
using RouteExtreme.Data;
public partial class Startup
{
public void ConfigureAuth(IAppBuilder app)
{
// Configure the db context, user manager and signin manager to use a single instance per request
app.<API key>(<API key>.Create);
app.<API key><<API key>>(<API key>.Create);
app.<API key><<API key>>(<API key>.Create);
// Enable the application to use a cookie to store information for the signed in user
// and to use a cookie to temporarily store information about a user logging in with a third party login provider
// Configure the sign in cookie
app.<API key>(new Cookie<API key>
{
AuthenticationType = <API key>.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
Provider = new Cookie<API key>
{
// Enables the application to validate the security stamp when the user logs in.
// This is a security feature which is used when you change a password or add an external login to your account.
OnValidateIdentity = <API key>.OnValidateIdentity<<API key>, User>(
validateInterval: TimeSpan.FromMinutes(30),
regenerateIdentity: (manager, user) => user.<API key>(manager))
}
});
app.<API key>(<API key>.ExternalCookie);
// Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process.
app.<API key>(<API key>.TwoFactorCookie, TimeSpan.FromMinutes(5));
// Enables the application to remember the second login verification factor such as phone or email.
// Once you check this option, your second step of verification during the login process will be remembered on the device where you logged in from.
// This is similar to the RememberMe option when you log in.
app.<API key>(<API key>.<API key>);
// Uncomment the following lines to enable logging in with third party login providers
//app.<API key>(
// clientId: "",
// clientSecret: "");
//app.Use<TwitterConsumerkey>(
// consumerKey: "",
// consumerSecret: "");
//app.<API key>(
// appId: "",
// appSecret: "");
//app.<API key>(new GoogleO<API key>()
// ClientId = "",
// ClientSecret = ""
}
}
}
|
package com.management.dao.impl.calcs;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import com.management.bean.calculate.ProjectCalc;
import com.management.bean.calculate.ProjectCalcs;
import com.management.dao.calcs.ProjectCalcDao;
import com.management.util.DBUtil;
public class ProjectCalcDaoImpl implements ProjectCalcDao {
@Override
public List<ProjectCalc> find() {
try {
Connection conn = DBUtil.getConnection();
String sql = "select * from project_calc";
QueryRunner qr = new QueryRunner();
return qr.query(conn, sql, new BeanListHandler<>(ProjectCalc.class));
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public void add(ProjectCalc c) {
try {
Connection conn = DBUtil.getConnection();
String sql = "insert into project_calc(rank,category,weight,high,low) values(?,?,?,?,?)";
QueryRunner qr = new QueryRunner();
Object[] params = {c.getRank(),c.getCategory(),c.getWeight(),c.getHigh(),c.getLow()};
qr.update(conn, sql, params);
ProjectCalcs.update();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public void update(ProjectCalc c) {
try {
Connection conn = DBUtil.getConnection();
String sql = "update project_calc set rank=?,category=?,weight=?,high=?,low=? where id=?";
QueryRunner qr = new QueryRunner();
Object[] params = {c.getRank(),c.getCategory(),c.getWeight(),c.getHigh(),c.getLow(),c.getId()};
qr.update(conn, sql, params);
ProjectCalcs.update();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public void delete(int id) {
try {
Connection conn = DBUtil.getConnection();
String sql = "delete from project_calc where id=?";
QueryRunner qr = new QueryRunner();
qr.update(conn, sql,id);
ProjectCalcs.update();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
|
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v5.7.0 - v5.8.0: v8::HeapProfiler::ObjectNameResolver Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v5.7.0 - v5.8.0
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="<API key>">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="<API key>.html">HeapProfiler</a></li><li class="navelem"><a class="el" href="<API key>.html">ObjectNameResolver</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="<API key>.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">v8::HeapProfiler::ObjectNameResolver Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header
<div class="contents">
<p><code>#include <<a class="el" href="<API key>.html">v8-profiler.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">GetName</a> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > object)=0</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Callback interface for retrieving user friendly names of global objects. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual const char* v8::HeapProfiler::ObjectNameResolver::GetName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > </td>
<td class="paramname"><em>object</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns name to be used in the heap snapshot for given node. Returned string must stay alive until snapshot collection is completed. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>deps/v8/include/<a class="el" href="<API key>.html">v8-profiler.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
|
using System;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
using System.Windows.Media;
using WPFControls;
namespace FormsApp
{
partial class Form1 : Form
{
private ElementHost _ctrlHost;
private SolidColorBrush _initBackBrush;
private FontFamily _initFontFamily;
private double _initFontSize;
private FontStyle _initFontStyle;
private FontWeight _initFontWeight;
private SolidColorBrush _initForeBrush;
private MyControl _wpfAddressCtrl;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
_ctrlHost = new ElementHost {Dock = DockStyle.Fill};
panel1.Controls.Add(_ctrlHost);
_wpfAddressCtrl = new MyControl();
_wpfAddressCtrl.InitializeComponent();
_ctrlHost.Child = _wpfAddressCtrl;
_wpfAddressCtrl.OnButtonClick +=
<API key>;
_wpfAddressCtrl.Loaded += <API key>;
}
private void <API key>(object sender, EventArgs e)
{
_initBackBrush = _wpfAddressCtrl.MyControlBackground;
_initForeBrush = _wpfAddressCtrl.MyControlForeground;
_initFontFamily = _wpfAddressCtrl.MyControlFontFamily;
_initFontSize = _wpfAddressCtrl.MyControlFontSize;
_initFontWeight = _wpfAddressCtrl.MyControlFontWeight;
_initFontStyle = _wpfAddressCtrl.MyControlFontStyle;
}
private void <API key>(
object sender,
MyControlEventArgs args)
{
if (args.IsOk)
{
lblAddress.Text = @"Street Address: " + args.MyStreetAddress;
lblCity.Text = @"City: " + args.MyCity;
lblName.Text = "Name: " + args.MyName;
lblState.Text = "State: " + args.MyState;
lblZip.Text = "Zip: " + args.MyZip;
}
else
{
lblAddress.Text = "Street Address: ";
lblCity.Text = "City: ";
lblName.Text = "Name: ";
lblState.Text = "State: ";
lblZip.Text = "Zip: ";
}
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlBackground = _initBackBrush;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlBackground = new SolidColorBrush(Colors.LightGreen);
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlBackground = new SolidColorBrush(Colors.LightSalmon);
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlForeground = _initForeBrush;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlForeground = new SolidColorBrush(Colors.Red);
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlForeground = new SolidColorBrush(Colors.Yellow);
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontFamily = _initFontFamily;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontFamily = new FontFamily("Times New Roman");
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontFamily = new FontFamily("WingDings");
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontSize = _initFontSize;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontSize = 10;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontSize = 12;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontStyle = _initFontStyle;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontStyle = FontStyles.Italic;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontWeight = _initFontWeight;
}
private void <API key>(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontWeight = FontWeights.Bold;
}
}
}
// </snippet1>
|
using System.Collections.Immutable;
using JetBrains.Annotations;
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Queries.Expressions;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Resources.Annotations;
using Microsoft.Extensions.Primitives;
namespace <API key>.IntegrationTests.ResourceDefinitions.Reading;
[UsedImplicitly(<API key>.<API key>)]
public sealed class MoonDefinition : <API key><Moon, int>
{
private readonly <API key> <API key>;
protected override <API key> <API key> => <API key>.Reading;
public MoonDefinition(IResourceGraph resourceGraph, <API key> <API key>, <API key> hitCounter)
: base(resourceGraph, hitCounter)
{
// This constructor will be resolved from the container, which means
// you can take on any dependency that is also defined in the container.
<API key> = <API key>;
}
public override IImmutableSet<<API key>> OnApplyIncludes(IImmutableSet<<API key>> existingIncludes)
{
base.OnApplyIncludes(existingIncludes);
if (!<API key>.<API key> ||
existingIncludes.Any(include => include.Relationship.Property.Name == nameof(Moon.OrbitsAround)))
{
return existingIncludes;
}
<API key> <API key> = ResourceType.<API key>(nameof(Moon.OrbitsAround));
return existingIncludes.Add(new <API key>(<API key>));
}
public override <API key><Moon> <API key>()
{
base.<API key>();
return new <API key><Moon>
{
["isLargerThanTheSun"] = FilterByRadius
};
}
private static IQueryable<Moon> FilterByRadius(IQueryable<Moon> source, StringValues parameterValue)
{
bool <API key> = bool.Parse(parameterValue);
return <API key> ? source.Where(moon => moon.SolarRadius > 1m) : source.Where(moon => moon.SolarRadius <= 1m);
}
}
|
import java.util.*;
public class Main {
private static long[] array;
private static int N;
public static void main(String... args) {
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
array = new long[N];
for (int i = 0; i < N; i++)
array[i] = sc.nextInt();
System.out.print(sum(0, 0));
}
private static long sum(int i, long value) {
if (i == N)
return value;
return sum(i + 1, value + array[i]) ^ sum(i + 1, value);
}
}
|
from django import forms
from miniURL.models import Redirection
class RedirectionForm(forms.ModelForm):
class Meta:
model = Redirection
fields = ('real_url', 'pseudo')
# ou directement en donnant un objet du modele :
# Quand on a recu une bonne formeModele il suffit de save() pour la mettre en base
|
<!DOCTYPE html>
<!
Copyright 2012 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
<html>
<head>
<title>CoolClock</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../../polymer/polymer.js"></script>
<link rel="import" href="cool-clock.html">
</head>
<body>
<cool-clock></cool-clock>
<cool-clock></cool-clock>
</body>
</html>
|
package pp.iloc.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import pp.iloc.model.Num.NumKind;
import pp.iloc.model.Operand.Type;
import pp.iloc.parse.FormatException;
/** ILOC program.
* @author Arend Rensink
*/
public class Program {
/** Indexed list of all instructions in the program. */
private final List<Instr> instrList;
/**
* Indexed list of all operations in the program.
* This is the flattened list of instructions.
*/
private final List<Op> opList;
/** Mapping from labels defined in the program to corresponding
* index locations.
*/
private final Map<Label, Integer> labelMap;
/** (Partial) mapping from symbolic constants used in the program
* to corresponding numeric values. */
private final Map<Num, Integer> symbMap;
/** Creates a program with an initially empty instruction list. */
public Program() {
this.instrList = new ArrayList<>();
this.opList = new ArrayList<>();
this.labelMap = new LinkedHashMap<>();
this.symbMap = new LinkedHashMap<>();
}
/** Adds an instruction to the instruction list of this program.
* @throws <API key> if the instruction has a known label
*/
public void addInstr(Instr instr) {
instr.setProgram(this);
instr.setLine(this.opList.size());
if (instr.hasLabel()) {
registerLabel(instr);
}
this.instrList.add(instr);
for (Op op : instr) {
this.opList.add(op);
}
}
/** Registers the label of a given instruction. */
void registerLabel(Instr instr) {
Label label = instr.getLabel();
Integer loc = this.labelMap.get(label);
if (loc != null) {
throw new <API key>(String.format(
"Label %s already occurred at location %d", label, loc));
}
this.labelMap.put(label, instr.getLine());
}
/** Returns the current list of instructions of this program. */
public List<Instr> getInstr() {
return Collections.unmodifiableList(this.instrList);
}
/** Returns the operation at a given line number. */
public Op getOpAt(int line) {
return this.opList.get(line);
}
/** Returns the size of the program, in number of operations. */
public int size() {
return this.opList.size();
}
/**
* Returns the location at which a given label is defined, if any.
* @return the location of an instruction with the label, or {@code -1}
* if the label is undefined
*/
public int getLine(Label label) {
Integer result = this.labelMap.get(label);
return result == null ? -1 : result;
}
/** Assigns a fixed numeric value to a symbolic constant.
* It is an error to assign to the same constant twice.
* @param name constant name, without preceding '@'
*/
public void setSymb(Num symb, int value) {
if (this.symbMap.containsKey(symb)) {
throw new <API key>("Constant '" + symb
+ "' already assigned");
}
this.symbMap.put(symb, value);
}
/**
* Returns the value with which a given symbol has been
* initialised, if any.
*/
public Integer getSymb(Num symb) {
return this.symbMap.get(symb);
}
/**
* Returns the value with which a given named symbol has been
* initialised, if any.
* @param name name of the symbol, without '@'-prefix
*/
public Integer getSymb(String name) {
return getSymb(new Num(name));
}
/**
* Checks for internal consistency, in particular whether
* all used labels are defined.
*/
public void check() throws FormatException {
List<String> messages = new ArrayList<>();
for (Instr instr : getInstr()) {
for (Op op : instr) {
messages.addAll(checkOpnds(op.getLine(), op.getArgs()));
}
}
if (!messages.isEmpty()) {
throw new FormatException(messages);
}
}
private List<String> checkOpnds(int loc, List<Operand> opnds) {
List<String> result = new ArrayList<>();
for (Operand opnd : opnds) {
if (opnd instanceof Label) {
if (getLine((Label) opnd) < 0) {
result.add(String.format("Line %d: Undefined label '%s'",
loc, opnd));
}
}
}
return result;
}
/**
* Returns a mapping from registers to line numbers
* in which they appear.
*/
public Map<String, Set<Integer>> getRegLines() {
Map<String, Set<Integer>> result = new LinkedHashMap<>();
for (Op op : this.opList) {
for (Operand opnd : op.getArgs()) {
if (opnd.getType() == Type.REG) {
Set<Integer> ops = result.get(((Reg) opnd).getName());
if (ops == null) {
result.put(((Reg) opnd).getName(),
ops = new LinkedHashSet<>());
}
ops.add(op.getLine());
}
}
}
return result;
}
/**
* Returns a mapping from (symbolic) variables to line numbers
* in which they appear.
*/
public Map<String, Set<Integer>> getSymbLines() {
Map<String, Set<Integer>> result = new LinkedHashMap<>();
for (Op op : this.opList) {
for (Operand opnd : op.getArgs()) {
if (!(opnd instanceof Num)) {
continue;
}
if (((Num) opnd).getKind() != NumKind.SYMB) {
continue;
}
String name = ((Num) opnd).getName();
Set<Integer> lines = result.get(name);
if (lines == null) {
result.put(name, lines = new LinkedHashSet<>());
}
lines.add(op.getLine());
}
}
return result;
}
/** Returns a line-by-line printout of this program. */
@Override
public String toString() {
StringBuilder result = new StringBuilder();
for (Map.Entry<Num, Integer> symbEntry : this.symbMap.entrySet()) {
result.append(String.format("%s <- %d%n", symbEntry.getKey()
.getName(), symbEntry.getValue()));
}
for (Instr instr : getInstr()) {
result.append(instr.toString());
result.append('\n');
}
return result.toString();
}
@Override
public int hashCode() {
return this.instrList.hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Program)) {
return false;
}
Program other = (Program) obj;
if (!this.instrList.equals(other.instrList)) {
return false;
}
return true;
}
/** Returns a string consisting of this program in a nice layout.
*/
public String prettyPrint() {
StringBuilder result = new StringBuilder();
// first print the symbolic declaration map
int idSize = 0;
for (Num symb : this.symbMap.keySet()) {
idSize = Math.max(idSize, symb.getName().length());
}
for (Map.Entry<Num, Integer> symbEntry : this.symbMap.entrySet()) {
result.append(String.format("%-" + idSize + "s <- %d%n", symbEntry
.getKey().getName(), symbEntry.getValue()));
}
if (idSize > 0) {
result.append('\n');
}
// then print the instructions
int labelSize = 0;
int sourceSize = 0;
int targetSize = 0;
for (Instr i : getInstr()) {
labelSize = Math.max(labelSize, i.toLabelString().length());
if (i instanceof Op && ((Op) i).getOpCode() != OpCode.out) {
Op op = (Op) i;
sourceSize = Math.max(sourceSize, op.toSourceString().length());
targetSize = Math.max(targetSize, op.toTargetString().length());
}
}
for (Instr i : getInstr()) {
result.append(i.prettyPrint(labelSize, sourceSize, targetSize));
}
return result.toString();
}
}
|
/** audio player styles **/
.audio-player, .audio-player div,.audio-player button {
margin: 0;
padding: 0;
border: none;
outline: none;
}
div.audio-player {
position: relative;
width: 100% !important;
height: 76px !important;
margin: 0 auto;
}
/* play/pause control */
.mejs-controls .mejs-button button {
cursor: pointer;
display: block;
position: absolute;
text-indent: -9999px;
}
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
width: 25px;
height: 25px;
top: 61px;
left: 24px;
background: transparent url('../images/play.png') 2px 0px no-repeat;
z-index: 1;
}
.mejs-controls .mejs-pause button {
background-position:2px -28px;
}
/* mute/unmute control */
.mejs-controls .mejs-mute button, .mejs-controls .mejs-unmute button {
width: 25px;
height: 20px;
top: 65px;
right: 92px;
background: transparent url('../images/audio.png') no-repeat 0px 0px;
}
/* volume scrubber bar */
.mejs-controls div.<API key> {
position: absolute;
top: 13px;
right: 15px;
cursor: pointer;
}
/* time scrubber bar */
.mejs-controls div.mejs-time-rail {
width: 380px;
}
.mejs-controls .mejs-time-rail span {
position: absolute;
display: block;
width: 380px;
height: 14px;
top: 40px;
left: 0px;
cursor: pointer;
-<API key>: 0px 0px 2px 2px;
-moz-border-radius: 0px 0px 2px 2px;
border-radius: 0px 0px 2px 2px;
}
.mejs-controls .mejs-time-rail .mejs-time-total {
background: #e2e2e2;
width: 433px !important; /* fixes display bug using jQuery 1.8+ */
-<API key>: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.mejs-controls .mejs-time-rail .mejs-time-loaded {
top: 0;
left: 0;
width: 0;
background: #076D90;
}
.mejs-controls .mejs-time-rail .mejs-time-current {
top: 0;
left: 0;
width: 0;
-<API key>: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background: #28545b;
}
/* metallic sliders */
.mejs-controls .mejs-time-rail .mejs-time-handle {
position: absolute;
display: block;
width: 20px;
height: 20px;
top: -1px;
left: 0px !important;
background: url('../images/dot.png') no-repeat;
}
.mejs-controls .<API key> .<API key> {
position: absolute;
display: block;
width: 12px !important;
height: 14px !important;
top: -2px;
background: url('../images/dot1.png') no-repeat 0px 0px;
}
/* time progress tooltip */
.mejs-controls .mejs-time-rail .mejs-time-float {
position: absolute;
display: none;
width: 33px;
height: 23px;
top: -26px;
margin-left: 0;
z-index: 9999;
background: url('../images/time-box.png');
}
.mejs-controls .mejs-time-rail .<API key> {
width: 33px;
display: block;
left: 0;
top: 4px;
font-size: 10px;
font-weight: bold;
color: #666;
text-align: center;
z-index: 9999;
}
/* volume scrubber bar */
.mejs-controls div.<API key> {
position: absolute;
top: 70px;
right: 12px;
cursor: pointer;
z-index: 1;
}
.mejs-controls .<API key> .<API key> {
width: 80px !important;
height: 5px !important;
background: #e2e2e2;
-<API key>: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.mejs-controls .<API key> .<API key> {
position: absolute;
width: 0 ;
height: 5px !important;
top: 0px;
left: 0px;
background:#44c7f4;
-<API key>: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
/*--responsive--*/
@media(max-width:1440px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 445px !important;
}
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
left: 24px;
}
}
@media(max-width:1280px){
}
@media(max-width:1024px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 356px !important;
top: 23px;
}
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
left: 24px;
top: 36px;
}
div.audio-player {
height: 48px !important;
}
.mejs-controls .mejs-mute button, .mejs-controls .mejs-unmute button {
top: 40px;
}
.mejs-controls div.<API key> {
top: 45px;
}
}
@media(max-width:800px){
div#mep_0 {
width: 100% !important;
}
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
left: 14px;
top: 39px;
}
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 280px !important;
}
}
@media(max-width:667px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 239px !important;
}
}
@media(max-width:640px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 335px !important;
}
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
left: 12px;
}
}
@media(max-width:600px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 312px !important;
}
}
@media(max-width:667px){
div#mep_0 {
width: 100% !important;
}
}
@media(max-width:568px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 292px !important;
}
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 293px !important;
}
}
@media(max-width:480px){
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
left: 40px;
}
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 433px !important;
}
.audio-player div{
width:72px !important;
}
}
@media(max-width:414px){
.jp-volume-controls {
left: 122px;
}
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 367px !important;
}
@media(max-width:384px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 271px !important;
}
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
width: 22px;
height: 22px;
left: 42px;
background: transparent url('../images/play.png') 0px -1px no-repeat;
background-size: 22px;
top: 41px;
left: 10px;
}
.mejs-controls .mejs-pause button {
background-position: 0px -23px;
}
.mejs-controls .<API key> .<API key> {
width: 72px !important;
}
}
@media(max-width:320px){
.mejs-controls .mejs-time-rail .mejs-time-total {
width: 271px !important;
}
.mejs-controls .mejs-play button, .mejs-controls .mejs-pause button {
width: 22px;
height: 22px;
left: 42px;
background: transparent url('../images/play.png') 0px -1px no-repeat;
background-size: 22px;
top: 41px;
left: 10px;
}
.mejs-controls .mejs-pause button {
background-position: 0px -23px;
}
.mejs-controls .<API key> .<API key> {
width: 72px !important;
}
}
|
<!DOCTYPE html>
<html class="no-js " lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="jQuery,API,,jquery api,1.11,def.resolveWith(c,[a])"/>
<meta name="description" content="jQuery API 1.12.0 http://jquery.cuishifeng.cn"/>
<meta name="robots" content="all">
<meta name="renderer" content="webkit">
<meta name="author" content="Shifone -http://jquery.cuishifeng.cn"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>def.resolveWith(c,[a]) | jQuery API 3.1.0 | jQuery API </title>
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="stylesheet" href="css/common.css?v=20151229">
</head>
<body >
<!--[if lt IE 9]>
<div class="browser-happy">
<div class="content">
<p>low</p>
<a href="http://browsehappy.com/"></a>
</div>
</div>
<![endif]
<div class="main-container" >
<div id="main-wraper" class="main-wraper">
<div id="tips-con" style="display: block;" data-key="content-bkc">
<div id="tips-body" class="tips-body">4G~<a href="http:
</div>
<header class="top-nav">
<a href="index.html" class="pc" title=""></a> > <span class="sub-title"></span> > def.resolveWith(c,[a])
<a class="source" href="source.html"></a>
</header>
<div id="content" >
<h2><span>:Deferred Object</span>deferred.resolveWith(context,[args])</h2>
<h3></h3>
<div class="desc">
<p></p>
<div class="longdesc">
<p>doneCallbacks <a href="deferred.then.html" tppabs="deferred.then.html">deferred.then</a><a href="deferred.fail.html" tppabs="deferred.fail.html">deferred.fail</a>argsdeferred.reject()failCallbacks.reject()<a href="http://api.jquery.com/category/deferred-object/">Deferred object</a> </p>
</div>
</div>
<h3></h3>
<div class="parameter">
<h4><strong>context</strong><em>V1.5</em></h4>
<p>this doneCallbacks </p>
<h4><strong>args</strong><em>V1.5</em></h4>
<p>doneCallbacks </p>
</div>
</div>
<div class="navigation clearfix">
<span class="alignleft"><a href="deferred.resolve.html">def.resolve(args)</a></span>
<span class="alignright"><a href="deferred.then.html">def.then(d[,f][,p])</a></span>
</div>
<div class="donate-con">
<div class="donate-btn"></div>
<div class="donate-body">
<div class="donate-tips"></div>
<div class="donate-img"> <a href="source.html"><img src="images/qr_code.png" height="350" width="350" alt=""></a> </div>
</div>
</div>
</div><!-- main-wraper end -->
<footer id="footer-con" class="footer" style="display:none;" >
<p id="footer">Copyright © <a href="http:
</footer>
</div><!-- main -container end -->
<aside class="left-panel left-panel-hide" id="left-panel">
<div class="auto-query-con" >
<input type="text" name="query" id="autoquery" placeholder=""/>
</div>
<nav class="navigation">
<ul id="main-menu" class="main-menu">
<li class="">
<a class="menu-title" id="dashboard-menu" href="index.html">
<i class="fa fa-home"></i><span class="nav-label">Dashboard</span>
</a>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="<API key>.html">jQuery([sel,[context]])</a></li>
<li><a href="<API key>.html">jQuery(html,[ownerDoc])</a><sup>1.8*</sup></li>
<li><a href="jQuery_callback.html">jQuery(callback)</a></li>
<li><a href="jQuery.holdReady.html">jQuery.holdReady(hold)</a><sup>1.6+</sup></li>
<li><a href="each.html">each(callback)</a></li>
<li><a href="size.html">size()</a></li>
<li><a href="length.html">length</a></li>
<li><a href="selector.html">selector</a></li>
<li><a href="context.html">context</a></li>
<li><a href="get.html">get([index])</a></li>
<li><a href="index_1.html">index([selector|element])</a></li>
<li><a href="data.html">data([key],[value])</a></li>
<li><a href="removeData.html">removeData([name|list])</a><sup>1.7*</sup></li>
<li><a href="jQuery.data.html"><del>$.data(ele,[key],[val])</del></a><sup>1.8-</sup></li>
<li><a href="queue.html" title="queue(element,[queueName])">queue(e,[q])</a></li>
<li><a href="dequeue.html" title="dequeue([queueName])">dequeue([queueName])</a></li>
<li><a href="clearQueue.html" title="clearQueue([queueName])">clearQueue([queueName])</a></li>
<li><a href="jQuery.fn.extend.html">jQuery.fn.extend(object)</a></li>
<li><a href="jQuery.extend_object.html">jQuery.extend(object)</a></li>
<li><a href="jQuery.noConflict.html" title="jQuery.noConflict([extreme])">jQuery.noConflict([ex])</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="id.html">#id</a></li>
<li><a href="element.html">element</a></li>
<li><a href="class.html">.class</a></li>
<li><a href="all.html">*</a></li>
<li><a href="multiple.html">selector1,selector2,selectorN</a></li>
<li><a href="descendant.html">ancestor descendant</a></li>
<li><a href="child.html">parent > child</a></li>
<li><a href="next_1.html">prev + next</a></li>
<li><a href="siblings_1.html">prev ~ siblings</a></li>
<li><a href="first_1.html">:first</a></li>
<li><a href="not_1.html">:not(selector)</a></li>
<li><a href="even.html">:even</a></li>
<li><a href="odd.html">:odd</a></li>
<li><a href="eq_1.html">:eq(index)</a></li>
<li><a href="gt.html">:gt(index)</a></li>
<li><a href="lang.html">:lang</a><sup>1.9+</sup></li>
<li><a href="last_1.html">:last</a></li>
<li><a href="lt.html">:lt(index)</a></li>
<li><a href="header.html">:header</a></li>
<li><a href="animated.html">:animated</a></li>
<li><a href="focus_1.html">:focus</a><sup>1.6+</sup></li>
<li><a href="root.html">:root</a><sup>1.9+</sup></li>
<li><a href="target.html">:target</a><sup>1.9+</sup></li>
<li><a href="contains.html">:contains(text)</a></li>
<li><a href="empty_1.html">:empty</a></li>
<li><a href="has_1.html">:has(selector)</a></li>
<li><a href="parent_1.html">:parent</a></li>
<li><a href="hidden_1.html">:hidden</a></li>
<li><a href="visible.html">:visible</a></li>
<li><a href="attributeHas.html">[attribute]</a></li>
<li><a href="attributeEquals.html">[attribute=value]</a></li>
<li><a href="attributeNotEqual.html">[attribute!=value]</a></li>
<li><a href="attributeStartsWith.html">[attribute^=value]</a></li>
<li><a href="attributeEndsWith.html">[attribute$=value]</a></li>
<li><a href="attributeContains.html">[attribute*=value]</a></li>
<li><a href="attributeMultiple.html">[attrSel1][attrSel2][attrSelN]</a></li>
<li><a href="firstChild.html">:first-child</a></li>
<li><a href="firstOfType.html">:first-of-type</a><sup>1.9+</sup></li>
<li><a href="lastChild.html">:last-child</a></li>
<li><a href="lastOfType.html">:last-of-type</a><sup>1.9+</sup></li>
<li><a href="nthChild.html">:nth-child</a></li>
<li><a href="nthLastChild.html">:nth-last-child</a><sup>1.9+</sup></li>
<li><a href="nthLastOfType.html">:nth-last-of-type</a><sup>1.9+</sup></li>
<li><a href="nthOfType.html">:nth-of-type</a><sup>1.9+</sup></li>
<li><a href="onlyChild.html">:only-child</a></li>
<li><a href="onlyOfType.html">:only-of-type</a><sup>1.9+</sup></li>
<li><a href="input.html">:input</a></li>
<li><a href="text_1.html">:text</a></li>
<li><a href="password.html">:password</a></li>
<li><a href="radio.html">:radio</a></li>
<li><a href="checkbox.html">:checkbox</a></li>
<li><a href="submit_1.html">:submit</a></li>
<li><a href="image.html">:image</a></li>
<li><a href="reset.html">:reset</a></li>
<li><a href="button.html">:button</a></li>
<li><a href="file_1.html">:file</a></li>
<li><a href="enabled_1.html">:enabled</a></li>
<li><a href="disabled_1.html">:disabled</a></li>
<li><a href="checked_1.html">:checked</a></li>
<li><a href="selected_1.html">:selected</a></li>
<li><a href="jQuery.escapeSelector.html">$.escapeSelector(selector)</a><sup>3.0+</sup></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label">Ajax</span>
</a>
<ul class="sub-menu">
<li><a href="jQuery.Ajax.html">$.ajax(url,[settings])</a></li>
<li><a href="load.html">load(url,[data],[callback])</a></li>
<li><a href="jQuery.get.html">$.get(url,[data],[fn],[type])</a></li>
<li><a href="jQuery.getJSON.html">$.getJSON(url,[data],[fn])</a></li>
<li><a href="jQuery.getScript.html">$.getScript(url,[callback])</a></li>
<li><a href="jQuery.post.html">$.post(url,[data],[fn],[type])</a></li>
<li><a href="ajaxComplete.html">ajaxComplete(callback)</a></li>
<li><a href="ajaxError.html">ajaxError(callback)</a></li>
<li><a href="ajaxSend.html">ajaxSend(callback)</a></li>
<li><a href="ajaxStart.html">ajaxStart(callback)</a></li>
<li><a href="ajaxStop.html">ajaxStop(callback)</a></li>
<li><a href="ajaxSuccess.html">ajaxSuccess(callback)</a></li>
<li><a href="jQuery.ajaxPrefilter.html">$.ajaxPrefilter([type],fn)</a></li>
<li><a href="jQuery.ajaxSetup.html">$.ajaxSetup([options])</a></li>
<li><a href="serialize.html">serialize()</a></li>
<li><a href="serializearray.html">serializearray()</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="attr.html" title="attr(name|properties|key,value|fn)">attr(name|pro|key,val|fn)</a></li>
<li><a href="removeAttr.html">removeAttr(name)</a></li>
<li><a href="prop.html" title="prop(name|properties|key,value|fn)">prop(n|p|k,v|f)</a><sup>1.6+</sup></li>
<li><a href="removeProp.html">removeProp(name)</a><sup>1.6+</sup></li>
<li><a href="addClass.html">addClass(class|fn)</a></li>
<li><a href="removeClass.html">removeClass([class|fn])</a></li>
<li><a href="toggleClass.html">toggleClass(class|fn[,sw])</a></li>
<li><a href="html.html">html([val|fn])</a></li>
<li><a href="text.html">text([val|fn])</a></li>
<li><a href="val.html">val([val|fn|arr])</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label">CSS</span>
</a>
<ul class="sub-menu">
<li><a href="css.html" title="css(name|properties|[,value|fn])">css(name|pro|[,val|fn])</a><sup>1.9*</sup></li>
<li><a href="jQuery.cssHooks.html">jQuery.cssHooks</a></li>
<li><a href="offset.html">offset([coordinates])</a></li>
<li><a href="position.html">position()</a></li>
<li><a href="scrollTop.html">scrollTop([val])</a></li>
<li><a href="scrollLeft.html">scrollLeft([val])</a></li>
<li><a href="height.html">heigh([val|fn])</a></li>
<li><a href="width.html">width([val|fn])</a></li>
<li><a href="innerHeight.html">innerHeight()</a></li>
<li><a href="innerWidth.html">innerWidth()</a></li>
<li><a href="outerHeight.html">outerHeight([soptions])</a></li>
<li><a href="outerWidth.html">outerWidth([options])</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="append.html">append(content|fn)</a></li>
<li><a href="appendTo.html">appendTo(content)</a></li>
<li><a href="prepend.html">prepend(content|fn)</a></li>
<li><a href="prependTo.html">prependTo(content)</a></li>
<li><a href="after.html">after(content|fn)</a></li>
<li><a href="before.html">before(content|fn)</a></li>
<li><a href="insertAfter.html">insertAfter(content)</a></li>
<li><a href="insertBefore.html">insertBefore(content)</a></li>
<li><a href="wrap.html" title="wrap(html|element|fn)">wrap(html|ele|fn)</a></li>
<li><a href="unwrap.html">unwrap()</a></li>
<li><a href="wrapAll.html" title="wrapall(html|element)">wrapall(html|ele)</a></li>
<li><a href="wrapInner.html" title="wrapInner(html|element|fn)">wrapInner(html|ele|fn)</a></li>
<li><a href="replaceWith.html">replaceWith(content|fn)</a></li>
<li><a href="replaceAll.html">replaceAll(selector)</a></li>
<li><a href="empty.html">empty()</a></li>
<li><a href="remove.html">remove([expr])</a></li>
<li><a href="detach.html">detach([expr])</a></li>
<li><a href="clone.html">clone([Even[,deepEven]])</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="eq.html">eq(index|-index)</a></li>
<li><a href="first.html">first()</a></li>
<li><a href="last.html">last()</a></li>
<li><a href="hasClass.html">hasClass(class)</a></li>
<li><a href="filter.html" title="filter(expr|object|element|fn)">filter(expr|obj|ele|fn)</a></li>
<li><a href="is.html" title="is(expr|object|element|fn)">is(expr|obj|ele|fn)</a><sup>1.6*</sup></li>
<li><a href="map.html">map(callback)</a></li>
<li><a href="has.html" title="has(expr|element)">has(expr|ele)</a></li>
<li><a href="not.html" title="not(expr|element|fn)">not(expr|ele|fn)</a></li>
<li><a href="slice.html" title="slice(start,[end])">slice(start,[end])</a></li>
<li><a href="children.html">children([expr])</a></li>
<li><a href="closest.html" title="closest(expr,[context]|object|element)">closest(e|o|e)</a><sup>1.7*</sup></li>
<li><a href="find.html" title="find(expr|object|element)">find(e|o|e)</a><sup>1.6*</sup></li>
<li><a href="next.html">next([expr])</a></li>
<li><a href="nextAll.html">nextAll([expr])</a></li>
<li><a href="nextUntil.html" title="nextUntil([expr|element][,filter])">nextUntil([e|e][,f])</a><sup>1.6*</sup></li>
<li><a href="offsetParent.html">offsetParent()</a></li>
<li><a href="parent.html">parent([expr])</a></li>
<li><a href="parents.html">parents([expr])</a></li>
<li><a href="parentsUntil.html" title="parentsUntil([expr|element][,filter])">parentsUntil([e|e][,f])</a><sup>1.6*</sup></li>
<li><a href="prev.html">prev([expr])</a></li>
<li><a href="prevAll.html">prevall([expr])</a></li>
<li><a href="prevUntil.html" title="prevUntil([expr|element][,filter])">prevUntil([e|e][,f])</a><sup>1.6*</sup></li>
<li><a href="siblings.html">siblings([expr])</a></li>
<li><a href="add.html" title="add(expr|element|html|object[,context])">add(e|e|h|o[,c])</a></li>
<li><a href="andSelf.html">andSelf()</a></li>
<li><a href="addBack.html">addBack()</a><sup>1.9+</sup></li>
<li><a href="contents.html">contents()</a></li>
<li><a href="end.html">end()</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="ready.html">ready(fn)</a></li>
<li><a href="on.html" title="on(events,[selector],[data],fn)">on(eve,[sel],[data],fn)</a><sup>1.7+</sup></li>
<li><a href="off.html" title="off(events,[selector],[data],fn)">off(eve,[sel],[fn])</a><sup>1.7+</sup></li>
<li><a href="bind.html"><del>bind(type,[data],fn)</del></a><sup>3.0-</sup></li>
<li><a href="one.html">one(type,[data],fn)</a></li>
<li><a href="trigger.html">trigger(type,[data])</a></li>
<li><a href="triggerHandler.html">triggerHandler(type, [data])</a></li>
<li><a href="unbind.html" title="unbind(type,[data|fn])"><del>unbind(t,[d|f])</del></a><sup>3.0-</sup></li>
<li><a href="live.html"><del>live(type,[data],fn)</del></a><sup>1.7-</sup></li>
<li><a href="die.html"><del>die(type,[fn])</del></a><sup>1.7-</sup></li>
<li><a href="delegate.html" title="delegate(selector,[type],[data],fn)"><del>delegate(s,[t],[d],fn)</del></a><sup>3.0-</sup></li>
<li><a href="undelegate.html" title="undelegate([selector,[type],fn])"><del>undelegate([s,[t],fn])</del></a><sup>3.0-</sup></li>
<li><a href="hover.html">hover([over,]out)</a></li>
<li><a href="toggle.html">toggle(fn, fn2, [fn3, fn4, ...])</a></li>
<li><a href="blur.html">blur([[data],fn])</a></li>
<li><a href="change.html">change([[data],fn])</a></li>
<li><a href="click.html">click([[data],fn])</a></li>
<li><a href="dblclick_1.html">dblclick([[data],fn])</a></li>
<li><a href="error.html">error([[data],fn])</a></li>
<li><a href="focus.html">focus([[data],fn])</a></li>
<li><a href="focusin.html">focusin([data],fn)</a></li>
<li><a href="focusout.html">focusout([data],fn)</a></li>
<li><a href="keydown.html">keydown([[data],fn])</a></li>
<li><a href="keypress.html">keypress([[data],fn])</a></li>
<li><a href="keyup.html">keyup([[data],fn])</a></li>
<li><a href="mousedown.html">mousedown([[data],fn])</a></li>
<li><a href="mouseenter.html">mouseenter([[data],fn])</a></li>
<li><a href="mouseleave.html">mouseleave([[data],fn])</a></li>
<li><a href="mousemove.html">mousemove([[data],fn])</a></li>
<li><a href="mouseout.html">mouseout([[data],fn])</a></li>
<li><a href="mouseover.html">mouseover([[data],fn])</a></li>
<li><a href="mouseup.html">mouseup([[data],fn])</a></li>
<li><a href="resize.html">resize([[data],fn])</a></li>
<li><a href="scroll.html">scroll([[data],fn])</a></li>
<li><a href="select.html">select([[data],fn])</a></li>
<li><a href="submit.html">submit([[data],fn])</a></li>
<li><a href="unload.html">unload([[data],fn])</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="show.html" title="show([speed,[easing],[fn]])">show([s,[e],[fn]])</a></li>
<li><a href="hide.html" title="hide([speed,[easing],[fn]])">hide([s,[e],[fn]])</a></li>
<li><a href="toggle.html" title="toggle([speed],[easing],[fn])">toggle([s],[e],[fn])</a></li>
<li><a href="slideDown.html" title="slideDown([speed],[easing],[fn])">slideDown([s],[e],[fn])</a></li>
<li><a href="slideUp.html" title="slideUp([speed,[easing],[fn]])">slideUp([s,[e],[fn]])</a></li>
<li><a href="slideToggle.html" title="slideToggle([speed],[easing],[fn])">slideToggle([s],[e],[fn])</a></li>
<li><a href="fadeIn.html" title="fadeIn([speed],[easing],[fn])">fadeIn([s],[e],[fn])</a></li>
<li><a href="fadeOut.html" title="fadeOut([speed],[easing],[fn])">fadeOut([s],[e],[fn])</a></li>
<li><a href="fadeTo.html" title="fadeTo([[speed],opacity,[easing],[fn]])">fadeTo([[s],o,[e],[fn]])</a></li>
<li><a href="fadeToggle.html" title="fadeToggle([speed,[easing],[fn]])">fadeToggle([s,[e],[fn]])</a></li>
<li><a href="animate.html" title="animate(params,[speed],[easing],[fn])">animate(p,[s],[e],[fn])</a><sup>1.8*</sup></li>
<li><a href="stop.html" title="stop([clearQueue],[jumpToEnd])">stop([c],[j])</a><sup>1.7*</sup></li>
<li><a href="delay.html" title="delay(duration,[queueName])">delay(d,[q])</a></li>
<li><a href="finish.html" title="finish([queue])">finish([queue])</a><sup>1.9+</sup></li>
<li><a href="jQuery.fx.off.html">jQuery.fx.off</a></li>
<li><a href="jQuery.fx.interval.html">jQuery.fx.interval</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="jQuery.support.html">$.support</a></li>
<li><a href="jQuery.browser.html"><del>$.browser</del></a><sup>1.9-</sup></li>
<li><a href="jQuery.browser.version.html">$.browser.version</a></li>
<li><a href="jQuery.boxModel.html"><del>$.boxModel</del></a></li>
<li><a href="jQuery.each.html">$.each(object,[callback])</a></li>
<li><a href="jQuery.extend.html">$.extend([d],tgt,obj1,[objN])</a></li>
<li><a href="jQuery.grep.html">$.grep(array,fn,[invert])</a></li>
<li><a href="jQuery.sub.html"><del>$.sub()</del></a><sup>1.9-</sup></li>
<li><a href="jQuery.when.html">$.when(deferreds)</a></li>
<li><a href="jQuery.makeArray.html">$.makeArray(obj)</a></li>
<li><a href="jQuery.map.html">$.map(arr|obj,callback)</a><sup>1.6*</sup></li>
<li><a href="jQuery.inArray.html">$.inArray(val,arr,[from])</a></li>
<li><a href="jQuery.toArray.html">$.toArray()</a></li>
<li><a href="jQuery.merge.html">$.merge(first,second)</a></li>
<li><a href="jQuery.unique.html"><del>$.unique(array)</del></a><sup>3.0-</sup></li>
<li><a href="jQuery.uniqueSort.html">$.uniqueSort(array)</a><sup>3.0+</sup></li>
<li><a href="jQuery.parseJSON.html"><del>$.parseJSON(json)</del></a><sup>3.0-</sup></li>
<li><a href="jQuery.parseXML.html">$.parseXML(data)</a></li>
<li><a href="jQuery.noop.html">$.noop</a></li>
<li><a href="jQuery.proxy.html">$.proxy(function,context)</a></li>
<li><a href="jQuery.contains.html" title="$.contains(container,contained)">$.contains(c,c)</a></li>
<li><a href="jQuery.type.html">$.type(obj)</a></li>
<li><a href="jQuery.isArray.html">$.isArray(obj)</a></li>
<li><a href="jQuery.isFunction.html">$.isFunction(obj)</a></li>
<li><a href="jQuery.isEmptyObject.html">$.isEmptyObject(obj)</a></li>
<li><a href="jQuery.isPlainObject.html">$.isPlainObject(obj)</a></li>
<li><a href="jQuery.isWindow.html">$.isWindow(obj)</a></li>
<li><a href="jQuery.isNumeric.html">$.isNumeric(value)</a><sup>1.7+</sup></li>
<li><a href="jQuery.trim.html">$.trim(str)</a></li>
<li><a href="jQuery.param.html">$.param(obj,[traditional])</a></li>
<li><a href="jQuery.error.html">$.error(message)</a></li>
<li><a href="jquery.html">$.fn.jquery</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="event.currentTarget.html">eve.currentTarget</a></li>
<li><a href="event.data.html">eve.data</a></li>
<li><a href="event.delegateTarget.html">eve.delegateTarget</a><sup>1.7+</sup></li>
<li><a href="event.isDefaultPrevented.html">eve.isDefaultPrevented()</a></li>
<li><a href="event.<API key>.html" title="event.<API key>">eve.isImmediatePropag...()</a></li>
<li><a href="event.<API key>.html">eve.<API key>()</a></li>
<li><a href="event.namespace.html">eve.namespace</a></li>
<li><a href="event.pageX.html">eve.pageX</a></li>
<li><a href="event.pageY.html">eve.pageY</a></li>
<li><a href="event.preventDefault.html">eve.preventDefault()</a></li>
<li><a href="event.relatedTarget.html">eve.relatedTarget</a></li>
<li><a href="event.result.html">eve.result</a></li>
<li><a href="event.<API key>.html" title="event.<API key>">eve.stopImmediatePro...()</a></li>
<li><a href="event.stopPropagation.html">eve.stopPropagation()</a></li>
<li><a href="event.target.html">eve.target</a></li>
<li><a href="event.timeStamp.html">eve.timeStamp</a></li>
<li><a href="event.type.html">eve.type</a></li>
<li><a href="event.which.html">eve.which</a></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="deferred.done.html" title="deferred.done(doneCallbacks[,doneCallbacks])">def.done(d,[d])</a></li>
<li><a href="deferred.fail.html">def.fail(failCallbacks)</a></li>
<li><a href="deferred.isRejected.html"><del>def.isRejected()</del></a><sup>1.7-</sup></li>
<li><a href="deferred.isResolved.html"><del>def.isResolved()</del></a><sup>1.7-</sup></li>
<li><a href="deferred.reject.html">def.reject(args)</a></li>
<li><a href="deferred.rejectWith.html" title="deferred.rejectWith(context,[args])">def.rejectWith(c,[a])</a></li>
<li><a href="deferred.resolve.html">def.resolve(args)</a></li>
<li><a href="deferred.resolveWith.html" title="deferred.resolveWith(context,[args])">def.resolveWith(c,[a])</a></li>
<li><a href="deferred.then.html" title="deferred.then(doneCallbacks,failCallbacks[, progressCallbacks])">def.then(d[,f][,p])</a><sup>1.8*</sup></li>
<li><a href="deferred.promise.html" title="deferred.promise([type],[target])">def.promise([ty],[ta])</a><sup>1.6+</sup></li>
<li><a href="deferred.pipe.html" title="deferred.pipe([doneFilter],[failFilter],[progressFilter])"><del>def.pipe([d],[f],[p])</del></a><sup>1.8-</sup></li>
<li><a href="deferred.always.html" title="deferred.always(alwaysCallbacks,[alwaysCallbacks])">def.always(al,[al])</a><sup>1.6+</sup></li>
<li><a href="deferred.notify.html">def.notify(args)</a><sup>1.7+</sup></li>
<li><a href="deferred.notifyWith.html" title="deferred.notifyWith(context,[args])">def.notifyWith(c,[a])</a><sup>1.7+</sup></li>
<li><a href="deferred.progress.html" title="deferred.progress(progressCallbacks)">def.progress(proCal)</a><sup>1.7+</sup></li>
<li><a href="deferred.state.html">def.state()</a><sup>1.7+</sup></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="callbacks.add.html">cal.add(callbacks)</a><sup>1.7+</sup></li>
<li><a href="callbacks.disable.html">cal.disable()</a><sup>1.7+</sup></li>
<li><a href="callbacks.empty.html">cal.empty()</a><sup>1.7+</sup></li>
<li><a href="callbacks.fire.html">cal.fire(arguments)</a><sup>1.7+</sup></li>
<li><a href="callbacks.fired.html">cal.fired()</a><sup>1.7+</sup></li>
<li><a href="callbacks.fireWith.html" title="callbacks.fireWith([context] [, args])">cal.fireWith([c] [,a])</a><sup>1.7+</sup></li>
<li><a href="callbacks.has.html">cal.has(callback)</a><sup>1.7+</sup></li>
<li><a href="callbacks.lock.html">cal.lock()</a><sup>1.7+</sup></li>
<li><a href="callbacks.locked.html">cal.locked()</a><sup>1.7+</sup></li>
<li><a href="callbacks.remove.html">cal.remove(callbacks)</a><sup>1.7+</sup></li>
<li><a href="jQuery.callbacks.html">$.callbacks(flags)</a><sup>1.7+</sup></li>
</ul>
</li>
<li class="has-submenu">
<a class="menu-title" href="javascript:void(0);">
<i class="fa fa-leaf"></i> <span class="nav-label"></span>
</a>
<ul class="sub-menu">
<li><a href="regexp.html"></a></li>
<li><a href="html5.html">HTML5</a></li>
<li><a href="http:
<li><a href="source.html"></a></li>
</ul>
</li>
</ul>
</nav>
</aside> <!-- left aside end -->
<script src="js/jquery-2.1.4.min.js?v=20160719"></script>
<script src="js/jquery.autocomplete.min.js?v=20160719"></script>
<script src="js/jquery.mousewheel.min.js?v=20160719"></script>
<script src="js/jquery.mCustomScrollbar.min.js?v=20160719"></script>
<script src="js/shifone.min.js?v=20160719"></script>
<div class="tongji">
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?<API key>";
var s = document.<API key>("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</div>
</body>
</html>
|
import { IHiveMindNeuron, IHiveMindNeurons } from './HiveMindNeurons';
import { UserInput } from '../../BasicUserInput';
import { RequestContext } from '../../BasicRequestContext';
import { INeuronsResponse, <API key>, <API key> } from './NeuronsResponse';
import { INeuronResponse } from '../../neurons/responses/SimpleResponse';
import { <API key> } from './<API key>';
export class <API key> implements IHiveMindNeurons {
private neurons: IHiveMindNeuron[];
constructor(neurons: IHiveMindNeuron[]) {
this.neurons = neurons;
}
public findMatch(userInput: UserInput,
context: RequestContext,): Promise<INeuronsResponse> {
return new Promise((resolve) => {
let responses: <API key>[] = [];
const neuronResponses: Array<Promise<INeuronResponse>> = [];
for (let i = 0; i < this.neurons.length; i++) {
const neuron = this.neurons[i];
const promiseResponse = neuron.process(userInput, context);
neuronResponses.push(promiseResponse);
promiseResponse.then((response: INeuronResponse) => {
if (response.hasAnswer()) {
responses.push(new <API key>(neuron, response));
}
}).catch(error => {
console.error('FATAL Neuron: ' + neuron + ' rejected...' + error);
});
}
Promise.all(
neuronResponses,
).then((allResolved: INeuronResponse[]) => {
const toResolve = <API key>.createMultiple(responses);
this.placeNeuronsToTop(toResolve.getResponses().map(response => response.getFiredNeuron()));
resolve(toResolve);
}).catch(error => {
console.error('A neuron rejected instead of resolved, ' +
'neurons are never allowed to reject. If this happens ' +
'the neuron either needs to be fixed with error handling to ' +
'make it resolve a Silence() response or the neuron should ' +
'be removed. Error: ' + error);
});
});
}
private placeNeuronsToTop(neurons: IHiveMindNeuron[]) {
// reverse the neurons from highest to lowest -> lowest to highest, so the highest certainty is placed to the top
// last, making it the new top neuron
const neuronsReversed = neurons.concat([]).reverse();
neuronsReversed.forEach(toTop => {
if (this.neurons.indexOf(toTop) > 0) {
this.neurons = this.neurons.filter(neuron => neuron !== toTop);
this.neurons = [toTop].concat(this.neurons);
}
});
}
}
|
require_relative 'spec_helper'
require_relative '../lib/nixonpi/animations/easing'
describe NixonPi::Easing do
before :each do
@object = Object.new
@object.extend(NixonPi::Easing)
end
# @param [Object] x percent complete (0.0 - 1.0)
# @param [Object] t elapsed time ms
# @param [Object] b start value
# @param [Object] c end value
# @param [Object] d total duration in ms
it 'should provide quadratic easing' do
1000.times.with_index do |x|
# percent complete - val - start - end - max
puts @object.ease_in_out_quad(x.to_f, 0.0, 255.0, 1000.0)
end
end
end
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>circuits: Not compatible </title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- 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/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / extra-dev</a></li>
<li class="active"><a href="">8.11.dev / circuits - 8.6.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
circuits
<small>
8.6.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2020-07-27 01:07:00 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-07-27 01:07:00 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-m4 1 Virtual package relying on m4
coq 8.11.dev Formal proof management system
num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/circuits"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Circuits"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: hardware verification" "category: Computer Science/Architecture" ]
authors: [ "Laurent Arditi" ]
bug-reports: "https://github.com/coq-contribs/circuits/issues"
dev-repo: "git+https://github.com/coq-contribs/circuits.git"
synopsis: "Some proofs of hardware (adder, multiplier, memory block instruction)"
description: """
definition and proof of a combinatorial adder, a
sequential multiplier, a memory block instruction"""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/circuits/archive/v8.6.0.tar.gz"
checksum: "md5=<API key>"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install </h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-circuits.8.6.0 coq.8.11.dev</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.dev).
The following dependencies couldn't be met:
- coq-circuits -> coq < 8.7~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-circuits.8.6.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-abel: Not compatible </title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- 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/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.9.0 / mathcomp-abel - 1.0.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
mathcomp-abel
<small>
1.0.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-01-23 18:18:12 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-23 18:18:12 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.9.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Cyril Cohen <cyril.cohen@inria.fr>"
homepage: "https://github.com/math-comp/abel"
dev-repo: "git+https://github.com/math-comp/abel.git"
bug-reports: "https://github.com/math-comp/abel/issues"
license: "CECILL-B"
synopsis: "Abel - Ruffini's theorem"
description: """
This repository contains a proof of Abel - Galois Theorem
(equivalence between being solvable by radicals and having a
solvable Galois group) and Abel - Ruffini Theorem (unsolvability of
quintic equations) in the Coq proof-assistant and using the
Mathematical Components library."""
build: [make "-j%{jobs}%" ]
install: [make "install"]
depends: [
"coq" { (>= "8.10" & < "8.14~") | = "dev" }
"<API key>" { (>= "1.11.0" & < "1.13~") | = "dev" }
"<API key>"
"<API key>"
"<API key>"
"coq-mathcomp-field"
"<API key>" { (>= "1.1.1") | = "dev" }
]
tags: [
"keyword:algebra"
"keyword:Galois"
"keyword:Abel Ruffini"
"keyword:unsolvability of quintincs"
"logpath:Abel"
]
authors: [
"Sophie Bernard"
"Cyril Cohen"
"Assia Mahboubi"
"Pierre-Yves Strub"
]
url {
src: "https://github.com/math-comp/Abel/archive/1.0.0.tar.gz"
checksum: "sha256=<SHA256-like>"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install </h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-mathcomp-abel.1.0.0 coq.8.9.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.9.0).
The following dependencies couldn't be met:
- coq-mathcomp-abel -> coq >= dev
no matching version
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-abel.1.0.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
class LiveBarGraph(object):
def __init__(self, band_names=['delta', 'theta', 'alpha', 'beta'],
ch_names=['TP9', 'AF7', 'AF8', 'TP10']):
self.band_names = band_names
self.ch_names = ch_names
self.n_bars = self.band_names * self.ch_names
self.x =
self.fig, self.ax = plt.subplots()
self.ax.set_ylim((0, 1))
y = np.zeros((self.n_bars,))
x = range(self.n_bars)
self.rects = self.ax.bar(x, y)
def update(self, new_y):
[rect.set_height(y) for rect, y in zip(self.rects, new_y)]
if __name__ == '__main__':
bar = LiveBarGraph()
plt.show()
while True:
bar.update(np.random.random(10))
plt.pause(0.1)
|
#!/usr/bin/env bash
# DETAILS: Invokes rsyncs with well known better options.
# CREATED: 06/29/13 16:14:34 IST
# MODIFIED: 10/24/17 14:36:30 IST
#set -uvx # Warn unset vars as error, Verbose (echo each command), Enable debug mode
# if rsync gives 'command not found' error, it means that non-interactive bash
# shell on server is unable to find rsync binary. So, use --rsync-path option
# to specify exact location of rsync binary on target server.
# To backup more than just home dir, the include file determines what is to be
# backed up now. The new rsync command (now uses in and excludes and "/" as src)
# $RSYNC -va --delete --delete-excluded --exclude-from="$EXCLUDES" \
# --include-from="$INCLUDES" /$SNAPSHOT_RW/home/daily.0;
# Sync ~/scripts on both eng-shell1 and local server (local being mastercopy)
#rsync -avmz -e ssh ~/scripts/ eng-shell1:~/scripts/
# Source .bashrc.dev only if invoked as a sub-shell. Not if sourced.
[[ "$(basename rsync.sh)" == "$(basename -- $0)" && -f $HOME/.bashrc.dev ]] && { source $HOME/.bashrc.dev; }
# contains a wildcard pattern per line of files to exclude. has no entries -- sync everything
RSYNC_EXCLUDE=$CUST_CONFS/rsyncexclude
# common rsync options
# -a - sync all file perms/attributes
# -h - display output in human readable form
# -i - itemize all changes
# -m - prune empty directories (let's keep them)
# -q - not used as -q hides almost every info
# -R - not used as creates confusion. use relative path names
# -u - skip files newer on destination (don't overwrite by fault)
# -v - not used as -v is too verbose
# -W - don't run diff algorithm. algo consumes lot of CPU and unreliable
# -x - don't go outside filesystem boundaries.
# -z - compress data while sync
# -e ssh - always use ssh for authentication
# --force - for if some operation requires special privileges
# --delete - if any file is absent in source, delete it in dest
# --delete-excluded - delete any files that are excluded in RSYNC_EXCLUDE on dest
# --out-format="%i|%n|" - Display itemized changes in this format.
# --safe-links - ignore symlinks that point outside the tree
RSYNC_OPTS="-ahiuWxz -e ssh --stats --force --delete --safe-links --out-format=%i|%n"
RSYNC_OPTS+=" --log-file=$SCRPT_LOGS/rsync.log --exclude-from=$RSYNC_EXCLUDE"
#RSYNC_OPTS+=" --rsync-path=/homes/raviks/tools/bin/freebsd/rsync"
function rsync_dir()
{
[[ "$#" != "2" ]] && (usage; exit $EINVAL)
SRC_DIR=$1
DST_DIR=$2
[[ "" != "$RSYNC_DRY_RUN" ]] && RSYNC_OPTS+=" -n"
echo "[SYNC] src: $SRC_DIR dst: $DST_DIR"
run rsync $RSYNC_OPTS $SRC_DIR $DST_DIR
unset SRC_DIR DST_DIR
}
function rsync_list()
{
[[ "$#" != "3" ]] && (usage; exit $EINVAL)
# Directory paths in $LIST_FILE are included only if specified with a closing slash. Ex. pathx/pathy/pathz/.
#RSYNC_OPTS+=" --files-from=$LIST_FILE" # this option not supported on freeBSD
LIST_FILE=$1; shift;
# If remote location, dont append /. awk also works: awk '{ print substr( $0, length($0) - 1, length($0) ) }'
tmpSrc=$(echo $1 | sed 's/^.*\(.\)$/\1/')
if [ "$tmpSrc" == ":" ] || [ "$tmpSrc" == "/" ]; then SRC="$1"; else SRC="$1/"; fi
tmpDst=$(echo $2 | sed 's/^.*\(.\)$/\1/')
if [ "$tmpDst" == ":" ] || [ "$tmpDst" == "/" ]; then DST="$2"; else DST="$2/"; fi
for dir in $(cat $LIST_FILE); do
rsync_dir $SRC$dir $DST$dir
done
unset LIST_FILE && unset SRC && unset DST && unset tmpSrc && unset tmpDst
}
usage()
{
echo "usage: rsync.sh [-d|-l <list-file>|-n] <src-dir> <dst-dir>"
echo "Options:"
echo " -r - start recursive rsync between given directory pair"
echo " -l <list-file> - do recursive rsync on all files/directores listed in given file"
echo " -n - enable DRY_RUN during rsync. Gives list of changes to be done"
echo "Note: In list-file, dir path names must be terminated with a / or /."
}
# Each shell script has to be independently testable.
# It can then be included in other files for functions.
main()
{
PARSE_OPTS="hl:rn"
local opts_found=0
while getopts ":$PARSE_OPTS" opt; do
case $opt in
[a-zA-Z0-9])
log DEBUG "-$opt was triggered, Parameter: $OPTARG"
local "opt_$opt"=1 && local "optarg_$opt"="$OPTARG"
;;
\?)
echo "Invalid option: -$OPTARG"; usage; exit $EINVAL;
;;
:)
echo "[ERROR] Option -$OPTARG requires an argument";
usage; exit $EINVAL;
;;
esac
shift $((OPTIND-1)) && OPTIND=1 && local opts_found=1;
done
if ((!opts_found)); then
usage && exit $EINVAL;
fi
((opt_n)) && { export RSYNC_DRY_RUN=TRUE; }
((opt_r)) && { rsync_dir $*; }
((opt_l)) && { rsync_list "$optarg_l $*"; }
((opt_h)) && { usage; exit 0; }
exit 0
}
if [ "$(basename -- $0)" == "$(basename rsync.sh)" ]; then
main $*
fi
# VIM: ts=4:sw=4
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<title>Transaction</title>
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Transaction";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-files/index-1.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../nxt/Trade.html" title="class in nxt"><span class="strong">Prev Class</span></a></li>
<li><a href="../nxt/<API key>.html" title="interface in nxt"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?nxt/Transaction.html" target="_top">Frames</a></li>
<li><a href="Transaction.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<div class="subTitle">nxt</div>
<h2 title="Interface Transaction" class="title">Interface Transaction</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd>java.lang.Comparable<<a href="../nxt/Transaction.html" title="interface in nxt">Transaction</a>></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">Transaction</span>
extends java.lang.Comparable<<a href="../nxt/Transaction.html" title="interface in nxt">Transaction</a>></pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="method_summary">
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getAmount()">getAmount</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../nxt/Attachment.html" title="interface in nxt">Attachment</a></code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getAttachment()">getAttachment</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../nxt/Block.html" title="interface in nxt">Block</a></code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getBlock()">getBlock</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getBytes()">getBytes</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getDeadline()">getDeadline</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getExpiration()">getExpiration</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getFee()">getFee</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getHash()">getHash</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getHeight()">getHeight</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Long</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getId()">getId</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.json.simple.JSONObject</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getJSONObject()">getJSONObject</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Long</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getRecipientId()">getRecipientId</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Long</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#<API key>()"><API key></a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Long</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getSenderId()">getSenderId</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getSenderPublicKey()">getSenderPublicKey</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getSignature()">getSignature</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getStringId()">getStringId</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getTimestamp()">getTimestamp</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../nxt/TransactionType.html" title="class in nxt">TransactionType</a></code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#getType()">getType</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../nxt/Transaction.html#sign(java.lang.String)">sign</a></strong>(java.lang.String secretPhrase)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="<API key>.lang.Comparable">
</a>
<h3>Methods inherited from interface java.lang.Comparable</h3>
<code>compareTo</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="method_detail">
</a>
<h3>Method Detail</h3>
<a name="getId()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getId</h4>
<pre>java.lang.Long getId()</pre>
</li>
</ul>
<a name="getStringId()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStringId</h4>
<pre>java.lang.String getStringId()</pre>
</li>
</ul>
<a name="getSenderId()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSenderId</h4>
<pre>java.lang.Long getSenderId()</pre>
</li>
</ul>
<a name="getSenderPublicKey()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSenderPublicKey</h4>
<pre>byte[] getSenderPublicKey()</pre>
</li>
</ul>
<a name="getRecipientId()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRecipientId</h4>
<pre>java.lang.Long getRecipientId()</pre>
</li>
</ul>
<a name="getHeight()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHeight</h4>
<pre>int getHeight()</pre>
</li>
</ul>
<a name="getBlock()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlock</h4>
<pre><a href="../nxt/Block.html" title="interface in nxt">Block</a> getBlock()</pre>
</li>
</ul>
<a name="getTimestamp()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimestamp</h4>
<pre>int getTimestamp()</pre>
</li>
</ul>
<a name="getDeadline()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeadline</h4>
<pre>short getDeadline()</pre>
</li>
</ul>
<a name="getExpiration()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExpiration</h4>
<pre>int getExpiration()</pre>
</li>
</ul>
<a name="getAmount()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAmount</h4>
<pre>int getAmount()</pre>
</li>
</ul>
<a name="getFee()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFee</h4>
<pre>int getFee()</pre>
</li>
</ul>
<a name="<API key>()">
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>java.lang.Long <API key>()</pre>
</li>
</ul>
<a name="getSignature()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSignature</h4>
<pre>byte[] getSignature()</pre>
</li>
</ul>
<a name="getHash()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getHash</h4>
<pre>java.lang.String getHash()</pre>
</li>
</ul>
<a name="getType()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
<pre><a href="../nxt/TransactionType.html" title="class in nxt">TransactionType</a> getType()</pre>
</li>
</ul>
<a name="getAttachment()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttachment</h4>
<pre><a href="../nxt/Attachment.html" title="interface in nxt">Attachment</a> getAttachment()</pre>
</li>
</ul>
<a name="sign(java.lang.String)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>sign</h4>
<pre>void sign(java.lang.String secretPhrase)</pre>
</li>
</ul>
<a name="getJSONObject()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJSONObject</h4>
<pre>org.json.simple.JSONObject getJSONObject()</pre>
</li>
</ul>
<a name="getBytes()">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getBytes</h4>
<pre>byte[] getBytes()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-files/index-1.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../nxt/Trade.html" title="class in nxt"><span class="strong">Prev Class</span></a></li>
<li><a href="../nxt/<API key>.html" title="interface in nxt"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?nxt/Transaction.html" target="_top">Frames</a></li>
<li><a href="Transaction.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
</a></div>
</body>
</html>
|
require 'spec_helper'
describe 'ssh::default' do
let(:chef_run){ ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '12.04').converge(described_recipe) }
it 'should include the ssh::client recipe' do
expect(chef_run).to include_recipe('ssh::client')
end
it 'should include the ssh::server recipe' do
expect(chef_run).to include_recipe('ssh::server')
end
end
|
<?php
namespace Ekyna\Bundle\CartBundle\Provider;
use Ekyna\Bundle\CartBundle\Model\<API key>;
use Ekyna\Bundle\OrderBundle\Entity\OrderRepository;
use Ekyna\Component\Sale\Order\OrderInterface;
use Ekyna\Component\Sale\Order\OrderTypes;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class CartProvider implements <API key>
{
const KEY = 'cart_id';
/**
* @var SessionInterface
*/
protected $session;
/**
* @var OrderRepository
*/
protected $repository;
/**
* @var OrderInterface
*/
protected $cart;
/**
* @var string
*/
protected $key;
/**
* Constructor.
*
* @param SessionInterface $session
* @param OrderRepository $repository
* @param string $key
*/
public function __construct(SessionInterface $session, OrderRepository $repository, $key = self::KEY)
{
$this->session = $session;
$this->repository = $repository;
$this->key = $key;
}
/**
* {@inheritdoc}
*/
public function setCart(OrderInterface $cart)
{
$this->cart = $cart;
$this->cart->setType(OrderTypes::TYPE_CART);
$this->session->set($this->key, $cart->getId());
}
/**
* {@inheritdoc}
*/
public function clearCart()
{
$this->cart = null;
$this->session->set($this->key, null);
}
/**
* {@inheritdoc}
*/
public function hasCart()
{
if (null !== $this->cart) {
return true;
}
if (null !== $cartId = $this->session->get($this->key, null)) {
/** @var \Ekyna\Component\Sale\Order\OrderInterface $cart */
$cart = $this->repository->findOneBy([
'id' => $cartId,
'type' => OrderTypes::TYPE_CART
]);
if (null !== $cart) {
$this->setCart($cart);
return true;
} else {
$this->clearCart();
}
}
return false;
}
/**
* {@inheritdoc}
*/
public function getCart()
{
if (!$this->hasCart()) {
if (null === $this->cart) {
$this->newCart();
}
}
return $this->cart;
}
/**
* Creates a new cart.
*
* @return \Ekyna\Component\Sale\Order\OrderInterface
*/
private function newCart()
{
$this->clearCart();
$this->setCart($this->repository->createNew(OrderTypes::TYPE_CART));
return $this->cart;
}
}
|
<h1><?php echo $titulo_pagina; ?></h1>
<p>Usuários cadastrados no sistema</p>
<p class="alert bg-danger" style="display:none;"><strong>Mensagem!</strong> <span></span></p>
<p><a href="<?php echo base_url().'admin/usuarios/cadastrar'; ?>" class="btn btn-primary">Cadastrar</a></p>
<table class="table table-bordered table-hover table-condensed tablesorter" id="usuarios">
<thead>
<tr>
<th class="header col-md-6">Nome</th>
<th class="header">Email</th>
<th colspan="2" class="txtCenter">Ações</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($usuarios)) {
foreach($usuarios as $key => $value) {
echo '
<tr>
<td>'.$value->nome.'</td>
<td>'.$value->email.'</td>
<td class="col-md-1"><a href="'.base_url().'admin/usuarios/cadastrar/'.$value->id.'" class="btn btn-default" title="Editar"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a></td>
<td class="col-md-1"><a href="'.base_url().'admin/usuarios/excluir/'.$value->id.'" class="btn btn-danger" title="Excluir" onclick="return confirmar_exclusao(\'Usuário\')"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a></td>
</tr>
';
}
} else {
echo '<tr><td colspan="4"><em>Não há Usuários Cadastrados</em></td></tr>';
} ?>
</tbody>
<?php if($total_registros > $itens_por_pagina) { ?>
<tfoot>
<tr>
<td colspan="4"><?php echo $paginador; ?></td>
</tr>
</tfoot>
<?php } ?>
</table>
|
# -*- coding: utf-8 -*-
from modules import Robot
import time
r = Robot.Robot()
state = [0, 1000, 1500]
(run, move, write) = range(3)
i = run
slowdown = 1
flag_A = 0
flag_C = 0
lock = [0, 0, 0, 0]
while(True):
a = r.Read()
for it in range(len(lock)):
if lock[it]:
lock[it] = lock[it] - 1
if a[0]:
flag_A = 0
flag_C = 0
if a[0] == 1 or a[0] == 5 or a[0] == 6:
r.A.run_forever(r.S/slowdown)
elif a[0] == 2 or a[0] == 7 or a[0] == 8:
r.A.run_forever(-r.S/slowdown)
else:
r.A.stop()
if a[0] == 3 or a[0] == 5 or a[0] == 7:
r.C.run_forever(r.S/slowdown)
elif a[0] == 4 or a[0] == 6 or a[0] == 8:
r.C.run_forever(-r.S/slowdown)
else:
r.C.stop()
elif a[1] and not lock[1]: # kontrolka lewa: dyskretna
if a[1] == 1 and i is not run:
r.changestate(state[i]-state[i-1])
i = i-1
time.sleep(0.5) # (state[i]-state[i-1])/r.S
if i is run:
slowdown = 1
elif a[1] == 2 and i is not write:
r.changestate(state[i]-state[i+1])
i = i+1
slowdown = 5
time.sleep(0.5) # (state[i+1]-state[i])/r.S
elif a[1] == 3:
r.B.run_forever(r.S)
elif a[1] == 4:
r.B.run_forever(-r.S)
elif a[1] == 9:
r.B.stop()
else:
pass
elif a[2]: # kontrolka one-klick
if a[2] == 1 or a[2] == 5 or a[2] == 6: # stop na 9 (beacon)
if flag_A == -1:
r.A.stop()
flag_A = 0
lock[0] = 30 # lock = 30
elif not lock[0]:
r.A.run_forever(r.S/slowdown)
flag_A = 1
elif a[2] == 2 or a[2] == 7 or a[2] == 8:
if flag_A == 1:
r.A.stop()
flag_A = 0
lock[1] = 30 # lock = 30
elif not lock[1]:
r.A.run_forever(-r.S/slowdown)
flag_A = -1
if a[2] == 3 or a[2] == 5 or a[2] == 7:
if flag_C == -1:
r.C.stop()
flag_C = 0
lock[2] = 30 # lock = 30
elif not lock[2]:
r.C.run_forever(r.S/slowdown)
flag_C = 1
elif a[2] == 4 or a[2] == 6 or a[2] == 8:
if flag_C == 1:
r.C.stop
flag_C = 0
lock[3] = 30 # lock = 30
elif not lock[3]:
r.C.run_forever(-r.S/slowdown)
flag_C = -1
if a[2] == 9:
r.stop()
flag_A = 0
flag_C = 0
elif a[3]: # alternatywna one-klick
if a[3] == 1: # 1 przycisk - oba silniki
if flag_A == -1 and flag_C == -1:
r.stop()
flag_A = 0
flag_C = 0
lock[0] = 30 # lock = 30
elif not lock[0]:
r.run(r.S/slowdown, r.S/slowdown)
flag_A = 1
flag_C = 1
elif a[3] == 2:
if flag_A == 1 and flag_C == 1:
r.stop()
flag_A = 0
flag_C = 0
lock[1] = 30 # lock = 30
elif not lock[1]:
r.run(-r.S/slowdown, -r.S/slowdown)
flag_A = -1
flag_C = -1
elif a[3] == 3:
if flag_A == 1 and flag_C == -1:
r.stop()
flag_A = 0
flag_C = 0
lock[2] = 30 # lock = 30
elif not lock[2]:
r.run(-r.S/slowdown, r.S/slowdown)
flag_A = -1
flag_C = 1
elif a[3] == 4:
if flag_A == -1 and flag_C == 1:
r.stop()
flag_A = 0
flag_C = 0
lock[3] = 30 # lock = 30
elif not lock[3]:
r.run(r.S/slowdown, -r.S/slowdown)
flag_A = 1
flag_C = -1
elif a[3] == 9:
r.stop()
flag_A = 0
flag_C = 0
else:
if not flag_A:
r.A.stop()
if not flag_C:
r.C.stop()
|
// UIBarButtonItem+initWithImageName.h
// lottowinnersv2
#import <UIKit/UIKit.h>
@interface UIBarButtonItem (initWithImageName)
+ (instancetype)<API key>:(UIImage *)image target:(id)target action:(SEL)action;
+ (instancetype)<API key>:(UIImage *)image title:(NSString *)title target:(id)target action:(SEL)action;
+ (instancetype)<API key>:(UIImage *)image disableImage:(UIImage *)disableImage title:(NSString *)title target:(id)target action:(SEL)action;
@end
|
using System;
using System.Collections.Generic;
using Windows.Foundation.Collections;
using Windows.Media;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using <API key>.Network;
namespace Viewer
{
public sealed partial class Playback : Page
{
private <API key> <API key> = null;
private Connector connector = null;
private Connection connection = null;
public Playback()
{
this.InitializeComponent();
}
private async void bnConnect_Click(object sender, RoutedEventArgs e)
{
ushort port = 0;
if (UInt16.TryParse(this.txPort.Text, out port))
{
if (string.IsNullOrEmpty(this.txAddress.Text))
{
this.txAddress.Text = this.txAddress.PlaceholderText;
}
this.connector = new Connector(this.txAddress.Text, port);
if (this.connector != null)
{
this.connection = await this.connector.ConnectAsync();
if(this.connection != null)
{
this.bnConnect.IsEnabled = false;
this.bnClose.IsEnabled = true;
this.bnStart.IsEnabled = true;
this.bnStop.IsEnabled = false;
this.connection.Disconnected += <API key>;
var propertySet = new PropertySet();
var <API key> = propertySet as IDictionary<string, object>;
propertySet["Connection"] = this.connection;
<API key>(propertySet);
}
}
}
}
private void bnClose_Click(object sender, RoutedEventArgs e)
{
CloseConnection();
}
private void bnStart_Click(object sender, RoutedEventArgs e)
{
StartPlayback();
}
private void bnStop_Click(object sender, RoutedEventArgs e)
{
StopPlayback();
}
private void <API key>(Connection sender)
{
CloseConnection();
}
private void CloseConnection()
{
StopPlayback();
this.bnStart.IsEnabled = false;
this.bnConnect.IsEnabled = true;
this.bnClose.IsEnabled = false;
if (this.connection != null)
{
this.connection.Disconnected -= <API key>;
this.connection.Uninitialize();
this.connection = null;
}
if (this.connector != null)
{
this.connector.Uninitialize();
this.connector = null;
}
}
private void StartPlayback()
{
this.videoPlayer.Source = new Uri(string.Format("mrvc://{0}:{1}", this.txAddress.Text, this.txPort.Text));
this.bnStart.IsEnabled = false;
this.bnStop.IsEnabled = true;
}
private void StopPlayback()
{
this.videoPlayer.Stop();
this.videoPlayer.Source = null;
this.bnStart.IsEnabled = true;
this.bnStop.IsEnabled = false;
}
public void <API key>(PropertySet propertySet)
{
if (this.<API key> == null)
{
this.<API key> = new <API key>();
}
this.<API key>.<API key>("<API key>.Media.MrvcSchemeHandler", "mrvc:", propertySet);
}
}
}
|
<html><body>
<h4>Windows 10 x64 (19042.610)</h4><br>
<h2>_OBJECT_REF_INFO</h2>
<font face="arial"> +0x000 ObjectHeader : Ptr64 <a href="./_OBJECT_HEADER.html">_OBJECT_HEADER</a><br>
+0x008 NextRef : Ptr64 Void<br>
+0x010 ImageFileName : [16] UChar<br>
+0x020 NextPos : Uint2B<br>
+0x022 MaxStacks : Uint2B<br>
+0x024 StackInfo : [0] <a href="./<API key>.html"><API key></a><br>
</font></body></html>
|
#ifndef _SIMPLE_POLYGON_H
#define _SIMPLE_POLYGON_H
#include <vector>
#include <QtOpenGL>
#include "AGVector.h"
#include "Triangulate.h"
#define MAX_DIST 0.1
using std::vector;
class SimplePolygon {
public:
SimplePolygon();
~SimplePolygon();
void DrawPolygon();
void Clear();
void Update(AGVector v, bool remove);
void Update();
bool getTriangulate() {return _triangulate;};
void setTriangulate(bool b) {_triangulate = b;};
bool isColored() {return _color;};
void setColored(bool b) {_color = b;};
private:
vector<AGVector> *vertices;
vector<AGVector *> *triVerts;
int findPoint(AGVector v);
bool threeColor(vector<AGVector *> &tris);
int adjacent(AGVector **tri1, AGVector **tri2);
bool _triangulate;
bool _color;
};
#endif /* _SIMPLE_POLYGON_H */
|
<?php
class ModelTask
{
public $Model;
public $MethodName;
public $Request;
public $ResponseInfo;
public $Response;
public $Headers;
public static function Prepare(&$model, $methodName)
{
$newTask = new self;
$newTask->Model = &$model;
$newTask->MethodName = $methodName;
$newTask->Request = null;
$newTask->ResponseInfo = null;
$newTask->Response = null;
$newTask->Headers = null;
return $newTask;
}
}
|
# -*- coding: utf-8 -*-
from django.db import models
from Corretor.base import CorretorException
from Corretor.base import ExecutorException
from Corretor.base import CompiladorException
from Corretor.base import ComparadorException
from Corretor.base import LockException
from model_utils import Choices
class RetornoCorrecao(models.Model):
"""Um modelo que possui informacoes sobre o retorno da correcao de uma questao(ou questao de avaliacao).
"""
TIPOS = Choices(
(0,'loading',u'Loading'),
(1,'compilacao',u'Compilação'),
(2,'execucao',u'Execução'),
(3,'comparacao',u'Comparação'),
(4,'lock',u'Lock'),
(5,'correto',u'Correto'),
)
tipo = models.SmallIntegerField(u"Tipo",choices=TIPOS, default=TIPOS.loading)
msg = models.TextField(u"Mensagem",blank=True,null=True)
task_id = models.CharField(max_length=350,blank=True,null=True)
class Meta:
verbose_name = u'Retorno Correção'
app_label = 'Corretor'
def __unicode__(self):
return "%s: %s" %(self.TIPOS[self.tipo][1],self.msg)
def altera_dados(self,sucesso=True,erroException=None):
"""
Altera os dados do retorno atual para pegar os dados de erro ou para por a mensagem
que foi com sucesso.
"""
tipo = RetornoCorrecao.TIPOS.correto
correcao_msg = "Correto!"
# print ">>altera_dados"
# print ">>isinstance(erroException,CorretorException)",isinstance(erroException,CorretorException)
if sucesso == True:
# print ">>retorno.successful()"
tipo = RetornoCorrecao.TIPOS.correto
correcao_msg = "Correto!"
elif isinstance(erroException,CorretorException):
# print "erro: %s" % erroException.message
if isinstance(erroException,ExecutorException):
correcao_msg = erroException.message
tipo = RetornoCorrecao.TIPOS.execucao
if isinstance(erroException,CompiladorException):
correcao_msg = erroException.message
tipo = RetornoCorrecao.TIPOS.compilacao
if isinstance(erroException,ComparadorException):
correcao_msg = erroException.message
tipo = RetornoCorrecao.TIPOS.comparacao
if isinstance(erroException,LockException):
correcao_msg = erroException.message
tipo = RetornoCorrecao.TIPOS.lock
self.tipo = tipo
self.msg = correcao_msg
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ur_PK" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ShadowCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>ShadowCoin</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 BlackCoin developers
Copyright © 2014 The ShadowCoin 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>ایڈریس یا لیبل میں ترمیم کرنے پر ڈبل کلک کریں</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>نیا ایڈریس بنائیں</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-46"/>
<source>These are your ShadowCoin 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 ShadowCoin 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 ShadowCoin 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>چٹ</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation> پتہ</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>چٹ کے بغیر</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>پاس فریز داخل کریں</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>نیا پاس فریز</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>نیا پاس فریز دہرائیں</translation>
</message>
<message>
<location 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>بٹوا ان لاک</translation>
</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>خفیہ کشائی کر یںبٹوے کے</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>پاس فریز تبدیل کریں</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation 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>ShadowCoin 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 ShadowCoin</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><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 ShadowCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Modify configuration options for ShadowCoin</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>ShadowCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+178"/>
<source>&About ShadowCoin</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>ShadowCoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to ShadowCoin network</source>
<translation type="unfinished"><numerusform></numerusform><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><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><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><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 ShadowCoin 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><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><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. ShadowCoin 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>رقم</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation> پتہ</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>تاریخ</translation>
</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>چٹ کے بغیر</translation>
</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 ShadowCoin 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>ShadowCoin-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 ShadowCoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start ShadowCoin 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 ShadowCoin 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 ShadowCoin 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 ShadowCoin.</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 ShadowCoin 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 ShadowCoin.</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 ShadowCoin 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 ShadowCoin-Qt help message to get a list with possible ShadowCoin 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>ShadowCoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>ShadowCoin 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 ShadowCoin 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 ShadowCoin 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 SDC</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>بیلنس:</translation>
</message>
<message>
<location line="+16"/>
<source>123.456 SDC</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 ShadowCoin 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 ShadowCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>چٹ کے بغیر</translation>
</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 ShadowCoin 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 ShadowCoin 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 ShadowCoin 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 ShadowCoin 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 ShadowCoin 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><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><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>تاریخ</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation 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><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 510 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>رقم</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-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>تاریخ</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>ٹائپ</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation> پتہ</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>رقم</translation>
</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><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>کو بھیجا</translation>
</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>(N / A)</translation>
</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>تمام</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>آج</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>اس ہفتے</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>اس مہینے</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>پچھلے مہینے</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>اس سال</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>دیگر</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>کو بھیجا</translation>
</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>تاریخ</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>ٹائپ</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>چٹ</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation> پتہ</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>رقم</translation>
</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>ShadowCoin 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 shadowcoind</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: shadowcoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: shadowcoind.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: 32112 or testnet: 22112)</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: 51736 or testnet: 51996)</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 ShadowCoin 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=shadowcoinrpc
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 "ShadowCoin 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>یہ مدد کا پیغام</translation>
</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. ShadowCoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-98"/>
<source>ShadowCoin</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 ShadowCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart ShadowCoin 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>غلط رقم</translation>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation>ناکافی فنڈز</translation>
</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. ShadowCoin 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>نقص</translation>
</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>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.