code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
---|---|---|---|---|---|
class AddVersionToComponents < ActiveRecord::Migration
def change
add_column :components, :version, :float
end
end
| e-nable/LimbForge | db/migrate/20160829013357_add_version_to_components.rb | Ruby | mit | 123 |
package is.hail.expr.ir.functions
import is.hail.annotations.{Region, StagedRegionValueBuilder}
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)))
}
registerWrappedScalaFunction1("reverse", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"reverse")
registerWrappedScalaFunction1("upper", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"upper")
registerWrappedScalaFunction1("lower", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"lower")
registerWrappedScalaFunction1("strip", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass,"strip")
registerWrappedScalaFunction2("contains", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "contains")
registerWrappedScalaFunction2("translate", TString, TDict(TString, TString), TString, {
case (_: Type, _: PType, _: PType) => PCanonicalString()
})(thisClass, "translate")
registerWrappedScalaFunction2("startswith", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "startswith")
registerWrappedScalaFunction2("endswith", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "endswith")
registerWrappedScalaFunction2("regexMatch", TString, TString, TBoolean, {
case (_: Type, _: PType, _: PType) => PBoolean()
})(thisClass, "regexMatch")
registerWrappedScalaFunction2("concat", TString, TString, TString, {
case (_: Type, _: PType, _: PType) => PCanonicalString()
})(thisClass, "concat")
registerWrappedScalaFunction2("split", TString, TString, TArray(TString), {
case (_: Type, _: PType, _: PType) =>
PCanonicalArray(PCanonicalString(true))
})(thisClass, "split")
registerWrappedScalaFunction3("split", TString, TString, TInt32, TArray(TString), {
case (_: Type, _: PType, _: PType, _: PType) =>
PCanonicalArray(PCanonicalString(true))
})(thisClass, "splitLimited")
registerWrappedScalaFunction3("replace", TString, TString, TString, TString, {
case (_: Type, _: PType, _: PType, _: PType) => PCanonicalString()
})(thisClass, "replace")
registerWrappedScalaFunction2("mkString", TSet(TString), TString, TString, {
case (_: Type, _: PType, _: PType) => PCanonicalString()
})(thisClass, "setMkString")
registerWrappedScalaFunction2("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: StagedRegionValueBuilder = new StagedRegionValueBuilder(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)
})
}
}
}
}
registerWrappedScalaFunction1("escapeString", TString, TString, (_: Type, _: PType) => PCanonicalString())(thisClass, "escapeString")
registerWrappedScalaFunction3("strftime", TString, TInt64, TString, TString, {
case(_: Type, _: PType, _: PType, _: PType) => PCanonicalString()
})(thisClass, "strftime")
registerWrappedScalaFunction3("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)))
))
}
}
}
| danking/hail | hail/src/main/scala/is/hail/expr/ir/functions/StringFunctions.scala | Scala | mit | 12,228 |
using GalaSoft.MvvmLight;
namespace Operation.WPF.ViewModels
{
public interface IViewModelFactory
{
T ResolveViewModel<T>() where T : ViewModelBase;
}
} | ElijahReva/operations-research-wpf | Operation.WPF/ViewModels/IViewModelFactory.cs | C# | mit | 181 |
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);
}
}
| GoldenArmor/HostileKingdom | Assets/Turrets/MageTower/Scripts/MageTurret.cs | C# | mit | 4,399 |
import torch
from hypergan.train_hooks.base_train_hook import BaseTrainHook
class NegativeMomentumTrainHook(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]
| 255BITS/HyperGAN | hypergan/train_hooks/negative_momentum_train_hook.py | Python | mit | 887 |
#include "Namespace_Base.h"
#include <co/Coral.h>
#include <co/IComponent.h>
#include <co/IPort.h>
#include <co/IInterface.h>
namespace co {
//------ co.Namespace has a facet named 'namespace', of type co.INamespace ------//
co::IInterface* Namespace_co_INamespace::getInterface()
{
return co::typeOf<co::INamespace>::get();
}
co::IPort* Namespace_co_INamespace::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::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: raiseUnexpectedPortIndex();
}
return res;
}
void Namespace_Base::setServiceAt( co::IPort* receptacle, co::IService* service )
{
checkValidReceptacle( receptacle );
raiseUnexpectedPortIndex();
CORAL_UNUSED( service );
}
} // namespace co
| coral-framework/coral | src/core/generated/Namespace_Base.cpp | C++ | mit | 1,595 |
/*** 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;
});
| M1Reeder/famous-example-server | app/public/sandbox/index/views/ProjectView.js | JavaScript | mit | 599 |
# 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://www.phing.info/): used to run predefined tasks. Installed via Composer into the vendor directory. You
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.
| opentok/OpenTok-PHP-SDK | DEVELOPING.md | Markdown | mit | 3,910 |
<?php
/**
* Go! AOP framework
*
* @copyright Copyright 2013, Lisachenko Alexander <[email protected]>
*
* This source file is subject to the license that is bundled
* with this source code in the file LICENSE.
*/
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;
}
}
| latamautos/goaop | demos/Demo/Example/HumanDemo.php | PHP | mit | 880 |
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
using Migrap.AspNet.Multitenant;
using System;
using System.Collections.Generic;
namespace Migrap.AspNet.Routing {
public class TenantRouteConstraint : IRouteConstraint {
public const string TenantKey = "tenant";
private readonly ISet<string> _tenants = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
private readonly ITenantService _tenantService;
public TenantRouteConstraint(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;
}
}
} | migrap/Migrap.AspNet.Multitenant | src/Migrap.AspNet.Multitenant/Routing/TenantRouteConstraint.cs | C# | mit | 1,080 |
import numpy as np
__author__ = 'David John Gagne <[email protected]>'
def main():
# Contingency Table from Wilks (2011) Table 8.3
table = np.array([[50, 91, 71],
[47, 2364, 170],
[54, 205, 3288]])
mct = MulticlassContingencyTable(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 MulticlassContingencyTable(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 MulticlassContingencyTable(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()
| djgagne/hagelslag | hagelslag/evaluation/MulticlassContingencyTable.py | Python | mit | 2,908 |
.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; }
| eSmelser/SnookR | SnookR/substitutes/static/substitutes/css/custom.css | CSS | mit | 959 |
"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 | swhitf/paladin-core | dist/collections/internal/index.js | JavaScript | mit | 1,324 |
<!-- 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.
-->
| ENCODE-DCC/chip-seq-pipeline | dnanexus/encode_idr/Readme.md | Markdown | mit | 730 |
<span class="S-prose">
{% for item in site.data.testimonials %}{% if forloop.last %}
{% assign testimonial = item[1] %}
<figure class="O-block C-testimonial-highlight">
<blockquote>“{{ testimonial.content }}”</blockquote>
<figcaption class="C-quote-person">
<img class="C-quote-person__avatar" alt="photo of {{ testimonial.name }}" src="{{ testimonial.avatar_url | prepend: site.testimonials_images_path }}">
{{ testimonial.name }}
<span class="C-quote-person__role">
{{ 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> | lmjabreu/lmjabreu.com | _includes/testimonial_highlight.html | HTML | mit | 1,018 |
<?php
/**
* Provides low-level debugging, error and exception functionality
*
* @copyright Copyright (c) 2007-2011 Will Bond, others
* @author Will Bond [wb] <[email protected]>
* @author Will Bond, iMarc LLC [wb-imarc] <[email protected]>
* @author Nick Trew [nt]
* @license http://flourishlib.com/license
*
* @package Flourish
* @link http://flourishlib.com/fCore
*
* @version 1.0.0b20
* @changes 1.0.0b20 Backwards Compatibility Break - Updated ::expose() to not wrap the data in HTML when running via CLI, and instead just append a newline [wb, 2011-02-24]
* @changes 1.0.0b19 Added detection of AIX to ::checkOS() [wb, 2011-01-19]
* @changes 1.0.0b18 Updated ::expose() to be able to accept multiple parameters [wb, 2011-01-10]
* @changes 1.0.0b17 Fixed a bug with ::backtrace() triggering notices when an argument is not UTF-8 [wb, 2010-08-17]
* @changes 1.0.0b16 Added the `$types` and `$regex` parameters to ::startErrorCapture() and the `$regex` parameter to ::stopErrorCapture() [wb, 2010-08-09]
* @changes 1.0.0b15 Added ::startErrorCapture() and ::stopErrorCapture() [wb, 2010-07-05]
* @changes 1.0.0b14 Changed ::enableExceptionHandling() to only call fException::printMessage() when the destination is not `html` and no callback has been defined, added ::configureSMTP() to allow using fSMTP for error and exception emails [wb, 2010-06-04]
* @changes 1.0.0b13 Added the `$backtrace` parameter to ::backtrace() [wb, 2010-03-05]
* @changes 1.0.0b12 Added ::getDebug() to check for the global debugging flag, added more specific BSD checks to ::checkOS() [wb, 2010-03-02]
* @changes 1.0.0b11 Added ::detectOpcodeCache() [nt+wb, 2009-10-06]
* @changes 1.0.0b10 Fixed ::expose() to properly display when output includes non-UTF-8 binary data [wb, 2009-06-29]
* @changes 1.0.0b9 Added ::disableContext() to remove context info for exception/error handling, tweaked output for exceptions/errors [wb, 2009-06-28]
* @changes 1.0.0b8 ::enableErrorHandling() and ::enableExceptionHandling() now accept multiple email addresses, and a much wider range of emails [wb-imarc, 2009-06-01]
* @changes 1.0.0b7 ::backtrace() now properly replaces document root with {doc_root} on Windows [wb, 2009-05-02]
* @changes 1.0.0b6 Fixed a bug with getting the server name for error messages when running on the command line [wb, 2009-03-11]
* @changes 1.0.0b5 Fixed a bug with checking the error/exception destination when a log file is specified [wb, 2009-03-07]
* @changes 1.0.0b4 Backwards compatibility break - ::getOS() and ::getPHPVersion() removed, replaced with ::checkOS() and ::checkVersion() [wb, 2009-02-16]
* @changes 1.0.0b3 ::handleError() now displays what kind of error occured as the heading [wb, 2009-02-15]
* @changes 1.0.0b2 Added ::registerDebugCallback() [wb, 2009-02-07]
* @changes 1.0.0b The initial implementation [wb, 2007-09-25]
*/
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 enableDynamicConstants = 'fCore::enableDynamicConstants';
const enableErrorHandling = 'fCore::enableErrorHandling';
const enableExceptionHandling = 'fCore::enableExceptionHandling';
const expose = 'fCore::expose';
const getDebug = 'fCore::getDebug';
const handleError = 'fCore::handleError';
const handleException = 'fCore::handleException';
const registerDebugCallback = 'fCore::registerDebugCallback';
const reset = 'fCore::reset';
const sendMessagesOnShutdown = 'fCore::sendMessagesOnShutdown';
const startErrorCapture = 'fCore::startErrorCapture';
const stopErrorCapture = 'fCore::stopErrorCapture';
/**
* A regex to match errors to capture
*
* @var string
*/
static private $captured_error_regex = NULL;
/**
* The previous error handler
*
* @var callback
*/
static private $captured_errors_previous_handler = NULL;
/**
* The types of errors to capture
*
* @var integer
*/
static private $captured_error_types = 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 $exception_destination = 'html';
/**
* Exception handler callback
*
* @var mixed
*/
static private $exception_handler_callback = NULL;
/**
* Exception handler callback parameters
*
* @var array
*/
static private $exception_handler_parameters = 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;
/**
* Creates a nicely formatted backtrace to the the point where this method is called
*
* @param integer $remove_lines The number of trailing lines to remove from the backtrace
* @param array $backtrace A backtrace from [http://php.net/backtrace `debug_backtrace()`] to format - this is not usually required or desired
* @return string The formatted backtrace
*/
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;
}
/**
* Performs a [http://php.net/call_user_func call_user_func()], while translating PHP 5.2 static callback syntax for PHP 5.1 and 5.0
*
* Parameters can be passed either as a single array of parameters or as
* multiple parameters.
*
* {{{
* #!php
* // Passing multiple parameters in a normal fashion
* fCore::call('Class::method', TRUE, 0, 'test');
*
* // Passing multiple parameters in a parameters array
* fCore::call('Class::method', array(TRUE, 0, 'test'));
* }}}
*
* To pass parameters by reference they must be assigned to an
* array by reference and the function/method being called must accept those
* parameters by reference. If either condition is not met, the parameter
* will be passed by value.
*
* {{{
* #!php
* // Passing parameters by reference
* fCore::call('Class::method', array(&$var1, &$var2));
* }}}
*
* @param callback $callback The function or method to call
* @param array $parameters The parameters to pass to the function/method
* @return mixed The return value of the called function/method
*/
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 call_user_func_array($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 fProgrammerException(
'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 fEnvironmentException('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 call_user_func_array(
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);
}
}
}
/**
* Detects if a PHP opcode cache is installed
*
* The following opcode caches are currently detected:
*
* - [http://pecl.php.net/package/APC APC]
* - [http://eaccelerator.net eAccelerator]
* - [http://www.nusphere.com/products/phpexpress.htm Nusphere PhpExpress]
* - [http://turck-mmcache.sourceforge.net/index_old.html Turck MMCache]
* - [http://xcache.lighttpd.net XCache]
* - [http://www.zend.com/en/products/server/ Zend Server (Optimizer+)]
* - [http://www.zend.com/en/products/platform/ Zend Platform (Code Acceleration)]
*
* @return boolean If a PHP opcode cache is loaded
*/
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;
}
/**
* Creates a string representation of any variable using predefined strings for booleans, `NULL` and empty strings
*
* The string output format of this method is very similar to the output of
* [http://php.net/print_r print_r()] except that the following values
* are represented as special strings:
*
* - `TRUE`: `'{true}'`
* - `FALSE`: `'{false}'`
* - `NULL`: `'{null}'`
* - `''`: `'{empty_string}'`
*
* @param mixed $data The value to dump
* @return string The string representation of the value
*/
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;
}
/**
* Turns on a feature where undefined constants are automatically created with the string value equivalent to the name
*
* This functionality only works if ::enableErrorHandling() has been
* called first. This functionality may have a very slight performance
* impact since a `E_STRICT` error message must be captured and then a
* call to [http://php.net/define define()] is made.
*
* @return void
*/
static public function enableDynamicConstants()
{
if (!self::$handles_errors) {
throw new fProgrammerException(
'Dynamic constants can not be enabled unless error handling has been enabled via %s',
__CLASS__ . '::enableErrorHandling()'
);
}
self::$dynamic_constants = TRUE;
}
/**
* Turns on developer-friendly error handling that includes context information including a backtrace and superglobal dumps
*
* All errors that match the current
* [http://php.net/error_reporting error_reporting()] level will be
* redirected to the destination and will include a full backtrace. In
* addition, dumps of the following superglobals will be made 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 both error and
* [enableExceptionHandling() exception handling] are set to the same
* email address, the email will contain both errors and exceptions.
*
* @param string $destination The destination for the errors and context information - an email address, a file path or the string `'html'`
* @return void
*/
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 enableExceptionHandling($destination, $closing_code=NULL, $parameters=array())
{
if (!self::checkDestination($destination)) {
return;
}
self::$handles_exceptions = TRUE;
self::$exception_destination = $destination;
self::$exception_handler_callback = $closing_code;
if (!is_object($parameters)) {
settype($parameters, 'array');
} else {
$parameters = array($parameters);
}
self::$exception_handler_parameters = $parameters;
set_exception_handler(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::$captured_error_types & $error_number);
$string_to_capture = !self::$captured_error_regex || (self::$captured_error_regex && preg_match(self::$captured_error_regex, $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::$captured_errors_previous_handler != array('fCore', 'handleError')) {
if (self::$captured_errors_previous_handler === NULL) {
return FALSE;
}
return call_user_func(self::$captured_errors_previous_handler, $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::sendMessageToDestination('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::sendMessageToDestination('exception', $info_block);
if (self::$exception_handler_callback === NULL) {
if (self::$exception_destination != 'html' && $exception instanceof fException) {
$exception->printMessage();
}
return;
}
try {
self::call(self::$exception_handler_callback, self::$exception_handler_parameters);
} catch (Exception $e) {
trigger_error(
self::compose(
'An exception was thrown in the %s closing code callback',
'setExceptionHandling()'
),
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 registerDebugCallback($callback)
{
self::$debug_callback = self::callback($callback);
}
/**
* Resets the configuration of the class
*
* @internal
*
* @return void
*/
static public function reset()
{
if (self::$handles_errors) {
restore_error_handler();
}
if (self::$handles_exceptions) {
restore_exception_handler();
}
if (is_array(self::$captured_errors)) {
restore_error_handler();
}
self::$captured_error_regex = NULL;
self::$captured_errors_previous_handler = NULL;
self::$captured_error_types = 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::$exception_destination = 'html';
self::$exception_handler_callback = NULL;
self::$exception_handler_parameters = 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 sendMessagesOnShutdown()
{
$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::$exception_destination])) {
$messages[self::$exception_destination] .= "\n\n";
} else {
$messages[self::$exception_destination] = '';
}
$messages[self::$exception_destination] .= 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 sendMessageToDestination($type, $message)
{
$destination = ($type == 'exception') ? self::$exception_destination : 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) {
register_shutdown_function(self::callback(self::sendMessagesOnShutdown));
$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::$captured_error_types = $types;
self::$captured_errors = array();
self::$captured_errors_previous_handler = set_error_handler(self::callback(self::handleError));
self::$captured_error_regex = $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::$captured_error_regex = NULL;
self::$captured_errors_previous_handler = NULL;
self::$captured_error_types = NULL;
self::$captured_errors = NULL;
restore_error_handler();
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() { }
}
/**
* Copyright (c) 2007-2011 Will Bond <[email protected]>, others
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/ | mkrause/roy | _example/thirdparty/flourish/fCore.php | PHP | mit | 39,704 |
// Copyright (c) 2014 blinkbox Entertainment Limited. All rights reserved.
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 ForceLoadContentObserver 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 ForceLoadContentObserver();
}
/**
* Creates a fully-specified LibraryLoader.
*/
public LibraryLoader(Context context, List<Query> queryList) {
super(context);
mObserver = new ForceLoadContentObserver();
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();
// registerContentObserver(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 registerContentObserver(Cursor cursor, ContentObserver observer) {
cursor.registerContentObserver(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;
}
}
| blinkboxbooks/android-app | app/src/main/java/com/blinkboxbooks/android/list/LibraryLoader.java | Java | mit | 5,766 |
# React
Implement a basic reactive system.
Reactive programming is a programming paradigm that focuses on how values
are computed in terms of each other to allow a change to one value to
automatically propagate to other values, like in a spreadsheet.
Implement a basic reactive system with cells with settable values ("input"
cells) and cells with values computed in terms of other cells ("compute"
cells). Implement updates so that when an input value is changed, values
propagate to reach a new stable system state.
In addition, compute cells should allow for registering change notification
callbacks. Call a cell’s callbacks when the cell’s value in a new stable
state has changed from the previous stable state.
## Rust Installation
Refer to the [exercism help page][help-page] for Rust installation and learning
resources.
## Writing the Code
Execute the tests with:
```bash
$ cargo test
```
All but the first test have been ignored. After you get the first test to
pass, remove the ignore flag (`#[ignore]`) from the next test and get the tests
to pass again. The test file is located in the `tests` directory. You can
also remove the ignore flag from all the tests to get them to run all at once
if you wish.
Make sure to read the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html) chapter if you
haven't already, it will help you with organizing your files.
## Feedback, Issues, Pull Requests
The [exercism/rust](https://github.com/exercism/rust) repository on GitHub is the home for all of the Rust exercises. If you have feedback about an exercise, or want to help implement new exercises, head over there and create an issue. Members of the [rust track team](https://github.com/orgs/exercism/teams/rust) are happy to help!
If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md).
[help-page]: http://exercism.io/languages/rust
[modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html
[cargo]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
| sacherjj/rust | exercises/react/README.md | Markdown | mit | 2,305 |
<?php
return array (
'id' => 'samsung_d500_ver1_sub6226',
'fallback' => 'samsung_d500_ver1',
'capabilities' =>
array (
'max_data_rate' => '40',
),
);
| cuckata23/wurfl-data | data/samsung_d500_ver1_sub6226.php | PHP | mit | 165 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-multinomials: 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 / mathcomp-multinomials - 1.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
mathcomp-multinomials
<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: "[email protected]"
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"}
"coq-mathcomp-ssreflect" {>= "1.6" & < "1.8.0~"}
"coq-mathcomp-algebra" {>= "1.6" & < "1.8.0~"}
"coq-mathcomp-bigenough" {>= "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=e22b275b1687878d2bdc9b6922d9fde5"
}
</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-multinomials.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:
- coq-mathcomp-multinomials -> coq-mathcomp-finmap < 1.1.0~ -> coq-mathcomp-ssreflect < 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 coq-mathcomp-multinomials.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</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>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.05.0-2.0.1/released/8.13.2/mathcomp-multinomials/1.1.html | HTML | mit | 7,619 |
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(PerformanceLogAspect))]
public class ContentService : IContentService
{
private readonly IStorageArea area;
private readonly IStorageIndexManager manager;
private readonly IPipelines pipelines;
private readonly IContentMergeService merger;
public IStorageArea StorageArea => area;
public ContentService(IStorageArea area,
IStorageIndexManager 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);
}
}
} | dotJEM/web-host | src/DotJEM.Web.Host/Providers/Services/ContentService.cs | C# | mit | 7,585 |
package com.gdgand.rxjava.rxjavasample.hotandcold;
import android.app.Application;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.ApplicationComponent;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.DaggerApplicationComponent;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.module.ApplicationModule;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.module.DataModule;
public class SampleApplication extends Application {
private ApplicationComponent applicationComponent;
@Override
public void onCreate() {
super.onCreate();
applicationComponent = createComponent();
}
private ApplicationComponent createComponent() {
return DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this))
.dataModule(new DataModule())
.build();
}
public ApplicationComponent getApplicationComponent() {
return applicationComponent;
}
}
| gdgand/android-rxjava | 2016-06-15_hot_and_cold/app/src/main/java/com/gdgand/rxjava/rxjavasample/hotandcold/SampleApplication.java | Java | mit | 911 |
'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.compileStandardWrapper(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)
}
| Yann-Liang/browser-solidity | src/app/compiler/compiler-worker.js | JavaScript | mit | 1,202 |
/* 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.configureTestingModule({
declarations: [ SettingsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SettingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
| radiium/turntable | src/app/settings-panel/settings/settings.component.spec.ts | TypeScript | mit | 772 |
//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);
});
| rpelger/books-app-mean | app.js | JavaScript | mit | 1,664 |
[instagram-private-api](../../README.md) / [index](../../modules/index.md) / DirectInboxFeedResponseInbox
# Interface: DirectInboxFeedResponseInbox
[index](../../modules/index.md).DirectInboxFeedResponseInbox
## Table of contents
### Properties
- [blended\_inbox\_enabled](DirectInboxFeedResponseInbox.md#blended_inbox_enabled)
- [has\_older](DirectInboxFeedResponseInbox.md#has_older)
- [oldest\_cursor](DirectInboxFeedResponseInbox.md#oldest_cursor)
- [threads](DirectInboxFeedResponseInbox.md#threads)
- [unseen\_count](DirectInboxFeedResponseInbox.md#unseen_count)
- [unseen\_count\_ts](DirectInboxFeedResponseInbox.md#unseen_count_ts)
## Properties
### blended\_inbox\_enabled
• **blended\_inbox\_enabled**: `boolean`
#### Defined in
[src/responses/direct-inbox.feed.response.ts:15](https://github.com/Nerixyz/instagram-private-api/blob/0e0721c/src/responses/direct-inbox.feed.response.ts#L15)
___
### has\_older
• **has\_older**: `boolean`
#### Defined in
[src/responses/direct-inbox.feed.response.ts:11](https://github.com/Nerixyz/instagram-private-api/blob/0e0721c/src/responses/direct-inbox.feed.response.ts#L11)
___
### oldest\_cursor
• **oldest\_cursor**: `string`
#### Defined in
[src/responses/direct-inbox.feed.response.ts:14](https://github.com/Nerixyz/instagram-private-api/blob/0e0721c/src/responses/direct-inbox.feed.response.ts#L14)
___
### threads
• **threads**: [`DirectInboxFeedResponseThreadsItem`](../../classes/index/DirectInboxFeedResponseThreadsItem.md)[]
#### Defined in
[src/responses/direct-inbox.feed.response.ts:10](https://github.com/Nerixyz/instagram-private-api/blob/0e0721c/src/responses/direct-inbox.feed.response.ts#L10)
___
### unseen\_count
• **unseen\_count**: `number`
#### Defined in
[src/responses/direct-inbox.feed.response.ts:12](https://github.com/Nerixyz/instagram-private-api/blob/0e0721c/src/responses/direct-inbox.feed.response.ts#L12)
___
### unseen\_count\_ts
• **unseen\_count\_ts**: `string`
#### Defined in
[src/responses/direct-inbox.feed.response.ts:13](https://github.com/Nerixyz/instagram-private-api/blob/0e0721c/src/responses/direct-inbox.feed.response.ts#L13)
| huttarichard/instagram-private-api | docs/interfaces/index/DirectInboxFeedResponseInbox.md | Markdown | mit | 2,170 |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(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 ConversationHeaderComponent = (function () {
function ConversationHeaderComponent() {
}
ConversationHeaderComponent.prototype.ngOnInit = function () {
};
__decorate([
core_1.Input(),
__metadata('design:type', Object)
], ConversationHeaderComponent.prototype, "conversationDetailItem", void 0);
ConversationHeaderComponent = __decorate([
core_1.Component({
selector: 'ngm-conversation-header',
styleUrls: ['./conversation-header.component.scss'],
templateUrl: './conversation-header.component.html'
}),
__metadata('design:paramtypes', [])
], ConversationHeaderComponent);
return ConversationHeaderComponent;
}());
exports.ConversationHeaderComponent = ConversationHeaderComponent;
//# sourceMappingURL=conversation-header.component.js.map | DREEBIT/ng-messenger | src/components/conversation-header/conversation-header.component.js | JavaScript | mit | 1,657 |
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);
});
});
| danielireson/formplug-serverless | src/error/HttpError.spec.js | JavaScript | mit | 343 |
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);
}
}
} | yosplz/neoman | src/lib/input-managers/custom/custom-input-manager.ts | TypeScript | mit | 928 |
<?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>
| 50thomatoes50/simple-photos-contest | install/upgrade.php | PHP | mit | 3,262 |
<html><body>
<h4>Windows 10 x64 (18362.329)</h4><br>
<h2>_PS_CLIENT_SECURITY_CONTEXT</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> | epikcraw/ggool | public/Windows 10 x64 (18362.329)/_PS_CLIENT_SECURITY_CONTEXT.html | HTML | mit | 319 |
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);
}
}
| blitz-io/blitz-java | src/main/java/io/blitz/curl/exception/ValidationException.java | Java | mit | 473 |
<html><body>
<h4>Windows 10 x64 (19041.508)</h4><br>
<h2>_RTL_FEATURE_CONFIGURATION_PRIORITY</h2>
<font face="arial"> FeatureConfigurationPriorityAll = 0n0<br>
FeatureConfigurationPriorityService = 0n4<br>
FeatureConfigurationPriorityUser = 0n8<br>
FeatureConfigurationPriorityTest = 0n12<br>
FeatureConfigurationPriorityMax = 0n15<br>
</font></body></html> | epikcraw/ggool | public/Windows 10 x64 (19041.508)/_RTL_FEATURE_CONFIGURATION_PRIORITY.html | HTML | mit | 379 |
/**
* jQuery object.
* @external jQuery
* @see {@link http://api.jquery.com/jQuery/}
*/
/**
* The jQuery plugin namespace.
* @external "jQuery.fn"
* @see {@link http://docs.jquery.com/Plugins/Authoring The jQuery Plugin Guide}
*/
/**
* 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 vulcanup-input__hidden');
$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('vulcanup_isimagecontain');
}
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('fileuploadprocessfail', 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('fileuploadprogressall', 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 };
| vulcan-estudios/vulcanup | src/js/vulcanup.js | JavaScript | mit | 7,069 |
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()
})
| nlp-compromise/compromise | tests/match/min-max.test.js | JavaScript | mit | 888 |
# encoding: utf-8
require 'webmock/rspec'
require 'vcr'
require_relative '../lib/spotifiery'
VCR.configure do |config|
config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
config.hook_into :webmock
end
| cicloon/spotifiery | spec/spec_helper.rb | Ruby | mit | 218 |
class Tweet < ActiveRecord::Base
# Remember to create a migration!
belongs_to :user
end
| WoodhamsBD/lil_twitter | app/models/tweet.rb | Ruby | mit | 93 |
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.RetrieveHoleLocation();
objStructuralFrame.DeleteHoleLocation();
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
OleMessageFilter.Revoke();
}
}
} | SolidEdgeCommunity/docs | docfx_project/snippets/SolidEdgeAssembly.StructuralFrame.DeleteHoleLocation.cs | C# | mit | 1,219 |
#!/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
| bsm/flood | qfy/testdata/generate.rb | Ruby | mit | 1,184 |
#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](/business_intelligence), [Business models](/business_models), [Cross-selling](/cross-selling)
| tgquintela/temporal_tasks | Notes_md/upselling.md | Markdown | mit | 882 |
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;
/**
* Created by lht-Mac on 2017/7/11.
*/
public class PhotoShotRecyclerView extends RecyclerView {
View mDispatchToView;
public PhotoShotRecyclerView(Context context) {
super(context);
init();
}
public PhotoShotRecyclerView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init();
}
private void init() {
setOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
switch (newState) {
case RecyclerView.SCROLL_STATE_SETTLING:
Glide.with(getContext()).pauseRequests();
break;
case RecyclerView.SCROLL_STATE_DRAGGING:
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);
}
}
| LiuHongtao/Dot | app/src/main/java/com/lht/dot/ui/view/PhotoShotRecyclerView.java | Java | mit | 1,901 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GPS.SimpleMVC.Views;
namespace GPS.SimpleMVC.Tests.ControllerImplementations
{
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();
}
}
| gatewayprogrammingschool/SimpleMVC | tests/GPS.SimpleMVCTests/Controllers/ITestView.cs | C# | mit | 507 |
/**
* @license
* Copyright 2020 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
// We explicitly import the modular kernels so they get registered in the
// global registry when we compile the library. A modular build would replace
// the contents of this file and import only the kernels that are needed.
import {KernelConfig, registerKernel} from '../../kernel_registry';
import {nonMaxSuppressionV5Config} from './kernels/NonMaxSuppressionV5';
import {squareConfig} from './kernels/Square';
import {squaredDifferenceConfig} from './kernels/SquaredDifference';
// List all kernel configs here
const kernelConfigs: KernelConfig[] = [
nonMaxSuppressionV5Config,
squareConfig,
squaredDifferenceConfig,
];
for (const kernelConfig of kernelConfigs) {
registerKernel(kernelConfig);
}
| ManakCP/NestJs | node_modules/@tensorflow/tfjs-core/src/backends/cpu/register_all_kernels.ts | TypeScript | mit | 1,414 |
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;
| arnellebalane/matrix.js | source/matrix.ones.js | JavaScript | mit | 455 |
<?php
namespace LolApi\Classes\TournamentProvider;
/**
* TournamentCodeParameters
*
* @author Javier
*/
class TournamentCodeParameters {
// ~ maptype ~
const MAPTYPE_SUMMONERS_RIFT='SUMMONERS_RIFT';
const MAPTYPE_TWISTED_TREELINE='TWISTED_TREELINE';
const MAPTYPE_HOWLING_ABYSS='HOWLING_ABYSS';
// ~ pickType ~
const PICKTYPE_BLIND_PICK='BLIND_PICK';
const PICKTYPE_DRAFT_MODE='DRAFT_MODE';
const PICKTYPE_ALL_RANDOM='ALL_RANDOM';
const PICKTYPE_TOURNAMENT_DRAFT='TOURNAMENT_DRAFT';
// ~ SPECTATORTYPE ~
const SPECTATORTYPE_NONE='NONE';
const SPECTATORTYPE_LOBBYONLY='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;
}
}
| javierglch/HexaniaBlogSymfony | src/LolApi/Classes/TournamentProvider/TournamentCodeParameters.php | PHP | mit | 2,170 |
<!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> | leinadpb/Fisica | public/test3.html | HTML | mit | 1,205 |
/*
* The MIT License
*
* Copyright 2015 Adam Kowalewski.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
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", referencedColumnName = "id", nullable = false)
@ManyToOne(optional = false)
private OpwUser opwUserId;
@JoinColumn(name = "opw_wynik_id", referencedColumnName = "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;
}
}
| OtwartaPlatformaWyborcza/OPW-backend-JavaEE | opw/src/main/java/com/adamkowalewski/opw/entity/OpwLink.java | Java | mit | 5,602 |
<?php
namespace MF\QueryBuilderComposer;
use Doctrine\ORM\QueryBuilder;
interface Modifier
{
public function __invoke(QueryBuilder $queryBuilder): QueryBuilder;
}
| MortalFlesh/php-query-builder-composer | src/Modifier.php | PHP | mit | 170 |
package backup
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// 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"
)
// ProtectionPolicyOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service
type ProtectionPolicyOperationStatusesClient struct {
BaseClient
}
// NewProtectionPolicyOperationStatusesClient creates an instance of the ProtectionPolicyOperationStatusesClient
// client.
func NewProtectionPolicyOperationStatusesClient(subscriptionID string) ProtectionPolicyOperationStatusesClient {
return NewProtectionPolicyOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the
// ProtectionPolicyOperationStatusesClient 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 NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient {
return ProtectionPolicyOperationStatusesClient{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 ProtectionPolicyOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result OperationStatus, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyOperationStatusesClient.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.ProtectionPolicyOperationStatusesClient", "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.ProtectionPolicyOperationStatusesClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationStatusesClient", "Get", resp, "Failure responding to request")
return
}
return
}
// GetPreparer prepares the Get request.
func (client ProtectionPolicyOperationStatusesClient) 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 ProtectionPolicyOperationStatusesClient) GetSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client ProtectionPolicyOperationStatusesClient) GetResponder(resp *http.Response) (result OperationStatus, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
| Azure/azure-sdk-for-go | services/recoveryservices/mgmt/2021-12-01/backup/protectionpolicyoperationstatuses.go | GO | mit | 5,253 |
package servicebus
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// 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 NewQueuesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewQueuesClientWithBaseURI 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 NewQueuesClientWithBaseURI(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.CreateOrUpdatePreparer(ctx, resourceGroupName, namespaceName, queueName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
resp, err := client.CreateOrUpdateSender(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.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdate", resp, "Failure responding to request")
return
}
return
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client QueuesClient) CreateOrUpdatePreparer(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))
}
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client QueuesClient) CreateOrUpdateResponder(resp *http.Response) (result SBQueue, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// CreateOrUpdateAuthorizationRule 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.
// authorizationRuleName - the authorization rule name.
// parameters - the shared access authorization rule.
func (client QueuesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SBAuthorizationRule) (result SBAuthorizationRule, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.CreateOrUpdateAuthorizationRule")
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: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.SBAuthorizationRuleProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.SBAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "CreateOrUpdateAuthorizationRule", err.Error())
}
req, err := client.CreateOrUpdateAuthorizationRulePreparer(ctx, resourceGroupName, namespaceName, queueName, authorizationRuleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdateAuthorizationRule", nil, "Failure preparing request")
return
}
resp, err := client.CreateOrUpdateAuthorizationRuleSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdateAuthorizationRule", resp, "Failure sending request")
return
}
result, err = client.CreateOrUpdateAuthorizationRuleResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "CreateOrUpdateAuthorizationRule", resp, "Failure responding to request")
return
}
return
}
// CreateOrUpdateAuthorizationRulePreparer prepares the CreateOrUpdateAuthorizationRule request.
func (client QueuesClient) CreateOrUpdateAuthorizationRulePreparer(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SBAuthorizationRule) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"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/{authorizationRuleName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// CreateOrUpdateAuthorizationRuleSender sends the CreateOrUpdateAuthorizationRule request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) CreateOrUpdateAuthorizationRuleSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always
// closes the http.Response Body.
func (client QueuesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(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.DoRetryWithRegistration(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.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// DeleteAuthorizationRule deletes a queue authorization rule.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// namespaceName - the namespace name
// queueName - the queue name.
// authorizationRuleName - the authorization rule name.
func (client QueuesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result autorest.Response, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.DeleteAuthorizationRule")
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: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "DeleteAuthorizationRule", err.Error())
}
req, err := client.DeleteAuthorizationRulePreparer(ctx, resourceGroupName, namespaceName, queueName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "DeleteAuthorizationRule", nil, "Failure preparing request")
return
}
resp, err := client.DeleteAuthorizationRuleSender(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "DeleteAuthorizationRule", resp, "Failure sending request")
return
}
result, err = client.DeleteAuthorizationRuleResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "DeleteAuthorizationRule", resp, "Failure responding to request")
return
}
return
}
// DeleteAuthorizationRulePreparer prepares the DeleteAuthorizationRule request.
func (client QueuesClient) DeleteAuthorizationRulePreparer(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"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/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// DeleteAuthorizationRuleSender sends the DeleteAuthorizationRule request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) DeleteAuthorizationRuleSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// DeleteAuthorizationRuleResponder handles the response to the DeleteAuthorizationRule request. The method always
// closes the http.Response Body.
func (client QueuesClient) DeleteAuthorizationRuleResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(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.DoRetryWithRegistration(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.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// GetAuthorizationRule 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.
// authorizationRuleName - the authorization rule name.
func (client QueuesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result SBAuthorizationRule, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.GetAuthorizationRule")
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: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "GetAuthorizationRule", err.Error())
}
req, err := client.GetAuthorizationRulePreparer(ctx, resourceGroupName, namespaceName, queueName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "GetAuthorizationRule", nil, "Failure preparing request")
return
}
resp, err := client.GetAuthorizationRuleSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "GetAuthorizationRule", resp, "Failure sending request")
return
}
result, err = client.GetAuthorizationRuleResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "GetAuthorizationRule", resp, "Failure responding to request")
return
}
return
}
// GetAuthorizationRulePreparer prepares the GetAuthorizationRule request.
func (client QueuesClient) GetAuthorizationRulePreparer(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"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/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// GetAuthorizationRuleSender sends the GetAuthorizationRule request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) GetAuthorizationRuleSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always
// closes the http.Response Body.
func (client QueuesClient) GetAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListAuthorizationRules 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) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result SBAuthorizationRuleListResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.ListAuthorizationRules")
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", "ListAuthorizationRules", err.Error())
}
result.fn = client.listAuthorizationRulesNextResults
req, err := client.ListAuthorizationRulesPreparer(ctx, resourceGroupName, namespaceName, queueName)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAuthorizationRules", nil, "Failure preparing request")
return
}
resp, err := client.ListAuthorizationRulesSender(req)
if err != nil {
result.sarlr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAuthorizationRules", resp, "Failure sending request")
return
}
result.sarlr, err = client.ListAuthorizationRulesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAuthorizationRules", resp, "Failure responding to request")
return
}
if result.sarlr.hasNextLink() && result.sarlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
}
// ListAuthorizationRulesPreparer prepares the ListAuthorizationRules request.
func (client QueuesClient) ListAuthorizationRulesPreparer(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))
}
// ListAuthorizationRulesSender sends the ListAuthorizationRules request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) ListAuthorizationRulesSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always
// closes the http.Response Body.
func (client QueuesClient) ListAuthorizationRulesResponder(resp *http.Response) (result SBAuthorizationRuleListResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listAuthorizationRulesNextResults retrieves the next set of results, if any.
func (client QueuesClient) listAuthorizationRulesNextResults(ctx context.Context, lastResults SBAuthorizationRuleListResult) (result SBAuthorizationRuleListResult, err error) {
req, err := lastResults.sBAuthorizationRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "listAuthorizationRulesNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListAuthorizationRulesSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "listAuthorizationRulesNextResults", resp, "Failure sending next results request")
}
result, err = client.ListAuthorizationRulesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "listAuthorizationRulesNextResults", resp, "Failure responding to next results request")
}
return
}
// ListAuthorizationRulesComplete enumerates all values, automatically crossing page boundaries as required.
func (client QueuesClient) ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, queueName string) (result SBAuthorizationRuleListResultIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/QueuesClient.ListAuthorizationRules")
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.ListAuthorizationRules(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 SBQueueListResultPage, 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.listByNamespaceNextResults
req, err := client.ListByNamespacePreparer(ctx, resourceGroupName, namespaceName, skip, top)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", nil, "Failure preparing request")
return
}
resp, err := client.ListByNamespaceSender(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.ListByNamespaceResponder(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
}
// ListByNamespacePreparer prepares the ListByNamespace request.
func (client QueuesClient) ListByNamespacePreparer(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))
}
// ListByNamespaceSender sends the ListByNamespace request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByNamespaceResponder handles the response to the ListByNamespace request. The method always
// closes the http.Response Body.
func (client QueuesClient) ListByNamespaceResponder(resp *http.Response) (result SBQueueListResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listByNamespaceNextResults retrieves the next set of results, if any.
func (client QueuesClient) listByNamespaceNextResults(ctx context.Context, lastResults SBQueueListResult) (result SBQueueListResult, err error) {
req, err := lastResults.sBQueueListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "listByNamespaceNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListByNamespaceSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "listByNamespaceNextResults", resp, "Failure sending next results request")
}
result, err = client.ListByNamespaceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "listByNamespaceNextResults", resp, "Failure responding to next results request")
}
return
}
// ListByNamespaceComplete enumerates all values, automatically crossing page boundaries as required.
func (client QueuesClient) ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result SBQueueListResultIterator, 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.
// authorizationRuleName - the authorization rule name.
func (client QueuesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName 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: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", 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, authorizationRuleName)
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, authorizationRuleName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"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/{authorizationRuleName}/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.DoRetryWithRegistration(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.WithErrorUnlessStatusCode(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.
// authorizationRuleName - 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, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (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: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewError("servicebus.QueuesClient", "RegenerateKeys", err.Error())
}
req, err := client.RegenerateKeysPreparer(ctx, resourceGroupName, namespaceName, queueName, authorizationRuleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "RegenerateKeys", nil, "Failure preparing request")
return
}
resp, err := client.RegenerateKeysSender(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.RegenerateKeysResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "RegenerateKeys", resp, "Failure responding to request")
return
}
return
}
// RegenerateKeysPreparer prepares the RegenerateKeys request.
func (client QueuesClient) RegenerateKeysPreparer(ctx context.Context, resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"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/{authorizationRuleName}/regenerateKeys", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// RegenerateKeysSender sends the RegenerateKeys request. The method will close the
// http.Response Body if it receives an error.
func (client QueuesClient) RegenerateKeysSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always
// closes the http.Response Body.
func (client QueuesClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
| Azure/azure-sdk-for-go | services/preview/servicebus/mgmt/2021-06-01-preview/servicebus/queues.go | GO | mit | 49,392 |
<?php
return array (
'id' => 'docomo_n2701c_ver1',
'fallback' => 'docomo_generic_jap_ver2',
'capabilities' =>
array (
'columns' => '11',
'max_image_width' => '121',
'rows' => '11',
'resolution_width' => '176',
'resolution_height' => '198',
'max_image_height' => '190',
'flash_lite_version' => '',
),
);
| cuckata23/wurfl-data | data/docomo_n2701c_ver1.php | PHP | mit | 342 |
<?php
namespace HMLB\Date\Tests\Localization;
/*
* This file is part of the Date package.
*
* (c) Hugues Maignol <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use HMLB\Date\Date;
use HMLB\Date\Tests\AbstractTestCase;
class ItTest extends AbstractTestCase
{
public function testDiffForHumansLocalizedInItalian()
{
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());
}
);
}
}
| hmlb/date | tests/Localization/ItTest.php | PHP | mit | 840 |
// http://www.w3.org/2010/05/video/mediaevents.html
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 );
| rwaldron/butter | popcorn-js/popcorn-api-notes.js | JavaScript | mit | 2,970 |
/*
_____ __ _____________ _______ ______ ___________
/ \| | \____ \__ \\_ __ \/ ___// __ \_ __ \
| Y Y \ | / |_> > __ \| | \/\___ \\ ___/| | \/
|__|_| /____/| __(____ /__| /____ >\___ >__|
\/ |__| \/ \/ \/
Copyright (C) 2004 - 2020 Ingo Berg
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(MUPARSER_DLL)
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#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) mupDefinePostfixOprt(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) mupDefineInfixOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset)
{
muParser_t* const p(AsParser(a_hParser));
p->DefineInfixOprtChars(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
| Siv3D/OpenSiv3D | Siv3D/src/ThirdParty/muparser/muParserDLL.cpp | C++ | mit | 25,026 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<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="MSearchResultsWindow">
<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="structv8_1_1internal_1_1_smi_tagging_3_014_01_4.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="structv8_1_1internal_1_1_smi_tagging_3_014_01_4-members.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:ae47c1d7f0359f4560b84fa8e573974e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae47c1d7f0359f4560b84fa8e573974e2"></a>
static int </td><td class="memItemRight" valign="bottom"><b>SmiToInt</b> (internal::Object *value)</td></tr>
<tr class="separator:ae47c1d7f0359f4560b84fa8e573974e2"><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:a4230f8d72054619f8141d0524733d8e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4230f8d72054619f8141d0524733d8e9"></a>
static const int </td><td class="memItemRight" valign="bottom"><b>kSmiShiftSize</b> = 0</td></tr>
<tr class="separator:a4230f8d72054619f8141d0524733d8e9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0857bbaab799b39a51f578744bf855f8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0857bbaab799b39a51f578744bf855f8"></a>
static const int </td><td class="memItemRight" valign="bottom"><b>kSmiValueSize</b> = 31</td></tr>
<tr class="separator:a0857bbaab799b39a51f578744bf855f8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6847bed1398baca23b399c9b01121eaa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6847bed1398baca23b399c9b01121eaa"></a>
static const uintptr_t </td><td class="memItemRight" valign="bottom"><b>kEncodablePointerMask</b> = 0x1</td></tr>
<tr class="separator:a6847bed1398baca23b399c9b01121eaa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a387b431afa5d17958107860f8b2f53b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a387b431afa5d17958107860f8b2f53b9"></a>
static const int </td><td class="memItemRight" valign="bottom"><b>kPointerToSmiShift</b> = 0</td></tr>
<tr class="separator:a387b431afa5d17958107860f8b2f53b9"><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  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
| v8-dox/v8-dox.github.io | 007393a/html/structv8_1_1internal_1_1_smi_tagging_3_014_01_4.html | HTML | mit | 7,170 |
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 skipRoundtripEqualityTest = false)
{
byte[] originalUncompressedBytes;
using (var originalUncompressedStream = new MemoryStream())
using (var entryStream = getOriginalStream())
{
entryStream.CopyTo(originalUncompressedStream);
originalUncompressedBytes = originalUncompressedStream.ToArray();
}
T parsedFile = default;
try
{
using (var entryStream = new MemoryStream(originalUncompressedBytes, false))
{
parsedFile = parseCallback(entryStream);
}
}
catch
{
File.WriteAllBytes("original.bin", originalUncompressedBytes);
throw;
}
byte[] serializedBytes;
using (var serializedStream = new MemoryStream())
{
serializeCallback(parsedFile, serializedStream);
serializedBytes = serializedStream.ToArray();
}
if (originalUncompressedBytes.Length != serializedBytes.Length)
{
File.WriteAllBytes("original.bin", originalUncompressedBytes);
File.WriteAllBytes("serialized.bin", serializedBytes);
}
Assert.Equal(originalUncompressedBytes.Length, serializedBytes.Length);
if (!skipRoundtripEqualityTest)
{
AssertUtility.Equal(originalUncompressedBytes, serializedBytes);
}
return parsedFile;
}
}
}
| feliwir/openSage | src/OpenSage.Game.Tests/Data/TestUtility.cs | C# | mit | 1,933 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\DoctrineMongoDBBundle\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 <[email protected]>
* @author Jonathan H. Wage <[email protected]>
*/
class InfoDoctrineODMCommand 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.default_document_manager');
$documentManagerService = sprintf('doctrine.odm.mongodb.%s_document_manager', $documentManagerName);
/* @var $documentManager Doctrine\ODM\MongoDB\DocumentManager */
$documentManager = $this->container->get($documentManagerService);
$documentClassNames = $documentManager->getConfiguration()
->getMetadataDriverImpl()
->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);
}
}
}
} | ajessu/jobeet | vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Command/InfoDoctrineODMCommand.php | PHP | mit | 3,442 |
#!/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/sslittle-na-sstrix-ar RANLIB=/homes/phjk/simplescalar/bin/sslittle-na-sstrix-ranlib
popd
# and link the binary back here
ln -s $TMPNAME/SSCA2
| H7DE/Instruction-Level-Parallelism-CW | SSCA2v2.2/BuildForSimplescalar.sh | Shell | mit | 757 |
<!--
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.defaultGaugeIndicator);
// 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>
| csipiemonte/smartlab | reference-realtime/webapplication/sdp-ref/index.html | HTML | mit | 6,042 |
module LiveScript
module Source
VERSION = '1.5.0'
end
end
| Roonin-mx/livescript-source | lib/livescript/source/version.rb | Ruby | mit | 66 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Topup extends MY_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see http://codeigniter.com/user_guide/general/urls.html
*/
public function __construct()
{
parent::__construct();
$this->load->model(array('admin_model','user_model'));
getCurrentAccountStatus($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');
}
}
} | seegan/Myproj | application/controllers/super_admin/topup.php | PHP | mit | 1,936 |
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
};
});
| broekema41/Device-lab-access-point | static/js/message.js | JavaScript | mit | 576 |
# 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
| talek/vorax4 | vorax/ruby/spec/tablezip_spec.rb | Ruby | mit | 2,817 |
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 register_for_permission_handling
register(User)
register(Group)
register_for_permission_handling(User)
register_for_permission_handling(Group)
register_for_permission_handling(Permission)
register_for_permission_handling(LogEntry)
| cytex124/celsius-cloud-backend | src/addons/management_user/admin.py | Python | mit | 408 |
<!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">
<!-- Errores de inserción. -->
<?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 -->
<!-- Información de la partida -->
<?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 featured-box-primary">
<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>";
// Dependiendo de la función de la casilla, pintaremos esa función.
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>";
}
}
// Fin de colocación de fichas.
?>
<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'>";
// Si confirma la tirada de dado, vamos a la página de preguntas.
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'>";
// Si confirma la tirada de dado, vamos a la página de preguntas.
bootbox.confirm(innerTxt, function(result) {
if (result == true) {
location.href = '<?=base_url()?>index.php/jugar/finalizar/'
+ id;
}
});
};
});
</script>
<!-- FIN BOOT -->
</body>
</html>
| mariamartinmarin/virUCA | application/views/jugar.php | PHP | mit | 17,711 |
namespace ConsoleStudentSystem.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; }
}
}
}
| studware/Ange-Git | MyTelerikAcademyHomeWorks/DataBase/12.EntityFrameworkCodeFirst/ConsoleStudentSystem/ConsoleStudentSystem.Models/Student.cs | C# | mit | 492 |
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))
});
| p810/wordpress-plugin-scaffold | gulpfile.js | JavaScript | mit | 542 |
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
{
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
public void ConfigureAuth(IAppBuilder app)
{
// Configure the db context, user manager and signin manager to use a single instance per request
app.CreatePerOwinContext(RouteExtremeDbContext.Create);
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.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.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
Provider = new CookieAuthenticationProvider
{
// 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 = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, User>(
validateInterval: TimeSpan.FromMinutes(30),
regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
}
});
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
// Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process.
app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.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.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);
// Uncomment the following lines to enable logging in with third party login providers
//app.UseMicrosoftAccountAuthentication(
// clientId: "",
// clientSecret: "");
//app.UseTwitterAuthentication(
// consumerKey: "",
// consumerSecret: "");
//app.UseFacebookAuthentication(
// appId: "",
// appSecret: "");
//app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
//{
// ClientId = "",
// ClientSecret = ""
//});
}
}
} | zhenyaracheva/RoutExtreme | RouteExtreme.Web/App_Start/Startup.Auth.cs | C# | mit | 3,515 |
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);
}
}
}
| ztmark/managementsystem | src/com/management/dao/impl/calcs/ProjectCalcDaoImpl.java | Java | mit | 2,035 |
# [Глава 1](../index.md#Глава-1-Построение-абстракций-с-помощью-процедур)
### Упражнение 1.2
Переведите следующее выражение в префиксную форму:
`(5 + 4 + (2 - (3 - (6 + 4/5)))) / (3 * (6 - 2) * (2 - 7))`
#### Решение
[Code](../../src/sicp/chapter01/1_02.clj) | [Test](../../test/sicp/chapter01/1_02_test.clj)
| justCxx/sicp | doc/chapter01/ex_1_02.md | Markdown | mit | 419 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<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="MSearchResultsWindow">
<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="classv8_1_1HeapProfiler.html">HeapProfiler</a></li><li class="navelem"><a class="el" href="classv8_1_1HeapProfiler_1_1ObjectNameResolver.html">ObjectNameResolver</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="classv8_1_1HeapProfiler_1_1ObjectNameResolver-members.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="v8-profiler_8h_source.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:aa9ac9e83806c7c746b652f435cf66622"><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1HeapProfiler_1_1ObjectNameResolver.html#aa9ac9e83806c7c746b652f435cf66622">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:aa9ac9e83806c7c746b652f435cf66622"><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="aa9ac9e83806c7c746b652f435cf66622"></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="v8-profiler_8h_source.html">v8-profiler.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
| v8-dox/v8-dox.github.io | 967cf97/html/classv8_1_1HeapProfiler_1_1ObjectNameResolver.html | HTML | mit | 6,804 |
// // Copyright (c) Microsoft. All rights reserved.
// // Licensed under the MIT license. See LICENSE file in the project root for full license information.
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 +=
avAddressCtrl_OnButtonClick;
_wpfAddressCtrl.Loaded += avAddressCtrl_Loaded;
}
private void avAddressCtrl_Loaded(object sender, EventArgs e)
{
_initBackBrush = _wpfAddressCtrl.MyControlBackground;
_initForeBrush = _wpfAddressCtrl.MyControlForeground;
_initFontFamily = _wpfAddressCtrl.MyControlFontFamily;
_initFontSize = _wpfAddressCtrl.MyControlFontSize;
_initFontWeight = _wpfAddressCtrl.MyControlFontWeight;
_initFontStyle = _wpfAddressCtrl.MyControlFontStyle;
}
private void avAddressCtrl_OnButtonClick(
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 radioBackgroundOriginal_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlBackground = _initBackBrush;
}
private void radioBackgroundLightGreen_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlBackground = new SolidColorBrush(Colors.LightGreen);
}
private void radioBackgroundLightSalmon_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlBackground = new SolidColorBrush(Colors.LightSalmon);
}
private void radioForegroundOriginal_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlForeground = _initForeBrush;
}
private void radioForegroundRed_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlForeground = new SolidColorBrush(Colors.Red);
}
private void radioForegroundYellow_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlForeground = new SolidColorBrush(Colors.Yellow);
}
private void radioFamilyOriginal_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontFamily = _initFontFamily;
}
private void radioFamilyTimes_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontFamily = new FontFamily("Times New Roman");
}
private void radioFamilyWingDings_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontFamily = new FontFamily("WingDings");
}
private void radioSizeOriginal_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontSize = _initFontSize;
}
private void radioSizeTen_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontSize = 10;
}
private void radioSizeTwelve_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontSize = 12;
}
private void radioStyleOriginal_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontStyle = _initFontStyle;
}
private void radioStyleItalic_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontStyle = FontStyles.Italic;
}
private void radioWeightOriginal_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontWeight = _initFontWeight;
}
private void radioWeightBold_CheckedChanged(object sender, EventArgs e)
{
_wpfAddressCtrl.MyControlFontWeight = FontWeights.Bold;
}
}
}
// </snippet1> | Microsoft/WPF-Samples | Migration and Interoperability/WindowsFormsHostingWpfControl/FormsApp/Form1.cs | C# | mit | 5,369 |
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 JsonApiDotNetCoreTests.IntegrationTests.ResourceDefinitions.Reading;
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature)]
public sealed class MoonDefinition : HitCountingResourceDefinition<Moon, int>
{
private readonly IClientSettingsProvider _clientSettingsProvider;
protected override ResourceDefinitionExtensibilityPoints ExtensibilityPointsToTrack => ResourceDefinitionExtensibilityPoints.Reading;
public MoonDefinition(IResourceGraph resourceGraph, IClientSettingsProvider clientSettingsProvider, ResourceDefinitionHitCounter 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.
_clientSettingsProvider = clientSettingsProvider;
}
public override IImmutableSet<IncludeElementExpression> OnApplyIncludes(IImmutableSet<IncludeElementExpression> existingIncludes)
{
base.OnApplyIncludes(existingIncludes);
if (!_clientSettingsProvider.IsMoonOrbitingPlanetAutoIncluded ||
existingIncludes.Any(include => include.Relationship.Property.Name == nameof(Moon.OrbitsAround)))
{
return existingIncludes;
}
RelationshipAttribute orbitsAroundRelationship = ResourceType.GetRelationshipByPropertyName(nameof(Moon.OrbitsAround));
return existingIncludes.Add(new IncludeElementExpression(orbitsAroundRelationship));
}
public override QueryStringParameterHandlers<Moon> OnRegisterQueryableHandlersForQueryStringParameters()
{
base.OnRegisterQueryableHandlersForQueryStringParameters();
return new QueryStringParameterHandlers<Moon>
{
["isLargerThanTheSun"] = FilterByRadius
};
}
private static IQueryable<Moon> FilterByRadius(IQueryable<Moon> source, StringValues parameterValue)
{
bool isFilterOnLargerThan = bool.Parse(parameterValue);
return isFilterOnLargerThan ? source.Where(moon => moon.SolarRadius > 1m) : source.Where(moon => moon.SolarRadius <= 1m);
}
}
| json-api-dotnet/JsonApiDotNetCore | test/JsonApiDotNetCoreTests/IntegrationTests/ResourceDefinitions/Reading/MoonDefinition.cs | C# | mit | 2,427 |
/*
* Author: Minho Kim (ISKU)
* Date: March 3, 2018
* E-mail: [email protected]
*
* https://github.com/ISKU/Algorithm
* https://www.acmicpc.net/problem/13169
*/
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);
}
} | ISKU/Algorithm | BOJ/13169/Main.java | Java | mit | 630 |
from django import forms
from miniURL.models import Redirection
#Pour faire un formulaire depuis un modèle. (/!\ héritage différent)
class RedirectionForm(forms.ModelForm):
class Meta:
model = Redirection
fields = ('real_url', 'pseudo')
# Pour récupérer des données cel apeut ce faire avec un POST
# ou directement en donnant un objet du modele :
#form = ArticleForm(instance=article) # article est bien entendu un objet d'Article quelconque dans la base de données
# Le champs est ainsi préremplit.
# Quand on a recu une bonne formeModele il suffit de save() pour la mettre en base | guillaume-havard/testdjango | sitetest/miniURL/forms.py | Python | mit | 615 |
<!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>
| revans/sparks | lib/sparks/generators/template/vendor/assets/javascripts/polymer-all/more-elements/cool-clock/index.html | HTML | mit | 494 |
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 IllegalArgumentException 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 IllegalArgumentException(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 IllegalArgumentException("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();
}
}
| tcoenraad/compiler-construction | lib/pp/iloc/model/Program.java | Java | mit | 7,199 |
/** 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.mejs-horizontal-volume-slider {
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;
-webkit-border-radius: 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+ */
-webkit-border-radius: 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;
-webkit-border-radius: 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 .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle {
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 .mejs-time-float-current {
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.mejs-horizontal-volume-slider {
position: absolute;
top: 70px;
right: 12px;
cursor: pointer;
z-index: 1;
}
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
width: 80px !important;
height: 5px !important;
background: #e2e2e2;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
position: absolute;
width: 0 ;
height: 5px !important;
top: 0px;
left: 0px;
background:#44c7f4;
-webkit-border-radius: 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.mejs-horizontal-volume-slider {
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 .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
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 .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
width: 72px !important;
}
}
| sharon-lin/SpellrTellr | css/audio.css | CSS | mit | 6,594 |
<a href="https://sweetalert2.github.io/">
<img src="./assets/swal2-logo.png" width="498" alt="SweetAlert2">
</a>
A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement <br> for JavaScript's popup boxes. Zero dependencies.
---
### [Installation](https://sweetalert2.github.io/#download) | [Usage](https://sweetalert2.github.io/#usage) | [Examples](https://sweetalert2.github.io/#examples) | [Recipe gallery](https://sweetalert2.github.io/recipe-gallery/) | [Themes](https://github.com/sweetalert2/sweetalert2-themes) | [React](https://github.com/sweetalert2/sweetalert2-react-content) | [Angular](https://github.com/sweetalert2/ngx-sweetalert2) | [:heart: Donate](https://sweetalert2.github.io/#donations)
---
:moneybag: [Get $100 in free credits with DigitalOcean!](https://m.do.co/c/12907f2ba0bf)
---
Sponsors
--------
For all questions related to sponsorship please contact me via email [email protected]
[<img src="https://sweetalert2.github.io/images/sponsors/flowcrypt-banner.png">](https://flowcrypt.com/?utm_source=sweetalert2&utm_medium=banner)
[<img src="https://sweetalert2.github.io/images/plus.png" width="80">](SPONSORS.md) | [<img src="https://avatars2.githubusercontent.com/u/28631236?s=80&v=4" width="80">](https://flowcrypt.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/mybitcoinslots.png" width="80">](https://www.mybitcoinslots.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/torc-stark.png" width="80">](https://torcstark.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/LifeDigital.png" width="80">](https://lifedigitalwiki.org/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/coderubik.png" width="80">](https://coderubik.com/?utm_source=sweetalert2&utm_medium=logo)
-|-|-|-|-|-
[Become a sponsor](SPONSORS.md) | [FlowCrypt](https://flowcrypt.com/?utm_source=sweetalert2&utm_medium=logo) | [My Bitcoin slots](https://www.mybitcoinslots.com/?utm_source=sweetalert2&utm_medium=logo) | [TorcStark](https://torcstark.com/) | [life digital](https://lifedigitalwiki.org/?utm_source=sweetalert2&utm_medium=logo) | [Code Rubik](https://coderubik.com/?utm_source=sweetalert2&utm_medium=logo)
[<img src="https://sweetalert2.github.io/images/sponsors/halvinlaina.png" width="80">](https://halvinlaina.fi/) | [<img src="https://avatars0.githubusercontent.com/u/3986989?s=80&v=4" width="80">](https://github.com/tiagostutz) | [<img src="https://sweetalert2.github.io/images/sponsors/sebaebc.png" width="80">](https://github.com/sebaebc)
-|-|-
[Halvin Laina](https://halvinlaina.fi/) | [Tiago de Oliveira Stutz](https://github.com/tiagostutz) | [SebaEBC](https://github.com/sebaebc)
NSFW Sponsors
-------------
[<img src="https://sweetalert2.github.io/images/sponsors/sexdollsoff.png" width="80">](https://www.sexdollsoff.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/realsexdoll.png" width="80">](https://realsexdoll.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/yourdoll.jpg" width="80">](https://www.yourdoll.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/annies-dollhouse.png" width="80">](https://anniesdollhouse.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/sexdollcenter.png" width="80">](https://sexdollcenter.vip/) |
-|-|-|-|-
[SexDollsOff](https://www.sexdollsoff.com/) | [RealSexDoll](https://realsexdoll.com/) | [Your Doll](https://www.yourdoll.com/) | [Annie's Dollhouse](https://anniesdollhouse.com/) | [Sex Doll Center](https://sexdollcenter.vip/)
[<img src="https://sweetalert2.github.io/images/sponsors/sexangelbaby.png" width="80">](https://sexangelbaby.com/) | [<img src="https://sweetalert2.github.io/images/sponsors/theadulttoyfinder.png" width="80">](https://theadulttoyfinder.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/fresh-materials.png" width="80">](https://www.thefreshmaterials.com/?utm_source=sweetalert2&utm_medium=logo)
-|-|-
[SexAngelbaby](https://sexangelbaby.com/) | [The Adult Toy Finder](https://theadulttoyfinder.com/?utm_source=sweetalert2&utm_medium=logo) | [Fresh Materials](https://www.thefreshmaterials.com/?utm_source=sweetalert2&utm_medium=logo)
[<img src="https://sweetalert2.github.io/images/sponsors/joylovedolls.png" width="80">](https://www.joylovedolls.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/my-sex-toy-guide.jpg" width="80">](https://www.mysextoyguide.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/best-blowjob-machines.jpg" width="80">](https://www.bestblowjobmachines.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/sextoycollective.jpg" width="80">](https://sextoycollective.com/?utm_source=sweetalert2&utm_medium=logo) | [<img src="https://sweetalert2.github.io/images/sponsors/doctorclimax.png" width="80">](https://doctorclimax.com/)
-|-|-|-|-
[Joy Love Dolls](https://www.joylovedolls.com/?utm_source=sweetalert2&utm_medium=logo) | [My Sex Toy Guide](https://www.mysextoyguide.com/?utm_source=sweetalert2&utm_medium=logo) | [Best Blowjob Machines](https://www.bestblowjobmachines.com/?utm_source=sweetalert2&utm_medium=logo) | [STC](https://sextoycollective.com/?utm_source=sweetalert2&utm_medium=logo) | [DoctorClimax](https://doctorclimax.com/)
Support and Donations
---------------------
Has SweetAlert2 helped you create an amazing application? You can show your support via [GitHub Sponsors](https://github.com/sponsors/limonte)
Alternative ways for donations (PayPal, cryptocurrencies, etc.) are listed here: https://sweetalert2.github.io/#donations
### [Hall of Donators :trophy:](DONATIONS.md)
| limonte/sweetalert2 | README.md | Markdown | mit | 5,912 |
<!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://www.cuishifeng.cn/go/card" target="_blank">click here</a></div>
</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>被调用。回调按他们添加的顺序执行。每个回调传递的args在deferred.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://www.cuishifeng.cn" target="_blank">Shifone</a> 2012 - 2016 All rights reserved. </p>
</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="jQuery_selector_context.html">jQuery([sel,[context]])</a></li>
<li><a href="jQuery_html_ownerDocument.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.isImmediatePropagationStopped.html" title="event.isImmediatePropagationStopped">eve.isImmediatePropag...()</a></li>
<li><a href="event.isPropagationStopped.html">eve.isPropagationStopped()</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.stopImmediatePropagation.html" title="event.stopImmediatePropagation">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://www.cuishifeng.cn/go/card">信用卡优惠</a></li>
<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?bbcf1c00c855ede39d5ad2eac08d2ab7";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</div>
</body>
</html>
| shifonecui/shifonecui.github.com | deferred.resolveWith.html | HTML | mit | 38,635 |
import { IHiveMindNeuron, IHiveMindNeurons } from './HiveMindNeurons';
import { UserInput } from '../../BasicUserInput';
import { RequestContext } from '../../BasicRequestContext';
import { INeuronsResponse, ISingleNeuronsResponse, SingleNeuronsResponse } from './NeuronsResponse';
import { INeuronResponse } from '../../neurons/responses/SimpleResponse';
import { NeuronsResponseFactory } from './NeuronsResponseFactory';
export class PureEmergentHiveMindNeurons 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: ISingleNeuronsResponse[] = [];
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 SingleNeuronsResponse(neuron, response));
}
}).catch(error => {
console.error('FATAL Neuron: ' + neuron + ' rejected...' + error);
});
}
Promise.all(
neuronResponses,
).then((allResolved: INeuronResponse[]) => {
const toResolve = NeuronsResponseFactory.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);
}
});
}
}
| OFTechLabs/oratio | src/emergent/hivemind/neurons/PureEmergentHiveMindNeurons.ts | TypeScript | mit | 2,881 |
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
| danielkummer/nixon-pi | spec/easing_spec.rb | Ruby | mit | 604 |
<!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: "[email protected]"
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=b9ba5f4874f9845c96a9e72e12df3f32"
}
</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</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>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.09.1-2.0.6/extra-dev/8.11.dev/circuits/8.6.0.html | HTML | mit | 6,855 |
<!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 Preprocessor-pretty-printer 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 <[email protected]>"
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" }
"coq-mathcomp-ssreflect" { (>= "1.11.0" & < "1.13~") | = "dev" }
"coq-mathcomp-fingroup"
"coq-mathcomp-algebra"
"coq-mathcomp-solvable"
"coq-mathcomp-field"
"coq-mathcomp-real-closed" { (>= "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=45ff1fc19ee16d1d97892a54fbbc9864e89fe79b0c7aa3cc9503e44bced5f446"
}
</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</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>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.07.1-2.0.6/released/8.9.0/mathcomp-abel/1.0.0.html | HTML | mit | 7,463 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 25 21:11:45 2017
@author: hubert
"""
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)
| bcimontreal/bci_workshop | python/extra_stuff/livebargraph.py | Python | mit | 940 |
#!/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
#
# AUTHOR: Ravikiran K.S., [email protected]
# LICENCE: Copyright (c) 2013, Ravikiran K.S.
#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
| rkks/scripts | bash/rsync.sh | Shell | mit | 5,109 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 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>
<!-- ========= START OF TOP NAVBAR ======= -->
<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/TransactionProcessor.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="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
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>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<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">
<!-- ========== METHOD SUMMARY =========== -->
<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#getReferencedTransactionId()">getReferencedTransactionId</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="methods_inherited_from_class_java.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">
<!-- ============ METHOD DETAIL ========== -->
<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="getReferencedTransactionId()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReferencedTransactionId</h4>
<pre>java.lang.Long getReferencedTransactionId()</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>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li 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/TransactionProcessor.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="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
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>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| stevedoe/nxt-client | html/doc/nxt/Transaction.html | HTML | mit | 13,838 |
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 | ersmith/cookbook-ssh | spec/default_spec.rb | Ruby | mit | 373 |
<?php
namespace Ekyna\Bundle\CartBundle\Provider;
use Ekyna\Bundle\CartBundle\Model\CartProviderInterface;
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
* @package Ekyna\Bundle\CartBundle\Provider
* @author Étienne Dauvergne <[email protected]>
*/
class CartProvider implements CartProviderInterface
{
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;
}
}
| ekyna/CartBundle | Provider/CartProvider.php | PHP | mit | 2,736 |
<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> | bmarquesn/bmnprojetopiloto | application/views/admin/usuarios/listar.php | PHP | mit | 1,435 |
# -*- 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]: # kontrolka ciągła
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: # kontrolka prawa: ciągła
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()
| KMPSUJ/lego_robot | pilot.py | Python | mit | 4,781 |
//
// UIBarButtonItem+initWithImageName.h
// lottowinnersv2
//
// Created by Mac Mini on 4/17/14.
// Copyright (c) 2014 com.qaik. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIBarButtonItem (initWithImageName)
+ (instancetype)barbuttonItemWithImage:(UIImage *)image target:(id)target action:(SEL)action;
+ (instancetype)barbuttonItemWithImage:(UIImage *)image title:(NSString *)title target:(id)target action:(SEL)action;
+ (instancetype)barbuttonItemWithImage:(UIImage *)image disableImage:(UIImage *)disableImage title:(NSString *)title target:(id)target action:(SEL)action;
@end
| bumaociyuan/ZXFramework | UIKit/UIBarButtonItem+initWithImageName.h | C | mit | 604 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using System;
using System.Collections.Generic;
using Windows.Foundation.Collections;
using Windows.Media;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using MixedRemoteViewCompositor.Network;
namespace Viewer
{
public sealed partial class Playback : Page
{
private MediaExtensionManager mediaExtensionManager = 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 += Connection_Disconnected;
var propertySet = new PropertySet();
var propertySetDictionary = propertySet as IDictionary<string, object>;
propertySet["Connection"] = this.connection;
RegisterSchemeHandler(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 Connection_Disconnected(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 -= Connection_Disconnected;
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 RegisterSchemeHandler(PropertySet propertySet)
{
if (this.mediaExtensionManager == null)
{
this.mediaExtensionManager = new MediaExtensionManager();
}
this.mediaExtensionManager.RegisterSchemeHandler("MixedRemoteViewCompositor.Media.MrvcSchemeHandler", "mrvc:", propertySet);
}
}
}
| jimshalo10/HoloLensCompanionKit | MixedRemoteViewCompositor/Samples/LowLatencyMRC/UWP/Viewer/Playback.xaml.cs | C# | mit | 4,072 |
<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="./_OBJECT_REF_STACK_INFO.html">_OBJECT_REF_STACK_INFO</a><br>
</font></body></html> | epikcraw/ggool | public/Windows 10 x64 (19042.610)/_OBJECT_REF_INFO.html | HTML | mit | 490 |
#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 */
| thejnich/ArtGalleryProblem | headers/SimplePolygon.h | C | mit | 808 |
<?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;
}
} | lekster/md_new | libraries/common/Rest/class.ModelTask.php | PHP | mit | 431 |
/*
* This code it's help you to check JS plugin function (e.g. jQuery) exist.
* When function not exist, the code will auto reload JS plugin from your setting.
*
* plugin_name: It's your plugin function name (e.g. jQuery). The type is string.
* reload_url: It's your reload plugin function URL. The type is string.
*
* Copyright 2015, opoepev (Matt, Paul.Lu, Yi-Chun Lu)
* Free to use and abuse under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
//Main code
var checkJSPluginExist = function (plugin_name, reload_url, depend_plugin_name) {
//window[plugin_name] || document.write('<script src="' + reload_url + '">\x3C/script>');
if (typeof depend_plugin_name !== 'undefined') {
if (typeof window[depend_plugin_name][plugin_name] !== "function") {
var tag = document.createElement('script');
tag.src = reload_url;
var headerElementTag = document.getElementsByTagName('head')[0];
headerElementTag.appendChild(tag);
return false;
}
} else {
if (typeof window[plugin_name] !== "function") {
var tag = document.createElement('script');
tag.src = reload_url;
var headerElementTag = document.getElementsByTagName('head')[0];
headerElementTag.appendChild(tag);
return false;
}
}
return true;
};
| opoepev/checkJSPluginExist | checkJSPluginExist.js | JavaScript | mit | 1,273 |
# -*- 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
| arruda/amao | AMAO/apps/Corretor/models/retorno.py | Python | mit | 2,633 |
<?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://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source>
<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. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</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. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</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. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.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. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</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. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</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="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a ShadowCoin address (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</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>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.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>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.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" [email protected]
</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>
| hansacoin/hansacoin | src/qt/locale - Copy/bitcoin_ur_PK.ts | TypeScript | mit | 107,848 |
<?php include $_SERVER['DOCUMENT_ROOT'] . '/snippets/document/header/index.php'; ?>
<div class="layout-project">
<div class="project project_glow context-content">
<section class="project__layout">
<header class="project__header">
<div class="container">
<h1 class="project__title">Glow</h1>
</div>
</header>
<main class="project__main">
<div class="project__image project__image_desktop">
<div class="container">
<div class="image">
<img class="image__tag" src="../assets/images/glow__home__1440-1600-browser.png" alt="Glowcon Layout Home">
</div>
</div>
</div>
<div class="project__info">
<div class="container">
<div class="project__facts">
<ul class="list list_facts">
<li class="list__item">Project - WordPress Website</li>
<li class="list__item">Role - Development</li>
<li class="list__item">Agency - Bleech</li>
<li class="list__item">Year - 2019</li>
</ul>
</div>
</div>
</div>
<div class="project__image project__image_desktop">
<div class="container">
<div class="image">
<img class="image__tag" src="../assets/images/glow__media__1440-1600-browser.png" alt="Glowcon Media Example">
</div>
</div>
</div>
</main>
<footer class="project__footer">
<div class="container">
<a class="button button_circle" aria-label="Open Project URL" href="https://www.glowcon.de/" target="_blank" rel="noreferrer noopener">
<svg aria-hidden="true" width="44" height="44" viewBox="0 0 44 44" xmlns="https://www.w3.org/2000/svg"><path d="M29.22 25.1L44 10.32 33.68 0 18.9 14.78l4.457 4.456-4.12 4.12-4.457-4.455L0 33.68 10.32 44 25.1 29.22l-4.457-4.456 4.12-4.12 4.457 4.455zm-6.934 4.12L10.32 41.187 2.812 33.68 14.78 21.715l3.05 3.05-6.48 6.48 1.406 1.406 6.48-6.48 3.05 3.05zm-.572-14.44L33.68 2.813l7.507 7.506L29.22 22.285l-3.05-3.05 6.48-6.48-1.407-1.406-6.48 6.48-3.05-3.05z" fill-rule="evenodd"/></svg>
</a>
</div>
</footer>
</section>
</div>
</div>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/snippets/document/footer/index.php'; ?>
| Booozz/portfolio-m | app/templates/project-glow.php | PHP | mit | 2,356 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.